@haklex/rich-editor 0.34.0 → 0.35.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-DQuC-CkB.js → AlertQuoteEditNode-CRMUWeGh.js} +42 -3
- package/dist/{MermaidPlugin-DinmlrKK.js → MermaidPlugin-V7sqQ-I0.js} +1 -1
- package/dist/{SubmitShortcutPlugin-CSGVA99C.js → SubmitShortcutPlugin-CtG1tXDj.js} +3 -2
- package/dist/commands-entry.mjs +1 -1
- package/dist/components/CorePlugins.d.ts.map +1 -1
- package/dist/components/decorators/NestedEditorCorePlugins.d.ts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{node-registry-DPciIuyu.js → node-registry-SayN3e8q.js} +1 -1
- package/dist/nodes-entry.mjs +2 -2
- package/dist/plugins/PasteLinkPlugin.d.ts +2 -0
- package/dist/plugins/PasteLinkPlugin.d.ts.map +1 -0
- package/dist/plugins-entry.d.ts +1 -0
- package/dist/plugins-entry.d.ts.map +1 -1
- package/dist/plugins-entry.mjs +4 -3
- package/package.json +4 -4
|
@@ -2,11 +2,11 @@ import { I as AlertQuoteNode, L as _defineProperty, M as FootnoteNode, N as $isA
|
|
|
2
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
|
-
import { AutoLinkNode, LinkNode } from "@lexical/link";
|
|
5
|
+
import { AutoLinkNode, LinkNode, TOGGLE_LINK_COMMAND } from "@lexical/link";
|
|
6
6
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
7
7
|
import { createContext, createElement, use, useCallback, useEffect, useMemo } from "react";
|
|
8
8
|
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
|
|
9
|
-
import { $createParagraphNode, $getEditor, $getNodeByKey, $getRoot, $getSelection, $insertNodes, $isParagraphNode, $isRangeSelection, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_HIGH, KEY_ARROW_DOWN_COMMAND, KEY_ENTER_COMMAND, createEditor } from "lexical";
|
|
9
|
+
import { $createParagraphNode, $getEditor, $getNodeByKey, $getRoot, $getSelection, $insertNodes, $isParagraphNode, $isRangeSelection, $isTextNode, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_HIGH, KEY_ARROW_DOWN_COMMAND, KEY_ENTER_COMMAND, PASTE_COMMAND, createEditor } from "lexical";
|
|
10
10
|
import { HorizontalRuleNode } from "@lexical/extension";
|
|
11
11
|
import { CodeNode } from "@lexical/code-core";
|
|
12
12
|
import { ListItemNode, ListNode } from "@lexical/list";
|
|
@@ -30,12 +30,51 @@ function useNestedEditorPlugins() {
|
|
|
30
30
|
return use(NestedEditorPluginsContext)?.plugins ?? null;
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
|
+
//#region src/plugins/PasteLinkPlugin.tsx
|
|
34
|
+
var LINK_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
35
|
+
"http:",
|
|
36
|
+
"https:",
|
|
37
|
+
"mailto:",
|
|
38
|
+
"tel:"
|
|
39
|
+
]);
|
|
40
|
+
function toPureUrl(raw) {
|
|
41
|
+
const text = raw?.trim();
|
|
42
|
+
if (!text || /\s/.test(text)) return null;
|
|
43
|
+
try {
|
|
44
|
+
return LINK_PROTOCOLS.has(new URL(text).protocol) ? text : null;
|
|
45
|
+
} catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function PasteLinkPlugin() {
|
|
50
|
+
const [editor] = useLexicalComposerContext();
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
return editor.registerCommand(PASTE_COMMAND, (event) => {
|
|
53
|
+
if (!(event instanceof ClipboardEvent)) return false;
|
|
54
|
+
const selection = $getSelection();
|
|
55
|
+
if (!$isRangeSelection(selection) || selection.isCollapsed()) return false;
|
|
56
|
+
const url = toPureUrl(event.clipboardData?.getData("text/plain"));
|
|
57
|
+
if (!url) return false;
|
|
58
|
+
const textNodes = selection.getNodes().filter($isTextNode);
|
|
59
|
+
if (textNodes.length === 0) return false;
|
|
60
|
+
if (textNodes.some((node) => !node.isSimpleText())) return false;
|
|
61
|
+
const block = textNodes[0].getTopLevelElement();
|
|
62
|
+
if (!block || textNodes.some((node) => node.getTopLevelElement() !== block)) return false;
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
editor.dispatchCommand(TOGGLE_LINK_COMMAND, url);
|
|
65
|
+
return true;
|
|
66
|
+
}, COMMAND_PRIORITY_HIGH);
|
|
67
|
+
}, [editor]);
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
33
71
|
//#region src/components/decorators/NestedEditorCorePlugins.tsx
|
|
34
72
|
function NestedEditorCorePlugins() {
|
|
35
73
|
const nestedEditorPlugins = useNestedEditorPlugins();
|
|
36
74
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
37
75
|
/* @__PURE__ */ jsx(ListPlugin, {}),
|
|
38
76
|
/* @__PURE__ */ jsx(LinkPlugin, {}),
|
|
77
|
+
/* @__PURE__ */ jsx(PasteLinkPlugin, {}),
|
|
39
78
|
nestedEditorPlugins
|
|
40
79
|
] });
|
|
41
80
|
}
|
|
@@ -301,4 +340,4 @@ function $createAlertQuoteEditNode(alertType, contentState) {
|
|
|
301
340
|
return new AlertQuoteEditNode(alertType, contentState);
|
|
302
341
|
}
|
|
303
342
|
//#endregion
|
|
304
|
-
export { NestedEditorCorePlugins as a, createNestedEditor as i, AlertQuoteEditNode as n,
|
|
343
|
+
export { NestedEditorCorePlugins as a, useNestedEditorPlugins as c, createNestedEditor as i, AlertQuoteEditNode as n, PasteLinkPlugin as o, NESTED_EDITOR_NODES as r, NestedEditorPluginsProvider as s, $createAlertQuoteEditNode as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as $createMermaidNode, k as $withAdaptiveImageDisplayWidth, v as $createKaTeXInlineNode, w as $createImageNode, x as $createKaTeXBlockNode } from "./theme-C7HnCTta.js";
|
|
2
|
-
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
2
|
+
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-CRMUWeGh.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-SayN3e8q.js";
|
|
2
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-C7HnCTta.js";
|
|
3
3
|
import { a as FootnoteDefinitionsProvider, n as computeImageMeta } from "./KaTeXRenderer-DLtnsRSv.js";
|
|
4
4
|
import "./katex.css-0TJGE4On.js";
|
|
5
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-DMoe8QNB.js";
|
|
6
|
-
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
6
|
+
import { o as PasteLinkPlugin, t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-CRMUWeGh.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";
|
|
@@ -893,6 +893,7 @@ function CorePlugins() {
|
|
|
893
893
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
894
894
|
/* @__PURE__ */ jsx(ListPlugin, {}),
|
|
895
895
|
/* @__PURE__ */ jsx(LinkPlugin, {}),
|
|
896
|
+
/* @__PURE__ */ jsx(PasteLinkPlugin, {}),
|
|
896
897
|
/* @__PURE__ */ jsx(TabIndentationPlugin, {}),
|
|
897
898
|
/* @__PURE__ */ jsx(TablePlugin, { hasHorizontalScroll: true }),
|
|
898
899
|
/* @__PURE__ */ jsx(CheckListPlugin, {}),
|
package/dist/commands-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as OPEN_IMAGE_UPLOAD_DIALOG_COMMAND, R as extractTextContent, o as $createSpoilerNode, s as $isSpoilerNode } from "./theme-C7HnCTta.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-
|
|
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-V7sqQ-I0.js";
|
|
3
3
|
import { $createTextNode, $getSelection, $isRangeSelection } from "lexical";
|
|
4
4
|
//#region src/utils/collect-command-items.ts
|
|
5
5
|
function collectCommandItems(editor) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorePlugins.d.ts","sourceRoot":"","sources":["../../src/components/CorePlugins.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CorePlugins.d.ts","sourceRoot":"","sources":["../../src/components/CorePlugins.tsx"],"names":[],"mappings":"AAcA,wBAAgB,WAAW,gCAiB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestedEditorCorePlugins.d.ts","sourceRoot":"","sources":["../../../src/components/decorators/NestedEditorCorePlugins.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NestedEditorCorePlugins.d.ts","sourceRoot":"","sources":["../../../src/components/decorators/NestedEditorCorePlugins.tsx"],"names":[],"mappings":"AAMA,wBAAgB,uBAAuB,gCAWtC"}
|
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-
|
|
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-CtG1tXDj.js";
|
|
2
|
+
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-SayN3e8q.js";
|
|
3
3
|
import { B as NestedContentRendererProvider, H as useOptionalNestedContentRenderer, V as useNestedContentRenderer, t as editorTheme } from "./theme-C7HnCTta.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-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
6
|
import { D as ColorSchemeProvider, O as useColorScheme } from "./config-DMoe8QNB.js";
|
|
7
7
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-ClPR9Sd5.js";
|
|
8
|
-
import {
|
|
8
|
+
import { c as useNestedEditorPlugins, s as NestedEditorPluginsProvider } from "./AlertQuoteEditNode-CRMUWeGh.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-V7sqQ-I0.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";
|
|
@@ -3,7 +3,7 @@ import { _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, s
|
|
|
3
3
|
import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-0TJGE4On.js";
|
|
4
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-DMoe8QNB.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-CRMUWeGh.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";
|
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-
|
|
1
|
+
import { a as FootnoteSectionEditNode, i as customEditNodes, n as setResolvedEditNodes, r as allEditNodes, t as getResolvedEditNodes } from "./node-registry-SayN3e8q.js";
|
|
2
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-C7HnCTta.js";
|
|
3
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-DMoe8QNB.js";
|
|
4
|
-
import { r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-
|
|
4
|
+
import { r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-CRMUWeGh.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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasteLinkPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/PasteLinkPlugin.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,eAAe,SA+B9B"}
|
package/dist/plugins-entry.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { MarkdownPastePlugin } from './plugins/MarkdownPastePlugin';
|
|
|
20
20
|
export { MarkdownShortcutsPlugin } from './plugins/MarkdownShortcutsPlugin';
|
|
21
21
|
export { MermaidPlugin } from './plugins/MermaidPlugin';
|
|
22
22
|
export { OnChangePlugin } from './plugins/OnChangePlugin';
|
|
23
|
+
export { PasteLinkPlugin } from './plugins/PasteLinkPlugin';
|
|
23
24
|
export { SubmitShortcutPlugin } from './plugins/SubmitShortcutPlugin';
|
|
24
25
|
export { TextSelectionPlugin } from './plugins/TextSelectionPlugin';
|
|
25
26
|
export { type VideoUploadFn, VideoUploadPlugin, type VideoUploadResult, } from './plugins/VideoUploadPlugin';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-entry.d.ts","sourceRoot":"","sources":["../src/plugins-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAClB,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EACL,KAAK,aAAa,EAClB,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"plugins-entry.d.ts","sourceRoot":"","sources":["../src/plugins-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,qBAAqB,EAC1B,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAClB,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EACL,KAAK,aAAa,EAClB,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/plugins-entry.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
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 {
|
|
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-CtG1tXDj.js";
|
|
2
|
+
import { o as PasteLinkPlugin } from "./AlertQuoteEditNode-CRMUWeGh.js";
|
|
3
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-V7sqQ-I0.js";
|
|
4
|
+
export { ALL_TRANSFORMERS, AlertPlugin, AutoFocusPlugin, AutoLinkPlugin, BlockExitPlugin, BlockIdPlugin, ClickBelowPlugin, CorePlugins, EditorRefPlugin, FootnotePlugin, HorizontalRulePlugin, ImagePlugin, ImagePreprocessProvider, ImageUploadPlugin, ImageUploadProvider, KaTeXPlugin, LinkFaviconPlugin, MarkdownPastePlugin, MarkdownShortcutsPlugin, MermaidPlugin, OnChangePlugin, PasteLinkPlugin, SubmitShortcutPlugin, TextSelectionPlugin, VideoUploadPlugin, VideoUploadProvider, blockIdState, defaultImageUpload, registerClickBelowCommand, useImagePreprocess, useImageUpload, useVideoUpload };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
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.0",
|
|
50
50
|
"thumbhash": "^0.1.1",
|
|
51
|
-
"@haklex/rich-editor-ui": "0.
|
|
52
|
-
"@haklex/rich-
|
|
53
|
-
"@haklex/rich-
|
|
51
|
+
"@haklex/rich-editor-ui": "0.35.0",
|
|
52
|
+
"@haklex/rich-style-token": "0.35.0",
|
|
53
|
+
"@haklex/rich-headless": "0.35.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@lexical/extension": "^0.49.0",
|