@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.
- package/dist/{AlertQuoteEditNode-CHm3Qfuq.js → AlertQuoteEditNode-BfmHO7Jd.js} +3 -2
- package/dist/{ExtraNodesContext-BVJeViBr.js → ExtraNodesContext-Cjb_L5rP.js} +1 -1
- package/dist/{MermaidPlugin--VfIaE2p.js → MermaidPlugin-CQ5m_jba.js} +2 -2
- package/dist/{SubmitShortcutPlugin-DPGw-tfF.js → SubmitShortcutPlugin-Co0i30pp.js} +5 -5
- package/dist/commands-entry.mjs +2 -2
- package/dist/{config-BAaPXAiP.js → config-0MlVOo52.js} +19 -13
- package/dist/index.mjs +8 -8
- package/dist/{node-registry-DC4YNvpX.js → node-registry-DvTGvhg8.js} +11 -9
- package/dist/nodes/AlertQuoteEditNode.d.ts +2 -2
- package/dist/nodes/AlertQuoteEditNode.d.ts.map +1 -1
- package/dist/nodes/AlertQuoteNode.d.ts +1 -1
- package/dist/nodes/AlertQuoteNode.d.ts.map +1 -1
- package/dist/nodes/BannerEditNode.d.ts +2 -2
- package/dist/nodes/BannerEditNode.d.ts.map +1 -1
- package/dist/nodes/BannerNode.d.ts +1 -1
- package/dist/nodes/BannerNode.d.ts.map +1 -1
- package/dist/nodes/CodeBlockEditNode.d.ts +3 -3
- package/dist/nodes/CodeBlockEditNode.d.ts.map +1 -1
- package/dist/nodes/CodeBlockNode.d.ts +1 -1
- package/dist/nodes/CodeBlockNode.d.ts.map +1 -1
- package/dist/nodes/CommentNode.d.ts +2 -2
- package/dist/nodes/CommentNode.d.ts.map +1 -1
- package/dist/nodes/DetailsNode.d.ts +2 -2
- package/dist/nodes/DetailsNode.d.ts.map +1 -1
- package/dist/nodes/FootnoteNode.d.ts +1 -1
- package/dist/nodes/FootnoteNode.d.ts.map +1 -1
- package/dist/nodes/FootnoteSectionEditNode.d.ts +3 -3
- package/dist/nodes/FootnoteSectionEditNode.d.ts.map +1 -1
- package/dist/nodes/FootnoteSectionNode.d.ts +1 -1
- package/dist/nodes/FootnoteSectionNode.d.ts.map +1 -1
- package/dist/nodes/GridContainerNode.d.ts +1 -1
- package/dist/nodes/GridContainerNode.d.ts.map +1 -1
- package/dist/nodes/GridEditNode.d.ts +2 -2
- package/dist/nodes/GridEditNode.d.ts.map +1 -1
- package/dist/nodes/ImageNode.d.ts +1 -1
- package/dist/nodes/ImageNode.d.ts.map +1 -1
- package/dist/nodes/KaTeXBlockNode.d.ts +1 -1
- package/dist/nodes/KaTeXBlockNode.d.ts.map +1 -1
- package/dist/nodes/KaTeXInlineNode.d.ts +1 -1
- package/dist/nodes/KaTeXInlineNode.d.ts.map +1 -1
- package/dist/nodes/LinkCardNode.d.ts +1 -1
- package/dist/nodes/LinkCardNode.d.ts.map +1 -1
- package/dist/nodes/MentionNode.d.ts +1 -1
- package/dist/nodes/MentionNode.d.ts.map +1 -1
- package/dist/nodes/MermaidNode.d.ts +1 -1
- package/dist/nodes/MermaidNode.d.ts.map +1 -1
- package/dist/nodes/RichQuoteNode.d.ts +2 -2
- package/dist/nodes/RichQuoteNode.d.ts.map +1 -1
- package/dist/nodes/RubyNode.d.ts +2 -2
- package/dist/nodes/RubyNode.d.ts.map +1 -1
- package/dist/nodes/SpoilerNode.d.ts +2 -2
- package/dist/nodes/SpoilerNode.d.ts.map +1 -1
- package/dist/nodes/TagNode.d.ts +2 -2
- package/dist/nodes/TagNode.d.ts.map +1 -1
- package/dist/nodes/VideoNode.d.ts +1 -1
- package/dist/nodes/VideoNode.d.ts.map +1 -1
- package/dist/nodes-entry.mjs +4 -4
- package/dist/{normalizeSerializedEditorState-C7VzxLf5.js → normalizeSerializedEditorState-VaI73T09.js} +1 -1
- package/dist/plugins-entry.mjs +2 -2
- package/dist/rich-editor.css +1 -1
- package/dist/static-entry.mjs +4 -4
- package/dist/styles/shared.css.d.ts.map +1 -1
- package/dist/{theme-D0MVbrmN.js → theme-U_m9LjWN.js} +22 -16
- 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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(
|
|
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(
|
|
232
|
-
return $createFootnoteNode(
|
|
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(
|
|
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(
|
|
631
|
-
return $createKaTeXBlockNode(
|
|
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(
|
|
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(
|
|
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(
|
|
901
|
-
return $createMermaidNode(
|
|
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(
|
|
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(
|
|
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.
|
|
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.
|
|
49
|
-
"nanoid": "^5.1.
|
|
48
|
+
"@lexical/code-core": "^0.46.0",
|
|
49
|
+
"nanoid": "^5.1.16",
|
|
50
50
|
"thumbhash": "^0.1.1",
|
|
51
|
-
"@haklex/rich-editor-ui": "0.
|
|
52
|
-
"@haklex/rich-headless": "0.
|
|
53
|
-
"@haklex/rich-style-token": "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.
|
|
57
|
-
"@lexical/link": "^0.
|
|
58
|
-
"@lexical/list": "^0.
|
|
59
|
-
"@lexical/markdown": "^0.
|
|
60
|
-
"@lexical/react": "^0.
|
|
61
|
-
"@lexical/rich-text": "^0.
|
|
62
|
-
"@lexical/table": "^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.
|
|
66
|
-
"@vanilla-extract/vite-plugin": "^5.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.
|
|
69
|
-
"lucide-react": "^1.
|
|
70
|
-
"react": "19.2.
|
|
71
|
-
"react-dom": "19.2.
|
|
72
|
-
"shiki": "^4.
|
|
73
|
-
"typescript": "^
|
|
74
|
-
"unplugin-dts": "^1.0.
|
|
75
|
-
"vite": "^8.0
|
|
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.
|
|
80
|
-
"@lexical/link": "^0.
|
|
81
|
-
"@lexical/list": "^0.
|
|
82
|
-
"@lexical/markdown": "^0.
|
|
83
|
-
"@lexical/react": "^0.
|
|
84
|
-
"@lexical/rich-text": "^0.
|
|
85
|
-
"@lexical/table": "^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.
|
|
87
|
+
"lexical": "^0.46.0",
|
|
88
88
|
"lucide-react": "^1.0.0",
|
|
89
89
|
"react": ">=19",
|
|
90
90
|
"react-dom": ">=19",
|