@haklex/rich-editor 0.27.0 → 0.29.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 (64) hide show
  1. package/dist/{AlertQuoteEditNode-CHm3Qfuq.js → AlertQuoteEditNode-BfmHO7Jd.js} +3 -2
  2. package/dist/{ExtraNodesContext-BVJeViBr.js → ExtraNodesContext-Cjb_L5rP.js} +1 -1
  3. package/dist/{MermaidPlugin--VfIaE2p.js → MermaidPlugin-CQ5m_jba.js} +2 -2
  4. package/dist/{SubmitShortcutPlugin-DPGw-tfF.js → SubmitShortcutPlugin-Co0i30pp.js} +5 -5
  5. package/dist/commands-entry.mjs +2 -2
  6. package/dist/{config-BAaPXAiP.js → config-0MlVOo52.js} +19 -13
  7. package/dist/index.mjs +8 -8
  8. package/dist/{node-registry-DC4YNvpX.js → node-registry-DvTGvhg8.js} +11 -9
  9. package/dist/nodes/AlertQuoteEditNode.d.ts +2 -2
  10. package/dist/nodes/AlertQuoteEditNode.d.ts.map +1 -1
  11. package/dist/nodes/AlertQuoteNode.d.ts +1 -1
  12. package/dist/nodes/AlertQuoteNode.d.ts.map +1 -1
  13. package/dist/nodes/BannerEditNode.d.ts +2 -2
  14. package/dist/nodes/BannerEditNode.d.ts.map +1 -1
  15. package/dist/nodes/BannerNode.d.ts +1 -1
  16. package/dist/nodes/BannerNode.d.ts.map +1 -1
  17. package/dist/nodes/CodeBlockEditNode.d.ts +3 -3
  18. package/dist/nodes/CodeBlockEditNode.d.ts.map +1 -1
  19. package/dist/nodes/CodeBlockNode.d.ts +1 -1
  20. package/dist/nodes/CodeBlockNode.d.ts.map +1 -1
  21. package/dist/nodes/CommentNode.d.ts +2 -2
  22. package/dist/nodes/CommentNode.d.ts.map +1 -1
  23. package/dist/nodes/DetailsNode.d.ts +2 -2
  24. package/dist/nodes/DetailsNode.d.ts.map +1 -1
  25. package/dist/nodes/FootnoteNode.d.ts +1 -1
  26. package/dist/nodes/FootnoteNode.d.ts.map +1 -1
  27. package/dist/nodes/FootnoteSectionEditNode.d.ts +3 -3
  28. package/dist/nodes/FootnoteSectionEditNode.d.ts.map +1 -1
  29. package/dist/nodes/FootnoteSectionNode.d.ts +1 -1
  30. package/dist/nodes/FootnoteSectionNode.d.ts.map +1 -1
  31. package/dist/nodes/GridContainerNode.d.ts +1 -1
  32. package/dist/nodes/GridContainerNode.d.ts.map +1 -1
  33. package/dist/nodes/GridEditNode.d.ts +2 -2
  34. package/dist/nodes/GridEditNode.d.ts.map +1 -1
  35. package/dist/nodes/ImageNode.d.ts +1 -1
  36. package/dist/nodes/ImageNode.d.ts.map +1 -1
  37. package/dist/nodes/KaTeXBlockNode.d.ts +1 -1
  38. package/dist/nodes/KaTeXBlockNode.d.ts.map +1 -1
  39. package/dist/nodes/KaTeXInlineNode.d.ts +1 -1
  40. package/dist/nodes/KaTeXInlineNode.d.ts.map +1 -1
  41. package/dist/nodes/LinkCardNode.d.ts +1 -1
  42. package/dist/nodes/LinkCardNode.d.ts.map +1 -1
  43. package/dist/nodes/MentionNode.d.ts +1 -1
  44. package/dist/nodes/MentionNode.d.ts.map +1 -1
  45. package/dist/nodes/MermaidNode.d.ts +1 -1
  46. package/dist/nodes/MermaidNode.d.ts.map +1 -1
  47. package/dist/nodes/RichQuoteNode.d.ts +2 -2
  48. package/dist/nodes/RichQuoteNode.d.ts.map +1 -1
  49. package/dist/nodes/RubyNode.d.ts +2 -2
  50. package/dist/nodes/RubyNode.d.ts.map +1 -1
  51. package/dist/nodes/SpoilerNode.d.ts +2 -2
  52. package/dist/nodes/SpoilerNode.d.ts.map +1 -1
  53. package/dist/nodes/TagNode.d.ts +2 -2
  54. package/dist/nodes/TagNode.d.ts.map +1 -1
  55. package/dist/nodes/VideoNode.d.ts +1 -1
  56. package/dist/nodes/VideoNode.d.ts.map +1 -1
  57. package/dist/nodes-entry.mjs +4 -4
  58. package/dist/{normalizeSerializedEditorState-C7VzxLf5.js → normalizeSerializedEditorState-VaI73T09.js} +1 -1
  59. package/dist/plugins-entry.mjs +2 -2
  60. package/dist/rich-editor.css +1 -1
  61. package/dist/static-entry.mjs +4 -4
  62. package/dist/styles/shared.css.d.ts.map +1 -1
  63. package/dist/{theme-D0MVbrmN.js → theme-U_m9LjWN.js} +22 -16
  64. package/package.json +31 -31
