@haklex/rich-renderer-katex 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/index.mjs CHANGED
@@ -1,12 +1,48 @@
1
- import { $isKaTeXInlineNode, $isKaTeXBlockNode, KaTeXBlockNode, KaTeXInlineNode } from "@haklex/rich-editor/nodes";
1
+ import { $isKaTeXBlockNode, $isKaTeXInlineNode, KaTeXBlockNode, KaTeXInlineNode } from "@haklex/rich-editor/nodes";
2
2
  import { KaTeXRenderer, createRendererDecoration } from "@haklex/rich-editor/renderers";
3
- import { useState, useRef, useCallback, useEffect, useMemo, createElement } from "react";
4
- import { jsxs, jsx } from "react/jsx-runtime";
5
- import { Popover, PopoverTrigger, PopoverPanel, AnimatedTabs, ActionButton, ActionBar } from "@haklex/rich-editor-ui";
3
+ import { createElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
4
+ import { ActionBar, ActionButton, AnimatedTabs, Popover, PopoverPanel, PopoverTrigger } from "@haklex/rich-editor-ui";
6
5
  import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
7
6
  import { $getNodeByKey } from "lexical";
8
- import { Terminal, Trash2, Check, Copy, RotateCcw, Search } from "lucide-react";
9
- var semanticClassNames = { editWrapper: "rich-katex-edit-wrapper", panel: "rich-katex-editor-panel", header: "rich-katex-editor-header", headerLeft: "rich-katex-editor-header-left", iconWrap: "rich-katex-editor-icon-wrap", title: "rich-katex-editor-title", headerRight: "rich-katex-editor-header-right", mode: "rich-katex-editor-mode", deleteButton: "rich-katex-editor-delete", tabs: "rich-katex-editor-tabs", bodyScrollArea: "rich-katex-editor-body-scroll-area", body: "rich-katex-editor-body", field: "rich-katex-editor-field", label: "rich-katex-editor-label", inputWrap: "rich-katex-editor-input-wrap", textarea: "rich-katex-editor-textarea", inputActions: "rich-katex-editor-input-actions", preview: "rich-katex-editor-preview", previewEmpty: "rich-katex-editor-preview-empty", snippetSearchWrap: "rich-katex-editor-snippet-search-wrap", snippetSearchIcon: "rich-katex-editor-snippet-search-icon", snippetSearchInput: "rich-katex-editor-snippet-search-input", snippetGroups: "rich-katex-editor-snippet-groups", snippetGroup: "rich-katex-editor-snippet-group", snippetGroupLabel: "rich-katex-editor-snippet-group-label", snippetList: "rich-katex-editor-snippet-list", snippetButton: "rich-katex-editor-snippet-button", snippetMeta: "rich-katex-editor-snippet-meta", snippetName: "rich-katex-editor-snippet-name", snippetHint: "rich-katex-editor-snippet-hint", snippetPreview: "rich-katex-editor-snippet-preview", snippetsPlaceholder: "rich-katex-editor-snippets-placeholder", footer: "rich-katex-editor-footer", charCount: "rich-katex-editor-charcount" };
7
+ import { Check, Copy, RotateCcw, Search, Terminal, Trash2 } from "lucide-react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ //#region src/styles.css.ts
10
+ var semanticClassNames = {
11
+ editWrapper: "rich-katex-edit-wrapper",
12
+ panel: "rich-katex-editor-panel",
13
+ header: "rich-katex-editor-header",
14
+ headerLeft: "rich-katex-editor-header-left",
15
+ iconWrap: "rich-katex-editor-icon-wrap",
16
+ title: "rich-katex-editor-title",
17
+ headerRight: "rich-katex-editor-header-right",
18
+ mode: "rich-katex-editor-mode",
19
+ deleteButton: "rich-katex-editor-delete",
20
+ tabs: "rich-katex-editor-tabs",
21
+ bodyScrollArea: "rich-katex-editor-body-scroll-area",
22
+ body: "rich-katex-editor-body",
23
+ field: "rich-katex-editor-field",
24
+ label: "rich-katex-editor-label",
25
+ inputWrap: "rich-katex-editor-input-wrap",
26
+ textarea: "rich-katex-editor-textarea",
27
+ inputActions: "rich-katex-editor-input-actions",
28
+ preview: "rich-katex-editor-preview",
29
+ previewEmpty: "rich-katex-editor-preview-empty",
30
+ snippetSearchWrap: "rich-katex-editor-snippet-search-wrap",
31
+ snippetSearchIcon: "rich-katex-editor-snippet-search-icon",
32
+ snippetSearchInput: "rich-katex-editor-snippet-search-input",
33
+ snippetGroups: "rich-katex-editor-snippet-groups",
34
+ snippetGroup: "rich-katex-editor-snippet-group",
35
+ snippetGroupLabel: "rich-katex-editor-snippet-group-label",
36
+ snippetList: "rich-katex-editor-snippet-list",
37
+ snippetButton: "rich-katex-editor-snippet-button",
38
+ snippetMeta: "rich-katex-editor-snippet-meta",
39
+ snippetName: "rich-katex-editor-snippet-name",
40
+ snippetHint: "rich-katex-editor-snippet-hint",
41
+ snippetPreview: "rich-katex-editor-snippet-preview",
42
+ snippetsPlaceholder: "rich-katex-editor-snippets-placeholder",
43
+ footer: "rich-katex-editor-footer",
44
+ charCount: "rich-katex-editor-charcount"
45
+ };
10
46
  var editWrapper = "mkenhu0";
11
47
  var panel = "mkenhu1";
12
48
  var header = "mkenhu2";
@@ -18,576 +54,487 @@ var mode = "mkenhu7";
18
54
  var deleteButton = "mkenhu8";
19
55
  var tabs = "mkenhu9";
20
56
  var bodyScrollArea = "mkenhua";
21
- var body = "mkenhub";
22
- var field = "mkenhuc";
23
- var label = "mkenhud";
24
- var inputWrap = "mkenhue";
25
- var textarea = "mkenhuf";
26
- var inputActions = "mkenhug";
27
- var preview = "mkenhuh";
28
- var previewEmpty = "mkenhui";
29
- var snippetSearchWrap = "mkenhuj";
30
- var snippetSearchIcon = "mkenhuk";
31
- var snippetSearchInput = "mkenhul";
32
- var snippetGroups = "mkenhum";
33
- var snippetGroup = "mkenhun";
34
- var snippetGroupLabel = "mkenhuo";
35
- var snippetList = "mkenhup";
36
- var snippetButton = "mkenhuq";
37
- var snippetMeta = "mkenhur";
38
- var snippetName = "mkenhus";
39
- var snippetHint = "mkenhut";
40
- var snippetPreview = "mkenhuu";
41
- var snippetsPlaceholder = "mkenhuv";
42
57
  var footer = "mkenhuw";
43
58
  var charCount = "mkenhux";
44
- const CURSOR_TOKEN = "__cursor__";
45
- const katexSnippets = [
46
- {
47
- id: "frac",
48
- title: "Fraction",
49
- template: `\\frac{1}{${CURSOR_TOKEN}}`,
50
- previewEquation: "\\frac{a}{b}",
51
- category: "Basic",
52
- keywords: ["fraction", "divide", "ratio"]
53
- },
54
- {
55
- id: "sqrt",
56
- title: "Square Root",
57
- template: `\\sqrt{${CURSOR_TOKEN}}`,
58
- previewEquation: "\\sqrt{x}",
59
- category: "Basic",
60
- keywords: ["root", "radical"]
61
- },
62
- {
63
- id: "alpha",
64
- title: "Alpha",
65
- template: `\\alpha${CURSOR_TOKEN}`,
66
- previewEquation: "\\alpha",
67
- category: "Greek",
68
- keywords: ["greek", "letter"]
69
- },
70
- {
71
- id: "theta",
72
- title: "Theta",
73
- template: `\\theta${CURSOR_TOKEN}`,
74
- previewEquation: "\\theta",
75
- category: "Greek",
76
- keywords: ["greek", "angle", "letter"]
77
- },
78
- {
79
- id: "sum",
80
- title: "Summation",
81
- template: `\\sum_{i=1}^{n} ${CURSOR_TOKEN}`,
82
- previewEquation: "\\sum_{i=1}^{n} x_i",
83
- category: "Operators",
84
- keywords: ["series", "sigma", "total"]
85
- },
86
- {
87
- id: "int",
88
- title: "Integral",
89
- template: `\\int_{a}^{b} ${CURSOR_TOKEN} \\, dx`,
90
- previewEquation: "\\int_{a}^{b} f(x) \\, dx",
91
- category: "Operators",
92
- keywords: ["integral", "calculus"]
93
- },
94
- {
95
- id: "matrix",
96
- title: "Matrix",
97
- template: `\\begin{bmatrix}${CURSOR_TOKEN}\\end{bmatrix}`,
98
- previewEquation: "\\begin{bmatrix} a & b \\\\ c & d \\end{bmatrix}",
99
- category: "Structures",
100
- keywords: ["array", "linear algebra"]
101
- },
102
- {
103
- id: "cases",
104
- title: "Cases",
105
- template: `\\begin{cases}${CURSOR_TOKEN}\\end{cases}`,
106
- previewEquation: "\\begin{cases} x & x > 0 \\\\ 0 & x = 0 \\end{cases}",
107
- category: "Structures",
108
- keywords: ["piecewise", "conditional"]
109
- }
59
+ //#endregion
60
+ //#region src/snippets.ts
61
+ var CURSOR_TOKEN = "__cursor__";
62
+ var katexSnippets = [
63
+ {
64
+ id: "frac",
65
+ title: "Fraction",
66
+ template: `\\frac{1}{${CURSOR_TOKEN}}`,
67
+ previewEquation: "\\frac{a}{b}",
68
+ category: "Basic",
69
+ keywords: [
70
+ "fraction",
71
+ "divide",
72
+ "ratio"
73
+ ]
74
+ },
75
+ {
76
+ id: "sqrt",
77
+ title: "Square Root",
78
+ template: `\\sqrt{${CURSOR_TOKEN}}`,
79
+ previewEquation: "\\sqrt{x}",
80
+ category: "Basic",
81
+ keywords: ["root", "radical"]
82
+ },
83
+ {
84
+ id: "alpha",
85
+ title: "Alpha",
86
+ template: `\\alpha${CURSOR_TOKEN}`,
87
+ previewEquation: "\\alpha",
88
+ category: "Greek",
89
+ keywords: ["greek", "letter"]
90
+ },
91
+ {
92
+ id: "theta",
93
+ title: "Theta",
94
+ template: `\\theta${CURSOR_TOKEN}`,
95
+ previewEquation: "\\theta",
96
+ category: "Greek",
97
+ keywords: [
98
+ "greek",
99
+ "angle",
100
+ "letter"
101
+ ]
102
+ },
103
+ {
104
+ id: "sum",
105
+ title: "Summation",
106
+ template: `\\sum_{i=1}^{n} ${CURSOR_TOKEN}`,
107
+ previewEquation: "\\sum_{i=1}^{n} x_i",
108
+ category: "Operators",
109
+ keywords: [
110
+ "series",
111
+ "sigma",
112
+ "total"
113
+ ]
114
+ },
115
+ {
116
+ id: "int",
117
+ title: "Integral",
118
+ template: `\\int_{a}^{b} ${CURSOR_TOKEN} \\, dx`,
119
+ previewEquation: "\\int_{a}^{b} f(x) \\, dx",
120
+ category: "Operators",
121
+ keywords: ["integral", "calculus"]
122
+ },
123
+ {
124
+ id: "matrix",
125
+ title: "Matrix",
126
+ template: `\\begin{bmatrix}${CURSOR_TOKEN}\\end{bmatrix}`,
127
+ previewEquation: "\\begin{bmatrix} a & b \\\\ c & d \\end{bmatrix}",
128
+ category: "Structures",
129
+ keywords: ["array", "linear algebra"]
130
+ },
131
+ {
132
+ id: "cases",
133
+ title: "Cases",
134
+ template: `\\begin{cases}${CURSOR_TOKEN}\\end{cases}`,
135
+ previewEquation: "\\begin{cases} x & x > 0 \\\\ 0 & x = 0 \\end{cases}",
136
+ category: "Structures",
137
+ keywords: ["piecewise", "conditional"]
138
+ }
110
139
  ];
111
140
  function filterKaTeXSnippets(query) {
112
- const normalizedQuery = query.trim().toLowerCase();
113
- if (!normalizedQuery) {
114
- return katexSnippets;
115
- }
116
- return katexSnippets.filter((snippet) => {
117
- const haystack = [
118
- snippet.id,
119
- snippet.title,
120
- snippet.category,
121
- snippet.previewEquation,
122
- ...snippet.keywords
123
- ].join(" ").toLowerCase();
124
- return haystack.includes(normalizedQuery);
125
- });
141
+ const normalizedQuery = query.trim().toLowerCase();
142
+ if (!normalizedQuery) return katexSnippets;
143
+ return katexSnippets.filter((snippet) => {
144
+ return [
145
+ snippet.id,
146
+ snippet.title,
147
+ snippet.category,
148
+ snippet.previewEquation,
149
+ ...snippet.keywords
150
+ ].join(" ").toLowerCase().includes(normalizedQuery);
151
+ });
126
152
  }
127
153
  function insertSnippetAtSelection(value, template, selectionStart, selectionEnd) {
128
- const start = selectionStart ?? value.length;
129
- const end = selectionEnd ?? start;
130
- const cursorOffset = template.indexOf(CURSOR_TOKEN);
131
- const sanitizedTemplate = template.replace(CURSOR_TOKEN, "");
132
- const nextValue = value.slice(0, start) + sanitizedTemplate + value.slice(Math.max(start, end));
133
- const nextCursorPosition = start + (cursorOffset >= 0 ? cursorOffset : sanitizedTemplate.length);
134
- return {
135
- value: nextValue,
136
- selectionStart: nextCursorPosition,
137
- selectionEnd: nextCursorPosition
138
- };
139
- }
140
- const SNIPPET_CATEGORY_ORDER = ["Basic", "Greek", "Operators", "Structures"];
141
- function KaTeXEditDecorator({
142
- nodeKey,
143
- equation,
144
- displayMode,
145
- autoOpenOnMount,
146
- children
147
- }) {
148
- const [editor] = useLexicalComposerContext();
149
- const editable = editor.isEditable();
150
- const [open, setOpen] = useState(autoOpenOnMount);
151
- const [value, setValue] = useState(equation);
152
- const [copied, setCopied] = useState(false);
153
- const [activeTab, setActiveTab] = useState("editor");
154
- const [snippetQuery, setSnippetQuery] = useState("");
155
- const inputRef = useRef(null);
156
- const selectionRef = useRef({
157
- start: null,
158
- end: null
159
- });
160
- const syncSelection = useCallback((target) => {
161
- if (!target) return;
162
- selectionRef.current = {
163
- start: target.selectionStart,
164
- end: target.selectionEnd
165
- };
166
- }, []);
167
- useEffect(() => {
168
- if (autoOpenOnMount) {
169
- editor.update(() => {
170
- const node = $getNodeByKey(nodeKey);
171
- if ($isKaTeXInlineNode(node) || $isKaTeXBlockNode(node)) {
172
- node.setShouldAutoOpenOnMount(false);
173
- }
174
- });
175
- }
176
- }, [autoOpenOnMount, editor, nodeKey]);
177
- useEffect(() => {
178
- setValue(equation);
179
- }, [equation]);
180
- useEffect(() => {
181
- if (open && inputRef.current) {
182
- inputRef.current.focus();
183
- inputRef.current.select();
184
- syncSelection(inputRef.current);
185
- }
186
- }, [open, syncSelection]);
187
- const commit = useCallback(() => {
188
- const trimmed = value.trim();
189
- if (!trimmed) return;
190
- editor.update(() => {
191
- const node = $getNodeByKey(nodeKey);
192
- if ($isKaTeXInlineNode(node) && node.getEquation() !== trimmed) {
193
- node.setEquation(trimmed);
194
- } else if ($isKaTeXBlockNode(node) && node.getEquation() !== trimmed) {
195
- node.setEquation(trimmed);
196
- }
197
- });
198
- setOpen(false);
199
- }, [editor, nodeKey, value]);
200
- const cancel = useCallback(() => {
201
- setValue(equation);
202
- setOpen(false);
203
- }, [equation]);
204
- const handleDelete = useCallback(() => {
205
- editor.update(() => {
206
- const node = $getNodeByKey(nodeKey);
207
- if (node) node.remove();
208
- });
209
- }, [editor, nodeKey]);
210
- const handleCopy = useCallback(() => {
211
- navigator.clipboard.writeText(value);
212
- setCopied(true);
213
- setTimeout(setCopied, 2e3, false);
214
- }, [value]);
215
- const handleReset = useCallback(() => {
216
- setValue(equation);
217
- inputRef.current?.focus();
218
- }, [equation]);
219
- const handleInsertSnippet = useCallback(
220
- (template) => {
221
- const next = insertSnippetAtSelection(
222
- value,
223
- template,
224
- selectionRef.current.start,
225
- selectionRef.current.end
226
- );
227
- setValue(next.value);
228
- setActiveTab("editor");
229
- requestAnimationFrame(() => {
230
- const input = inputRef.current;
231
- if (!input) return;
232
- input.focus();
233
- input.setSelectionRange(next.selectionStart, next.selectionEnd);
234
- selectionRef.current = {
235
- start: next.selectionStart,
236
- end: next.selectionEnd
237
- };
238
- });
239
- },
240
- [value]
241
- );
242
- const filteredSnippets = useMemo(() => filterKaTeXSnippets(snippetQuery), [snippetQuery]);
243
- const groupedSnippets = useMemo(
244
- () => SNIPPET_CATEGORY_ORDER.map((category) => ({
245
- category,
246
- items: filteredSnippets.filter((snippet) => snippet.category === category)
247
- })).filter((group) => group.items.length > 0),
248
- [filteredSnippets]
249
- );
250
- const handleKeyDown = useCallback(
251
- (e) => {
252
- if (e.key === "Escape") {
253
- e.preventDefault();
254
- cancel();
255
- } else if (displayMode && e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
256
- e.preventDefault();
257
- commit();
258
- } else if (!displayMode && e.key === "Enter" && !e.shiftKey) {
259
- e.preventDefault();
260
- commit();
261
- }
262
- },
263
- [commit, cancel, displayMode]
264
- );
265
- if (!editable) {
266
- return children;
267
- }
268
- return /* @__PURE__ */ jsxs(
269
- Popover,
270
- {
271
- open,
272
- onOpenChange: (nextOpen) => {
273
- setOpen(nextOpen);
274
- if (!nextOpen) {
275
- setValue(equation);
276
- }
277
- },
278
- children: [
279
- /* @__PURE__ */ jsx(
280
- PopoverTrigger,
281
- {
282
- nativeButton: false,
283
- render: /* @__PURE__ */ jsx(
284
- "span",
285
- {
286
- className: `${editWrapper} ${semanticClassNames.editWrapper}`,
287
- title: "Click to edit"
288
- }
289
- ),
290
- children
291
- }
292
- ),
293
- /* @__PURE__ */ jsxs(
294
- PopoverPanel,
295
- {
296
- className: `${panel} ${semanticClassNames.panel}`,
297
- initialFocus: inputRef,
298
- side: "bottom",
299
- sideOffset: 8,
300
- children: [
301
- /* @__PURE__ */ jsxs("div", { className: `${header} ${semanticClassNames.header}`, children: [
302
- /* @__PURE__ */ jsxs("div", { className: `${headerLeft} ${semanticClassNames.headerLeft}`, children: [
303
- /* @__PURE__ */ jsx("div", { className: `${iconWrap} ${semanticClassNames.iconWrap}`, children: /* @__PURE__ */ jsx(Terminal, { size: 12 }) }),
304
- /* @__PURE__ */ jsx("span", { className: `${title} ${semanticClassNames.title}`, children: "Math Editor" })
305
- ] }),
306
- /* @__PURE__ */ jsxs("div", { className: `${headerRight} ${semanticClassNames.headerRight}`, children: [
307
- /* @__PURE__ */ jsx("span", { className: `${mode} ${semanticClassNames.mode}`, children: displayMode ? "Block" : "Inline" }),
308
- /* @__PURE__ */ jsx(
309
- "button",
310
- {
311
- className: `${deleteButton} ${semanticClassNames.deleteButton}`,
312
- title: "Delete node",
313
- type: "button",
314
- onClick: handleDelete,
315
- children: /* @__PURE__ */ jsx(Trash2, { size: 14 })
316
- }
317
- )
318
- ] })
319
- ] }),
320
- /* @__PURE__ */ jsx(
321
- AnimatedTabs,
322
- {
323
- className: `${tabs} ${semanticClassNames.tabs}`,
324
- value: activeTab,
325
- tabs: [
326
- { id: "editor", label: "Editor" },
327
- { id: "snippets", label: "Snippets" }
328
- ],
329
- onChange: (id) => setActiveTab(id)
330
- }
331
- ),
332
- /* @__PURE__ */ jsxs("div", { className: `${bodyScrollArea} ${semanticClassNames.bodyScrollArea}`, children: [
333
- activeTab === "editor" && /* @__PURE__ */ jsxs("div", { className: `${body} ${semanticClassNames.body}`, children: [
334
- /* @__PURE__ */ jsxs("div", { className: `${field} ${semanticClassNames.field}`, children: [
335
- /* @__PURE__ */ jsx("label", { className: `${label} ${semanticClassNames.label}`, children: "LaTeX Input" }),
336
- /* @__PURE__ */ jsxs("div", { className: `${inputWrap} ${semanticClassNames.inputWrap}`, children: [
337
- /* @__PURE__ */ jsx(
338
- "textarea",
339
- {
340
- autoCapitalize: "off",
341
- autoComplete: "off",
342
- autoCorrect: "off",
343
- className: `${textarea} ${semanticClassNames.textarea}`,
344
- placeholder: "e.g. \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",
345
- ref: inputRef,
346
- rows: displayMode ? 4 : 3,
347
- spellCheck: false,
348
- value,
349
- onClick: (e) => syncSelection(e.currentTarget),
350
- onKeyDown: handleKeyDown,
351
- onKeyUp: (e) => syncSelection(e.currentTarget),
352
- onSelect: (e) => syncSelection(e.currentTarget),
353
- onChange: (e) => {
354
- setValue(e.target.value);
355
- syncSelection(e.target);
356
- }
357
- }
358
- ),
359
- /* @__PURE__ */ jsxs(
360
- "div",
361
- {
362
- className: `${inputActions} ${semanticClassNames.inputActions}`,
363
- children: [
364
- /* @__PURE__ */ jsx(
365
- ActionButton,
366
- {
367
- icon: true,
368
- disabled: !value.trim(),
369
- size: "sm",
370
- title: "Copy LaTeX",
371
- onClick: handleCopy,
372
- children: copied ? /* @__PURE__ */ jsx(Check, { size: 12, style: { color: "#22c55e" } }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
373
- }
374
- ),
375
- /* @__PURE__ */ jsx(
376
- ActionButton,
377
- {
378
- icon: true,
379
- disabled: value === equation,
380
- size: "sm",
381
- title: "Reset",
382
- onClick: handleReset,
383
- children: /* @__PURE__ */ jsx(RotateCcw, { size: 12 })
384
- }
385
- )
386
- ]
387
- }
388
- )
389
- ] })
390
- ] }),
391
- /* @__PURE__ */ jsxs("div", { className: `${field} ${semanticClassNames.field}`, children: [
392
- /* @__PURE__ */ jsx("label", { className: `${label} ${semanticClassNames.label}`, children: "Preview" }),
393
- /* @__PURE__ */ jsx("div", { className: `${preview} ${semanticClassNames.preview}`, children: value.trim() ? /* @__PURE__ */ jsx(KaTeXRenderer, { displayMode, equation: value }) : /* @__PURE__ */ jsx(
394
- "span",
395
- {
396
- className: `${previewEmpty} ${semanticClassNames.previewEmpty}`,
397
- children: "Enter a formula"
398
- }
399
- ) })
400
- ] })
401
- ] }),
402
- activeTab === "snippets" && /* @__PURE__ */ jsxs("div", { className: `${body} ${semanticClassNames.body}`, children: [
403
- /* @__PURE__ */ jsxs(
404
- "div",
405
- {
406
- className: `${snippetSearchWrap} ${semanticClassNames.snippetSearchWrap}`,
407
- children: [
408
- /* @__PURE__ */ jsx(
409
- Search,
410
- {
411
- className: `${snippetSearchIcon} ${semanticClassNames.snippetSearchIcon}`,
412
- size: 14
413
- }
414
- ),
415
- /* @__PURE__ */ jsx(
416
- "input",
417
- {
418
- autoComplete: "off",
419
- className: `${snippetSearchInput} ${semanticClassNames.snippetSearchInput}`,
420
- placeholder: "Search snippets: frac, matrix, sum...",
421
- type: "text",
422
- value: snippetQuery,
423
- onChange: (e) => setSnippetQuery(e.target.value)
424
- }
425
- )
426
- ]
427
- }
428
- ),
429
- groupedSnippets.length > 0 ? /* @__PURE__ */ jsx(
430
- "div",
431
- {
432
- className: `${snippetGroups} ${semanticClassNames.snippetGroups}`,
433
- children: groupedSnippets.map((group) => /* @__PURE__ */ jsxs(
434
- "section",
435
- {
436
- className: `${snippetGroup} ${semanticClassNames.snippetGroup}`,
437
- children: [
438
- /* @__PURE__ */ jsx(
439
- "div",
440
- {
441
- className: `${snippetGroupLabel} ${semanticClassNames.snippetGroupLabel}`,
442
- children: group.category
443
- }
444
- ),
445
- /* @__PURE__ */ jsx(
446
- "div",
447
- {
448
- className: `${snippetList} ${semanticClassNames.snippetList}`,
449
- children: group.items.map((snippet) => /* @__PURE__ */ jsxs(
450
- "button",
451
- {
452
- className: `${snippetButton} ${semanticClassNames.snippetButton}`,
453
- type: "button",
454
- onClick: () => handleInsertSnippet(snippet.template),
455
- children: [
456
- /* @__PURE__ */ jsxs(
457
- "div",
458
- {
459
- className: `${snippetMeta} ${semanticClassNames.snippetMeta}`,
460
- children: [
461
- /* @__PURE__ */ jsx(
462
- "span",
463
- {
464
- className: `${snippetName} ${semanticClassNames.snippetName}`,
465
- children: snippet.title
466
- }
467
- ),
468
- /* @__PURE__ */ jsx(
469
- "span",
470
- {
471
- className: `${snippetHint} ${semanticClassNames.snippetHint}`,
472
- children: snippet.template.replace(CURSOR_TOKEN, "")
473
- }
474
- )
475
- ]
476
- }
477
- ),
478
- /* @__PURE__ */ jsx(
479
- "span",
480
- {
481
- className: `${snippetPreview} ${semanticClassNames.snippetPreview}`,
482
- children: /* @__PURE__ */ jsx(
483
- KaTeXRenderer,
484
- {
485
- displayMode: false,
486
- equation: snippet.previewEquation
487
- }
488
- )
489
- }
490
- )
491
- ]
492
- },
493
- snippet.id
494
- ))
495
- }
496
- )
497
- ]
498
- },
499
- group.category
500
- ))
501
- }
502
- ) : /* @__PURE__ */ jsxs(
503
- "div",
504
- {
505
- className: `${snippetsPlaceholder} ${semanticClassNames.snippetsPlaceholder}`,
506
- children: [
507
- "No snippets match “",
508
- snippetQuery.trim(),
509
- "”"
510
- ]
511
- }
512
- )
513
- ] })
514
- ] }),
515
- /* @__PURE__ */ jsxs("div", { className: `${footer} ${semanticClassNames.footer}`, children: [
516
- /* @__PURE__ */ jsx("span", { className: `${charCount} ${semanticClassNames.charCount}`, children: value.trim() ? `${value.length} chars` : "Enter a formula" }),
517
- /* @__PURE__ */ jsxs(ActionBar, { children: [
518
- /* @__PURE__ */ jsx(ActionButton, { size: "md", variant: "ghost", onClick: cancel, children: "Cancel" }),
519
- /* @__PURE__ */ jsx(ActionButton, { disabled: !value.trim(), size: "md", variant: "accent", onClick: commit, children: "Save" })
520
- ] })
521
- ] })
522
- ]
523
- }
524
- )
525
- ]
526
- }
527
- );
528
- }
529
- class KaTeXBlockEditNode extends KaTeXBlockNode {
530
- static clone(node) {
531
- return new KaTeXBlockEditNode(
532
- node.__equation,
533
- node.__key,
534
- node.getShouldAutoOpenOnMount()
535
- );
536
- }
537
- static importJSON(serializedNode) {
538
- return new KaTeXBlockEditNode(serializedNode.equation);
539
- }
540
- decorate(_editor, _config) {
541
- const rendererEl = createRendererDecoration("KaTeX", KaTeXRenderer, {
542
- equation: this.__equation,
543
- displayMode: true
544
- });
545
- return createElement(KaTeXEditDecorator, {
546
- nodeKey: this.__key,
547
- equation: this.__equation,
548
- displayMode: true,
549
- autoOpenOnMount: this.getShouldAutoOpenOnMount(),
550
- children: rendererEl
551
- });
552
- }
154
+ const start = selectionStart ?? value.length;
155
+ const end = selectionEnd ?? start;
156
+ const cursorOffset = template.indexOf(CURSOR_TOKEN);
157
+ const sanitizedTemplate = template.replace(CURSOR_TOKEN, "");
158
+ const nextValue = value.slice(0, start) + sanitizedTemplate + value.slice(Math.max(start, end));
159
+ const nextCursorPosition = start + (cursorOffset >= 0 ? cursorOffset : sanitizedTemplate.length);
160
+ return {
161
+ value: nextValue,
162
+ selectionStart: nextCursorPosition,
163
+ selectionEnd: nextCursorPosition
164
+ };
553
165
  }
554
- class KaTeXInlineEditNode extends KaTeXInlineNode {
555
- static clone(node) {
556
- return new KaTeXInlineEditNode(
557
- node.__equation,
558
- node.__key,
559
- node.getShouldAutoOpenOnMount(),
560
- node.__color
561
- );
562
- }
563
- static importJSON(serializedNode) {
564
- const node = new KaTeXInlineEditNode(serializedNode.equation);
565
- if (serializedNode.color) node.setColor(serializedNode.color);
566
- return node;
567
- }
568
- decorate(_editor, _config) {
569
- const rendererEl = createRendererDecoration("KaTeX", KaTeXRenderer, {
570
- equation: this.__equation,
571
- displayMode: false
572
- });
573
- const decorator = createElement(KaTeXEditDecorator, {
574
- nodeKey: this.__key,
575
- equation: this.__equation,
576
- displayMode: false,
577
- autoOpenOnMount: this.getShouldAutoOpenOnMount(),
578
- children: rendererEl
579
- });
580
- if (!this.__color) return decorator;
581
- return createElement("span", { style: { color: this.__color } }, decorator);
582
- }
583
- }
584
- const katexEditNodes = [
585
- KaTeXBlockEditNode,
586
- KaTeXInlineEditNode
166
+ //#endregion
167
+ //#region src/KaTeXEditDecorator.tsx
168
+ var SNIPPET_CATEGORY_ORDER = [
169
+ "Basic",
170
+ "Greek",
171
+ "Operators",
172
+ "Structures"
587
173
  ];
588
- export {
589
- KaTeXBlockEditNode,
590
- KaTeXEditDecorator,
591
- KaTeXInlineEditNode,
592
- katexEditNodes
174
+ function KaTeXEditDecorator({ nodeKey, equation, displayMode, autoOpenOnMount, children }) {
175
+ const [editor] = useLexicalComposerContext();
176
+ const editable = editor.isEditable();
177
+ const [open, setOpen] = useState(autoOpenOnMount);
178
+ const [value, setValue] = useState(equation);
179
+ const [copied, setCopied] = useState(false);
180
+ const [activeTab, setActiveTab] = useState("editor");
181
+ const [snippetQuery, setSnippetQuery] = useState("");
182
+ const inputRef = useRef(null);
183
+ const selectionRef = useRef({
184
+ start: null,
185
+ end: null
186
+ });
187
+ const syncSelection = useCallback((target) => {
188
+ if (!target) return;
189
+ selectionRef.current = {
190
+ start: target.selectionStart,
191
+ end: target.selectionEnd
192
+ };
193
+ }, []);
194
+ useEffect(() => {
195
+ if (autoOpenOnMount) editor.update(() => {
196
+ const node = $getNodeByKey(nodeKey);
197
+ if ($isKaTeXInlineNode(node) || $isKaTeXBlockNode(node)) node.setShouldAutoOpenOnMount(false);
198
+ });
199
+ }, [
200
+ autoOpenOnMount,
201
+ editor,
202
+ nodeKey
203
+ ]);
204
+ useEffect(() => {
205
+ setValue(equation);
206
+ }, [equation]);
207
+ useEffect(() => {
208
+ if (open && inputRef.current) {
209
+ inputRef.current.focus();
210
+ inputRef.current.select();
211
+ syncSelection(inputRef.current);
212
+ }
213
+ }, [open, syncSelection]);
214
+ const commit = useCallback(() => {
215
+ const trimmed = value.trim();
216
+ if (!trimmed) return;
217
+ editor.update(() => {
218
+ const node = $getNodeByKey(nodeKey);
219
+ if ($isKaTeXInlineNode(node) && node.getEquation() !== trimmed) node.setEquation(trimmed);
220
+ else if ($isKaTeXBlockNode(node) && node.getEquation() !== trimmed) node.setEquation(trimmed);
221
+ });
222
+ setOpen(false);
223
+ }, [
224
+ editor,
225
+ nodeKey,
226
+ value
227
+ ]);
228
+ const cancel = useCallback(() => {
229
+ setValue(equation);
230
+ setOpen(false);
231
+ }, [equation]);
232
+ const handleDelete = useCallback(() => {
233
+ editor.update(() => {
234
+ const node = $getNodeByKey(nodeKey);
235
+ if (node) node.remove();
236
+ });
237
+ }, [editor, nodeKey]);
238
+ const handleCopy = useCallback(() => {
239
+ navigator.clipboard.writeText(value);
240
+ setCopied(true);
241
+ setTimeout(setCopied, 2e3, false);
242
+ }, [value]);
243
+ const handleReset = useCallback(() => {
244
+ setValue(equation);
245
+ inputRef.current?.focus();
246
+ }, [equation]);
247
+ const handleInsertSnippet = useCallback((template) => {
248
+ const next = insertSnippetAtSelection(value, template, selectionRef.current.start, selectionRef.current.end);
249
+ setValue(next.value);
250
+ setActiveTab("editor");
251
+ requestAnimationFrame(() => {
252
+ const input = inputRef.current;
253
+ if (!input) return;
254
+ input.focus();
255
+ input.setSelectionRange(next.selectionStart, next.selectionEnd);
256
+ selectionRef.current = {
257
+ start: next.selectionStart,
258
+ end: next.selectionEnd
259
+ };
260
+ });
261
+ }, [value]);
262
+ const filteredSnippets = useMemo(() => filterKaTeXSnippets(snippetQuery), [snippetQuery]);
263
+ const groupedSnippets = useMemo(() => SNIPPET_CATEGORY_ORDER.map((category) => ({
264
+ category,
265
+ items: filteredSnippets.filter((snippet) => snippet.category === category)
266
+ })).filter((group) => group.items.length > 0), [filteredSnippets]);
267
+ const handleKeyDown = useCallback((e) => {
268
+ if (e.key === "Escape") {
269
+ e.preventDefault();
270
+ cancel();
271
+ } else if (displayMode && e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
272
+ e.preventDefault();
273
+ commit();
274
+ } else if (!displayMode && e.key === "Enter" && !e.shiftKey) {
275
+ e.preventDefault();
276
+ commit();
277
+ }
278
+ }, [
279
+ commit,
280
+ cancel,
281
+ displayMode
282
+ ]);
283
+ if (!editable) return children;
284
+ return /* @__PURE__ */ jsxs(Popover, {
285
+ open,
286
+ onOpenChange: (nextOpen) => {
287
+ setOpen(nextOpen);
288
+ if (!nextOpen) setValue(equation);
289
+ },
290
+ children: [/* @__PURE__ */ jsx(PopoverTrigger, {
291
+ nativeButton: false,
292
+ render: /* @__PURE__ */ jsx("span", {
293
+ className: `${editWrapper} ${semanticClassNames.editWrapper}`,
294
+ title: "Click to edit"
295
+ }),
296
+ children
297
+ }), /* @__PURE__ */ jsxs(PopoverPanel, {
298
+ className: `${panel} ${semanticClassNames.panel}`,
299
+ initialFocus: inputRef,
300
+ side: "bottom",
301
+ sideOffset: 8,
302
+ children: [
303
+ /* @__PURE__ */ jsxs("div", {
304
+ className: `${header} ${semanticClassNames.header}`,
305
+ children: [/* @__PURE__ */ jsxs("div", {
306
+ className: `${headerLeft} ${semanticClassNames.headerLeft}`,
307
+ children: [/* @__PURE__ */ jsx("div", {
308
+ className: `${iconWrap} ${semanticClassNames.iconWrap}`,
309
+ children: /* @__PURE__ */ jsx(Terminal, { size: 12 })
310
+ }), /* @__PURE__ */ jsx("span", {
311
+ className: `${title} ${semanticClassNames.title}`,
312
+ children: "Math Editor"
313
+ })]
314
+ }), /* @__PURE__ */ jsxs("div", {
315
+ className: `${headerRight} ${semanticClassNames.headerRight}`,
316
+ children: [/* @__PURE__ */ jsx("span", {
317
+ className: `${mode} ${semanticClassNames.mode}`,
318
+ children: displayMode ? "Block" : "Inline"
319
+ }), /* @__PURE__ */ jsx("button", {
320
+ className: `${deleteButton} ${semanticClassNames.deleteButton}`,
321
+ title: "Delete node",
322
+ type: "button",
323
+ onClick: handleDelete,
324
+ children: /* @__PURE__ */ jsx(Trash2, { size: 14 })
325
+ })]
326
+ })]
327
+ }),
328
+ /* @__PURE__ */ jsx(AnimatedTabs, {
329
+ className: `${tabs} ${semanticClassNames.tabs}`,
330
+ value: activeTab,
331
+ tabs: [{
332
+ id: "editor",
333
+ label: "Editor"
334
+ }, {
335
+ id: "snippets",
336
+ label: "Snippets"
337
+ }],
338
+ onChange: (id) => setActiveTab(id)
339
+ }),
340
+ /* @__PURE__ */ jsxs("div", {
341
+ className: `${bodyScrollArea} ${semanticClassNames.bodyScrollArea}`,
342
+ children: [activeTab === "editor" && /* @__PURE__ */ jsxs("div", {
343
+ className: `mkenhub ${semanticClassNames.body}`,
344
+ children: [/* @__PURE__ */ jsxs("div", {
345
+ className: `mkenhuc ${semanticClassNames.field}`,
346
+ children: [/* @__PURE__ */ jsx("label", {
347
+ className: `mkenhud ${semanticClassNames.label}`,
348
+ children: "LaTeX Input"
349
+ }), /* @__PURE__ */ jsxs("div", {
350
+ className: `mkenhue ${semanticClassNames.inputWrap}`,
351
+ children: [/* @__PURE__ */ jsx("textarea", {
352
+ autoCapitalize: "off",
353
+ autoComplete: "off",
354
+ autoCorrect: "off",
355
+ className: `mkenhuf ${semanticClassNames.textarea}`,
356
+ placeholder: "e.g. \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",
357
+ ref: inputRef,
358
+ rows: displayMode ? 4 : 3,
359
+ spellCheck: false,
360
+ value,
361
+ onClick: (e) => syncSelection(e.currentTarget),
362
+ onKeyDown: handleKeyDown,
363
+ onKeyUp: (e) => syncSelection(e.currentTarget),
364
+ onSelect: (e) => syncSelection(e.currentTarget),
365
+ onChange: (e) => {
366
+ setValue(e.target.value);
367
+ syncSelection(e.target);
368
+ }
369
+ }), /* @__PURE__ */ jsxs("div", {
370
+ className: `mkenhug ${semanticClassNames.inputActions}`,
371
+ children: [/* @__PURE__ */ jsx(ActionButton, {
372
+ icon: true,
373
+ disabled: !value.trim(),
374
+ size: "sm",
375
+ title: "Copy LaTeX",
376
+ onClick: handleCopy,
377
+ children: copied ? /* @__PURE__ */ jsx(Check, {
378
+ size: 12,
379
+ style: { color: "#22c55e" }
380
+ }) : /* @__PURE__ */ jsx(Copy, { size: 12 })
381
+ }), /* @__PURE__ */ jsx(ActionButton, {
382
+ icon: true,
383
+ disabled: value === equation,
384
+ size: "sm",
385
+ title: "Reset",
386
+ onClick: handleReset,
387
+ children: /* @__PURE__ */ jsx(RotateCcw, { size: 12 })
388
+ })]
389
+ })]
390
+ })]
391
+ }), /* @__PURE__ */ jsxs("div", {
392
+ className: `mkenhuc ${semanticClassNames.field}`,
393
+ children: [/* @__PURE__ */ jsx("label", {
394
+ className: `mkenhud ${semanticClassNames.label}`,
395
+ children: "Preview"
396
+ }), /* @__PURE__ */ jsx("div", {
397
+ className: `mkenhuh ${semanticClassNames.preview}`,
398
+ children: value.trim() ? /* @__PURE__ */ jsx(KaTeXRenderer, {
399
+ displayMode,
400
+ equation: value
401
+ }) : /* @__PURE__ */ jsx("span", {
402
+ className: `mkenhui ${semanticClassNames.previewEmpty}`,
403
+ children: "Enter a formula"
404
+ })
405
+ })]
406
+ })]
407
+ }), activeTab === "snippets" && /* @__PURE__ */ jsxs("div", {
408
+ className: `mkenhub ${semanticClassNames.body}`,
409
+ children: [/* @__PURE__ */ jsxs("div", {
410
+ className: `mkenhuj ${semanticClassNames.snippetSearchWrap}`,
411
+ children: [/* @__PURE__ */ jsx(Search, {
412
+ className: `mkenhuk ${semanticClassNames.snippetSearchIcon}`,
413
+ size: 14
414
+ }), /* @__PURE__ */ jsx("input", {
415
+ autoComplete: "off",
416
+ className: `mkenhul ${semanticClassNames.snippetSearchInput}`,
417
+ placeholder: "Search snippets: frac, matrix, sum...",
418
+ type: "text",
419
+ value: snippetQuery,
420
+ onChange: (e) => setSnippetQuery(e.target.value)
421
+ })]
422
+ }), groupedSnippets.length > 0 ? /* @__PURE__ */ jsx("div", {
423
+ className: `mkenhum ${semanticClassNames.snippetGroups}`,
424
+ children: groupedSnippets.map((group) => /* @__PURE__ */ jsxs("section", {
425
+ className: `mkenhun ${semanticClassNames.snippetGroup}`,
426
+ children: [/* @__PURE__ */ jsx("div", {
427
+ className: `mkenhuo ${semanticClassNames.snippetGroupLabel}`,
428
+ children: group.category
429
+ }), /* @__PURE__ */ jsx("div", {
430
+ className: `mkenhup ${semanticClassNames.snippetList}`,
431
+ children: group.items.map((snippet) => /* @__PURE__ */ jsxs("button", {
432
+ className: `mkenhuq ${semanticClassNames.snippetButton}`,
433
+ type: "button",
434
+ onClick: () => handleInsertSnippet(snippet.template),
435
+ children: [/* @__PURE__ */ jsxs("div", {
436
+ className: `mkenhur ${semanticClassNames.snippetMeta}`,
437
+ children: [/* @__PURE__ */ jsx("span", {
438
+ className: `mkenhus ${semanticClassNames.snippetName}`,
439
+ children: snippet.title
440
+ }), /* @__PURE__ */ jsx("span", {
441
+ className: `mkenhut ${semanticClassNames.snippetHint}`,
442
+ children: snippet.template.replace("__cursor__", "")
443
+ })]
444
+ }), /* @__PURE__ */ jsx("span", {
445
+ className: `mkenhuu ${semanticClassNames.snippetPreview}`,
446
+ children: /* @__PURE__ */ jsx(KaTeXRenderer, {
447
+ displayMode: false,
448
+ equation: snippet.previewEquation
449
+ })
450
+ })]
451
+ }, snippet.id))
452
+ })]
453
+ }, group.category))
454
+ }) : /* @__PURE__ */ jsxs("div", {
455
+ className: `mkenhuv ${semanticClassNames.snippetsPlaceholder}`,
456
+ children: [
457
+ "No snippets match “",
458
+ snippetQuery.trim(),
459
+ "”"
460
+ ]
461
+ })]
462
+ })]
463
+ }),
464
+ /* @__PURE__ */ jsxs("div", {
465
+ className: `${footer} ${semanticClassNames.footer}`,
466
+ children: [/* @__PURE__ */ jsx("span", {
467
+ className: `${charCount} ${semanticClassNames.charCount}`,
468
+ children: value.trim() ? `${value.length} chars` : "Enter a formula"
469
+ }), /* @__PURE__ */ jsxs(ActionBar, { children: [/* @__PURE__ */ jsx(ActionButton, {
470
+ size: "md",
471
+ variant: "ghost",
472
+ onClick: cancel,
473
+ children: "Cancel"
474
+ }), /* @__PURE__ */ jsx(ActionButton, {
475
+ disabled: !value.trim(),
476
+ size: "md",
477
+ variant: "accent",
478
+ onClick: commit,
479
+ children: "Save"
480
+ })] })]
481
+ })
482
+ ]
483
+ })]
484
+ });
485
+ }
486
+ //#endregion
487
+ //#region src/KaTeXBlockEditNode.ts
488
+ var KaTeXBlockEditNode = class KaTeXBlockEditNode extends KaTeXBlockNode {
489
+ static clone(node) {
490
+ return new KaTeXBlockEditNode(node.__equation, node.__key, node.getShouldAutoOpenOnMount());
491
+ }
492
+ static importJSON(serializedNode) {
493
+ return new KaTeXBlockEditNode(serializedNode.equation);
494
+ }
495
+ decorate(_editor, _config) {
496
+ const rendererEl = createRendererDecoration("KaTeX", KaTeXRenderer, {
497
+ equation: this.__equation,
498
+ displayMode: true
499
+ });
500
+ return createElement(KaTeXEditDecorator, {
501
+ nodeKey: this.__key,
502
+ equation: this.__equation,
503
+ displayMode: true,
504
+ autoOpenOnMount: this.getShouldAutoOpenOnMount(),
505
+ children: rendererEl
506
+ });
507
+ }
508
+ };
509
+ //#endregion
510
+ //#region src/KaTeXInlineEditNode.ts
511
+ var KaTeXInlineEditNode = class KaTeXInlineEditNode extends KaTeXInlineNode {
512
+ static clone(node) {
513
+ return new KaTeXInlineEditNode(node.__equation, node.__key, node.getShouldAutoOpenOnMount(), node.__color);
514
+ }
515
+ static importJSON(serializedNode) {
516
+ const node = new KaTeXInlineEditNode(serializedNode.equation);
517
+ if (serializedNode.color) node.setColor(serializedNode.color);
518
+ return node;
519
+ }
520
+ decorate(_editor, _config) {
521
+ const rendererEl = createRendererDecoration("KaTeX", KaTeXRenderer, {
522
+ equation: this.__equation,
523
+ displayMode: false
524
+ });
525
+ const decorator = createElement(KaTeXEditDecorator, {
526
+ nodeKey: this.__key,
527
+ equation: this.__equation,
528
+ displayMode: false,
529
+ autoOpenOnMount: this.getShouldAutoOpenOnMount(),
530
+ children: rendererEl
531
+ });
532
+ if (!this.__color) return decorator;
533
+ return createElement("span", { style: { color: this.__color } }, decorator);
534
+ }
593
535
  };
536
+ //#endregion
537
+ //#region src/index.ts
538
+ var katexEditNodes = [KaTeXBlockEditNode, KaTeXInlineEditNode];
539
+ //#endregion
540
+ export { KaTeXBlockEditNode, KaTeXEditDecorator, KaTeXInlineEditNode, katexEditNodes };
@@ -1 +1,2 @@
1
- :root{--rc-text: #000;--rc-text-secondary: #262626;--rc-text-tertiary: #737373;--rc-text-quaternary: #a3a3a3;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f5f5f5;--rc-fill: #e8e8e8;--rc-fill-secondary: #eeeeee;--rc-fill-tertiary: #f5f5f5;--rc-fill-quaternary: #fafafa;--rc-border: #f5f5f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #404040;--rc-code-bg: #f5f5f5;--rc-hr-border: #e5e5e5;--rc-quote-border: #2563eb;--rc-quote-bg: #f5f5f5;--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-family-kai: "楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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: #a3a3a3;--rc-text-tertiary: #737373;--rc-text-quaternary: #525252;--rc-bg: #0a0a0a;--rc-bg-secondary: #171717;--rc-bg-tertiary: #262626;--rc-fill: #2a2a2a;--rc-fill-secondary: #222222;--rc-fill-tertiary: #1a1a1a;--rc-fill-quaternary: #141414;--rc-border: #262626;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #d4d4d4;--rc-code-bg: #262626;--rc-hr-border: #262626;--rc-quote-border: #60a5fa;--rc-quote-bg: #262626;--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-family-kai: "楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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}[data-theme=dark]{--rc-text: #fafafa;--rc-text-secondary: #a3a3a3;--rc-text-tertiary: #737373;--rc-text-quaternary: #525252;--rc-bg: #0a0a0a;--rc-bg-secondary: #171717;--rc-bg-tertiary: #262626;--rc-fill: #2a2a2a;--rc-fill-secondary: #222222;--rc-fill-tertiary: #1a1a1a;--rc-fill-quaternary: #141414;--rc-border: #262626;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #d4d4d4;--rc-code-bg: #262626;--rc-hr-border: #262626;--rc-quote-border: #60a5fa;--rc-quote-bg: #262626;--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-family-kai: "楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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}.x1ktjw0{--rc-text: #000;--rc-text-secondary: #262626;--rc-text-tertiary: #737373;--rc-text-quaternary: #a3a3a3;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f5f5f5;--rc-fill: #e8e8e8;--rc-fill-secondary: #eeeeee;--rc-fill-tertiary: #f5f5f5;--rc-fill-quaternary: #fafafa;--rc-border: #f5f5f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #404040;--rc-code-bg: #f5f5f5;--rc-hr-border: #e5e5e5;--rc-quote-border: #2563eb;--rc-quote-bg: #f5f5f5;--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-family-kai: "楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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}.x1ktjw1{--rc-text: #000;--rc-text-secondary: #262626;--rc-text-tertiary: #737373;--rc-text-quaternary: #a3a3a3;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f5f5f5;--rc-fill: #e8e8e8;--rc-fill-secondary: #eeeeee;--rc-fill-tertiary: #f5f5f5;--rc-fill-quaternary: #fafafa;--rc-border: #f5f5f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #404040;--rc-code-bg: #f5f5f5;--rc-hr-border: #e5e5e5;--rc-quote-border: #2563eb;--rc-quote-bg: #f5f5f5;--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-family-kai: "楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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}.x1ktjw2{--rc-text: #000;--rc-text-secondary: #262626;--rc-text-tertiary: #737373;--rc-text-quaternary: #a3a3a3;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f5f5f5;--rc-fill: #e8e8e8;--rc-fill-secondary: #eeeeee;--rc-fill-tertiary: #f5f5f5;--rc-fill-quaternary: #fafafa;--rc-border: #f5f5f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #404040;--rc-code-bg: #f5f5f5;--rc-hr-border: #e5e5e5;--rc-quote-border: #a3a3a3;--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-family-kai: "楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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 .x1ktjw0,[data-theme=dark] .x1ktjw0,.dark.x1ktjw0,[data-theme=dark].x1ktjw0,.dark .x1ktjw1,[data-theme=dark] .x1ktjw1,.dark.x1ktjw1,[data-theme=dark].x1ktjw1,.dark .x1ktjw2,[data-theme=dark] .x1ktjw2,.dark.x1ktjw2,[data-theme=dark].x1ktjw2{--rc-text: #fafafa;--rc-text-secondary: #a3a3a3;--rc-text-tertiary: #737373;--rc-text-quaternary: #525252;--rc-bg: #0a0a0a;--rc-bg-secondary: #171717;--rc-bg-tertiary: #262626;--rc-fill: #2a2a2a;--rc-fill-secondary: #222222;--rc-fill-tertiary: #1a1a1a;--rc-fill-quaternary: #141414;--rc-border: #262626;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #d4d4d4;--rc-code-bg: #262626;--rc-hr-border: #262626;--rc-quote-border: #60a5fa;--rc-quote-bg: #262626;--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)}.mkenhu0{cursor:pointer;border-radius:var(--rc-radius-sm);transition:background-color .15s ease}.mkenhu0:hover{background-color:var(--rc-accent-light)}.mkenhu1{width:min(420px,90vw);padding:0;overflow:hidden;box-shadow:var(--rc-shadow-modal);font-family:var(--rc-font-family)}.mkenhu2{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid color-mix(in srgb,var(--rc-border) 60%,transparent)}.mkenhu3{display:flex;align-items:center;gap:8px}.mkenhu4{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:var(--rc-radius-sm);background-color:var(--rc-accent-light);color:var(--rc-accent)}.mkenhu5{font-weight:600;font-size:var(--rc-font-size-md);color:var(--rc-text)}.mkenhu6{display:flex;align-items:center;gap:4px}.mkenhu7{font-size:var(--rc-font-size-2xs);font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--rc-text-secondary);padding:1px 6px;border-radius:var(--rc-radius-sm);background-color:var(--rc-bg-secondary)}.mkenhu8{display:flex;align-items:center;justify-content:center;appearance:none;border:none;background:none;color:var(--rc-text-secondary);cursor:pointer;width:28px;height:28px;border-radius:var(--rc-radius-sm);transition:color .15s ease,background-color .15s ease;flex-shrink:0}.mkenhu8:hover{color:var(--rc-alert-caution);background-color:color-mix(in srgb,var(--rc-alert-caution) 10%,transparent)}.mkenhu9{padding:0 16px}.mkenhua{max-height:320px;overflow-y:auto;overflow-x:hidden;flex-shrink:0}.mkenhub{padding:12px;display:flex;flex-direction:column;gap:12px}.mkenhuc{display:flex;flex-direction:column}.mkenhud{font-size:var(--rc-font-size-2xs);font-weight:500;text-transform:uppercase;letter-spacing:.06em;color:var(--rc-text-secondary);margin-bottom:6px;padding-left:2px}.mkenhue{position:relative}.mkenhuf{display:block;width:100%;padding:10px 56px 10px 12px;font-family:var(--rc-font-mono);font-size:var(--rc-font-size-md);line-height:1.5;background-color:color-mix(in srgb,var(--rc-bg-secondary) 30%,transparent);color:var(--rc-text);border:1px solid color-mix(in srgb,var(--rc-border) 60%,transparent);border-radius:var(--rc-radius-md);outline:none;resize:none;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.mkenhuf::placeholder{color:color-mix(in srgb,var(--rc-text-secondary) 50%,transparent)}.mkenhuf:focus{border-color:color-mix(in srgb,var(--rc-accent) 50%,transparent);box-shadow:0 0 0 2px color-mix(in srgb,var(--rc-accent) 25%,transparent)}.mkenhug{position:absolute;right:6px;top:6px;display:flex;gap:2px}.mkenhuh{border:1px solid color-mix(in srgb,var(--rc-border) 60%,transparent);border-radius:var(--rc-radius-md);padding:var(--rc-space-md);min-height:60px;display:flex;align-items:center;justify-content:center;overflow-x:auto;background-color:var(--rc-bg)}.mkenhui{color:color-mix(in srgb,var(--rc-text-secondary) 50%,transparent);font-size:var(--rc-font-size-md)}.mkenhuj{position:relative}.mkenhuk{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:color-mix(in srgb,var(--rc-text-secondary) 70%,transparent);pointer-events:none}.mkenhul{width:100%;height:34px;padding:0 12px 0 32px;border-radius:var(--rc-radius-md);border:1px solid color-mix(in srgb,var(--rc-border) 60%,transparent);background-color:color-mix(in srgb,var(--rc-bg-secondary) 24%,transparent);color:var(--rc-text);outline:none;box-sizing:border-box;font-size:var(--rc-font-size-sm)}.mkenhul::placeholder{color:color-mix(in srgb,var(--rc-text-secondary) 55%,transparent)}.mkenhul:focus{border-color:color-mix(in srgb,var(--rc-accent) 45%,transparent);box-shadow:0 0 0 2px color-mix(in srgb,var(--rc-accent) 18%,transparent)}.mkenhum{display:flex;flex-direction:column;gap:12px}.mkenhun{display:flex;flex-direction:column;gap:6px}.mkenhuo{font-size:var(--rc-font-size-2xs);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--rc-text-secondary);padding-left:2px}.mkenhup{display:flex;flex-direction:column;gap:6px}.mkenhuq{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;border:1px solid color-mix(in srgb,var(--rc-border) 55%,transparent);border-radius:var(--rc-radius-md);background-color:color-mix(in srgb,var(--rc-bg-secondary) 18%,transparent);padding:10px 12px;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,transform .15s ease}.mkenhuq:hover{border-color:color-mix(in srgb,var(--rc-accent) 30%,var(--rc-border));background-color:color-mix(in srgb,var(--rc-accent-light) 30%,var(--rc-bg-secondary));transform:translateY(-1px)}.mkenhur{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.mkenhus{font-size:var(--rc-font-size-sm);font-weight:600;color:var(--rc-text)}.mkenhut{font-size:var(--rc-font-size-2xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mkenhuu{display:inline-flex;align-items:center;justify-content:center;min-width:72px;min-height:32px;padding:0 8px;border-radius:var(--rc-radius-sm);background-color:var(--rc-bg);color:var(--rc-text);overflow:hidden;flex-shrink:0}.mkenhuv{color:var(--rc-text-secondary);font-size:var(--rc-font-size-sm);text-align:center;padding:var(--rc-space-lg) var(--rc-space-md);border:1px dashed color-mix(in srgb,var(--rc-border) 60%,transparent);border-radius:var(--rc-radius-md);background-color:color-mix(in srgb,var(--rc-bg-secondary) 16%,transparent)}.mkenhuw{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-top:1px solid color-mix(in srgb,var(--rc-border) 60%,transparent);background-color:color-mix(in srgb,var(--rc-bg-secondary) 20%,transparent)}.mkenhux{color:var(--rc-text-secondary);font-size:var(--rc-font-size-2xs);font-family:var(--rc-font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}
1
+ :root{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--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-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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,[data-theme=dark]{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--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-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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}.x1ktjw0{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--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-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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}.x1ktjw1{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#2563eb;--rc-quote-bg:#f5f5f5;--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-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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}.x1ktjw2{--rc-text:#000;--rc-text-secondary:#262626;--rc-text-tertiary:#737373;--rc-text-quaternary:#a3a3a3;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f5f5f5;--rc-fill:#e8e8e8;--rc-fill-secondary:#eee;--rc-fill-tertiary:#f5f5f5;--rc-fill-quaternary:#fafafa;--rc-border:#f5f5f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#404040;--rc-code-bg:#f5f5f5;--rc-hr-border:#e5e5e5;--rc-quote-border:#a3a3a3;--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-family-kai:"楷体", KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "霞鹜文楷", "Noto Serif CJK SC", 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 .x1ktjw0,[data-theme=dark] .x1ktjw0,.dark.x1ktjw0,[data-theme=dark].x1ktjw0,.dark .x1ktjw1,[data-theme=dark] .x1ktjw1,.dark.x1ktjw1,[data-theme=dark].x1ktjw1,.dark .x1ktjw2,[data-theme=dark] .x1ktjw2,.dark.x1ktjw2,[data-theme=dark].x1ktjw2{--rc-text:#fafafa;--rc-text-secondary:#a3a3a3;--rc-text-tertiary:#737373;--rc-text-quaternary:#525252;--rc-bg:#0a0a0a;--rc-bg-secondary:#171717;--rc-bg-tertiary:#262626;--rc-fill:#2a2a2a;--rc-fill-secondary:#222;--rc-fill-tertiary:#1a1a1a;--rc-fill-quaternary:#141414;--rc-border:#262626;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#d4d4d4;--rc-code-bg:#262626;--rc-hr-border:#262626;--rc-quote-border:#60a5fa;--rc-quote-bg:#262626;--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}.mkenhu0{cursor:pointer;border-radius:var(--rc-radius-sm);transition:background-color .15s}.mkenhu0:hover{background-color:var(--rc-accent-light)}.mkenhu1{width:min(420px,90vw);box-shadow:var(--rc-shadow-modal);font-family:var(--rc-font-family);padding:0;overflow:hidden}.mkenhu2{border-bottom:1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);justify-content:space-between;align-items:center;padding:10px 16px;display:flex}.mkenhu3{align-items:center;gap:8px;display:flex}.mkenhu4{border-radius:var(--rc-radius-sm);background-color:var(--rc-accent-light);width:20px;height:20px;color:var(--rc-accent);justify-content:center;align-items:center;display:flex}.mkenhu5{font-weight:600;font-size:var(--rc-font-size-md);color:var(--rc-text)}.mkenhu6{align-items:center;gap:4px;display:flex}.mkenhu7{font-size:var(--rc-font-size-2xs);text-transform:uppercase;letter-spacing:.04em;color:var(--rc-text-secondary);border-radius:var(--rc-radius-sm);background-color:var(--rc-bg-secondary);padding:1px 6px;font-weight:500}.mkenhu8{-webkit-appearance:none;appearance:none;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;width:28px;height:28px;transition:color .15s,background-color .15s;display:flex}.mkenhu8:hover{color:var(--rc-alert-caution);background-color:color-mix(in srgb, var(--rc-alert-caution) 10%, transparent)}.mkenhu9{padding:0 16px}.mkenhua{flex-shrink:0;max-height:320px;overflow:hidden auto}.mkenhub{flex-direction:column;gap:12px;padding:12px;display:flex}.mkenhuc{flex-direction:column;display:flex}.mkenhud{font-size:var(--rc-font-size-2xs);text-transform:uppercase;letter-spacing:.06em;color:var(--rc-text-secondary);margin-bottom:6px;padding-left:2px;font-weight:500}.mkenhue{position:relative}.mkenhuf{width:100%;font-family:var(--rc-font-mono);font-size:var(--rc-font-size-md);background-color:color-mix(in srgb, var(--rc-bg-secondary) 30%, transparent);color:var(--rc-text);border:1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);border-radius:var(--rc-radius-md);resize:none;box-sizing:border-box;outline:none;padding:10px 56px 10px 12px;line-height:1.5;transition:border-color .15s,box-shadow .15s;display:block}.mkenhuf::placeholder{color:color-mix(in srgb, var(--rc-text-secondary) 50%, transparent)}.mkenhuf:focus{border-color:color-mix(in srgb, var(--rc-accent) 50%, transparent);box-shadow:0 0 0 2px color-mix(in srgb, var(--rc-accent) 25%, transparent)}.mkenhug{gap:2px;display:flex;position:absolute;top:6px;right:6px}.mkenhuh{border:1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);border-radius:var(--rc-radius-md);padding:var(--rc-space-md);background-color:var(--rc-bg);justify-content:center;align-items:center;min-height:60px;display:flex;overflow-x:auto}.mkenhui{color:color-mix(in srgb, var(--rc-text-secondary) 50%, transparent);font-size:var(--rc-font-size-md)}.mkenhuj{position:relative}.mkenhuk{color:color-mix(in srgb, var(--rc-text-secondary) 70%, transparent);pointer-events:none;position:absolute;top:50%;left:10px;transform:translateY(-50%)}.mkenhul{border-radius:var(--rc-radius-md);border:1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);background-color:color-mix(in srgb, var(--rc-bg-secondary) 24%, transparent);width:100%;height:34px;color:var(--rc-text);box-sizing:border-box;font-size:var(--rc-font-size-sm);outline:none;padding:0 12px 0 32px}.mkenhul::placeholder{color:color-mix(in srgb, var(--rc-text-secondary) 55%, transparent)}.mkenhul:focus{border-color:color-mix(in srgb, var(--rc-accent) 45%, transparent);box-shadow:0 0 0 2px color-mix(in srgb, var(--rc-accent) 18%, transparent)}.mkenhum{flex-direction:column;gap:12px;display:flex}.mkenhun{flex-direction:column;gap:6px;display:flex}.mkenhuo{font-size:var(--rc-font-size-2xs);letter-spacing:.08em;text-transform:uppercase;color:var(--rc-text-secondary);padding-left:2px;font-weight:600}.mkenhup{flex-direction:column;gap:6px;display:flex}.mkenhuq{text-align:left;border:1px solid color-mix(in srgb, var(--rc-border) 55%, transparent);border-radius:var(--rc-radius-md);background-color:color-mix(in srgb, var(--rc-bg-secondary) 18%, transparent);cursor:pointer;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:10px 12px;transition:border-color .15s,background-color .15s,transform .15s;display:flex}.mkenhuq:hover{border-color:color-mix(in srgb, var(--rc-accent) 30%, var(--rc-border));background-color:color-mix(in srgb, var(--rc-accent-light) 30%, var(--rc-bg-secondary));transform:translateY(-1px)}.mkenhur{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.mkenhus{font-size:var(--rc-font-size-sm);color:var(--rc-text);font-weight:600}.mkenhut{font-size:var(--rc-font-size-2xs);font-family:var(--rc-font-mono);color:var(--rc-text-secondary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mkenhuu{border-radius:var(--rc-radius-sm);background-color:var(--rc-bg);min-width:72px;min-height:32px;color:var(--rc-text);flex-shrink:0;justify-content:center;align-items:center;padding:0 8px;display:inline-flex;overflow:hidden}.mkenhuv{color:var(--rc-text-secondary);font-size:var(--rc-font-size-sm);text-align:center;padding:var(--rc-space-lg) var(--rc-space-md);border:1px dashed color-mix(in srgb, var(--rc-border) 60%, transparent);border-radius:var(--rc-radius-md);background-color:color-mix(in srgb, var(--rc-bg-secondary) 16%, transparent)}.mkenhuw{border-top:1px solid color-mix(in srgb, var(--rc-border) 60%, transparent);background-color:color-mix(in srgb, var(--rc-bg-secondary) 20%, transparent);justify-content:space-between;align-items:center;padding:10px 16px;display:flex}.mkenhux{color:var(--rc-text-secondary);font-size:var(--rc-font-size-2xs);font-family:var(--rc-font-mono);text-overflow:ellipsis;white-space:nowrap;max-width:200px;overflow:hidden}
2
+ /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-renderer-katex",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "KaTeX math renderer for haklex rich editor",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,29 +21,29 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@haklex/rich-editor": "0.1.0",
25
- "@haklex/rich-style-token": "0.1.0",
26
- "@haklex/rich-editor-ui": "0.1.0"
24
+ "@haklex/rich-editor": "0.2.0",
25
+ "@haklex/rich-editor-ui": "0.2.0",
26
+ "@haklex/rich-style-token": "0.2.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@lexical/react": "^0.43.0",
29
+ "@lexical/react": "^0.44.0",
30
30
  "@types/react": "^19.2.14",
31
31
  "@types/react-dom": "^19.2.3",
32
- "@vanilla-extract/css": "^1.18.0",
32
+ "@vanilla-extract/css": "^1.20.1",
33
33
  "@vanilla-extract/recipes": "^0.5.7",
34
- "@vanilla-extract/vite-plugin": "^5.1.4",
35
- "katex": "^0.16.37",
36
- "lexical": "^0.43.0",
37
- "react": "^19.2.4",
38
- "react-dom": "^19.2.4",
34
+ "@vanilla-extract/vite-plugin": "^5.2.2",
35
+ "katex": "^0.16.45",
36
+ "lexical": "^0.44.0",
37
+ "react": "^19.2.5",
38
+ "react-dom": "^19.2.5",
39
39
  "typescript": "^5.9.3",
40
- "vite": "^7.3.1",
40
+ "vite": "^8.0.10",
41
41
  "vite-plugin-dts": "^4.5.4"
42
42
  },
43
43
  "peerDependencies": {
44
- "@lexical/react": "^0.43.0",
44
+ "@lexical/react": "^0.44.0",
45
45
  "katex": ">=0.16.0",
46
- "lexical": "^0.43.0",
46
+ "lexical": "^0.44.0",
47
47
  "lucide-react": "^1.0.0",
48
48
  "react": ">=19",
49
49
  "react-dom": ">=19"