@haklex/rich-editor 0.46.4 → 0.47.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-mtnerxRw.js → AlertQuoteEditNode-CF6l7Ot4.js} +1 -1
- package/dist/{ColorSchemeContext-Bt6P4qsM.js → ColorSchemeContext-YNMYA9FV.js} +1 -1
- package/dist/{MermaidPlugin-BBhXo9yA.js → MermaidPlugin-B6Z7nxsO.js} +2 -2
- package/dist/{SubmitShortcutPlugin-BGwZfLQg.js → SubmitShortcutPlugin-B_fYhqIN.js} +4 -4
- package/dist/commands-entry.mjs +2 -2
- package/dist/components/ContentEditable.d.ts +1 -1
- package/dist/components/CorePlugins.d.ts +1 -1
- package/dist/components/LinkFavicon.d.ts +1 -1
- package/dist/components/RendererWrapper.d.ts +1 -1
- package/dist/components/RichEditor.d.ts +1 -1
- package/dist/components/RichEditorShell.d.ts +1 -1
- package/dist/components/decorators/AlertEditDecorator.d.ts +1 -1
- package/dist/components/decorators/BannerEditDecorator.d.ts +1 -1
- package/dist/components/decorators/CodeBlockEditDecorator.d.ts +1 -1
- package/dist/components/decorators/GridEditDecorator.d.ts +1 -1
- package/dist/components/decorators/NestedEditorCorePlugins.d.ts +1 -1
- package/dist/components/renderers/AlertStaticDecorator.d.ts +1 -1
- package/dist/components/renderers/BannerStaticDecorator.d.ts +1 -1
- package/dist/components/renderers/CodeBlockRenderer.d.ts +1 -1
- package/dist/components/renderers/FileRenderer.d.ts +1 -1
- package/dist/components/renderers/FootnoteRenderer.d.ts +1 -1
- package/dist/components/renderers/FootnoteSectionEditRenderer.d.ts +1 -1
- package/dist/components/renderers/FootnoteSectionRenderer.d.ts +1 -1
- package/dist/components/renderers/FootnoteStaticRenderer.d.ts +1 -1
- package/dist/components/renderers/GridStaticDecorator.d.ts +1 -1
- package/dist/components/renderers/ImageRenderer.d.ts +1 -1
- package/dist/components/renderers/KaTeXRenderer.d.ts +1 -1
- package/dist/components/renderers/LinkCardRenderer.d.ts +1 -1
- package/dist/components/renderers/MentionRenderer.d.ts +1 -1
- package/dist/components/renderers/MermaidRenderer.d.ts +1 -1
- package/dist/components/renderers/RubyRenderer.d.ts +1 -1
- package/dist/components/renderers/TagRenderer.d.ts +1 -1
- package/dist/components/renderers/VideoRenderer.d.ts +1 -1
- package/dist/context/ColorSchemeContext.d.ts +1 -1
- package/dist/context/ExtraNodesContext.d.ts +1 -1
- package/dist/context/FileUploadContext.d.ts +1 -1
- package/dist/context/FootnoteDefinitionsContext.d.ts +1 -1
- package/dist/context/ImagePreprocessContext.d.ts +1 -1
- package/dist/context/ImageUploadContext.d.ts +1 -1
- package/dist/context/NestedEditorPluginsContext.d.ts +1 -1
- package/dist/context/RendererConfigContext.d.ts +1 -1
- package/dist/context/TextSelectionContext.d.ts +1 -1
- package/dist/context/VideoUploadContext.d.ts +1 -1
- package/dist/index.mjs +6 -6
- package/dist/{node-registry-D3ag2sc0.js → node-registry-DlFXn2mY.js} +3 -3
- package/dist/nodes-entry.mjs +4 -4
- package/dist/plugins/FileUploadPlugin.d.ts +1 -1
- package/dist/plugins/FootnotePlugin.d.ts +1 -1
- package/dist/plugins/ImageUploadPlugin.d.ts +1 -1
- package/dist/plugins/MarkdownShortcutsPlugin.d.ts +1 -1
- package/dist/plugins/VideoUploadPlugin.d.ts +1 -1
- package/dist/plugins-entry.mjs +4 -4
- package/dist/static-entry.mjs +2 -2
- package/dist/{theme-DybCgfCO.js → theme-BO6sivDE.js} +4 -4
- package/package.json +16 -16
|
@@ -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-BO6sivDE.js";
|
|
2
2
|
import { c as RendererWrapper, m as ALERT_NODE_KEY } from "./thumbhash-rpJmKhGu.js";
|
|
3
3
|
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
4
4
|
import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as sharedStyles, s as semanticClassNames, t as clsx } from "./utils-CWdXq6zB.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-BO6sivDE.js";
|
|
3
3
|
import { D as VIDEO_NODE_KEY, S as LINK_CARD_NODE_KEY, _ as FILE_NODE_KEY, c as RendererWrapper, g as CODE_BLOCK_NODE_KEY, h as BANNER_NODE_KEY, l as createRendererDecoration, o as useFootnoteDefinitions, y as FOOTNOTE_SECTION_NODE_KEY } from "./thumbhash-rpJmKhGu.js";
|
|
4
4
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-O_ACZKTG.js";
|
|
5
5
|
import { n as FileRenderer, t as LinkCardRenderer } from "./LinkCardRenderer-BT8P5aJC.js";
|
|
@@ -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-BO6sivDE.js";
|
|
2
|
+
import { t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-CF6l7Ot4.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-DlFXn2mY.js";
|
|
2
2
|
import "./utils-CWdXq6zB.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-BO6sivDE.js";
|
|
4
4
|
import { i as FootnoteDefinitionsProvider, t as computeImageMeta } from "./thumbhash-rpJmKhGu.js";
|
|
5
|
-
import { C as fileExtFromName, D as $createCommentPlaceholderNode, E as $createCommentNode, F as BannerNode, T as DetailsNode, _ as $createFootnoteSectionNode, b as $createFileNode, c as $createRubyNode, h as $isGridContainerNode, j as CodeBlockNode, k as CommentNode, o as $createVideoNode, u as RubyNode, v as $isFootnoteSectionNode, w as $createDetailsNode, x as $isFileNode, y as FootnoteSectionNode } from "./ColorSchemeContext-
|
|
6
|
-
import { o as PasteLinkPlugin, t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-
|
|
5
|
+
import { C as fileExtFromName, D as $createCommentPlaceholderNode, E as $createCommentNode, F as BannerNode, T as DetailsNode, _ as $createFootnoteSectionNode, b as $createFileNode, c as $createRubyNode, h as $isGridContainerNode, j as CodeBlockNode, k as CommentNode, o as $createVideoNode, u as RubyNode, v as $isFootnoteSectionNode, w as $createDetailsNode, x as $isFileNode, y as FootnoteSectionNode } from "./ColorSchemeContext-YNMYA9FV.js";
|
|
6
|
+
import { o as PasteLinkPlugin, t as $createAlertQuoteEditNode } from "./AlertQuoteEditNode-CF6l7Ot4.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-BO6sivDE.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-B6Z7nxsO.js";
|
|
3
3
|
import { $createTextNode, $getSelection, $isRangeSelection } from "lexical";
|
|
4
4
|
//#region src/utils/collect-command-items.ts
|
|
5
5
|
function collectCommandItems(editor) {
|
|
@@ -3,6 +3,6 @@ interface ContentEditableProps {
|
|
|
3
3
|
hasHeader?: boolean;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function ContentEditable({ className, placeholder, hasHeader }: ContentEditableProps): import(
|
|
6
|
+
export declare function ContentEditable({ className, placeholder, hasHeader }: ContentEditableProps): import('react').JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=ContentEditable.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function CorePlugins(): import(
|
|
1
|
+
export declare function CorePlugins(): import('react').JSX.Element;
|
|
2
2
|
//# sourceMappingURL=CorePlugins.d.ts.map
|
|
@@ -8,5 +8,5 @@ export type LinkFaviconProps = {
|
|
|
8
8
|
/** Resolve platform type from URL, injected by app */
|
|
9
9
|
getPlatformFromUrl?: (url: URL) => string | null;
|
|
10
10
|
};
|
|
11
|
-
export declare function LinkFavicon({ href, source, noIcon, className, platformIconMap, getPlatformFromUrl, }: LinkFaviconProps): import(
|
|
11
|
+
export declare function LinkFavicon({ href, source, noIcon, className, platformIconMap, getPlatformFromUrl, }: LinkFaviconProps): import('react').JSX.Element | null;
|
|
12
12
|
//# sourceMappingURL=LinkFavicon.d.ts.map
|
|
@@ -26,7 +26,7 @@ export type RendererWrapperProps = {
|
|
|
26
26
|
* Wrapper component that allows overriding default renderers with custom ones.
|
|
27
27
|
* Uses RendererConfig from context to determine which renderer to use.
|
|
28
28
|
*/
|
|
29
|
-
export declare function RendererWrapper({ rendererKey, defaultRenderer, props }: RendererWrapperProps): import(
|
|
29
|
+
export declare function RendererWrapper({ rendererKey, defaultRenderer, props }: RendererWrapperProps): import('react').JSX.Element | null;
|
|
30
30
|
/**
|
|
31
31
|
* Type-safe helper for creating RendererWrapper elements from .ts node files.
|
|
32
32
|
* Avoids the createElement + discriminated-union typing limitation.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RichEditorProps } from '../types';
|
|
2
|
-
export declare function RichEditor({ extraNodes, imageUpload, videoUpload, fileUpload, children, ...shellProps }: RichEditorProps): import(
|
|
2
|
+
export declare function RichEditor({ extraNodes, imageUpload, videoUpload, fileUpload, children, ...shellProps }: RichEditorProps): import('react').JSX.Element;
|
|
3
3
|
//# sourceMappingURL=RichEditor.d.ts.map
|
|
@@ -22,5 +22,5 @@ export interface RichEditorShellProps {
|
|
|
22
22
|
theme?: ColorScheme;
|
|
23
23
|
variant?: RichEditorVariant;
|
|
24
24
|
}
|
|
25
|
-
export declare function RichEditorShell({ nodes, initialValue, onChange, variant, theme, placeholder, onSubmit, autoFocus, className, contentClassName, style, actions, header, onEditorReady, rendererConfig, debounceMs, children, }: RichEditorShellProps): import(
|
|
25
|
+
export declare function RichEditorShell({ nodes, initialValue, onChange, variant, theme, placeholder, onSubmit, autoFocus, className, contentClassName, style, actions, header, onEditorReady, rendererConfig, debounceMs, children, }: RichEditorShellProps): import('react').JSX.Element;
|
|
26
26
|
//# sourceMappingURL=RichEditorShell.d.ts.map
|
|
@@ -5,6 +5,6 @@ interface AlertEditDecoratorProps {
|
|
|
5
5
|
contentEditor: LexicalEditor;
|
|
6
6
|
nodeKey: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function AlertEditDecorator({ nodeKey, alertType, contentEditor }: AlertEditDecoratorProps): import(
|
|
8
|
+
export declare function AlertEditDecorator({ nodeKey, alertType, contentEditor }: AlertEditDecoratorProps): import('react').JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=AlertEditDecorator.d.ts.map
|
|
@@ -5,6 +5,6 @@ interface BannerEditDecoratorProps {
|
|
|
5
5
|
contentEditor: LexicalEditor;
|
|
6
6
|
nodeKey: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function BannerEditDecorator({ nodeKey, bannerType, contentEditor, }: BannerEditDecoratorProps): import(
|
|
8
|
+
export declare function BannerEditDecorator({ nodeKey, bannerType, contentEditor, }: BannerEditDecoratorProps): import('react').JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=BannerEditDecorator.d.ts.map
|
|
@@ -3,6 +3,6 @@ interface CodeBlockEditDecoratorProps {
|
|
|
3
3
|
language: string;
|
|
4
4
|
nodeKey: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function CodeBlockEditDecorator({ nodeKey, code, language }: CodeBlockEditDecoratorProps): import(
|
|
6
|
+
export declare function CodeBlockEditDecorator({ nodeKey, code, language }: CodeBlockEditDecoratorProps): import('react').JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=CodeBlockEditDecorator.d.ts.map
|
|
@@ -6,6 +6,6 @@ interface GridEditDecoratorProps {
|
|
|
6
6
|
gap: string;
|
|
7
7
|
nodeKey: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function GridEditDecorator({ nodeKey, autoFocusOnMount, cols: initialCols, gap, cellEditors, }: GridEditDecoratorProps): import(
|
|
9
|
+
export declare function GridEditDecorator({ nodeKey, autoFocusOnMount, cols: initialCols, gap, cellEditors, }: GridEditDecoratorProps): import('react').JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=GridEditDecorator.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function NestedEditorCorePlugins(): import(
|
|
1
|
+
export declare function NestedEditorCorePlugins(): import('react').JSX.Element;
|
|
2
2
|
//# sourceMappingURL=NestedEditorCorePlugins.d.ts.map
|
|
@@ -4,6 +4,6 @@ interface AlertStaticDecoratorProps {
|
|
|
4
4
|
alertType: AlertType;
|
|
5
5
|
contentState: SerializedEditorState;
|
|
6
6
|
}
|
|
7
|
-
export declare function AlertStaticDecorator({ alertType, contentState }: AlertStaticDecoratorProps): import(
|
|
7
|
+
export declare function AlertStaticDecorator({ alertType, contentState }: AlertStaticDecoratorProps): import('react').JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=AlertStaticDecorator.d.ts.map
|
|
@@ -4,6 +4,6 @@ interface BannerStaticDecoratorProps {
|
|
|
4
4
|
bannerType: BannerType;
|
|
5
5
|
contentState: SerializedEditorState;
|
|
6
6
|
}
|
|
7
|
-
export declare function BannerStaticDecorator({ bannerType, contentState }: BannerStaticDecoratorProps): import(
|
|
7
|
+
export declare function BannerStaticDecorator({ bannerType, contentState }: BannerStaticDecoratorProps): import('react').JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=BannerStaticDecorator.d.ts.map
|
|
@@ -10,5 +10,5 @@ export interface CodeBlockRendererProps {
|
|
|
10
10
|
selected?: boolean;
|
|
11
11
|
showLineNumbers?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare function CodeBlockRenderer({ code, language, showLineNumbers: showLineNumbersProp, }: CodeBlockRendererProps): import(
|
|
13
|
+
export declare function CodeBlockRenderer({ code, language, showLineNumbers: showLineNumbersProp, }: CodeBlockRendererProps): import('react').JSX.Element;
|
|
14
14
|
//# sourceMappingURL=CodeBlockRenderer.d.ts.map
|
|
@@ -10,5 +10,5 @@ export interface FileRendererProps {
|
|
|
10
10
|
export declare function formatFileSize(bytes?: number): string | null;
|
|
11
11
|
export declare function fileExtension(name: string, ext?: string): string | null;
|
|
12
12
|
export declare function fileMetaText(name: string, size?: number, ext?: string): string;
|
|
13
|
-
export declare function FileRenderer({ src, name, size, ext, display }: FileRendererProps): import(
|
|
13
|
+
export declare function FileRenderer({ src, name, size, ext, display }: FileRendererProps): import('react').JSX.Element;
|
|
14
14
|
//# sourceMappingURL=FileRenderer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface FootnoteRendererProps {
|
|
2
2
|
identifier: string;
|
|
3
3
|
}
|
|
4
|
-
export declare function FootnoteRenderer({ identifier }: FootnoteRendererProps): import(
|
|
4
|
+
export declare function FootnoteRenderer({ identifier }: FootnoteRendererProps): import('react').JSX.Element;
|
|
5
5
|
//# sourceMappingURL=FootnoteRenderer.d.ts.map
|
|
@@ -2,5 +2,5 @@ export interface FootnoteSectionEditRendererProps {
|
|
|
2
2
|
definitions: Record<string, string>;
|
|
3
3
|
nodeKey: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function FootnoteSectionEditRenderer({ definitions }: FootnoteSectionEditRendererProps): import(
|
|
5
|
+
export declare function FootnoteSectionEditRenderer({ definitions }: FootnoteSectionEditRendererProps): import('react').JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=FootnoteSectionEditRenderer.d.ts.map
|
|
@@ -2,5 +2,5 @@ export interface FootnoteSectionRendererProps {
|
|
|
2
2
|
definitions: Record<string, string>;
|
|
3
3
|
nodeKey: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function FootnoteSectionRenderer({ definitions }: FootnoteSectionRendererProps): import(
|
|
5
|
+
export declare function FootnoteSectionRenderer({ definitions }: FootnoteSectionRendererProps): import('react').JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=FootnoteSectionRenderer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface FootnoteStaticRendererProps {
|
|
2
2
|
identifier: string;
|
|
3
3
|
}
|
|
4
|
-
export declare function FootnoteStaticRenderer({ identifier }: FootnoteStaticRendererProps): import(
|
|
4
|
+
export declare function FootnoteStaticRenderer({ identifier }: FootnoteStaticRendererProps): import('react').JSX.Element;
|
|
5
5
|
//# sourceMappingURL=FootnoteStaticRenderer.d.ts.map
|
|
@@ -4,6 +4,6 @@ interface GridStaticDecoratorProps {
|
|
|
4
4
|
cols: number;
|
|
5
5
|
gap: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function GridStaticDecorator({ cols, gap, cellStates }: GridStaticDecoratorProps): import(
|
|
7
|
+
export declare function GridStaticDecorator({ cols, gap, cellStates }: GridStaticDecoratorProps): import('react').JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=GridStaticDecorator.d.ts.map
|
|
@@ -12,5 +12,5 @@ export interface ImageRendererProps {
|
|
|
12
12
|
thumbhash?: string;
|
|
13
13
|
width?: number;
|
|
14
14
|
}
|
|
15
|
-
export declare function ImageRenderer({ src, altText, width, height, caption, thumbhash, accent, displayWidth, fixedWidth, fixedHeight, layout, }: ImageRendererProps): import(
|
|
15
|
+
export declare function ImageRenderer({ src, altText, width, height, caption, thumbhash, accent, displayWidth, fixedWidth, fixedHeight, layout, }: ImageRendererProps): import('react').JSX.Element;
|
|
16
16
|
//# sourceMappingURL=ImageRenderer.d.ts.map
|
|
@@ -2,5 +2,5 @@ export interface KaTeXRendererProps {
|
|
|
2
2
|
displayMode: boolean;
|
|
3
3
|
equation: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function KaTeXRenderer({ equation, displayMode }: KaTeXRendererProps): import(
|
|
5
|
+
export declare function KaTeXRenderer({ equation, displayMode }: KaTeXRendererProps): import('react').JSX.Element;
|
|
6
6
|
//# sourceMappingURL=KaTeXRenderer.d.ts.map
|
|
@@ -7,5 +7,5 @@ export interface LinkCardRendererProps {
|
|
|
7
7
|
title?: string;
|
|
8
8
|
url: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function LinkCardRenderer({ url, title, description, favicon, image, }: LinkCardRendererProps): import(
|
|
10
|
+
export declare function LinkCardRenderer({ url, title, description, favicon, image, }: LinkCardRendererProps): import('react').JSX.Element;
|
|
11
11
|
//# sourceMappingURL=LinkCardRenderer.d.ts.map
|
|
@@ -3,5 +3,5 @@ export interface MentionRendererProps {
|
|
|
3
3
|
handle: string;
|
|
4
4
|
platform: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function MentionRenderer({ handle, displayName }: MentionRendererProps): import(
|
|
6
|
+
export declare function MentionRenderer({ handle, displayName }: MentionRendererProps): import('react').JSX.Element;
|
|
7
7
|
//# sourceMappingURL=MentionRenderer.d.ts.map
|
|
@@ -2,5 +2,5 @@ export interface MermaidRendererProps {
|
|
|
2
2
|
content: string;
|
|
3
3
|
onContentChange?: (content: string) => void;
|
|
4
4
|
}
|
|
5
|
-
export declare function MermaidRenderer({ content }: MermaidRendererProps): import(
|
|
5
|
+
export declare function MermaidRenderer({ content }: MermaidRendererProps): import('react').JSX.Element;
|
|
6
6
|
//# sourceMappingURL=MermaidRenderer.d.ts.map
|
|
@@ -3,5 +3,5 @@ export interface RubyRendererProps {
|
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
reading: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function RubyRenderer({ reading, children }: RubyRendererProps): import(
|
|
6
|
+
export declare function RubyRenderer({ reading, children }: RubyRendererProps): import('react').JSX.Element;
|
|
7
7
|
//# sourceMappingURL=RubyRenderer.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface TagRendererProps {
|
|
2
2
|
text: string;
|
|
3
3
|
}
|
|
4
|
-
export declare function TagRenderer({ text }: TagRendererProps): import(
|
|
4
|
+
export declare function TagRenderer({ text }: TagRendererProps): import('react').JSX.Element;
|
|
5
5
|
export { getTagBgColor } from '../../utils/tag-color';
|
|
6
6
|
//# sourceMappingURL=TagRenderer.d.ts.map
|
|
@@ -4,5 +4,5 @@ export interface VideoRendererProps {
|
|
|
4
4
|
src: string;
|
|
5
5
|
width?: number;
|
|
6
6
|
}
|
|
7
|
-
export declare function VideoRenderer({ src, poster, width, height }: VideoRendererProps): import(
|
|
7
|
+
export declare function VideoRenderer({ src, poster, width, height }: VideoRendererProps): import('react').JSX.Element;
|
|
8
8
|
//# sourceMappingURL=VideoRenderer.d.ts.map
|
|
@@ -3,6 +3,6 @@ export type ColorScheme = 'light' | 'dark';
|
|
|
3
3
|
export declare function ColorSchemeProvider({ colorScheme, children, }: {
|
|
4
4
|
colorScheme: ColorScheme;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
}): import(
|
|
6
|
+
}): import('react').JSX.Element;
|
|
7
7
|
export declare function useColorScheme(): ColorScheme;
|
|
8
8
|
//# sourceMappingURL=ColorSchemeContext.d.ts.map
|
|
@@ -3,6 +3,6 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
export declare function ExtraNodesProvider({ children, extraNodes, }: {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
extraNodes?: Array<Klass<LexicalNode>>;
|
|
6
|
-
}): import(
|
|
6
|
+
}): import('react').JSX.Element;
|
|
7
7
|
export declare function useExtraNodes(): Array<Klass<LexicalNode>> | undefined;
|
|
8
8
|
//# sourceMappingURL=ExtraNodesContext.d.ts.map
|
|
@@ -3,6 +3,6 @@ import { FileUploadFn } from '../plugins/FileUploadPlugin';
|
|
|
3
3
|
export declare function FileUploadProvider({ upload, children, }: {
|
|
4
4
|
upload: FileUploadFn | null;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
}): import(
|
|
6
|
+
}): import('react').JSX.Element;
|
|
7
7
|
export declare function useFileUpload(): FileUploadFn | null;
|
|
8
8
|
//# sourceMappingURL=FileUploadContext.d.ts.map
|
|
@@ -5,7 +5,7 @@ export interface FootnoteDefinitionsContextValue {
|
|
|
5
5
|
}
|
|
6
6
|
export declare function FootnoteDefinitionsProvider({ definitions, displayNumberMap, children, }: FootnoteDefinitionsContextValue & {
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
}): import(
|
|
8
|
+
}): import('react').JSX.Element;
|
|
9
9
|
export declare function useFootnoteDefinitions(): FootnoteDefinitionsContextValue;
|
|
10
10
|
export declare function useFootnoteContent(identifier: string): string | undefined;
|
|
11
11
|
export declare function useFootnoteDisplayNumber(identifier: string): number | undefined;
|
|
@@ -9,6 +9,6 @@ export interface ImagePreprocessContextValue {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function ImagePreprocessProvider({ children }: {
|
|
11
11
|
children: ReactNode;
|
|
12
|
-
}): import(
|
|
12
|
+
}): import('react').JSX.Element;
|
|
13
13
|
export declare function useImagePreprocess(): ImagePreprocessContextValue | null;
|
|
14
14
|
//# sourceMappingURL=ImagePreprocessContext.d.ts.map
|
|
@@ -3,6 +3,6 @@ import { ImageUploadFn } from '../plugins/ImageUploadPlugin';
|
|
|
3
3
|
export declare function ImageUploadProvider({ upload, children, }: {
|
|
4
4
|
upload: ImageUploadFn;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
}): import(
|
|
6
|
+
}): import('react').JSX.Element;
|
|
7
7
|
export declare function useImageUpload(): ImageUploadFn | null;
|
|
8
8
|
//# sourceMappingURL=ImageUploadContext.d.ts.map
|
|
@@ -3,6 +3,6 @@ export interface NestedEditorPluginsProviderProps {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
plugins?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare function NestedEditorPluginsProvider({ children, plugins, }: NestedEditorPluginsProviderProps): import(
|
|
6
|
+
export declare function NestedEditorPluginsProvider({ children, plugins, }: NestedEditorPluginsProviderProps): import('react').JSX.Element;
|
|
7
7
|
export declare function useNestedEditorPlugins(): ReactNode;
|
|
8
8
|
//# sourceMappingURL=NestedEditorPluginsContext.d.ts.map
|
|
@@ -8,7 +8,7 @@ export interface RendererConfigProviderProps {
|
|
|
8
8
|
mode: RendererMode;
|
|
9
9
|
variant: RichEditorVariant;
|
|
10
10
|
}
|
|
11
|
-
export declare function RendererConfigProvider({ config, mode, variant, children, }: RendererConfigProviderProps): import(
|
|
11
|
+
export declare function RendererConfigProvider({ config, mode, variant, children, }: RendererConfigProviderProps): import('react').JSX.Element;
|
|
12
12
|
export declare function useRendererConfig(): RendererConfig | undefined;
|
|
13
13
|
export declare function useRendererMode(): RendererMode;
|
|
14
14
|
export declare function useVariant(): RichEditorVariant;
|
|
@@ -12,7 +12,7 @@ export interface TextSelectionStore {
|
|
|
12
12
|
export declare function createTextSelectionStore(initialState?: TextSelectionStoreState): TextSelectionStore;
|
|
13
13
|
export declare function TextSelectionStoreProvider({ children }: {
|
|
14
14
|
children: ReactNode;
|
|
15
|
-
}): import(
|
|
15
|
+
}): import('react').JSX.Element;
|
|
16
16
|
export declare function useTextSelectionStore(): TextSelectionStore;
|
|
17
17
|
export declare function useTextSelectionSnapshot(): TextSelectionSnapshot | null;
|
|
18
18
|
//# sourceMappingURL=TextSelectionContext.d.ts.map
|
|
@@ -3,6 +3,6 @@ import { VideoUploadFn } from '../plugins/VideoUploadPlugin';
|
|
|
3
3
|
export declare function VideoUploadProvider({ upload, children, }: {
|
|
4
4
|
upload: VideoUploadFn | null;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
}): import(
|
|
6
|
+
}): import('react').JSX.Element;
|
|
7
7
|
export declare function useVideoUpload(): VideoUploadFn | null;
|
|
8
8
|
//# sourceMappingURL=VideoUploadContext.d.ts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as FileUploadPlugin, C as createTextSelectionStore, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as VideoUploadProvider, L as ImageUploadProvider, N as BlockIdPlugin, O as defaultImageUpload, P as blockIdState, S as TextSelectionStoreProvider, T as useTextSelectionStore, U as CorePlugins, V as FileUploadProvider, _ 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, 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, z as ImagePreprocessProvider } from "./SubmitShortcutPlugin-
|
|
2
|
-
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-
|
|
1
|
+
import { A as FileUploadPlugin, C as createTextSelectionStore, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as VideoUploadProvider, L as ImageUploadProvider, N as BlockIdPlugin, O as defaultImageUpload, P as blockIdState, S as TextSelectionStoreProvider, T as useTextSelectionStore, U as CorePlugins, V as FileUploadProvider, _ 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, 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, z as ImagePreprocessProvider } from "./SubmitShortcutPlugin-B_fYhqIN.js";
|
|
2
|
+
import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-DlFXn2mY.js";
|
|
3
3
|
import { a as articleVariant, c as sharedStyles, i as commentVariant, n as getVariantClass, o as richContent, r as noteVariant, s as semanticClassNames, t as clsx } from "./utils-CWdXq6zB.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-BO6sivDE.js";
|
|
5
5
|
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 FILE_NODE_KEY, a as useFootnoteContent, b as IMAGE_NODE_KEY, d as useRendererConfig, f as useRendererMode, g as CODE_BLOCK_NODE_KEY, h as BANNER_NODE_KEY, i as FootnoteDefinitionsProvider, m as ALERT_NODE_KEY, o as useFootnoteDefinitions, p as useVariant, s as useFootnoteDisplayNumber, u as RendererConfigProvider, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./thumbhash-rpJmKhGu.js";
|
|
6
|
-
import { n as useColorScheme, t as ColorSchemeProvider } from "./ColorSchemeContext-
|
|
6
|
+
import { n as useColorScheme, t as ColorSchemeProvider } from "./ColorSchemeContext-YNMYA9FV.js";
|
|
7
7
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-O_ACZKTG.js";
|
|
8
|
-
import { c as useNestedEditorPlugins, s as NestedEditorPluginsProvider } from "./AlertQuoteEditNode-
|
|
8
|
+
import { c as useNestedEditorPlugins, s as NestedEditorPluginsProvider } from "./AlertQuoteEditNode-CF6l7Ot4.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-Cy0doqRV.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-B6Z7nxsO.js";
|
|
12
12
|
import { n as katexStyles, t as katexClassNames } from "./katex.css-DcnoSfYf.js";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as sharedStyles, s as semanticClassNames, t as clsx } from "./utils-CWdXq6zB.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-BO6sivDE.js";
|
|
3
3
|
import { c as RendererWrapper, g as CODE_BLOCK_NODE_KEY, h as BANNER_NODE_KEY, o as useFootnoteDefinitions, p as useVariant } from "./thumbhash-rpJmKhGu.js";
|
|
4
|
-
import { A as $isCodeBlockNode, F as BannerNode, I as normalizeBannerType, L as BannerRenderer, M as $isBannerNode, S as FileNode, T as DetailsNode, g as GridContainerNode, h as $isGridContainerNode, i as builtinNodes, j as CodeBlockNode, k as CommentNode, n as useColorScheme, p as LinkCardNode, s as VideoNode, u as RubyNode, y as FootnoteSectionNode } from "./ColorSchemeContext-
|
|
4
|
+
import { A as $isCodeBlockNode, F as BannerNode, I as normalizeBannerType, L as BannerRenderer, M as $isBannerNode, S as FileNode, T as DetailsNode, g as GridContainerNode, h as $isGridContainerNode, i as builtinNodes, j as CodeBlockNode, k as CommentNode, n as useColorScheme, p as LinkCardNode, s as VideoNode, u as RubyNode, y as FootnoteSectionNode } from "./ColorSchemeContext-YNMYA9FV.js";
|
|
5
5
|
import { n as gridStyles, t as gridClassNames } from "./grid.css-O_ACZKTG.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-CF6l7Ot4.js";
|
|
7
7
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
8
8
|
import { createElement, useCallback, useEffect, useRef, 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-
|
|
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 { C as fileExtFromName, E as $createCommentNode, N as BANNER_LABELS, O as $isCommentNode, P as BANNER_TYPES, S as FileNode, _ as $createFootnoteSectionNode, a as customNodes, b as $createFileNode, c as $createRubyNode, d as $createLinkCardNode, f as $isLinkCardNode, g as GridContainerNode, h as $isGridContainerNode, i as builtinNodes, k as CommentNode, l as $isRubyNode, m as $createGridContainerNode, p as LinkCardNode, r as allNodes, u as RubyNode, v as $isFootnoteSectionNode, x as $isFileNode, y as FootnoteSectionNode } from "./ColorSchemeContext-
|
|
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-DlFXn2mY.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-BO6sivDE.js";
|
|
3
|
+
import { C as fileExtFromName, E as $createCommentNode, N as BANNER_LABELS, O as $isCommentNode, P as BANNER_TYPES, S as FileNode, _ as $createFootnoteSectionNode, a as customNodes, b as $createFileNode, c as $createRubyNode, d as $createLinkCardNode, f as $isLinkCardNode, g as GridContainerNode, h as $isGridContainerNode, i as builtinNodes, k as CommentNode, l as $isRubyNode, m as $createGridContainerNode, p as LinkCardNode, r as allNodes, u as RubyNode, v as $isFootnoteSectionNode, x as $isFileNode, y as FootnoteSectionNode } from "./ColorSchemeContext-YNMYA9FV.js";
|
|
4
|
+
import { r as NESTED_EDITOR_NODES } from "./AlertQuoteEditNode-CF6l7Ot4.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 };
|
|
@@ -7,6 +7,6 @@ export type FileUploadFn = (file: File, opts?: {
|
|
|
7
7
|
interface FileUploadPluginProps {
|
|
8
8
|
onUpload: FileUploadFn;
|
|
9
9
|
}
|
|
10
|
-
export declare function FileUploadPlugin({ onUpload }: FileUploadPluginProps): import(
|
|
10
|
+
export declare function FileUploadPlugin({ onUpload }: FileUploadPluginProps): import('react').JSX.Element;
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=FileUploadPlugin.d.ts.map
|
|
@@ -10,6 +10,6 @@ export declare function defaultImageUpload(file: File): Promise<ImageUploadResul
|
|
|
10
10
|
interface ImageUploadPluginProps {
|
|
11
11
|
onUpload: ImageUploadFn;
|
|
12
12
|
}
|
|
13
|
-
export declare function ImageUploadPlugin({ onUpload }: ImageUploadPluginProps): import(
|
|
13
|
+
export declare function ImageUploadPlugin({ onUpload }: ImageUploadPluginProps): import('react').JSX.Element;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=ImageUploadPlugin.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function MarkdownShortcutsPlugin(): import(
|
|
1
|
+
export declare function MarkdownShortcutsPlugin(): import('react').JSX.Element;
|
|
2
2
|
//# sourceMappingURL=MarkdownShortcutsPlugin.d.ts.map
|
|
@@ -7,6 +7,6 @@ export type VideoUploadFn = (file: File, opts?: {
|
|
|
7
7
|
interface VideoUploadPluginProps {
|
|
8
8
|
onUpload: VideoUploadFn;
|
|
9
9
|
}
|
|
10
|
-
export declare function VideoUploadPlugin({ onUpload }: VideoUploadPluginProps): import(
|
|
10
|
+
export declare function VideoUploadPlugin({ onUpload }: VideoUploadPluginProps): import('react').JSX.Element | null;
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=VideoUploadPlugin.d.ts.map
|
package/dist/plugins-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as FileUploadPlugin, B as useImagePreprocess, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as VideoUploadProvider, G as MarkdownPastePlugin, H as useFileUpload, I as useVideoUpload, J as HorizontalRulePlugin, K as ALL_TRANSFORMERS, L as ImageUploadProvider, M as useFileUploadEntry, N as BlockIdPlugin, O as defaultImageUpload, P as blockIdState, Q as AutoLinkPlugin, R as useImageUpload, U as CorePlugins, V as FileUploadProvider, W as MarkdownShortcutsPlugin, X as registerClickBelowCommand, Y as ClickBelowPlugin, Z as BlockExitPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as setFileUploadEntry, k as resolvePreprocessTargets, n as OnChangePlugin, o as VideoUploadPlugin, q as InlineDndPlugin, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, z as ImagePreprocessProvider } 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 FileUploadPlugin, B as useImagePreprocess, D as ImageUploadPlugin, E as LinkFaviconPlugin, F as VideoUploadProvider, G as MarkdownPastePlugin, H as useFileUpload, I as useVideoUpload, J as HorizontalRulePlugin, K as ALL_TRANSFORMERS, L as ImageUploadProvider, M as useFileUploadEntry, N as BlockIdPlugin, O as defaultImageUpload, P as blockIdState, Q as AutoLinkPlugin, R as useImageUpload, U as CorePlugins, V as FileUploadProvider, W as MarkdownShortcutsPlugin, X as registerClickBelowCommand, Y as ClickBelowPlugin, Z as BlockExitPlugin, a as AutoFocusPlugin, i as EditorRefPlugin, j as setFileUploadEntry, k as resolvePreprocessTargets, n as OnChangePlugin, o as VideoUploadPlugin, q as InlineDndPlugin, r as FootnotePlugin, s as TextSelectionPlugin, t as SubmitShortcutPlugin, z as ImagePreprocessProvider } from "./SubmitShortcutPlugin-B_fYhqIN.js";
|
|
2
|
+
import { Q as INLINE_DRAG_ATTR, et as markInlineDraggable } from "./theme-BO6sivDE.js";
|
|
3
|
+
import { o as PasteLinkPlugin } from "./AlertQuoteEditNode-CF6l7Ot4.js";
|
|
4
|
+
import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-B6Z7nxsO.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, resolvePreprocessTargets, setFileUploadEntry, useFileUpload, useFileUploadEntry, useImagePreprocess, useImageUpload, useVideoUpload };
|
package/dist/static-entry.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as articleVariant, c as sharedStyles, i as commentVariant, n as getVariantClass, o as richContent, r as noteVariant, s as semanticClassNames, t as clsx } from "./utils-CWdXq6zB.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-BO6sivDE.js";
|
|
3
3
|
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, a as useFootnoteContent, b as IMAGE_NODE_KEY, c as RendererWrapper, d as useRendererConfig, f as useRendererMode, g as CODE_BLOCK_NODE_KEY, h as BANNER_NODE_KEY, i as FootnoteDefinitionsProvider, l as createRendererDecoration, m as ALERT_NODE_KEY, o as useFootnoteDefinitions, p as useVariant, s as useFootnoteDisplayNumber, u as RendererConfigProvider, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./thumbhash-rpJmKhGu.js";
|
|
4
|
-
import { a as customNodes, i as builtinNodes, n as useColorScheme, r as allNodes, t as ColorSchemeProvider } from "./ColorSchemeContext-
|
|
4
|
+
import { a as customNodes, i as builtinNodes, n as useColorScheme, r as allNodes, t as ColorSchemeProvider } from "./ColorSchemeContext-YNMYA9FV.js";
|
|
5
5
|
import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-O_ACZKTG.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-Cy0doqRV.js";
|
|
@@ -77,7 +77,7 @@ function extractTextContent(state) {
|
|
|
77
77
|
return walk(state);
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region \0@oxc-project+runtime@0.
|
|
80
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
|
|
81
81
|
function _typeof(o) {
|
|
82
82
|
"@babel/helpers - typeof";
|
|
83
83
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -87,7 +87,7 @@ function _typeof(o) {
|
|
|
87
87
|
}, _typeof(o);
|
|
88
88
|
}
|
|
89
89
|
//#endregion
|
|
90
|
-
//#region \0@oxc-project+runtime@0.
|
|
90
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
|
|
91
91
|
function toPrimitive(t, r) {
|
|
92
92
|
if ("object" != _typeof(t) || !t) return t;
|
|
93
93
|
var e = t[Symbol.toPrimitive];
|
|
@@ -99,13 +99,13 @@ function toPrimitive(t, r) {
|
|
|
99
99
|
return ("string" === r ? String : Number)(t);
|
|
100
100
|
}
|
|
101
101
|
//#endregion
|
|
102
|
-
//#region \0@oxc-project+runtime@0.
|
|
102
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
|
|
103
103
|
function toPropertyKey(t) {
|
|
104
104
|
var i = toPrimitive(t, "string");
|
|
105
105
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
|
-
//#region \0@oxc-project+runtime@0.
|
|
108
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
|
|
109
109
|
function _defineProperty(e, r, t) {
|
|
110
110
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
111
111
|
value: t,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Core rich text editor based on Lexical",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"dist"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
+
"@haklex/rich-editor-ui": "0.47.0",
|
|
49
|
+
"@haklex/rich-headless": "0.47.0",
|
|
50
|
+
"@haklex/rich-style-token": "0.47.0",
|
|
48
51
|
"@lexical/code-core": "^0.52.0",
|
|
49
|
-
"nanoid": "^6.0.
|
|
50
|
-
"thumbhash": "^0.1.1"
|
|
51
|
-
"@haklex/rich-editor-ui": "0.46.4",
|
|
52
|
-
"@haklex/rich-headless": "0.46.4",
|
|
53
|
-
"@haklex/rich-style-token": "0.46.4"
|
|
52
|
+
"nanoid": "^6.0.2",
|
|
53
|
+
"thumbhash": "^0.1.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@lexical/extension": "^0.52.0",
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
"@lexical/react": "^0.52.0",
|
|
61
61
|
"@lexical/rich-text": "^0.52.0",
|
|
62
62
|
"@lexical/table": "^0.52.0",
|
|
63
|
-
"@types/react": "^19.
|
|
64
|
-
"@types/react-dom": "^19.
|
|
65
|
-
"@vanilla-extract/css": "^1.21.
|
|
63
|
+
"@types/react": "^19.3.0",
|
|
64
|
+
"@types/react-dom": "^19.3.0",
|
|
65
|
+
"@vanilla-extract/css": "^1.21.3",
|
|
66
66
|
"@vanilla-extract/vite-plugin": "^5.2.6",
|
|
67
|
-
"katex": "^0.
|
|
67
|
+
"katex": "^0.19.0",
|
|
68
68
|
"lexical": "^0.52.0",
|
|
69
|
-
"lucide-react": "^1.
|
|
70
|
-
"react": "^19.
|
|
71
|
-
"react-dom": "^19.
|
|
72
|
-
"shiki": "^4.
|
|
69
|
+
"lucide-react": "^1.58.0",
|
|
70
|
+
"react": "^19.3.1",
|
|
71
|
+
"react-dom": "^19.3.1",
|
|
72
|
+
"shiki": "^4.5.0",
|
|
73
73
|
"typescript": "^7.0.2",
|
|
74
|
-
"unplugin-dts": "^1.
|
|
75
|
-
"vite": "^8.
|
|
74
|
+
"unplugin-dts": "^1.1.2",
|
|
75
|
+
"vite": "^8.3.4"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@base-ui/react": ">=1.5.0",
|