@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.
Files changed (146) hide show
  1. package/dist/AICommandBarPlugin-ZEC755KY.mjs +27 -0
  2. package/dist/{AIDialog-RHRYHSVN.mjs → AIDialog-HJW6PQPR.mjs} +11 -12
  3. package/dist/{AudioComponent-CKLMLB5T.mjs → AudioComponent-W5XMZPQB.mjs} +10 -6
  4. package/dist/{DynamicBlockComponent-2LOADZUX.mjs → DynamicBlockComponent-CHRL2GAQ.mjs} +7 -6
  5. package/dist/{EquationComponent-4NFG55NQ.mjs → EquationComponent-GNQHG53L.mjs} +26 -7
  6. package/dist/{ExcalidrawComponent-BMSYIPP6.mjs → ExcalidrawComponent-POMYXDSG.mjs} +33 -6
  7. package/dist/{FileComponent-Y56MX5QD.mjs → FileComponent-EOVCH4V5.mjs} +9 -5
  8. package/dist/{HintComponet-ET7M2Q7S.mjs → HintComponet-QXL5ESND.mjs} +32 -8
  9. package/dist/{InlineImageComponent-FVTA4LXZ.mjs → InlineImageComponent-KDN3VGZC.mjs} +8 -3
  10. package/dist/{StoryBuilderComponent-JN4ZPZOW.mjs → StoryBuilderComponent-CBRFPFTR.mjs} +8 -9
  11. package/dist/{chunk-6UVNHT3T.mjs → chunk-4SYRK2NH.mjs} +23 -1
  12. package/dist/chunk-5CJZC5IB.mjs +9086 -0
  13. package/dist/{chunk-FO7M3X2B.mjs → chunk-6NK5DONB.mjs} +1 -1
  14. package/dist/{chunk-N6ILV6NF.mjs → chunk-ACW4DLVO.mjs} +21 -7
  15. package/dist/chunk-BCGD2YXP.mjs +574 -0
  16. package/dist/{chunk-TC3IISJZ.mjs → chunk-BTR3TPIN.mjs} +18 -5
  17. package/dist/{chunk-ZYJ7KABY.mjs → chunk-CQCS5YPS.mjs} +3 -5
  18. package/dist/{chunk-T2UBAZ66.mjs → chunk-D4UBNSUW.mjs} +1 -1
  19. package/dist/{chunk-KNW2CGIP.mjs → chunk-DBRZIA43.mjs} +4 -1
  20. package/dist/{chunk-CDAMHK63.mjs → chunk-GJK2L7ZM.mjs} +23 -2
  21. package/dist/{chunk-ELBTVBTS.mjs → chunk-IKYVBTCJ.mjs} +43 -20
  22. package/dist/chunk-IXRA5D53.mjs +10447 -0
  23. package/dist/{chunk-W6VQSFE5.mjs → chunk-J2CEQXG4.mjs} +1 -1
  24. package/dist/{chunk-43Z4Z2KD.mjs → chunk-JTNLN4JI.mjs} +1 -1
  25. package/dist/{chunk-OE5JRLCN.mjs → chunk-ONOHG5NB.mjs} +6 -4
  26. package/dist/{chunk-QNIY45SF.mjs → chunk-OO42URWA.mjs} +27 -6
  27. package/dist/chunk-PBVRSNGU.mjs +129 -0
  28. package/dist/chunk-QCS57TIF.mjs +1794 -0
  29. package/dist/chunk-RNEIJRUS.mjs +60 -0
  30. package/dist/chunk-TJPTGECP.mjs +1556 -0
  31. package/dist/{chunk-XYMXGU4T.mjs → chunk-TMYRA2W4.mjs} +1 -1
  32. package/dist/{chunk-ZFV2HGD3.mjs → chunk-UNEFOZTS.mjs} +1 -1
  33. package/dist/chunk-X4NI7EQS.mjs +282 -0
  34. package/dist/{chunk-5D4JF3ZZ.mjs → chunk-XAJ4GACN.mjs} +171 -49
  35. package/dist/{chunk-7QRJVZQY.mjs → chunk-YVUQRJVV.mjs} +63 -18
  36. package/dist/components/editor/index.d.ts +1 -1
  37. package/dist/components/editor/nodes/EquationNode/EquationNode.d.ts +1 -0
  38. package/dist/components/editor/nodes/Hint/index.d.ts +2 -1
  39. package/dist/components/editor/plugins/AICommandBarPlugin/index.d.ts +73 -1
  40. package/dist/components/editor/plugins/DraggableBlockPlugin/index.d.ts +25 -3
  41. package/dist/components/editor/plugins/InlineCopilotPlugin/index.d.ts +16 -3
  42. package/dist/components/editor/plugins/LinkWithMetaData/index.d.ts +20 -25
  43. package/dist/components/editor/plugins/MarkdownPastePlugin/index.d.ts +5 -0
  44. package/dist/components/editor/plugins/MarkdownTransformers/index.d.ts +2 -0
  45. package/dist/components/editor/plugins/SlashCommand/index.d.ts +18 -1
  46. package/dist/components/editor/plugins/SmartTypographyPlugin/index.d.ts +26 -0
  47. package/dist/components/editor/utils/aiStream.d.ts +27 -0
  48. package/dist/components/editor/utils/excalidrawDiagramBuilder.d.ts +29 -0
  49. package/dist/components/editor/utils/markdownTransformers.d.ts +4 -1
  50. package/dist/components/editor/utils/url.d.ts +16 -4
  51. package/dist/components/providers/AIContext.d.ts +8 -0
  52. package/dist/components/ui/equation/equationTypography.d.ts +23 -0
  53. package/dist/core/extension.d.ts +3 -1
  54. package/dist/core/extensions/blocks-kit.d.ts +22 -1
  55. package/dist/core/extensions/copilot-and-collab.d.ts +15 -1
  56. package/dist/core/react/NotiqContent.d.ts +4 -1
  57. package/dist/core/react/index.d.ts +1 -0
  58. package/dist/core/react/node-renderers.d.ts +73 -0
  59. package/dist/core.js +15429 -13116
  60. package/dist/core.mjs +47 -39
  61. package/dist/hooks/instructions-messages.d.ts +13 -4
  62. package/dist/{image-QPB2CVXP.mjs → image-AL6PHM2A.mjs} +17 -12
  63. package/dist/index.js +15526 -13194
  64. package/dist/index.mjs +64 -60
  65. package/dist/{insert-audio-I3PD6JFS.mjs → insert-audio-CRWR7EO5.mjs} +4 -6
  66. package/dist/{insert-file-PHR7XL4V.mjs → insert-file-I73AZW3L.mjs} +4 -6
  67. package/dist/{insert-gif-R5ZO4JHC.mjs → insert-gif-KWRC3ACT.mjs} +1 -1
  68. package/dist/{insert-image-PLBZELHK.mjs → insert-image-XIY6BGW5.mjs} +4 -3
  69. package/dist/{insert-poll-6BCIFY5G.mjs → insert-poll-J5YVZNZ4.mjs} +4 -3
  70. package/dist/{insert-table-ZRJP6X52.mjs → insert-table-OIMJRFFK.mjs} +1 -1
  71. package/dist/{poll-component-VHMM5KKZ.mjs → poll-component-TVHXIKGQ.mjs} +3 -2
  72. package/dist/react.js +14747 -12554
  73. package/dist/react.mjs +40 -38
  74. package/dist/{stepper-KNITDVLG.mjs → stepper-ILF7YXTO.mjs} +63 -73
  75. package/dist/styles/notiq.css +1 -1
  76. package/package.json +2 -2
  77. package/src/styles/notiq.css +20 -0
  78. package/dist/AICommandBarPlugin-TADJ3X2Y.mjs +0 -12
  79. package/dist/CodeActionMenuPlugin-FGH6HZLL.mjs +0 -14
  80. package/dist/CollaborationPlugin-TIZOQBUT.mjs +0 -405
  81. package/dist/CollaboratorsBar-AMPIAUOY.mjs +0 -20
  82. package/dist/CommentsPlugin-SDJJTUGK.mjs +0 -19
  83. package/dist/ExcalidrawPlugin-QLPGJPSX.mjs +0 -14
  84. package/dist/ExportPlugin-MJHYKQZJ.mjs +0 -43
  85. package/dist/FloatingLinkEditorPlugin-MABB34L7.mjs +0 -12
  86. package/dist/FloatingTextFormatToolbarPlugin-BXCPN3KD.mjs +0 -45
  87. package/dist/InlineCopilotPlugin-PNS5Y6OO.mjs +0 -360
  88. package/dist/MobileToolbar-KV5DX4ED.mjs +0 -982
  89. package/dist/SlashCommand-SPR7G5EI.mjs +0 -39
  90. package/dist/TableCellActionMenuPlugin-YWBA64J7.mjs +0 -838
  91. package/dist/TableHoverActionsPlugin-2EIXHEXN.mjs +0 -265
  92. package/dist/TemplatePlugin-HNTPEXBB.mjs +0 -9
  93. package/dist/ToolbarPlugin-F52PVNXU.mjs +0 -823
  94. package/dist/VersionHistoryPlugin-YWGCREKA.mjs +0 -371
  95. package/dist/background-color-RW5JYLMG.mjs +0 -425
  96. package/dist/block-format-TODFREE2.mjs +0 -14
  97. package/dist/chunk-22ZIL6NH.mjs +0 -88
  98. package/dist/chunk-2LNT36RL.mjs +0 -555
  99. package/dist/chunk-37LC44W3.mjs +0 -2677
  100. package/dist/chunk-3IILA3IP.mjs +0 -28
  101. package/dist/chunk-4DVIYZVB.mjs +0 -193
  102. package/dist/chunk-4FFTOZGJ.mjs +0 -103
  103. package/dist/chunk-4UMUPCDK.mjs +0 -68
  104. package/dist/chunk-6D6QLRYR.mjs +0 -238
  105. package/dist/chunk-6FQFPPLG.mjs +0 -785
  106. package/dist/chunk-ACV47ZKE.mjs +0 -201
  107. package/dist/chunk-BGV62GC2.mjs +0 -26
  108. package/dist/chunk-C4JWLBYN.mjs +0 -132
  109. package/dist/chunk-CLRSETYQ.mjs +0 -431
  110. package/dist/chunk-D3IOUQFR.mjs +0 -441
  111. package/dist/chunk-EEBA6OAH.mjs +0 -59
  112. package/dist/chunk-EIZMKFHF.mjs +0 -32
  113. package/dist/chunk-ENH2IOHI.mjs +0 -1828
  114. package/dist/chunk-EVPWKNE4.mjs +0 -27
  115. package/dist/chunk-HOZ4QRFV.mjs +0 -536
  116. package/dist/chunk-IAFCQV3Z.mjs +0 -349
  117. package/dist/chunk-J6ZUY5BY.mjs +0 -202
  118. package/dist/chunk-K5OAFEVY.mjs +0 -191
  119. package/dist/chunk-KXRLARGI.mjs +0 -26
  120. package/dist/chunk-LBGM4VVZ.mjs +0 -409
  121. package/dist/chunk-LLGVCM7M.mjs +0 -809
  122. package/dist/chunk-LU2XWLOE.mjs +0 -219
  123. package/dist/chunk-LVRJM45C.mjs +0 -171
  124. package/dist/chunk-MSAO3YFB.mjs +0 -144
  125. package/dist/chunk-N3KDPSRI.mjs +0 -496
  126. package/dist/chunk-OXWTZV3U.mjs +0 -174
  127. package/dist/chunk-PD5K4AGP.mjs +0 -64
  128. package/dist/chunk-PFH63ZU4.mjs +0 -33
  129. package/dist/chunk-R7WFRENU.mjs +0 -262
  130. package/dist/chunk-RAVYEEIC.mjs +0 -36
  131. package/dist/chunk-RJQTA6HG.mjs +0 -358
  132. package/dist/chunk-SAOJHVPE.mjs +0 -153
  133. package/dist/chunk-SYUCM5G5.mjs +0 -111
  134. package/dist/chunk-VGAX6YEY.mjs +0 -399
  135. package/dist/chunk-VNDDDXGH.mjs +0 -682
  136. package/dist/chunk-WUVIQCX7.mjs +0 -944
  137. package/dist/chunk-XNJNT6PC.mjs +0 -1701
  138. package/dist/chunk-XYLTLGY5.mjs +0 -775
  139. package/dist/chunk-ZKZ7MLSS.mjs +0 -165
  140. package/dist/color-S55XFDYQ.mjs +0 -13
  141. package/dist/font-IJKFR4BM.mjs +0 -12
  142. package/dist/font-size-3HMJHKO2.mjs +0 -15
  143. package/dist/insert-node-DGCZBGKG.mjs +0 -243
  144. package/dist/table-dropdown-4VCRSQB6.mjs +0 -391
  145. package/dist/text-align-TEB4S52S.mjs +0 -121
  146. package/dist/text-format-T3IY7FBI.mjs +0 -15
