@haklex/rich-ext-excalidraw 0.0.100 → 0.0.101
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExcalidrawEditRenderer.d.ts","sourceRoot":"","sources":["../src/ExcalidrawEditRenderer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;AAM/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACrC;
|
|
1
|
+
{"version":3,"file":"ExcalidrawEditRenderer.d.ts","sourceRoot":"","sources":["../src/ExcalidrawEditRenderer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;AAM/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACrC;AAyZD,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA0HlE,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -105,6 +105,7 @@ const ExcalidrawEditorDialogContent = ({
|
|
|
105
105
|
const isDirtyRef = useRef(false);
|
|
106
106
|
const confirmDialogOpenRef = useRef(false);
|
|
107
107
|
const initializedRef = useRef(false);
|
|
108
|
+
const stableRef = useRef(false);
|
|
108
109
|
const baseRefRef = useRef(baseRef);
|
|
109
110
|
const baseDataRef = useRef(baseData);
|
|
110
111
|
const [storageMode, setStorageMode] = useState(() => {
|
|
@@ -120,7 +121,11 @@ const ExcalidrawEditorDialogContent = ({
|
|
|
120
121
|
});
|
|
121
122
|
const [isSaving, setIsSaving] = useState(false);
|
|
122
123
|
useEffect(() => {
|
|
124
|
+
const stableTimer = setTimeout(() => {
|
|
125
|
+
stableRef.current = true;
|
|
126
|
+
}, 500);
|
|
123
127
|
return () => {
|
|
128
|
+
clearTimeout(stableTimer);
|
|
124
129
|
if (saveTimerRef.current) clearTimeout(saveTimerRef.current);
|
|
125
130
|
};
|
|
126
131
|
}, []);
|
|
@@ -223,6 +228,7 @@ const ExcalidrawEditorDialogContent = ({
|
|
|
223
228
|
initializedRef.current = true;
|
|
224
229
|
return;
|
|
225
230
|
}
|
|
231
|
+
if (!stableRef.current) return;
|
|
226
232
|
if (elements.length === 0) return;
|
|
227
233
|
if (!isDirtyRef.current) {
|
|
228
234
|
isDirtyRef.current = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-excalidraw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.101",
|
|
4
4
|
"description": "Excalidraw whiteboard extension",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@excalidraw/excalidraw": "0.17.0",
|
|
29
29
|
"jsondiffpatch": "^0.7.3",
|
|
30
|
-
"@haklex/rich-editor": "0.0.
|
|
31
|
-
"@haklex/rich-editor
|
|
32
|
-
"@haklex/rich-style-token": "0.0.
|
|
33
|
-
"@haklex/rich-headless": "0.0.
|
|
30
|
+
"@haklex/rich-editor-ui": "0.0.101",
|
|
31
|
+
"@haklex/rich-editor": "0.0.101",
|
|
32
|
+
"@haklex/rich-style-token": "0.0.101",
|
|
33
|
+
"@haklex/rich-headless": "0.0.101"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@lexical/react": "^0.42.0",
|