@haklex/rich-editor 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertQuoteEditNode-C55sxsR3.js +267 -0
- package/dist/KaTeXRenderer-CQQT3BMw.js +215 -0
- package/dist/LinkCardRenderer-CigqFwCv.js +45 -0
- package/dist/MermaidPlugin-BrOr-wQi.js +67 -0
- package/dist/PresentDialogContext-DKNicgia.js +74 -0
- package/dist/RubyRenderer-jOkydJHg.js +15 -0
- package/dist/SubmitShortcutPlugin-D-7XrQfm.js +2186 -0
- package/dist/commands-entry.mjs +54 -74
- package/dist/config-CNiK9v2M.js +1246 -0
- package/dist/grid.css-CJCkLTZc.js +44 -0
- package/dist/index.mjs +121 -180
- package/dist/katex.css-CIOEOXyd.js +145 -0
- package/dist/node-registry-DOYK_WIp.js +669 -0
- package/dist/nodes-entry.mjs +5 -50
- package/dist/normalizeSerializedEditorState-B-1wmGzd.js +78 -0
- package/dist/plugins-entry.mjs +3 -28
- package/dist/renderers-entry.mjs +41 -61
- package/dist/rich-editor.css +2 -1
- package/dist/static-entry.mjs +16 -66
- package/dist/styles-entry.mjs +3 -21
- package/dist/theme-B5B2EOWM.js +1099 -0
- package/package.json +30 -30
- package/dist/AlertQuoteEditNode-sPNf3_7P.js +0 -293
- package/dist/KaTeXRenderer-CQyQzNTJ.js +0 -218
- package/dist/LinkCardRenderer-QmkOlyXb.js +0 -36
- package/dist/MermaidPlugin-DKuGUcCG.js +0 -101
- package/dist/PresentDialogContext-DRroMIoK.js +0 -71
- package/dist/RubyRenderer-CJQmODir.js +0 -14
- package/dist/SubmitShortcutPlugin-D9uKYHda.js +0 -2427
- package/dist/config-Dl3ZkytB.js +0 -1362
- package/dist/grid.css-Md5-Cfx_.js +0 -11
- package/dist/katex.css-Csc-7N7u.js +0 -28
- package/dist/node-registry-CovhHUB6.js +0 -824
- package/dist/normalizeSerializedEditorState-k5G4xSi9.js +0 -85
- package/dist/theme-lEwScxEX.js +0 -1113
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "./katex.css-CIOEOXyd.js";
|
|
2
|
+
//#region src/styles/details.css.ts
|
|
3
|
+
var detailsClassNames = {
|
|
4
|
+
details: "rich-details",
|
|
5
|
+
summary: "rich-details-summary",
|
|
6
|
+
summaryText: "rich-details-summary-text",
|
|
7
|
+
chevron: "rich-details-chevron",
|
|
8
|
+
content: "rich-details-content"
|
|
9
|
+
};
|
|
10
|
+
var detailsStyles = {
|
|
11
|
+
details: "_1o2d5g50",
|
|
12
|
+
summary: "_1o2d5g51",
|
|
13
|
+
summaryText: "_1o2d5g52",
|
|
14
|
+
chevron: "_1o2d5g53",
|
|
15
|
+
content: "_1o2d5g54"
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/styles/grid.css.ts
|
|
19
|
+
var gridClassNames = {
|
|
20
|
+
container: "rich-grid-container",
|
|
21
|
+
toolbar: "rich-grid-toolbar",
|
|
22
|
+
toolbarIcon: "rich-grid-toolbar-icon",
|
|
23
|
+
colButton: "rich-grid-col-btn",
|
|
24
|
+
colButtonActive: "rich-grid-col-btn-active",
|
|
25
|
+
toolbarDivider: "rich-grid-toolbar-divider",
|
|
26
|
+
actionButton: "rich-grid-action-btn",
|
|
27
|
+
inner: "rich-grid-inner",
|
|
28
|
+
cell: "rich-grid-cell",
|
|
29
|
+
cellEditable: "rich-grid-cell-editable"
|
|
30
|
+
};
|
|
31
|
+
var gridStyles = {
|
|
32
|
+
container: "_17ihk870",
|
|
33
|
+
toolbar: "_17ihk871",
|
|
34
|
+
toolbarIcon: "_17ihk872",
|
|
35
|
+
colButton: "_17ihk873",
|
|
36
|
+
colButtonActive: "_17ihk874",
|
|
37
|
+
toolbarDivider: "_17ihk875",
|
|
38
|
+
actionButton: "_17ihk876",
|
|
39
|
+
inner: "_17ihk877",
|
|
40
|
+
cell: "_17ihk878",
|
|
41
|
+
cellEditable: "_17ihk879"
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { detailsStyles as i, gridStyles as n, detailsClassNames as r, gridClassNames as t };
|
package/dist/index.mjs
CHANGED
|
@@ -1,192 +1,133 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { A as ImageUploadProvider, C as useTextSelectionSnapshot, D as defaultImageUpload, E as ImageUploadPlugin, M as CorePlugins, O as BlockIdPlugin, S as createTextSelectionStore, T as LinkFaviconPlugin, _ as $getTextOffsetInBlock, a as AutoFocusPlugin, b as buildRangeAnchor, c as $captureTextSelectionFromRangeSelection, d as findDOMPointByTextOffset, f as getBlockElementById, g as $getRootBlock, h as TEXT_SELECTION_HIGHLIGHT_NAME, i as EditorRefPlugin, k as blockIdState, l as $restoreTextSelection, m as getTextOffsetFromDOMPoint, n as OnChangePlugin, o as TextSelectionPlugin, p as getDOMRectFromTextSelection, r as FootnotePlugin, s as $captureTextSelection, t as SubmitShortcutPlugin, u as createDOMRangeFromTextSelection, v as $resolveSelectionPoint, w as useTextSelectionStore, x as TextSelectionStoreProvider, y as buildBlockAnchor } from "./SubmitShortcutPlugin-D-7XrQfm.js";
|
|
2
|
+
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-DOYK_WIp.js";
|
|
3
|
+
import { F as useNestedContentRenderer, I as useOptionalNestedContentRenderer, P as NestedContentRendererProvider, t as editorTheme } from "./theme-B5B2EOWM.js";
|
|
4
|
+
import { a as FootnoteDefinitionsProvider, c as useFootnoteDisplayNumber, d as RendererConfigProvider, f as useRendererConfig, m as useVariant, o as useFootnoteContent, p as useRendererMode, s as useFootnoteDefinitions } from "./KaTeXRenderer-CQQT3BMw.js";
|
|
5
|
+
import { a as noteVariant, c as richContent, i as getVariantClass, l as semanticClassNames, n as katexStyles, o as commentVariant, r as clsx, s as articleVariant, t as katexClassNames, u as sharedStyles } from "./katex.css-CIOEOXyd.js";
|
|
6
|
+
import { D as useColorScheme, E as ColorSchemeProvider } from "./config-CNiK9v2M.js";
|
|
7
|
+
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-CJCkLTZc.js";
|
|
8
|
+
import { a as LinkFavicon, i as useExtraNodes, n as usePresentDialog, r as ExtraNodesProvider, t as PresentDialogProvider } from "./PresentDialogContext-DKNicgia.js";
|
|
9
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-BrOr-wQi.js";
|
|
5
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
11
|
+
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
12
|
+
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
13
|
+
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
8
14
|
import { PortalThemeProvider } from "@haklex/rich-style-token";
|
|
9
15
|
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
|
10
|
-
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
11
16
|
import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
|
|
12
|
-
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
13
|
-
import { n as ColorSchemeProvider } from "./config-Dl3ZkytB.js";
|
|
14
|
-
import { u as u2 } from "./config-Dl3ZkytB.js";
|
|
15
|
-
import { R as RendererConfigProvider } from "./KaTeXRenderer-CQyQzNTJ.js";
|
|
16
|
-
import { F, u as u3, b, d, e, f as f2, g } from "./KaTeXRenderer-CQyQzNTJ.js";
|
|
17
|
-
import { n as editorTheme } from "./theme-lEwScxEX.js";
|
|
18
|
-
import { N, u as u4, p as p2 } from "./theme-lEwScxEX.js";
|
|
19
|
-
import { ContentEditable as ContentEditable$1 } from "@lexical/react/LexicalContentEditable";
|
|
20
|
-
import { e as clsx, g as getVariantClass } from "./katex.css-Csc-7N7u.js";
|
|
21
|
-
import { a as a2, c, k as k2, b as b2, n as n2, r as r2, s as s2, d as d2 } from "./katex.css-Csc-7N7u.js";
|
|
22
|
-
import { d as d3, a as a3, g as g2, b as b3 } from "./grid.css-Md5-Cfx_.js";
|
|
23
17
|
import { articleTheme, commentTheme, noteTheme, vars } from "@haklex/rich-style-token/styles";
|
|
18
|
+
//#region src/components/ContentEditable.css.ts
|
|
24
19
|
var contentWrapper = "b94s950";
|
|
25
20
|
var content = "b94s951";
|
|
26
21
|
var placeholder = "b94s952";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
children: placeholder$1
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
);
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/ContentEditable.tsx
|
|
24
|
+
function ContentEditable$1({ className, placeholder: placeholder$1, hasHeader }) {
|
|
25
|
+
const paddingTop = hasHeader ? 40 : 12;
|
|
26
|
+
return /* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: clsx("rich-editor__content-wrapper", contentWrapper),
|
|
28
|
+
style: { "--ce-padding-top": `${paddingTop}px` },
|
|
29
|
+
children: /* @__PURE__ */ jsx(ContentEditable, {
|
|
30
|
+
"aria-placeholder": placeholder$1 ?? "",
|
|
31
|
+
className: clsx("rich-editor__content", content, className),
|
|
32
|
+
placeholder: /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: clsx("rich-editor__placeholder", placeholder),
|
|
34
|
+
style: { display: placeholder$1 ? void 0 : "none" },
|
|
35
|
+
children: placeholder$1
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
});
|
|
51
39
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
) }) }) }) }) }) });
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/RichEditorShell.tsx
|
|
42
|
+
function RichEditorShell({ nodes, initialValue, onChange, variant = "article", theme = "light", placeholder = "Write something...", onSubmit, autoFocus = false, className, contentClassName, style, actions, header, onEditorReady, rendererConfig, debounceMs, children }) {
|
|
43
|
+
setResolvedEditNodes(nodes);
|
|
44
|
+
const initialConfig = {
|
|
45
|
+
namespace: "RichEditor",
|
|
46
|
+
theme: editorTheme,
|
|
47
|
+
nodes,
|
|
48
|
+
editable: true,
|
|
49
|
+
onError: (error) => {
|
|
50
|
+
console.error("[RichEditor]", error);
|
|
51
|
+
},
|
|
52
|
+
...initialValue ? { editorState: JSON.stringify(initialValue) } : {}
|
|
53
|
+
};
|
|
54
|
+
const variantClass = getVariantClass(variant);
|
|
55
|
+
return /* @__PURE__ */ jsx(PortalThemeProvider, {
|
|
56
|
+
className: variantClass,
|
|
57
|
+
theme,
|
|
58
|
+
children: /* @__PURE__ */ jsx(ColorSchemeProvider, {
|
|
59
|
+
colorScheme: theme,
|
|
60
|
+
children: /* @__PURE__ */ jsx(RendererConfigProvider, {
|
|
61
|
+
config: rendererConfig,
|
|
62
|
+
mode: "editor",
|
|
63
|
+
variant,
|
|
64
|
+
children: /* @__PURE__ */ jsx(LexicalComposer, {
|
|
65
|
+
initialConfig,
|
|
66
|
+
children: /* @__PURE__ */ jsx(TextSelectionStoreProvider, { children: /* @__PURE__ */ jsx(FootnotePlugin, { children: /* @__PURE__ */ jsxs("div", {
|
|
67
|
+
suppressHydrationWarning: true,
|
|
68
|
+
className: clsx("rich-editor", variantClass, className),
|
|
69
|
+
"data-theme": theme,
|
|
70
|
+
style: {
|
|
71
|
+
...style,
|
|
72
|
+
maxWidth: "none"
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
header,
|
|
76
|
+
/* @__PURE__ */ jsx(RichTextPlugin, {
|
|
77
|
+
ErrorBoundary: LexicalErrorBoundary,
|
|
78
|
+
contentEditable: /* @__PURE__ */ jsx(ContentEditable$1, {
|
|
79
|
+
className: contentClassName,
|
|
80
|
+
hasHeader: !!header,
|
|
81
|
+
placeholder
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsx(HistoryPlugin, {}),
|
|
85
|
+
/* @__PURE__ */ jsx(OnChangePlugin, {
|
|
86
|
+
debounceMs,
|
|
87
|
+
onChange
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx(SubmitShortcutPlugin, { onSubmit }),
|
|
90
|
+
/* @__PURE__ */ jsx(EditorRefPlugin, { onEditorReady }),
|
|
91
|
+
autoFocus && /* @__PURE__ */ jsx(AutoFocusPlugin, {}),
|
|
92
|
+
children,
|
|
93
|
+
actions && /* @__PURE__ */ jsx("div", {
|
|
94
|
+
className: "rich-editor__actions",
|
|
95
|
+
children: actions
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}) }) })
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
});
|
|
116
103
|
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/RichEditor.tsx
|
|
117
106
|
function RichEditor({ extraNodes, imageUpload, children, ...shellProps }) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
107
|
+
const nodes = extraNodes ? [...allEditNodes, ...extraNodes] : allEditNodes;
|
|
108
|
+
const resolvedImageUpload = imageUpload ?? defaultImageUpload;
|
|
109
|
+
return /* @__PURE__ */ jsx(ImageUploadProvider, {
|
|
110
|
+
upload: resolvedImageUpload,
|
|
111
|
+
children: /* @__PURE__ */ jsx(ExtraNodesProvider, {
|
|
112
|
+
extraNodes,
|
|
113
|
+
children: /* @__PURE__ */ jsxs(RichEditorShell, {
|
|
114
|
+
nodes,
|
|
115
|
+
...shellProps,
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsx(CorePlugins, {}),
|
|
118
|
+
/* @__PURE__ */ jsx(ImagePlugin, {}),
|
|
119
|
+
/* @__PURE__ */ jsx(ImageUploadPlugin, { onUpload: resolvedImageUpload }),
|
|
120
|
+
/* @__PURE__ */ jsx(KaTeXPlugin, {}),
|
|
121
|
+
/* @__PURE__ */ jsx(AlertPlugin, {}),
|
|
122
|
+
/* @__PURE__ */ jsx(MermaidPlugin, {}),
|
|
123
|
+
/* @__PURE__ */ jsx(LinkFaviconPlugin, {}),
|
|
124
|
+
/* @__PURE__ */ jsx(BlockIdPlugin, {}),
|
|
125
|
+
/* @__PURE__ */ jsx(TextSelectionPlugin, {}),
|
|
126
|
+
children
|
|
127
|
+
]
|
|
128
|
+
})
|
|
129
|
+
})
|
|
130
|
+
});
|
|
132
131
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
i as $captureTextSelectionFromRangeSelection,
|
|
136
|
-
j as $getRootBlock,
|
|
137
|
-
k as $getTextOffsetInBlock,
|
|
138
|
-
l as $resolveSelectionPoint,
|
|
139
|
-
m as $restoreTextSelection,
|
|
140
|
-
ColorSchemeProvider,
|
|
141
|
-
CorePlugins,
|
|
142
|
-
ExtraNodesProvider,
|
|
143
|
-
F as FootnoteDefinitionsProvider,
|
|
144
|
-
L as LinkFavicon,
|
|
145
|
-
N as NestedContentRendererProvider,
|
|
146
|
-
P as PresentDialogProvider,
|
|
147
|
-
RendererConfigProvider,
|
|
148
|
-
RichEditor,
|
|
149
|
-
RichEditorShell,
|
|
150
|
-
n as TEXT_SELECTION_HIGHLIGHT_NAME,
|
|
151
|
-
TextSelectionStoreProvider,
|
|
152
|
-
articleTheme,
|
|
153
|
-
a2 as articleVariant,
|
|
154
|
-
f as blockIdState,
|
|
155
|
-
o as buildBlockAnchor,
|
|
156
|
-
p as buildRangeAnchor,
|
|
157
|
-
commentTheme,
|
|
158
|
-
c as commentVariant,
|
|
159
|
-
q as createDOMRangeFromTextSelection,
|
|
160
|
-
r as createTextSelectionStore,
|
|
161
|
-
d3 as detailsClassNames,
|
|
162
|
-
a3 as detailsStyles,
|
|
163
|
-
editorTheme,
|
|
164
|
-
s as findDOMPointByTextOffset,
|
|
165
|
-
t as getBlockElementById,
|
|
166
|
-
v as getDOMRectFromTextSelection,
|
|
167
|
-
w as getTextOffsetFromDOMPoint,
|
|
168
|
-
getVariantClass,
|
|
169
|
-
g2 as gridClassNames,
|
|
170
|
-
b3 as gridStyles,
|
|
171
|
-
k2 as katexClassNames,
|
|
172
|
-
b2 as katexStyles,
|
|
173
|
-
noteTheme,
|
|
174
|
-
n2 as noteVariant,
|
|
175
|
-
r2 as richContent,
|
|
176
|
-
s2 as semanticClassNames,
|
|
177
|
-
d2 as sharedStyles,
|
|
178
|
-
u2 as useColorScheme,
|
|
179
|
-
u as useExtraNodes,
|
|
180
|
-
u3 as useFootnoteContent,
|
|
181
|
-
b as useFootnoteDefinitions,
|
|
182
|
-
d as useFootnoteDisplayNumber,
|
|
183
|
-
u4 as useNestedContentRenderer,
|
|
184
|
-
p2 as useOptionalNestedContentRenderer,
|
|
185
|
-
a as usePresentDialog,
|
|
186
|
-
e as useRendererConfig,
|
|
187
|
-
f2 as useRendererMode,
|
|
188
|
-
x as useTextSelectionSnapshot,
|
|
189
|
-
y as useTextSelectionStore,
|
|
190
|
-
g as useVariant,
|
|
191
|
-
vars
|
|
192
|
-
};
|
|
132
|
+
//#endregion
|
|
133
|
+
export { $captureTextSelection, $captureTextSelectionFromRangeSelection, $getRootBlock, $getTextOffsetInBlock, $resolveSelectionPoint, $restoreTextSelection, ColorSchemeProvider, CorePlugins, ExtraNodesProvider, FootnoteDefinitionsProvider, LinkFavicon, NestedContentRendererProvider, PresentDialogProvider, RendererConfigProvider, RichEditor, RichEditorShell, TEXT_SELECTION_HIGHLIGHT_NAME, TextSelectionStoreProvider, articleTheme, articleVariant, blockIdState, buildBlockAnchor, buildRangeAnchor, commentTheme, commentVariant, createDOMRangeFromTextSelection, createTextSelectionStore, detailsClassNames, detailsStyles, editorTheme, findDOMPointByTextOffset, getBlockElementById, getDOMRectFromTextSelection, getTextOffsetFromDOMPoint, getVariantClass, gridClassNames, gridStyles, katexClassNames, katexStyles, noteTheme, noteVariant, richContent, semanticClassNames, sharedStyles, useColorScheme, useExtraNodes, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, useNestedContentRenderer, useOptionalNestedContentRenderer, usePresentDialog, useRendererConfig, useRendererMode, useTextSelectionSnapshot, useTextSelectionStore, useVariant, vars };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
//#region src/styles/shared.css.ts
|
|
2
|
+
var semanticClassNames = {
|
|
3
|
+
paragraph: "rich-paragraph",
|
|
4
|
+
textBold: "rich-text-bold",
|
|
5
|
+
textItalic: "rich-text-italic",
|
|
6
|
+
textUnderline: "rich-text-underline",
|
|
7
|
+
textStrikethrough: "rich-text-strikethrough",
|
|
8
|
+
textSuperscript: "rich-text-superscript",
|
|
9
|
+
textSubscript: "rich-text-subscript",
|
|
10
|
+
textCode: "rich-text-code",
|
|
11
|
+
textHighlight: "rich-text-highlight",
|
|
12
|
+
headingAnchor: "rich-heading-anchor",
|
|
13
|
+
headingH1: "rich-heading-h1",
|
|
14
|
+
headingH2: "rich-heading-h2",
|
|
15
|
+
headingH3: "rich-heading-h3",
|
|
16
|
+
headingH4: "rich-heading-h4",
|
|
17
|
+
headingH5: "rich-heading-h5",
|
|
18
|
+
headingH6: "rich-heading-h6",
|
|
19
|
+
link: "rich-link",
|
|
20
|
+
linkFavicon: "rich-link-favicon",
|
|
21
|
+
listOl: "rich-list-ol",
|
|
22
|
+
listUl: "rich-list-ul",
|
|
23
|
+
listItem: "rich-list-item",
|
|
24
|
+
listNestedItem: "rich-list-nested-item",
|
|
25
|
+
checklist: "rich-checklist",
|
|
26
|
+
listItemChecked: "rich-list-item-checked",
|
|
27
|
+
listItemUnchecked: "rich-list-item-unchecked",
|
|
28
|
+
quote: "rich-quote",
|
|
29
|
+
hr: "rich-hr",
|
|
30
|
+
tableScrollableWrapper: "rich-table-scrollable-wrapper",
|
|
31
|
+
table: "rich-table",
|
|
32
|
+
tableCell: "rich-table-cell",
|
|
33
|
+
tableCellHeader: "rich-table-cell-header",
|
|
34
|
+
spoiler: "rich-spoiler",
|
|
35
|
+
spoilerRevealed: "rich-spoiler-revealed",
|
|
36
|
+
tag: "rich-tag",
|
|
37
|
+
comment: "rich-comment",
|
|
38
|
+
ruby: "rich-ruby",
|
|
39
|
+
rubyRt: "rich-ruby-rt",
|
|
40
|
+
footnote: "rich-footnote",
|
|
41
|
+
footnoteRef: "rich-footnote-ref",
|
|
42
|
+
footnoteHighlight: "rich-footnote-highlight",
|
|
43
|
+
footnoteRefWrapper: "rich-footnote-ref-wrapper",
|
|
44
|
+
footnoteSection: "rich-footnote-section",
|
|
45
|
+
footnoteSectionDivider: "rich-footnote-section-divider",
|
|
46
|
+
footnoteSectionList: "rich-footnote-section-list",
|
|
47
|
+
footnoteSectionItem: "rich-footnote-section-item",
|
|
48
|
+
footnoteBackRef: "rich-footnote-back-ref",
|
|
49
|
+
footnoteSectionItemEdit: "rich-footnote-section-item-edit",
|
|
50
|
+
footnoteSectionItemNum: "rich-footnote-section-item-num",
|
|
51
|
+
footnoteSectionItemInput: "rich-footnote-section-item-input",
|
|
52
|
+
footnoteSectionItemRemove: "rich-footnote-section-item-remove",
|
|
53
|
+
dragHandle: "rich-drag-handle",
|
|
54
|
+
dropIndicator: "rich-drop-indicator",
|
|
55
|
+
alert: "rich-alert"
|
|
56
|
+
};
|
|
57
|
+
var richContent = "r8uj4t2";
|
|
58
|
+
var sharedStyles = {
|
|
59
|
+
paragraph: "r8uj4t3",
|
|
60
|
+
textBold: "r8uj4t4",
|
|
61
|
+
textItalic: "r8uj4t5",
|
|
62
|
+
textUnderline: "r8uj4t6",
|
|
63
|
+
textStrikethrough: "r8uj4t7",
|
|
64
|
+
textSuperscript: "r8uj4t8",
|
|
65
|
+
textSubscript: "r8uj4t9",
|
|
66
|
+
textCode: "r8uj4ta",
|
|
67
|
+
textHighlight: "r8uj4tb",
|
|
68
|
+
headingAnchor: "r8uj4tc",
|
|
69
|
+
headingH1: "r8uj4td",
|
|
70
|
+
headingH2: "r8uj4te",
|
|
71
|
+
headingH3: "r8uj4tf",
|
|
72
|
+
headingH4: "r8uj4tg",
|
|
73
|
+
headingH5: "r8uj4th",
|
|
74
|
+
headingH6: "r8uj4ti",
|
|
75
|
+
link: "r8uj4tj",
|
|
76
|
+
linkFavicon: "r8uj4tk",
|
|
77
|
+
listOl: "r8uj4tl",
|
|
78
|
+
listUl: "r8uj4tm",
|
|
79
|
+
listItem: "r8uj4tn",
|
|
80
|
+
listNestedItem: "r8uj4to",
|
|
81
|
+
checklist: "r8uj4tp",
|
|
82
|
+
listItemChecked: "r8uj4tr",
|
|
83
|
+
listItemUnchecked: "r8uj4tq",
|
|
84
|
+
quote: "r8uj4ts",
|
|
85
|
+
hr: "r8uj4tt",
|
|
86
|
+
tableScrollableWrapper: "r8uj4tu",
|
|
87
|
+
table: "r8uj4tx",
|
|
88
|
+
tableCell: "r8uj4tv",
|
|
89
|
+
tableCellHeader: "r8uj4tw",
|
|
90
|
+
spoiler: "r8uj4ty",
|
|
91
|
+
spoilerRevealed: "r8uj4tz",
|
|
92
|
+
tag: "r8uj4t10",
|
|
93
|
+
comment: "r8uj4t11",
|
|
94
|
+
ruby: "r8uj4t12",
|
|
95
|
+
rubyRt: "r8uj4t13",
|
|
96
|
+
footnote: "r8uj4t14",
|
|
97
|
+
footnoteRef: "r8uj4t15",
|
|
98
|
+
footnoteHighlight: "r8uj4t16",
|
|
99
|
+
footnoteRefWrapper: "r8uj4t17",
|
|
100
|
+
footnoteSection: "r8uj4t18",
|
|
101
|
+
footnoteSectionDivider: "r8uj4t19",
|
|
102
|
+
footnoteSectionList: "r8uj4t1a",
|
|
103
|
+
footnoteSectionItem: "r8uj4t1b",
|
|
104
|
+
footnoteBackRef: "r8uj4t1c",
|
|
105
|
+
footnoteSectionItemEdit: "r8uj4t1d",
|
|
106
|
+
footnoteSectionItemNum: "r8uj4t1e",
|
|
107
|
+
footnoteSectionItemInput: "r8uj4t1f",
|
|
108
|
+
footnoteSectionItemRemove: "r8uj4t1g",
|
|
109
|
+
dragHandle: "r8uj4t1h",
|
|
110
|
+
dropIndicator: "r8uj4t1i",
|
|
111
|
+
alert: "r8uj4t1j"
|
|
112
|
+
};
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/styles/article.css.ts
|
|
115
|
+
var articleVariant = "v10dui1 r8uj4t2 _13h71jk0 v10dui0";
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/styles/comment.css.ts
|
|
118
|
+
var commentVariant = "_14ko36c1 r8uj4t2 _13h71jk2 _14ko36c0";
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/styles/note.css.ts
|
|
121
|
+
var noteVariant = "ys4fw91 r8uj4t2 _13h71jk1 ys4fw90";
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/components/utils.ts
|
|
124
|
+
function clsx(...args) {
|
|
125
|
+
return args.filter(Boolean).join(" ");
|
|
126
|
+
}
|
|
127
|
+
function getVariantClass(variant) {
|
|
128
|
+
if (variant === "comment") return commentVariant;
|
|
129
|
+
if (variant === "note") return noteVariant;
|
|
130
|
+
return articleVariant;
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/styles/katex.css.ts
|
|
134
|
+
var katexClassNames = {
|
|
135
|
+
inline: "rich-katex-inline",
|
|
136
|
+
block: "rich-katex-block",
|
|
137
|
+
fallback: "rich-katex-fallback"
|
|
138
|
+
};
|
|
139
|
+
var katexStyles = {
|
|
140
|
+
inline: "egstxq0",
|
|
141
|
+
block: "egstxq1",
|
|
142
|
+
fallback: "egstxq2"
|
|
143
|
+
};
|
|
144
|
+
//#endregion
|
|
145
|
+
export { noteVariant as a, richContent as c, getVariantClass as i, semanticClassNames as l, katexStyles as n, commentVariant as o, clsx as r, articleVariant as s, katexClassNames as t, sharedStyles as u };
|