@haklex/rich-editor 0.31.1 → 0.33.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-DzAlcunI.js → AlertQuoteEditNode-Ci3XcsfX.js} +2 -2
- package/dist/{KaTeXRenderer-g9a2JrRn.js → KaTeXRenderer-DLtnsRSv.js} +7 -5
- package/dist/{MermaidPlugin-C9MynNJB.js → MermaidPlugin-H3B0DYXL.js} +10 -6
- package/dist/{SubmitShortcutPlugin-BNswmibh.js → SubmitShortcutPlugin-BR2DC6hX.js} +24 -17
- package/dist/commands-entry.mjs +2 -2
- package/dist/{config-cSO27cEU.js → config-67th6WYZ.js} +5 -4
- package/dist/index.mjs +7 -7
- package/dist/{node-registry-Cv-szVok.js → node-registry-CD8rAdly.js} +4 -4
- package/dist/nodes-entry.mjs +4 -4
- package/dist/plugins-entry.mjs +2 -2
- package/dist/renderers-entry.mjs +1 -1
- package/dist/static-entry.mjs +3 -3
- package/dist/{theme-BVIoTCzV.js → theme-BxnXR-HA.js} +7 -6
- package/dist/utils/shiki.d.ts.map +1 -1
- package/package.json +32 -32
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as AlertQuoteNode, L as _defineProperty, M as FootnoteNode, N as $isAlertQuoteNode, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, t as editorTheme, z as AlertRenderer } from "./theme-
|
|
2
|
-
import { h as ALERT_NODE_KEY, l as RendererWrapper } from "./KaTeXRenderer-
|
|
1
|
+
import { I as AlertQuoteNode, L as _defineProperty, M as FootnoteNode, N as $isAlertQuoteNode, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, t as editorTheme, z as AlertRenderer } from "./theme-BxnXR-HA.js";
|
|
2
|
+
import { h as ALERT_NODE_KEY, l as RendererWrapper } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
3
3
|
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
4
4
|
import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
5
5
|
import { AutoLinkNode, LinkNode } from "@lexical/link";
|
|
@@ -93,11 +93,12 @@ var FootnoteDefinitionsContext = createContext({
|
|
|
93
93
|
displayNumberMap: {}
|
|
94
94
|
});
|
|
95
95
|
function FootnoteDefinitionsProvider({ definitions, displayNumberMap, children }) {
|
|
96
|
+
const value = useMemo(() => ({
|
|
97
|
+
definitions,
|
|
98
|
+
displayNumberMap
|
|
99
|
+
}), [definitions, displayNumberMap]);
|
|
96
100
|
return /* @__PURE__ */ jsx(FootnoteDefinitionsContext, {
|
|
97
|
-
value
|
|
98
|
-
definitions,
|
|
99
|
-
displayNumberMap
|
|
100
|
-
}), [definitions, displayNumberMap]),
|
|
101
|
+
value,
|
|
101
102
|
children
|
|
102
103
|
});
|
|
103
104
|
}
|
|
@@ -175,7 +176,8 @@ async function computeImageMeta(file) {
|
|
|
175
176
|
}
|
|
176
177
|
function decodeThumbHash(hash) {
|
|
177
178
|
try {
|
|
178
|
-
|
|
179
|
+
const bytes = base64ToUint8(hash);
|
|
180
|
+
return thumbHashToDataURL(bytes);
|
|
179
181
|
} catch {
|
|
180
182
|
return;
|
|
181
183
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as $createMermaidNode, k as $withAdaptiveImageDisplayWidth, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-
|
|
2
|
-
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
1
|
+
import { f as $createMermaidNode, k as $withAdaptiveImageDisplayWidth, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-BxnXR-HA.js";
|
|
2
|
+
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-Ci3XcsfX.js";
|
|
3
3
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
4
4
|
import { useEffect } from "react";
|
|
5
5
|
import { $insertNodes, COMMAND_PRIORITY_EDITOR, createCommand } from "lexical";
|
|
@@ -22,7 +22,8 @@ function ImagePlugin() {
|
|
|
22
22
|
const [editor] = useLexicalComposerContext();
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
return editor.registerCommand(INSERT_IMAGE_COMMAND, (payload) => {
|
|
25
|
-
$
|
|
25
|
+
const imageNode = $createImageNode($withAdaptiveImageDisplayWidth(payload));
|
|
26
|
+
$insertNodes([imageNode]);
|
|
26
27
|
return true;
|
|
27
28
|
}, COMMAND_PRIORITY_EDITOR);
|
|
28
29
|
}, [editor]);
|
|
@@ -36,11 +37,13 @@ function KaTeXPlugin() {
|
|
|
36
37
|
const [editor] = useLexicalComposerContext();
|
|
37
38
|
useEffect(() => {
|
|
38
39
|
const unregisterInline = editor.registerCommand(INSERT_KATEX_INLINE_COMMAND, (equation) => {
|
|
39
|
-
$
|
|
40
|
+
const node = $createKaTeXInlineNode(equation, { autoOpenOnMount: !equation.trim() });
|
|
41
|
+
$insertNodes([node]);
|
|
40
42
|
return true;
|
|
41
43
|
}, COMMAND_PRIORITY_EDITOR);
|
|
42
44
|
const unregisterBlock = editor.registerCommand(INSERT_KATEX_BLOCK_COMMAND, (equation) => {
|
|
43
|
-
$
|
|
45
|
+
const node = $createKaTeXBlockNode(equation, { autoOpenOnMount: !equation.trim() });
|
|
46
|
+
$insertNodes([node]);
|
|
44
47
|
return true;
|
|
45
48
|
}, COMMAND_PRIORITY_EDITOR);
|
|
46
49
|
return () => {
|
|
@@ -57,7 +60,8 @@ function MermaidPlugin() {
|
|
|
57
60
|
const [editor] = useLexicalComposerContext();
|
|
58
61
|
useEffect(() => {
|
|
59
62
|
return editor.registerCommand(INSERT_MERMAID_COMMAND, (diagram) => {
|
|
60
|
-
$
|
|
63
|
+
const node = $createMermaidNode(diagram);
|
|
64
|
+
$insertNodes([node]);
|
|
61
65
|
return true;
|
|
62
66
|
}, COMMAND_PRIORITY_EDITOR);
|
|
63
67
|
}, [editor]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as setCodeBlockCursorIntent, o as $createCodeBlockEditNode, s as $createBannerEditNode, t as getResolvedEditNodes } from "./node-registry-
|
|
2
|
-
import { A as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, C as KaTeXBlockNode, I as AlertQuoteNode, M as FootnoteNode, R as extractTextContent, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, h as $createMentionNode, j as $createFootnoteNode, k as $withAdaptiveImageDisplayWidth, o as $createSpoilerNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-
|
|
3
|
-
import { a as FootnoteDefinitionsProvider, n as computeImageMeta } from "./KaTeXRenderer-
|
|
1
|
+
import { c as setCodeBlockCursorIntent, o as $createCodeBlockEditNode, s as $createBannerEditNode, t as getResolvedEditNodes } from "./node-registry-CD8rAdly.js";
|
|
2
|
+
import { A as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, C as KaTeXBlockNode, I as AlertQuoteNode, M as FootnoteNode, R as extractTextContent, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, h as $createMentionNode, j as $createFootnoteNode, k as $withAdaptiveImageDisplayWidth, o as $createSpoilerNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-BxnXR-HA.js";
|
|
3
|
+
import { a as FootnoteDefinitionsProvider, n as computeImageMeta } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
4
4
|
import "./katex.css-0TJGE4On.js";
|
|
5
|
-
import { C as CommentNode, M as BannerNode, T as CodeBlockNode, _ as FootnoteSectionNode, b as $createCommentNode, c as RubyNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, i as $createVideoNode, o as $createRubyNode, p as $isGridContainerNode, v as $createDetailsNode, x as $createCommentPlaceholderNode, y as DetailsNode } from "./config-
|
|
6
|
-
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
5
|
+
import { C as CommentNode, M as BannerNode, T as CodeBlockNode, _ as FootnoteSectionNode, b as $createCommentNode, c as RubyNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, i as $createVideoNode, o as $createRubyNode, p as $isGridContainerNode, v as $createDetailsNode, x as $createCommentPlaceholderNode, y as DetailsNode } from "./config-67th6WYZ.js";
|
|
6
|
+
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-Ci3XcsfX.js";
|
|
7
7
|
import { n as getHostname, r as probeFavicon, t as normalizeSerializedEditorState } from "./normalizeSerializedEditorState-VaI73T09.js";
|
|
8
8
|
import { CheckListPlugin } from "@lexical/react/LexicalCheckListPlugin";
|
|
9
9
|
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
@@ -443,8 +443,8 @@ var GIT_ALERT_TRANSFORMER$1 = {
|
|
|
443
443
|
dependencies: [AlertQuoteNode],
|
|
444
444
|
regExp: /^>\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/,
|
|
445
445
|
replace: (parentNode, children, match) => {
|
|
446
|
-
const
|
|
447
|
-
const
|
|
446
|
+
const alertType = ALERT_TYPE_MAP[match[1]] || "note";
|
|
447
|
+
const content = { root: {
|
|
448
448
|
children: [{
|
|
449
449
|
type: "paragraph",
|
|
450
450
|
children: children.map((child) => child.exportJSON()),
|
|
@@ -460,7 +460,8 @@ var GIT_ALERT_TRANSFORMER$1 = {
|
|
|
460
460
|
indent: 0,
|
|
461
461
|
type: "root",
|
|
462
462
|
version: 1
|
|
463
|
-
} }
|
|
463
|
+
} };
|
|
464
|
+
const alertNode = $createAlertQuoteEditNode(alertType, content);
|
|
464
465
|
parentNode.replace(alertNode);
|
|
465
466
|
}
|
|
466
467
|
};
|
|
@@ -537,7 +538,7 @@ var CONTAINER_TRANSFORMER$1 = {
|
|
|
537
538
|
const params = match[2];
|
|
538
539
|
if (type in BANNER_TYPE_MAP) {
|
|
539
540
|
const bannerType = BANNER_TYPE_MAP[type];
|
|
540
|
-
const
|
|
541
|
+
const content = { root: {
|
|
541
542
|
children: [{
|
|
542
543
|
type: "paragraph",
|
|
543
544
|
children: children.map((child) => child.exportJSON()),
|
|
@@ -553,13 +554,15 @@ var CONTAINER_TRANSFORMER$1 = {
|
|
|
553
554
|
indent: 0,
|
|
554
555
|
type: "root",
|
|
555
556
|
version: 1
|
|
556
|
-
} }
|
|
557
|
+
} };
|
|
558
|
+
const banner = $createBannerEditNode(bannerType, content);
|
|
557
559
|
parentNode.replace(banner);
|
|
558
560
|
return;
|
|
559
561
|
}
|
|
560
562
|
if (type === "details") {
|
|
561
563
|
const summaryMatch = params?.match(/summary="([^"]*)"/);
|
|
562
|
-
const
|
|
564
|
+
const summary = summaryMatch ? summaryMatch[1] : "Details";
|
|
565
|
+
const details = $createDetailsNode(summary);
|
|
563
566
|
children.forEach((child) => {
|
|
564
567
|
details.append(child);
|
|
565
568
|
});
|
|
@@ -842,7 +845,8 @@ function convertAndInsert(markdown) {
|
|
|
842
845
|
}
|
|
843
846
|
const serializedChildren = tempEditor.getEditorState().toJSON().root.children;
|
|
844
847
|
if (!serializedChildren.length) return false;
|
|
845
|
-
|
|
848
|
+
const nodes = serializedChildren.map((s) => $parseSerializedNode(s));
|
|
849
|
+
$insertNodes(nodes);
|
|
846
850
|
return true;
|
|
847
851
|
}
|
|
848
852
|
function MarkdownPastePlugin() {
|
|
@@ -857,7 +861,8 @@ function MarkdownPastePlugin() {
|
|
|
857
861
|
if (vscodeData) {
|
|
858
862
|
const code = clipboardData.getData("text/plain");
|
|
859
863
|
if (code) {
|
|
860
|
-
|
|
864
|
+
const nodes = code.split(/\r?\n{3,}/).filter(Boolean).map((s) => $createCodeBlockEditNode(s.replace(/^\s*\n/, "").replace(/\n\s*$/, ""), vscodeData.language));
|
|
865
|
+
$insertNodes(nodes);
|
|
861
866
|
event.preventDefault();
|
|
862
867
|
return true;
|
|
863
868
|
}
|
|
@@ -1175,13 +1180,14 @@ function ImageUploadPlugin({ onUpload }) {
|
|
|
1175
1180
|
try {
|
|
1176
1181
|
const [result, meta] = await Promise.all([uploadRef.current(file), computeImageMeta(file)]);
|
|
1177
1182
|
editor.update(() => {
|
|
1178
|
-
$
|
|
1183
|
+
const node = $createImageNode($withAdaptiveImageDisplayWidth({
|
|
1179
1184
|
src: result.src,
|
|
1180
1185
|
altText: result.altText ?? file.name,
|
|
1181
1186
|
width: result.width ?? meta.width,
|
|
1182
1187
|
height: result.height ?? meta.height,
|
|
1183
1188
|
thumbhash: result.thumbhash ?? meta.thumbhash
|
|
1184
|
-
}))
|
|
1189
|
+
}));
|
|
1190
|
+
$insertNodes([node]);
|
|
1185
1191
|
});
|
|
1186
1192
|
if (closeDialog) {
|
|
1187
1193
|
setDialogOpen(false);
|
|
@@ -1306,12 +1312,13 @@ function ImageUploadPlugin({ onUpload }) {
|
|
|
1306
1312
|
const handleInsertByUrl = useCallback(() => {
|
|
1307
1313
|
if (!urlPreview$1 || !isSafeImageUrl(urlPreview$1)) return;
|
|
1308
1314
|
editor.update(() => {
|
|
1309
|
-
$
|
|
1315
|
+
const node = $createImageNode($withAdaptiveImageDisplayWidth({
|
|
1310
1316
|
src: urlPreview$1,
|
|
1311
1317
|
altText: "",
|
|
1312
1318
|
width: urlMeta?.width,
|
|
1313
1319
|
height: urlMeta?.height
|
|
1314
|
-
}))
|
|
1320
|
+
}));
|
|
1321
|
+
$insertNodes([node]);
|
|
1315
1322
|
});
|
|
1316
1323
|
pushToast("success", "Image inserted");
|
|
1317
1324
|
setDialogOpen(false);
|
package/dist/commands-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, R as extractTextContent, o as $createSpoilerNode, s as $isSpoilerNode } from "./theme-
|
|
2
|
-
import { i as INSERT_KATEX_INLINE_COMMAND, l as INSERT_ALERT_COMMAND, o as INSERT_IMAGE_COMMAND, r as INSERT_KATEX_BLOCK_COMMAND, t as INSERT_MERMAID_COMMAND } from "./MermaidPlugin-
|
|
1
|
+
import { A as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, R as extractTextContent, o as $createSpoilerNode, s as $isSpoilerNode } from "./theme-BxnXR-HA.js";
|
|
2
|
+
import { i as INSERT_KATEX_INLINE_COMMAND, l as INSERT_ALERT_COMMAND, o as INSERT_IMAGE_COMMAND, r as INSERT_KATEX_BLOCK_COMMAND, t as INSERT_MERMAID_COMMAND } from "./MermaidPlugin-H3B0DYXL.js";
|
|
3
3
|
import { $createTextNode, $getSelection, $isRangeSelection } from "lexical";
|
|
4
4
|
//#region src/utils/collect-command-items.ts
|
|
5
5
|
function collectCommandItems(editor) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as KaTeXBlockNode, E as ImageNode, I as AlertQuoteNode, L as _defineProperty, M as FootnoteNode, R as extractTextContent, V as useNestedContentRenderer, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, m as MermaidNode } from "./theme-
|
|
2
|
-
import { D as VIDEO_NODE_KEY, S as LINK_CARD_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, m as useVariant, s as useFootnoteDefinitions, u as createRendererDecoration, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-
|
|
1
|
+
import { C as KaTeXBlockNode, E as ImageNode, I as AlertQuoteNode, L as _defineProperty, M as FootnoteNode, R as extractTextContent, V as useNestedContentRenderer, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, m as MermaidNode } from "./theme-BxnXR-HA.js";
|
|
2
|
+
import { D as VIDEO_NODE_KEY, S as LINK_CARD_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, m as useVariant, s as useFootnoteDefinitions, u as createRendererDecoration, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
3
3
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-0TJGE4On.js";
|
|
4
4
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
5
5
|
import { t as LinkCardRenderer } from "./LinkCardRenderer-DPV1JP0X.js";
|
|
@@ -172,7 +172,7 @@ var codeToHtmlFn = null;
|
|
|
172
172
|
var shikiLoadPromise = null;
|
|
173
173
|
function loadCodeToHtml() {
|
|
174
174
|
if (codeToHtmlFn) return Promise.resolve(codeToHtmlFn);
|
|
175
|
-
if (!shikiLoadPromise) shikiLoadPromise = import("shiki/bundle/
|
|
175
|
+
if (!shikiLoadPromise) shikiLoadPromise = import("shiki/bundle/full").then((mod) => {
|
|
176
176
|
codeToHtmlFn = mod.codeToHtml;
|
|
177
177
|
return mod.codeToHtml;
|
|
178
178
|
}).catch((err) => {
|
|
@@ -585,9 +585,10 @@ function FootnoteSectionRenderer({ definitions }) {
|
|
|
585
585
|
children: [/* @__PURE__ */ jsx("hr", { className: clsx(semanticClassNames.footnoteSectionDivider, sharedStyles.footnoteSectionDivider) }), /* @__PURE__ */ jsx("ol", {
|
|
586
586
|
className: clsx(semanticClassNames.footnoteSectionList, sharedStyles.footnoteSectionList),
|
|
587
587
|
children: sortedEntries.map(([identifier, content]) => {
|
|
588
|
+
const displayNum = displayNumberMap[identifier] ?? identifier;
|
|
588
589
|
return /* @__PURE__ */ jsx(FootnoteSectionItem, {
|
|
589
590
|
content,
|
|
590
|
-
displayNum
|
|
591
|
+
displayNum,
|
|
591
592
|
identifier
|
|
592
593
|
}, identifier);
|
|
593
594
|
})
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as blockIdState, C as createTextSelectionStore, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as ImagePreprocessProvider, L as CorePlugins, N as ImageUploadProvider, O as defaultImageUpload, S as TextSelectionStoreProvider, T as useTextSelectionStore, _ as $getRootBlock, a as AutoFocusPlugin, b as buildBlockAnchor, c as $captureTextSelection, d as createDOMRangeFromTextSelection, f as findDOMPointByTextOffset, g as TEXT_SELECTION_HIGHLIGHT_NAME, h as getTextOffsetFromDOMPoint, i as EditorRefPlugin, j as VideoUploadProvider, k as BlockIdPlugin, l as $captureTextSelectionFromRangeSelection, m as getDOMRectFromTextSelection, n as OnChangePlugin, o as VideoUploadPlugin, p as getBlockElementById, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, u as $restoreTextSelection, v as $getTextOffsetInBlock, w as useTextSelectionSnapshot, x as buildRangeAnchor, y as $resolveSelectionPoint } from "./SubmitShortcutPlugin-
|
|
2
|
-
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-
|
|
3
|
-
import { B as NestedContentRendererProvider, H as useOptionalNestedContentRenderer, V as useNestedContentRenderer, t as editorTheme } from "./theme-
|
|
4
|
-
import { C as MENTION_NODE_KEY, D as VIDEO_NODE_KEY, E as TAG_NODE_KEY, S as LINK_CARD_NODE_KEY, T as RUBY_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, a as FootnoteDefinitionsProvider, b as IMAGE_NODE_KEY, c as useFootnoteDisplayNumber, d as RendererConfigProvider, f as useRendererConfig, g as BANNER_NODE_KEY, h as ALERT_NODE_KEY, m as useVariant, o as useFootnoteContent, p as useRendererMode, s as useFootnoteDefinitions, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-
|
|
1
|
+
import { A as blockIdState, C as createTextSelectionStore, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as ImagePreprocessProvider, L as CorePlugins, N as ImageUploadProvider, O as defaultImageUpload, S as TextSelectionStoreProvider, T as useTextSelectionStore, _ as $getRootBlock, a as AutoFocusPlugin, b as buildBlockAnchor, c as $captureTextSelection, d as createDOMRangeFromTextSelection, f as findDOMPointByTextOffset, g as TEXT_SELECTION_HIGHLIGHT_NAME, h as getTextOffsetFromDOMPoint, i as EditorRefPlugin, j as VideoUploadProvider, k as BlockIdPlugin, l as $captureTextSelectionFromRangeSelection, m as getDOMRectFromTextSelection, n as OnChangePlugin, o as VideoUploadPlugin, p as getBlockElementById, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, u as $restoreTextSelection, v as $getTextOffsetInBlock, w as useTextSelectionSnapshot, x as buildRangeAnchor, y as $resolveSelectionPoint } from "./SubmitShortcutPlugin-BR2DC6hX.js";
|
|
2
|
+
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-CD8rAdly.js";
|
|
3
|
+
import { B as NestedContentRendererProvider, H as useOptionalNestedContentRenderer, V as useNestedContentRenderer, t as editorTheme } from "./theme-BxnXR-HA.js";
|
|
4
|
+
import { C as MENTION_NODE_KEY, D as VIDEO_NODE_KEY, E as TAG_NODE_KEY, S as LINK_CARD_NODE_KEY, T as RUBY_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, a as FootnoteDefinitionsProvider, b as IMAGE_NODE_KEY, c as useFootnoteDisplayNumber, d as RendererConfigProvider, f as useRendererConfig, g as BANNER_NODE_KEY, h as ALERT_NODE_KEY, m as useVariant, o as useFootnoteContent, p as useRendererMode, s as useFootnoteDefinitions, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
5
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-0TJGE4On.js";
|
|
6
|
-
import { D as ColorSchemeProvider, O as useColorScheme } from "./config-
|
|
6
|
+
import { D as ColorSchemeProvider, O as useColorScheme } from "./config-67th6WYZ.js";
|
|
7
7
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
8
|
-
import { a as NestedEditorPluginsProvider, o as useNestedEditorPlugins } from "./AlertQuoteEditNode-
|
|
8
|
+
import { a as NestedEditorPluginsProvider, o as useNestedEditorPlugins } from "./AlertQuoteEditNode-Ci3XcsfX.js";
|
|
9
9
|
import { t as normalizeSerializedEditorState } from "./normalizeSerializedEditorState-VaI73T09.js";
|
|
10
10
|
import { n as useExtraNodes, r as LinkFavicon, t as ExtraNodesProvider } from "./ExtraNodesContext-Cjb_L5rP.js";
|
|
11
|
-
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-
|
|
11
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-H3B0DYXL.js";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
14
14
|
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as KaTeXBlockNode, E as ImageNode, L as _defineProperty, M as FootnoteNode, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, i as TagNode, m as MermaidNode, t as editorTheme } from "./theme-
|
|
2
|
-
import { _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, s as useFootnoteDefinitions } from "./KaTeXRenderer-
|
|
1
|
+
import { C as KaTeXBlockNode, E as ImageNode, L as _defineProperty, M as FootnoteNode, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, i as TagNode, m as MermaidNode, t as editorTheme } from "./theme-BxnXR-HA.js";
|
|
2
|
+
import { _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, s as useFootnoteDefinitions } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
3
3
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-0TJGE4On.js";
|
|
4
|
-
import { C as CommentNode, E as CodeBlockRenderer, M as BannerNode, N as normalizeBannerType, P as BannerRenderer, T as CodeBlockNode, _ as FootnoteSectionNode, a as VideoNode, c as RubyNode, d as LinkCardNode, k as $isBannerNode, m as GridContainerNode, n as builtinNodes, p as $isGridContainerNode, w as $isCodeBlockNode, y as DetailsNode } from "./config-
|
|
4
|
+
import { C as CommentNode, E as CodeBlockRenderer, M as BannerNode, N as normalizeBannerType, P as BannerRenderer, T as CodeBlockNode, _ as FootnoteSectionNode, a as VideoNode, c as RubyNode, d as LinkCardNode, k as $isBannerNode, m as GridContainerNode, n as builtinNodes, p as $isGridContainerNode, w as $isCodeBlockNode, y as DetailsNode } from "./config-67th6WYZ.js";
|
|
5
5
|
import { n as gridStyles, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
6
|
-
import { i as NestedEditorCorePlugins, n as AlertQuoteEditNode, r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-
|
|
6
|
+
import { i as NestedEditorCorePlugins, n as AlertQuoteEditNode, r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-Ci3XcsfX.js";
|
|
7
7
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
8
8
|
import { createElement, useCallback, useEffect, useState } from "react";
|
|
9
9
|
import { $createNodeSelection, $createParagraphNode, $getNodeByKey, $getRoot, $getSelection, $insertNodes, $isDecoratorNode, $isElementNode, $isNodeSelection, $nodesOfType, $setSelection, createEditor } from "lexical";
|
package/dist/nodes-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as FootnoteSectionEditNode, i as customEditNodes, n as setResolvedEditNodes, r as allEditNodes, t as getResolvedEditNodes } from "./node-registry-
|
|
2
|
-
import { C as KaTeXBlockNode, D as sanitizeImageDisplayWidth, E as ImageNode, F as ALERT_TYPES, O as sanitizeImageLayout, P as ALERT_LABELS, S as $isKaTeXBlockNode, T as $isImageNode, _ as MentionNode, b as KaTeXInlineNode, d as RichQuoteNode, f as $createMermaidNode, g as $isMentionNode, h as $createMentionNode, i as TagNode, l as $createRichQuoteNode, m as MermaidNode, n as $createTagNode, p as $isMermaidNode, r as $isTagNode, u as $isRichQuoteNode, w as $createImageNode, y as $isKaTeXInlineNode } from "./theme-
|
|
3
|
-
import { A as BANNER_LABELS, C as CommentNode, S as $isCommentNode, _ as FootnoteSectionNode, b as $createCommentNode, c as RubyNode, d as LinkCardNode, f as $createGridContainerNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, j as BANNER_TYPES, l as $createLinkCardNode, m as GridContainerNode, n as builtinNodes, o as $createRubyNode, p as $isGridContainerNode, r as customNodes, s as $isRubyNode, t as allNodes, u as $isLinkCardNode } from "./config-
|
|
4
|
-
import { r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-
|
|
1
|
+
import { a as FootnoteSectionEditNode, i as customEditNodes, n as setResolvedEditNodes, r as allEditNodes, t as getResolvedEditNodes } from "./node-registry-CD8rAdly.js";
|
|
2
|
+
import { C as KaTeXBlockNode, D as sanitizeImageDisplayWidth, E as ImageNode, F as ALERT_TYPES, O as sanitizeImageLayout, P as ALERT_LABELS, S as $isKaTeXBlockNode, T as $isImageNode, _ as MentionNode, b as KaTeXInlineNode, d as RichQuoteNode, f as $createMermaidNode, g as $isMentionNode, h as $createMentionNode, i as TagNode, l as $createRichQuoteNode, m as MermaidNode, n as $createTagNode, p as $isMermaidNode, r as $isTagNode, u as $isRichQuoteNode, w as $createImageNode, y as $isKaTeXInlineNode } from "./theme-BxnXR-HA.js";
|
|
3
|
+
import { A as BANNER_LABELS, C as CommentNode, S as $isCommentNode, _ as FootnoteSectionNode, b as $createCommentNode, c as RubyNode, d as LinkCardNode, f as $createGridContainerNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, j as BANNER_TYPES, l as $createLinkCardNode, m as GridContainerNode, n as builtinNodes, o as $createRubyNode, p as $isGridContainerNode, r as customNodes, s as $isRubyNode, t as allNodes, u as $isLinkCardNode } from "./config-67th6WYZ.js";
|
|
4
|
+
import { r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-Ci3XcsfX.js";
|
|
5
5
|
export { $createCommentNode, $createFootnoteSectionNode, $createGridContainerNode, $createImageNode, $createLinkCardNode, $createMentionNode, $createMermaidNode, $createRichQuoteNode, $createRubyNode, $createTagNode, $isCommentNode, $isFootnoteSectionNode, $isGridContainerNode, $isImageNode, $isKaTeXBlockNode, $isKaTeXInlineNode, $isLinkCardNode, $isMentionNode, $isMermaidNode, $isRichQuoteNode, $isRubyNode, $isTagNode, ALERT_LABELS, ALERT_TYPES, BANNER_LABELS, BANNER_TYPES, CommentNode, FootnoteSectionEditNode, FootnoteSectionNode, GridContainerNode, ImageNode, KaTeXBlockNode, KaTeXInlineNode, LinkCardNode, MentionNode, MermaidNode, NESTED_EDITOR_NODES, RichQuoteNode, RubyNode, TagNode, allEditNodes, allNodes, builtinNodes, customEditNodes, customNodes, getResolvedEditNodes, sanitizeImageDisplayWidth, sanitizeImageLayout, setResolvedEditNodes };
|
package/dist/plugins-entry.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as blockIdState, B as ALL_TRANSFORMERS, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as ImagePreprocessProvider, G as AutoLinkPlugin, H as ClickBelowPlugin, I as useImagePreprocess, L as CorePlugins, M as useVideoUpload, N as ImageUploadProvider, O as defaultImageUpload, P as useImageUpload, R as MarkdownShortcutsPlugin, U as registerClickBelowCommand, V as HorizontalRulePlugin, W as BlockExitPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as VideoUploadProvider, k as BlockIdPlugin, n as OnChangePlugin, o as VideoUploadPlugin, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, z as MarkdownPastePlugin } from "./SubmitShortcutPlugin-
|
|
2
|
-
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-
|
|
1
|
+
import { A as blockIdState, B as ALL_TRANSFORMERS, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as ImagePreprocessProvider, G as AutoLinkPlugin, H as ClickBelowPlugin, I as useImagePreprocess, L as CorePlugins, M as useVideoUpload, N as ImageUploadProvider, O as defaultImageUpload, P as useImageUpload, R as MarkdownShortcutsPlugin, U as registerClickBelowCommand, V as HorizontalRulePlugin, W as BlockExitPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as VideoUploadProvider, k as BlockIdPlugin, n as OnChangePlugin, o as VideoUploadPlugin, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, z as MarkdownPastePlugin } from "./SubmitShortcutPlugin-BR2DC6hX.js";
|
|
2
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-H3B0DYXL.js";
|
|
3
3
|
export { ALL_TRANSFORMERS, AlertPlugin, AutoFocusPlugin, AutoLinkPlugin, BlockExitPlugin, BlockIdPlugin, ClickBelowPlugin, CorePlugins, EditorRefPlugin, FootnotePlugin, HorizontalRulePlugin, ImagePlugin, ImagePreprocessProvider, ImageUploadPlugin, ImageUploadProvider, KaTeXPlugin, LinkFaviconPlugin, MarkdownPastePlugin, MarkdownShortcutsPlugin, MermaidPlugin, OnChangePlugin, SubmitShortcutPlugin, TextSelectionPlugin, VideoUploadPlugin, VideoUploadProvider, blockIdState, defaultImageUpload, registerClickBelowCommand, useImagePreprocess, useImageUpload, useVideoUpload };
|
package/dist/renderers-entry.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as MENTION_NODE_KEY, D as VIDEO_NODE_KEY, E as TAG_NODE_KEY, S as LINK_CARD_NODE_KEY, T as RUBY_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, b as IMAGE_NODE_KEY, c as useFootnoteDisplayNumber, g as BANNER_NODE_KEY, h as ALERT_NODE_KEY, i as FootnoteStaticRenderer, l as RendererWrapper, n as computeImageMeta, o as useFootnoteContent, r as decodeThumbHash, t as KaTeXRenderer, u as createRendererDecoration, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-
|
|
1
|
+
import { C as MENTION_NODE_KEY, D as VIDEO_NODE_KEY, E as TAG_NODE_KEY, S as LINK_CARD_NODE_KEY, T as RUBY_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, b as IMAGE_NODE_KEY, c as useFootnoteDisplayNumber, g as BANNER_NODE_KEY, h as ALERT_NODE_KEY, i as FootnoteStaticRenderer, l as RendererWrapper, n as computeImageMeta, o as useFootnoteContent, r as decodeThumbHash, t as KaTeXRenderer, u as createRendererDecoration, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
2
2
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-0TJGE4On.js";
|
|
3
3
|
import { t as LinkCardRenderer } from "./LinkCardRenderer-DPV1JP0X.js";
|
|
4
4
|
import { t as RubyRenderer } from "./RubyRenderer-B76PPUga.js";
|
package/dist/static-entry.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as NestedContentRendererProvider, H as useOptionalNestedContentRenderer, R as extractTextContent, V as useNestedContentRenderer, a as getTagBgColor, t as editorTheme } from "./theme-
|
|
2
|
-
import { C as MENTION_NODE_KEY, D as VIDEO_NODE_KEY, E as TAG_NODE_KEY, S as LINK_CARD_NODE_KEY, T as RUBY_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, a as FootnoteDefinitionsProvider, b as IMAGE_NODE_KEY, c as useFootnoteDisplayNumber, d as RendererConfigProvider, f as useRendererConfig, g as BANNER_NODE_KEY, h as ALERT_NODE_KEY, l as RendererWrapper, m as useVariant, o as useFootnoteContent, p as useRendererMode, s as useFootnoteDefinitions, u as createRendererDecoration, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-
|
|
1
|
+
import { B as NestedContentRendererProvider, H as useOptionalNestedContentRenderer, R as extractTextContent, V as useNestedContentRenderer, a as getTagBgColor, t as editorTheme } from "./theme-BxnXR-HA.js";
|
|
2
|
+
import { C as MENTION_NODE_KEY, D as VIDEO_NODE_KEY, E as TAG_NODE_KEY, S as LINK_CARD_NODE_KEY, T as RUBY_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, a as FootnoteDefinitionsProvider, b as IMAGE_NODE_KEY, c as useFootnoteDisplayNumber, d as RendererConfigProvider, f as useRendererConfig, g as BANNER_NODE_KEY, h as ALERT_NODE_KEY, l as RendererWrapper, m as useVariant, o as useFootnoteContent, p as useRendererMode, s as useFootnoteDefinitions, u as createRendererDecoration, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
3
3
|
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-0TJGE4On.js";
|
|
4
|
-
import { D as ColorSchemeProvider, O as useColorScheme, n as builtinNodes, r as customNodes, t as allNodes } from "./config-
|
|
4
|
+
import { D as ColorSchemeProvider, O as useColorScheme, n as builtinNodes, r as customNodes, t as allNodes } from "./config-67th6WYZ.js";
|
|
5
5
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
6
6
|
import { t as normalizeSerializedEditorState } from "./normalizeSerializedEditorState-VaI73T09.js";
|
|
7
7
|
import { n as useExtraNodes, r as LinkFavicon, t as ExtraNodesProvider } from "./ExtraNodesContext-Cjb_L5rP.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as MENTION_NODE_KEY, b as IMAGE_NODE_KEY, h as ALERT_NODE_KEY, i as FootnoteStaticRenderer, l as RendererWrapper, r as decodeThumbHash, t as KaTeXRenderer, u as createRendererDecoration, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY } from "./KaTeXRenderer-
|
|
1
|
+
import { C as MENTION_NODE_KEY, b as IMAGE_NODE_KEY, h as ALERT_NODE_KEY, i as FootnoteStaticRenderer, l as RendererWrapper, r as decodeThumbHash, t as KaTeXRenderer, u as createRendererDecoration, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
2
2
|
import { l as semanticClassNames, u as sharedStyles } from "./katex.css-0TJGE4On.js";
|
|
3
3
|
import { createContext, createElement, use, useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { QuoteNode } from "@lexical/rich-text";
|
|
@@ -69,7 +69,7 @@ function extractTextContent(state) {
|
|
|
69
69
|
return walk(state);
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region \0@oxc-project+runtime@0.
|
|
72
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/typeof.js
|
|
73
73
|
function _typeof(o) {
|
|
74
74
|
"@babel/helpers - typeof";
|
|
75
75
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -79,7 +79,7 @@ function _typeof(o) {
|
|
|
79
79
|
}, _typeof(o);
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
|
-
//#region \0@oxc-project+runtime@0.
|
|
82
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPrimitive.js
|
|
83
83
|
function toPrimitive(t, r) {
|
|
84
84
|
if ("object" != _typeof(t) || !t) return t;
|
|
85
85
|
var e = t[Symbol.toPrimitive];
|
|
@@ -91,13 +91,13 @@ function toPrimitive(t, r) {
|
|
|
91
91
|
return ("string" === r ? String : Number)(t);
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
-
//#region \0@oxc-project+runtime@0.
|
|
94
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPropertyKey.js
|
|
95
95
|
function toPropertyKey(t) {
|
|
96
96
|
var i = toPrimitive(t, "string");
|
|
97
97
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
|
-
//#region \0@oxc-project+runtime@0.
|
|
100
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/defineProperty.js
|
|
101
101
|
function _defineProperty(e, r, t) {
|
|
102
102
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
103
103
|
value: t,
|
|
@@ -293,10 +293,11 @@ function ImageRenderer({ src, altText, width, height, caption, thumbhash, accent
|
|
|
293
293
|
maxWidth: "100%",
|
|
294
294
|
width: displayWidth !== void 0 ? "100%" : width && height ? width : void 0
|
|
295
295
|
};
|
|
296
|
+
const figureStyle = displayWidth ? { "--rich-image-display-width": `${displayWidth}%` } : void 0;
|
|
296
297
|
return /* @__PURE__ */ jsxs("figure", {
|
|
297
298
|
className: "rich-image",
|
|
298
299
|
"data-layout": layout,
|
|
299
|
-
style:
|
|
300
|
+
style: figureStyle,
|
|
300
301
|
children: [
|
|
301
302
|
/* @__PURE__ */ jsx("div", {
|
|
302
303
|
"aria-label": loaded ? `Zoom image: ${altText}` : void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shiki.d.ts","sourceRoot":"","sources":["../../src/utils/shiki.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,KACrC,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"shiki.d.ts","sourceRoot":"","sources":["../../src/utils/shiki.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,KACrC,OAAO,CAAC,MAAM,CAAC,CAAC;AAKrB,wBAAgB,cAAc,IAAI,OAAO,CAAC,YAAY,CAAC,CActD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Core rich text editor based on Lexical",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,46 +45,46 @@
|
|
|
45
45
|
"dist"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@lexical/code-core": "^0.
|
|
48
|
+
"@lexical/code-core": "^0.49.0",
|
|
49
49
|
"nanoid": "^6.0.0",
|
|
50
50
|
"thumbhash": "^0.1.1",
|
|
51
|
-
"@haklex/rich-editor-ui": "0.
|
|
52
|
-
"@haklex/rich-headless": "0.
|
|
53
|
-
"@haklex/rich-style-token": "0.
|
|
51
|
+
"@haklex/rich-editor-ui": "0.33.0",
|
|
52
|
+
"@haklex/rich-headless": "0.33.0",
|
|
53
|
+
"@haklex/rich-style-token": "0.33.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@lexical/extension": "^0.
|
|
57
|
-
"@lexical/link": "^0.
|
|
58
|
-
"@lexical/list": "^0.
|
|
59
|
-
"@lexical/markdown": "^0.
|
|
60
|
-
"@lexical/react": "^0.
|
|
61
|
-
"@lexical/rich-text": "^0.
|
|
62
|
-
"@lexical/table": "^0.
|
|
63
|
-
"@types/react": "^19.2.
|
|
64
|
-
"@types/react-dom": "^19.2.
|
|
65
|
-
"@vanilla-extract/css": "^1.21.
|
|
66
|
-
"@vanilla-extract/vite-plugin": "^5.2.
|
|
67
|
-
"katex": "^0.
|
|
68
|
-
"lexical": "^0.
|
|
69
|
-
"lucide-react": "^1.
|
|
70
|
-
"react": "^19.2.
|
|
71
|
-
"react-dom": "^19.2.
|
|
72
|
-
"shiki": "^4.
|
|
73
|
-
"typescript": "^
|
|
56
|
+
"@lexical/extension": "^0.49.0",
|
|
57
|
+
"@lexical/link": "^0.49.0",
|
|
58
|
+
"@lexical/list": "^0.49.0",
|
|
59
|
+
"@lexical/markdown": "^0.49.0",
|
|
60
|
+
"@lexical/react": "^0.49.0",
|
|
61
|
+
"@lexical/rich-text": "^0.49.0",
|
|
62
|
+
"@lexical/table": "^0.49.0",
|
|
63
|
+
"@types/react": "^19.2.18",
|
|
64
|
+
"@types/react-dom": "^19.2.4",
|
|
65
|
+
"@vanilla-extract/css": "^1.21.2",
|
|
66
|
+
"@vanilla-extract/vite-plugin": "^5.2.6",
|
|
67
|
+
"katex": "^0.18.1",
|
|
68
|
+
"lexical": "^0.49.0",
|
|
69
|
+
"lucide-react": "^1.28.0",
|
|
70
|
+
"react": "^19.2.8",
|
|
71
|
+
"react-dom": "^19.2.8",
|
|
72
|
+
"shiki": "^4.4.1",
|
|
73
|
+
"typescript": "^7.0.2",
|
|
74
74
|
"unplugin-dts": "^1.0.3",
|
|
75
|
-
"vite": "^8.
|
|
75
|
+
"vite": "^8.2.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@base-ui/react": ">=1.5.0",
|
|
79
|
-
"@lexical/extension": "^0.
|
|
80
|
-
"@lexical/link": "^0.
|
|
81
|
-
"@lexical/list": "^0.
|
|
82
|
-
"@lexical/markdown": "^0.
|
|
83
|
-
"@lexical/react": "^0.
|
|
84
|
-
"@lexical/rich-text": "^0.
|
|
85
|
-
"@lexical/table": "^0.
|
|
79
|
+
"@lexical/extension": "^0.49.0",
|
|
80
|
+
"@lexical/link": "^0.49.0",
|
|
81
|
+
"@lexical/list": "^0.49.0",
|
|
82
|
+
"@lexical/markdown": "^0.49.0",
|
|
83
|
+
"@lexical/react": "^0.49.0",
|
|
84
|
+
"@lexical/rich-text": "^0.49.0",
|
|
85
|
+
"@lexical/table": "^0.49.0",
|
|
86
86
|
"katex": ">=0.16.0",
|
|
87
|
-
"lexical": "^0.
|
|
87
|
+
"lexical": "^0.49.0",
|
|
88
88
|
"lucide-react": "^1.0.0",
|
|
89
89
|
"react": ">=19",
|
|
90
90
|
"react-dom": ">=19",
|