@haklex/rich-editor 0.41.0 → 0.41.1
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-DUvNEyjw.js → AlertQuoteEditNode-DtwITriP.js} +2 -2
- package/dist/{MermaidPlugin-DgIAgFH8.js → MermaidPlugin-BRM8cjN-.js} +2 -2
- package/dist/{SubmitShortcutPlugin-OoPWBtTU.js → SubmitShortcutPlugin-BXjoXq96.js} +4 -4
- package/dist/commands-entry.mjs +2 -2
- package/dist/{config-D8JJ7F11.js → config-ruOEZI0Y.js} +15 -14
- package/dist/index.mjs +6 -6
- package/dist/{node-registry-BFDycNE-.js → node-registry-B_vm9FD7.js} +11 -11
- package/dist/nodes/AlertQuoteNode.d.ts.map +1 -1
- package/dist/nodes/CodeBlockEditNode.d.ts.map +1 -1
- package/dist/nodes/CodeBlockNode.d.ts.map +1 -1
- package/dist/nodes/DetailsNode.d.ts.map +1 -1
- package/dist/nodes/SpoilerNode.d.ts.map +1 -1
- package/dist/nodes-entry.mjs +4 -4
- package/dist/plugins-entry.mjs +4 -4
- package/dist/static-entry.mjs +2 -2
- package/dist/{theme-Vu_9D3oG.js → theme-CxcaORbp.js} +8 -8
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as FootnoteNode, G as AlertQuoteNode, H as $isAlertQuoteNode, J as AlertRenderer, K as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, t as editorTheme } from "./theme-
|
|
1
|
+
import { B as FootnoteNode, G as AlertQuoteNode, H as $isAlertQuoteNode, J as AlertRenderer, K as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, t as editorTheme } from "./theme-CxcaORbp.js";
|
|
2
2
|
import { h as ALERT_NODE_KEY, l as RendererWrapper } from "./KaTeXRenderer-DvxFML1l.js";
|
|
3
3
|
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
4
4
|
import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
@@ -260,7 +260,7 @@ var AlertQuoteEditNode = class AlertQuoteEditNode extends AlertQuoteNode {
|
|
|
260
260
|
}
|
|
261
261
|
static importJSON(_serializedNode) {
|
|
262
262
|
const serializedNode = _serializedNode;
|
|
263
|
-
return new AlertQuoteEditNode(serializedNode.alertType, serializedNode.content);
|
|
263
|
+
return new AlertQuoteEditNode(serializedNode.alertType, serializedNode.content).updateFromJSON(_serializedNode);
|
|
264
264
|
}
|
|
265
265
|
exportJSON() {
|
|
266
266
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as $withAdaptiveImageDisplayWidth, f as $createMermaidNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-
|
|
2
|
-
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
1
|
+
import { O as $withAdaptiveImageDisplayWidth, f as $createMermaidNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-CxcaORbp.js";
|
|
2
|
+
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-DtwITriP.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";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as setCodeBlockCursorIntent, o as $createCodeBlockEditNode, s as $createBannerEditNode, t as getResolvedEditNodes } from "./node-registry-
|
|
1
|
+
import { c as setCodeBlockCursorIntent, o as $createCodeBlockEditNode, s as $createBannerEditNode, t as getResolvedEditNodes } from "./node-registry-B_vm9FD7.js";
|
|
2
2
|
import "./katex.css-0TJGE4On.js";
|
|
3
|
-
import { $ as INLINE_DRAG_MIME, B as FootnoteNode, C as KaTeXBlockNode, G as AlertQuoteNode, O as $withAdaptiveImageDisplayWidth, Q as INLINE_DRAG_ATTR, V as OPEN_FILE_PICKER_COMMAND, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, h as $createMentionNode, k as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, o as $createSpoilerNode, q as extractTextContent, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode, z as $createFootnoteNode } from "./theme-
|
|
3
|
+
import { $ as INLINE_DRAG_MIME, B as FootnoteNode, C as KaTeXBlockNode, G as AlertQuoteNode, O as $withAdaptiveImageDisplayWidth, Q as INLINE_DRAG_ATTR, V as OPEN_FILE_PICKER_COMMAND, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, h as $createMentionNode, k as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, o as $createSpoilerNode, q as extractTextContent, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode, z as $createFootnoteNode } from "./theme-CxcaORbp.js";
|
|
4
4
|
import { a as FootnoteDefinitionsProvider, n as computeImageMeta } from "./KaTeXRenderer-DvxFML1l.js";
|
|
5
|
-
import { C as DetailsNode, D as CommentNode, I as BannerNode, S as $createDetailsNode, T as $createCommentPlaceholderNode, _ as FootnoteSectionNode, c as RubyNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, i as $createVideoNode, k as CodeBlockNode, o as $createRubyNode, p as $isGridContainerNode, v as $createFileNode, w as $createCommentNode, x as fileExtFromName, y as $isFileNode } from "./config-
|
|
6
|
-
import { o as PasteLinkPlugin, t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
5
|
+
import { C as DetailsNode, D as CommentNode, I as BannerNode, S as $createDetailsNode, T as $createCommentPlaceholderNode, _ as FootnoteSectionNode, c as RubyNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, i as $createVideoNode, k as CodeBlockNode, o as $createRubyNode, p as $isGridContainerNode, v as $createFileNode, w as $createCommentNode, x as fileExtFromName, y as $isFileNode } from "./config-ruOEZI0Y.js";
|
|
6
|
+
import { o as PasteLinkPlugin, t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-DtwITriP.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";
|
package/dist/commands-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as OPEN_FILE_PICKER_COMMAND, k as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, o as $createSpoilerNode, q as extractTextContent, 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 { V as OPEN_FILE_PICKER_COMMAND, k as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, o as $createSpoilerNode, q as extractTextContent, s as $isSpoilerNode } from "./theme-CxcaORbp.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-BRM8cjN-.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
1
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-0TJGE4On.js";
|
|
2
|
-
import { B as FootnoteNode, C as KaTeXBlockNode, E as ImageNode, G as AlertQuoteNode, K as _defineProperty, V as OPEN_FILE_PICKER_COMMAND, X as useNestedContentRenderer, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, et as markInlineDraggable, i as TagNode, m as MermaidNode, q as extractTextContent } from "./theme-
|
|
2
|
+
import { B as FootnoteNode, C as KaTeXBlockNode, E as ImageNode, G as AlertQuoteNode, K as _defineProperty, V as OPEN_FILE_PICKER_COMMAND, X as useNestedContentRenderer, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, et as markInlineDraggable, i as TagNode, m as MermaidNode, q as extractTextContent } from "./theme-CxcaORbp.js";
|
|
3
3
|
import { C as LINK_CARD_NODE_KEY, O as VIDEO_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, b as FOOTNOTE_SECTION_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, m as useVariant, s as useFootnoteDefinitions, u as createRendererDecoration, v as FILE_NODE_KEY } from "./KaTeXRenderer-DvxFML1l.js";
|
|
4
4
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
5
5
|
import { n as FileRenderer, t as LinkCardRenderer } from "./LinkCardRenderer-BT8P5aJC.js";
|
|
@@ -121,7 +121,7 @@ var BannerNode = class BannerNode extends DecoratorNode {
|
|
|
121
121
|
const serializedNode = _serializedNode;
|
|
122
122
|
const legacy = serializedNode;
|
|
123
123
|
const bannerType = normalizeBannerType(serializedNode.bannerType);
|
|
124
|
-
if (serializedNode.content) return new BannerNode(bannerType, serializedNode.content);
|
|
124
|
+
if (serializedNode.content) return new BannerNode(bannerType, serializedNode.content).updateFromJSON(_serializedNode);
|
|
125
125
|
if (legacy.children) {
|
|
126
126
|
const content = { root: {
|
|
127
127
|
children: legacy.children,
|
|
@@ -131,9 +131,9 @@ var BannerNode = class BannerNode extends DecoratorNode {
|
|
|
131
131
|
type: "root",
|
|
132
132
|
version: 1
|
|
133
133
|
} };
|
|
134
|
-
return new BannerNode(bannerType, content);
|
|
134
|
+
return new BannerNode(bannerType, content).updateFromJSON(_serializedNode);
|
|
135
135
|
}
|
|
136
|
-
return new BannerNode(bannerType);
|
|
136
|
+
return new BannerNode(bannerType).updateFromJSON(_serializedNode);
|
|
137
137
|
}
|
|
138
138
|
exportJSON() {
|
|
139
139
|
return {
|
|
@@ -278,7 +278,7 @@ var CodeBlockNode = class CodeBlockNode extends DecoratorNode {
|
|
|
278
278
|
}
|
|
279
279
|
static importJSON(_serializedNode) {
|
|
280
280
|
const serializedNode = _serializedNode;
|
|
281
|
-
return $createCodeBlockNode(serializedNode.code, serializedNode.language);
|
|
281
|
+
return $createCodeBlockNode(serializedNode.code, serializedNode.language).updateFromJSON(_serializedNode);
|
|
282
282
|
}
|
|
283
283
|
exportJSON() {
|
|
284
284
|
return {
|
|
@@ -513,7 +513,7 @@ var DetailsNode = class DetailsNode extends ElementNode {
|
|
|
513
513
|
}
|
|
514
514
|
static importJSON(_serializedNode) {
|
|
515
515
|
const serializedNode = _serializedNode;
|
|
516
|
-
return $createDetailsNode(serializedNode.summary, serializedNode.open);
|
|
516
|
+
return $createDetailsNode(serializedNode.summary, serializedNode.open).updateFromJSON(serializedNode);
|
|
517
517
|
}
|
|
518
518
|
exportJSON() {
|
|
519
519
|
return {
|
|
@@ -631,7 +631,7 @@ var FileNode = class FileNode extends DecoratorNode {
|
|
|
631
631
|
mimeType: serializedNode.mimeType,
|
|
632
632
|
ext: serializedNode.ext,
|
|
633
633
|
display: serializedNode.display
|
|
634
|
-
});
|
|
634
|
+
}).updateFromJSON(_serializedNode);
|
|
635
635
|
}
|
|
636
636
|
exportJSON() {
|
|
637
637
|
return {
|
|
@@ -797,7 +797,7 @@ var FootnoteSectionNode = class FootnoteSectionNode extends DecoratorNode {
|
|
|
797
797
|
return false;
|
|
798
798
|
}
|
|
799
799
|
static importJSON(_serializedNode) {
|
|
800
|
-
return $createFootnoteSectionNode(_serializedNode.definitions);
|
|
800
|
+
return $createFootnoteSectionNode(_serializedNode.definitions).updateFromJSON(_serializedNode);
|
|
801
801
|
}
|
|
802
802
|
exportJSON() {
|
|
803
803
|
return {
|
|
@@ -985,7 +985,7 @@ var GridContainerNode = class GridContainerNode extends DecoratorNode {
|
|
|
985
985
|
const cols = legacy.cols || 2;
|
|
986
986
|
const rawGap = legacy.gap;
|
|
987
987
|
const gap = typeof rawGap === "number" ? `${rawGap}px` : rawGap;
|
|
988
|
-
if (legacy.cells && legacy.cells.length > 0) return new GridContainerNode(cols, gap, legacy.cells);
|
|
988
|
+
if (legacy.cells && legacy.cells.length > 0) return new GridContainerNode(cols, gap, legacy.cells).updateFromJSON(_serializedNode);
|
|
989
989
|
if (legacy.children) {
|
|
990
990
|
const cellStates = legacy.children.map((child) => {
|
|
991
991
|
return { root: {
|
|
@@ -997,9 +997,9 @@ var GridContainerNode = class GridContainerNode extends DecoratorNode {
|
|
|
997
997
|
version: 1
|
|
998
998
|
} };
|
|
999
999
|
});
|
|
1000
|
-
return new GridContainerNode(cols, gap, cellStates);
|
|
1000
|
+
return new GridContainerNode(cols, gap, cellStates).updateFromJSON(_serializedNode);
|
|
1001
1001
|
}
|
|
1002
|
-
return new GridContainerNode(cols, gap);
|
|
1002
|
+
return new GridContainerNode(cols, gap).updateFromJSON(_serializedNode);
|
|
1003
1003
|
}
|
|
1004
1004
|
exportJSON() {
|
|
1005
1005
|
return {
|
|
@@ -1080,7 +1080,7 @@ var LinkCardNode = class LinkCardNode extends DecoratorNode {
|
|
|
1080
1080
|
description: serializedNode.description,
|
|
1081
1081
|
favicon: serializedNode.favicon,
|
|
1082
1082
|
image: serializedNode.image
|
|
1083
|
-
});
|
|
1083
|
+
}).updateFromJSON(_serializedNode);
|
|
1084
1084
|
}
|
|
1085
1085
|
exportJSON() {
|
|
1086
1086
|
return {
|
|
@@ -1184,7 +1184,8 @@ var RubyNode = class RubyNode extends ElementNode {
|
|
|
1184
1184
|
this.__reading = reading;
|
|
1185
1185
|
}
|
|
1186
1186
|
static importJSON(_serializedNode) {
|
|
1187
|
-
|
|
1187
|
+
const serializedNode = _serializedNode;
|
|
1188
|
+
return $createRubyNode(serializedNode.reading ?? "").updateFromJSON(serializedNode);
|
|
1188
1189
|
}
|
|
1189
1190
|
exportJSON() {
|
|
1190
1191
|
return {
|
|
@@ -1318,7 +1319,7 @@ var VideoNode = class VideoNode extends DecoratorNode {
|
|
|
1318
1319
|
poster: serializedNode.poster,
|
|
1319
1320
|
width: serializedNode.width,
|
|
1320
1321
|
height: serializedNode.height
|
|
1321
|
-
});
|
|
1322
|
+
}).updateFromJSON(_serializedNode);
|
|
1322
1323
|
}
|
|
1323
1324
|
exportJSON() {
|
|
1324
1325
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { B as FileUploadProvider, C as createTextSelectionStore, D as ImageUploadPlugin, E as LinkFaviconPlugin, H as CorePlugins, I as ImageUploadProvider, M as BlockIdPlugin, N as blockIdState, O as defaultImageUpload, P as VideoUploadProvider, R as ImagePreprocessProvider, 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, k as FileUploadPlugin, 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-
|
|
1
|
+
import { B as FileUploadProvider, C as createTextSelectionStore, D as ImageUploadPlugin, E as LinkFaviconPlugin, H as CorePlugins, I as ImageUploadProvider, M as BlockIdPlugin, N as blockIdState, O as defaultImageUpload, P as VideoUploadProvider, R as ImagePreprocessProvider, 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, k as FileUploadPlugin, 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-BXjoXq96.js";
|
|
2
|
+
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-B_vm9FD7.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 { X as useNestedContentRenderer, Y as NestedContentRendererProvider, Z as useOptionalNestedContentRenderer, t as editorTheme } from "./theme-
|
|
4
|
+
import { X as useNestedContentRenderer, Y as NestedContentRendererProvider, Z as useOptionalNestedContentRenderer, t as editorTheme } from "./theme-CxcaORbp.js";
|
|
5
5
|
import { C as LINK_CARD_NODE_KEY, D as TAG_NODE_KEY, E as RUBY_NODE_KEY, O as VIDEO_NODE_KEY, S as KATEX_NODE_KEY, T as MERMAID_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, a as FootnoteDefinitionsProvider, b as FOOTNOTE_SECTION_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 FILE_NODE_KEY, w as MENTION_NODE_KEY, x as IMAGE_NODE_KEY, y as FOOTNOTE_NODE_KEY } from "./KaTeXRenderer-DvxFML1l.js";
|
|
6
|
-
import { M as useColorScheme, j as ColorSchemeProvider } from "./config-
|
|
6
|
+
import { M as useColorScheme, j as ColorSchemeProvider } from "./config-ruOEZI0Y.js";
|
|
7
7
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
8
|
-
import { c as useNestedEditorPlugins, s as NestedEditorPluginsProvider } from "./AlertQuoteEditNode-
|
|
8
|
+
import { c as useNestedEditorPlugins, s as NestedEditorPluginsProvider } from "./AlertQuoteEditNode-DtwITriP.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-BRM8cjN-.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
1
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-0TJGE4On.js";
|
|
2
|
-
import { B as FootnoteNode, C as KaTeXBlockNode, E as ImageNode, K as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, i as TagNode, m as MermaidNode } from "./theme-
|
|
2
|
+
import { B as FootnoteNode, C as KaTeXBlockNode, E as ImageNode, K as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, i as TagNode, m as MermaidNode } from "./theme-CxcaORbp.js";
|
|
3
3
|
import { _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, s as useFootnoteDefinitions } from "./KaTeXRenderer-DvxFML1l.js";
|
|
4
|
-
import { A as CodeBlockRenderer, C as DetailsNode, D as CommentNode, I as BannerNode, L as normalizeBannerType, N as $isBannerNode, O as $isCodeBlockNode, R as BannerRenderer, _ as FootnoteSectionNode, a as VideoNode, b as FileNode, c as RubyNode, d as LinkCardNode, k as CodeBlockNode, m as GridContainerNode, n as builtinNodes, p as $isGridContainerNode } from "./config-
|
|
4
|
+
import { A as CodeBlockRenderer, C as DetailsNode, D as CommentNode, I as BannerNode, L as normalizeBannerType, N as $isBannerNode, O as $isCodeBlockNode, R as BannerRenderer, _ as FootnoteSectionNode, a as VideoNode, b as FileNode, c as RubyNode, d as LinkCardNode, k as CodeBlockNode, m as GridContainerNode, n as builtinNodes, p as $isGridContainerNode } from "./config-ruOEZI0Y.js";
|
|
5
5
|
import { n as gridStyles, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
6
|
-
import { a as NestedEditorCorePlugins, i as createNestedEditor, n as AlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
6
|
+
import { a as NestedEditorCorePlugins, i as createNestedEditor, n as AlertQuoteEditNode } from "./AlertQuoteEditNode-DtwITriP.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 } from "lexical";
|
|
@@ -90,7 +90,7 @@ var BannerEditNode = class BannerEditNode extends BannerNode {
|
|
|
90
90
|
const serializedNode = _serializedNode;
|
|
91
91
|
const legacy = serializedNode;
|
|
92
92
|
const bannerType = normalizeBannerType(serializedNode.bannerType);
|
|
93
|
-
if (serializedNode.content) return new BannerEditNode(bannerType, serializedNode.content);
|
|
93
|
+
if (serializedNode.content) return new BannerEditNode(bannerType, serializedNode.content).updateFromJSON(_serializedNode);
|
|
94
94
|
if (legacy.children) {
|
|
95
95
|
const content = { root: {
|
|
96
96
|
children: legacy.children,
|
|
@@ -100,9 +100,9 @@ var BannerEditNode = class BannerEditNode extends BannerNode {
|
|
|
100
100
|
type: "root",
|
|
101
101
|
version: 1
|
|
102
102
|
} };
|
|
103
|
-
return new BannerEditNode(bannerType, content);
|
|
103
|
+
return new BannerEditNode(bannerType, content).updateFromJSON(_serializedNode);
|
|
104
104
|
}
|
|
105
|
-
return new BannerEditNode(bannerType);
|
|
105
|
+
return new BannerEditNode(bannerType).updateFromJSON(_serializedNode);
|
|
106
106
|
}
|
|
107
107
|
exportJSON() {
|
|
108
108
|
return {
|
|
@@ -276,7 +276,7 @@ var CodeBlockEditNode = class CodeBlockEditNode extends CodeBlockNode {
|
|
|
276
276
|
}
|
|
277
277
|
static importJSON(_serializedNode) {
|
|
278
278
|
const serializedNode = _serializedNode;
|
|
279
|
-
return new CodeBlockEditNode(serializedNode.code, serializedNode.language);
|
|
279
|
+
return new CodeBlockEditNode(serializedNode.code, serializedNode.language).updateFromJSON(_serializedNode);
|
|
280
280
|
}
|
|
281
281
|
decorate(_editor, _config) {
|
|
282
282
|
return createElement(CodeBlockEditDecorator, {
|
|
@@ -362,7 +362,7 @@ var FootnoteSectionEditNode = class FootnoteSectionEditNode extends FootnoteSect
|
|
|
362
362
|
return new FootnoteSectionEditNode({ ...node.__definitions }, node.__key);
|
|
363
363
|
}
|
|
364
364
|
static importJSON(_serializedNode) {
|
|
365
|
-
return new FootnoteSectionEditNode(_serializedNode.definitions);
|
|
365
|
+
return new FootnoteSectionEditNode(_serializedNode.definitions).updateFromJSON(_serializedNode);
|
|
366
366
|
}
|
|
367
367
|
decorate(_editor, _config) {
|
|
368
368
|
return createElement(FootnoteSectionEditRenderer, {
|
|
@@ -621,7 +621,7 @@ var GridEditNode = class GridEditNode extends GridContainerNode {
|
|
|
621
621
|
const cols = legacy.cols || 2;
|
|
622
622
|
const rawGap = legacy.gap;
|
|
623
623
|
const gap = typeof rawGap === "number" ? `${rawGap}px` : rawGap;
|
|
624
|
-
if (legacy.cells && legacy.cells.length > 0) return new GridEditNode(cols, gap, legacy.cells);
|
|
624
|
+
if (legacy.cells && legacy.cells.length > 0) return new GridEditNode(cols, gap, legacy.cells).updateFromJSON(_serializedNode);
|
|
625
625
|
if (legacy.children) {
|
|
626
626
|
const cellStates = legacy.children.map((child) => {
|
|
627
627
|
return { root: {
|
|
@@ -633,9 +633,9 @@ var GridEditNode = class GridEditNode extends GridContainerNode {
|
|
|
633
633
|
version: 1
|
|
634
634
|
} };
|
|
635
635
|
});
|
|
636
|
-
return new GridEditNode(cols, gap, cellStates);
|
|
636
|
+
return new GridEditNode(cols, gap, cellStates).updateFromJSON(_serializedNode);
|
|
637
637
|
}
|
|
638
|
-
return new GridEditNode(cols, gap);
|
|
638
|
+
return new GridEditNode(cols, gap).updateFromJSON(_serializedNode);
|
|
639
639
|
}
|
|
640
640
|
exportJSON() {
|
|
641
641
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertQuoteNode.d.ts","sourceRoot":"","sources":["../../src/nodes/AlertQuoteNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7E,eAAO,MAAM,WAAW,EAAE,SAAS,EAAuD,CAA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,YAAY;CAMtE;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,EACpB,YAAY,CAAC,EAAE,qBAAqB,GACnC,cAAc,CAEhB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,cAAc,CAE9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlockEditNode.d.ts","sourceRoot":"","sources":["../../src/nodes/CodeBlockEditNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,aAAa,EAAgC,MAAM,iBAAiB,CAAC;AAE9E,qBAAa,iBAAkB,SAAQ,aAAa;IAClD,MAAM,CAAC,YAAY;2BAEE,aAAa;;;;;;;;;;;;QAK9B;IAEJ,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,GAAG,iBAAiB;IAIxD,MAAM,CAAC,UAAU,CACf,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/D,iBAAiB;
|
|
1
|
+
{"version":3,"file":"CodeBlockEditNode.d.ts","sourceRoot":"","sources":["../../src/nodes/CodeBlockEditNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,aAAa,EAAgC,MAAM,iBAAiB,CAAC;AAE9E,qBAAa,iBAAkB,SAAQ,aAAa;IAClD,MAAM,CAAC,YAAY;2BAEE,aAAa;;;;;;;;;;;;QAK9B;IAEJ,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,GAAG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M,EAAE,OAAO,CAAC,GAAG,WAAW;IAOhG,UAAU,IAAI,qBAAqB;IAUnC,UAAU,IAAI,MAAM;IAIpB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjC,OAAO,IAAI,OAAO;IAIlB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAK5B,UAAU,IAAI,IAAI;IAIlB,UAAU,CAAC,OAAO,EAAE,WAAW;IAK/B,QAAQ,IAAI,OAAO;CAGpB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,UAAQ,GAAG,WAAW,CAE7E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,WAAW,CAExF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpoilerNode.d.ts","sourceRoot":"","sources":["../../src/nodes/SpoilerNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW;gBAIhC,GAAG,CAAC,EAAE,OAAO;IAIzB,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW;IA4B7C,SAAS,IAAI,OAAO;IAIpB,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW;
|
|
1
|
+
{"version":3,"file":"SpoilerNode.d.ts","sourceRoot":"","sources":["../../src/nodes/SpoilerNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW;gBAIhC,GAAG,CAAC,EAAE,OAAO;IAIzB,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW;IA4B7C,SAAS,IAAI,OAAO;IAIpB,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW;IAIhG,UAAU,IAAI,qBAAqB;IAQnC,mBAAmB,IAAI,OAAO;IAI9B,kBAAkB,IAAI,OAAO;IAI7B,QAAQ,IAAI,OAAO;CAGpB;AAED,wBAAgB,kBAAkB,IAAI,WAAW,CAEhD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,WAAW,CAExF"}
|
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 { A as computeImageDisplayPixels, C as KaTeXBlockNode, D as sanitizeImageLayout, E as ImageNode, F as imageDisplaySizeAfterResize, I as resolveImageDisplaySize, L as sanitizeImageDisplayWidth, M as imageDisplayCssVars, N as imageDisplayDataAttr, P as imageDisplayFieldsFromSize, R as sanitizeImageFixedPx, S as $isKaTeXBlockNode, T as $isImageNode, U as ALERT_LABELS, W as ALERT_TYPES, _ as MentionNode, b as KaTeXInlineNode, d as RichQuoteNode, f as $createMermaidNode, g as $isMentionNode, h as $createMentionNode, i as TagNode, j as convertImageDisplaySize, 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 { D as CommentNode, E as $isCommentNode, F as BANNER_TYPES, P as BANNER_LABELS, _ as FootnoteSectionNode, b as FileNode, c as RubyNode, d as LinkCardNode, f as $createGridContainerNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, 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, v as $createFileNode, w as $createCommentNode, x as fileExtFromName, y as $isFileNode } 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-B_vm9FD7.js";
|
|
2
|
+
import { A as computeImageDisplayPixels, C as KaTeXBlockNode, D as sanitizeImageLayout, E as ImageNode, F as imageDisplaySizeAfterResize, I as resolveImageDisplaySize, L as sanitizeImageDisplayWidth, M as imageDisplayCssVars, N as imageDisplayDataAttr, P as imageDisplayFieldsFromSize, R as sanitizeImageFixedPx, S as $isKaTeXBlockNode, T as $isImageNode, U as ALERT_LABELS, W as ALERT_TYPES, _ as MentionNode, b as KaTeXInlineNode, d as RichQuoteNode, f as $createMermaidNode, g as $isMentionNode, h as $createMentionNode, i as TagNode, j as convertImageDisplaySize, 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-CxcaORbp.js";
|
|
3
|
+
import { D as CommentNode, E as $isCommentNode, F as BANNER_TYPES, P as BANNER_LABELS, _ as FootnoteSectionNode, b as FileNode, c as RubyNode, d as LinkCardNode, f as $createGridContainerNode, g as $isFootnoteSectionNode, h as $createFootnoteSectionNode, 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, v as $createFileNode, w as $createCommentNode, x as fileExtFromName, y as $isFileNode } from "./config-ruOEZI0Y.js";
|
|
4
|
+
import { r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-DtwITriP.js";
|
|
5
5
|
export { $createCommentNode, $createFileNode, $createFootnoteSectionNode, $createGridContainerNode, $createImageNode, $createLinkCardNode, $createMentionNode, $createMermaidNode, $createRichQuoteNode, $createRubyNode, $createTagNode, $isCommentNode, $isFileNode, $isFootnoteSectionNode, $isGridContainerNode, $isImageNode, $isKaTeXBlockNode, $isKaTeXInlineNode, $isLinkCardNode, $isMentionNode, $isMermaidNode, $isRichQuoteNode, $isRubyNode, $isTagNode, ALERT_LABELS, ALERT_TYPES, BANNER_LABELS, BANNER_TYPES, CommentNode, FileNode, FootnoteSectionEditNode, FootnoteSectionNode, GridContainerNode, ImageNode, KaTeXBlockNode, KaTeXInlineNode, LinkCardNode, MentionNode, MermaidNode, NESTED_EDITOR_NODES, RichQuoteNode, RubyNode, TagNode, allEditNodes, allNodes, builtinNodes, computeImageDisplayPixels, convertImageDisplaySize, customEditNodes, customNodes, fileExtFromName, getResolvedEditNodes, imageDisplayCssVars, imageDisplayDataAttr, imageDisplayFieldsFromSize, imageDisplaySizeAfterResize, resolveImageDisplaySize, sanitizeImageDisplayWidth, sanitizeImageFixedPx, sanitizeImageLayout, setResolvedEditNodes };
|
package/dist/plugins-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as setFileUploadEntry, B as FileUploadProvider, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as useVideoUpload, G as ALL_TRANSFORMERS, H as CorePlugins, I as ImageUploadProvider, J as ClickBelowPlugin, K as InlineDndPlugin, L as useImageUpload, M as BlockIdPlugin, N as blockIdState, O as defaultImageUpload, P as VideoUploadProvider, R as ImagePreprocessProvider, U as MarkdownShortcutsPlugin, V as useFileUpload, W as MarkdownPastePlugin, X as BlockExitPlugin, Y as registerClickBelowCommand, Z as AutoLinkPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as useFileUploadEntry, k as FileUploadPlugin, n as OnChangePlugin, o as VideoUploadPlugin, q as HorizontalRulePlugin, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, z as useImagePreprocess } from "./SubmitShortcutPlugin-
|
|
2
|
-
import { Q as INLINE_DRAG_ATTR, et as markInlineDraggable } from "./theme-
|
|
3
|
-
import { o as PasteLinkPlugin } from "./AlertQuoteEditNode-
|
|
4
|
-
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-
|
|
1
|
+
import { A as setFileUploadEntry, B as FileUploadProvider, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as useVideoUpload, G as ALL_TRANSFORMERS, H as CorePlugins, I as ImageUploadProvider, J as ClickBelowPlugin, K as InlineDndPlugin, L as useImageUpload, M as BlockIdPlugin, N as blockIdState, O as defaultImageUpload, P as VideoUploadProvider, R as ImagePreprocessProvider, U as MarkdownShortcutsPlugin, V as useFileUpload, W as MarkdownPastePlugin, X as BlockExitPlugin, Y as registerClickBelowCommand, Z as AutoLinkPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as useFileUploadEntry, k as FileUploadPlugin, n as OnChangePlugin, o as VideoUploadPlugin, q as HorizontalRulePlugin, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, z as useImagePreprocess } from "./SubmitShortcutPlugin-BXjoXq96.js";
|
|
2
|
+
import { Q as INLINE_DRAG_ATTR, et as markInlineDraggable } from "./theme-CxcaORbp.js";
|
|
3
|
+
import { o as PasteLinkPlugin } from "./AlertQuoteEditNode-DtwITriP.js";
|
|
4
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-BRM8cjN-.js";
|
|
5
5
|
export { ALL_TRANSFORMERS, AlertPlugin, AutoFocusPlugin, AutoLinkPlugin, BlockExitPlugin, BlockIdPlugin, ClickBelowPlugin, CorePlugins, EditorRefPlugin, FileUploadPlugin, FileUploadProvider, FootnotePlugin, HorizontalRulePlugin, INLINE_DRAG_ATTR, ImagePlugin, ImagePreprocessProvider, ImageUploadPlugin, ImageUploadProvider, InlineDndPlugin, KaTeXPlugin, LinkFaviconPlugin, MarkdownPastePlugin, MarkdownShortcutsPlugin, MermaidPlugin, OnChangePlugin, PasteLinkPlugin, SubmitShortcutPlugin, TextSelectionPlugin, VideoUploadPlugin, VideoUploadProvider, blockIdState, defaultImageUpload, markInlineDraggable, registerClickBelowCommand, setFileUploadEntry, useFileUpload, useFileUploadEntry, useImagePreprocess, useImageUpload, useVideoUpload };
|
package/dist/static-entry.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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";
|
|
2
|
-
import { X as useNestedContentRenderer, Y as NestedContentRendererProvider, Z as useOptionalNestedContentRenderer, a as getTagBgColor, q as extractTextContent, t as editorTheme } from "./theme-
|
|
2
|
+
import { X as useNestedContentRenderer, Y as NestedContentRendererProvider, Z as useOptionalNestedContentRenderer, a as getTagBgColor, q as extractTextContent, t as editorTheme } from "./theme-CxcaORbp.js";
|
|
3
3
|
import { C as LINK_CARD_NODE_KEY, D as TAG_NODE_KEY, E as RUBY_NODE_KEY, O as VIDEO_NODE_KEY, S as KATEX_NODE_KEY, T as MERMAID_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, a as FootnoteDefinitionsProvider, b as FOOTNOTE_SECTION_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, w as MENTION_NODE_KEY, x as IMAGE_NODE_KEY, y as FOOTNOTE_NODE_KEY } from "./KaTeXRenderer-DvxFML1l.js";
|
|
4
|
-
import { M as useColorScheme, j as ColorSchemeProvider, n as builtinNodes, r as customNodes, t as allNodes } from "./config-
|
|
4
|
+
import { M as useColorScheme, j as ColorSchemeProvider, n as builtinNodes, r as customNodes, t as allNodes } from "./config-ruOEZI0Y.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";
|
|
@@ -191,7 +191,7 @@ var AlertQuoteNode = class AlertQuoteNode extends DecoratorNode {
|
|
|
191
191
|
}
|
|
192
192
|
static importJSON(_serializedNode) {
|
|
193
193
|
const serializedNode = _serializedNode;
|
|
194
|
-
return new AlertQuoteNode(serializedNode.alertType, serializedNode.content);
|
|
194
|
+
return new AlertQuoteNode(serializedNode.alertType, serializedNode.content).updateFromJSON(_serializedNode);
|
|
195
195
|
}
|
|
196
196
|
exportJSON() {
|
|
197
197
|
return {
|
|
@@ -241,7 +241,7 @@ var FootnoteNode = class FootnoteNode extends DecoratorNode {
|
|
|
241
241
|
return true;
|
|
242
242
|
}
|
|
243
243
|
static importJSON(_serializedNode) {
|
|
244
|
-
return $createFootnoteNode(_serializedNode.identifier);
|
|
244
|
+
return $createFootnoteNode(_serializedNode.identifier).updateFromJSON(_serializedNode);
|
|
245
245
|
}
|
|
246
246
|
exportJSON() {
|
|
247
247
|
return {
|
|
@@ -635,7 +635,7 @@ var ImageNode = class ImageNode extends DecoratorNode {
|
|
|
635
635
|
fixedWidth: serializedNode.fixedWidth,
|
|
636
636
|
fixedHeight: serializedNode.fixedHeight,
|
|
637
637
|
layout: serializedNode.layout
|
|
638
|
-
});
|
|
638
|
+
}).updateFromJSON(_serializedNode);
|
|
639
639
|
}
|
|
640
640
|
exportJSON() {
|
|
641
641
|
return {
|
|
@@ -845,7 +845,7 @@ var KaTeXBlockNode = class KaTeXBlockNode extends DecoratorNode {
|
|
|
845
845
|
return false;
|
|
846
846
|
}
|
|
847
847
|
static importJSON(_serializedNode) {
|
|
848
|
-
return $createKaTeXBlockNode(_serializedNode.equation);
|
|
848
|
+
return $createKaTeXBlockNode(_serializedNode.equation).updateFromJSON(_serializedNode);
|
|
849
849
|
}
|
|
850
850
|
exportJSON() {
|
|
851
851
|
return {
|
|
@@ -934,7 +934,7 @@ var KaTeXInlineNode = class KaTeXInlineNode extends DecoratorNode {
|
|
|
934
934
|
const serializedNode = _serializedNode;
|
|
935
935
|
const node = $createKaTeXInlineNode(serializedNode.equation);
|
|
936
936
|
if (serializedNode.color) node.setColor(serializedNode.color);
|
|
937
|
-
return node;
|
|
937
|
+
return node.updateFromJSON(_serializedNode);
|
|
938
938
|
}
|
|
939
939
|
exportJSON() {
|
|
940
940
|
return {
|
|
@@ -1038,7 +1038,7 @@ var MentionNode = class MentionNode extends DecoratorNode {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
static importJSON(_serializedNode) {
|
|
1040
1040
|
const serializedNode = _serializedNode;
|
|
1041
|
-
return $createMentionNode(serializedNode.platform, serializedNode.handle, serializedNode.displayName);
|
|
1041
|
+
return $createMentionNode(serializedNode.platform, serializedNode.handle, serializedNode.displayName).updateFromJSON(_serializedNode);
|
|
1042
1042
|
}
|
|
1043
1043
|
exportJSON() {
|
|
1044
1044
|
return {
|
|
@@ -1120,7 +1120,7 @@ var MermaidNode = class MermaidNode extends DecoratorNode {
|
|
|
1120
1120
|
return false;
|
|
1121
1121
|
}
|
|
1122
1122
|
static importJSON(_serializedNode) {
|
|
1123
|
-
return $createMermaidNode(_serializedNode.diagram);
|
|
1123
|
+
return $createMermaidNode(_serializedNode.diagram).updateFromJSON(_serializedNode);
|
|
1124
1124
|
}
|
|
1125
1125
|
exportJSON() {
|
|
1126
1126
|
return {
|
|
@@ -1256,7 +1256,7 @@ var SpoilerNode = class SpoilerNode extends ElementNode {
|
|
|
1256
1256
|
return false;
|
|
1257
1257
|
}
|
|
1258
1258
|
static importJSON(_serializedNode) {
|
|
1259
|
-
return $createSpoilerNode();
|
|
1259
|
+
return $createSpoilerNode().updateFromJSON(_serializedNode);
|
|
1260
1260
|
}
|
|
1261
1261
|
exportJSON() {
|
|
1262
1262
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"description": "Core rich text editor based on Lexical",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@lexical/code-core": "^0.49.0",
|
|
49
49
|
"nanoid": "^6.0.1",
|
|
50
50
|
"thumbhash": "^0.1.1",
|
|
51
|
-
"@haklex/rich-
|
|
52
|
-
"@haklex/rich-headless": "0.41.
|
|
53
|
-
"@haklex/rich-
|
|
51
|
+
"@haklex/rich-style-token": "0.41.1",
|
|
52
|
+
"@haklex/rich-headless": "0.41.1",
|
|
53
|
+
"@haklex/rich-editor-ui": "0.41.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@lexical/extension": "^0.49.0",
|