@collabchron/notiq 0.2.0 → 1.0.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 (282) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +230 -39
  3. package/dist/CodeActionMenuPlugin-EINOY4U4.mjs +15 -0
  4. package/dist/DynamicBlockComponent-NRQJ4WW4.mjs +161 -0
  5. package/dist/EquationComponent-CB6DFIHV.mjs +154 -0
  6. package/dist/ExcalidrawComponent-XW6646OH.mjs +528 -0
  7. package/dist/ExcalidrawPlugin-ZFHT62IF.mjs +14 -0
  8. package/dist/ExportPlugin-V2RLM63S.mjs +11 -0
  9. package/dist/FloatingLinkEditorPlugin-TRTCMSP4.mjs +12 -0
  10. package/dist/FloatingTextFormatToolbarPlugin-F2GY6LMI.mjs +30 -0
  11. package/dist/HintComponet-BRL6EAMS.mjs +217 -0
  12. package/dist/InlineImageComponent-UWIUWBHI.mjs +453 -0
  13. package/dist/MobileToolbar-BOOZAMQE.mjs +268 -0
  14. package/dist/SlashCommand-GMT5JI33.mjs +28 -0
  15. package/dist/StoryBuilderComponent-JGDBM5JU.mjs +562 -0
  16. package/{src/components/editor/plugins/TableCellActionMenuPlugin/index.tsx → dist/TableCellActionMenuPlugin-PGK2K3VG.mjs} +667 -759
  17. package/{src/components/editor/plugins/TableHoverActionsPlugin/index.tsx → dist/TableHoverActionsPlugin-GJVE6VRW.mjs} +258 -314
  18. package/dist/TemplatePlugin-ZD3QEVTI.mjs +9 -0
  19. package/dist/ToolbarPlugin-7TOZRD2R.mjs +1547 -0
  20. package/dist/babel-JZ2EV6AX.mjs +7233 -0
  21. package/dist/background-color-XZTYLGO2.mjs +362 -0
  22. package/dist/block-format-YJCV2DIY.mjs +15 -0
  23. package/dist/chunk-2FNEAMSP.mjs +127 -0
  24. package/dist/chunk-3CPBODXA.mjs +84 -0
  25. package/dist/chunk-3G37YKTV.mjs +83 -0
  26. package/dist/chunk-3JVFG7ER.mjs +184 -0
  27. package/dist/chunk-456TN7IM.mjs +110 -0
  28. package/dist/chunk-4EXYCTGJ.mjs +27 -0
  29. package/{src/utils/getSelectedNode.ts → dist/chunk-4HBCVSE6.mjs} +26 -27
  30. package/dist/chunk-4MEDW3T6.mjs +125 -0
  31. package/dist/chunk-4VWFVWYP.mjs +36 -0
  32. package/dist/chunk-5BAKY5KN.mjs +84 -0
  33. package/dist/chunk-5QSNIVIG.mjs +333 -0
  34. package/dist/chunk-64Z3FI7T.mjs +37 -0
  35. package/{src/components/editor/nodes/Stepper/index.tsx → dist/chunk-6RNZQOH2.mjs} +214 -260
  36. package/dist/chunk-77KXU36M.mjs +64 -0
  37. package/dist/chunk-77UA6HYR.mjs +165 -0
  38. package/dist/chunk-7NZAPJ4G.mjs +102 -0
  39. package/dist/chunk-7VUMHWWL.mjs +152 -0
  40. package/dist/chunk-AMMKBSST.mjs +1256 -0
  41. package/dist/chunk-BIU7WTLX.mjs +95 -0
  42. package/dist/chunk-EGMI62PP.mjs +83 -0
  43. package/dist/chunk-EHNQD5KO.mjs +88 -0
  44. package/dist/chunk-FSM26655.mjs +37 -0
  45. package/{src/components/editor/nodes/Hint/index.tsx → dist/chunk-G53GLEAY.mjs} +158 -190
  46. package/dist/chunk-GK35L7UY.mjs +28 -0
  47. package/dist/chunk-GXYD4VZM.mjs +193 -0
  48. package/dist/chunk-GYIOYVCN.mjs +538 -0
  49. package/dist/chunk-GZPNVR7L.mjs +157 -0
  50. package/dist/chunk-JXDPPUJI.mjs +52 -0
  51. package/dist/chunk-K36V4SIW.mjs +141 -0
  52. package/dist/chunk-KJ6AJ44Q.mjs +128 -0
  53. package/dist/chunk-KJV3FAZ7.mjs +142 -0
  54. package/{src/components/editor/plugins/ImagesPlugin/index.tsx → dist/chunk-LGG4IUIA.mjs} +189 -222
  55. package/dist/chunk-LQN3CMKV.mjs +1906 -0
  56. package/dist/chunk-N3WN46VL.mjs +236 -0
  57. package/dist/chunk-PBD6LMLC.mjs +366 -0
  58. package/dist/chunk-POGRR73N.mjs +33 -0
  59. package/{src/components/editor/utils/editorFormatting.ts → dist/chunk-PZSUSXQG.mjs} +238 -282
  60. package/dist/chunk-QEIFVK5M.mjs +29 -0
  61. package/dist/chunk-QHIQKMVN.mjs +427 -0
  62. package/dist/chunk-TCYK7DM7.mjs +36 -0
  63. package/dist/chunk-TTHQCW5F.mjs +47 -0
  64. package/dist/chunk-U47ABU5Z.mjs +53 -0
  65. package/dist/chunk-WDG7J2DY.mjs +116 -0
  66. package/dist/chunk-WJRHXI2C.mjs +733 -0
  67. package/dist/chunk-XLER2DHM.mjs +357 -0
  68. package/dist/chunk-XWC4TK2N.mjs +315 -0
  69. package/dist/chunk-YHPNOWFH.mjs +15 -0
  70. package/dist/chunk-YKC3SO4Z.mjs +32 -0
  71. package/dist/chunk-YMBXLRW5.mjs +374 -0
  72. package/dist/chunk-YPHOEJ46.mjs +64 -0
  73. package/dist/chunk-YUDCJRJM.mjs +25 -0
  74. package/dist/chunk-Z4EWP7BI.mjs +65 -0
  75. package/dist/chunk-ZB5LZQKC.mjs +191 -0
  76. package/dist/chunk-ZJRKATOJ.mjs +65 -0
  77. package/dist/color-BPKOPQKN.mjs +12 -0
  78. package/dist/estree-XC56IUFX.mjs +4414 -0
  79. package/dist/font-FEZ3GKSF.mjs +13 -0
  80. package/dist/font-size-EK775WRH.mjs +15 -0
  81. package/dist/html-S3ACX7NI.mjs +2738 -0
  82. package/dist/image-2PJIAYAT.mjs +993 -0
  83. package/dist/index.d.mts +145 -0
  84. package/dist/index.d.ts +145 -0
  85. package/dist/index.js +57855 -0
  86. package/dist/index.mjs +1790 -0
  87. package/dist/insert-gif-SAIDYURE.mjs +100 -0
  88. package/dist/insert-image-U3RJN3OW.mjs +259 -0
  89. package/dist/insert-node-5P2CRJ7S.mjs +201 -0
  90. package/dist/insert-poll-HCPM7MO6.mjs +33 -0
  91. package/dist/insert-table-24XYUS2W.mjs +66 -0
  92. package/dist/markdown-SNVBOSRA.mjs +3487 -0
  93. package/dist/poll-component-2R4MDLHS.mjs +303 -0
  94. package/dist/postcss-ONF3VDIM.mjs +5051 -0
  95. package/dist/standalone-EOIALU3M.mjs +2373 -0
  96. package/dist/stepper-FSARL6X6.mjs +304 -0
  97. package/dist/styles/notiq.css +1149 -0
  98. package/dist/text-align-VLECWO4H.mjs +118 -0
  99. package/dist/text-format-BG5WOOPZ.mjs +16 -0
  100. package/dist/typescript-AMPI6OVS.mjs +13135 -0
  101. package/package.json +94 -10
  102. package/src/styles/notiq.css +1149 -0
  103. package/src/styles/tailwind-plugin.ts +134 -0
  104. package/components.json +0 -21
  105. package/eslint.config.mjs +0 -16
  106. package/next.config.ts +0 -12
  107. package/postcss.config.mjs +0 -5
  108. package/public/file.svg +0 -1
  109. package/public/globe.svg +0 -1
  110. package/public/images/icons/plus.svg +0 -10
  111. package/public/next.svg +0 -1
  112. package/public/vercel.svg +0 -1
  113. package/public/window.svg +0 -1
  114. package/src/app/actions.ts +0 -2
  115. package/src/app/api/ai/route.ts +0 -175
  116. package/src/app/api/edgestore/[...edgestore]/route.ts +0 -28
  117. package/src/app/favicon.ico +0 -0
  118. package/src/app/globals.css +0 -205
  119. package/src/app/layout.tsx +0 -38
  120. package/src/app/page.tsx +0 -12
  121. package/src/components/editor/Core.tsx +0 -220
  122. package/src/components/editor/hooks/instructions-messages.ts +0 -300
  123. package/src/components/editor/hooks/use-mobile.ts +0 -19
  124. package/src/components/editor/hooks/useReport.ts +0 -67
  125. package/src/components/editor/hooks/useResizeObservert.ts +0 -22
  126. package/src/components/editor/index.tsx +0 -39
  127. package/src/components/editor/lexical-on-change.tsx +0 -28
  128. package/src/components/editor/nodes/CollapsibleNode/CollapsibleContainerNode.ts +0 -92
  129. package/src/components/editor/nodes/CollapsibleNode/CollapsibleContentNode.ts +0 -65
  130. package/src/components/editor/nodes/CollapsibleNode/CollapsibleTitleNode.ts +0 -105
  131. package/src/components/editor/nodes/EquationNode/EquationComponent.tsx +0 -143
  132. package/src/components/editor/nodes/EquationNode/EquationNode.tsx +0 -170
  133. package/src/components/editor/nodes/ExcalidrawNode/ExcalidrawComponent.tsx +0 -228
  134. package/src/components/editor/nodes/ExcalidrawNode/ExcalidrawImage.tsx +0 -137
  135. package/src/components/editor/nodes/ExcalidrawNode/ImageResizer.tsx +0 -317
  136. package/src/components/editor/nodes/ExcalidrawNode/index.tsx +0 -204
  137. package/src/components/editor/nodes/FigmaNode/FigmaNode.tsx +0 -134
  138. package/src/components/editor/nodes/Hint/HintComponet.tsx +0 -221
  139. package/src/components/editor/nodes/ImageNode/index.tsx +0 -328
  140. package/src/components/editor/nodes/InlineImageNode/InlineImageComponent.tsx +0 -383
  141. package/src/components/editor/nodes/InlineImageNode/InlineImageNode.css +0 -94
  142. package/src/components/editor/nodes/InlineImageNode/InlineImageNode.tsx +0 -309
  143. package/src/components/editor/nodes/LayoutNode/LayoutContainerNode.ts +0 -146
  144. package/src/components/editor/nodes/LayoutNode/LayoutItemNode.ts +0 -79
  145. package/src/components/editor/nodes/PollNode/index.tsx +0 -204
  146. package/src/components/editor/nodes/TweetNode/index.tsx +0 -214
  147. package/src/components/editor/nodes/index.ts +0 -81
  148. package/src/components/editor/plugins/AutoEmbedPlugin/index.tsx +0 -350
  149. package/src/components/editor/plugins/AutoLinkPlugin/index.tsx +0 -56
  150. package/src/components/editor/plugins/CodeActionMenuPlugin/components/CopyButton.tsx +0 -70
  151. package/src/components/editor/plugins/CodeActionMenuPlugin/components/PrettierButton.tsx +0 -192
  152. package/src/components/editor/plugins/CodeActionMenuPlugin/index.tsx +0 -217
  153. package/src/components/editor/plugins/CodeActionMenuPlugin/utils.ts +0 -26
  154. package/src/components/editor/plugins/CodeHighlightPlugin/index.ts +0 -21
  155. package/src/components/editor/plugins/CollapsiblePlugin/Collapsible.css +0 -76
  156. package/src/components/editor/plugins/CollapsiblePlugin/index.ts +0 -228
  157. package/src/components/editor/plugins/DragDropPastePlugin/index.tsx +0 -44
  158. package/src/components/editor/plugins/DraggableBlockPlugin/index.tsx +0 -52
  159. package/src/components/editor/plugins/EquationsPlugin/index.tsx +0 -85
  160. package/src/components/editor/plugins/ExcalidrawPlugin/index.tsx +0 -98
  161. package/src/components/editor/plugins/FigmaPlugin/index.tsx +0 -42
  162. package/src/components/editor/plugins/FloatingLinkEditorPlugin/index.tsx +0 -445
  163. package/src/components/editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx +0 -275
  164. package/src/components/editor/plugins/InlineImagePlugin/index.tsx +0 -351
  165. package/src/components/editor/plugins/LayoutPlugin/index.tsx +0 -238
  166. package/src/components/editor/plugins/LinkPlugin/index.tsx +0 -36
  167. package/src/components/editor/plugins/LinkWithMetaData/index.tsx +0 -271
  168. package/src/components/editor/plugins/MarkdownShortcutPlugin/index.tsx +0 -11
  169. package/src/components/editor/plugins/MarkdownTransformers/index.tsx +0 -304
  170. package/src/components/editor/plugins/PollPlugin/index.tsx +0 -49
  171. package/src/components/editor/plugins/ShortcutsPlugin/index.tsx +0 -180
  172. package/src/components/editor/plugins/ShortcutsPlugin/shortcuts.ts +0 -253
  173. package/src/components/editor/plugins/SlashCommand/index.tsx +0 -621
  174. package/src/components/editor/plugins/SpeechToTextPlugin/index.ts +0 -127
  175. package/src/components/editor/plugins/TabFocusPlugin/index.ts +0 -58
  176. package/src/components/editor/plugins/TableCellResizer/index.tsx +0 -438
  177. package/src/components/editor/plugins/TablePlugin/index.tsx +0 -99
  178. package/src/components/editor/plugins/ToolbarPlugin/index.tsx +0 -522
  179. package/src/components/editor/plugins/TwitterPlugin/index.ts +0 -35
  180. package/src/components/editor/plugins/YouTubeNode/index.tsx +0 -179
  181. package/src/components/editor/plugins/YouTubePlugin/index.ts +0 -41
  182. package/src/components/editor/themes/editor-theme.ts +0 -113
  183. package/src/components/editor/themes/theme.css +0 -377
  184. package/src/components/editor/utils/ai.ts +0 -291
  185. package/src/components/editor/utils/canUseDOM.ts +0 -12
  186. package/src/components/editor/utils/environment.ts +0 -50
  187. package/src/components/editor/utils/extract-data.ts +0 -166
  188. package/src/components/editor/utils/getAllLexicalChildren.ts +0 -13
  189. package/src/components/editor/utils/getDOMRangeRect.ts +0 -27
  190. package/src/components/editor/utils/getSelectedNode.ts +0 -27
  191. package/src/components/editor/utils/gif.ts +0 -29
  192. package/src/components/editor/utils/invariant.ts +0 -15
  193. package/src/components/editor/utils/setFloatingElemPosition.ts +0 -51
  194. package/src/components/editor/utils/setFloatingElemPositionForLinkEditor.ts +0 -40
  195. package/src/components/editor/utils/setNodePlaceholderFromSelection/getNodePlaceholder.ts +0 -51
  196. package/src/components/editor/utils/setNodePlaceholderFromSelection/setNodePlaceholderFromSelection.ts +0 -15
  197. package/src/components/editor/utils/setNodePlaceholderFromSelection/setPlaceholderOnSelection.ts +0 -114
  198. package/src/components/editor/utils/setNodePlaceholderFromSelection/styles.css +0 -6
  199. package/src/components/editor/utils/url.ts +0 -109
  200. package/src/components/editor/utils/useLayoutEffect.ts +0 -13
  201. package/src/components/providers/QueryProvider.tsx +0 -15
  202. package/src/components/providers/SharedHistoryContext.tsx +0 -28
  203. package/src/components/providers/ToolbarContext.tsx +0 -123
  204. package/src/components/providers/theme-provider.tsx +0 -11
  205. package/src/components/theme/ModeToggle.tsx +0 -40
  206. package/src/components/ui/FileInput.tsx +0 -40
  207. package/src/components/ui/Input.css +0 -32
  208. package/src/components/ui/Select.css +0 -42
  209. package/src/components/ui/Select.tsx +0 -36
  210. package/src/components/ui/TextInput.tsx +0 -48
  211. package/src/components/ui/ai/ai-button.tsx +0 -574
  212. package/src/components/ui/ai/border.tsx +0 -99
  213. package/src/components/ui/ai/placeholder-input-vanish.tsx +0 -282
  214. package/src/components/ui/button.tsx +0 -89
  215. package/src/components/ui/card.tsx +0 -76
  216. package/src/components/ui/checkbox.tsx +0 -30
  217. package/src/components/ui/command.tsx +0 -153
  218. package/src/components/ui/dialog/Dialog.css +0 -25
  219. package/src/components/ui/dialog/Dialog.tsx +0 -34
  220. package/src/components/ui/dialog.tsx +0 -122
  221. package/src/components/ui/drop-downs/background-color.tsx +0 -183
  222. package/src/components/ui/drop-downs/block-format.tsx +0 -159
  223. package/src/components/ui/drop-downs/code.tsx +0 -42
  224. package/src/components/ui/drop-downs/color.tsx +0 -177
  225. package/src/components/ui/drop-downs/font-size.tsx +0 -138
  226. package/src/components/ui/drop-downs/font.tsx +0 -155
  227. package/src/components/ui/drop-downs/index.tsx +0 -122
  228. package/src/components/ui/drop-downs/insert-node.tsx +0 -213
  229. package/src/components/ui/drop-downs/text-align.tsx +0 -123
  230. package/src/components/ui/drop-downs/text-format.tsx +0 -104
  231. package/src/components/ui/dropdown-menu.tsx +0 -201
  232. package/src/components/ui/equation/EquationEditor.css +0 -38
  233. package/src/components/ui/equation/EquationEditor.tsx +0 -56
  234. package/src/components/ui/equation/KatexEquationAlterer.css +0 -41
  235. package/src/components/ui/equation/KatexEquationAlterer.tsx +0 -83
  236. package/src/components/ui/equation/KatexRenderer.tsx +0 -66
  237. package/src/components/ui/excalidraw/ExcalidrawModal.css +0 -64
  238. package/src/components/ui/excalidraw/ExcalidrawModal.tsx +0 -234
  239. package/src/components/ui/excalidraw/Modal.css +0 -62
  240. package/src/components/ui/excalidraw/Modal.tsx +0 -110
  241. package/src/components/ui/hover-card.tsx +0 -29
  242. package/src/components/ui/image/error-image.tsx +0 -17
  243. package/src/components/ui/image/file-upload.tsx +0 -240
  244. package/src/components/ui/image/image-resizer.tsx +0 -297
  245. package/src/components/ui/image/image-toolbar.tsx +0 -264
  246. package/src/components/ui/image/index.tsx +0 -408
  247. package/src/components/ui/image/lazy-image.tsx +0 -68
  248. package/src/components/ui/image/lazy-video.tsx +0 -71
  249. package/src/components/ui/input.tsx +0 -22
  250. package/src/components/ui/models/custom-dialog.tsx +0 -320
  251. package/src/components/ui/models/insert-gif.tsx +0 -90
  252. package/src/components/ui/models/insert-image.tsx +0 -52
  253. package/src/components/ui/models/insert-poll.tsx +0 -29
  254. package/src/components/ui/models/insert-table.tsx +0 -62
  255. package/src/components/ui/models/use-model.tsx +0 -91
  256. package/src/components/ui/poll/poll-component.tsx +0 -304
  257. package/src/components/ui/popover.tsx +0 -33
  258. package/src/components/ui/progress.tsx +0 -28
  259. package/src/components/ui/scroll-area.tsx +0 -48
  260. package/src/components/ui/separator.tsx +0 -31
  261. package/src/components/ui/skeleton.tsx +0 -15
  262. package/src/components/ui/sonner.tsx +0 -31
  263. package/src/components/ui/stepper/step.tsx +0 -179
  264. package/src/components/ui/stepper/stepper.tsx +0 -89
  265. package/src/components/ui/textarea.tsx +0 -22
  266. package/src/components/ui/toggle.tsx +0 -71
  267. package/src/components/ui/tooltip.tsx +0 -32
  268. package/src/components/ui/write/text-format-floting-toolbar.tsx +0 -346
  269. package/src/lib/edgestore.ts +0 -9
  270. package/src/lib/pinecone-client.ts +0 -0
  271. package/src/lib/utils.ts +0 -6
  272. package/src/utils/docSerialization.ts +0 -77
  273. package/src/utils/emoji-list.ts +0 -16615
  274. package/src/utils/getDOMRangeRect.ts +0 -27
  275. package/src/utils/getThemeSelector.ts +0 -25
  276. package/src/utils/isMobileWidth.ts +0 -7
  277. package/src/utils/joinClasses.ts +0 -13
  278. package/src/utils/setFloatingElemPosition.ts +0 -74
  279. package/src/utils/setFloatingElemPositionForLinkEditor.ts +0 -46
  280. package/src/utils/swipe.ts +0 -127
  281. package/src/utils/url.ts +0 -38
  282. package/tsconfig.json +0 -27
