@collabchron/notiq 1.1.11 → 1.2.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/AICommandBarPlugin-ZEC755KY.mjs +27 -0
- package/dist/{AIDialog-2WZUFWSC.mjs → AIDialog-HJW6PQPR.mjs} +12 -13
- package/dist/{AudioComponent-CKLMLB5T.mjs → AudioComponent-W5XMZPQB.mjs} +10 -6
- package/dist/{DynamicBlockComponent-2LOADZUX.mjs → DynamicBlockComponent-CHRL2GAQ.mjs} +7 -6
- package/dist/{EquationComponent-4NFG55NQ.mjs → EquationComponent-GNQHG53L.mjs} +26 -7
- package/dist/{ExcalidrawComponent-SIMURTCA.mjs → ExcalidrawComponent-POMYXDSG.mjs} +34 -7
- package/dist/{FileComponent-Y56MX5QD.mjs → FileComponent-EOVCH4V5.mjs} +9 -5
- package/dist/{HintComponet-ET7M2Q7S.mjs → HintComponet-QXL5ESND.mjs} +32 -8
- package/dist/{InlineImageComponent-FVTA4LXZ.mjs → InlineImageComponent-KDN3VGZC.mjs} +8 -3
- package/dist/{StoryBuilderComponent-WQSNFPMM.mjs → StoryBuilderComponent-CBRFPFTR.mjs} +9 -10
- package/dist/{chunk-6UVNHT3T.mjs → chunk-4SYRK2NH.mjs} +23 -1
- package/dist/chunk-5CJZC5IB.mjs +9086 -0
- package/dist/{chunk-MW6MAUY3.mjs → chunk-6NK5DONB.mjs} +1 -1
- package/dist/{chunk-N6ILV6NF.mjs → chunk-ACW4DLVO.mjs} +21 -7
- package/dist/chunk-BCGD2YXP.mjs +574 -0
- package/dist/{chunk-TC3IISJZ.mjs → chunk-BTR3TPIN.mjs} +18 -5
- package/dist/{chunk-XAVQAXOJ.mjs → chunk-CQCS5YPS.mjs} +3 -5
- package/dist/{chunk-YTLUQJE2.mjs → chunk-D4UBNSUW.mjs} +1 -1
- package/dist/{chunk-KNW2CGIP.mjs → chunk-DBRZIA43.mjs} +4 -1
- package/dist/{chunk-CDAMHK63.mjs → chunk-GJK2L7ZM.mjs} +23 -2
- package/dist/{chunk-GYYLZ3MQ.mjs → chunk-IKYVBTCJ.mjs} +43 -20
- package/dist/chunk-IXRA5D53.mjs +10447 -0
- package/dist/{chunk-W6VQSFE5.mjs → chunk-J2CEQXG4.mjs} +1 -1
- package/dist/{chunk-43Z4Z2KD.mjs → chunk-JTNLN4JI.mjs} +1 -1
- package/dist/{chunk-OE5JRLCN.mjs → chunk-ONOHG5NB.mjs} +6 -4
- package/dist/{chunk-XZXGYNTY.mjs → chunk-OO42URWA.mjs} +27 -6
- package/dist/chunk-PBVRSNGU.mjs +129 -0
- package/dist/chunk-QCS57TIF.mjs +1794 -0
- package/dist/chunk-RNEIJRUS.mjs +60 -0
- package/dist/chunk-TJPTGECP.mjs +1556 -0
- package/dist/{chunk-XYMXGU4T.mjs → chunk-TMYRA2W4.mjs} +1 -1
- package/dist/{chunk-ZFV2HGD3.mjs → chunk-UNEFOZTS.mjs} +1 -1
- package/dist/chunk-X4NI7EQS.mjs +282 -0
- package/dist/chunk-XAJ4GACN.mjs +746 -0
- package/dist/{chunk-7QRJVZQY.mjs → chunk-YVUQRJVV.mjs} +63 -18
- package/dist/components/editor/Core.d.ts +15 -2
- package/dist/components/editor/index.d.ts +16 -5
- package/dist/components/editor/nodes/EquationNode/EquationNode.d.ts +1 -0
- package/dist/components/editor/nodes/Hint/index.d.ts +2 -1
- package/dist/components/editor/plugins/AICommandBarPlugin/index.d.ts +73 -1
- package/dist/components/editor/plugins/DraggableBlockPlugin/index.d.ts +25 -3
- package/dist/components/editor/plugins/InlineCopilotPlugin/index.d.ts +16 -3
- package/dist/components/editor/plugins/LinkWithMetaData/index.d.ts +20 -25
- package/dist/components/editor/plugins/MarkdownPastePlugin/index.d.ts +5 -0
- package/dist/components/editor/plugins/MarkdownTransformers/index.d.ts +2 -0
- package/dist/components/editor/plugins/SlashCommand/index.d.ts +18 -1
- package/dist/components/editor/plugins/SmartTypographyPlugin/index.d.ts +26 -0
- package/dist/components/editor/utils/aiStream.d.ts +27 -0
- package/dist/components/editor/utils/excalidrawDiagramBuilder.d.ts +29 -0
- package/dist/components/editor/utils/markdownTransformers.d.ts +4 -1
- package/dist/components/editor/utils/url.d.ts +16 -4
- package/dist/components/providers/AIContext.d.ts +8 -0
- package/dist/components/ui/equation/equationTypography.d.ts +23 -0
- package/dist/core/extension.d.ts +3 -1
- package/dist/core/extensions/blocks-kit.d.ts +22 -1
- package/dist/core/extensions/copilot-and-collab.d.ts +15 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/react/NotiqContent.d.ts +4 -1
- package/dist/core/react/NotiqEditor.d.ts +8 -8
- package/dist/core/react/index.d.ts +1 -0
- package/dist/core/react/node-renderers.d.ts +73 -0
- package/dist/core/types.d.ts +1 -0
- package/dist/core.js +18136 -9084
- package/dist/core.mjs +58 -44
- package/dist/hooks/instructions-messages.d.ts +13 -4
- package/dist/{image-TPW7PZZK.mjs → image-AL6PHM2A.mjs} +18 -13
- package/dist/index.js +15180 -12858
- package/dist/index.mjs +121 -1641
- package/dist/{insert-audio-C66RZRKY.mjs → insert-audio-CRWR7EO5.mjs} +6 -8
- package/dist/{insert-file-3DTGRO7W.mjs → insert-file-I73AZW3L.mjs} +6 -8
- package/dist/{insert-gif-FIMCCBAI.mjs → insert-gif-KWRC3ACT.mjs} +4 -4
- package/dist/{insert-image-CZV6HWQZ.mjs → insert-image-XIY6BGW5.mjs} +6 -5
- package/dist/{insert-poll-6BCIFY5G.mjs → insert-poll-J5YVZNZ4.mjs} +4 -3
- package/dist/{insert-table-ZRJP6X52.mjs → insert-table-OIMJRFFK.mjs} +1 -1
- package/dist/{poll-component-VHMM5KKZ.mjs → poll-component-TVHXIKGQ.mjs} +3 -2
- package/dist/react.js +17933 -9531
- package/dist/react.mjs +41 -34
- package/dist/{stepper-4AO5XMO7.mjs → stepper-ILF7YXTO.mjs} +64 -74
- package/dist/styles/notiq.css +1 -1
- package/package.json +2 -2
- package/src/styles/notiq.css +20 -0
- package/dist/AICommandBarPlugin-TADJ3X2Y.mjs +0 -12
- package/dist/CodeActionMenuPlugin-MRKY67ED.mjs +0 -14
- package/dist/CollaborationPlugin-TIZOQBUT.mjs +0 -405
- package/dist/CollaboratorsBar-TMKBOBJI.mjs +0 -20
- package/dist/CommentsPlugin-5M4RD6YO.mjs +0 -19
- package/dist/ExcalidrawPlugin-2SGPIQ6U.mjs +0 -14
- package/dist/ExportPlugin-OKZOLBGS.mjs +0 -42
- package/dist/FloatingLinkEditorPlugin-MABB34L7.mjs +0 -12
- package/dist/FloatingTextFormatToolbarPlugin-SO5VON7Q.mjs +0 -45
- package/dist/InlineCopilotPlugin-PNS5Y6OO.mjs +0 -360
- package/dist/MobileToolbar-JKP2MLQJ.mjs +0 -984
- package/dist/SlashCommand-2TNOOUBM.mjs +0 -39
- package/dist/TableCellActionMenuPlugin-YWBA64J7.mjs +0 -838
- package/dist/TableHoverActionsPlugin-2EIXHEXN.mjs +0 -265
- package/dist/TemplatePlugin-HNTPEXBB.mjs +0 -9
- package/dist/ToolbarPlugin-IIAOU4P5.mjs +0 -35
- package/dist/VersionHistoryPlugin-23MAZB4G.mjs +0 -371
- package/dist/background-color-OZJCBYCT.mjs +0 -425
- package/dist/block-format-MTSIXWID.mjs +0 -14
- package/dist/chunk-2KESP7OU.mjs +0 -809
- package/dist/chunk-3AHNLIME.mjs +0 -1701
- package/dist/chunk-3IILA3IP.mjs +0 -28
- package/dist/chunk-4DVIYZVB.mjs +0 -193
- package/dist/chunk-4FFTOZGJ.mjs +0 -103
- package/dist/chunk-4UMUPCDK.mjs +0 -68
- package/dist/chunk-6D6QLRYR.mjs +0 -238
- package/dist/chunk-6SRMKQSD.mjs +0 -682
- package/dist/chunk-ACV47ZKE.mjs +0 -201
- package/dist/chunk-AYNKORDO.mjs +0 -6
- package/dist/chunk-BGV62GC2.mjs +0 -26
- package/dist/chunk-D3IOUQFR.mjs +0 -441
- package/dist/chunk-EEBA6OAH.mjs +0 -59
- package/dist/chunk-EIZMKFHF.mjs +0 -32
- package/dist/chunk-EVPWKNE4.mjs +0 -27
- package/dist/chunk-FMJ7DGWP.mjs +0 -144
- package/dist/chunk-FYLRS4BG.mjs +0 -88
- package/dist/chunk-HOZ4QRFV.mjs +0 -536
- package/dist/chunk-IAFCQV3Z.mjs +0 -349
- package/dist/chunk-IU2N42JJ.mjs +0 -1763
- package/dist/chunk-J6ZUY5BY.mjs +0 -202
- package/dist/chunk-K5OAFEVY.mjs +0 -191
- package/dist/chunk-KDA7ZYMJ.mjs +0 -431
- package/dist/chunk-KXRLARGI.mjs +0 -26
- package/dist/chunk-LAUAYRPC.mjs +0 -944
- package/dist/chunk-LLCP7NVE.mjs +0 -449
- package/dist/chunk-LU2XWLOE.mjs +0 -219
- package/dist/chunk-MPTE332I.mjs +0 -787
- package/dist/chunk-MTQZWJHR.mjs +0 -111
- package/dist/chunk-OXWTZV3U.mjs +0 -174
- package/dist/chunk-PD5K4AGP.mjs +0 -64
- package/dist/chunk-PFH63ZU4.mjs +0 -33
- package/dist/chunk-PHRVYPVM.mjs +0 -808
- package/dist/chunk-R7WFRENU.mjs +0 -262
- package/dist/chunk-RAVYEEIC.mjs +0 -36
- package/dist/chunk-RJQTA6HG.mjs +0 -358
- package/dist/chunk-SAOJHVPE.mjs +0 -153
- package/dist/chunk-VGAX6YEY.mjs +0 -399
- package/dist/chunk-W6GAJXUS.mjs +0 -334
- package/dist/chunk-XYDBUQ6Z.mjs +0 -1978
- package/dist/chunk-XYT6XM5S.mjs +0 -496
- package/dist/chunk-YDDBQZ77.mjs +0 -409
- package/dist/chunk-YE7M2VKR.mjs +0 -132
- package/dist/chunk-Z6JAFF55.mjs +0 -555
- package/dist/chunk-ZKZ7MLSS.mjs +0 -165
- package/dist/color-23323E3B.mjs +0 -13
- package/dist/font-IJKFR4BM.mjs +0 -12
- package/dist/font-size-GTL6UVQL.mjs +0 -15
- package/dist/insert-node-MA3FXEYN.mjs +0 -245
- package/dist/table-dropdown-4VCRSQB6.mjs +0 -391
- package/dist/text-align-CSDLJUDA.mjs +0 -121
- package/dist/text-format-6L5N3CHZ.mjs +0 -15
package/dist/core/extension.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export declare class Extension<Options = any, Storage = any> {
|
|
|
9
9
|
subExtensions: Extension[];
|
|
10
10
|
constructor(config: ExtensionConfig<Options, Storage>, options?: Partial<Options>);
|
|
11
11
|
static create<Options = any, Storage = any>(config: ExtensionConfig<Options, Storage> & {
|
|
12
|
-
addExtensions?: (
|
|
12
|
+
addExtensions?: (context: {
|
|
13
|
+
options: Options;
|
|
14
|
+
}) => Extension[];
|
|
13
15
|
}): Extension<Options, Storage>;
|
|
14
16
|
configure(options?: Partial<Options>): Extension<Options, Storage>;
|
|
15
17
|
extend<ExtendedOptions = Options, ExtendedStorage = Storage>(extendedConfig: Partial<ExtensionConfig<ExtendedOptions, ExtendedStorage>>): Extension<ExtendedOptions, ExtendedStorage>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Extension } from "../extension";
|
|
2
|
+
import { type NotiqNodeRenderers } from "../react/node-renderers";
|
|
3
|
+
import { type SlashCommandPluginProps, type SlashCommandRenderProps } from "../../components/editor/plugins/SlashCommand";
|
|
4
|
+
import { type DraggableBlockPluginProps, type DraggableBlockRenderProps, type DraggableBlockTurnIntoType } from "../../components/editor/plugins/DraggableBlockPlugin";
|
|
2
5
|
export declare const Excalidraw: Extension<any, any>;
|
|
3
6
|
export declare const Figma: Extension<any, any>;
|
|
4
7
|
export declare const Equation: Extension<any, any>;
|
|
@@ -11,4 +14,22 @@ export declare const YouTube: Extension<any, any>;
|
|
|
11
14
|
export declare const Audio: Extension<any, any>;
|
|
12
15
|
export declare const File: Extension<any, any>;
|
|
13
16
|
export declare const ColumnsLayout: Extension<any, any>;
|
|
14
|
-
export
|
|
17
|
+
export type { SlashCommandPluginProps, SlashCommandRenderProps, DraggableBlockPluginProps, DraggableBlockRenderProps, DraggableBlockTurnIntoType, NotiqNodeRenderers, };
|
|
18
|
+
export type SlashMenuOptions = SlashCommandPluginProps;
|
|
19
|
+
export type BlockHandleOptions = DraggableBlockPluginProps;
|
|
20
|
+
export declare const SlashMenu: Extension<SlashCommandPluginProps, any>;
|
|
21
|
+
export declare const BlockHandle: Extension<DraggableBlockPluginProps, any>;
|
|
22
|
+
export interface BlocksKitOptions {
|
|
23
|
+
/** When true, suppresses default UI for SlashMenu and BlockHandle. */
|
|
24
|
+
headless?: boolean;
|
|
25
|
+
/** Configure or disable the SlashMenu extension. */
|
|
26
|
+
slashMenu?: boolean | SlashMenuOptions;
|
|
27
|
+
/** Configure or disable the BlockHandle (DraggableBlockPlugin) extension. */
|
|
28
|
+
handles?: boolean | BlockHandleOptions;
|
|
29
|
+
/** Custom React renderers for rich decorator nodes (hint, excalidraw, poll, image, inlineImage). */
|
|
30
|
+
renderers?: NotiqNodeRenderers;
|
|
31
|
+
}
|
|
32
|
+
export declare const NodeRenderers: Extension<{
|
|
33
|
+
renderers: NotiqNodeRenderers;
|
|
34
|
+
}, any>;
|
|
35
|
+
export declare const BlocksKit: Extension<BlocksKitOptions, any>;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { Extension } from "../extension";
|
|
2
|
-
|
|
3
|
+
import { type AICommandBarRenderProps } from "../../components/editor/plugins/AICommandBarPlugin";
|
|
4
|
+
import { type InlineCopilotRenderProps } from "../../components/editor/plugins/InlineCopilotPlugin";
|
|
5
|
+
export type { AICommandBarRenderProps, InlineCopilotRenderProps };
|
|
6
|
+
export interface AICommandBarOptions {
|
|
7
|
+
headless?: boolean;
|
|
8
|
+
apiEndpoint?: string;
|
|
9
|
+
render?: (state: AICommandBarRenderProps) => React.ReactNode;
|
|
10
|
+
onStateChange?: (state: AICommandBarRenderProps) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const AICommandBar: Extension<AICommandBarOptions, any>;
|
|
3
13
|
export interface AICopilotOptions {
|
|
4
14
|
enabled?: boolean;
|
|
15
|
+
headless?: boolean;
|
|
16
|
+
render?: (state: InlineCopilotRenderProps) => React.ReactNode;
|
|
17
|
+
onStateChange?: (state: InlineCopilotRenderProps) => void;
|
|
18
|
+
commandBar?: AICommandBarOptions;
|
|
5
19
|
}
|
|
6
20
|
export declare const AICopilot: Extension<AICopilotOptions, any>;
|
|
7
21
|
export interface CollaborationOptions {
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type { NotiqEditor, NotiqEditorOptions, NotiqEventType, NotiqEventListener, NotiqEventData, ExtensionConfig, ExtensionContext, ChainedCommands, CanCommands, CommandFunction, SelectionType, } from "./types";
|
|
1
|
+
export type { NotiqEditor as NotiqEditorInstance, NotiqEditorOptions, NotiqEventType, NotiqEventListener, NotiqEventData, ExtensionConfig, ExtensionContext, ChainedCommands, CanCommands, CommandFunction, SelectionType, } from "./types";
|
|
2
|
+
export type { NotiqEditor } from "./types";
|
|
2
3
|
export * from "./extension";
|
|
3
4
|
export * from "./chain";
|
|
4
5
|
export * from "./editor";
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { NotiqEditor } from "../types";
|
|
3
|
+
import { type NotiqNodeRenderers } from "./node-renderers";
|
|
3
4
|
export interface NotiqContentProps {
|
|
4
5
|
editor?: NotiqEditor | null;
|
|
5
6
|
className?: string;
|
|
6
7
|
containerClassName?: string;
|
|
7
8
|
placeholder?: React.ReactNode | string;
|
|
8
9
|
renderPlugins?: boolean;
|
|
10
|
+
/** Custom React renderers for rich decorator nodes (hint, excalidraw, poll, image, inlineImage). */
|
|
11
|
+
renderers?: NotiqNodeRenderers;
|
|
9
12
|
children?: React.ReactNode;
|
|
10
13
|
}
|
|
11
|
-
export declare function NotiqContent({ editor: propEditor, className, containerClassName, placeholder, renderPlugins, children, }: NotiqContentProps): React.JSX.Element | null;
|
|
14
|
+
export declare function NotiqContent({ editor: propEditor, className, containerClassName, placeholder, renderPlugins, renderers, children, }: NotiqContentProps): React.JSX.Element | null;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { ToolbarConfig } from "../../components/editor";
|
|
2
|
+
import { type ToolbarConfig } from "../../components/editor";
|
|
3
|
+
import type { CollabConfig } from "../../components/providers/CollabContext";
|
|
4
|
+
import type { AIConfig } from "../../components/providers/AIContext";
|
|
5
|
+
import type { UploadConfig } from "../../components/providers/UploadContext";
|
|
7
6
|
export interface NotiqEditorProps {
|
|
8
7
|
content?: string | Record<string, any>;
|
|
9
8
|
extensions?: any[];
|
|
@@ -17,13 +16,14 @@ export interface NotiqEditorProps {
|
|
|
17
16
|
uploadConfig?: UploadConfig;
|
|
18
17
|
className?: string;
|
|
19
18
|
editorClassName?: string;
|
|
19
|
+
onChange?: (editorState: any, editor: any) => void;
|
|
20
20
|
onUpdate?: (event: {
|
|
21
|
-
editor:
|
|
21
|
+
editor: any;
|
|
22
22
|
markdown: string;
|
|
23
23
|
json: any;
|
|
24
24
|
html: string;
|
|
25
25
|
}) => void;
|
|
26
|
-
onEditorReady?: (editor:
|
|
26
|
+
onEditorReady?: (editor: any) => void;
|
|
27
27
|
children?: React.ReactNode;
|
|
28
28
|
}
|
|
29
|
-
export declare function NotiqEditor({ content,
|
|
29
|
+
export declare function NotiqEditor({ content, editable, toolbarConfig, collabConfig, aiConfig, uploadConfig, className, editorClassName, onChange, onUpdate, onEditorReady, children, }: NotiqEditorProps): React.JSX.Element;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LexicalEditor, NodeKey } from "lexical";
|
|
3
|
+
export type HintRendererVariant = "info" | "warning" | "tip" | "danger" | "note" | "success" | string;
|
|
4
|
+
export interface HintRendererProps {
|
|
5
|
+
type: HintRendererVariant;
|
|
6
|
+
emoji?: string;
|
|
7
|
+
captionEditor: LexicalEditor;
|
|
8
|
+
nodeKey: NodeKey;
|
|
9
|
+
}
|
|
10
|
+
export interface ExcalidrawRendererProps {
|
|
11
|
+
nodeKey: NodeKey;
|
|
12
|
+
data: string;
|
|
13
|
+
width: number | "inherit";
|
|
14
|
+
height: number | "inherit";
|
|
15
|
+
}
|
|
16
|
+
export interface PollRendererOption {
|
|
17
|
+
readonly text: string;
|
|
18
|
+
readonly uid: string;
|
|
19
|
+
readonly votes: Array<string>;
|
|
20
|
+
}
|
|
21
|
+
export interface PollRendererProps {
|
|
22
|
+
question: string;
|
|
23
|
+
options: ReadonlyArray<PollRendererOption>;
|
|
24
|
+
nodeKey: NodeKey;
|
|
25
|
+
}
|
|
26
|
+
export interface ImageRendererProps {
|
|
27
|
+
src: string;
|
|
28
|
+
altText: string;
|
|
29
|
+
width: "inherit" | number;
|
|
30
|
+
height: "inherit" | number;
|
|
31
|
+
maxWidth: number;
|
|
32
|
+
nodeKey: NodeKey;
|
|
33
|
+
showCaption: boolean;
|
|
34
|
+
caption: LexicalEditor;
|
|
35
|
+
captionsEnabled: boolean;
|
|
36
|
+
resizable: boolean;
|
|
37
|
+
rounded?: boolean | number;
|
|
38
|
+
alignment?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface InlineImageRendererProps {
|
|
41
|
+
src: string;
|
|
42
|
+
altText: string;
|
|
43
|
+
width: "inherit" | number;
|
|
44
|
+
height: "inherit" | number;
|
|
45
|
+
nodeKey: NodeKey;
|
|
46
|
+
showCaption: boolean;
|
|
47
|
+
caption: LexicalEditor;
|
|
48
|
+
position: "left" | "right" | "full" | undefined;
|
|
49
|
+
}
|
|
50
|
+
export interface NotiqNodeRendererMap {
|
|
51
|
+
hint: HintRendererProps;
|
|
52
|
+
excalidraw: ExcalidrawRendererProps;
|
|
53
|
+
poll: PollRendererProps;
|
|
54
|
+
image: ImageRendererProps;
|
|
55
|
+
inlineImage: InlineImageRendererProps;
|
|
56
|
+
}
|
|
57
|
+
export type NotiqNodeRenderers = {
|
|
58
|
+
[K in keyof NotiqNodeRendererMap]?: React.ComponentType<NotiqNodeRendererMap[K]>;
|
|
59
|
+
};
|
|
60
|
+
export declare function setEditorNodeRenderers(editor: LexicalEditor, renderers: NotiqNodeRenderers): void;
|
|
61
|
+
export declare function getEditorNodeRenderers(editor: LexicalEditor): NotiqNodeRenderers | undefined;
|
|
62
|
+
export declare function clearEditorNodeRenderers(editor: LexicalEditor): void;
|
|
63
|
+
export interface NotiqNodeRendererProviderProps {
|
|
64
|
+
renderers: NotiqNodeRenderers;
|
|
65
|
+
children: React.ReactNode;
|
|
66
|
+
}
|
|
67
|
+
export declare function NotiqNodeRendererProvider({ renderers, children, }: NotiqNodeRendererProviderProps): React.JSX.Element;
|
|
68
|
+
export declare function useNotiqNodeRenderers(): NotiqNodeRenderers;
|
|
69
|
+
export declare function NodeRendererSlot<K extends keyof NotiqNodeRendererMap>({ nodeType, rendererProps, fallback, }: {
|
|
70
|
+
nodeType: K;
|
|
71
|
+
rendererProps: NotiqNodeRendererMap[K];
|
|
72
|
+
fallback: React.ReactNode;
|
|
73
|
+
}): React.JSX.Element;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export interface ExtensionConfig<Options = any, Storage = any> {
|
|
|
36
36
|
export interface NotiqEditorOptions {
|
|
37
37
|
extensions?: any[];
|
|
38
38
|
content?: string | SerializedEditorState | Record<string, any>;
|
|
39
|
+
theme?: any;
|
|
39
40
|
editable?: boolean;
|
|
40
41
|
autofocus?: boolean | "start" | "end" | "all";
|
|
41
42
|
placeholder?: string | React.ReactNode;
|