@haklex/rich-editor 0.14.0 → 0.15.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-DHQD6Hnp.js → AlertQuoteEditNode-H3FXp6UH.js} +1 -1
- package/dist/{MermaidPlugin-Dn7ABeA5.js → MermaidPlugin-Dlx8TuRa.js} +2 -2
- package/dist/{SubmitShortcutPlugin-Bj7djTO0.js → SubmitShortcutPlugin-CIgBFJsy.js} +5 -63
- package/dist/commands-entry.mjs +2 -2
- package/dist/{config-Dxr6eH6Z.js → config-DiIjpVvJ.js} +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{node-registry-BvWtlw0M.js → node-registry-DM-0V7qF.js} +3 -3
- package/dist/nodes-entry.mjs +4 -4
- package/dist/plugins/MarkdownPastePlugin.d.ts.map +1 -1
- package/dist/plugins-entry.mjs +2 -2
- package/dist/static-entry.mjs +2 -2
- package/dist/{theme-BYSEh-ew.js → theme-CW8yI1ie.js} +4 -4
- package/package.json +13 -14
- package/dist/utils/litexml-import.d.ts +0 -4
- package/dist/utils/litexml-import.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as $isAlertQuoteNode, I as AlertRenderer, N as AlertQuoteNode, P as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, k as FootnoteNode, t as editorTheme } from "./theme-
|
|
1
|
+
import { A as $isAlertQuoteNode, I as AlertRenderer, N as AlertQuoteNode, P as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, k as FootnoteNode, t as editorTheme } from "./theme-CW8yI1ie.js";
|
|
2
2
|
import { h as ALERT_NODE_KEY, l as RendererWrapper } from "./KaTeXRenderer-v5qDPxDO.js";
|
|
3
3
|
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
4
4
|
import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as $createMermaidNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-
|
|
2
|
-
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
1
|
+
import { f as $createMermaidNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-CW8yI1ie.js";
|
|
2
|
+
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-H3FXp6UH.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-
|
|
2
|
-
import { C as KaTeXBlockNode, D as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, F as extractTextContent, N as AlertQuoteNode, O as $createFootnoteNode, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, h as $createMentionNode, k as FootnoteNode, o as $createSpoilerNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-
|
|
1
|
+
import { c as setCodeBlockCursorIntent, o as $createCodeBlockEditNode, s as $createBannerEditNode, t as getResolvedEditNodes } from "./node-registry-DM-0V7qF.js";
|
|
2
|
+
import { C as KaTeXBlockNode, D as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, F as extractTextContent, N as AlertQuoteNode, O as $createFootnoteNode, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, h as $createMentionNode, k as FootnoteNode, o as $createSpoilerNode, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-CW8yI1ie.js";
|
|
3
3
|
import { a as FootnoteDefinitionsProvider, n as computeImageMeta } from "./KaTeXRenderer-v5qDPxDO.js";
|
|
4
4
|
import "./katex.css-D77BtjJi.js";
|
|
5
|
-
import { S as CommentNode, _ as $createDetailsNode, a as $createRubyNode, b as $createCommentPlaceholderNode, f as $isGridContainerNode, g as FootnoteSectionNode, h as $isFootnoteSectionNode, j as BannerNode, m as $createFootnoteSectionNode, s as RubyNode, v as DetailsNode, w as CodeBlockNode, y as $createCommentNode } from "./config-
|
|
6
|
-
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
5
|
+
import { S as CommentNode, _ as $createDetailsNode, a as $createRubyNode, b as $createCommentPlaceholderNode, f as $isGridContainerNode, g as FootnoteSectionNode, h as $isFootnoteSectionNode, j as BannerNode, m as $createFootnoteSectionNode, s as RubyNode, v as DetailsNode, w as CodeBlockNode, y as $createCommentNode } from "./config-DiIjpVvJ.js";
|
|
6
|
+
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-H3FXp6UH.js";
|
|
7
7
|
import { n as getHostname, r as probeFavicon, t as normalizeSerializedEditorState } from "./normalizeSerializedEditorState-CdUhnqss.js";
|
|
8
8
|
import { CheckListPlugin } from "@lexical/react/LexicalCheckListPlugin";
|
|
9
9
|
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
@@ -21,7 +21,6 @@ import { $convertFromMarkdownString, CHECK_LIST, CODE, QUOTE, TRANSFORMERS } fro
|
|
|
21
21
|
import { $createTableCellNode, $createTableNode, $createTableRowNode, TableCellHeaderStates } from "@lexical/table";
|
|
22
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
import { Check, Info, Link2, Upload } from "lucide-react";
|
|
24
|
-
import { createDefaultRegistry, deserializeNodesFromXml } from "@haklex/rich-litexml";
|
|
25
24
|
import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPlugin";
|
|
26
25
|
import { nanoid } from "nanoid";
|
|
27
26
|
import { ActionBar, ActionButton, Dialog, DialogPopup, DialogTitle, SegmentedControl } from "@haklex/rich-editor-ui";
|
|
@@ -751,46 +750,6 @@ var ALL_TRANSFORMERS = [
|
|
|
751
750
|
...TRANSFORMERS.filter((t) => t !== QUOTE && t !== CODE)
|
|
752
751
|
];
|
|
753
752
|
//#endregion
|
|
754
|
-
//#region src/utils/litexml-import.ts
|
|
755
|
-
var LITEXML_TAG_PATTERN = new RegExp(`<\\/?(?:${[
|
|
756
|
-
"doc",
|
|
757
|
-
"fragment",
|
|
758
|
-
"img",
|
|
759
|
-
"video",
|
|
760
|
-
"link-card",
|
|
761
|
-
"embed",
|
|
762
|
-
"codeblock",
|
|
763
|
-
"mermaid",
|
|
764
|
-
"math",
|
|
765
|
-
"alert",
|
|
766
|
-
"banner",
|
|
767
|
-
"nested-doc",
|
|
768
|
-
"details",
|
|
769
|
-
"spoiler",
|
|
770
|
-
"ruby",
|
|
771
|
-
"mention",
|
|
772
|
-
"tag",
|
|
773
|
-
"comment",
|
|
774
|
-
"footnote",
|
|
775
|
-
"footnote-section",
|
|
776
|
-
"gallery",
|
|
777
|
-
"excalidraw",
|
|
778
|
-
"grid",
|
|
779
|
-
"cell",
|
|
780
|
-
"agent-diff",
|
|
781
|
-
"code-snippet",
|
|
782
|
-
"chat",
|
|
783
|
-
"poll"
|
|
784
|
-
].join("|")})(?:\\s|>|\\/>)`, "i");
|
|
785
|
-
function detectLiteXml(text) {
|
|
786
|
-
return LITEXML_TAG_PATTERN.test(text.trim());
|
|
787
|
-
}
|
|
788
|
-
function parseLiteXmlSerializedNodes(xml) {
|
|
789
|
-
if (!detectLiteXml(xml)) return null;
|
|
790
|
-
const nodes = deserializeNodesFromXml(xml, createDefaultRegistry());
|
|
791
|
-
return nodes.length > 0 ? nodes : null;
|
|
792
|
-
}
|
|
793
|
-
//#endregion
|
|
794
753
|
//#region src/plugins/MarkdownPastePlugin.tsx
|
|
795
754
|
function getVSCodePasteData(clipboardData) {
|
|
796
755
|
const raw = clipboardData.getData("vscode-editor-data");
|
|
@@ -849,15 +808,6 @@ function convertAndInsert(markdown) {
|
|
|
849
808
|
$insertNodes(serializedChildren.map((s) => $parseSerializedNode(s)));
|
|
850
809
|
return true;
|
|
851
810
|
}
|
|
852
|
-
function insertSerializedNodes(serializedNodes) {
|
|
853
|
-
if (!serializedNodes.length) return false;
|
|
854
|
-
$insertNodes(serializedNodes.map((s) => $parseSerializedNode(s)));
|
|
855
|
-
return true;
|
|
856
|
-
}
|
|
857
|
-
function convertLiteXmlAndInsert(xml) {
|
|
858
|
-
const serializedNodes = parseLiteXmlSerializedNodes(xml);
|
|
859
|
-
return serializedNodes ? insertSerializedNodes(serializedNodes) : false;
|
|
860
|
-
}
|
|
861
811
|
function MarkdownPastePlugin() {
|
|
862
812
|
const [editor] = useLexicalComposerContext();
|
|
863
813
|
useEffect(() => {
|
|
@@ -875,16 +825,8 @@ function MarkdownPastePlugin() {
|
|
|
875
825
|
return true;
|
|
876
826
|
}
|
|
877
827
|
}
|
|
878
|
-
const text = clipboardData.getData("text/plain");
|
|
879
|
-
if (text && detectLiteXml(text)) try {
|
|
880
|
-
if (!convertLiteXmlAndInsert(text)) return false;
|
|
881
|
-
event.preventDefault();
|
|
882
|
-
return true;
|
|
883
|
-
} catch (error) {
|
|
884
|
-
console.error("MarkdownPastePlugin: LiteXML paste error", error);
|
|
885
|
-
return false;
|
|
886
|
-
}
|
|
887
828
|
if (hasRichHTML(clipboardData)) return false;
|
|
829
|
+
const text = clipboardData.getData("text/plain");
|
|
888
830
|
if (!text || !detectMarkdown(text)) return false;
|
|
889
831
|
try {
|
|
890
832
|
if (!convertAndInsert(text)) return false;
|
package/dist/commands-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, F 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 { D as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, F as extractTextContent, o as $createSpoilerNode, s as $isSpoilerNode } from "./theme-CW8yI1ie.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-Dlx8TuRa.js";
|
|
3
3
|
import { $createTextNode, $getSelection, $isRangeSelection } from "lexical";
|
|
4
4
|
//#region src/utils/collect-command-items.ts
|
|
5
5
|
function collectCommandItems(editor) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as KaTeXBlockNode, E as ImageNode, F as extractTextContent, N as AlertQuoteNode, P as _defineProperty, R as useNestedContentRenderer, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, k as FootnoteNode, m as MermaidNode } from "./theme-
|
|
1
|
+
import { C as KaTeXBlockNode, E as ImageNode, F as extractTextContent, N as AlertQuoteNode, P as _defineProperty, R as useNestedContentRenderer, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, d as RichQuoteNode, i as TagNode, k as FootnoteNode, m as MermaidNode } from "./theme-CW8yI1ie.js";
|
|
2
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-v5qDPxDO.js";
|
|
3
3
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-D77BtjJi.js";
|
|
4
4
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-BxRbo20q.js";
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as ImageUploadProvider, C as useTextSelectionSnapshot, D as defaultImageUpload, E as ImageUploadPlugin, M as CorePlugins, O as BlockIdPlugin, S as createTextSelectionStore, T as LinkFaviconPlugin, _ as $getTextOffsetInBlock, a as AutoFocusPlugin, b as buildRangeAnchor, c as $captureTextSelectionFromRangeSelection, d as findDOMPointByTextOffset, f as getBlockElementById, g as $getRootBlock, h as TEXT_SELECTION_HIGHLIGHT_NAME, i as EditorRefPlugin, k as blockIdState, l as $restoreTextSelection, m as getTextOffsetFromDOMPoint, n as OnChangePlugin, o as TextSelectionPlugin, p as getDOMRectFromTextSelection, r as FootnotePlugin, s as $captureTextSelection, t as SubmitShortcutPlugin, u as createDOMRangeFromTextSelection, v as $resolveSelectionPoint, w as useTextSelectionStore, x as TextSelectionStoreProvider, y as buildBlockAnchor } from "./SubmitShortcutPlugin-
|
|
2
|
-
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-
|
|
3
|
-
import { L as NestedContentRendererProvider, R as useNestedContentRenderer, t as editorTheme, z as useOptionalNestedContentRenderer } from "./theme-
|
|
1
|
+
import { A as ImageUploadProvider, C as useTextSelectionSnapshot, D as defaultImageUpload, E as ImageUploadPlugin, M as CorePlugins, O as BlockIdPlugin, S as createTextSelectionStore, T as LinkFaviconPlugin, _ as $getTextOffsetInBlock, a as AutoFocusPlugin, b as buildRangeAnchor, c as $captureTextSelectionFromRangeSelection, d as findDOMPointByTextOffset, f as getBlockElementById, g as $getRootBlock, h as TEXT_SELECTION_HIGHLIGHT_NAME, i as EditorRefPlugin, k as blockIdState, l as $restoreTextSelection, m as getTextOffsetFromDOMPoint, n as OnChangePlugin, o as TextSelectionPlugin, p as getDOMRectFromTextSelection, r as FootnotePlugin, s as $captureTextSelection, t as SubmitShortcutPlugin, u as createDOMRangeFromTextSelection, v as $resolveSelectionPoint, w as useTextSelectionStore, x as TextSelectionStoreProvider, y as buildBlockAnchor } from "./SubmitShortcutPlugin-CIgBFJsy.js";
|
|
2
|
+
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-DM-0V7qF.js";
|
|
3
|
+
import { L as NestedContentRendererProvider, R as useNestedContentRenderer, t as editorTheme, z as useOptionalNestedContentRenderer } from "./theme-CW8yI1ie.js";
|
|
4
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-v5qDPxDO.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-D77BtjJi.js";
|
|
6
|
-
import { D as useColorScheme, E as ColorSchemeProvider } from "./config-
|
|
6
|
+
import { D as useColorScheme, E as ColorSchemeProvider } from "./config-DiIjpVvJ.js";
|
|
7
7
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-BxRbo20q.js";
|
|
8
8
|
import { t as normalizeSerializedEditorState } from "./normalizeSerializedEditorState-CdUhnqss.js";
|
|
9
9
|
import { n as useExtraNodes, r as LinkFavicon, t as ExtraNodesProvider } from "./ExtraNodesContext-97LrpnVZ.js";
|
|
10
|
-
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-
|
|
10
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-Dlx8TuRa.js";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
13
13
|
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as KaTeXBlockNode, E as ImageNode, P as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, i as TagNode, k as FootnoteNode, m as MermaidNode, t as editorTheme } from "./theme-
|
|
1
|
+
import { C as KaTeXBlockNode, E as ImageNode, P as _defineProperty, _ as MentionNode, b as KaTeXInlineNode, c as SpoilerNode, i as TagNode, k as FootnoteNode, m as MermaidNode, t as editorTheme } from "./theme-CW8yI1ie.js";
|
|
2
2
|
import { _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, s as useFootnoteDefinitions } from "./KaTeXRenderer-v5qDPxDO.js";
|
|
3
3
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-D77BtjJi.js";
|
|
4
|
-
import { C as $isCodeBlockNode, M as normalizeBannerType, N as BannerRenderer, O as $isBannerNode, S as CommentNode, T as CodeBlockRenderer, f as $isGridContainerNode, g as FootnoteSectionNode, i as VideoNode, j as BannerNode, n as builtinNodes, p as GridContainerNode, s as RubyNode, u as LinkCardNode, v as DetailsNode, w as CodeBlockNode } from "./config-
|
|
4
|
+
import { C as $isCodeBlockNode, M as normalizeBannerType, N as BannerRenderer, O as $isBannerNode, S as CommentNode, T as CodeBlockRenderer, f as $isGridContainerNode, g as FootnoteSectionNode, i as VideoNode, j as BannerNode, n as builtinNodes, p as GridContainerNode, s as RubyNode, u as LinkCardNode, v as DetailsNode, w as CodeBlockNode } from "./config-DiIjpVvJ.js";
|
|
5
5
|
import { n as gridStyles, t as gridClassNames } from "./grid.css-BxRbo20q.js";
|
|
6
|
-
import { n as AlertQuoteEditNode, r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-
|
|
6
|
+
import { n as AlertQuoteEditNode, r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-H3FXp6UH.js";
|
|
7
7
|
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
8
8
|
import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
9
9
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
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, E as ImageNode, M as ALERT_TYPES, 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, j as ALERT_LABELS, 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_TYPES, S as CommentNode, a as $createRubyNode, c as $createLinkCardNode, d as $createGridContainerNode, f as $isGridContainerNode, g as FootnoteSectionNode, h as $isFootnoteSectionNode, k as BANNER_LABELS, l as $isLinkCardNode, m as $createFootnoteSectionNode, n as builtinNodes, o as $isRubyNode, p as GridContainerNode, r as customNodes, s as RubyNode, t as allNodes, u as LinkCardNode, x as $isCommentNode, y as $createCommentNode } 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-DM-0V7qF.js";
|
|
2
|
+
import { C as KaTeXBlockNode, E as ImageNode, M as ALERT_TYPES, 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, j as ALERT_LABELS, 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-CW8yI1ie.js";
|
|
3
|
+
import { A as BANNER_TYPES, S as CommentNode, a as $createRubyNode, c as $createLinkCardNode, d as $createGridContainerNode, f as $isGridContainerNode, g as FootnoteSectionNode, h as $isFootnoteSectionNode, k as BANNER_LABELS, l as $isLinkCardNode, m as $createFootnoteSectionNode, n as builtinNodes, o as $isRubyNode, p as GridContainerNode, r as customNodes, s as RubyNode, t as allNodes, u as LinkCardNode, x as $isCommentNode, y as $createCommentNode } from "./config-DiIjpVvJ.js";
|
|
4
|
+
import { r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-H3FXp6UH.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, setResolvedEditNodes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownPastePlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/MarkdownPastePlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownPastePlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/MarkdownPastePlugin.tsx"],"names":[],"mappings":"AAwIA,wBAAgB,mBAAmB,SA4DlC"}
|
package/dist/plugins-entry.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as ImageUploadProvider, D as defaultImageUpload, E as ImageUploadPlugin, F as ALL_TRANSFORMERS, I as HorizontalRulePlugin, L as BlockExitPlugin, M as CorePlugins, N as MarkdownShortcutsPlugin, O as BlockIdPlugin, P as MarkdownPastePlugin, R as AutoLinkPlugin, T as LinkFaviconPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as useImageUpload, k as blockIdState, n as OnChangePlugin, o as TextSelectionPlugin, r as FootnotePlugin, t as SubmitShortcutPlugin } from "./SubmitShortcutPlugin-
|
|
2
|
-
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-
|
|
1
|
+
import { A as ImageUploadProvider, D as defaultImageUpload, E as ImageUploadPlugin, F as ALL_TRANSFORMERS, I as HorizontalRulePlugin, L as BlockExitPlugin, M as CorePlugins, N as MarkdownShortcutsPlugin, O as BlockIdPlugin, P as MarkdownPastePlugin, R as AutoLinkPlugin, T as LinkFaviconPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as useImageUpload, k as blockIdState, n as OnChangePlugin, o as TextSelectionPlugin, r as FootnotePlugin, t as SubmitShortcutPlugin } from "./SubmitShortcutPlugin-CIgBFJsy.js";
|
|
2
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-Dlx8TuRa.js";
|
|
3
3
|
export { ALL_TRANSFORMERS, AlertPlugin, AutoFocusPlugin, AutoLinkPlugin, BlockExitPlugin, BlockIdPlugin, CorePlugins, EditorRefPlugin, FootnotePlugin, HorizontalRulePlugin, ImagePlugin, ImageUploadPlugin, ImageUploadProvider, KaTeXPlugin, LinkFaviconPlugin, MarkdownPastePlugin, MarkdownShortcutsPlugin, MermaidPlugin, OnChangePlugin, SubmitShortcutPlugin, TextSelectionPlugin, blockIdState, defaultImageUpload, useImageUpload };
|
package/dist/static-entry.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { F as extractTextContent, L as NestedContentRendererProvider, R as useNestedContentRenderer, a as getTagBgColor, t as editorTheme, z as useOptionalNestedContentRenderer } from "./theme-
|
|
1
|
+
import { F as extractTextContent, L as NestedContentRendererProvider, R as useNestedContentRenderer, a as getTagBgColor, t as editorTheme, z as useOptionalNestedContentRenderer } from "./theme-CW8yI1ie.js";
|
|
2
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-v5qDPxDO.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-D77BtjJi.js";
|
|
4
|
-
import { D as useColorScheme, E as ColorSchemeProvider, n as builtinNodes, r as customNodes, t as allNodes } from "./config-
|
|
4
|
+
import { D as useColorScheme, E as ColorSchemeProvider, n as builtinNodes, r as customNodes, t as allNodes } from "./config-DiIjpVvJ.js";
|
|
5
5
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-BxRbo20q.js";
|
|
6
6
|
import { t as normalizeSerializedEditorState } from "./normalizeSerializedEditorState-CdUhnqss.js";
|
|
7
7
|
import { n as useExtraNodes, r as LinkFavicon, t as ExtraNodesProvider } from "./ExtraNodesContext-97LrpnVZ.js";
|
|
@@ -68,7 +68,7 @@ function extractTextContent(state) {
|
|
|
68
68
|
return walk(state);
|
|
69
69
|
}
|
|
70
70
|
//#endregion
|
|
71
|
-
//#region \0@oxc-project+runtime@0.
|
|
71
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/typeof.js
|
|
72
72
|
function _typeof(o) {
|
|
73
73
|
"@babel/helpers - typeof";
|
|
74
74
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -78,7 +78,7 @@ function _typeof(o) {
|
|
|
78
78
|
}, _typeof(o);
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
//#region \0@oxc-project+runtime@0.
|
|
81
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/toPrimitive.js
|
|
82
82
|
function toPrimitive(t, r) {
|
|
83
83
|
if ("object" != _typeof(t) || !t) return t;
|
|
84
84
|
var e = t[Symbol.toPrimitive];
|
|
@@ -90,13 +90,13 @@ function toPrimitive(t, r) {
|
|
|
90
90
|
return ("string" === r ? String : Number)(t);
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
|
-
//#region \0@oxc-project+runtime@0.
|
|
93
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/toPropertyKey.js
|
|
94
94
|
function toPropertyKey(t) {
|
|
95
95
|
var i = toPrimitive(t, "string");
|
|
96
96
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
97
97
|
}
|
|
98
98
|
//#endregion
|
|
99
|
-
//#region \0@oxc-project+runtime@0.
|
|
99
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/defineProperty.js
|
|
100
100
|
function _defineProperty(e, r, t) {
|
|
101
101
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
102
102
|
value: t,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Core rich text editor based on Lexical",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,12 +46,11 @@
|
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@lexical/code-core": "^0.44.0",
|
|
49
|
-
"nanoid": "^5.1.
|
|
49
|
+
"nanoid": "^5.1.11",
|
|
50
50
|
"thumbhash": "^0.1.1",
|
|
51
|
-
"@haklex/rich-editor-ui": "0.
|
|
52
|
-
"@haklex/rich-
|
|
53
|
-
"@haklex/rich-
|
|
54
|
-
"@haklex/rich-style-token": "0.14.0"
|
|
51
|
+
"@haklex/rich-editor-ui": "0.15.0",
|
|
52
|
+
"@haklex/rich-headless": "0.15.0",
|
|
53
|
+
"@haklex/rich-style-token": "0.15.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
56
|
"@lexical/extension": "^0.44.0",
|
|
@@ -61,19 +60,19 @@
|
|
|
61
60
|
"@lexical/react": "^0.44.0",
|
|
62
61
|
"@lexical/rich-text": "^0.44.0",
|
|
63
62
|
"@lexical/table": "^0.44.0",
|
|
64
|
-
"@types/react": "^19.2.
|
|
63
|
+
"@types/react": "^19.2.15",
|
|
65
64
|
"@types/react-dom": "^19.2.3",
|
|
66
65
|
"@vanilla-extract/css": "^1.20.1",
|
|
67
66
|
"@vanilla-extract/vite-plugin": "^5.2.2",
|
|
68
|
-
"katex": "^0.16.
|
|
67
|
+
"katex": "^0.16.47",
|
|
69
68
|
"lexical": "^0.44.0",
|
|
70
|
-
"lucide-react": "^1.
|
|
71
|
-
"react": "^19.2.
|
|
72
|
-
"react-dom": "^19.2.
|
|
73
|
-
"shiki": "^4.0
|
|
69
|
+
"lucide-react": "^1.16.0",
|
|
70
|
+
"react": "^19.2.6",
|
|
71
|
+
"react-dom": "^19.2.6",
|
|
72
|
+
"shiki": "^4.1.0",
|
|
74
73
|
"typescript": "^5.9.3",
|
|
75
|
-
"
|
|
76
|
-
"vite
|
|
74
|
+
"unplugin-dts": "^1.0.1",
|
|
75
|
+
"vite": "^8.0.13"
|
|
77
76
|
},
|
|
78
77
|
"peerDependencies": {
|
|
79
78
|
"@base-ui/react": "^1.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"litexml-import.d.ts","sourceRoot":"","sources":["../../src/utils/litexml-import.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAmCrD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,EAAE,GAAG,IAAI,CAMvF"}
|