@haklex/rich-static-renderer 0.0.81 → 0.0.83
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/RichRenderer.d.ts.map +1 -1
- package/dist/components/HtmlComment.d.ts +6 -0
- package/dist/components/HtmlComment.d.ts.map +1 -0
- package/dist/engine/renderBuiltinNode.d.ts +1 -1
- package/dist/engine/renderBuiltinNode.d.ts.map +1 -1
- package/dist/engine/renderTextNode.d.ts.map +1 -1
- package/dist/index.mjs +439 -353
- package/dist/rich-static-renderer.css +1 -2
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichRenderer.d.ts","sourceRoot":"","sources":["../src/RichRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RichRenderer.d.ts","sourceRoot":"","sources":["../src/RichRenderer.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAuB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA2MtE,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAmB,EACnB,KAAe,EACf,SAAS,EACT,KAAK,EACL,EAAE,EAAE,SAAiB,EACrB,cAAc,EACd,UAAU,EACV,oBAAoB,GACrB,EAAE,iBAAiB,2CAmCnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlComment.d.ts","sourceRoot":"","sources":["../../src/components/HtmlComment.tsx"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CA6BrD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export declare function renderBuiltinNode(node: any, key: string, children: ReactNode[] | null, headingSlugs: Map<string, number>,
|
|
2
|
+
export declare function renderBuiltinNode(node: any, key: string, children: ReactNode[] | null, headingSlugs: Map<string, number>, _textContent?: string): ReactNode;
|
|
3
3
|
//# sourceMappingURL=renderBuiltinNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBuiltinNode.d.ts","sourceRoot":"","sources":["../../src/engine/renderBuiltinNode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderBuiltinNode.d.ts","sourceRoot":"","sources":["../../src/engine/renderBuiltinNode.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAkCtD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,GAAG,EACT,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAC5B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,YAAY,CAAC,EAAE,MAAM,GACpB,SAAS,CAuMX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderTextNode.d.ts","sourceRoot":"","sources":["../../src/engine/renderTextNode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderTextNode.d.ts","sourceRoot":"","sources":["../../src/engine/renderTextNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AA6BtD,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAuBhE"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,382 +1,468 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { semanticClassNames, sharedStyles, RendererWrapper, RubyRenderer, getTagBgColor, LinkFavicon, getVariantClass, useOptionalNestedContentRenderer, allNodes, ColorSchemeProvider, RendererConfigProvider, FootnoteDefinitionsProvider, NestedContentRendererProvider, editorTheme } from "@haklex/rich-editor/static";
|
|
2
3
|
import { PortalThemeProvider } from "@haklex/rich-style-token";
|
|
3
4
|
import { createHeadlessEditor } from "@lexical/headless";
|
|
4
5
|
import { $getRoot } from "lexical";
|
|
5
|
-
import {
|
|
6
|
+
import { useRef, useEffect, createElement, useMemo, isValidElement, cloneElement } from "react";
|
|
6
7
|
import { Link } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
function HtmlComment({ text }) {
|
|
9
|
+
const anchorRef = useRef(null);
|
|
10
|
+
const commentRef = useRef(null);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const anchor = anchorRef.current;
|
|
13
|
+
if (!anchor) return;
|
|
14
|
+
const parent = anchor.parentNode;
|
|
15
|
+
if (!parent) return;
|
|
16
|
+
let comment = commentRef.current;
|
|
17
|
+
if (!comment || comment.parentNode !== parent) {
|
|
18
|
+
comment = document.createComment(text);
|
|
19
|
+
parent.insertBefore(comment, anchor);
|
|
20
|
+
commentRef.current = comment;
|
|
21
|
+
} else if (comment.data !== text) {
|
|
22
|
+
comment.data = text;
|
|
23
|
+
}
|
|
24
|
+
return () => {
|
|
25
|
+
if (commentRef.current?.parentNode) {
|
|
26
|
+
commentRef.current.parentNode.removeChild(commentRef.current);
|
|
27
|
+
}
|
|
28
|
+
commentRef.current = null;
|
|
29
|
+
};
|
|
30
|
+
}, [text]);
|
|
31
|
+
return /* @__PURE__ */ jsx("template", { suppressHydrationWarning: true, "data-rich-comment-anchor": "", ref: anchorRef });
|
|
32
|
+
}
|
|
9
33
|
var tableWrapper = "_1v9yxw30";
|
|
10
34
|
var table = "_1v9yxw31";
|
|
11
35
|
var tableHead = "_1v9yxw32";
|
|
12
36
|
var tableCell = "_1v9yxw33";
|
|
13
|
-
|
|
14
|
-
|
|
37
|
+
const shared$1 = (key) => `${semanticClassNames[key]} ${sharedStyles[key]}`;
|
|
38
|
+
const headingClassNames = {
|
|
39
|
+
h1: shared$1("headingH1"),
|
|
40
|
+
h2: shared$1("headingH2"),
|
|
41
|
+
h3: shared$1("headingH3"),
|
|
42
|
+
h4: shared$1("headingH4"),
|
|
43
|
+
h5: shared$1("headingH5"),
|
|
44
|
+
h6: shared$1("headingH6")
|
|
45
|
+
};
|
|
15
46
|
function textToSlug(text) {
|
|
16
|
-
|
|
47
|
+
return text.toLowerCase().trim().replaceAll(/[^\s\w\u3000-\u9FFF\uAC00-\uD7AF\uFF00-\uFFEF-]/g, "").replaceAll(/[\s_]+/g, "-").replaceAll(/^-+|-+$/g, "");
|
|
17
48
|
}
|
|
18
49
|
function extractText(node) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
50
|
+
if (node.type === "comment") return "";
|
|
51
|
+
if (node.text) return node.text;
|
|
52
|
+
if (node.children) return node.children.map(extractText).join("");
|
|
53
|
+
return "";
|
|
22
54
|
}
|
|
23
|
-
function renderBuiltinNode(node, key, children, headingSlugs,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
55
|
+
function renderBuiltinNode(node, key, children, headingSlugs, _textContent) {
|
|
56
|
+
switch (node.type) {
|
|
57
|
+
case "root": {
|
|
58
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
59
|
+
}
|
|
60
|
+
case "paragraph": {
|
|
61
|
+
const align = node.format ? { textAlign: node.format } : void 0;
|
|
62
|
+
return /* @__PURE__ */ jsx("p", { className: shared$1("paragraph"), style: align, children }, key);
|
|
63
|
+
}
|
|
64
|
+
case "heading": {
|
|
65
|
+
const Tag = node.tag;
|
|
66
|
+
const text = extractText(node);
|
|
67
|
+
const baseSlug = textToSlug(text);
|
|
68
|
+
let slug = baseSlug;
|
|
69
|
+
if (baseSlug) {
|
|
70
|
+
const count = headingSlugs.get(baseSlug);
|
|
71
|
+
if (count !== void 0) {
|
|
72
|
+
slug = `${baseSlug}-${count}`;
|
|
73
|
+
headingSlugs.set(baseSlug, count + 1);
|
|
74
|
+
} else {
|
|
75
|
+
headingSlugs.set(baseSlug, 1);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return /* @__PURE__ */ jsxs(Tag, { className: headingClassNames[Tag], id: slug || void 0, children: [
|
|
79
|
+
slug && /* @__PURE__ */ jsx("a", { className: shared$1("headingAnchor"), href: `#${slug}`, tabIndex: 0, children: /* @__PURE__ */ jsx(Link, { "aria-hidden": true, size: 14, strokeWidth: 2 }) }),
|
|
80
|
+
children
|
|
81
|
+
] }, key);
|
|
82
|
+
}
|
|
83
|
+
case "quote": {
|
|
84
|
+
return /* @__PURE__ */ jsx("blockquote", { className: shared$1("quote"), children }, key);
|
|
85
|
+
}
|
|
86
|
+
case "list": {
|
|
87
|
+
const Tag = node.listType === "number" ? "ol" : "ul";
|
|
88
|
+
const cls = node.listType === "number" ? shared$1("listOl") : node.listType === "check" ? `${shared$1("checklist")} ${shared$1("listUl")}` : shared$1("listUl");
|
|
89
|
+
return /* @__PURE__ */ jsx(Tag, { className: cls, start: node.start !== 1 ? node.start : void 0, children }, key);
|
|
90
|
+
}
|
|
91
|
+
case "listitem": {
|
|
92
|
+
const isChecklist = node.checked !== void 0;
|
|
93
|
+
const hasNestedList = node.children?.some((c) => c.type === "list");
|
|
94
|
+
let cls;
|
|
95
|
+
if (hasNestedList) {
|
|
96
|
+
cls = shared$1("listNestedItem");
|
|
97
|
+
} else if (isChecklist) {
|
|
98
|
+
cls = node.checked ? `${shared$1("listItem")} ${shared$1("listItemChecked")}` : `${shared$1("listItem")} ${shared$1("listItemUnchecked")}`;
|
|
99
|
+
} else {
|
|
100
|
+
cls = shared$1("listItem");
|
|
101
|
+
}
|
|
102
|
+
return /* @__PURE__ */ jsx("li", { className: cls, value: node.value, children }, key);
|
|
103
|
+
}
|
|
104
|
+
case "link": {
|
|
105
|
+
return /* @__PURE__ */ jsxs(
|
|
106
|
+
"a",
|
|
107
|
+
{
|
|
108
|
+
className: shared$1("link"),
|
|
109
|
+
href: node.url,
|
|
110
|
+
rel: node.rel || "noopener",
|
|
111
|
+
target: node.target || "_blank",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ jsx(LinkFavicon, { href: node.url }),
|
|
114
|
+
children
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
key
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
case "autolink": {
|
|
121
|
+
return /* @__PURE__ */ jsxs("a", { className: shared$1("link"), href: node.url, rel: "noopener", target: "_blank", children: [
|
|
122
|
+
/* @__PURE__ */ jsx(LinkFavicon, { href: node.url }),
|
|
123
|
+
children
|
|
124
|
+
] }, key);
|
|
125
|
+
}
|
|
126
|
+
case "horizontalrule": {
|
|
127
|
+
return /* @__PURE__ */ jsx("hr", { className: shared$1("hr") }, key);
|
|
128
|
+
}
|
|
129
|
+
case "table": {
|
|
130
|
+
return /* @__PURE__ */ jsx("div", { className: tableWrapper, children: /* @__PURE__ */ jsx("table", { className: table, children }) }, key);
|
|
131
|
+
}
|
|
132
|
+
case "tablerow": {
|
|
133
|
+
return /* @__PURE__ */ jsx("tr", { children }, key);
|
|
134
|
+
}
|
|
135
|
+
case "tablecell": {
|
|
136
|
+
const CellTag = node.headerState ? "th" : "td";
|
|
137
|
+
const cls = node.headerState ? tableHead : tableCell;
|
|
138
|
+
return /* @__PURE__ */ jsx(CellTag, { className: cls, colSpan: node.colSpan > 1 ? node.colSpan : void 0, children }, key);
|
|
139
|
+
}
|
|
140
|
+
case "details": {
|
|
141
|
+
const summary = node.summary || "";
|
|
142
|
+
return /* @__PURE__ */ jsxs("details", { className: "rich-details", open: node.open || void 0, children: [
|
|
143
|
+
/* @__PURE__ */ jsxs("summary", { className: "rich-details-summary", children: [
|
|
144
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "rich-details-chevron", children: /* @__PURE__ */ jsx(
|
|
145
|
+
"svg",
|
|
146
|
+
{
|
|
147
|
+
fill: "none",
|
|
148
|
+
height: "20",
|
|
149
|
+
stroke: "currentColor",
|
|
150
|
+
strokeLinecap: "round",
|
|
151
|
+
strokeLinejoin: "round",
|
|
152
|
+
strokeWidth: "1.5",
|
|
153
|
+
viewBox: "0 0 20 20",
|
|
154
|
+
width: "20",
|
|
155
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 6L12 10L8 14" })
|
|
156
|
+
}
|
|
157
|
+
) }),
|
|
158
|
+
/* @__PURE__ */ jsx("span", { className: "rich-details-summary-text", children: summary })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsx("div", { className: "rich-details-content", children })
|
|
161
|
+
] }, key);
|
|
162
|
+
}
|
|
163
|
+
case "spoiler": {
|
|
164
|
+
return /* @__PURE__ */ jsx("span", { className: shared$1("spoiler"), role: "button", tabIndex: 0, children }, key);
|
|
165
|
+
}
|
|
166
|
+
case "tag": {
|
|
167
|
+
return /* @__PURE__ */ jsx(
|
|
168
|
+
"span",
|
|
169
|
+
{
|
|
170
|
+
className: shared$1("tag"),
|
|
171
|
+
style: { backgroundColor: getTagBgColor(node.text) },
|
|
172
|
+
children: node.text
|
|
173
|
+
},
|
|
174
|
+
key
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
case "comment": {
|
|
178
|
+
return /* @__PURE__ */ jsx(HtmlComment, { text: node.text ?? "" }, key);
|
|
179
|
+
}
|
|
180
|
+
case "ruby": {
|
|
181
|
+
return createElement(RendererWrapper, {
|
|
182
|
+
key,
|
|
183
|
+
rendererKey: "Ruby",
|
|
184
|
+
defaultRenderer: RubyRenderer,
|
|
185
|
+
props: {
|
|
186
|
+
reading: node.reading ?? "",
|
|
187
|
+
children
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
case "code": {
|
|
192
|
+
return /* @__PURE__ */ jsx("pre", { className: "rich-code-block", children: /* @__PURE__ */ jsx("code", { children }) }, key);
|
|
193
|
+
}
|
|
194
|
+
case "code-highlight": {
|
|
195
|
+
return /* @__PURE__ */ jsx("span", { children: node.text }, key);
|
|
196
|
+
}
|
|
197
|
+
case "linebreak": {
|
|
198
|
+
return /* @__PURE__ */ jsx("br", {}, key);
|
|
199
|
+
}
|
|
200
|
+
case "tab": {
|
|
201
|
+
return /* @__PURE__ */ jsx("span", { children: " " }, key);
|
|
202
|
+
}
|
|
203
|
+
default: {
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
167
207
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
[128, "rich-text-highlight"]
|
|
208
|
+
const shared = (key) => `${semanticClassNames[key]} ${sharedStyles[key]}`;
|
|
209
|
+
const FORMAT_FLAGS = [
|
|
210
|
+
[1, "textBold"],
|
|
211
|
+
[2, "textItalic"],
|
|
212
|
+
[4, "textStrikethrough"],
|
|
213
|
+
[8, "textUnderline"],
|
|
214
|
+
[16, "textCode"],
|
|
215
|
+
[32, "textSubscript"],
|
|
216
|
+
[64, "textSuperscript"],
|
|
217
|
+
[128, "textHighlight"]
|
|
179
218
|
];
|
|
180
219
|
function parseCSSText(cssText) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
220
|
+
const style = {};
|
|
221
|
+
for (const part of cssText.split(";")) {
|
|
222
|
+
const colonIndex = part.indexOf(":");
|
|
223
|
+
if (colonIndex === -1) continue;
|
|
224
|
+
const prop = part.slice(0, colonIndex).trim();
|
|
225
|
+
const value = part.slice(colonIndex + 1).trim();
|
|
226
|
+
if (!prop || !value) continue;
|
|
227
|
+
const camelProp = prop.replaceAll(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
228
|
+
style[camelProp] = value;
|
|
229
|
+
}
|
|
230
|
+
return style;
|
|
192
231
|
}
|
|
193
232
|
function renderTextNode(node, key) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
233
|
+
let element = node.text;
|
|
234
|
+
const format = node.format || 0;
|
|
235
|
+
for (const [flag, styleKey] of FORMAT_FLAGS) {
|
|
236
|
+
if (format & flag) {
|
|
237
|
+
element = /* @__PURE__ */ jsx("span", { className: shared(styleKey), children: element }, `${key}-${flag}`);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if (node.style) {
|
|
241
|
+
element = /* @__PURE__ */ jsx("span", { style: parseCSSText(node.style), children: element }, key);
|
|
242
|
+
}
|
|
243
|
+
return element;
|
|
205
244
|
}
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region src/preprocess/footnote.ts
|
|
208
245
|
function preprocessFootnotes(state) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
246
|
+
const definitions = {};
|
|
247
|
+
const seen = /* @__PURE__ */ new Set();
|
|
248
|
+
const displayNumberMap = {};
|
|
249
|
+
let counter = 1;
|
|
250
|
+
function walk(node) {
|
|
251
|
+
if (node.type === "footnote" && node.identifier) {
|
|
252
|
+
const id = node.identifier;
|
|
253
|
+
if (!seen.has(id)) {
|
|
254
|
+
seen.add(id);
|
|
255
|
+
displayNumberMap[id] = counter++;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
if (node.type === "footnote-section" && node.definitions) {
|
|
259
|
+
Object.assign(definitions, node.definitions);
|
|
260
|
+
}
|
|
261
|
+
if (node.children) {
|
|
262
|
+
for (const child of node.children) walk(child);
|
|
263
|
+
}
|
|
264
|
+
if (node.root) walk(node.root);
|
|
265
|
+
if (node.content && typeof node.content === "object" && node.content.root) {
|
|
266
|
+
walk(node.content);
|
|
267
|
+
}
|
|
268
|
+
if (node.cells && Array.isArray(node.cells)) {
|
|
269
|
+
for (const cell of node.cells) {
|
|
270
|
+
if (cell && cell.root) walk(cell);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
walk(state);
|
|
275
|
+
for (const id of seen) {
|
|
276
|
+
if (!(id in definitions)) {
|
|
277
|
+
definitions[id] = "";
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return { definitions, displayNumberMap };
|
|
235
281
|
}
|
|
236
|
-
|
|
237
|
-
//#region src/RichRenderer.tsx
|
|
282
|
+
const alertClassName = (type) => `${semanticClassNames.alert} ${sharedStyles.alert} rich-alert-${type}`;
|
|
238
283
|
function wrapDecoration(serialized, key, decoration) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
284
|
+
switch (serialized.type) {
|
|
285
|
+
case "alert-quote": {
|
|
286
|
+
return createElement(
|
|
287
|
+
"div",
|
|
288
|
+
{ key, className: alertClassName(serialized.alertType) },
|
|
289
|
+
decoration
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
case "banner": {
|
|
293
|
+
return createElement(
|
|
294
|
+
"div",
|
|
295
|
+
{ key, className: `rich-banner rich-banner-${serialized.bannerType}` },
|
|
296
|
+
decoration
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
case "grid-container": {
|
|
300
|
+
return createElement("div", { key, className: "rich-grid-container" }, decoration);
|
|
301
|
+
}
|
|
302
|
+
default: {
|
|
303
|
+
if (isValidElement(decoration)) {
|
|
304
|
+
return cloneElement(decoration, { key });
|
|
305
|
+
}
|
|
306
|
+
return decoration;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
256
309
|
}
|
|
257
310
|
function applyBlockId(element, blockId, nodeKey) {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
children: element
|
|
264
|
-
}, `${nodeKey}-block-anchor`);
|
|
311
|
+
if (!blockId) return element;
|
|
312
|
+
if (isValidElement(element) && typeof element.type === "string") {
|
|
313
|
+
return cloneElement(element, { "data-block-id": blockId });
|
|
314
|
+
}
|
|
315
|
+
return /* @__PURE__ */ jsx("div", { className: "rich-block-anchor", "data-block-id": blockId, children: element }, `${nodeKey}-block-anchor`);
|
|
265
316
|
}
|
|
266
317
|
function renderTree(node, editor, editorConfig, headingSlugs, key, blockId, builtinNodeOverrides) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
318
|
+
const nodeKey = node.getKey ? node.getKey() : key;
|
|
319
|
+
if (typeof node.decorate === "function") {
|
|
320
|
+
try {
|
|
321
|
+
const decoration = node.decorate(editor, editorConfig);
|
|
322
|
+
if (decoration != null) {
|
|
323
|
+
const serialized2 = node.exportJSON ? node.exportJSON() : {};
|
|
324
|
+
return applyBlockId(wrapDecoration(serialized2, nodeKey, decoration), blockId, nodeKey);
|
|
325
|
+
}
|
|
326
|
+
} catch {
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const serialized = node.exportJSON ? node.exportJSON() : {};
|
|
330
|
+
if (serialized.type === "text") {
|
|
331
|
+
return renderTextNode(serialized, nodeKey);
|
|
332
|
+
}
|
|
333
|
+
let children = null;
|
|
334
|
+
if (node.getChildren) {
|
|
335
|
+
const childNodes = node.getChildren();
|
|
336
|
+
if (childNodes.length > 0) {
|
|
337
|
+
children = childNodes.map(
|
|
338
|
+
(child, i) => renderTree(
|
|
339
|
+
child,
|
|
340
|
+
editor,
|
|
341
|
+
editorConfig,
|
|
342
|
+
headingSlugs,
|
|
343
|
+
`${nodeKey}-${i}`,
|
|
344
|
+
void 0,
|
|
345
|
+
builtinNodeOverrides
|
|
346
|
+
)
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
node.getTextContent ? node.getTextContent() : void 0;
|
|
351
|
+
const override = builtinNodeOverrides?.[serialized.type];
|
|
352
|
+
if (override) {
|
|
353
|
+
const defaultRenderer = () => renderBuiltinNode(serialized, nodeKey, children, headingSlugs);
|
|
354
|
+
return applyBlockId(override(serialized, nodeKey, children, defaultRenderer), blockId, nodeKey);
|
|
355
|
+
}
|
|
356
|
+
return applyBlockId(
|
|
357
|
+
renderBuiltinNode(serialized, nodeKey, children, headingSlugs),
|
|
358
|
+
blockId,
|
|
359
|
+
nodeKey
|
|
360
|
+
);
|
|
286
361
|
}
|
|
287
362
|
function renderEditorToReact(value, nodes, builtinNodeOverrides) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
363
|
+
const editor = createHeadlessEditor({
|
|
364
|
+
nodes,
|
|
365
|
+
theme: editorTheme,
|
|
366
|
+
editable: false,
|
|
367
|
+
onError: (error) => {
|
|
368
|
+
console.error("[RichRenderer]", error);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
const editorConfig = { namespace: "ssr", theme: editorTheme };
|
|
372
|
+
const editorState = editor.parseEditorState(value);
|
|
373
|
+
editor.setEditorState(editorState);
|
|
374
|
+
const footnoteData = preprocessFootnotes(value);
|
|
375
|
+
const rawRootChildren = value.root?.children;
|
|
376
|
+
let content = null;
|
|
377
|
+
editorState.read(() => {
|
|
378
|
+
const root = $getRoot();
|
|
379
|
+
const headingSlugs = /* @__PURE__ */ new Map();
|
|
380
|
+
const children = root.getChildren().map(
|
|
381
|
+
(child, i) => renderTree(
|
|
382
|
+
child,
|
|
383
|
+
editor,
|
|
384
|
+
editorConfig,
|
|
385
|
+
headingSlugs,
|
|
386
|
+
`ssr-${i}`,
|
|
387
|
+
rawRootChildren?.[i]?.$?.blockId,
|
|
388
|
+
builtinNodeOverrides
|
|
389
|
+
)
|
|
390
|
+
);
|
|
391
|
+
content = /* @__PURE__ */ jsx(Fragment, { children });
|
|
392
|
+
});
|
|
393
|
+
const renderNestedContent = (state) => {
|
|
394
|
+
const nestedEditor = createHeadlessEditor({
|
|
395
|
+
nodes,
|
|
396
|
+
theme: editorTheme,
|
|
397
|
+
editable: false,
|
|
398
|
+
onError: (error) => {
|
|
399
|
+
console.error("[RichRenderer:nested]", error);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
const nestedEditorConfig = {
|
|
403
|
+
namespace: "ssr-nested",
|
|
404
|
+
theme: editorTheme
|
|
405
|
+
};
|
|
406
|
+
const nestedState = nestedEditor.parseEditorState(state);
|
|
407
|
+
nestedEditor.setEditorState(nestedState);
|
|
408
|
+
let nested = null;
|
|
409
|
+
const nestedRawChildren = state.root?.children;
|
|
410
|
+
nestedState.read(() => {
|
|
411
|
+
const root = $getRoot();
|
|
412
|
+
const headingSlugs = /* @__PURE__ */ new Map();
|
|
413
|
+
const ch = root.getChildren().map(
|
|
414
|
+
(child, i) => renderTree(
|
|
415
|
+
child,
|
|
416
|
+
nestedEditor,
|
|
417
|
+
nestedEditorConfig,
|
|
418
|
+
headingSlugs,
|
|
419
|
+
`nested-${i}`,
|
|
420
|
+
nestedRawChildren?.[i]?.$?.blockId,
|
|
421
|
+
builtinNodeOverrides
|
|
422
|
+
)
|
|
423
|
+
);
|
|
424
|
+
nested = /* @__PURE__ */ jsx(Fragment, { children: ch });
|
|
425
|
+
});
|
|
426
|
+
return nested;
|
|
427
|
+
};
|
|
428
|
+
return { content, footnoteData, renderNestedContent };
|
|
339
429
|
}
|
|
340
|
-
function RichRenderer({
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
})
|
|
376
|
-
})
|
|
377
|
-
})
|
|
378
|
-
})
|
|
379
|
-
});
|
|
430
|
+
function RichRenderer({
|
|
431
|
+
value,
|
|
432
|
+
variant = "article",
|
|
433
|
+
theme = "light",
|
|
434
|
+
className,
|
|
435
|
+
style,
|
|
436
|
+
as: Component = "div",
|
|
437
|
+
rendererConfig,
|
|
438
|
+
extraNodes,
|
|
439
|
+
builtinNodeOverrides
|
|
440
|
+
}) {
|
|
441
|
+
const variantClass = getVariantClass(variant);
|
|
442
|
+
const outerRenderNestedContent = useOptionalNestedContentRenderer();
|
|
443
|
+
const { content, footnoteData, renderNestedContent } = useMemo(() => {
|
|
444
|
+
const nodes = extraNodes ? [...allNodes, ...extraNodes] : allNodes;
|
|
445
|
+
return renderEditorToReact(value, nodes, builtinNodeOverrides);
|
|
446
|
+
}, [builtinNodeOverrides, extraNodes, value]);
|
|
447
|
+
const classes = ["rich-content", variantClass, className].filter(Boolean).join(" ");
|
|
448
|
+
return /* @__PURE__ */ jsx(PortalThemeProvider, { className: variantClass, theme, children: /* @__PURE__ */ jsx(ColorSchemeProvider, { colorScheme: theme, children: /* @__PURE__ */ jsx(RendererConfigProvider, { config: rendererConfig, mode: "renderer", variant, children: /* @__PURE__ */ jsx(
|
|
449
|
+
FootnoteDefinitionsProvider,
|
|
450
|
+
{
|
|
451
|
+
definitions: footnoteData.definitions,
|
|
452
|
+
displayNumberMap: footnoteData.displayNumberMap,
|
|
453
|
+
children: /* @__PURE__ */ jsx(NestedContentRendererProvider, { value: outerRenderNestedContent ?? renderNestedContent, children: /* @__PURE__ */ jsx(
|
|
454
|
+
Component,
|
|
455
|
+
{
|
|
456
|
+
suppressHydrationWarning: true,
|
|
457
|
+
className: classes,
|
|
458
|
+
"data-theme": theme,
|
|
459
|
+
style,
|
|
460
|
+
children: content
|
|
461
|
+
}
|
|
462
|
+
) })
|
|
463
|
+
}
|
|
464
|
+
) }) }) });
|
|
380
465
|
}
|
|
381
|
-
|
|
382
|
-
|
|
466
|
+
export {
|
|
467
|
+
RichRenderer
|
|
468
|
+
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
:root{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark{--rc-text:#fafafa;--rc-text-secondary:#a1a1aa;--rc-text-tertiary:#71717a;--rc-text-quaternary:#52525b;--rc-bg:#09090b;--rc-bg-secondary:#18181b;--rc-bg-tertiary:#27272a;--rc-fill:#2a2a2f;--rc-fill-secondary:#222226;--rc-fill-tertiary:#1b1b1f;--rc-fill-quaternary:#131316;--rc-border:#27272a;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#e4e4e7;--rc-code-bg:#27272a;--rc-hr-border:#27272a;--rc-quote-border:#60a5fa;--rc-quote-bg:#1e3a5f;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.km6fx0{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.km6fx1{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.8;--rc-line-height-tight:1.4;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}.km6fx2{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#a1a1aa;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}.dark .km6fx0,[data-theme=dark] .km6fx0,.dark.km6fx0,[data-theme=dark].km6fx0,.dark .km6fx1,[data-theme=dark] .km6fx1,.dark.km6fx1,[data-theme=dark].km6fx1,.dark .km6fx2,[data-theme=dark] .km6fx2,.dark.km6fx2,[data-theme=dark].km6fx2{--rc-text:#fafafa;--rc-text-secondary:#a1a1aa;--rc-text-tertiary:#71717a;--rc-text-quaternary:#52525b;--rc-bg:#09090b;--rc-bg-secondary:#18181b;--rc-bg-tertiary:#27272a;--rc-fill:#2a2a2f;--rc-fill-secondary:#222226;--rc-fill-tertiary:#1b1b1f;--rc-fill-quaternary:#131316;--rc-border:#27272a;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#e4e4e7;--rc-code-bg:#27272a;--rc-hr-border:#27272a;--rc-quote-border:#60a5fa;--rc-quote-bg:#1e3a5f;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}._1v9yxw30{overflow-x:auto}._1v9yxw31{caption-side:bottom;border-collapse:collapse;width:100%;font-size:var(--rc-font-size-small)}._1v9yxw32{height:2.5rem;padding:0 var(--rc-space-lg);vertical-align:middle;white-space:nowrap;color:var(--rc-text-secondary);font-weight:500;line-height:1.5}._1v9yxw33{padding:var(--rc-space-lg);vertical-align:middle;line-height:1.5}._1v9yxw31 tr:has(._1v9yxw32){border-bottom:1px solid var(--rc-border)}._1v9yxw31 tr:has(._1v9yxw33):nth-child(2n){background-color:var(--rc-bg-secondary)}._1v9yxw31:has(tr:hover) tr:has(._1v9yxw33):nth-child(2n):not(:hover){background-color:#0000}._1v9yxw31 tr:has(._1v9yxw33){transition:background-color .15s}._1v9yxw31 tr:has(._1v9yxw33):hover{background-color:var(--rc-fill-tertiary)}._1v9yxw31 .rich-paragraph{line-height:inherit;margin:0;padding:0}
|
|
2
|
-
/*$vite$:1*/
|
|
1
|
+
:root{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}:root.dark{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--rc-alert-info: #7db9e5;--rc-alert-warning: #da864a;--rc-alert-tip: #54da48;--rc-alert-caution: #e16973;--rc-alert-important: #9966e0;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}.km6fx0{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}.km6fx1{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.8;--rc-line-height-tight: 1.4;--rc-font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}.km6fx2{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #a1a1aa;--rc-quote-bg: #fafafa;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: none;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 2px;--rc-space-sm: 4px;--rc-space-md: 10px;--rc-space-lg: 16px;--rc-space-xl: 20px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 14px;--rc-font-size-small: 12px;--rc-line-height: 1.5;--rc-line-height-tight: 1.3;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 3px;--rc-radius-md: 6px;--rc-radius-lg: 12px}.dark .km6fx0,[data-theme=dark] .km6fx0,.dark.km6fx0,[data-theme=dark].km6fx0,.dark .km6fx1,[data-theme=dark] .km6fx1,.dark.km6fx1,[data-theme=dark].km6fx1,.dark .km6fx2,[data-theme=dark] .km6fx2,.dark.km6fx2,[data-theme=dark].km6fx2{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--rc-alert-info: #7db9e5;--rc-alert-warning: #da864a;--rc-alert-tip: #54da48;--rc-alert-caution: #e16973;--rc-alert-important: #9966e0;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4)}._1v9yxw30{overflow-x:auto}._1v9yxw31{width:100%;caption-side:bottom;border-collapse:collapse;font-size:var(--rc-font-size-small)}._1v9yxw32{height:2.5rem;padding:0 var(--rc-space-lg);vertical-align:middle;font-weight:500;white-space:nowrap;color:var(--rc-text-secondary);line-height:1.5}._1v9yxw33{padding:var(--rc-space-lg);vertical-align:middle;line-height:1.5}._1v9yxw31 tr:has(._1v9yxw32){border-bottom:1px solid var(--rc-border)}._1v9yxw31 tr:has(._1v9yxw33):nth-child(2n){background-color:var(--rc-bg-secondary)}._1v9yxw31:has(tr:hover) tr:has(._1v9yxw33):nth-child(2n):not(:hover){background-color:transparent}._1v9yxw31 tr:has(._1v9yxw33){transition:background-color .15s}._1v9yxw31 tr:has(._1v9yxw33):hover{background-color:var(--rc-fill-tertiary)}._1v9yxw31 .rich-paragraph{margin:0;padding:0;line-height:inherit}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-static-renderer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"description": "Headless SSR engine for Lexical rich content",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@lexical/code": "npm:lexical-code-no-prism@0.41.0",
|
|
24
24
|
"@lexical/headless": "^0.41.0",
|
|
25
25
|
"lucide-react": "^0.577.0",
|
|
26
|
-
"@haklex/rich-editor": "0.0.
|
|
27
|
-
"@haklex/rich-style-token": "0.0.
|
|
26
|
+
"@haklex/rich-editor": "0.0.83",
|
|
27
|
+
"@haklex/rich-style-token": "0.0.83"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@lexical/extension": "^0.41.0",
|