@lexical/file 0.39.1-nightly.20251229.0 → 0.39.1-nightly.20251230.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.
@@ -10,7 +10,7 @@
10
10
 
11
11
  var lexical = require('lexical');
12
12
 
13
- var version = "0.39.1-nightly.20251229.0";
13
+ var version = "0.39.1-nightly.20251230.0";
14
14
 
15
15
  /**
16
16
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { CLEAR_HISTORY_COMMAND } from 'lexical';
10
10
 
11
- var version = "0.39.1-nightly.20251229.0";
11
+ var version = "0.39.1-nightly.20251230.0";
12
12
 
13
13
  /**
14
14
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -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.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;
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.20251230.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;
@@ -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.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};
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.20251230.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,7 +10,7 @@
10
10
  "export"
11
11
  ],
12
12
  "license": "MIT",
13
- "version": "0.39.1-nightly.20251229.0",
13
+ "version": "0.39.1-nightly.20251230.0",
14
14
  "main": "LexicalFile.js",
15
15
  "types": "index.d.ts",
16
16
  "repository": {
@@ -38,6 +38,6 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "lexical": "0.39.1-nightly.20251229.0"
41
+ "lexical": "0.39.1-nightly.20251230.0"
42
42
  }
43
43
  }