@hyperbook/markdown 0.62.0 → 0.62.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1197,7 +1197,11 @@ if _pg:
|
|
|
1197
1197
|
},
|
|
1198
1198
|
);
|
|
1199
1199
|
|
|
1200
|
-
|
|
1200
|
+
let editorStateRestored = false;
|
|
1201
|
+
const restoreEditorState = async () => {
|
|
1202
|
+
if (editorStateRestored) return;
|
|
1203
|
+
editorStateRestored = true;
|
|
1204
|
+
|
|
1201
1205
|
const result = await hyperbook.store.db.pyide.get(id);
|
|
1202
1206
|
if (result) {
|
|
1203
1207
|
pyideState = { ...pyideState, ...result };
|
|
@@ -1227,7 +1231,12 @@ if _pg:
|
|
|
1227
1231
|
applyStoredSplitSize?.();
|
|
1228
1232
|
applyCanvasOutputLayout();
|
|
1229
1233
|
}
|
|
1230
|
-
}
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
editor.addEventListener("code-input_load", restoreEditorState);
|
|
1237
|
+
if (editor.querySelector("textarea")) {
|
|
1238
|
+
void restoreEditorState();
|
|
1239
|
+
}
|
|
1231
1240
|
|
|
1232
1241
|
window.addEventListener("resize", applyCanvasOutputLayout);
|
|
1233
1242
|
applyCanvasOutputLayout();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperbook/markdown",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.1",
|
|
4
4
|
"author": "Mike Barkmin",
|
|
5
5
|
"homepage": "https://github.com/openpatch/hyperbook#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"vitest": "^4.0.18",
|
|
96
96
|
"wavesurfer.js": "^7.12.1",
|
|
97
97
|
"@hyperbook/fs": "0.25.0",
|
|
98
|
-
"@hyperbook/
|
|
99
|
-
"@hyperbook/
|
|
98
|
+
"@hyperbook/types": "0.23.0",
|
|
99
|
+
"@hyperbook/web-component-excalidraw": "0.3.3"
|
|
100
100
|
},
|
|
101
101
|
"scripts": {
|
|
102
102
|
"version": "pnpm build",
|