@@ -1,165 +0,0 @@
1
- import {
2
- init_react_shim
3
- } from "./chunk-WYCFGRFJ.mjs";
4
-
5
- // src/components/editor/plugins/SpeechToTextPlugin/index.ts
6
- init_react_shim();
7
- import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
8
- import {
9
- $getSelection,
10
- $isRangeSelection,
11
- COMMAND_PRIORITY_EDITOR,
12
- createCommand,
13
- REDO_COMMAND,
14
- UNDO_COMMAND
15
- } from "lexical";
16
- import { useEffect as useEffect2, useRef as useRef2, useState } from "react";
17
-
18
- // src/hooks/useReport.ts
19
- init_react_shim();
20
- import { useCallback, useEffect, useRef } from "react";
21
- var getElement = () => {
22
- let element = document.getElementById("report-container");
23
- if (element === null) {
24
- element = document.createElement("div");
25
- element.id = "report-container";
26
- element.style.position = "fixed";
27
- element.style.top = "50%";
28
- element.style.left = "50%";
29
- element.style.fontSize = "32px";
30
- element.style.transform = "translate(-50%, -50px)";
31
- element.style.padding = "20px";
32
- element.style.background = "rgba(240, 240, 240, 0.4)";
33
- element.style.borderRadius = "20px";
34
- if (document.body) {
35
- document.body.appendChild(element);
36
- }
37
- }
38
- return element;
39
- };
40
- function useReport() {
41
- const timer = useRef(null);
42
- const cleanup = useCallback(() => {
43
- if (timer.current !== null) {
44
- clearTimeout(timer.current);
45
- timer.current = null;
46
- }
47
- if (document.body) {
48
- document.body.removeChild(getElement());
49
- }
50
- }, []);
51
- useEffect(() => {
52
- return cleanup;
53
- }, [cleanup]);
54
- return useCallback(
55
- (content) => {
56
- console.log(content);
57
- const element = getElement();
58
- if (timer.current !== null) {
59
- clearTimeout(timer.current);
60
- }
61
- element.innerHTML = content;
62
- timer.current = setTimeout(cleanup, 1e3);
63
- return timer.current;
64
- },
65
- [cleanup]
66
- );
67
- }
68
-
69
- // src/components/editor/plugins/SpeechToTextPlugin/index.ts
70
- var SPEECH_TO_TEXT_COMMAND = createCommand(
71
- "SPEECH_TO_TEXT_COMMAND"
72
- );
73
- var VOICE_COMMANDS = {
74
- "\n": ({ selection }) => {
75
- selection.insertParagraph();
76
- },
77
- redo: ({ editor }) => {
78
- editor.dispatchCommand(REDO_COMMAND, void 0);
79
- },
80
- undo: ({ editor }) => {
81
- editor.dispatchCommand(UNDO_COMMAND, void 0);
82
- }
83
- };
84
- var SUPPORT_SPEECH_RECOGNITION = typeof window !== "undefined" && ("SpeechRecognition" in window || "webkitSpeechRecognition" in window);
85
- function SpeechToTextPlugin() {
86
- const [editor] = useLexicalComposerContext();
87
- const [isEnabled, setIsEnabled] = useState(false);
88
- const SpeechRecognition = (
89
- // @ts-expect-error missing type
90
- window.SpeechRecognition || window.webkitSpeechRecognition
91
- );
92
- const recognition = useRef2(null);
93
- const isRecognizing = useRef2(false);
94
- const report = useReport();
95
- useEffect2(() => {
96
- if (isEnabled && recognition.current === null) {
97
- recognition.current = new SpeechRecognition();
98
- recognition.current.continuous = true;
99
- recognition.current.interimResults = true;
100
- recognition.current.onresult = (event) => {
101
- const resultItem = event.results.item(event.resultIndex);
102
- const { transcript } = resultItem.item(0);
103
- report(transcript);
104
- if (!resultItem.isFinal) {
105
- return;
106
- }
107
- editor.update(() => {
108
- const selection = $getSelection();
109
- if ($isRangeSelection(selection)) {
110
- const command = VOICE_COMMANDS[transcript.toLowerCase().trim()];
111
- if (command) {
112
- command({ editor, selection });
113
- } else if (transcript.match(/\s*\n\s*/)) {
114
- selection.insertParagraph();
115
- } else {
116
- selection.insertText(transcript);
117
- }
118
- }
119
- });
120
- };
121
- recognition.current.onstart = () => {
122
- isRecognizing.current = true;
123
- };
124
- recognition.current.onend = () => {
125
- var _a;
126
- isRecognizing.current = false;
127
- if (isEnabled) {
128
- (_a = recognition.current) == null ? void 0 : _a.start();
129
- }
130
- };
131
- }
132
- if (recognition.current) {
133
- if (isEnabled && !isRecognizing.current) {
134
- recognition.current.start();
135
- } else if (!isEnabled && isRecognizing.current) {
136
- recognition.current.stop();
137
- }
138
- }
139
- return () => {
140
- if (recognition.current) {
141
- recognition.current.stop();
142
- recognition.current = null;
143
- isRecognizing.current = false;
144
- }
145
- };
146
- }, [SpeechRecognition, editor, isEnabled, report]);
147
- useEffect2(() => {
148
- return editor.registerCommand(
149
- SPEECH_TO_TEXT_COMMAND,
150
- (_isEnabled) => {
151
- setIsEnabled(_isEnabled);
152
- return true;
153
- },
154
- COMMAND_PRIORITY_EDITOR
155
- );
156
- }, [editor]);
157
- return null;
158
- }
159
- var SpeechToTextPlugin_default = SUPPORT_SPEECH_RECOGNITION ? SpeechToTextPlugin : () => null;
160
-
161
- export {
162
- SPEECH_TO_TEXT_COMMAND,
163
- SUPPORT_SPEECH_RECOGNITION,
164
- SpeechToTextPlugin_default
165
- };
@@ -1,13 +0,0 @@
1
- import {
2
- Color
3
- } from "./chunk-CLRSETYQ.mjs";
4
- import "./chunk-6UVNHT3T.mjs";
5
- import "./chunk-PFH63ZU4.mjs";
6
- import "./chunk-5NRAXWYA.mjs";
7
- import "./chunk-OE5JRLCN.mjs";
8
- import "./chunk-IIVB6JNE.mjs";
9
- import "./chunk-JHXDLYEV.mjs";
10
- import "./chunk-WYCFGRFJ.mjs";
11
- export {
12
- Color as default
13
- };
@@ -1,12 +0,0 @@
1
- import {
2
- Font
3
- } from "./chunk-SAOJHVPE.mjs";
4
- import "./chunk-LU2XWLOE.mjs";
5
- import "./chunk-H3P47YXJ.mjs";
6
- import "./chunk-OE5JRLCN.mjs";
7
- import "./chunk-IIVB6JNE.mjs";
8
- import "./chunk-JHXDLYEV.mjs";
9
- import "./chunk-WYCFGRFJ.mjs";
10
- export {
11
- Font as default
12
- };
@@ -1,15 +0,0 @@
1
- import {
2
- FontSize,
3
- parseAllowedFontSize
4
- } from "./chunk-C4JWLBYN.mjs";
5
- import "./chunk-K5OAFEVY.mjs";
6
- import "./chunk-6D6QLRYR.mjs";
7
- import "./chunk-4FFTOZGJ.mjs";
8
- import "./chunk-5NRAXWYA.mjs";
9
- import "./chunk-OE5JRLCN.mjs";
10
- import "./chunk-JHXDLYEV.mjs";
11
- import "./chunk-WYCFGRFJ.mjs";
12
- export {
13
- FontSize as default,
14
- parseAllowedFontSize
15
- };
@@ -1,243 +0,0 @@
1
- import {
2
- INSERT_EXCALIDRAW_COMMAND
3
- } from "./chunk-22ZIL6NH.mjs";
4
- import {
5
- DropDown
6
- } from "./chunk-LU2XWLOE.mjs";
7
- import {
8
- INSERT_COLLAPSIBLE_COMMAND
9
- } from "./chunk-ACV47ZKE.mjs";
10
- import {
11
- AutoEmbedDialog,
12
- Figma,
13
- FigmaEmbedConfig,
14
- INSERT_LAYOUT_COMMAND,
15
- Twitter,
16
- TwitterEmbedConfig,
17
- Youtube,
18
- YoutubeEmbedConfig
19
- } from "./chunk-XYLTLGY5.mjs";
20
- import {
21
- useModal
22
- } from "./chunk-IAFCQV3Z.mjs";
23
- import {
24
- INSERT_IMAGE_COMMAND
25
- } from "./chunk-FO7M3X2B.mjs";
26
- import "./chunk-4DVIYZVB.mjs";
27
- import "./chunk-VGAX6YEY.mjs";
28
- import {
29
- Skeleton
30
- } from "./chunk-NBE6FF6L.mjs";
31
- import "./chunk-ELBTVBTS.mjs";
32
- import "./chunk-5NRAXWYA.mjs";
33
- import "./chunk-TC3IISJZ.mjs";
34
- import "./chunk-H3P47YXJ.mjs";
35
- import "./chunk-QNIY45SF.mjs";
36
- import "./chunk-OE5JRLCN.mjs";
37
- import {
38
- INSERT_HINT_COMMAND
39
- } from "./chunk-7QRJVZQY.mjs";
40
- import "./chunk-IIVB6JNE.mjs";
41
- import "./chunk-JHXDLYEV.mjs";
42
- import {
43
- init_react_shim
44
- } from "./chunk-WYCFGRFJ.mjs";
45
-
46
- // src/components/ui/drop-downs/insert-node.tsx
47
- init_react_shim();
48
- import { useMemo, lazy, Suspense } from "react";
49
- import { Columns2, Columns3, Columns4, DraftingCompassIcon, FileAudio, FileText, FlipHorizontal2, Image, ImagePlay, Lightbulb, Plus, SquareChevronRight, SquarePenIcon, Table } from "lucide-react";
50
- import { INSERT_HORIZONTAL_RULE_COMMAND } from "@lexical/react/LexicalHorizontalRuleNode";
51
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
52
- var InsertImageDialog = lazy(() => import("./insert-image-PLBZELHK.mjs").then((module) => ({ default: module.InsertImageDialog })));
53
- var InsertGif = lazy(() => import("./insert-gif-R5ZO4JHC.mjs"));
54
- var InsertTableBody = lazy(() => import("./insert-table-ZRJP6X52.mjs").then((module) => ({ default: module.InsertTable })));
55
- var InsertPoll = lazy(
56
- () => import("./insert-poll-6BCIFY5G.mjs").then((module) => ({ default: module.InsertPoll }))
57
- );
58
- var InsertAudioDialog = lazy(
59
- () => import("./insert-audio-I3PD6JFS.mjs").then((module) => ({ default: module.InsertAudioDialog }))
60
- );
61
- var InsertFileDialog = lazy(
62
- () => import("./insert-file-PHR7XL4V.mjs").then((module) => ({ default: module.InsertFileDialog }))
63
- );
64
- function InsertNode({
65
- disabled,
66
- editor
67
- }) {
68
- const [model, showModal] = useModal();
69
- const insertGifOnClick = (payload) => {
70
- editor.dispatchCommand(INSERT_IMAGE_COMMAND, payload);
71
- };
72
- const items = useMemo(
73
- () => [
74
- {
75
- label: "Horizontal Rule",
76
- icon: /* @__PURE__ */ jsx(FlipHorizontal2, { className: "w-4 h-4" }),
77
- func: () => editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, void 0)
78
- },
79
- {
80
- label: "Image",
81
- icon: /* @__PURE__ */ jsx(Image, { className: "size-4" }),
82
- func: () => {
83
- showModal(
84
- "Insert Image",
85
- "Please select an image to upload.",
86
- (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[350px] h-[350px]" }), children: /* @__PURE__ */ jsx(InsertImageDialog, { activeEditor: editor, onClose }) }),
87
- true
88
- );
89
- }
90
- },
91
- {
92
- label: "Audio Player",
93
- icon: /* @__PURE__ */ jsx(FileAudio, { className: "size-4 text-emerald-500" }),
94
- func: () => {
95
- showModal(
96
- "Insert Audio",
97
- "Upload an audio file or paste an audio URL.",
98
- (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[250px]" }), children: /* @__PURE__ */ jsx(InsertAudioDialog, { activeEditor: editor, onClose }) }),
99
- true
100
- );
101
- }
102
- },
103
- {
104
- label: "File Attachment",
105
- icon: /* @__PURE__ */ jsx(FileText, { className: "size-4 text-blue-500" }),
106
- func: () => {
107
- showModal(
108
- "Attach Document",
109
- "Attach a file (PDF, Doc, Spreadsheet, Archive) to the document.",
110
- (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[250px]" }), children: /* @__PURE__ */ jsx(InsertFileDialog, { activeEditor: editor, onClose }) }),
111
- true
112
- );
113
- }
114
- },
115
- {
116
- label: "GIF",
117
- icon: /* @__PURE__ */ jsx(ImagePlay, { className: "w-4 h-4" }),
118
- func: () => {
119
- showModal(
120
- "Insert GIF",
121
- "Please select a GIF to upload.",
122
- (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[400px]" }), children: /* @__PURE__ */ jsx(InsertGif, { insertGifOnClick, onClose }) }),
123
- true
124
- );
125
- }
126
- },
127
- {
128
- label: "Table",
129
- icon: /* @__PURE__ */ jsx(Table, { className: "w-4 h-4" }),
130
- func: () => {
131
- showModal(
132
- "Insert Table",
133
- "Please configure your table.",
134
- (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[100px]" }), children: /* @__PURE__ */ jsx(InsertTableBody, { activeEditor: editor, onClose }) }),
135
- true
136
- );
137
- }
138
- },
139
- {
140
- label: "ExcaliDraw",
141
- icon: /* @__PURE__ */ jsx(DraftingCompassIcon, { className: "w-4 h-4" }),
142
- func: () => {
143
- editor.dispatchCommand(INSERT_EXCALIDRAW_COMMAND, void 0);
144
- }
145
- },
146
- {
147
- label: "Poll",
148
- icon: /* @__PURE__ */ jsx(SquarePenIcon, { className: "w-4 h-4" }),
149
- func: () => {
150
- showModal(
151
- "Create Poll",
152
- "Please type your question.",
153
- (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[100px]" }), children: /* @__PURE__ */ jsx(InsertPoll, { activeEditor: editor, onClose }) }),
154
- true
155
- );
156
- }
157
- },
158
- {
159
- label: "2 columns (equal width)",
160
- icon: /* @__PURE__ */ jsx(Columns2, { className: "w-4 h-4" }),
161
- func: () => {
162
- editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr");
163
- }
164
- },
165
- {
166
- label: "3 columns (equal width)",
167
- icon: /* @__PURE__ */ jsx(Columns3, { className: "w-4 h-4" }),
168
- func: () => {
169
- editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr 1fr");
170
- }
171
- },
172
- {
173
- label: "4 columns (equal width)",
174
- icon: /* @__PURE__ */ jsx(Columns4, { className: "w-4 h-4" }),
175
- func: () => {
176
- editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr 1fr 1fr");
177
- }
178
- },
179
- {
180
- label: "2 columns (25% - 75%)",
181
- icon: /* @__PURE__ */ jsx(Columns2, { className: "w-4 h-4" }),
182
- func: () => {
183
- editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 3fr");
184
- }
185
- },
186
- {
187
- label: "Collapsible container",
188
- icon: /* @__PURE__ */ jsx(SquareChevronRight, { className: "w-4 h-4" }),
189
- func: () => {
190
- editor.dispatchCommand(INSERT_COLLAPSIBLE_COMMAND, void 0);
191
- }
192
- },
193
- {
194
- label: "Twitter",
195
- icon: /* @__PURE__ */ jsx(Twitter, { className: "w-4 h-4" }),
196
- func: () => {
197
- showModal("Twitter tweet", "Insert a URL to embed a live preview. Works with Twitter, Google Drive, Vimeo, and more.", (onClose) => /* @__PURE__ */ jsx(AutoEmbedDialog, { embedConfig: TwitterEmbedConfig, onClose }), true);
198
- }
199
- },
200
- {
201
- label: "Youtube",
202
- icon: /* @__PURE__ */ jsx(Youtube, {}),
203
- func: () => {
204
- showModal("Youtube", "Insert a URL to embed a live preview. Works with YouTube, Google Drive, Vimeo, and more.", (onClose) => /* @__PURE__ */ jsx(AutoEmbedDialog, { embedConfig: YoutubeEmbedConfig, onClose }), true);
205
- }
206
- },
207
- {
208
- label: "Figma",
209
- icon: /* @__PURE__ */ jsx(Figma, {}),
210
- func: () => {
211
- showModal("Figma", "Insert a URL to embed a live preview. Works with Figma.", (onClose) => /* @__PURE__ */ jsx(AutoEmbedDialog, { embedConfig: FigmaEmbedConfig, onClose }), true);
212
- }
213
- },
214
- {
215
- label: "Callout",
216
- icon: /* @__PURE__ */ jsx(Lightbulb, { className: "h-4 w-4 text-emerald-500" }),
217
- func: () => {
218
- editor.dispatchCommand(INSERT_HINT_COMMAND, "tip");
219
- }
220
- }
221
- ],
222
- [editor, showModal]
223
- );
224
- return /* @__PURE__ */ jsxs(Fragment, { children: [
225
- /* @__PURE__ */ jsx(
226
- DropDown,
227
- {
228
- values: items,
229
- TriggerClassName: { width: "115px", border: "none" },
230
- className: "cursor-pointer",
231
- TriggerLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
232
- /* @__PURE__ */ jsx(Plus, {}),
233
- /* @__PURE__ */ jsx("span", { children: "Insert" })
234
- ] }),
235
- disabled
236
- }
237
- ),
238
- model
239
- ] });
240
- }
241
- export {
242
- InsertNode as default
243
- };