@haklex/rich-plugin-litexml-paste 0.31.1 → 0.33.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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -2
  2. package/package.json +12 -12
package/dist/index.mjs CHANGED
@@ -38,7 +38,8 @@ function detectLiteXml(text) {
38
38
  }
39
39
  function parseLiteXmlSerializedNodes(xml) {
40
40
  if (!detectLiteXml(xml)) return null;
41
- const nodes = deserializeNodesFromXml(xml, createDefaultRegistry());
41
+ const registry = createDefaultRegistry();
42
+ const nodes = deserializeNodesFromXml(xml, registry);
42
43
  return nodes.length > 0 ? nodes : null;
43
44
  }
44
45
  //#endregion
@@ -56,7 +57,8 @@ function LiteXmlPastePlugin() {
56
57
  try {
57
58
  const serializedNodes = parseLiteXmlSerializedNodes(text);
58
59
  if (!serializedNodes?.length) return false;
59
- $insertNodes(serializedNodes.map((s) => $parseSerializedNode(s)));
60
+ const nodes = serializedNodes.map((s) => $parseSerializedNode(s));
61
+ $insertNodes(nodes);
60
62
  event.preventDefault();
61
63
  return true;
62
64
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-plugin-litexml-paste",
3
- "version": "0.31.1",
3
+ "version": "0.33.0",
4
4
  "description": "LiteXML paste plugin for rich-editor — detects pasted Haklex node XML and converts to Lexical nodes",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,22 +20,22 @@
20
20
  "dist"
21
21
  ],
22
22
  "dependencies": {
23
- "@haklex/rich-litexml": "0.31.1"
23
+ "@haklex/rich-litexml": "0.33.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@lexical/react": "^0.48.0",
27
- "@types/react": "^19.2.17",
28
- "@types/react-dom": "^19.2.3",
29
- "lexical": "^0.48.0",
30
- "react": "^19.2.7",
31
- "react-dom": "^19.2.7",
32
- "typescript": "^6.0.3",
26
+ "@lexical/react": "^0.49.0",
27
+ "@types/react": "^19.2.18",
28
+ "@types/react-dom": "^19.2.4",
29
+ "lexical": "^0.49.0",
30
+ "react": "^19.2.8",
31
+ "react-dom": "^19.2.8",
32
+ "typescript": "^7.0.2",
33
33
  "unplugin-dts": "^1.0.3",
34
- "vite": "^8.1.5"
34
+ "vite": "^8.2.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@lexical/react": "^0.47.0",
38
- "lexical": "^0.47.0",
37
+ "@lexical/react": "^0.49.0",
38
+ "lexical": "^0.49.0",
39
39
  "react": ">=19",
40
40
  "react-dom": ">=19"
41
41
  },