@@ -69,7 +69,7 @@ function extractTextContent(state) {
69
69
  return walk(state);
70
70
  }
71
71
  //#endregion
72
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
72
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js
73
73
  function _typeof(o) {
74
74
  "@babel/helpers - typeof";
75
75
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -79,7 +79,7 @@ function _typeof(o) {
79
79
  }, _typeof(o);
80
80
  }
81
81
  //#endregion
82
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
82
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js
83
83
  function toPrimitive(t, r) {
84
84
  if ("object" != _typeof(t) || !t) return t;
85
85
  var e = t[Symbol.toPrimitive];
@@ -91,13 +91,13 @@ function toPrimitive(t, r) {
91
91
  return ("string" === r ? String : Number)(t);
92
92
  }
93
93
  //#endregion
94
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
94
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js
95
95
  function toPropertyKey(t) {
96
96
  var i = toPrimitive(t, "string");
97
97
  return "symbol" == _typeof(i) ? i : i + "";
98
98
  }
99
99
  //#endregion
100
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
100
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js
101
101
  function _defineProperty(e, r, t) {
102
102
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
103
103
  value: t,
@@ -181,7 +181,8 @@ var AlertQuoteNode = class AlertQuoteNode extends DecoratorNode {
181
181
  getTextContent() {
182
182
  return extractTextContent(this.__contentState);
183
183
  }
184
- static importJSON(serializedNode) {
184
+ static importJSON(_serializedNode) {
185
+ const serializedNode = _serializedNode;
185
186
  return new AlertQuoteNode(serializedNode.alertType, serializedNode.content);
186
187
  }
187
188
  exportJSON() {
@@ -228,8 +229,8 @@ var FootnoteNode = class FootnoteNode extends DecoratorNode {
228
229
  isInline() {
229
230
  return true;
230
231
  }
231
- static importJSON(serializedNode) {
232
- return $createFootnoteNode(serializedNode.identifier);
232
+ static importJSON(_serializedNode) {
233
+ return $createFootnoteNode(_serializedNode.identifier);
233
234
  }
234
235
  exportJSON() {
235
236
  return {
@@ -448,7 +449,8 @@ var ImageNode = class ImageNode extends DecoratorNode {
448
449
  isInline() {
449
450
  return false;
450
451
  }
451
- static importJSON(serializedNode) {
452
+ static importJSON(_serializedNode) {
453
+ const serializedNode = _serializedNode;
452
454
  return $createImageNode({
453
455
  src: serializedNode.src,
454
456
  altText: serializedNode.altText,
@@ -627,8 +629,8 @@ var KaTeXBlockNode = class KaTeXBlockNode extends DecoratorNode {
627
629
  isInline() {
628
630
  return false;
629
631
  }
630
- static importJSON(serializedNode) {
631
- return $createKaTeXBlockNode(serializedNode.equation);
632
+ static importJSON(_serializedNode) {
633
+ return $createKaTeXBlockNode(_serializedNode.equation);
632
634
  }
633
635
  exportJSON() {
634
636
  return {
@@ -711,7 +713,8 @@ var KaTeXInlineNode = class KaTeXInlineNode extends DecoratorNode {
711
713
  isInline() {
712
714
  return true;
713
715
  }
714
- static importJSON(serializedNode) {
716
+ static importJSON(_serializedNode) {
717
+ const serializedNode = _serializedNode;
715
718
  const node = $createKaTeXInlineNode(serializedNode.equation);
716
719
  if (serializedNode.color) node.setColor(serializedNode.color);
717
720
  return node;
@@ -815,7 +818,8 @@ var MentionNode = class MentionNode extends DecoratorNode {
815
818
  getDisplayName() {
816
819
  return this.getLatest().__displayName;
817
820
  }
818
- static importJSON(serializedNode) {
821
+ static importJSON(_serializedNode) {
822
+ const serializedNode = _serializedNode;
819
823
  return $createMentionNode(serializedNode.platform, serializedNode.handle, serializedNode.displayName);
820
824
  }
821
825
  exportJSON() {
@@ -897,8 +901,8 @@ var MermaidNode = class MermaidNode extends DecoratorNode {
897
901
  isInline() {
898
902
  return false;
899
903
  }
900
- static importJSON(serializedNode) {
901
- return $createMermaidNode(serializedNode.diagram);
904
+ static importJSON(_serializedNode) {
905
+ return $createMermaidNode(_serializedNode.diagram);
902
906
  }
903
907
  exportJSON() {
904
908
  return {
@@ -971,7 +975,8 @@ var RichQuoteNode = class RichQuoteNode extends QuoteNode {
971
975
  static clone(node) {
972
976
  return new RichQuoteNode(node.__attribution, node.__key);
973
977
  }
974
- static importJSON(serializedNode) {
978
+ static importJSON(_serializedNode) {
979
+ const serializedNode = _serializedNode;
975
980
  return $createRichQuoteNode(serializedNode.attribution ?? null).updateFromJSON(serializedNode);
976
981
  }
977
982
  exportJSON() {
@@ -1126,7 +1131,8 @@ var TagNode = class TagNode extends TextNode {
1126
1131
  isTextEntity() {
1127
1132
  return true;
1128
1133
  }
1129
- static importJSON(serializedNode) {
1134
+ static importJSON(_serializedNode) {
1135
+ const serializedNode = _serializedNode;
1130
1136
  const node = $createTagNode(serializedNode.text ?? "");
1131
1137
  node.setFormat(serializedNode.format ?? 0);
1132
1138
  node.setDetail(serializedNode.detail ?? 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-editor",
3
- "version": "0.27.0",
3
+ "version": "0.29.0",
4
4
  "description": "Core rich text editor based on Lexical",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,46 +45,46 @@
45
45
  "dist"
46
46
  ],
47
47
  "dependencies": {
48
- "@lexical/code-core": "^0.45.0",
49
- "nanoid": "^5.1.11",
48
+ "@lexical/code-core": "^0.46.0",
49
+ "nanoid": "^5.1.16",
50
50
  "thumbhash": "^0.1.1",
51
- "@haklex/rich-editor-ui": "0.27.0",
52
- "@haklex/rich-headless": "0.27.0",
53
- "@haklex/rich-style-token": "0.27.0"
51
+ "@haklex/rich-editor-ui": "0.29.0",
52
+ "@haklex/rich-headless": "0.29.0",
53
+ "@haklex/rich-style-token": "0.29.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@lexical/extension": "^0.45.0",
57
- "@lexical/link": "^0.45.0",
58
- "@lexical/list": "^0.45.0",
59
- "@lexical/markdown": "^0.45.0",
60
- "@lexical/react": "^0.45.0",
61
- "@lexical/rich-text": "^0.45.0",
62
- "@lexical/table": "^0.45.0",
56
+ "@lexical/extension": "^0.46.0",
57
+ "@lexical/link": "^0.46.0",
58
+ "@lexical/list": "^0.46.0",
59
+ "@lexical/markdown": "^0.46.0",
60
+ "@lexical/react": "^0.46.0",
61
+ "@lexical/rich-text": "^0.46.0",
62
+ "@lexical/table": "^0.46.0",
63
63
  "@types/react": "^19.2.17",
64
64
  "@types/react-dom": "^19.2.3",
65
- "@vanilla-extract/css": "^1.20.1",
66
- "@vanilla-extract/vite-plugin": "^5.2.2",
65
+ "@vanilla-extract/css": "^1.21.0",
66
+ "@vanilla-extract/vite-plugin": "^5.2.3",
67
67
  "katex": "^0.17.0",
68
- "lexical": "^0.45.0",
69
- "lucide-react": "^1.18.0",
70
- "react": "19.2.6",
71
- "react-dom": "19.2.6",
72
- "shiki": "^4.2.0",
73
- "typescript": "^5.9.3",
74
- "unplugin-dts": "^1.0.2",
75
- "vite": "^8.0.16"
68
+ "lexical": "^0.46.0",
69
+ "lucide-react": "^1.21.0",
70
+ "react": "^19.2.7",
71
+ "react-dom": "^19.2.7",
72
+ "shiki": "^4.3.0",
73
+ "typescript": "^6.0.3",
74
+ "unplugin-dts": "^1.0.3",
75
+ "vite": "^8.1.0"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@base-ui/react": "^1.1.0",
79
- "@lexical/extension": "^0.45.0",
80
- "@lexical/link": "^0.45.0",
81
- "@lexical/list": "^0.45.0",
82
- "@lexical/markdown": "^0.45.0",
83
- "@lexical/react": "^0.45.0",
84
- "@lexical/rich-text": "^0.45.0",
85
- "@lexical/table": "^0.45.0",
79
+ "@lexical/extension": "^0.46.0",
80
+ "@lexical/link": "^0.46.0",
81
+ "@lexical/list": "^0.46.0",
82
+ "@lexical/markdown": "^0.46.0",
83
+ "@lexical/react": "^0.46.0",
84
+ "@lexical/rich-text": "^0.46.0",
85
+ "@lexical/table": "^0.46.0",
86
86
  "katex": ">=0.16.0",
87
- "lexical": "^0.45.0",
87
+ "lexical": "^0.46.0",
88
88
  "lucide-react": "^1.0.0",
89
89
  "react": ">=19",
90
90
  "react-dom": ">=19",