@collabchron/notiq 1.1.12 → 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-RHRYHSVN.mjs → AIDialog-HJW6PQPR.mjs} +11 -12
- 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-BMSYIPP6.mjs → ExcalidrawComponent-POMYXDSG.mjs} +33 -6
- 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-JN4ZPZOW.mjs → StoryBuilderComponent-CBRFPFTR.mjs} +8 -9
- package/dist/{chunk-6UVNHT3T.mjs → chunk-4SYRK2NH.mjs} +23 -1
- package/dist/chunk-5CJZC5IB.mjs +9086 -0
- package/dist/{chunk-FO7M3X2B.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-ZYJ7KABY.mjs → chunk-CQCS5YPS.mjs} +3 -5
- package/dist/{chunk-T2UBAZ66.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-ELBTVBTS.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-QNIY45SF.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-5D4JF3ZZ.mjs → chunk-XAJ4GACN.mjs} +171 -49
- package/dist/{chunk-7QRJVZQY.mjs → chunk-YVUQRJVV.mjs} +63 -18
- package/dist/components/editor/index.d.ts +1 -1
- 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/react/NotiqContent.d.ts +4 -1
- package/dist/core/react/index.d.ts +1 -0
- package/dist/core/react/node-renderers.d.ts +73 -0
- package/dist/core.js +15429 -13116
- package/dist/core.mjs +47 -39
- package/dist/hooks/instructions-messages.d.ts +13 -4
- package/dist/{image-QPB2CVXP.mjs → image-AL6PHM2A.mjs} +17 -12
- package/dist/index.js +15526 -13194
- package/dist/index.mjs +64 -60
- package/dist/{insert-audio-I3PD6JFS.mjs → insert-audio-CRWR7EO5.mjs} +4 -6
- package/dist/{insert-file-PHR7XL4V.mjs → insert-file-I73AZW3L.mjs} +4 -6
- package/dist/{insert-gif-R5ZO4JHC.mjs → insert-gif-KWRC3ACT.mjs} +1 -1
- package/dist/{insert-image-PLBZELHK.mjs → insert-image-XIY6BGW5.mjs} +4 -3
- 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 +14747 -12554
- package/dist/react.mjs +40 -38
- package/dist/{stepper-KNITDVLG.mjs → stepper-ILF7YXTO.mjs} +63 -73
- 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-FGH6HZLL.mjs +0 -14
- package/dist/CollaborationPlugin-TIZOQBUT.mjs +0 -405
- package/dist/CollaboratorsBar-AMPIAUOY.mjs +0 -20
- package/dist/CommentsPlugin-SDJJTUGK.mjs +0 -19
- package/dist/ExcalidrawPlugin-QLPGJPSX.mjs +0 -14
- package/dist/ExportPlugin-MJHYKQZJ.mjs +0 -43
- package/dist/FloatingLinkEditorPlugin-MABB34L7.mjs +0 -12
- package/dist/FloatingTextFormatToolbarPlugin-BXCPN3KD.mjs +0 -45
- package/dist/InlineCopilotPlugin-PNS5Y6OO.mjs +0 -360
- package/dist/MobileToolbar-KV5DX4ED.mjs +0 -982
- package/dist/SlashCommand-SPR7G5EI.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-F52PVNXU.mjs +0 -823
- package/dist/VersionHistoryPlugin-YWGCREKA.mjs +0 -371
- package/dist/background-color-RW5JYLMG.mjs +0 -425
- package/dist/block-format-TODFREE2.mjs +0 -14
- package/dist/chunk-22ZIL6NH.mjs +0 -88
- package/dist/chunk-2LNT36RL.mjs +0 -555
- package/dist/chunk-37LC44W3.mjs +0 -2677
- 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-6FQFPPLG.mjs +0 -785
- package/dist/chunk-ACV47ZKE.mjs +0 -201
- package/dist/chunk-BGV62GC2.mjs +0 -26
- package/dist/chunk-C4JWLBYN.mjs +0 -132
- package/dist/chunk-CLRSETYQ.mjs +0 -431
- package/dist/chunk-D3IOUQFR.mjs +0 -441
- package/dist/chunk-EEBA6OAH.mjs +0 -59
- package/dist/chunk-EIZMKFHF.mjs +0 -32
- package/dist/chunk-ENH2IOHI.mjs +0 -1828
- package/dist/chunk-EVPWKNE4.mjs +0 -27
- package/dist/chunk-HOZ4QRFV.mjs +0 -536
- package/dist/chunk-IAFCQV3Z.mjs +0 -349
- package/dist/chunk-J6ZUY5BY.mjs +0 -202
- package/dist/chunk-K5OAFEVY.mjs +0 -191
- package/dist/chunk-KXRLARGI.mjs +0 -26
- package/dist/chunk-LBGM4VVZ.mjs +0 -409
- package/dist/chunk-LLGVCM7M.mjs +0 -809
- package/dist/chunk-LU2XWLOE.mjs +0 -219
- package/dist/chunk-LVRJM45C.mjs +0 -171
- package/dist/chunk-MSAO3YFB.mjs +0 -144
- package/dist/chunk-N3KDPSRI.mjs +0 -496
- package/dist/chunk-OXWTZV3U.mjs +0 -174
- package/dist/chunk-PD5K4AGP.mjs +0 -64
- package/dist/chunk-PFH63ZU4.mjs +0 -33
- 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-SYUCM5G5.mjs +0 -111
- package/dist/chunk-VGAX6YEY.mjs +0 -399
- package/dist/chunk-VNDDDXGH.mjs +0 -682
- package/dist/chunk-WUVIQCX7.mjs +0 -944
- package/dist/chunk-XNJNT6PC.mjs +0 -1701
- package/dist/chunk-XYLTLGY5.mjs +0 -775
- package/dist/chunk-ZKZ7MLSS.mjs +0 -165
- package/dist/color-S55XFDYQ.mjs +0 -13
- package/dist/font-IJKFR4BM.mjs +0 -12
- package/dist/font-size-3HMJHKO2.mjs +0 -15
- package/dist/insert-node-DGCZBGKG.mjs +0 -243
- package/dist/table-dropdown-4VCRSQB6.mjs +0 -391
- package/dist/text-align-TEB4S52S.mjs +0 -121
- package/dist/text-format-T3IY7FBI.mjs +0 -15
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NodeRendererSlot
|
|
3
|
+
} from "./chunk-RNEIJRUS.mjs";
|
|
1
4
|
import {
|
|
2
5
|
__spreadProps,
|
|
3
6
|
__spreadValues,
|
|
@@ -10,24 +13,32 @@ import {
|
|
|
10
13
|
createCommand,
|
|
11
14
|
createEditor,
|
|
12
15
|
DecoratorNode,
|
|
16
|
+
ParagraphNode,
|
|
17
|
+
TextNode,
|
|
13
18
|
$getSelection,
|
|
14
19
|
$isRangeSelection,
|
|
15
20
|
COMMAND_PRIORITY_LOW
|
|
16
21
|
} from "lexical";
|
|
22
|
+
import { LinkNode } from "@lexical/link";
|
|
23
|
+
import { $generateHtmlFromNodes } from "@lexical/html";
|
|
17
24
|
import React, { Suspense, useEffect } from "react";
|
|
18
25
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
19
26
|
import { jsx } from "react/jsx-runtime";
|
|
20
|
-
var HintComponent = React.lazy(() => import("./HintComponet-
|
|
27
|
+
var HintComponent = React.lazy(() => import("./HintComponet-QXL5ESND.mjs"));
|
|
21
28
|
var Hint = class _Hint extends DecoratorNode {
|
|
22
29
|
constructor(variant = "tip", emojiOrCaption, caption, key) {
|
|
23
30
|
super(key);
|
|
24
31
|
this.__variant = variant;
|
|
25
32
|
let initialEditor;
|
|
26
|
-
if (
|
|
27
|
-
this.__emoji = emojiOrCaption;
|
|
33
|
+
if (caption) {
|
|
28
34
|
initialEditor = caption;
|
|
29
|
-
|
|
35
|
+
if (typeof emojiOrCaption === "string") {
|
|
36
|
+
this.__emoji = emojiOrCaption;
|
|
37
|
+
}
|
|
38
|
+
} else if (emojiOrCaption && typeof emojiOrCaption !== "string") {
|
|
30
39
|
initialEditor = emojiOrCaption;
|
|
40
|
+
} else if (typeof emojiOrCaption === "string") {
|
|
41
|
+
this.__emoji = emojiOrCaption;
|
|
31
42
|
}
|
|
32
43
|
if (!initialEditor) {
|
|
33
44
|
const initialEditorState = {
|
|
@@ -61,7 +72,9 @@ var Hint = class _Hint extends DecoratorNode {
|
|
|
61
72
|
version: 1
|
|
62
73
|
}
|
|
63
74
|
};
|
|
64
|
-
const newEditor = createEditor(
|
|
75
|
+
const newEditor = createEditor({
|
|
76
|
+
nodes: [ParagraphNode, TextNode, LinkNode]
|
|
77
|
+
});
|
|
65
78
|
const parsedEditorState = newEditor.parseEditorState(JSON.stringify(initialEditorState));
|
|
66
79
|
newEditor.setEditorState(parsedEditorState);
|
|
67
80
|
this.__caption = newEditor;
|
|
@@ -76,11 +89,12 @@ var Hint = class _Hint extends DecoratorNode {
|
|
|
76
89
|
return new _Hint(node.__variant, node.__emoji, node.__caption, node.__key);
|
|
77
90
|
}
|
|
78
91
|
static importJSON(serializedNode) {
|
|
79
|
-
|
|
92
|
+
const hint = new _Hint(
|
|
80
93
|
serializedNode.variant || "tip",
|
|
81
94
|
serializedNode.emoji,
|
|
82
95
|
void 0
|
|
83
|
-
)
|
|
96
|
+
);
|
|
97
|
+
return hint.updateFromJSON(serializedNode);
|
|
84
98
|
}
|
|
85
99
|
setVariant(variant) {
|
|
86
100
|
const self = this.getWritable();
|
|
@@ -97,6 +111,24 @@ var Hint = class _Hint extends DecoratorNode {
|
|
|
97
111
|
element.className = `hint-${this.__variant || "tip"}`;
|
|
98
112
|
return element;
|
|
99
113
|
}
|
|
114
|
+
exportDOM(editor) {
|
|
115
|
+
const element = document.createElement("div");
|
|
116
|
+
element.className = `notiq-callout notiq-callout-${this.__variant || "tip"}`;
|
|
117
|
+
element.setAttribute("data-callout-type", this.__variant || "tip");
|
|
118
|
+
if (this.__emoji) {
|
|
119
|
+
element.setAttribute("data-callout-emoji", this.__emoji);
|
|
120
|
+
}
|
|
121
|
+
let html = "";
|
|
122
|
+
try {
|
|
123
|
+
this.__caption.getEditorState().read(() => {
|
|
124
|
+
html = $generateHtmlFromNodes(this.__caption, null);
|
|
125
|
+
});
|
|
126
|
+
} catch (e) {
|
|
127
|
+
html = "";
|
|
128
|
+
}
|
|
129
|
+
element.innerHTML = html;
|
|
130
|
+
return { element };
|
|
131
|
+
}
|
|
100
132
|
updateFromJSON(serializedNode) {
|
|
101
133
|
var _a;
|
|
102
134
|
super.updateFromJSON(serializedNode);
|
|
@@ -104,10 +136,11 @@ var Hint = class _Hint extends DecoratorNode {
|
|
|
104
136
|
this.__emoji = serializedNode.emoji;
|
|
105
137
|
const nestedEditor = this.__caption;
|
|
106
138
|
if ((_a = serializedNode.caption) == null ? void 0 : _a.editorState) {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
139
|
+
const raw = serializedNode.caption.editorState;
|
|
140
|
+
const editorState = nestedEditor.parseEditorState(
|
|
141
|
+
typeof raw === "string" ? raw : JSON.stringify(raw)
|
|
142
|
+
);
|
|
143
|
+
nestedEditor.setEditorState(editorState);
|
|
111
144
|
}
|
|
112
145
|
return this;
|
|
113
146
|
}
|
|
@@ -123,15 +156,27 @@ var Hint = class _Hint extends DecoratorNode {
|
|
|
123
156
|
return false;
|
|
124
157
|
}
|
|
125
158
|
decorate() {
|
|
126
|
-
return /* @__PURE__ */ jsx(
|
|
127
|
-
|
|
159
|
+
return /* @__PURE__ */ jsx(
|
|
160
|
+
NodeRendererSlot,
|
|
128
161
|
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
162
|
+
nodeType: "hint",
|
|
163
|
+
rendererProps: {
|
|
164
|
+
type: this.__variant,
|
|
165
|
+
emoji: this.__emoji,
|
|
166
|
+
captionEditor: this.__caption,
|
|
167
|
+
nodeKey: this.getKey()
|
|
168
|
+
},
|
|
169
|
+
fallback: /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
170
|
+
HintComponent,
|
|
171
|
+
{
|
|
172
|
+
type: this.__variant,
|
|
173
|
+
emoji: this.__emoji,
|
|
174
|
+
captionEditor: this.__caption,
|
|
175
|
+
nodeKey: this.getKey()
|
|
176
|
+
}
|
|
177
|
+
) })
|
|
133
178
|
}
|
|
134
|
-
)
|
|
179
|
+
);
|
|
135
180
|
}
|
|
136
181
|
};
|
|
137
182
|
function $isHintNode(node) {
|
|
@@ -6,7 +6,7 @@ import CollaboratorsBar, { OfflineBanner } from "./plugins/CollaborationPlugin/C
|
|
|
6
6
|
import { type AIConfig } from "../providers/AIContext";
|
|
7
7
|
import { type UploadConfig } from "../providers/UploadContext";
|
|
8
8
|
export { CollaboratorsBar, OfflineBanner, CollabProvider, useCollab, type CollabConfig, type CollabUser, type CollabConnectionStatus, CommentsProvider, useComments, type CommentThread, VersionHistoryProvider, useVersionHistory, type DocumentVersion, };
|
|
9
|
-
export type ToolbarItem = "undo" | "redo" | "block-format" | "font-family" | "font-size" | "bold" | "italic" | "underline" | "code" | "link" | "table" | "color" | "bg-color" | "text-format" | "insert" | "align" | "speech" | "template" | "download" | "export-md" | "export-pdf" | "separator";
|
|
9
|
+
export type ToolbarItem = "undo" | "redo" | "ai" | "block-format" | "font-family" | "font-size" | "bold" | "italic" | "underline" | "code" | "link" | "table" | "color" | "bg-color" | "text-format" | "insert" | "align" | "speech" | "template" | "download" | "export-md" | "export-pdf" | "separator";
|
|
10
10
|
export type ToolbarConfig = {
|
|
11
11
|
items?: ToolbarItem[];
|
|
12
12
|
className?: string;
|
|
@@ -24,6 +24,7 @@ export declare class EquationNode extends DecoratorNode<JSX.Element> {
|
|
|
24
24
|
exportDOM(): DOMExportOutput;
|
|
25
25
|
static importDOM(): DOMConversionMap | null;
|
|
26
26
|
updateDOM(prevNode: this): boolean;
|
|
27
|
+
isInline(): boolean;
|
|
27
28
|
getTextContent(): string;
|
|
28
29
|
getEquation(): string;
|
|
29
30
|
setEquation(equation: string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DecoratorNode, LexicalCommand, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from "lexical";
|
|
1
|
+
import { DecoratorNode, DOMExportOutput, LexicalCommand, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from "lexical";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export type HintType = "hint" | "note" | "info" | "tip" | "important" | "warning" | "caution" | "error" | "success" | "neutral";
|
|
4
4
|
export type SerializedHint = Spread<{
|
|
@@ -18,6 +18,7 @@ export declare class Hint extends DecoratorNode<React.ReactElement> {
|
|
|
18
18
|
setVariant(variant: HintType): this;
|
|
19
19
|
setEmoji(emoji?: string): this;
|
|
20
20
|
createDOM(): HTMLElement;
|
|
21
|
+
exportDOM(editor: LexicalEditor): DOMExportOutput;
|
|
21
22
|
updateFromJSON(serializedNode: SerializedHint): this;
|
|
22
23
|
exportJSON(): SerializedHint;
|
|
23
24
|
updateDOM(): false;
|
|
@@ -4,4 +4,76 @@ export declare const OPEN_AI_COMMAND_BAR_COMMAND: LexicalCommand<{
|
|
|
4
4
|
initialPrompt?: string;
|
|
5
5
|
action?: string;
|
|
6
6
|
} | void>;
|
|
7
|
-
|
|
7
|
+
type AIPhase = "closed" | "prompt" | "streaming" | "review";
|
|
8
|
+
export interface ResearchSource {
|
|
9
|
+
title: string;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Splits `<thinking>...</thinking>` reasoning blocks and `<!--SOURCES:[...]-->`
|
|
14
|
+
* metadata out of a streaming AI response so they never pollute the editor canvas.
|
|
15
|
+
*/
|
|
16
|
+
export declare function extractThinkingAndSources(raw: string): {
|
|
17
|
+
thinking: string;
|
|
18
|
+
sources: ResearchSource[];
|
|
19
|
+
content: string;
|
|
20
|
+
};
|
|
21
|
+
interface AIPreset {
|
|
22
|
+
id: string;
|
|
23
|
+
action: string;
|
|
24
|
+
label: string;
|
|
25
|
+
keywords: string[];
|
|
26
|
+
prompt?: string;
|
|
27
|
+
icon: React.ComponentType<{
|
|
28
|
+
className?: string;
|
|
29
|
+
}>;
|
|
30
|
+
badge?: string;
|
|
31
|
+
hasSubmenu?: "tone" | "language";
|
|
32
|
+
think?: boolean;
|
|
33
|
+
research?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface AICommandBarRenderProps {
|
|
36
|
+
phase: AIPhase;
|
|
37
|
+
coords: {
|
|
38
|
+
top: number;
|
|
39
|
+
left: number;
|
|
40
|
+
} | null;
|
|
41
|
+
prompt: string;
|
|
42
|
+
setPrompt: (value: string) => void;
|
|
43
|
+
followUpPrompt: string;
|
|
44
|
+
setFollowUpPrompt: (value: string) => void;
|
|
45
|
+
selectedText: string;
|
|
46
|
+
streamedText: string;
|
|
47
|
+
thinking: string;
|
|
48
|
+
sources: ResearchSource[];
|
|
49
|
+
content: string;
|
|
50
|
+
thinkEnabled: boolean;
|
|
51
|
+
setThinkEnabled: (value: boolean) => void;
|
|
52
|
+
researchEnabled: boolean;
|
|
53
|
+
setResearchEnabled: (value: boolean) => void;
|
|
54
|
+
activeLabel: string;
|
|
55
|
+
errorMsg: string | null;
|
|
56
|
+
presets: AIPreset[];
|
|
57
|
+
open: (payload?: {
|
|
58
|
+
initialPrompt?: string;
|
|
59
|
+
action?: string;
|
|
60
|
+
}) => void;
|
|
61
|
+
close: () => void;
|
|
62
|
+
runAction: (action: string, contextText: string, customQuestion?: string, label?: string, options?: {
|
|
63
|
+
think?: boolean;
|
|
64
|
+
research?: boolean;
|
|
65
|
+
}) => Promise<void>;
|
|
66
|
+
executePreset: (preset: AIPreset) => void;
|
|
67
|
+
accept: () => void;
|
|
68
|
+
discard: () => void;
|
|
69
|
+
retry: () => void;
|
|
70
|
+
stopStreaming: () => void;
|
|
71
|
+
}
|
|
72
|
+
export interface AICommandBarPluginProps {
|
|
73
|
+
headless?: boolean;
|
|
74
|
+
apiEndpoint?: string;
|
|
75
|
+
render?: (state: AICommandBarRenderProps) => React.ReactNode;
|
|
76
|
+
onStateChange?: (state: AICommandBarRenderProps) => void;
|
|
77
|
+
}
|
|
78
|
+
export default function AICommandBarPlugin({ headless, apiEndpoint: propApiEndpoint, render, onStateChange, }?: AICommandBarPluginProps): React.JSX.Element | null;
|
|
79
|
+
export {};
|
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
import { JSX } from "react";
|
|
2
|
-
export
|
|
1
|
+
import React, { JSX } from "react";
|
|
2
|
+
export type DraggableBlockTurnIntoType = "h1" | "h2" | "h3" | "quote" | "code" | "bullet" | "number";
|
|
3
|
+
export interface DraggableBlockRenderProps {
|
|
4
|
+
menuRef: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
targetLineRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
isMenuOpen: boolean;
|
|
7
|
+
setIsMenuOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
insertBelow: () => void;
|
|
9
|
+
turnInto: (type: DraggableBlockTurnIntoType) => void;
|
|
10
|
+
splitColumns: (columns: 2 | 3) => void;
|
|
11
|
+
duplicate: () => void;
|
|
12
|
+
remove: () => void;
|
|
13
|
+
askAI: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface DraggableBlockPluginProps {
|
|
3
16
|
anchorElem?: HTMLElement;
|
|
4
17
|
className?: string;
|
|
5
|
-
|
|
18
|
+
/** When true, suppresses the default React/Tailwind/Radix handle & menu UI. */
|
|
19
|
+
headless?: boolean;
|
|
20
|
+
/** Custom renderer for the block handle/menu. Receives refs and block action helpers. */
|
|
21
|
+
render?: (state: DraggableBlockRenderProps) => React.ReactNode;
|
|
22
|
+
/** Custom renderer for the drop indicator target line. */
|
|
23
|
+
renderTargetLine?: (targetLineRef: React.RefObject<HTMLDivElement | null>) => React.ReactNode;
|
|
24
|
+
/** Callback fired when handle menu state changes. */
|
|
25
|
+
onStateChange?: (state: DraggableBlockRenderProps) => void;
|
|
26
|
+
}
|
|
27
|
+
export default function DraggableBlockPlugin({ anchorElem, className, headless, render, renderTargetLine, onStateChange, }?: DraggableBlockPluginProps): JSX.Element | null;
|
|
@@ -6,6 +6,21 @@ export interface CaretCoordinates {
|
|
|
6
6
|
maxWidth: number;
|
|
7
7
|
isNextLine: boolean;
|
|
8
8
|
}
|
|
9
|
+
export interface InlineCopilotRenderProps {
|
|
10
|
+
isEnabled: boolean;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
suggestion: string | null;
|
|
13
|
+
caretCoords: CaretCoordinates | null;
|
|
14
|
+
accept: () => void;
|
|
15
|
+
reject: () => void;
|
|
16
|
+
toggleEnabled: () => void;
|
|
17
|
+
}
|
|
18
|
+
export interface InlineCopilotPluginProps {
|
|
19
|
+
enabledDefault?: boolean;
|
|
20
|
+
headless?: boolean;
|
|
21
|
+
render?: (state: InlineCopilotRenderProps) => React.ReactNode;
|
|
22
|
+
onStateChange?: (state: InlineCopilotRenderProps) => void;
|
|
23
|
+
}
|
|
9
24
|
/**
|
|
10
25
|
* Pure helper function to compute safe, non-overflowing positioning for AI copilot ghost text.
|
|
11
26
|
*/
|
|
@@ -27,6 +42,4 @@ export declare function computeCopilotPositioning({ caretRect, rootRect, padding
|
|
|
27
42
|
suggestionText: string;
|
|
28
43
|
rightObstacleLeft?: number;
|
|
29
44
|
}): CaretCoordinates;
|
|
30
|
-
export default function InlineCopilotPlugin({ enabledDefault, }:
|
|
31
|
-
enabledDefault?: boolean;
|
|
32
|
-
}): React.JSX.Element;
|
|
45
|
+
export default function InlineCopilotPlugin({ enabledDefault, headless, render, onStateChange, }: InlineCopilotPluginProps): React.JSX.Element | null;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { ElementNode, LexicalEditor, LexicalNode, NodeKey } from "lexical";
|
|
1
|
+
import { DOMExportOutput, EditorConfig, ElementNode, LexicalCommand, LexicalEditor, LexicalNode, NodeKey } from "lexical";
|
|
2
|
+
import { Metadata } from "../../utils/url";
|
|
2
3
|
export declare class LinkWithMetaDataNode extends ElementNode {
|
|
3
4
|
__url: string | null;
|
|
4
|
-
__metadata:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
image?: string | undefined | null;
|
|
8
|
-
website: string;
|
|
9
|
-
} | null;
|
|
10
|
-
__editor: LexicalEditor;
|
|
11
|
-
constructor(url: string | null, editor: LexicalEditor, key?: NodeKey);
|
|
5
|
+
__metadata: Metadata | null;
|
|
6
|
+
__editor?: LexicalEditor;
|
|
7
|
+
constructor(url: string | null, editor?: LexicalEditor, metadata?: Metadata | null, key?: NodeKey);
|
|
12
8
|
static clone(node: LinkWithMetaDataNode): LinkWithMetaDataNode;
|
|
13
9
|
static importJSON(serializedNode: any): LinkWithMetaDataNode;
|
|
14
10
|
exportJSON(): {
|
|
@@ -21,26 +17,25 @@ export declare class LinkWithMetaDataNode extends ElementNode {
|
|
|
21
17
|
$?: Record<string, unknown>;
|
|
22
18
|
$slots?: Record<string, import("lexical").SerializedLexicalNode>;
|
|
23
19
|
url: string | null;
|
|
24
|
-
metadata:
|
|
25
|
-
title: string;
|
|
26
|
-
description: string;
|
|
27
|
-
image?: string | undefined | null;
|
|
28
|
-
website: string;
|
|
29
|
-
} | null;
|
|
20
|
+
metadata: Metadata | null;
|
|
30
21
|
type: string;
|
|
31
22
|
version: number;
|
|
32
23
|
};
|
|
33
24
|
static getType(): string;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
createDOM(): HTMLElement;
|
|
25
|
+
isInline(): boolean;
|
|
26
|
+
canBeEmpty(): boolean;
|
|
27
|
+
isKeyboardSelectable(): boolean;
|
|
28
|
+
setMetadata(metadata: Metadata): void;
|
|
29
|
+
getMetadata(): Metadata | null;
|
|
30
|
+
getUrl(): string | null;
|
|
31
|
+
createDOM(config?: EditorConfig, editor?: LexicalEditor): HTMLElement;
|
|
41
32
|
updateDOM(prevNode: LinkWithMetaDataNode, dom: HTMLElement): boolean;
|
|
33
|
+
exportDOM(editor: LexicalEditor): DOMExportOutput;
|
|
42
34
|
}
|
|
43
|
-
export declare function $createLinkNode(url: string | null, editor
|
|
44
|
-
export declare function $isLinkNode(node: LexicalNode): node is LinkWithMetaDataNode;
|
|
45
|
-
export declare const TOGGLE_LINK_COMMAND_LinkWithMetaDataNode:
|
|
35
|
+
export declare function $createLinkNode(url: string | null, editor?: LexicalEditor, metadata?: Metadata | null): LinkWithMetaDataNode;
|
|
36
|
+
export declare function $isLinkNode(node: LexicalNode | null | undefined): node is LinkWithMetaDataNode;
|
|
37
|
+
export declare const TOGGLE_LINK_COMMAND_LinkWithMetaDataNode: LexicalCommand<string | null | {
|
|
38
|
+
url: string;
|
|
39
|
+
metadata?: Metadata | null;
|
|
40
|
+
}>;
|
|
46
41
|
export declare function LinkWithMetaDataPlugin(): null;
|
|
@@ -8,5 +8,7 @@
|
|
|
8
8
|
import { ElementTransformer, TextMatchTransformer, Transformer } from "@lexical/markdown";
|
|
9
9
|
export declare const HR: ElementTransformer;
|
|
10
10
|
export declare const IMAGE: TextMatchTransformer;
|
|
11
|
+
export declare const BLOCK_EQUATION: TextMatchTransformer;
|
|
12
|
+
export declare const EQUATION: TextMatchTransformer;
|
|
11
13
|
export declare const TABLE: ElementTransformer;
|
|
12
14
|
export declare const PLAYGROUND_TRANSFORMERS: Array<Transformer>;
|
|
@@ -22,4 +22,21 @@ export declare class ComponentPickerOption extends MenuOption {
|
|
|
22
22
|
category?: CommandCategory;
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export interface SlashCommandRenderProps {
|
|
26
|
+
isOpen: boolean;
|
|
27
|
+
anchorElement: HTMLElement | null;
|
|
28
|
+
options: ComponentPickerOption[];
|
|
29
|
+
selectedIndex: number | null;
|
|
30
|
+
queryString: string | null;
|
|
31
|
+
selectOptionAndCleanUp: (option: ComponentPickerOption) => void;
|
|
32
|
+
setHighlightedIndex: (index: number) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface SlashCommandPluginProps {
|
|
35
|
+
/** When true, suppresses the default React/Tailwind portal UI. */
|
|
36
|
+
headless?: boolean;
|
|
37
|
+
/** Custom renderer for the slash command menu. Receives full menu state & actions. */
|
|
38
|
+
render?: (state: SlashCommandRenderProps) => React.ReactNode;
|
|
39
|
+
/** Callback fired when the menu state changes (useful for external headless UIs). */
|
|
40
|
+
onStateChange?: (state: SlashCommandRenderProps) => void;
|
|
41
|
+
}
|
|
42
|
+
export default function SlashCommand({ headless, render, onStateChange, }?: SlashCommandPluginProps): React.JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface SmartTypographyResult {
|
|
2
|
+
text: string;
|
|
3
|
+
offset: number;
|
|
4
|
+
original: string;
|
|
5
|
+
replacement: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LastTypographyReplacement {
|
|
8
|
+
nodeKey: string;
|
|
9
|
+
endOffset: number;
|
|
10
|
+
original: string;
|
|
11
|
+
replacement: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Checks the text immediately before `cursorOffset` for a smart typography
|
|
15
|
+
* sequence and returns the updated text + adjusted cursor offset, or null.
|
|
16
|
+
*/
|
|
17
|
+
export declare function applySmartTypography(text: string, cursorOffset: number): SmartTypographyResult | null;
|
|
18
|
+
/**
|
|
19
|
+
* Reverts a previously applied smart typography replacement when the user
|
|
20
|
+
* presses Backspace immediately after the replacement.
|
|
21
|
+
*/
|
|
22
|
+
export declare function revertSmartTypography(text: string, cursorOffset: number, original: string, replacement: string): {
|
|
23
|
+
text: string;
|
|
24
|
+
offset: number;
|
|
25
|
+
} | null;
|
|
26
|
+
export default function SmartTypographyPlugin(): null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Klass, type LexicalEditor, type LexicalNode, type SerializedLexicalNode } from "lexical";
|
|
2
|
+
export declare const AI_GENERATED_STYLE = "color: #7c3aed; background-color: rgba(139, 92, 246, 0.08); border-radius: 3px;";
|
|
3
|
+
export declare const AI_CARET_STYLE = "color: #7c3aed; font-size: 0.78em; animation: notiq-ai-pulse 1s ease-in-out infinite;";
|
|
4
|
+
export declare const AI_CARET_TEXT = " \u25CF";
|
|
5
|
+
/**
|
|
6
|
+
* Sanitizes an in-flight markdown stream so incomplete fences, math blocks,
|
|
7
|
+
* or raw HTML/MDX tags don't flash as broken literal syntax while streaming.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sanitizeStreamingMarkdown(raw: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Parses a markdown string into serialized Lexical nodes using a detached editor.
|
|
12
|
+
*/
|
|
13
|
+
export declare function serializeMarkdownToNodes(markdown: string, nodes: ReadonlyArray<Klass<LexicalNode>>): SerializedLexicalNode[];
|
|
14
|
+
/**
|
|
15
|
+
* Hydrates serialized nodes inside the active editor's update() transaction
|
|
16
|
+
* and marks all TextNodes with the AI-generated purple highlight style.
|
|
17
|
+
*/
|
|
18
|
+
export declare function hydrateSerializedAINodes(serialized: SerializedLexicalNode[], options?: {
|
|
19
|
+
showCaret?: boolean;
|
|
20
|
+
}): LexicalNode[];
|
|
21
|
+
export declare function markSubtreeAsAIGenerated(node: LexicalNode): void;
|
|
22
|
+
export declare function stripAIStyleFromSubtree(node: LexicalNode): void;
|
|
23
|
+
/**
|
|
24
|
+
* Builds a structured context string containing the document's heading outline
|
|
25
|
+
* and the blocks immediately surrounding the cursor, avoiding noisy full-doc dumps.
|
|
26
|
+
*/
|
|
27
|
+
export declare function extractSurroundingContext(editor: LexicalEditor, maxBlocksBefore?: number, maxBlocksAfter?: number): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface DiagramNodeSpec {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DiagramEdgeSpec {
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DiagramSpec {
|
|
16
|
+
nodes: DiagramNodeSpec[];
|
|
17
|
+
edges?: DiagramEdgeSpec[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Normalizes partial / skeleton Excalidraw elements (e.g. LLM-generated rectangles
|
|
21
|
+
* with `label` or arrows missing `points`/metadata) into valid Excalidraw elements
|
|
22
|
+
* that `exportToSvg` and `ExcalidrawModal` can render reliably.
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeExcalidrawElements(rawElements: unknown[]): Record<string, unknown>[];
|
|
25
|
+
/**
|
|
26
|
+
* Compiles either a raw Excalidraw elements array or a declarative `{ nodes, edges }`
|
|
27
|
+
* diagram specification into a serialized Excalidraw elements JSON string.
|
|
28
|
+
*/
|
|
29
|
+
export declare function compileExcalidrawDiagram(rawJson: string): string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementTransformer } from "@lexical/markdown";
|
|
1
|
+
import { ElementTransformer, MultilineElementTransformer, TextMatchTransformer } from "@lexical/markdown";
|
|
2
2
|
export declare const HR_TRANSFORMER: ElementTransformer;
|
|
3
3
|
export declare const IMAGE_TRANSFORMER: ElementTransformer;
|
|
4
4
|
export declare const YOUTUBE_TRANSFORMER: ElementTransformer;
|
|
@@ -10,6 +10,7 @@ export declare const STEPPER_TRANSFORMER: ElementTransformer;
|
|
|
10
10
|
export declare const POLL_TRANSFORMER: ElementTransformer;
|
|
11
11
|
export declare const EXCALIDRAW_TRANSFORMER: ElementTransformer;
|
|
12
12
|
export declare const TABLE_TRANSFORMER: ElementTransformer;
|
|
13
|
+
export declare const INLINE_EQUATION_TRANSFORMER: TextMatchTransformer;
|
|
13
14
|
export declare const AUDIO_TRANSFORMER: ElementTransformer;
|
|
14
15
|
export declare const FILE_TRANSFORMER: ElementTransformer;
|
|
15
16
|
/**
|
|
@@ -17,4 +18,6 @@ export declare const FILE_TRANSFORMER: ElementTransformer;
|
|
|
17
18
|
* Guarantees that YouTube, Tweets, Figma, Images, Tables, Steppers,
|
|
18
19
|
* Equations, Polls, Audio, and Files are fully preserved when exporting to Markdown.
|
|
19
20
|
*/
|
|
21
|
+
export declare const INLINE_IMAGE_TRANSFORMER: TextMatchTransformer;
|
|
22
|
+
export declare const EXCALIDRAW_BLOCK_TRANSFORMER: MultilineElementTransformer;
|
|
20
23
|
export declare const NOTIQ_TRANSFORMERS: import("@lexical/markdown").Transformer[];
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
export declare function sanitizeUrl(url: string): string;
|
|
2
2
|
export declare function validateUrl(url: string): boolean;
|
|
3
|
-
interface Metadata {
|
|
3
|
+
export interface Metadata {
|
|
4
4
|
title: string;
|
|
5
5
|
description: string;
|
|
6
|
-
image
|
|
6
|
+
image?: string;
|
|
7
7
|
website: string;
|
|
8
8
|
logo: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function
|
|
11
|
-
export
|
|
10
|
+
export declare function normalizeUrl(rawUrl: string): string;
|
|
11
|
+
export declare function extractYouTubeId(url: string): string | null;
|
|
12
|
+
export declare function cleanTitleFromUrl(urlStr: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Synchronous instant metadata preloader - returns rich preview information
|
|
15
|
+
* immediately without waiting for network requests (e.g. YouTube thumbnail & provider,
|
|
16
|
+
* GitHub repo card, direct image preview, or formatted URL metadata).
|
|
17
|
+
*/
|
|
18
|
+
export declare function getInitialMetadata(rawUrl: string): Metadata;
|
|
19
|
+
/**
|
|
20
|
+
* Asynchronously fetches full metadata (oEmbed, OpenGraph, title, description, thumbnail)
|
|
21
|
+
* using resilient fallbacks so link previews always succeed.
|
|
22
|
+
*/
|
|
23
|
+
export declare function fetchMetadata(rawUrl: string): Promise<Metadata>;
|
|
@@ -7,6 +7,14 @@ export interface AIConfig {
|
|
|
7
7
|
* The API endpoint for AI completions. Defaults to "/api/ai".
|
|
8
8
|
*/
|
|
9
9
|
apiEndpoint?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Default writing style preset ("balanced" | "technical" | "editorial" | "executive" | "academic").
|
|
12
|
+
*/
|
|
13
|
+
writingStyle?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Custom brand voice / style guide instructions injected into AI prompts.
|
|
16
|
+
*/
|
|
17
|
+
styleGuide?: string;
|
|
10
18
|
}
|
|
11
19
|
/**
|
|
12
20
|
* Hook to access the current AI configuration.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface EquationTypographyRule {
|
|
2
|
+
pattern: RegExp;
|
|
3
|
+
replacement: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Ordered LaTeX shorthand rules applied as the user types inside an equation input.
|
|
7
|
+
* Chained rules must appear before single-token rules so `<=>` and `<->` work
|
|
8
|
+
* smoothly even when `<=` or `<-` was already expanded on the previous keystroke.
|
|
9
|
+
*/
|
|
10
|
+
export declare const EQUATION_TYPOGRAPHY_RULES: ReadonlyArray<EquationTypographyRule>;
|
|
11
|
+
/**
|
|
12
|
+
* Pure helper that applies LaTeX shorthand replacements immediately before `cursorOffset`.
|
|
13
|
+
* Returns the updated equation text and new cursor offset, or `null` if no rule matched.
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyEquationTypography(text: string, cursorOffset: number): {
|
|
16
|
+
text: string;
|
|
17
|
+
offset: number;
|
|
18
|
+
} | null;
|
|
19
|
+
/**
|
|
20
|
+
* Handles an `<input>` or `<textarea>` change event for equation editors,
|
|
21
|
+
* applying LaTeX shorthand replacements and preserving the caret position.
|
|
22
|
+
*/
|
|
23
|
+
export declare function handleEquationInputChange(target: HTMLInputElement | HTMLTextAreaElement, setEquation: (equation: string) => void): void;
|
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>;
|