@@ -0,0 +1,52 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-YHPNOWFH.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadValues,
7
+ init_react_shim
8
+ } from "./chunk-77KXU36M.mjs";
9
+
10
+ // src/components/providers/UploadContext.tsx
11
+ init_react_shim();
12
+ import React, { createContext, useContext } from "react";
13
+ var UploadContext = createContext(void 0);
14
+ var useUpload = () => useContext(UploadContext);
15
+ var UploadProvider = ({
16
+ config,
17
+ children
18
+ }) => {
19
+ return /* @__PURE__ */ React.createElement(UploadContext.Provider, { value: config || {} }, children);
20
+ };
21
+
22
+ // src/components/ui/progress.tsx
23
+ init_react_shim();
24
+ import * as React2 from "react";
25
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
26
+ var Progress = React2.forwardRef((_a, ref) => {
27
+ var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
28
+ return /* @__PURE__ */ React2.createElement(
29
+ ProgressPrimitive.Root,
30
+ __spreadValues({
31
+ ref,
32
+ className: cn(
33
+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
34
+ className
35
+ )
36
+ }, props),
37
+ /* @__PURE__ */ React2.createElement(
38
+ ProgressPrimitive.Indicator,
39
+ {
40
+ className: "h-full w-full flex-1 bg-primary transition-all",
41
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
42
+ }
43
+ )
44
+ );
45
+ });
46
+ Progress.displayName = ProgressPrimitive.Root.displayName;
47
+
48
+ export {
49
+ Progress,
50
+ useUpload,
51
+ UploadProvider
52
+ };
@@ -0,0 +1,141 @@
1
+ import {
2
+ DropDown
3
+ } from "./chunk-EGMI62PP.mjs";
4
+ import {
5
+ formatBulletList,
6
+ formatCheckList,
7
+ formatCode,
8
+ formatHeading,
9
+ formatNumberedList,
10
+ formatParagraph,
11
+ formatQuote
12
+ } from "./chunk-PZSUSXQG.mjs";
13
+ import {
14
+ React,
15
+ __spreadProps,
16
+ __spreadValues,
17
+ init_react_shim
18
+ } from "./chunk-77KXU36M.mjs";
19
+
20
+ // src/components/ui/drop-downs/block-format.tsx
21
+ init_react_shim();
22
+ import { useMemo } from "react";
23
+ import {
24
+ Pilcrow,
25
+ Heading1,
26
+ Heading2,
27
+ Heading3,
28
+ Heading4,
29
+ Heading5,
30
+ Heading6,
31
+ List,
32
+ ListTodo,
33
+ ListOrdered,
34
+ Braces,
35
+ Quote
36
+ } from "lucide-react";
37
+ function BlockFormatDropDown({
38
+ editor,
39
+ blockType,
40
+ disabled = false,
41
+ style,
42
+ ShowChevronsUpDown = true,
43
+ side,
44
+ sideOffset
45
+ }) {
46
+ const Blocks = useMemo(
47
+ () => ({
48
+ paragraph: {
49
+ icon: /* @__PURE__ */ React.createElement(Pilcrow, { className: "size-4" }),
50
+ label: "paragraph",
51
+ desc: "Just start writing plain text.",
52
+ func: () => formatParagraph(editor)
53
+ },
54
+ h1: {
55
+ icon: /* @__PURE__ */ React.createElement(Heading1, { className: "size-4" }),
56
+ desc: "Heading 1 for main titles.",
57
+ label: "Heading 1",
58
+ func: () => formatHeading(editor, blockType, "h1")
59
+ },
60
+ h2: {
61
+ icon: /* @__PURE__ */ React.createElement(Heading2, { className: "size-4" }),
62
+ desc: "Heading 2 for major sections.",
63
+ label: "Heading 2",
64
+ func: () => formatHeading(editor, blockType, "h2")
65
+ },
66
+ h3: {
67
+ icon: /* @__PURE__ */ React.createElement(Heading3, { className: "size-4" }),
68
+ desc: "Heading 3 for sub-sections.",
69
+ label: "Heading 3",
70
+ func: () => formatHeading(editor, blockType, "h3")
71
+ },
72
+ h4: {
73
+ icon: /* @__PURE__ */ React.createElement(Heading4, { className: "size-4" }),
74
+ desc: "Heading 4 for minor sections.",
75
+ label: "Heading 4",
76
+ func: () => formatHeading(editor, blockType, "h4")
77
+ },
78
+ h5: {
79
+ icon: /* @__PURE__ */ React.createElement(Heading5, { className: "size-4" }),
80
+ desc: "Heading 5 for small headings.",
81
+ label: "Heading 5",
82
+ func: () => formatHeading(editor, blockType, "h5")
83
+ },
84
+ h6: {
85
+ icon: /* @__PURE__ */ React.createElement(Heading6, { className: "size-4" }),
86
+ desc: "Heading 6 for tiny headings.",
87
+ label: "Heading 6",
88
+ func: () => formatHeading(editor, blockType, "h6")
89
+ },
90
+ bullet: {
91
+ icon: /* @__PURE__ */ React.createElement(List, { className: "size-4" }),
92
+ desc: "Bullet list for unordered items.",
93
+ label: "Bullet List",
94
+ func: () => formatBulletList(editor, blockType)
95
+ },
96
+ check: {
97
+ icon: /* @__PURE__ */ React.createElement(ListTodo, { className: "size-4" }),
98
+ desc: "Checklist for tasks or to-dos.",
99
+ label: "check box",
100
+ func: () => formatCheckList(editor, blockType)
101
+ },
102
+ number: {
103
+ icon: /* @__PURE__ */ React.createElement(ListOrdered, { className: "size-4" }),
104
+ desc: "Numbered list for ordered items.",
105
+ label: "Numbered list",
106
+ func: () => formatNumberedList(editor, blockType)
107
+ },
108
+ code: {
109
+ icon: /* @__PURE__ */ React.createElement(Braces, { className: "size-4" }),
110
+ desc: "Code block for snippets.",
111
+ label: "Code",
112
+ func: () => formatCode(editor, blockType)
113
+ },
114
+ quote: {
115
+ icon: /* @__PURE__ */ React.createElement(Quote, { className: "size-4" }),
116
+ desc: "Blockquote for quotations.",
117
+ label: "Blockquote",
118
+ func: () => formatQuote(editor, blockType)
119
+ }
120
+ }),
121
+ [editor]
122
+ );
123
+ const currentBlock = Blocks[blockType] || Blocks.paragraph;
124
+ return /* @__PURE__ */ React.createElement(
125
+ DropDown,
126
+ {
127
+ TriggerClassName: __spreadProps(__spreadValues({}, style), { width: "100%" }),
128
+ disabled,
129
+ side,
130
+ sideOffset,
131
+ className: "h-7 min-w-[29px] w-[29px] px-2 border-none cursor-pointer dark:bg-zinc-850 hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-800",
132
+ TriggerLabel: /* @__PURE__ */ React.createElement(React.Fragment, null, currentBlock.icon, /* @__PURE__ */ React.createElement("span", { className: "max-sm:hidden" }, currentBlock.label)),
133
+ ShowChevronsUpDown,
134
+ values: Object.values(Blocks)
135
+ }
136
+ );
137
+ }
138
+
139
+ export {
140
+ BlockFormatDropDown
141
+ };
@@ -0,0 +1,128 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-YHPNOWFH.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadValues,
7
+ init_react_shim
8
+ } from "./chunk-77KXU36M.mjs";
9
+
10
+ // src/components/ui/command.tsx
11
+ init_react_shim();
12
+ import * as React from "react";
13
+ import { Command as CommandPrimitive } from "cmdk";
14
+ import { Search } from "lucide-react";
15
+ var Command = React.forwardRef((_a, ref) => {
16
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
17
+ return /* @__PURE__ */ React.createElement(
18
+ CommandPrimitive,
19
+ __spreadValues({
20
+ ref,
21
+ className: cn(
22
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover dark:bg-[#020b19]/95 bg-white/90 text-popover-foreground",
23
+ className
24
+ )
25
+ }, props)
26
+ );
27
+ });
28
+ Command.displayName = CommandPrimitive.displayName;
29
+ var CommandInput = React.forwardRef((_a, ref) => {
30
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
31
+ return /* @__PURE__ */ React.createElement("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "" }, /* @__PURE__ */ React.createElement(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ React.createElement(
32
+ CommandPrimitive.Input,
33
+ __spreadValues({
34
+ ref,
35
+ className: cn(
36
+ "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
37
+ className
38
+ )
39
+ }, props)
40
+ ));
41
+ });
42
+ CommandInput.displayName = CommandPrimitive.Input.displayName;
43
+ var CommandList = React.forwardRef((_a, ref) => {
44
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
45
+ return /* @__PURE__ */ React.createElement(
46
+ CommandPrimitive.List,
47
+ __spreadValues({
48
+ ref,
49
+ className: cn("max-h-[300px] overflow-y-auto scrollbar-none overflow-x-hidden", className)
50
+ }, props)
51
+ );
52
+ });
53
+ CommandList.displayName = CommandPrimitive.List.displayName;
54
+ var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ React.createElement(
55
+ CommandPrimitive.Empty,
56
+ __spreadValues({
57
+ ref,
58
+ className: "py-6 text-center text-sm"
59
+ }, props)
60
+ ));
61
+ CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
62
+ var CommandGroup = React.forwardRef((_a, ref) => {
63
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
64
+ return /* @__PURE__ */ React.createElement(
65
+ CommandPrimitive.Group,
66
+ __spreadValues({
67
+ ref,
68
+ className: cn(
69
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
70
+ className
71
+ )
72
+ }, props)
73
+ );
74
+ });
75
+ CommandGroup.displayName = CommandPrimitive.Group.displayName;
76
+ var CommandSeparator = React.forwardRef((_a, ref) => {
77
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
78
+ return /* @__PURE__ */ React.createElement(
79
+ CommandPrimitive.Separator,
80
+ __spreadValues({
81
+ ref,
82
+ className: cn("-mx-1 h-px bg-border", className)
83
+ }, props)
84
+ );
85
+ });
86
+ CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
87
+ var CommandItem = React.forwardRef((_a, ref) => {
88
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
89
+ return /* @__PURE__ */ React.createElement(
90
+ CommandPrimitive.Item,
91
+ __spreadValues({
92
+ ref,
93
+ className: cn(
94
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
95
+ className
96
+ )
97
+ }, props)
98
+ );
99
+ });
100
+ CommandItem.displayName = CommandPrimitive.Item.displayName;
101
+ var CommandShortcut = (_a) => {
102
+ var _b = _a, {
103
+ className
104
+ } = _b, props = __objRest(_b, [
105
+ "className"
106
+ ]);
107
+ return /* @__PURE__ */ React.createElement(
108
+ "span",
109
+ __spreadValues({
110
+ className: cn(
111
+ "ml-auto text-xs tracking-widest text-muted-foreground",
112
+ className
113
+ )
114
+ }, props)
115
+ );
116
+ };
117
+ CommandShortcut.displayName = "CommandShortcut";
118
+
119
+ export {
120
+ Command,
121
+ CommandInput,
122
+ CommandList,
123
+ CommandEmpty,
124
+ CommandGroup,
125
+ CommandSeparator,
126
+ CommandItem,
127
+ CommandShortcut
128
+ };
@@ -0,0 +1,142 @@
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues,
4
+ init_react_shim
5
+ } from "./chunk-77KXU36M.mjs";
6
+
7
+ // src/components/editor/nodes/ExcalidrawNode/index.tsx
8
+ init_react_shim();
9
+ import { DecoratorNode } from "lexical";
10
+ import * as React from "react";
11
+ var ExcalidrawComponent = React.lazy(() => import("./ExcalidrawComponent-XW6646OH.mjs"));
12
+ function $convertExcalidrawElement(domNode) {
13
+ const excalidrawData = domNode.getAttribute("data-lexical-excalidraw-json");
14
+ const styleAttributes = window.getComputedStyle(domNode);
15
+ const heightStr = styleAttributes.getPropertyValue("height");
16
+ const widthStr = styleAttributes.getPropertyValue("width");
17
+ const height = !heightStr || heightStr === "inherit" ? "inherit" : parseInt(heightStr, 10);
18
+ const width = !widthStr || widthStr === "inherit" ? "inherit" : parseInt(widthStr, 10);
19
+ if (excalidrawData) {
20
+ const node = $createExcalidrawNode(excalidrawData, width, height);
21
+ return {
22
+ node
23
+ };
24
+ }
25
+ return null;
26
+ }
27
+ var ExcalidrawNode = class _ExcalidrawNode extends DecoratorNode {
28
+ static getType() {
29
+ return "excalidraw";
30
+ }
31
+ static clone(node) {
32
+ return new _ExcalidrawNode(
33
+ node.__data,
34
+ node.__width,
35
+ node.__height,
36
+ node.__key
37
+ );
38
+ }
39
+ static importJSON(serializedNode) {
40
+ var _a, _b;
41
+ return new _ExcalidrawNode(
42
+ serializedNode.data,
43
+ (_a = serializedNode.width) != null ? _a : "inherit",
44
+ (_b = serializedNode.height) != null ? _b : "inherit"
45
+ ).updateFromJSON(serializedNode);
46
+ }
47
+ exportJSON() {
48
+ return __spreadProps(__spreadValues({}, super.exportJSON()), {
49
+ data: this.__data,
50
+ height: this.__height === "inherit" ? void 0 : this.__height,
51
+ width: this.__width === "inherit" ? void 0 : this.__width
52
+ });
53
+ }
54
+ constructor(data = "[]", width = "inherit", height = "inherit", key) {
55
+ super(key);
56
+ this.__data = data;
57
+ this.__width = width;
58
+ this.__height = height;
59
+ }
60
+ // View
61
+ createDOM(config) {
62
+ const span = document.createElement("span");
63
+ const theme = config.theme;
64
+ const className = theme.image;
65
+ if (className !== void 0) {
66
+ span.className = className;
67
+ }
68
+ return span;
69
+ }
70
+ updateDOM() {
71
+ return false;
72
+ }
73
+ static importDOM() {
74
+ return {
75
+ span: (domNode) => {
76
+ if (!domNode.hasAttribute("data-lexical-excalidraw-json")) {
77
+ return null;
78
+ }
79
+ return {
80
+ conversion: $convertExcalidrawElement,
81
+ priority: 1
82
+ };
83
+ }
84
+ };
85
+ }
86
+ exportDOM(editor) {
87
+ const element = document.createElement("span");
88
+ element.style.display = "inline-block";
89
+ const content = editor.getElementByKey(this.getKey());
90
+ if (content !== null) {
91
+ const svg = content.querySelector("svg");
92
+ if (svg !== null) {
93
+ element.innerHTML = svg.outerHTML;
94
+ }
95
+ }
96
+ element.style.width = this.__width === "inherit" ? "inherit" : `${this.__width}px`;
97
+ element.style.height = this.__height === "inherit" ? "inherit" : `${this.__height}px`;
98
+ element.setAttribute("data-lexical-excalidraw-json", this.__data);
99
+ return { element };
100
+ }
101
+ setData(data) {
102
+ const self = this.getWritable();
103
+ self.__data = data;
104
+ }
105
+ getWidth() {
106
+ return this.getLatest().__width;
107
+ }
108
+ setWidth(width) {
109
+ const self = this.getWritable();
110
+ self.__width = width;
111
+ }
112
+ getHeight() {
113
+ return this.getLatest().__height;
114
+ }
115
+ setHeight(height) {
116
+ const self = this.getWritable();
117
+ self.__height = height;
118
+ }
119
+ decorate(editor, config) {
120
+ return /* @__PURE__ */ React.createElement(
121
+ ExcalidrawComponent,
122
+ {
123
+ nodeKey: this.getKey(),
124
+ data: this.__data,
125
+ width: this.__width,
126
+ height: this.__height
127
+ }
128
+ );
129
+ }
130
+ };
131
+ function $createExcalidrawNode(data = "[]", width = "inherit", height = "inherit") {
132
+ return new ExcalidrawNode(data, width, height);
133
+ }
134
+ function $isExcalidrawNode(node) {
135
+ return node instanceof ExcalidrawNode;
136
+ }
137
+
138
+ export {
139
+ ExcalidrawNode,
140
+ $createExcalidrawNode,
141
+ $isExcalidrawNode
142
+ };