@lexical/file 0.39.0 → 0.39.1-nightly.20251229.0
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.
- package/LexicalFile.dev.js +1 -1
- package/LexicalFile.dev.mjs +1 -1
- package/LexicalFile.prod.js +1 -1
- package/LexicalFile.prod.mjs +1 -1
- package/package.json +4 -4
package/LexicalFile.dev.js
CHANGED
package/LexicalFile.dev.mjs
CHANGED
package/LexicalFile.prod.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("lexical");function t(e,t=Object.freeze({})){return{editorState:e.toJSON(),lastSaved:t.lastSaved||Date.now(),source:t.source||"Lexical",version:"0.39.0"}}function o(e,t){const o="string"==typeof t?JSON.parse(t):t;return e.parseEditorState(o.editorState)}exports.editorStateFromSerializedDocument=o,exports.exportFile=function(e,o=Object.freeze({})){const n=new Date;!function(e,t){const o=document.createElement("a"),n=document.body;if(null===n)return;n.appendChild(o),o.style.display="none";const
|
|
9
|
+
"use strict";var e=require("lexical");function t(e,t=Object.freeze({})){return{editorState:e.toJSON(),lastSaved:t.lastSaved||Date.now(),source:t.source||"Lexical",version:"0.39.1-nightly.20251229.0"}}function o(e,t){const o="string"==typeof t?JSON.parse(t):t;return e.parseEditorState(o.editorState)}exports.editorStateFromSerializedDocument=o,exports.exportFile=function(e,o=Object.freeze({})){const n=new Date;!function(e,t){const o=document.createElement("a"),n=document.body;if(null===n)return;n.appendChild(o),o.style.display="none";const i=JSON.stringify(e),r=new Blob([i],{type:"octet/stream"}),a=window.URL.createObjectURL(r);o.href=a,o.download=t,o.click(),window.URL.revokeObjectURL(a),o.remove()}(t(e.getEditorState(),{...o,lastSaved:n.getTime()}),`${o.fileName||n.toISOString()}.lexical`)},exports.importFile=function(t){!function(e){const t=document.createElement("input");t.type="file",t.accept=".lexical",t.addEventListener("change",t=>{const o=t.target;if(o.files){const t=o.files[0],n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=t=>{if(t.target){const o=t.target.result;e(o)}}}}),t.click()}(n=>{t.setEditorState(o(t,n)),t.dispatchCommand(e.CLEAR_HISTORY_COMMAND,void 0)})},exports.serializedDocumentFromEditorState=t;
|
package/LexicalFile.prod.mjs
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{CLEAR_HISTORY_COMMAND as e}from"lexical";function t(e,t=Object.freeze({})){return{editorState:e.toJSON(),lastSaved:t.lastSaved||Date.now(),source:t.source||"Lexical",version:"0.39.0"}}function n(e,t){const n="string"==typeof t?JSON.parse(t):t;return e.parseEditorState(n.editorState)}function o(t){!function(e){const t=document.createElement("input");t.type="file",t.accept=".lexical",t.addEventListener("change",t=>{const n=t.target;if(n.files){const t=n.files[0],o=new FileReader;o.readAsText(t,"UTF-8"),o.onload=t=>{if(t.target){const n=t.target.result;e(n)}}}}),t.click()}(o=>{t.setEditorState(n(t,o)),t.dispatchCommand(e,void 0)})}function i(e,n=Object.freeze({})){const o=new Date;!function(e,t){const n=document.createElement("a"),o=document.body;if(null===o)return;o.appendChild(n),n.style.display="none";const i=JSON.stringify(e),a=new Blob([i],{type:"octet/stream"}),c=window.URL.createObjectURL(a);n.href=c,n.download=t,n.click(),window.URL.revokeObjectURL(c),n.remove()}(t(e.getEditorState(),{...n,lastSaved:o.getTime()}),`${n.fileName||o.toISOString()}.lexical`)}export{n as editorStateFromSerializedDocument,i as exportFile,o as importFile,t as serializedDocumentFromEditorState};
|
|
9
|
+
import{CLEAR_HISTORY_COMMAND as e}from"lexical";function t(e,t=Object.freeze({})){return{editorState:e.toJSON(),lastSaved:t.lastSaved||Date.now(),source:t.source||"Lexical",version:"0.39.1-nightly.20251229.0"}}function n(e,t){const n="string"==typeof t?JSON.parse(t):t;return e.parseEditorState(n.editorState)}function o(t){!function(e){const t=document.createElement("input");t.type="file",t.accept=".lexical",t.addEventListener("change",t=>{const n=t.target;if(n.files){const t=n.files[0],o=new FileReader;o.readAsText(t,"UTF-8"),o.onload=t=>{if(t.target){const n=t.target.result;e(n)}}}}),t.click()}(o=>{t.setEditorState(n(t,o)),t.dispatchCommand(e,void 0)})}function i(e,n=Object.freeze({})){const o=new Date;!function(e,t){const n=document.createElement("a"),o=document.body;if(null===o)return;o.appendChild(n),n.style.display="none";const i=JSON.stringify(e),a=new Blob([i],{type:"octet/stream"}),c=window.URL.createObjectURL(a);n.href=c,n.download=t,n.click(),window.URL.revokeObjectURL(c),n.remove()}(t(e.getEditorState(),{...n,lastSaved:o.getTime()}),`${n.fileName||o.toISOString()}.lexical`)}export{n as editorStateFromSerializedDocument,i as exportFile,o as importFile,t as serializedDocumentFromEditorState};
|
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"export"
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
|
-
"version": "0.39.0",
|
|
13
|
+
"version": "0.39.1-nightly.20251229.0",
|
|
14
14
|
"main": "LexicalFile.js",
|
|
15
15
|
"types": "index.d.ts",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/facebook/lexical",
|
|
18
|
+
"url": "git+https://github.com/facebook/lexical.git",
|
|
19
19
|
"directory": "packages/lexical-file"
|
|
20
20
|
},
|
|
21
21
|
"module": "LexicalFile.mjs",
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"lexical": "0.39.0"
|
|
41
|
+
"lexical": "0.39.1-nightly.20251229.0"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|