sticky-notes/patches/bytemd+1.21.0.patch

58 lines
1.9 KiB
Diff

diff --git a/node_modules/bytemd/package.json b/node_modules/bytemd/package.json
index 9103d88..e59f261 100644
--- a/node_modules/bytemd/package.json
+++ b/node_modules/bytemd/package.json
@@ -16,6 +16,7 @@
"author": "Rongjian Zhang",
"exports": {
".": {
+ "svelte": "./svelte/index.js",
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
diff --git a/node_modules/bytemd/svelte/editor.svelte b/node_modules/bytemd/svelte/editor.svelte
index 652a063..9ab0895 100644
--- a/node_modules/bytemd/svelte/editor.svelte
+++ b/node_modules/bytemd/svelte/editor.svelte
@@ -253,6 +253,9 @@ onMount(async () => {
new ResizeObserver((entries) => {
containerWidth = entries[0].contentRect.width;
// console.log(containerWidth);
+ tick().then(() => {
+ editor.refresh();
+ })
}).observe(root, { box: 'border-box' });
// No need to call `on` because cm instance would change once after init
});
diff --git a/node_modules/bytemd/svelte/toolbar.svelte b/node_modules/bytemd/svelte/toolbar.svelte
index 26d879f..e6c238e 100644
--- a/node_modules/bytemd/svelte/toolbar.svelte
+++ b/node_modules/bytemd/svelte/toolbar.svelte
@@ -72,16 +72,16 @@ $: rightActions = [
},
},
},
- {
- title: locale.source,
- icon: icons.GithubOne,
- handler: {
- type: 'action',
- click() {
- window.open('https://github.com/bytedance/bytemd');
- },
- },
- },
+ // {
+ // title: locale.source,
+ // icon: icons.GithubOne,
+ // handler: {
+ // type: 'action',
+ // click() {
+ // window.open('https://github.com/bytedance/bytemd');
+ // },
+ // },
+ // },
...rightAfferentActions,
];
const tippyClass = 'bytemd-tippy';