@haklex/rich-ext-nested-doc 0.0.80 → 0.0.81
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/NestedDocStaticDecorator.d.ts.map +1 -1
- package/dist/index.mjs +257 -251
- package/dist/rich-ext-nested-doc.css +2 -1
- package/dist/static.mjs +5 -12
- package/dist/transformer-VVBkt_Yh.js +269 -0
- package/package.json +5 -5
- package/dist/transformer-Ccyy7neb.js +0 -236
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestedDocStaticDecorator.d.ts","sourceRoot":"","sources":["../src/NestedDocStaticDecorator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NestedDocStaticDecorator.d.ts","sourceRoot":"","sources":["../src/NestedDocStaticDecorator.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAUrD,UAAU,6BAA6B;IACrC,YAAY,EAAE,qBAAqB,CAAC;CACrC;AAED,wBAAgB,wBAAwB,CAAC,EAAE,YAAY,EAAE,EAAE,6BAA6B,kDA0EvF"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,267 +1,273 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { t as truncateEditorState, h as hasRenderableEditorState, d as dialogPopup, e as editOverlayRoot, r as rendererContent, p as previewSurface, N as NestedDocRenderer, a as previewEmpty, b as editOverlay, $ as $isNestedDocNode, c as dialogShell, f as dialogHeader, g as dialogHeaderLeft, i as dialogTitle, j as dialogHeaderRight, k as dialogHeaderCloseBtn, l as editorArea, m as dialogFooter, n as NestedDocNode } from "./transformer-Ccyy7neb.js";
|
|
5
|
-
import { o, q, s } from "./transformer-Ccyy7neb.js";
|
|
6
|
-
import { useColorScheme, editorTheme } from "@haklex/rich-editor";
|
|
1
|
+
import { C as rendererContent, S as previewSurface, _ as dialogTitle, a as _defineProperty, b as editorArea, c as truncateEditorState, d as dialogHeader, f as dialogHeaderCloseBtn, g as dialogShell, h as dialogPopup, i as NestedDocNode, l as NestedDocRenderer, m as dialogHeaderRight, n as $createNestedDocNode, o as NestedDocStaticDecorator, p as dialogHeaderLeft, r as $isNestedDocNode, s as hasRenderableEditorState, t as NESTED_DOC_BLOCK_TRANSFORMER, u as dialogFooter, v as editOverlay, x as previewEmpty, y as editOverlayRoot } from "./transformer-VVBkt_Yh.js";
|
|
2
|
+
import { editorTheme, useColorScheme } from "@haklex/rich-editor";
|
|
7
3
|
import { getResolvedEditNodes } from "@haklex/rich-editor/nodes";
|
|
8
|
-
import { $getNodeByKey, $insertNodes,
|
|
9
|
-
import {
|
|
10
|
-
import { createContext,
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { $getNodeByKey, $insertNodes, COMMAND_PRIORITY_EDITOR, createCommand, createEditor } from "lexical";
|
|
5
|
+
import { FileText, Pencil, X } from "lucide-react";
|
|
6
|
+
import { createContext, createElement, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
12
7
|
import { ActionBar, ActionButton } from "@haklex/rich-editor-ui";
|
|
13
|
-
import {
|
|
8
|
+
import { PortalContainerProvider, usePortalTheme } from "@haklex/rich-style-token";
|
|
14
9
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/NestedDocDialogEditorContext.tsx
|
|
12
|
+
var NestedDocDialogEditorContext = createContext(null);
|
|
13
|
+
var NestedDocDialogEditorProvider = NestedDocDialogEditorContext.Provider;
|
|
17
14
|
function useNestedDocDialogEditor() {
|
|
18
|
-
|
|
15
|
+
return use(NestedDocDialogEditorContext);
|
|
19
16
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/NestedDocEditDecorator.tsx
|
|
19
|
+
var PREVIEW_NODE_LIMIT = 6;
|
|
20
|
+
var EMPTY_EDITOR_STATE = { root: {
|
|
21
|
+
children: [{
|
|
22
|
+
children: [],
|
|
23
|
+
direction: "ltr",
|
|
24
|
+
format: "",
|
|
25
|
+
indent: 0,
|
|
26
|
+
type: "paragraph",
|
|
27
|
+
version: 1,
|
|
28
|
+
textFormat: 0,
|
|
29
|
+
textStyle: ""
|
|
30
|
+
}],
|
|
31
|
+
direction: "ltr",
|
|
32
|
+
format: "",
|
|
33
|
+
indent: 0,
|
|
34
|
+
type: "root",
|
|
35
|
+
version: 1
|
|
36
|
+
} };
|
|
37
|
+
function NestedDocEditDecorator({ nodeKey, contentEditor, contentState }) {
|
|
38
|
+
const [editor] = useLexicalComposerContext();
|
|
39
|
+
const colorScheme = useColorScheme();
|
|
40
|
+
const { className: portalClassName } = usePortalTheme();
|
|
41
|
+
const DialogEditor = useNestedDocDialogEditor();
|
|
42
|
+
const previewState = useMemo(() => truncateEditorState(contentState, PREVIEW_NODE_LIMIT), [contentState]);
|
|
43
|
+
const hasPreview = hasRenderableEditorState(previewState);
|
|
44
|
+
const handleOpenDialog = useCallback(async () => {
|
|
45
|
+
if (!DialogEditor) return;
|
|
46
|
+
const { presentDialog } = await import("@haklex/rich-editor-ui");
|
|
47
|
+
presentDialog({
|
|
48
|
+
content: ({ dismiss }) => /* @__PURE__ */ jsx(NestedDocDialogContent, {
|
|
49
|
+
DialogEditor,
|
|
50
|
+
contentEditor,
|
|
51
|
+
initialState: contentEditor.getEditorState().toJSON(),
|
|
52
|
+
nodeKey,
|
|
53
|
+
parentEditor: editor,
|
|
54
|
+
onDismiss: dismiss
|
|
55
|
+
}),
|
|
56
|
+
className: dialogPopup,
|
|
57
|
+
portalClassName,
|
|
58
|
+
theme: colorScheme,
|
|
59
|
+
showCloseButton: false,
|
|
60
|
+
clickOutsideToDismiss: false
|
|
61
|
+
});
|
|
62
|
+
}, [
|
|
63
|
+
DialogEditor,
|
|
64
|
+
colorScheme,
|
|
65
|
+
contentEditor,
|
|
66
|
+
editor,
|
|
67
|
+
nodeKey,
|
|
68
|
+
portalClassName
|
|
69
|
+
]);
|
|
70
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
71
|
+
"aria-label": "Open nested document editor",
|
|
72
|
+
className: editOverlayRoot,
|
|
73
|
+
role: "button",
|
|
74
|
+
tabIndex: 0,
|
|
75
|
+
onClick: handleOpenDialog,
|
|
76
|
+
onKeyDown: (event) => {
|
|
77
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
handleOpenDialog();
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
83
|
+
className: `${rendererContent} rich-nested-doc-content`,
|
|
84
|
+
children: hasPreview ? /* @__PURE__ */ jsx("div", {
|
|
85
|
+
className: previewSurface,
|
|
86
|
+
children: /* @__PURE__ */ jsx(NestedDocRenderer, { value: previewState })
|
|
87
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
88
|
+
className: previewEmpty,
|
|
89
|
+
children: "Empty nested document. Click to edit."
|
|
90
|
+
})
|
|
91
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
92
|
+
"aria-hidden": true,
|
|
93
|
+
className: editOverlay,
|
|
94
|
+
children: /* @__PURE__ */ jsx(Pencil, { size: 24 })
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
98
97
|
}
|
|
99
|
-
function NestedDocDialogContent({
|
|
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
|
-
|
|
98
|
+
function NestedDocDialogContent({ initialState, parentEditor, nodeKey, contentEditor, onDismiss, DialogEditor }) {
|
|
99
|
+
const dialogEditorRef = useRef(null);
|
|
100
|
+
const [shellEl, setShellEl] = useState(null);
|
|
101
|
+
const safeInitialState = initialState?.root?.children?.length > 0 ? initialState : EMPTY_EDITOR_STATE;
|
|
102
|
+
const handleDone = useCallback(() => {
|
|
103
|
+
const dialogEditor = dialogEditorRef.current;
|
|
104
|
+
if (dialogEditor) {
|
|
105
|
+
const newState = dialogEditor.getEditorState().toJSON();
|
|
106
|
+
const parsed = contentEditor.parseEditorState(newState);
|
|
107
|
+
contentEditor.setEditorState(parsed);
|
|
108
|
+
parentEditor.update(() => {
|
|
109
|
+
const node = $getNodeByKey(nodeKey);
|
|
110
|
+
if ($isNestedDocNode(node)) node.setContentState(newState);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
onDismiss();
|
|
114
|
+
}, [
|
|
115
|
+
contentEditor,
|
|
116
|
+
nodeKey,
|
|
117
|
+
onDismiss,
|
|
118
|
+
parentEditor
|
|
119
|
+
]);
|
|
120
|
+
const handleKeyDownCapture = useCallback((event) => {
|
|
121
|
+
if (!(event.metaKey || event.ctrlKey)) return;
|
|
122
|
+
if (event.key === "Enter" || event.key.toLowerCase() === "s") {
|
|
123
|
+
event.preventDefault();
|
|
124
|
+
handleDone();
|
|
125
|
+
}
|
|
126
|
+
}, [handleDone]);
|
|
127
|
+
const handleEditorReady = useCallback((editor) => {
|
|
128
|
+
dialogEditorRef.current = editor;
|
|
129
|
+
}, []);
|
|
130
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
131
|
+
className: dialogShell,
|
|
132
|
+
ref: setShellEl,
|
|
133
|
+
onKeyDownCapture: handleKeyDownCapture,
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsxs("div", {
|
|
136
|
+
className: dialogHeader,
|
|
137
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
138
|
+
className: dialogHeaderLeft,
|
|
139
|
+
children: /* @__PURE__ */ jsxs("h3", {
|
|
140
|
+
className: dialogTitle,
|
|
141
|
+
children: [/* @__PURE__ */ jsx(FileText, { size: 18 }), /* @__PURE__ */ jsx("span", { children: "Nested document" })]
|
|
142
|
+
})
|
|
143
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
144
|
+
className: dialogHeaderRight,
|
|
145
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
146
|
+
className: dialogHeaderCloseBtn,
|
|
147
|
+
title: "Close",
|
|
148
|
+
type: "button",
|
|
149
|
+
onClick: onDismiss,
|
|
150
|
+
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
151
|
+
})
|
|
152
|
+
})]
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ jsx("div", {
|
|
155
|
+
className: editorArea,
|
|
156
|
+
children: shellEl && /* @__PURE__ */ jsx(PortalContainerProvider, {
|
|
157
|
+
value: shellEl,
|
|
158
|
+
children: /* @__PURE__ */ jsx(DialogEditor, {
|
|
159
|
+
initialValue: safeInitialState,
|
|
160
|
+
onEditorReady: handleEditorReady
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ jsx("div", {
|
|
165
|
+
className: dialogFooter,
|
|
166
|
+
children: /* @__PURE__ */ jsxs(ActionBar, { children: [/* @__PURE__ */ jsx(ActionButton, {
|
|
167
|
+
size: "md",
|
|
168
|
+
variant: "ghost",
|
|
169
|
+
onClick: onDismiss,
|
|
170
|
+
children: "Cancel"
|
|
171
|
+
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
172
|
+
size: "md",
|
|
173
|
+
variant: "accent",
|
|
174
|
+
onClick: handleDone,
|
|
175
|
+
children: "Save"
|
|
176
|
+
})] })
|
|
177
|
+
})
|
|
178
|
+
]
|
|
179
|
+
});
|
|
162
180
|
}
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/NestedDocEditNode.ts
|
|
163
183
|
function createContentEditor() {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
184
|
+
return createEditor({
|
|
185
|
+
namespace: "NestedDocContent",
|
|
186
|
+
nodes: getResolvedEditNodes(),
|
|
187
|
+
theme: editorTheme,
|
|
188
|
+
onError: (error) => {
|
|
189
|
+
console.error("[NestedDocContent]", error);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
172
192
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
193
|
+
var NestedDocEditNode = class NestedDocEditNode extends NestedDocNode {
|
|
194
|
+
static clone(node) {
|
|
195
|
+
const cloned = new NestedDocEditNode(node.__contentState, node.__key);
|
|
196
|
+
cloned.__contentEditor = node.__contentEditor;
|
|
197
|
+
return cloned;
|
|
198
|
+
}
|
|
199
|
+
constructor(contentState, key) {
|
|
200
|
+
super(contentState, key);
|
|
201
|
+
_defineProperty(this, "__contentEditor", void 0);
|
|
202
|
+
this.__contentEditor = createContentEditor();
|
|
203
|
+
if (contentState) {
|
|
204
|
+
const editorState = this.__contentEditor.parseEditorState(contentState);
|
|
205
|
+
this.__contentEditor.setEditorState(editorState);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
getContentEditor() {
|
|
209
|
+
return this.__contentEditor;
|
|
210
|
+
}
|
|
211
|
+
static importJSON(serializedNode) {
|
|
212
|
+
return new NestedDocEditNode(serializedNode.content);
|
|
213
|
+
}
|
|
214
|
+
exportJSON() {
|
|
215
|
+
return {
|
|
216
|
+
...super.exportJSON(),
|
|
217
|
+
type: "nested-doc",
|
|
218
|
+
content: this.__contentEditor.getEditorState().toJSON(),
|
|
219
|
+
version: 1
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
decorate(_editor, _config) {
|
|
223
|
+
return createElement(NestedDocEditDecorator, {
|
|
224
|
+
nodeKey: this.__key,
|
|
225
|
+
contentEditor: this.__contentEditor,
|
|
226
|
+
contentState: this.__contentState
|
|
227
|
+
});
|
|
228
|
+
}
|
|
209
229
|
};
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
]);
|
|
226
|
-
|
|
230
|
+
_defineProperty(NestedDocEditNode, "commandItems", [{
|
|
231
|
+
title: "Nested Document",
|
|
232
|
+
icon: createElement(FileText, { size: 20 }),
|
|
233
|
+
description: "Embed a collapsible nested document",
|
|
234
|
+
keywords: [
|
|
235
|
+
"nested",
|
|
236
|
+
"document",
|
|
237
|
+
"nested-doc",
|
|
238
|
+
"embed"
|
|
239
|
+
],
|
|
240
|
+
section: "ADVANCED",
|
|
241
|
+
placement: ["slash", "toolbar"],
|
|
242
|
+
group: "insert",
|
|
243
|
+
onSelect: (editor) => {
|
|
244
|
+
editor.update(() => {
|
|
245
|
+
$insertNodes([$createNestedDocEditNode()]);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}]);
|
|
227
249
|
function $createNestedDocEditNode(contentState) {
|
|
228
|
-
|
|
250
|
+
return new NestedDocEditNode(contentState);
|
|
229
251
|
}
|
|
230
252
|
function $isNestedDocEditNode(node) {
|
|
231
|
-
|
|
253
|
+
return node instanceof NestedDocEditNode;
|
|
232
254
|
}
|
|
233
|
-
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/NestedDocPlugin.tsx
|
|
257
|
+
var INSERT_NESTED_DOC_COMMAND = createCommand("INSERT_NESTED_DOC");
|
|
234
258
|
function NestedDocPlugin() {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
COMMAND_PRIORITY_EDITOR
|
|
244
|
-
);
|
|
245
|
-
}, [editor]);
|
|
246
|
-
return null;
|
|
259
|
+
const [editor] = useLexicalComposerContext();
|
|
260
|
+
useEffect(() => {
|
|
261
|
+
return editor.registerCommand(INSERT_NESTED_DOC_COMMAND, (contentState) => {
|
|
262
|
+
$insertNodes([$createNestedDocEditNode(contentState || void 0)]);
|
|
263
|
+
return true;
|
|
264
|
+
}, COMMAND_PRIORITY_EDITOR);
|
|
265
|
+
}, [editor]);
|
|
266
|
+
return null;
|
|
247
267
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
$isNestedDocNode,
|
|
255
|
-
INSERT_NESTED_DOC_COMMAND,
|
|
256
|
-
q as NESTED_DOC_BLOCK_TRANSFORMER,
|
|
257
|
-
NestedDocDialogEditorProvider,
|
|
258
|
-
NestedDocEditDecorator,
|
|
259
|
-
NestedDocEditNode,
|
|
260
|
-
NestedDocNode,
|
|
261
|
-
NestedDocPlugin,
|
|
262
|
-
NestedDocRenderer,
|
|
263
|
-
s as NestedDocStaticDecorator,
|
|
264
|
-
nestedDocEditNodes,
|
|
265
|
-
nestedDocNodes,
|
|
266
|
-
useNestedDocDialogEditor
|
|
267
|
-
};
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region src/index.ts
|
|
270
|
+
var nestedDocNodes = [NestedDocNode];
|
|
271
|
+
var nestedDocEditNodes = [NestedDocEditNode];
|
|
272
|
+
//#endregion
|
|
273
|
+
export { $createNestedDocEditNode, $createNestedDocNode, $isNestedDocEditNode, $isNestedDocNode, INSERT_NESTED_DOC_COMMAND, NESTED_DOC_BLOCK_TRANSFORMER, NestedDocDialogEditorProvider, NestedDocEditDecorator, NestedDocEditNode, NestedDocNode, NestedDocPlugin, NestedDocRenderer, NestedDocStaticDecorator, nestedDocEditNodes, nestedDocNodes, useNestedDocDialogEditor };
|
|
@@ -1 +1,2 @@
|
|
|
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}._1kl9cd60{--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}._1kl9cd61{--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}._1kl9cd62{--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 ._1kl9cd60,[data-theme=dark] ._1kl9cd60,.dark._1kl9cd60,[data-theme=dark]._1kl9cd60,.dark ._1kl9cd61,[data-theme=dark] ._1kl9cd61,.dark._1kl9cd61,[data-theme=dark]._1kl9cd61,.dark ._1kl9cd62,[data-theme=dark] ._1kl9cd62,.dark._1kl9cd62,[data-theme=dark]._1kl9cd62{--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)}@keyframes ds1tv41{to{--rc-hl-highlighted: 1}}@keyframes ds1tv42{0%{background-color:#ef44443d}to{background-color:transparent}}.ds1tv40{font-family:var(--rc-font-family);font-size:var(--rc-font-size-base);line-height:var(--rc-line-height);color:var(--rc-text);word-wrap:break-word;overflow-wrap:break-word}.ds1tv40 .rich-paragraph{margin:0 0 1em;line-height:var(--rc-line-height)}.ds1tv40 .rich-text-bold{font-weight:700}.ds1tv40 .rich-text-italic{font-style:italic}.ds1tv40 .rich-text-underline{text-decoration:underline}.ds1tv40 .rich-text-strikethrough{text-decoration:line-through;opacity:.65}.ds1tv40 .rich-text-superscript{vertical-align:super;font-size:.8em}.ds1tv40 .rich-text-subscript{vertical-align:sub;font-size:.8em}.ds1tv40 .rich-text-code{font-family:var(--rc-font-mono);font-size:.9em;background-color:var(--rc-code-bg);color:var(--rc-code-text);padding:2px 6px;border-radius:var(--rc-radius-sm);border:1px solid var(--rc-border)}[contenteditable=true] .rich-text-code{padding-right:0}.ds1tv40 mark{background:transparent}.ds1tv40 .rich-text-highlight{--rc-hl-lightness: .3;--rc-hl-highlighted: 1;--rc-hl-color: oklch(from var(--rc-accent) l c h / var(--rc-hl-lightness));background:linear-gradient(120deg,var(--rc-hl-color, lightblue) 50%,transparent 50%) 110% 0 / 200% 100% no-repeat;background-position:calc((1 - var(--rc-hl-highlighted)) * 110%) 0;color:var(--rc-text);transition:background-position 1s}[contenteditable=true] .rich-text-highlight{--rc-hl-highlighted: 1;animation:none}[data-theme=dark] .ds1tv40 .rich-text-highlight{--rc-hl-lightness: .35}.ds1tv40 :is(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6){position:relative}.ds1tv40 .rich-heading-anchor{position:absolute;left:-1.25rem;top:0;bottom:0;display:flex;align-items:center;text-decoration:none;color:var(--rc-text-secondary);opacity:0;transition:opacity .15s ease;font-size:.8rem}.ds1tv40 .rich-heading-anchor svg{flex-shrink:0}.ds1tv40 :is(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6):hover .rich-heading-anchor{opacity:.5}.ds1tv40 :is(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6):hover .rich-heading-anchor:hover{opacity:1}[contenteditable=true] .rich-heading-h1:before,[contenteditable=true] .rich-heading-h2:before,[contenteditable=true] .rich-heading-h3:before,[contenteditable=true] .rich-heading-h4:before,[contenteditable=true] .rich-heading-h5:before,[contenteditable=true] .rich-heading-h6:before{position:absolute;left:-1.5rem;bottom:.5rem;display:flex;font-size:.5rem;font-weight:600;color:var(--rc-text-secondary);opacity:.6;pointer-events:none;font-family:var(--rc-font-mono)}[contenteditable=true] .rich-heading-h1:before{content:"H1"}[contenteditable=true] .rich-heading-h2:before{content:"H2"}[contenteditable=true] .rich-heading-h3:before{content:"H3"}[contenteditable=true] .rich-heading-h4:before{content:"H4"}[contenteditable=true] .rich-heading-h5:before{content:"H5"}[contenteditable=true] .rich-heading-h6:before{content:"H6"}.ds1tv40 .rich-heading-h1{font-size:2em;font-weight:700;line-height:var(--rc-line-height-tight);margin-top:1.5em;margin-bottom:.5em}.ds1tv40 .rich-heading-h2{font-size:1.5em;font-weight:700;line-height:var(--rc-line-height-tight);margin-top:1.4em;margin-bottom:.45em}.ds1tv40 .rich-heading-h3{font-size:1.25em;font-weight:600;line-height:var(--rc-line-height-tight);margin-top:1.3em;margin-bottom:.4em}.ds1tv40 .rich-heading-h4{font-size:1.125em;font-weight:600;line-height:var(--rc-line-height-tight);margin-top:1.2em;margin-bottom:.35em}.ds1tv40 .rich-heading-h5{font-size:1em;font-weight:600;line-height:var(--rc-line-height-tight);margin-top:1.1em;margin-bottom:.3em}.ds1tv40 .rich-heading-h6{font-size:.875em;font-weight:600;line-height:var(--rc-line-height-tight);margin-top:1em;margin-bottom:.25em;color:var(--rc-text)}.ds1tv40 .rich-link{color:var(--rc-link);text-decoration:none;transition:color .2s ease}.ds1tv40 .rich-link:hover{text-decoration:underline}.ds1tv40 .rich-link[data-favicon=loaded]:before{content:"";display:inline-block;width:1em;height:1em;margin-right:.2em;vertical-align:-.125em;background-image:var(--rc-link-favicon);background-size:contain;background-repeat:no-repeat;background-position:center;border-radius:2px}.ds1tv40 .rich-link-favicon{display:inline-flex;align-items:center;margin-right:.15em;vertical-align:-.125em}.ds1tv40 .rich-link-favicon img{width:1em;height:1em;border-radius:2px;object-fit:contain}.ds1tv40 .rich-link-favicon svg{width:.9em;height:.9em}.ds1tv40 .rich-list-ol{list-style-type:decimal;padding-left:var(--rc-space-lg);margin-bottom:1em}.ds1tv40 .rich-list-ul{list-style-type:disc;padding-left:var(--rc-space-lg);margin-bottom:1em}.ds1tv40 .rich-list-item{margin-bottom:.25em}.ds1tv40 .rich-list-nested-item{list-style-type:none}.ds1tv40 .rich-list-nested-item .rich-list-ol{list-style-type:lower-alpha}.ds1tv40 .rich-list-nested-item .rich-list-ul{list-style-type:circle}.ds1tv40 .rich-checklist{list-style-type:none;padding-left:0}.ds1tv40 .rich-list-item.rich-list-item-checked,.ds1tv40 .rich-list-item.rich-list-item-unchecked{--rc-cb-size: 1.125rem;position:relative;padding-left:2em;list-style-type:none;outline:none;transition:color .25s ease}.ds1tv40 .rich-list-item.rich-list-item-unchecked:before,.ds1tv40 .rich-list-item.rich-list-item-checked:before{content:"";position:absolute;left:0;top:calc((1lh - var(--rc-cb-size)) / 2);width:var(--rc-cb-size);height:var(--rc-cb-size);border:1.5px solid var(--rc-text-quaternary);border-radius:var(--rc-radius-sm);box-sizing:border-box;cursor:pointer;background-color:transparent;transition:background-color .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1),transform .15s ease}[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-unchecked:hover:before{border-color:var(--rc-text-tertiary)}[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-unchecked:active:before,[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-checked:active:before{transform:scale(.94)}.ds1tv40 .rich-list-item.rich-list-item-unchecked:after,.ds1tv40 .rich-list-item.rich-list-item-checked:after{content:"";position:absolute;left:calc(var(--rc-cb-size) * .32);top:calc((1lh - var(--rc-cb-size)) / 2 + var(--rc-cb-size) * .14);width:calc(var(--rc-cb-size) * .28);height:calc(var(--rc-cb-size) * .55);border-right:2px solid var(--rc-accent);border-bottom:2px solid var(--rc-accent);box-sizing:border-box;display:block;pointer-events:none;transform:rotate(45deg) scale(0);transform-origin:center;opacity:0;transition:transform .3s cubic-bezier(.34,1.56,.64,1) .1s,opacity .15s ease}.ds1tv40 .rich-list-item.rich-list-item-checked:before{border-color:var(--rc-accent);background-color:var(--rc-accent-light)}[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-checked:hover:before{background-color:color-mix(in oklab,var(--rc-accent) 12%,transparent)}.ds1tv40 .rich-list-item.rich-list-item-checked:after{transform:rotate(45deg) scale(1);opacity:1}.ds1tv40 .rich-list-item-checked{color:var(--rc-text-secondary)}.ds1tv40 .rich-list-item.rich-list-item-checked>*,.ds1tv40 .rich-list-item.rich-list-item-unchecked>*{background-image:linear-gradient(var(--rc-text-secondary),var(--rc-text-secondary));background-size:0% 1.5px;background-position:left center;background-repeat:no-repeat;transition:background-size .35s cubic-bezier(.4,0,.2,1) .15s,opacity .15s ease}.ds1tv40 .rich-list-item.rich-list-item-checked>*{background-size:100% 1.5px;opacity:.5}.ds1tv40 .rich-quote{position:relative;background-color:var(--rc-quote-bg);margin:var(--rc-space-md) 0;padding:var(--rc-space-sm) var(--rc-space-md);padding-left:calc(var(--rc-space-md) + 4px);font-style:italic;color:var(--rc-text-secondary);border-radius:0 var(--rc-radius-sm) var(--rc-radius-sm) 0}.ds1tv40 .rich-quote:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:var(--rc-radius-sm);background-color:var(--rc-quote-border)}.ds1tv40 .rich-quote>.rich-paragraph:first-child{margin-top:0}.ds1tv40 .rich-quote>.rich-paragraph:last-child{margin-bottom:0}.ds1tv40 .rich-hr{border:none;border-top:1px solid var(--rc-hr-border);margin:var(--rc-space-lg) auto;width:60px}.ds1tv40 .rich-table-scrollable-wrapper{overflow-x:auto}.ds1tv40 .rich-table{width:100%;border-collapse:separate;border-spacing:0;margin:var(--rc-space-lg) 0;font-size:var(--rc-font-size-small);border:1px solid var(--rc-border);border-radius:var(--rc-radius-md);overflow:hidden}.ds1tv40 .rich-table-cell{border:none;border-bottom:1px solid var(--rc-border);border-right:1px solid var(--rc-border);padding:1.25em var(--rc-space-lg);text-align:left;vertical-align:middle;line-height:1.5}.ds1tv40 .rich-table-cell:last-child{border-right:none}.ds1tv40 .rich-table tbody tr:last-child .rich-table-cell{border-bottom:none}.ds1tv40 .rich-table-cell .rich-paragraph{margin:0;padding:0;line-height:inherit}.ds1tv40 .rich-table-cell>:first-child{margin-top:0}.ds1tv40 .rich-table-cell>:last-child{margin-bottom:0}.ds1tv40 .rich-table-cell-header{border:none;border-bottom:1px solid var(--rc-border);border-right:1px solid var(--rc-border);padding:var(--rc-space-md) var(--rc-space-lg);text-align:left;font-weight:600;font-size:.75em;text-transform:uppercase;letter-spacing:.05em;color:var(--rc-text-secondary);background-color:var(--rc-bg-secondary);vertical-align:middle;line-height:1.5;position:sticky;top:0;z-index:1}.ds1tv40 .rich-table-cell-header:last-child{border-right:none}.ds1tv40 .rich-table-cell-header .rich-paragraph{margin:0;padding:0;line-height:inherit}.ds1tv40 .rich-table-cell-header>:first-child{margin-top:0}.ds1tv40 .rich-table-cell-header>:last-child{margin-bottom:0}.ds1tv40 img{max-width:100%;height:auto;border-radius:var(--rc-radius-md)}.ds1tv40 .rich-spoiler{background-color:var(--rc-text);color:transparent;border-radius:var(--rc-radius-sm);padding-inline:4px;cursor:pointer;transition:background-color .3s ease,color .3s ease;user-select:none}[contenteditable=true] .rich-spoiler{background-color:color-mix(in srgb,var(--rc-text) 30%,transparent);color:inherit;user-select:auto;cursor:text}.ds1tv40 .rich-spoiler:hover,.ds1tv40 .rich-spoiler-revealed{background-color:transparent;color:inherit;user-select:auto}.ds1tv40 .rich-tag{display:inline-block;border-radius:999px;padding-inline:.75em;font-size:var(--rc-font-size-small);line-height:1.6;vertical-align:baseline}.ds1tv40 .rich-ruby{ruby-position:over;ruby-align:center}.ds1tv40 .rich-ruby-rt{font-size:.58em;line-height:1;color:var(--rc-text-secondary);user-select:none}[contenteditable=true] .rich-ruby[data-ruby]{position:relative;display:inline-block;padding-top:.72em;line-height:1.2}[contenteditable=true] .rich-ruby[data-ruby]:before{content:attr(data-ruby);position:absolute;left:0;right:0;top:0;transform:translateY(-.68em);font-size:.58em;line-height:1;text-align:center;color:var(--rc-text-secondary);pointer-events:none;white-space:nowrap}.ds1tv40 .rich-footnote{vertical-align:super;font-size:.8em}.ds1tv40 .rich-footnote-ref{display:inline-flex;align-items:center;justify-content:center;min-width:1.5em;text-decoration:none;color:var(--rc-accent);background-color:var(--rc-accent-light);border-radius:999px;padding:0 .35em;line-height:1.45;font-weight:600;font-size:.82em;transition:filter .15s ease}.ds1tv40 .rich-footnote-ref:hover{filter:brightness(.96)}.ds1tv40 .rich-footnote-highlight{animation:ds1tv42 1.2s ease-out}.ds1tv40 .rich-footnote-ref-wrapper{position:relative;display:inline}.ds1tv40 .rich-footnote-section{margin-top:var(--rc-space-lg)}.ds1tv40 .rich-footnote-section-divider{border:none;border-top:1px solid var(--rc-border);margin:var(--rc-space-lg) 0 var(--rc-space-md)}.ds1tv40 .rich-footnote-section-list{list-style-type:decimal;padding-left:var(--rc-space-lg);font-size:var(--rc-font-size-small);color:var(--rc-text-secondary);line-height:1.6}.ds1tv40 .rich-footnote-section-item{margin-bottom:var(--rc-space-sm);padding-left:var(--rc-space-xs)}.ds1tv40 .rich-footnote-back-ref{display:inline-flex;align-items:center;margin-left:var(--rc-space-xs);color:var(--rc-accent);text-decoration:none;font-size:.85em;transition:opacity .15s ease;font-family:var(--rc-font-mono)}.ds1tv40 .rich-footnote-back-ref:hover{opacity:.7}.ds1tv40 .rich-footnote-section-item-edit{display:flex;align-items:center;gap:var(--rc-space-sm);list-style-type:none}.ds1tv40 .rich-footnote-section-item-num{flex-shrink:0;color:var(--rc-text-secondary);font-size:var(--rc-font-size-small);font-weight:600;min-width:1.5em}.ds1tv40 .rich-footnote-section-item-input{flex:1;border:1px solid var(--rc-border);border-radius:var(--rc-radius-sm);padding:var(--rc-space-xs) var(--rc-space-sm);font-size:var(--rc-font-size-small);color:var(--rc-text);background-color:transparent;outline:none;transition:border-color .15s ease}.ds1tv40 .rich-footnote-section-item-input:focus{border-color:var(--rc-accent)}.ds1tv40 .rich-footnote-section-item-remove{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:none;color:var(--rc-text-secondary);cursor:pointer;border-radius:var(--rc-radius-sm);font-size:14px;transition:color .15s ease,background-color .15s ease}.ds1tv40 .rich-footnote-section-item-remove:hover{color:#ef4444;background-color:#ef44441a}.rich-drag-handle{position:absolute;display:flex;align-items:center;justify-content:center;width:20px;height:20px;cursor:grab;border-radius:var(--rc-radius-sm);color:var(--rc-text-secondary);opacity:.4;transition:opacity .15s ease,background-color .15s ease;z-index:10}.rich-drag-handle:hover{opacity:1;background-color:var(--rc-fill-secondary)}.rich-drag-handle:active{cursor:grabbing}.rich-drop-indicator{position:absolute;height:2px;background-color:var(--rc-accent);border-radius:1px;pointer-events:none;z-index:10}.ds1tv40 .rich-alert{margin:2em 0;padding:0 1em;background-color:transparent;border:none;border-radius:0}.ds1tv40>*:first-child,.ds1tv40 .rich-editor__content>*:first-child{margin-top:0}.ds1tv40>*:last-child,.ds1tv40 .rich-editor__content>*:last-child{margin-bottom:0}@supports (animation-timeline: view()){.ds1tv40 .rich-text-highlight{--rc-hl-highlighted: 0;animation:ds1tv41 steps(1) both;animation-timeline:view();animation-range:entry 100% cover 10%}}._1pke0ca0{max-width:var(--rc-max-width);font-size:var(--rc-font-size-base);line-height:1.75;color:var(--rc-text)}._1pke0ca0 .rich-paragraph{margin-top:1.5em;margin-bottom:1.5em}._1pke0ca0 .rich-heading-h1{color:var(--rc-text);font-weight:800;font-size:3em;margin-top:0;margin-bottom:.8333333333333334em;line-height:1}._1pke0ca0 .rich-heading-h2{color:var(--rc-text);font-weight:700;font-size:1.875em;margin-top:1.8666666666666667em;margin-bottom:1.0666666666666667em;line-height:1.3333333}._1pke0ca0 .rich-heading-h3{color:var(--rc-text);font-weight:600;font-size:1.5em;margin-top:1.6666666666666667em;margin-bottom:.6666666666666666em;line-height:1.5}._1pke0ca0 .rich-heading-h4{color:var(--rc-text);font-weight:600;margin-top:2em;margin-bottom:.5em;line-height:1.5625}._1pke0ca0 .rich-heading-h2+*,._1pke0ca0 .rich-heading-h3+*,._1pke0ca0 .rich-heading-h4+*{margin-top:0}._1pke0ca0 .rich-quote{font-weight:500;font-style:italic;color:var(--rc-text);margin-top:2.5em;margin-bottom:2.5em;padding-left:calc(1.5em + 4px);background-color:transparent;border-radius:0;quotes:"“""”""‘""’"}._1pke0ca0 .rich-quote .rich-paragraph:first-of-type:before{content:open-quote}._1pke0ca0 .rich-quote .rich-paragraph:last-of-type:after{content:close-quote}._1pke0ca0 .rich-quote .rich-paragraph:first-child{margin-top:0}._1pke0ca0 .rich-quote .rich-paragraph:last-child{margin-bottom:0}._1pke0ca0 .rich-text-code{color:var(--rc-text);font-weight:600;font-size:.875em;background-color:var(--rc-code-bg);padding:.2em .4em;border-radius:var(--rc-radius-sm);font-family:var(--rc-font-mono)}._1pke0ca0 .rich-text-code:before,._1pke0ca0 .rich-text-code:after{content:"`";color:var(--rc-text-secondary);opacity:.5}._1pke0ca0 [contenteditable=true] .rich-text-code:before,._1pke0ca0 [contenteditable=true] .rich-text-code:after{content:""}._1pke0ca0 .rich-code-block{color:var(--rc-text);background-color:var(--rc-code-bg);border-radius:.375rem;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.75}._1pke0ca0 .rich-code-block pre{padding:1em 1.5em;margin:0}._1pke0ca0 .rich-list-ul,._1pke0ca0 .rich-list-ol{margin-top:1.5em;margin-bottom:1.5em;padding-left:1.75em}._1pke0ca0 .rich-list-item{margin-top:.75em;margin-bottom:.75em;padding-left:.5em}._1pke0ca0 .rich-list-item .rich-paragraph{margin-top:1em;margin-bottom:1em}._1pke0ca0 .rich-list-item>.rich-paragraph:first-child{margin-top:1.5em}._1pke0ca0 .rich-list-item>.rich-paragraph:last-child{margin-bottom:1.5em}._1pke0ca0 .rich-list-ul .rich-list-ul,._1pke0ca0 .rich-list-ul .rich-list-ol,._1pke0ca0 .rich-list-ol .rich-list-ul,._1pke0ca0 .rich-list-ol .rich-list-ol{margin-top:1em;margin-bottom:1em}._1pke0ca0 .rich-table{margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.5}._1pke0ca0 .rich-table .rich-paragraph{margin:0;padding:0;line-height:inherit}._1pke0ca0 .rich-image{margin-top:2em;margin-bottom:2em}._1pke0ca0 .rich-image>*{margin-top:0;margin-bottom:0}._1pke0ca0 .rich-image figcaption{color:var(--rc-text-secondary);font-size:.875em;line-height:1.5;margin-top:1em}._1pke0ca0 .rich-hr{border-color:var(--rc-hr-border);border-top-width:1px;width:60px;margin:3.5em auto}._1pke0ca0 .rich-hr+*{margin-top:0}._1pke0ca0 .rich-link{font-weight:500;text-decoration:underline}._1pke0ca0 .rich-banner,._1pke0ca0 .rich-code-snippet,._1pke0ca0 .rich-details{margin:2em 0}._1pke0ca0>*:first-child{margin-top:0}._1pke0ca0>*:last-child{margin-bottom:0}._1iyoz3l0{font-size:var(--rc-font-size-base);line-height:var(--rc-line-height)}._1iyoz3l0 .rich-paragraph{margin-bottom:.6em}._1iyoz3l0 .rich-heading-h1{font-size:1.35em;font-weight:700;margin-top:.8em;margin-bottom:.3em}._1iyoz3l0 .rich-heading-h2{font-size:1.2em;font-weight:700;margin-top:.7em;margin-bottom:.25em}._1iyoz3l0 .rich-heading-h3{font-size:1.1em;font-weight:600;margin-top:.6em;margin-bottom:.2em}._1iyoz3l0 .rich-heading-h4{font-size:1em;font-weight:600;margin-top:.5em;margin-bottom:.15em}._1iyoz3l0 .rich-heading-h5{font-size:.9em;font-weight:600;margin-top:.45em;margin-bottom:.1em}._1iyoz3l0 .rich-heading-h6{font-size:.85em;font-weight:600;margin-top:.4em;margin-bottom:.1em}._1iyoz3l0 .rich-quote{padding:var(--rc-space-sm) var(--rc-space-md);padding-left:calc(var(--rc-space-md) + 3px);margin:var(--rc-space-sm) 0;font-size:.95em}._1iyoz3l0 .rich-quote:before{width:3px}._1iyoz3l0 .rich-list-ol,._1iyoz3l0 .rich-list-ul{margin-bottom:.6em;padding-left:var(--rc-space-md)}._1iyoz3l0 .rich-list-item{margin-bottom:.1em}._1iyoz3l0 .rich-code-block{margin:var(--rc-space-sm) 0;border-radius:var(--rc-radius-sm);font-size:var(--rc-font-size-small)}._1iyoz3l0 .rich-code-block pre{padding:var(--rc-space-sm)}._1iyoz3l0 .line:before{display:none!important}._1iyoz3l0 .rich-table{margin:var(--rc-space-sm) 0;font-size:var(--rc-font-size-small)}._1iyoz3l0 .rich-table-cell,._1iyoz3l0 .rich-table-cell-header{padding:var(--rc-space-xs) var(--rc-space-sm)}._1iyoz3l0 .rich-image{margin:var(--rc-space-sm) 0}._1iyoz3l0 .rich-image figcaption{font-size:var(--rc-font-size-small)}._1iyoz3l0 .rich-hr{border:none;border-top:1px solid var(--rc-hr-border);margin:var(--rc-space-lg) auto;width:60px}._1iyoz3l0 .rich-alert{padding:var(--rc-space-sm) var(--rc-space-md);padding-left:var(--rc-space-lg);margin:var(--rc-space-sm) 0}._1iyoz3l0 .rich-katex-block{padding:var(--rc-space-sm) 0;margin:var(--rc-space-sm) 0}.g7jfj60{max-width:var(--rc-max-width);font-size:var(--rc-font-size-base);line-height:1.8;color:var(--rc-text)}.g7jfj60>.rich-paragraph,.g7jfj60 .rich-editor__content>.rich-paragraph,.g7jfj60 .rich-content__body>.rich-paragraph{margin-top:1.25em;margin-bottom:1.25em;line-height:1.8}.g7jfj60>.rich-paragraph:first-of-type,.g7jfj60 .rich-editor__content>.rich-paragraph:first-of-type,.g7jfj60 .rich-content__body>.rich-paragraph:first-of-type{margin-top:0;margin-bottom:2rem}.g7jfj60>.rich-paragraph:not(:first-of-type)>[data-lexical-text]:first-child,.g7jfj60 .rich-editor__content>.rich-paragraph:not(:first-of-type)>[data-lexical-text]:first-child,.g7jfj60 .rich-content__body>.rich-paragraph:not(:first-of-type)>[data-lexical-text]:first-child{margin-inline-start:2rem}.g7jfj60>.rich-paragraph:first-of-type:first-letter,.g7jfj60 .rich-content__body>.rich-paragraph:first-of-type:first-letter{float:left;font-size:2.4em;margin-right:.2em;line-height:1}.g7jfj60 .rich-editor__content>.rich-paragraph:first-of-type:first-letter{font-size:1.5em;font-weight:700;color:var(--rc-accent)}.g7jfj60>.rich-paragraph:last-child,.g7jfj60 .rich-editor__content>.rich-paragraph:last-child,.g7jfj60 .rich-content__body>.rich-paragraph:last-child{margin-bottom:0}.g7jfj60 .rich-text-bold{font-family:var(--rc-font-family);font-weight:600;color:var(--rc-text)}.g7jfj60 .rich-heading-h1{font-size:2.25em;font-weight:800;line-height:1.1111111;margin-top:0;margin-bottom:.8888889em;letter-spacing:-.025em;color:var(--rc-text)}.g7jfj60 .rich-heading-h2{font-size:1.5em;font-weight:700;line-height:1.3333333;margin-top:2em;margin-bottom:1em;letter-spacing:-.025em;color:var(--rc-text)}.g7jfj60 .rich-heading-h2+*{margin-top:0}.g7jfj60 .rich-heading-h3{font-size:1.25em;font-weight:600;line-height:1.6;margin-top:1.6em;margin-bottom:.6em;letter-spacing:-.025em;color:var(--rc-text)}.g7jfj60 .rich-heading-h3+*{margin-top:0}.g7jfj60 .rich-heading-h4{font-size:1.125em;font-weight:600;line-height:1.5;margin-top:1.5em;margin-bottom:.5em;color:var(--rc-text)}.g7jfj60 .rich-heading-h4+*{margin-top:0}.g7jfj60 .rich-heading-h5{font-size:1em;font-weight:600;line-height:1.5;margin-top:1.5em;margin-bottom:.5em;color:var(--rc-text)}.g7jfj60 .rich-heading-h5+*{margin-top:0}.g7jfj60 .rich-heading-h6{font-size:.875em;font-weight:600;line-height:1.5;margin-top:1.5em;margin-bottom:.5em;color:var(--rc-text);text-transform:uppercase}.g7jfj60 .rich-heading-h6+*{margin-top:0}.g7jfj60 .rich-quote{font-style:normal;line-height:1.8;color:inherit;background-color:color-mix(in srgb,var(--rc-accent) 10%,transparent);margin-top:1.6em;margin-bottom:1.6em;margin-left:-1rem;margin-right:-1rem;padding:1em 2em;border-radius:0}.g7jfj60 .rich-quote:before{display:none}.g7jfj60 .rich-quote .rich-paragraph:first-child:first-letter{float:none;font-size:inherit;margin-right:0}.g7jfj60 .rich-link{font-weight:500;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;transition:color .15s ease}.g7jfj60 .rich-link:hover{text-decoration-thickness:2px}.g7jfj60 .rich-text-code{font-size:.875em;font-family:var(--rc-font-mono);font-weight:500;padding:.2em .4em;border-radius:var(--rc-radius-sm);background-color:var(--rc-code-bg)}.g7jfj60 .rich-list-ol,.g7jfj60 .rich-list-ul{margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.g7jfj60 .rich-list-ol{list-style-type:decimal}.g7jfj60 .rich-list-ul{list-style-type:disc}.g7jfj60 .rich-list-item{margin-top:.5em;margin-bottom:.5em;padding-left:.375em}.g7jfj60 .rich-list-item::marker{color:var(--rc-text-secondary)}.g7jfj60 .rich-code-block{font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:var(--rc-radius-md);overflow-x:auto}.g7jfj60 .rich-code-block pre{padding:.8571429em 1.1428571em;margin:0}.g7jfj60 .rich-table{margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.g7jfj60 .rich-table .rich-paragraph{margin:0;padding:0;line-height:inherit}.g7jfj60 .rich-table .rich-paragraph:first-child:first-letter{float:none;font-size:inherit;margin-right:0}.g7jfj60 .rich-image{margin-top:2em;margin-bottom:2em}.g7jfj60 .rich-image img{border-radius:var(--rc-radius-md)}.g7jfj60 .rich-image figcaption{font-size:.875em;line-height:1.4285714;margin-top:.8571429em;color:var(--rc-text-secondary);text-align:center}.g7jfj60 .rich-hr{border:none;border-top:1px solid var(--rc-hr-border);opacity:.2;margin-top:.5rem;margin-bottom:.5rem;width:60px;margin-left:auto;margin-right:auto}.g7jfj60 .rich-katex-block{margin-top:1.6em;margin-bottom:1.6em;overflow-x:auto;padding:1em 0}.g7jfj60 .rich-spoiler{border-radius:var(--rc-radius-sm);padding-inline:.25em}.g7jfj60>*:first-child{margin-top:0}.g7jfj60>*:last-child{margin-bottom:0}._1an6v8d0{position:relative;display:block;cursor:pointer;margin:var(--rc-space-md) 0;border-radius:var(--rc-radius-md);border:1px solid var(--rc-border);overflow:clip}._1an6v8d1{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000059;color:#fff;opacity:0;pointer-events:none;transition:opacity .2s,background .2s}._1an6v8d0:hover ._1an6v8d1{opacity:1;background:#00000080}._1an6v8d2{padding-block:var(--rc-space-md);padding-inline:var(--rc-space-xl);max-height:300px;overflow:clip}._1an6v8d3._1an6v8d3{padding:0;gap:0;width:900px;max-width:90vw;max-height:min(900px,calc(100vh - 1rem));overflow:hidden}._1an6v8d4{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:min(800px,calc(100vh - 1rem));background:var(--rc-bg)}._1an6v8d5{display:flex;align-items:center;justify-content:space-between;padding:0 .5rem 0 1rem;height:48px;border-bottom:1px solid var(--rc-border);flex-shrink:0}._1an6v8d6{display:flex;align-items:center;gap:.5rem}._1an6v8d7{display:flex;align-items:center;gap:.5rem;margin:0;font-size:var(--rc-font-size-md);font-weight:500;color:var(--rc-text)}._1an6v8d8{display:flex;align-items:center;gap:4px}._1an6v8d9{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:.25rem;border:none;background:none;cursor:pointer;color:var(--rc-text-secondary);transition:color .15s}._1an6v8d9:hover{color:var(--rc-text)}._1an6v8da{padding:0 .75rem .5rem;border-bottom:1px solid var(--rc-border);background:var(--rc-bg)}._1an6v8db{margin:0;max-width:none;border-radius:0;position:sticky;top:0}._1an6v8db{border:none;box-shadow:none;background-color:transparent;backdrop-filter:none}._1an6v8db>div{padding-inline:0}._1an6v8dc{min-height:0;overflow:hidden;background:linear-gradient(180deg,color-mix(in srgb,var(--rc-text) 2%,transparent),transparent)}._1an6v8dc .rich-editor{display:flex;flex-direction:column;height:100%}._1an6v8dc .rich-editor__content-wrapper{max-width:75ch;overflow-y:auto}._1an6v8dc .rich-editor__content{padding-left:1.5rem;padding-right:1.5rem}._1an6v8dc .rich-editor__placeholder{left:1.5rem}._1an6v8dc .ds1tv40>*:first-child{border-top:none;border-left:none;border-right:none;box-shadow:none;border-radius:0;margin:0;max-width:none;backdrop-filter:none;background-color:transparent}._1an6v8dd{height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable both-edges}._1an6v8de{display:flex;min-height:100%;background:var(--rc-bg);overflow:hidden}._1an6v8df{flex:1;min-height:460px;padding:1.25rem 1.5rem 1.75rem;outline:none;overflow:visible}._1an6v8dg{display:flex;align-items:center;justify-content:flex-end;padding:.5rem .75rem;border-top:1px solid var(--rc-border)}._1an6v8dh{position:relative;display:block;cursor:pointer;margin:var(--rc-space-md) 0;border-radius:var(--rc-radius-md);border:1px solid var(--rc-border);overflow:clip}._1an6v8di{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000040;color:#fff;opacity:0;pointer-events:none;transition:opacity .2s;z-index:1}._1an6v8dh:hover ._1an6v8di{opacity:1}._1an6v8dj{position:absolute;bottom:0;left:0;right:0;height:4rem;background:linear-gradient(to bottom,transparent,var(--rc-bg));pointer-events:none}._1an6v8dk._1an6v8dk{display:flex;flex-direction:column;width:700px;max-width:90vw;height:min(800px,calc(100vh - 2rem));max-height:min(800px,calc(100vh - 2rem));overflow:hidden}._1an6v8dl{flex:1;min-height:0;padding:0 1.5rem 1.5rem;overflow-y:auto;overflow-x:hidden}._1an6v8dm{pointer-events:none}._1an6v8dn{margin:0;color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);opacity:.72}._1an6v8df .rich-paragraph:first-child,._1an6v8dm .rich-paragraph:first-child{margin-top:0}._1an6v8dm .rich-paragraph:last-child{margin-bottom:0}
|
|
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}._1kl9cd60{--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}._1kl9cd61{--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}._1kl9cd62{--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 ._1kl9cd60,[data-theme=dark] ._1kl9cd60,.dark._1kl9cd60,[data-theme=dark]._1kl9cd60,.dark ._1kl9cd61,[data-theme=dark] ._1kl9cd61,.dark._1kl9cd61,[data-theme=dark]._1kl9cd61,.dark ._1kl9cd62,[data-theme=dark] ._1kl9cd62,.dark._1kl9cd62,[data-theme=dark]._1kl9cd62{--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}@keyframes ds1tv41{to{--rc-hl-highlighted:1}}@keyframes ds1tv42{0%{background-color:#ef44443d}to{background-color:#0000}}.ds1tv40{font-family:var(--rc-font-family);font-size:var(--rc-font-size-base);line-height:var(--rc-line-height);color:var(--rc-text);word-wrap:break-word;overflow-wrap:break-word}.ds1tv40 .rich-paragraph{line-height:var(--rc-line-height);margin:0 0 1em}.ds1tv40 .rich-text-bold{font-weight:700}.ds1tv40 .rich-text-italic{font-style:italic}.ds1tv40 .rich-text-underline{text-decoration:underline}.ds1tv40 .rich-text-strikethrough{opacity:.65;text-decoration:line-through}.ds1tv40 .rich-text-superscript{vertical-align:super;font-size:.8em}.ds1tv40 .rich-text-subscript{vertical-align:sub;font-size:.8em}.ds1tv40 .rich-text-code{font-family:var(--rc-font-mono);background-color:var(--rc-code-bg);color:var(--rc-code-text);border-radius:var(--rc-radius-sm);border:1px solid var(--rc-border);padding:2px 6px;font-size:.9em}[contenteditable=true] .rich-text-code{padding-right:0}.ds1tv40 mark{background:0 0}.ds1tv40 .rich-text-highlight{--rc-hl-lightness:.3;--rc-hl-highlighted:1;--rc-hl-color:oklch(from var(--rc-accent) l c h / var(--rc-hl-lightness));background:linear-gradient(120deg, var(--rc-hl-color,lightblue) 50%, transparent 50%) 110% 0 / 200% 100% no-repeat;background-position:calc((1 - var(--rc-hl-highlighted)) * 110%) 0;color:var(--rc-text);transition:background-position 1s}[contenteditable=true] .rich-text-highlight{--rc-hl-highlighted:1;animation:none}[data-theme=dark] .ds1tv40 .rich-text-highlight{--rc-hl-lightness:.35}.ds1tv40 :-webkit-any(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6){position:relative}.ds1tv40 :is(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6){position:relative}.ds1tv40 .rich-heading-anchor{color:var(--rc-text-secondary);opacity:0;align-items:center;font-size:.8rem;text-decoration:none;transition:opacity .15s;display:flex;position:absolute;top:0;bottom:0;left:-1.25rem}.ds1tv40 .rich-heading-anchor svg{flex-shrink:0}.ds1tv40 :-webkit-any(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6):hover .rich-heading-anchor{opacity:.5}.ds1tv40 :is(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6):hover .rich-heading-anchor{opacity:.5}.ds1tv40 :-webkit-any(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6):hover .rich-heading-anchor:hover{opacity:1}.ds1tv40 :is(.rich-heading-h1,.rich-heading-h2,.rich-heading-h3,.rich-heading-h4,.rich-heading-h5,.rich-heading-h6):hover .rich-heading-anchor:hover{opacity:1}[contenteditable=true] .rich-heading-h1:before,[contenteditable=true] .rich-heading-h2:before,[contenteditable=true] .rich-heading-h3:before,[contenteditable=true] .rich-heading-h4:before,[contenteditable=true] .rich-heading-h5:before,[contenteditable=true] .rich-heading-h6:before{color:var(--rc-text-secondary);opacity:.6;pointer-events:none;font-size:.5rem;font-weight:600;font-family:var(--rc-font-mono);display:flex;position:absolute;bottom:.5rem;left:-1.5rem}[contenteditable=true] .rich-heading-h1:before{content:"H1"}[contenteditable=true] .rich-heading-h2:before{content:"H2"}[contenteditable=true] .rich-heading-h3:before{content:"H3"}[contenteditable=true] .rich-heading-h4:before{content:"H4"}[contenteditable=true] .rich-heading-h5:before{content:"H5"}[contenteditable=true] .rich-heading-h6:before{content:"H6"}.ds1tv40 .rich-heading-h1{font-size:2em;font-weight:700;line-height:var(--rc-line-height-tight);margin-top:1.5em;margin-bottom:.5em}.ds1tv40 .rich-heading-h2{font-size:1.5em;font-weight:700;line-height:var(--rc-line-height-tight);margin-top:1.4em;margin-bottom:.45em}.ds1tv40 .rich-heading-h3{font-size:1.25em;font-weight:600;line-height:var(--rc-line-height-tight);margin-top:1.3em;margin-bottom:.4em}.ds1tv40 .rich-heading-h4{font-size:1.125em;font-weight:600;line-height:var(--rc-line-height-tight);margin-top:1.2em;margin-bottom:.35em}.ds1tv40 .rich-heading-h5{font-size:1em;font-weight:600;line-height:var(--rc-line-height-tight);margin-top:1.1em;margin-bottom:.3em}.ds1tv40 .rich-heading-h6{font-size:.875em;font-weight:600;line-height:var(--rc-line-height-tight);color:var(--rc-text);margin-top:1em;margin-bottom:.25em}.ds1tv40 .rich-link{color:var(--rc-link);text-decoration:none;transition:color .2s}.ds1tv40 .rich-link:hover{text-decoration:underline}.ds1tv40 .rich-link[data-favicon=loaded]:before{content:"";vertical-align:-.125em;background-image:var(--rc-link-favicon);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:2px;width:1em;height:1em;margin-right:.2em;display:inline-block}.ds1tv40 .rich-link-favicon{vertical-align:-.125em;align-items:center;margin-right:.15em;display:inline-flex}.ds1tv40 .rich-link-favicon img{object-fit:contain;border-radius:2px;width:1em;height:1em}.ds1tv40 .rich-link-favicon svg{width:.9em;height:.9em}.ds1tv40 .rich-list-ol{padding-left:var(--rc-space-lg);margin-bottom:1em;list-style-type:decimal}.ds1tv40 .rich-list-ul{padding-left:var(--rc-space-lg);margin-bottom:1em;list-style-type:disc}.ds1tv40 .rich-list-item{margin-bottom:.25em}.ds1tv40 .rich-list-nested-item{list-style-type:none}.ds1tv40 .rich-list-nested-item .rich-list-ol{list-style-type:lower-alpha}.ds1tv40 .rich-list-nested-item .rich-list-ul{list-style-type:circle}.ds1tv40 .rich-checklist{padding-left:0;list-style-type:none}.ds1tv40 .rich-list-item.rich-list-item-checked,.ds1tv40 .rich-list-item.rich-list-item-unchecked{--rc-cb-size:1.125rem;outline:none;padding-left:2em;list-style-type:none;transition:color .25s;position:relative}.ds1tv40 .rich-list-item.rich-list-item-unchecked:before,.ds1tv40 .rich-list-item.rich-list-item-checked:before{content:"";left:0;top:calc((1lh - var(--rc-cb-size)) / 2);width:var(--rc-cb-size);height:var(--rc-cb-size);border:1.5px solid var(--rc-text-quaternary);border-radius:var(--rc-radius-sm);box-sizing:border-box;cursor:pointer;background-color:#0000;transition:background-color .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1),transform .15s;position:absolute}[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-unchecked:hover:before{border-color:var(--rc-text-tertiary)}[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-unchecked:active:before,[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-checked:active:before{transform:scale(.94)}.ds1tv40 .rich-list-item.rich-list-item-unchecked:after,.ds1tv40 .rich-list-item.rich-list-item-checked:after{content:"";left:calc(var(--rc-cb-size) * .32);top:calc((1lh - var(--rc-cb-size)) / 2 + var(--rc-cb-size) * .14);width:calc(var(--rc-cb-size) * .28);height:calc(var(--rc-cb-size) * .55);border-right:2px solid var(--rc-accent);border-bottom:2px solid var(--rc-accent);box-sizing:border-box;pointer-events:none;transform-origin:50%;opacity:0;transition:transform .3s cubic-bezier(.34,1.56,.64,1) .1s,opacity .15s;display:block;position:absolute;transform:rotate(45deg)scale(0)}.ds1tv40 .rich-list-item.rich-list-item-checked:before{border-color:var(--rc-accent);background-color:var(--rc-accent-light)}[contenteditable=true] .ds1tv40 .rich-list-item.rich-list-item-checked:hover:before{background-color:color-mix(in oklab, var(--rc-accent) 12%, transparent)}.ds1tv40 .rich-list-item.rich-list-item-checked:after{opacity:1;transform:rotate(45deg)scale(1)}.ds1tv40 .rich-list-item-checked{color:var(--rc-text-secondary)}.ds1tv40 .rich-list-item.rich-list-item-checked>*,.ds1tv40 .rich-list-item.rich-list-item-unchecked>*{background-image:linear-gradient(var(--rc-text-secondary), var(--rc-text-secondary));background-position:0;background-repeat:no-repeat;background-size:0% 1.5px;transition:background-size .35s cubic-bezier(.4,0,.2,1) .15s,opacity .15s}.ds1tv40 .rich-list-item.rich-list-item-checked>*{opacity:.5;background-size:100% 1.5px}.ds1tv40 .rich-quote{background-color:var(--rc-quote-bg);margin:var(--rc-space-md) 0;padding:var(--rc-space-sm) var(--rc-space-md);padding-left:calc(var(--rc-space-md) + 4px);color:var(--rc-text-secondary);border-radius:0 var(--rc-radius-sm) var(--rc-radius-sm) 0;font-style:italic;position:relative}.ds1tv40 .rich-quote:before{content:"";border-radius:var(--rc-radius-sm);background-color:var(--rc-quote-border);width:4px;position:absolute;top:0;bottom:0;left:0}.ds1tv40 .rich-quote>.rich-paragraph:first-child{margin-top:0}.ds1tv40 .rich-quote>.rich-paragraph:last-child{margin-bottom:0}.ds1tv40 .rich-hr{border:none;border-top:1px solid var(--rc-hr-border);margin:var(--rc-space-lg) auto;width:60px}.ds1tv40 .rich-table-scrollable-wrapper{overflow-x:auto}.ds1tv40 .rich-table{border-collapse:separate;border-spacing:0;width:100%;margin:var(--rc-space-lg) 0;font-size:var(--rc-font-size-small);border:1px solid var(--rc-border);border-radius:var(--rc-radius-md);overflow:hidden}.ds1tv40 .rich-table-cell{border:none;border-bottom:1px solid var(--rc-border);border-right:1px solid var(--rc-border);padding:1.25em var(--rc-space-lg);text-align:left;vertical-align:middle;line-height:1.5}.ds1tv40 .rich-table-cell:last-child{border-right:none}.ds1tv40 .rich-table tbody tr:last-child .rich-table-cell{border-bottom:none}.ds1tv40 .rich-table-cell .rich-paragraph{line-height:inherit;margin:0;padding:0}.ds1tv40 .rich-table-cell>:first-child{margin-top:0}.ds1tv40 .rich-table-cell>:last-child{margin-bottom:0}.ds1tv40 .rich-table-cell-header{border:none;border-bottom:1px solid var(--rc-border);border-right:1px solid var(--rc-border);padding:var(--rc-space-md) var(--rc-space-lg);text-align:left;text-transform:uppercase;letter-spacing:.05em;color:var(--rc-text-secondary);background-color:var(--rc-bg-secondary);vertical-align:middle;z-index:1;font-size:.75em;font-weight:600;line-height:1.5;position:sticky;top:0}.ds1tv40 .rich-table-cell-header:last-child{border-right:none}.ds1tv40 .rich-table-cell-header .rich-paragraph{line-height:inherit;margin:0;padding:0}.ds1tv40 .rich-table-cell-header>:first-child{margin-top:0}.ds1tv40 .rich-table-cell-header>:last-child{margin-bottom:0}.ds1tv40 img{border-radius:var(--rc-radius-md);max-width:100%;height:auto}.ds1tv40 .rich-spoiler{background-color:var(--rc-text);color:#0000;border-radius:var(--rc-radius-sm);cursor:pointer;-webkit-user-select:none;user-select:none;padding-inline-start:4px;padding-inline-end:4px;transition:background-color .3s,color .3s}[contenteditable=true] .rich-spoiler{background-color:color-mix(in srgb, var(--rc-text) 30%, transparent);color:inherit;-webkit-user-select:auto;user-select:auto;cursor:text}.ds1tv40 .rich-spoiler:hover,.ds1tv40 .rich-spoiler-revealed{color:inherit;-webkit-user-select:auto;user-select:auto;background-color:#0000}.ds1tv40 .rich-tag{font-size:var(--rc-font-size-small);vertical-align:baseline;border-radius:999px;padding-inline-start:.75em;padding-inline-end:.75em;line-height:1.6;display:inline-block}.ds1tv40 .rich-ruby{ruby-position:over;ruby-align:center}.ds1tv40 .rich-ruby-rt{color:var(--rc-text-secondary);-webkit-user-select:none;user-select:none;font-size:.58em;line-height:1}[contenteditable=true] .rich-ruby[data-ruby]{padding-top:.72em;line-height:1.2;display:inline-block;position:relative}[contenteditable=true] .rich-ruby[data-ruby]:before{content:attr(data-ruby);text-align:center;color:var(--rc-text-secondary);pointer-events:none;white-space:nowrap;font-size:.58em;line-height:1;position:absolute;top:0;left:0;right:0;transform:translateY(-.68em)}.ds1tv40 .rich-footnote{vertical-align:super;font-size:.8em}.ds1tv40 .rich-footnote-ref{min-width:1.5em;color:var(--rc-accent);background-color:var(--rc-accent-light);border-radius:999px;justify-content:center;align-items:center;padding:0 .35em;font-size:.82em;font-weight:600;line-height:1.45;text-decoration:none;transition:filter .15s;display:inline-flex}.ds1tv40 .rich-footnote-ref:hover{filter:brightness(.96)}.ds1tv40 .rich-footnote-highlight{animation:1.2s ease-out ds1tv42}.ds1tv40 .rich-footnote-ref-wrapper{display:inline;position:relative}.ds1tv40 .rich-footnote-section{margin-top:var(--rc-space-lg)}.ds1tv40 .rich-footnote-section-divider{border:none;border-top:1px solid var(--rc-border);margin:var(--rc-space-lg) 0 var(--rc-space-md)}.ds1tv40 .rich-footnote-section-list{padding-left:var(--rc-space-lg);font-size:var(--rc-font-size-small);color:var(--rc-text-secondary);line-height:1.6;list-style-type:decimal}.ds1tv40 .rich-footnote-section-item{margin-bottom:var(--rc-space-sm);padding-left:var(--rc-space-xs)}.ds1tv40 .rich-footnote-back-ref{margin-left:var(--rc-space-xs);color:var(--rc-accent);font-size:.85em;font-family:var(--rc-font-mono);align-items:center;text-decoration:none;transition:opacity .15s;display:inline-flex}.ds1tv40 .rich-footnote-back-ref:hover{opacity:.7}.ds1tv40 .rich-footnote-section-item-edit{align-items:center;gap:var(--rc-space-sm);list-style-type:none;display:flex}.ds1tv40 .rich-footnote-section-item-num{color:var(--rc-text-secondary);font-size:var(--rc-font-size-small);flex-shrink:0;min-width:1.5em;font-weight:600}.ds1tv40 .rich-footnote-section-item-input{border:1px solid var(--rc-border);border-radius:var(--rc-radius-sm);padding:var(--rc-space-xs) var(--rc-space-sm);font-size:var(--rc-font-size-small);color:var(--rc-text);background-color:#0000;outline:none;flex:1;transition:border-color .15s}.ds1tv40 .rich-footnote-section-item-input:focus{border-color:var(--rc-accent)}.ds1tv40 .rich-footnote-section-item-remove{width:20px;height:20px;color:var(--rc-text-secondary);cursor:pointer;border-radius:var(--rc-radius-sm);background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;font-size:14px;transition:color .15s,background-color .15s;display:inline-flex}.ds1tv40 .rich-footnote-section-item-remove:hover{color:#ef4444;background-color:#ef44441a}.rich-drag-handle{cursor:grab;border-radius:var(--rc-radius-sm);width:20px;height:20px;color:var(--rc-text-secondary);opacity:.4;z-index:10;justify-content:center;align-items:center;transition:opacity .15s,background-color .15s;display:flex;position:absolute}.rich-drag-handle:hover{opacity:1;background-color:var(--rc-fill-secondary)}.rich-drag-handle:active{cursor:grabbing}.rich-drop-indicator{background-color:var(--rc-accent);pointer-events:none;z-index:10;border-radius:1px;height:2px;position:absolute}.ds1tv40 .rich-alert{background-color:#0000;border:none;border-radius:0;margin:2em 0;padding:0 1em}.ds1tv40>:first-child,.ds1tv40 .rich-editor__content>:first-child{margin-top:0}.ds1tv40>:last-child,.ds1tv40 .rich-editor__content>:last-child{margin-bottom:0}@supports (animation-timeline:view()){.ds1tv40 .rich-text-highlight{--rc-hl-highlighted:0;animation:step-end both ds1tv41;animation-timeline:view();animation-range:entry 100% cover 10%}}._1pke0ca0{max-width:var(--rc-max-width);font-size:var(--rc-font-size-base);color:var(--rc-text);line-height:1.75}._1pke0ca0 .rich-paragraph{margin-top:1.5em;margin-bottom:1.5em}._1pke0ca0 .rich-heading-h1{color:var(--rc-text);margin-top:0;margin-bottom:.833333em;font-size:3em;font-weight:800;line-height:1}._1pke0ca0 .rich-heading-h2{color:var(--rc-text);margin-top:1.86667em;margin-bottom:1.06667em;font-size:1.875em;font-weight:700;line-height:1.33333}._1pke0ca0 .rich-heading-h3{color:var(--rc-text);margin-top:1.66667em;margin-bottom:.666667em;font-size:1.5em;font-weight:600;line-height:1.5}._1pke0ca0 .rich-heading-h4{color:var(--rc-text);margin-top:2em;margin-bottom:.5em;font-weight:600;line-height:1.5625}._1pke0ca0 .rich-heading-h2+*,._1pke0ca0 .rich-heading-h3+*,._1pke0ca0 .rich-heading-h4+*{margin-top:0}._1pke0ca0 .rich-quote{color:var(--rc-text);quotes:"“""”""‘""’";background-color:#0000;border-radius:0;margin-top:2.5em;margin-bottom:2.5em;padding-left:calc(1.5em + 4px);font-style:italic;font-weight:500}._1pke0ca0 .rich-quote .rich-paragraph:first-of-type:before{content:open-quote}._1pke0ca0 .rich-quote .rich-paragraph:last-of-type:after{content:close-quote}._1pke0ca0 .rich-quote .rich-paragraph:first-child{margin-top:0}._1pke0ca0 .rich-quote .rich-paragraph:last-child{margin-bottom:0}._1pke0ca0 .rich-text-code{color:var(--rc-text);background-color:var(--rc-code-bg);border-radius:var(--rc-radius-sm);font-size:.875em;font-weight:600;font-family:var(--rc-font-mono);padding:.2em .4em}._1pke0ca0 .rich-text-code:before,._1pke0ca0 .rich-text-code:after{content:"`";color:var(--rc-text-secondary);opacity:.5}._1pke0ca0 [contenteditable=true] .rich-text-code:before,._1pke0ca0 [contenteditable=true] .rich-text-code:after{content:""}._1pke0ca0 .rich-code-block{color:var(--rc-text);background-color:var(--rc-code-bg);border-radius:.375rem;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.75}._1pke0ca0 .rich-code-block pre{margin:0;padding:1em 1.5em}._1pke0ca0 .rich-list-ul,._1pke0ca0 .rich-list-ol{margin-top:1.5em;margin-bottom:1.5em;padding-left:1.75em}._1pke0ca0 .rich-list-item{margin-top:.75em;margin-bottom:.75em;padding-left:.5em}._1pke0ca0 .rich-list-item .rich-paragraph{margin-top:1em;margin-bottom:1em}._1pke0ca0 .rich-list-item>.rich-paragraph:first-child{margin-top:1.5em}._1pke0ca0 .rich-list-item>.rich-paragraph:last-child{margin-bottom:1.5em}._1pke0ca0 .rich-list-ul .rich-list-ul,._1pke0ca0 .rich-list-ul .rich-list-ol,._1pke0ca0 .rich-list-ol .rich-list-ul,._1pke0ca0 .rich-list-ol .rich-list-ol{margin-top:1em;margin-bottom:1em}._1pke0ca0 .rich-table{margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.5}._1pke0ca0 .rich-table .rich-paragraph{line-height:inherit;margin:0;padding:0}._1pke0ca0 .rich-image{margin-top:2em;margin-bottom:2em}._1pke0ca0 .rich-image>*{margin-top:0;margin-bottom:0}._1pke0ca0 .rich-image figcaption{color:var(--rc-text-secondary);margin-top:1em;font-size:.875em;line-height:1.5}._1pke0ca0 .rich-hr{border-color:var(--rc-hr-border);border-top-width:1px;width:60px;margin:3.5em auto}._1pke0ca0 .rich-hr+*{margin-top:0}._1pke0ca0 .rich-link{font-weight:500;text-decoration:underline}._1pke0ca0 .rich-banner,._1pke0ca0 .rich-code-snippet,._1pke0ca0 .rich-details{margin:2em 0}._1pke0ca0>:first-child{margin-top:0}._1pke0ca0>:last-child{margin-bottom:0}._1iyoz3l0{font-size:var(--rc-font-size-base);line-height:var(--rc-line-height)}._1iyoz3l0 .rich-paragraph{margin-bottom:.6em}._1iyoz3l0 .rich-heading-h1{margin-top:.8em;margin-bottom:.3em;font-size:1.35em;font-weight:700}._1iyoz3l0 .rich-heading-h2{margin-top:.7em;margin-bottom:.25em;font-size:1.2em;font-weight:700}._1iyoz3l0 .rich-heading-h3{margin-top:.6em;margin-bottom:.2em;font-size:1.1em;font-weight:600}._1iyoz3l0 .rich-heading-h4{margin-top:.5em;margin-bottom:.15em;font-size:1em;font-weight:600}._1iyoz3l0 .rich-heading-h5{margin-top:.45em;margin-bottom:.1em;font-size:.9em;font-weight:600}._1iyoz3l0 .rich-heading-h6{margin-top:.4em;margin-bottom:.1em;font-size:.85em;font-weight:600}._1iyoz3l0 .rich-quote{padding:var(--rc-space-sm) var(--rc-space-md);padding-left:calc(var(--rc-space-md) + 3px);margin:var(--rc-space-sm) 0;font-size:.95em}._1iyoz3l0 .rich-quote:before{width:3px}._1iyoz3l0 .rich-list-ol,._1iyoz3l0 .rich-list-ul{padding-left:var(--rc-space-md);margin-bottom:.6em}._1iyoz3l0 .rich-list-item{margin-bottom:.1em}._1iyoz3l0 .rich-code-block{margin:var(--rc-space-sm) 0;border-radius:var(--rc-radius-sm);font-size:var(--rc-font-size-small)}._1iyoz3l0 .rich-code-block pre{padding:var(--rc-space-sm)}._1iyoz3l0 .line:before{display:none!important}._1iyoz3l0 .rich-table{margin:var(--rc-space-sm) 0;font-size:var(--rc-font-size-small)}._1iyoz3l0 .rich-table-cell,._1iyoz3l0 .rich-table-cell-header{padding:var(--rc-space-xs) var(--rc-space-sm)}._1iyoz3l0 .rich-image{margin:var(--rc-space-sm) 0}._1iyoz3l0 .rich-image figcaption{font-size:var(--rc-font-size-small)}._1iyoz3l0 .rich-hr{border:none;border-top:1px solid var(--rc-hr-border);margin:var(--rc-space-lg) auto;width:60px}._1iyoz3l0 .rich-alert{padding:var(--rc-space-sm) var(--rc-space-md);padding-left:var(--rc-space-lg);margin:var(--rc-space-sm) 0}._1iyoz3l0 .rich-katex-block{padding:var(--rc-space-sm) 0;margin:var(--rc-space-sm) 0}.g7jfj60{max-width:var(--rc-max-width);font-size:var(--rc-font-size-base);color:var(--rc-text);line-height:1.8}.g7jfj60>.rich-paragraph,.g7jfj60 .rich-editor__content>.rich-paragraph,.g7jfj60 .rich-content__body>.rich-paragraph{margin-top:1.25em;margin-bottom:1.25em;line-height:1.8}.g7jfj60>.rich-paragraph:first-of-type,.g7jfj60 .rich-editor__content>.rich-paragraph:first-of-type,.g7jfj60 .rich-content__body>.rich-paragraph:first-of-type{margin-top:0;margin-bottom:2rem}.g7jfj60>.rich-paragraph:not(:first-of-type)>[data-lexical-text]:first-child,.g7jfj60 .rich-editor__content>.rich-paragraph:not(:first-of-type)>[data-lexical-text]:first-child,.g7jfj60 .rich-content__body>.rich-paragraph:not(:first-of-type)>[data-lexical-text]:first-child{margin-inline-start:2rem}.g7jfj60>.rich-paragraph:first-of-type:first-letter,.g7jfj60 .rich-content__body>.rich-paragraph:first-of-type:first-letter{float:left;margin-right:.2em;font-size:2.4em;line-height:1}.g7jfj60 .rich-editor__content>.rich-paragraph:first-of-type:first-letter{color:var(--rc-accent);font-size:1.5em;font-weight:700}.g7jfj60>.rich-paragraph:last-child,.g7jfj60 .rich-editor__content>.rich-paragraph:last-child,.g7jfj60 .rich-content__body>.rich-paragraph:last-child{margin-bottom:0}.g7jfj60 .rich-text-bold{font-family:var(--rc-font-family);color:var(--rc-text);font-weight:600}.g7jfj60 .rich-heading-h1{letter-spacing:-.025em;color:var(--rc-text);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.g7jfj60 .rich-heading-h2{letter-spacing:-.025em;color:var(--rc-text);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.g7jfj60 .rich-heading-h2+*{margin-top:0}.g7jfj60 .rich-heading-h3{letter-spacing:-.025em;color:var(--rc-text);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.g7jfj60 .rich-heading-h3+*{margin-top:0}.g7jfj60 .rich-heading-h4{color:var(--rc-text);margin-top:1.5em;margin-bottom:.5em;font-size:1.125em;font-weight:600;line-height:1.5}.g7jfj60 .rich-heading-h4+*{margin-top:0}.g7jfj60 .rich-heading-h5{color:var(--rc-text);margin-top:1.5em;margin-bottom:.5em;font-size:1em;font-weight:600;line-height:1.5}.g7jfj60 .rich-heading-h5+*{margin-top:0}.g7jfj60 .rich-heading-h6{color:var(--rc-text);text-transform:uppercase;margin-top:1.5em;margin-bottom:.5em;font-size:.875em;font-weight:600;line-height:1.5}.g7jfj60 .rich-heading-h6+*{margin-top:0}.g7jfj60 .rich-quote{color:inherit;background-color:color-mix(in srgb, var(--rc-accent) 10%, transparent);border-radius:0;margin:1.6em -1rem;padding:1em 2em;font-style:normal;line-height:1.8}.g7jfj60 .rich-quote:before{display:none}.g7jfj60 .rich-quote .rich-paragraph:first-child:first-letter{float:none;font-size:inherit;margin-right:0}.g7jfj60 .rich-link{text-underline-offset:2px;font-weight:500;text-decoration:underline;text-decoration-thickness:1px;transition:color .15s}.g7jfj60 .rich-link:hover{text-decoration-thickness:2px}.g7jfj60 .rich-text-code{font-size:.875em;font-family:var(--rc-font-mono);border-radius:var(--rc-radius-sm);background-color:var(--rc-code-bg);padding:.2em .4em;font-weight:500}.g7jfj60 .rich-list-ol,.g7jfj60 .rich-list-ul{margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.g7jfj60 .rich-list-ol{list-style-type:decimal}.g7jfj60 .rich-list-ul{list-style-type:disc}.g7jfj60 .rich-list-item{margin-top:.5em;margin-bottom:.5em;padding-left:.375em}.g7jfj60 .rich-list-item::marker{color:var(--rc-text-secondary)}.g7jfj60 .rich-code-block{border-radius:var(--rc-radius-md);margin-top:1.71429em;margin-bottom:1.71429em;font-size:.875em;line-height:1.71429;overflow-x:auto}.g7jfj60 .rich-code-block pre{margin:0;padding:.857143em 1.14286em}.g7jfj60 .rich-table{margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.g7jfj60 .rich-table .rich-paragraph{line-height:inherit;margin:0;padding:0}.g7jfj60 .rich-table .rich-paragraph:first-child:first-letter{float:none;font-size:inherit;margin-right:0}.g7jfj60 .rich-image{margin-top:2em;margin-bottom:2em}.g7jfj60 .rich-image img{border-radius:var(--rc-radius-md)}.g7jfj60 .rich-image figcaption{color:var(--rc-text-secondary);text-align:center;margin-top:.857143em;font-size:.875em;line-height:1.42857}.g7jfj60 .rich-hr{border:none;border-top:1px solid var(--rc-hr-border);opacity:.2;width:60px;margin:.5rem auto}.g7jfj60 .rich-katex-block{margin-top:1.6em;margin-bottom:1.6em;padding:1em 0;overflow-x:auto}.g7jfj60 .rich-spoiler{border-radius:var(--rc-radius-sm);padding-inline-start:.25em;padding-inline-end:.25em}.g7jfj60>:first-child{margin-top:0}.g7jfj60>:last-child{margin-bottom:0}._1an6v8d0{cursor:pointer;margin:var(--rc-space-md) 0;border-radius:var(--rc-radius-md);border:1px solid var(--rc-border);display:block;position:relative;overflow:clip}._1an6v8d1{color:#fff;opacity:0;pointer-events:none;background:#00000059;justify-content:center;align-items:center;transition:opacity .2s,background .2s;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}._1an6v8d0:hover ._1an6v8d1{opacity:1;background:#00000080}._1an6v8d2{padding-block:var(--rc-space-md);padding-inline:var(--rc-space-xl);max-height:300px;overflow:clip}._1an6v8d3._1an6v8d3{gap:0;width:900px;max-width:90vw;max-height:min(900px,100vh - 1rem);padding:0;overflow:hidden}._1an6v8d4{background:var(--rc-bg);grid-template-rows:auto minmax(0,1fr) auto;height:min(800px,100vh - 1rem);display:grid}._1an6v8d5{border-bottom:1px solid var(--rc-border);flex-shrink:0;justify-content:space-between;align-items:center;height:48px;padding:0 .5rem 0 1rem;display:flex}._1an6v8d6{align-items:center;gap:.5rem;display:flex}._1an6v8d7{font-size:var(--rc-font-size-md);color:var(--rc-text);align-items:center;gap:.5rem;margin:0;font-weight:500;display:flex}._1an6v8d8{align-items:center;gap:4px;display:flex}._1an6v8d9{cursor:pointer;width:28px;height:28px;color:var(--rc-text-secondary);background:0 0;border:none;border-radius:.25rem;justify-content:center;align-items:center;transition:color .15s;display:inline-flex}._1an6v8d9:hover{color:var(--rc-text)}._1an6v8da{border-bottom:1px solid var(--rc-border);background:var(--rc-bg);padding:0 .75rem .5rem}._1an6v8db{max-width:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;background-color:#0000;border:none;border-radius:0;margin:0;position:sticky;top:0}._1an6v8db>div{padding-inline-start:0;padding-inline-end:0}._1an6v8dc{background:linear-gradient(180deg, color-mix(in srgb, var(--rc-text) 2%, transparent), transparent);min-height:0;overflow:hidden}._1an6v8dc .rich-editor{flex-direction:column;height:100%;display:flex}._1an6v8dc .rich-editor__content-wrapper{max-width:75ch;overflow-y:auto}._1an6v8dc .rich-editor__content{padding-left:1.5rem;padding-right:1.5rem}._1an6v8dc .rich-editor__placeholder{left:1.5rem}._1an6v8dc .ds1tv40>:first-child{box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;background-color:#0000;border-top:none;border-left:none;border-right:none;border-radius:0;max-width:none;margin:0}._1an6v8dd{scrollbar-gutter:stable both-edges;height:100%;overflow:hidden auto}._1an6v8de{background:var(--rc-bg);min-height:100%;display:flex;overflow:hidden}._1an6v8df{outline:none;flex:1;min-height:460px;padding:1.25rem 1.5rem 1.75rem;overflow:visible}._1an6v8dg{border-top:1px solid var(--rc-border);justify-content:flex-end;align-items:center;padding:.5rem .75rem;display:flex}._1an6v8dh{cursor:pointer;margin:var(--rc-space-md) 0;border-radius:var(--rc-radius-md);border:1px solid var(--rc-border);display:block;position:relative;overflow:clip}._1an6v8di{color:#fff;opacity:0;pointer-events:none;z-index:1;background:#00000040;justify-content:center;align-items:center;transition:opacity .2s;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}._1an6v8dh:hover ._1an6v8di{opacity:1}._1an6v8dj{background:linear-gradient(to bottom, transparent, var(--rc-bg));pointer-events:none;height:4rem;position:absolute;bottom:0;left:0;right:0}._1an6v8dk._1an6v8dk{flex-direction:column;width:700px;max-width:90vw;height:min(800px,100vh - 2rem);max-height:min(800px,100vh - 2rem);display:flex;overflow:hidden}._1an6v8dl{flex:1;min-height:0;padding:0 1.5rem 1.5rem;overflow:hidden auto}._1an6v8dm{pointer-events:none}._1an6v8dn{color:var(--rc-text-secondary);font-size:var(--rc-font-size-md);opacity:.72;margin:0}._1an6v8df .rich-paragraph:first-child,._1an6v8dm .rich-paragraph:first-child{margin-top:0}._1an6v8dm .rich-paragraph:last-child{margin-bottom:0}
|
|
2
|
+
/*$vite$:1*/
|
package/dist/static.mjs
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
$ as $isNestedDocNode,
|
|
7
|
-
q as NESTED_DOC_BLOCK_TRANSFORMER,
|
|
8
|
-
NestedDocNode,
|
|
9
|
-
N as NestedDocRenderer,
|
|
10
|
-
s as NestedDocStaticDecorator,
|
|
11
|
-
nestedDocNodes
|
|
12
|
-
};
|
|
1
|
+
import { i as NestedDocNode, l as NestedDocRenderer, n as $createNestedDocNode, o as NestedDocStaticDecorator, r as $isNestedDocNode, t as NESTED_DOC_BLOCK_TRANSFORMER } from "./transformer-VVBkt_Yh.js";
|
|
2
|
+
//#region src/static.ts
|
|
3
|
+
var nestedDocNodes = [NestedDocNode];
|
|
4
|
+
//#endregion
|
|
5
|
+
export { $createNestedDocNode, $isNestedDocNode, NESTED_DOC_BLOCK_TRANSFORMER, NestedDocNode, NestedDocRenderer, NestedDocStaticDecorator, nestedDocNodes };
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { DecoratorNode } from "lexical";
|
|
2
|
+
import { Maximize2 } from "lucide-react";
|
|
3
|
+
import { createElement, useCallback, useMemo } from "react";
|
|
4
|
+
import { usePortalTheme } from "@haklex/rich-style-token";
|
|
5
|
+
import { ColorSchemeProvider, extractTextContent, useColorScheme, usePresentDialog, useRendererConfig, useVariant } from "@haklex/rich-editor/static";
|
|
6
|
+
import { RichRenderer } from "@haklex/rich-static-renderer";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { extractTextContent as extractTextContent$1 } from "@haklex/rich-editor/commands";
|
|
9
|
+
//#region src/styles.css.ts
|
|
10
|
+
var editOverlayRoot = "_1an6v8d0";
|
|
11
|
+
var editOverlay = "_1an6v8d1";
|
|
12
|
+
var rendererContent = "_1an6v8d2";
|
|
13
|
+
var dialogPopup = "_1an6v8d3";
|
|
14
|
+
var dialogShell = "_1an6v8d4";
|
|
15
|
+
var dialogHeader = "_1an6v8d5";
|
|
16
|
+
var dialogHeaderLeft = "_1an6v8d6";
|
|
17
|
+
var dialogTitle = "_1an6v8d7";
|
|
18
|
+
var dialogHeaderRight = "_1an6v8d8";
|
|
19
|
+
var dialogHeaderCloseBtn = "_1an6v8d9";
|
|
20
|
+
var editorArea = "_1an6v8dc";
|
|
21
|
+
var dialogFooter = "_1an6v8dg";
|
|
22
|
+
var staticOverlayRoot = "_1an6v8dh";
|
|
23
|
+
var staticOverlay = "_1an6v8di";
|
|
24
|
+
var staticDialogPopup = "_1an6v8dk";
|
|
25
|
+
var staticDialogBody = "_1an6v8dl";
|
|
26
|
+
var previewSurface = "_1an6v8dm";
|
|
27
|
+
var previewEmpty = "_1an6v8dn";
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/NestedDocRenderer.tsx
|
|
30
|
+
function NestedDocRenderer({ value, variant = "comment" }) {
|
|
31
|
+
const theme = useColorScheme();
|
|
32
|
+
return /* @__PURE__ */ jsx(RichRenderer, {
|
|
33
|
+
rendererConfig: useRendererConfig(),
|
|
34
|
+
theme,
|
|
35
|
+
value,
|
|
36
|
+
variant
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/utils.ts
|
|
41
|
+
function truncateEditorState(state, maxNodes) {
|
|
42
|
+
const root = state.root;
|
|
43
|
+
if (!root?.children || root.children.length <= maxNodes) return state;
|
|
44
|
+
return {
|
|
45
|
+
...state,
|
|
46
|
+
root: {
|
|
47
|
+
...root,
|
|
48
|
+
children: root.children.slice(0, maxNodes)
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function hasRenderableEditorState(state) {
|
|
53
|
+
const children = state.root?.children ?? [];
|
|
54
|
+
if (children.length === 0) return false;
|
|
55
|
+
if (children.length > 1) return true;
|
|
56
|
+
const first = children[0];
|
|
57
|
+
if (!first) return false;
|
|
58
|
+
if (first.type !== "paragraph") return true;
|
|
59
|
+
return first.children?.some((child) => {
|
|
60
|
+
if (child.type !== "text") return true;
|
|
61
|
+
return Boolean(child.text?.trim());
|
|
62
|
+
}) ?? false;
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/NestedDocStaticDecorator.tsx
|
|
66
|
+
var PREVIEW_NODE_LIMIT = 6;
|
|
67
|
+
function NestedDocStaticDecorator({ contentState }) {
|
|
68
|
+
const colorScheme = useColorScheme();
|
|
69
|
+
const { className: portalClassName } = usePortalTheme();
|
|
70
|
+
const presentDialogFromCtx = usePresentDialog();
|
|
71
|
+
const children = contentState.root?.children ?? [];
|
|
72
|
+
const needsTruncation = children.length > PREVIEW_NODE_LIMIT;
|
|
73
|
+
const previewState = useMemo(() => truncateEditorState(contentState, PREVIEW_NODE_LIMIT), [contentState]);
|
|
74
|
+
const hasPreview = hasRenderableEditorState(contentState);
|
|
75
|
+
const title = useMemo(() => {
|
|
76
|
+
const firstChild = children[0];
|
|
77
|
+
if (!firstChild) return "";
|
|
78
|
+
const walk = (node) => {
|
|
79
|
+
if (node.text) return node.text;
|
|
80
|
+
if (node.children) return node.children.map(walk).join("");
|
|
81
|
+
return "";
|
|
82
|
+
};
|
|
83
|
+
return walk(firstChild).slice(0, 80);
|
|
84
|
+
}, [children]);
|
|
85
|
+
const contextVariant = useVariant();
|
|
86
|
+
const handleOpen = useCallback(async () => {
|
|
87
|
+
(presentDialogFromCtx ?? (await import("@haklex/rich-editor-ui")).presentDialog)({
|
|
88
|
+
title: title || void 0,
|
|
89
|
+
content: () => /* @__PURE__ */ jsx(ColorSchemeProvider, {
|
|
90
|
+
colorScheme,
|
|
91
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
92
|
+
className: staticDialogBody,
|
|
93
|
+
children: /* @__PURE__ */ jsx(NestedDocRenderer, {
|
|
94
|
+
value: contentState,
|
|
95
|
+
variant: contextVariant
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
}),
|
|
99
|
+
className: staticDialogPopup,
|
|
100
|
+
portalClassName,
|
|
101
|
+
theme: colorScheme,
|
|
102
|
+
showCloseButton: true,
|
|
103
|
+
clickOutsideToDismiss: true,
|
|
104
|
+
sheet: "auto"
|
|
105
|
+
});
|
|
106
|
+
}, [
|
|
107
|
+
colorScheme,
|
|
108
|
+
contentState,
|
|
109
|
+
portalClassName,
|
|
110
|
+
presentDialogFromCtx,
|
|
111
|
+
title,
|
|
112
|
+
contextVariant
|
|
113
|
+
]);
|
|
114
|
+
if (!hasPreview) return null;
|
|
115
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
116
|
+
className: staticOverlayRoot,
|
|
117
|
+
role: "button",
|
|
118
|
+
tabIndex: 0,
|
|
119
|
+
onClick: handleOpen,
|
|
120
|
+
onKeyDown: (e) => {
|
|
121
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
handleOpen();
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsx("div", {
|
|
128
|
+
className: `${rendererContent} rich-nested-doc-content`,
|
|
129
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
130
|
+
className: previewSurface,
|
|
131
|
+
children: /* @__PURE__ */ jsx(NestedDocRenderer, { value: previewState })
|
|
132
|
+
})
|
|
133
|
+
}),
|
|
134
|
+
needsTruncation && /* @__PURE__ */ jsx("div", {
|
|
135
|
+
"aria-hidden": true,
|
|
136
|
+
className: "_1an6v8dj"
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx("div", {
|
|
139
|
+
"aria-hidden": true,
|
|
140
|
+
className: staticOverlay,
|
|
141
|
+
children: /* @__PURE__ */ jsx(Maximize2, { size: 24 })
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/typeof.js
|
|
148
|
+
function _typeof(o) {
|
|
149
|
+
"@babel/helpers - typeof";
|
|
150
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
151
|
+
return typeof o;
|
|
152
|
+
} : function(o) {
|
|
153
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
154
|
+
}, _typeof(o);
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/toPrimitive.js
|
|
158
|
+
function toPrimitive(t, r) {
|
|
159
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
160
|
+
var e = t[Symbol.toPrimitive];
|
|
161
|
+
if (void 0 !== e) {
|
|
162
|
+
var i = e.call(t, r || "default");
|
|
163
|
+
if ("object" != _typeof(i)) return i;
|
|
164
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
165
|
+
}
|
|
166
|
+
return ("string" === r ? String : Number)(t);
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/toPropertyKey.js
|
|
170
|
+
function toPropertyKey(t) {
|
|
171
|
+
var i = toPrimitive(t, "string");
|
|
172
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/defineProperty.js
|
|
176
|
+
function _defineProperty(e, r, t) {
|
|
177
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
178
|
+
value: t,
|
|
179
|
+
enumerable: !0,
|
|
180
|
+
configurable: !0,
|
|
181
|
+
writable: !0
|
|
182
|
+
}) : e[r] = t, e;
|
|
183
|
+
}
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region src/NestedDocNode.ts
|
|
186
|
+
var NestedDocNode = class NestedDocNode extends DecoratorNode {
|
|
187
|
+
static getType() {
|
|
188
|
+
return "nested-doc";
|
|
189
|
+
}
|
|
190
|
+
static clone(node) {
|
|
191
|
+
return new NestedDocNode(node.__contentState, node.__key);
|
|
192
|
+
}
|
|
193
|
+
constructor(contentState, key) {
|
|
194
|
+
super(key);
|
|
195
|
+
_defineProperty(this, "__contentState", void 0);
|
|
196
|
+
this.__contentState = contentState || { root: {
|
|
197
|
+
children: [{
|
|
198
|
+
type: "paragraph",
|
|
199
|
+
children: [],
|
|
200
|
+
direction: null,
|
|
201
|
+
format: "",
|
|
202
|
+
indent: 0,
|
|
203
|
+
textFormat: 0,
|
|
204
|
+
textStyle: "",
|
|
205
|
+
version: 1
|
|
206
|
+
}],
|
|
207
|
+
direction: null,
|
|
208
|
+
format: "",
|
|
209
|
+
indent: 0,
|
|
210
|
+
type: "root",
|
|
211
|
+
version: 1
|
|
212
|
+
} };
|
|
213
|
+
}
|
|
214
|
+
createDOM(_config) {
|
|
215
|
+
const div = document.createElement("div");
|
|
216
|
+
div.className = "rich-nested-doc";
|
|
217
|
+
return div;
|
|
218
|
+
}
|
|
219
|
+
updateDOM() {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
isInline() {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
getContentState() {
|
|
226
|
+
return this.getLatest().__contentState;
|
|
227
|
+
}
|
|
228
|
+
setContentState(state) {
|
|
229
|
+
const writable = this.getWritable();
|
|
230
|
+
writable.__contentState = state;
|
|
231
|
+
}
|
|
232
|
+
getTextContent() {
|
|
233
|
+
return extractTextContent(this.__contentState);
|
|
234
|
+
}
|
|
235
|
+
static importJSON(serializedNode) {
|
|
236
|
+
return new NestedDocNode(serializedNode.content);
|
|
237
|
+
}
|
|
238
|
+
exportJSON() {
|
|
239
|
+
return {
|
|
240
|
+
...super.exportJSON(),
|
|
241
|
+
type: "nested-doc",
|
|
242
|
+
content: this.__contentState,
|
|
243
|
+
version: 1
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
decorate(_editor, _config) {
|
|
247
|
+
return createElement(NestedDocStaticDecorator, { contentState: this.__contentState });
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
function $createNestedDocNode(contentState) {
|
|
251
|
+
return new NestedDocNode(contentState);
|
|
252
|
+
}
|
|
253
|
+
function $isNestedDocNode(node) {
|
|
254
|
+
return node instanceof NestedDocNode;
|
|
255
|
+
}
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/transformer.ts
|
|
258
|
+
var NESTED_DOC_BLOCK_TRANSFORMER = {
|
|
259
|
+
dependencies: [],
|
|
260
|
+
export: (node) => {
|
|
261
|
+
if (!$isNestedDocNode(node)) return null;
|
|
262
|
+
return `<nested-doc>\n${extractTextContent$1(node.getContentState())}\n</nested-doc>`;
|
|
263
|
+
},
|
|
264
|
+
regExp: /a^/,
|
|
265
|
+
replace: () => {},
|
|
266
|
+
type: "element"
|
|
267
|
+
};
|
|
268
|
+
//#endregion
|
|
269
|
+
export { rendererContent as C, previewSurface as S, dialogTitle as _, _defineProperty as a, editorArea as b, truncateEditorState as c, dialogHeader as d, dialogHeaderCloseBtn as f, dialogShell as g, dialogPopup as h, NestedDocNode as i, NestedDocRenderer as l, dialogHeaderRight as m, $createNestedDocNode as n, NestedDocStaticDecorator as o, dialogHeaderLeft as p, $isNestedDocNode as r, hasRenderableEditorState as s, NESTED_DOC_BLOCK_TRANSFORMER as t, dialogFooter as u, editOverlay as v, previewEmpty as x, editOverlayRoot as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-nested-doc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"description": "Nested document extension for haklex rich editor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@haklex/rich-editor": "0.0.
|
|
29
|
-
"@haklex/rich-
|
|
30
|
-
"@haklex/rich-
|
|
31
|
-
"@haklex/rich-
|
|
28
|
+
"@haklex/rich-editor": "0.0.81",
|
|
29
|
+
"@haklex/rich-static-renderer": "0.0.81",
|
|
30
|
+
"@haklex/rich-style-token": "0.0.81",
|
|
31
|
+
"@haklex/rich-editor-ui": "0.0.81"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@lexical/react": "^0.41.0",
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { extractTextContent as extractTextContent$1 } from "@haklex/rich-editor/commands";
|
|
5
|
-
import { useColorScheme, useRendererConfig, usePresentDialog, useVariant, extractTextContent } from "@haklex/rich-editor/static";
|
|
6
|
-
import { DecoratorNode } from "lexical";
|
|
7
|
-
import { useMemo, useCallback, createElement } from "react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { usePortalTheme } from "@haklex/rich-style-token";
|
|
10
|
-
import { Maximize2 } from "lucide-react";
|
|
11
|
-
import { RichRenderer } from "@haklex/rich-static-renderer";
|
|
12
|
-
var editOverlayRoot = "_1an6v8d0";
|
|
13
|
-
var editOverlay = "_1an6v8d1";
|
|
14
|
-
var rendererContent = "_1an6v8d2";
|
|
15
|
-
var dialogPopup = "_1an6v8d3";
|
|
16
|
-
var dialogShell = "_1an6v8d4";
|
|
17
|
-
var dialogHeader = "_1an6v8d5";
|
|
18
|
-
var dialogHeaderLeft = "_1an6v8d6";
|
|
19
|
-
var dialogTitle = "_1an6v8d7";
|
|
20
|
-
var dialogHeaderRight = "_1an6v8d8";
|
|
21
|
-
var dialogHeaderCloseBtn = "_1an6v8d9";
|
|
22
|
-
var editorArea = "_1an6v8dc";
|
|
23
|
-
var dialogFooter = "_1an6v8dg";
|
|
24
|
-
var staticOverlayRoot = "_1an6v8dh";
|
|
25
|
-
var staticOverlay = "_1an6v8di";
|
|
26
|
-
var staticGradientMask = "_1an6v8dj";
|
|
27
|
-
var staticDialogPopup = "_1an6v8dk";
|
|
28
|
-
var staticDialogBody = "_1an6v8dl";
|
|
29
|
-
var previewSurface = "_1an6v8dm";
|
|
30
|
-
var previewEmpty = "_1an6v8dn";
|
|
31
|
-
function NestedDocRenderer({
|
|
32
|
-
value,
|
|
33
|
-
variant = "comment"
|
|
34
|
-
}) {
|
|
35
|
-
const theme = useColorScheme();
|
|
36
|
-
const rendererConfig = useRendererConfig();
|
|
37
|
-
return /* @__PURE__ */ jsx(RichRenderer, { rendererConfig, theme, value, variant });
|
|
38
|
-
}
|
|
39
|
-
function truncateEditorState(state, maxNodes) {
|
|
40
|
-
const root = state.root;
|
|
41
|
-
if (!root?.children || root.children.length <= maxNodes) return state;
|
|
42
|
-
return {
|
|
43
|
-
...state,
|
|
44
|
-
root: {
|
|
45
|
-
...root,
|
|
46
|
-
children: root.children.slice(0, maxNodes)
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function hasRenderableEditorState(state) {
|
|
51
|
-
const children = state.root?.children ?? [];
|
|
52
|
-
if (children.length === 0) return false;
|
|
53
|
-
if (children.length > 1) return true;
|
|
54
|
-
const first = children[0];
|
|
55
|
-
if (!first) return false;
|
|
56
|
-
if (first.type !== "paragraph") return true;
|
|
57
|
-
return first.children?.some((child) => {
|
|
58
|
-
if (child.type !== "text") return true;
|
|
59
|
-
return Boolean(child.text?.trim());
|
|
60
|
-
}) ?? false;
|
|
61
|
-
}
|
|
62
|
-
const PREVIEW_NODE_LIMIT = 6;
|
|
63
|
-
function NestedDocStaticDecorator({ contentState }) {
|
|
64
|
-
const colorScheme = useColorScheme();
|
|
65
|
-
const { className: portalClassName } = usePortalTheme();
|
|
66
|
-
const presentDialogFromCtx = usePresentDialog();
|
|
67
|
-
const children = contentState.root?.children ?? [];
|
|
68
|
-
const needsTruncation = children.length > PREVIEW_NODE_LIMIT;
|
|
69
|
-
const previewState = useMemo(
|
|
70
|
-
() => truncateEditorState(contentState, PREVIEW_NODE_LIMIT),
|
|
71
|
-
[contentState]
|
|
72
|
-
);
|
|
73
|
-
const hasPreview = hasRenderableEditorState(contentState);
|
|
74
|
-
const title = useMemo(() => {
|
|
75
|
-
const firstChild = children[0];
|
|
76
|
-
if (!firstChild) return "";
|
|
77
|
-
const walk = (node) => {
|
|
78
|
-
if (node.text) return node.text;
|
|
79
|
-
if (node.children) return node.children.map(walk).join("");
|
|
80
|
-
return "";
|
|
81
|
-
};
|
|
82
|
-
return walk(firstChild).slice(0, 80);
|
|
83
|
-
}, [children]);
|
|
84
|
-
const contextVariant = useVariant();
|
|
85
|
-
const handleOpen = useCallback(async () => {
|
|
86
|
-
const present = presentDialogFromCtx ?? (await import("@haklex/rich-editor-ui")).presentDialog;
|
|
87
|
-
present({
|
|
88
|
-
title: title || void 0,
|
|
89
|
-
content: () => /* @__PURE__ */ jsx("div", { className: staticDialogBody, children: /* @__PURE__ */ jsx(NestedDocRenderer, { value: contentState, variant: contextVariant }) }),
|
|
90
|
-
className: staticDialogPopup,
|
|
91
|
-
portalClassName,
|
|
92
|
-
theme: colorScheme,
|
|
93
|
-
showCloseButton: true,
|
|
94
|
-
clickOutsideToDismiss: true,
|
|
95
|
-
sheet: "auto"
|
|
96
|
-
});
|
|
97
|
-
}, [colorScheme, contentState, portalClassName, presentDialogFromCtx, title, contextVariant]);
|
|
98
|
-
if (!hasPreview) {
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
return /* @__PURE__ */ jsxs(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
className: staticOverlayRoot,
|
|
105
|
-
role: "button",
|
|
106
|
-
tabIndex: 0,
|
|
107
|
-
onClick: handleOpen,
|
|
108
|
-
onKeyDown: (e) => {
|
|
109
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
110
|
-
e.preventDefault();
|
|
111
|
-
handleOpen();
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ jsx("div", { className: `${rendererContent} rich-nested-doc-content`, children: /* @__PURE__ */ jsx("div", { className: previewSurface, children: /* @__PURE__ */ jsx(NestedDocRenderer, { value: previewState }) }) }),
|
|
116
|
-
needsTruncation && /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: staticGradientMask }),
|
|
117
|
-
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: staticOverlay, children: /* @__PURE__ */ jsx(Maximize2, { size: 24 }) })
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
class NestedDocNode extends DecoratorNode {
|
|
123
|
-
constructor(contentState, key) {
|
|
124
|
-
super(key);
|
|
125
|
-
__publicField(this, "__contentState");
|
|
126
|
-
this.__contentState = contentState || {
|
|
127
|
-
root: {
|
|
128
|
-
children: [
|
|
129
|
-
{
|
|
130
|
-
type: "paragraph",
|
|
131
|
-
children: [],
|
|
132
|
-
direction: null,
|
|
133
|
-
format: "",
|
|
134
|
-
indent: 0,
|
|
135
|
-
textFormat: 0,
|
|
136
|
-
textStyle: "",
|
|
137
|
-
version: 1
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
direction: null,
|
|
141
|
-
format: "",
|
|
142
|
-
indent: 0,
|
|
143
|
-
type: "root",
|
|
144
|
-
version: 1
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
static getType() {
|
|
149
|
-
return "nested-doc";
|
|
150
|
-
}
|
|
151
|
-
static clone(node) {
|
|
152
|
-
return new NestedDocNode(node.__contentState, node.__key);
|
|
153
|
-
}
|
|
154
|
-
createDOM(_config) {
|
|
155
|
-
const div = document.createElement("div");
|
|
156
|
-
div.className = "rich-nested-doc";
|
|
157
|
-
return div;
|
|
158
|
-
}
|
|
159
|
-
updateDOM() {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
isInline() {
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
getContentState() {
|
|
166
|
-
return this.getLatest().__contentState;
|
|
167
|
-
}
|
|
168
|
-
setContentState(state) {
|
|
169
|
-
const writable = this.getWritable();
|
|
170
|
-
writable.__contentState = state;
|
|
171
|
-
}
|
|
172
|
-
getTextContent() {
|
|
173
|
-
return extractTextContent(this.__contentState);
|
|
174
|
-
}
|
|
175
|
-
static importJSON(serializedNode) {
|
|
176
|
-
return new NestedDocNode(serializedNode.content);
|
|
177
|
-
}
|
|
178
|
-
exportJSON() {
|
|
179
|
-
return {
|
|
180
|
-
...super.exportJSON(),
|
|
181
|
-
type: "nested-doc",
|
|
182
|
-
content: this.__contentState,
|
|
183
|
-
version: 1
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
decorate(_editor, _config) {
|
|
187
|
-
return createElement(NestedDocStaticDecorator, {
|
|
188
|
-
contentState: this.__contentState
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
function $createNestedDocNode(contentState) {
|
|
193
|
-
return new NestedDocNode(contentState);
|
|
194
|
-
}
|
|
195
|
-
function $isNestedDocNode(node) {
|
|
196
|
-
return node instanceof NestedDocNode;
|
|
197
|
-
}
|
|
198
|
-
const NESTED_DOC_BLOCK_TRANSFORMER = {
|
|
199
|
-
dependencies: [],
|
|
200
|
-
export: (node) => {
|
|
201
|
-
if (!$isNestedDocNode(node)) return null;
|
|
202
|
-
const text = extractTextContent$1(node.getContentState());
|
|
203
|
-
return `<nested-doc>
|
|
204
|
-
${text}
|
|
205
|
-
</nested-doc>`;
|
|
206
|
-
},
|
|
207
|
-
// eslint-disable-next-line regexp/no-useless-assertions -- intentionally never-matching regex for export-only transformer
|
|
208
|
-
regExp: /a^/,
|
|
209
|
-
replace: () => {
|
|
210
|
-
},
|
|
211
|
-
type: "element"
|
|
212
|
-
};
|
|
213
|
-
export {
|
|
214
|
-
$isNestedDocNode as $,
|
|
215
|
-
NestedDocRenderer as N,
|
|
216
|
-
previewEmpty as a,
|
|
217
|
-
editOverlay as b,
|
|
218
|
-
dialogShell as c,
|
|
219
|
-
dialogPopup as d,
|
|
220
|
-
editOverlayRoot as e,
|
|
221
|
-
dialogHeader as f,
|
|
222
|
-
dialogHeaderLeft as g,
|
|
223
|
-
hasRenderableEditorState as h,
|
|
224
|
-
dialogTitle as i,
|
|
225
|
-
dialogHeaderRight as j,
|
|
226
|
-
dialogHeaderCloseBtn as k,
|
|
227
|
-
editorArea as l,
|
|
228
|
-
dialogFooter as m,
|
|
229
|
-
NestedDocNode as n,
|
|
230
|
-
$createNestedDocNode as o,
|
|
231
|
-
previewSurface as p,
|
|
232
|
-
NESTED_DOC_BLOCK_TRANSFORMER as q,
|
|
233
|
-
rendererContent as r,
|
|
234
|
-
NestedDocStaticDecorator as s,
|
|
235
|
-
truncateEditorState as t
|
|
236
|
-
};
|