@mhamz.01/easyflow-texteditor 0.1.81 → 0.1.82

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/index.mjs CHANGED
@@ -80,35 +80,16 @@ function Button({
80
80
  );
81
81
  }
82
82
 
83
- // src/components/ui/input.tsx
84
- import { jsx as jsx2 } from "react/jsx-runtime";
85
- function Input({ className, type, ...props }) {
86
- return /* @__PURE__ */ jsx2(
87
- "input",
88
- {
89
- type,
90
- "data-slot": "input",
91
- className: cn(
92
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
93
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
94
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
95
- className
96
- ),
97
- ...props
98
- }
99
- );
100
- }
101
-
102
83
  // src/components/ui/separator.tsx
103
84
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
104
- import { jsx as jsx3 } from "react/jsx-runtime";
85
+ import { jsx as jsx2 } from "react/jsx-runtime";
105
86
  function Separator({
106
87
  className,
107
88
  orientation = "horizontal",
108
89
  decorative = true,
109
90
  ...props
110
91
  }) {
111
- return /* @__PURE__ */ jsx3(
92
+ return /* @__PURE__ */ jsx2(
112
93
  SeparatorPrimitive.Root,
113
94
  {
114
95
  "data-slot": "separator",
@@ -126,20 +107,20 @@ function Separator({
126
107
  // src/components/ui/sheet.tsx
127
108
  import * as SheetPrimitive from "@radix-ui/react-dialog";
128
109
  import { XIcon } from "lucide-react";
129
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
110
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
130
111
  function Sheet({ ...props }) {
131
- return /* @__PURE__ */ jsx4(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
112
+ return /* @__PURE__ */ jsx3(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
132
113
  }
133
114
  function SheetPortal({
134
115
  ...props
135
116
  }) {
136
- return /* @__PURE__ */ jsx4(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
117
+ return /* @__PURE__ */ jsx3(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
137
118
  }
138
119
  function SheetOverlay({
139
120
  className,
140
121
  ...props
141
122
  }) {
142
- return /* @__PURE__ */ jsx4(
123
+ return /* @__PURE__ */ jsx3(
143
124
  SheetPrimitive.Overlay,
144
125
  {
145
126
  "data-slot": "sheet-overlay",
@@ -158,7 +139,7 @@ function SheetContent({
158
139
  ...props
159
140
  }) {
160
141
  return /* @__PURE__ */ jsxs(SheetPortal, { children: [
161
- /* @__PURE__ */ jsx4(SheetOverlay, {}),
142
+ /* @__PURE__ */ jsx3(SheetOverlay, {}),
162
143
  /* @__PURE__ */ jsxs(
163
144
  SheetPrimitive.Content,
164
145
  {
@@ -175,8 +156,8 @@ function SheetContent({
175
156
  children: [
176
157
  children,
177
158
  /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
178
- /* @__PURE__ */ jsx4(XIcon, { className: "size-4" }),
179
- /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Close" })
159
+ /* @__PURE__ */ jsx3(XIcon, { className: "size-4" }),
160
+ /* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Close" })
180
161
  ] })
181
162
  ]
182
163
  }
@@ -184,7 +165,7 @@ function SheetContent({
184
165
  ] });
185
166
  }
186
167
  function SheetHeader({ className, ...props }) {
187
- return /* @__PURE__ */ jsx4(
168
+ return /* @__PURE__ */ jsx3(
188
169
  "div",
189
170
  {
190
171
  "data-slot": "sheet-header",
@@ -197,7 +178,7 @@ function SheetTitle({
197
178
  className,
198
179
  ...props
199
180
  }) {
200
- return /* @__PURE__ */ jsx4(
181
+ return /* @__PURE__ */ jsx3(
201
182
  SheetPrimitive.Title,
202
183
  {
203
184
  "data-slot": "sheet-title",
@@ -210,7 +191,7 @@ function SheetDescription({
210
191
  className,
211
192
  ...props
212
193
  }) {
213
- return /* @__PURE__ */ jsx4(
194
+ return /* @__PURE__ */ jsx3(
214
195
  SheetPrimitive.Description,
215
196
  {
216
197
  "data-slot": "sheet-description",
@@ -222,12 +203,12 @@ function SheetDescription({
222
203
 
223
204
  // src/components/ui/tooltip.tsx
224
205
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
225
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
206
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
226
207
  function TooltipProvider({
227
208
  delayDuration = 0,
228
209
  ...props
229
210
  }) {
230
- return /* @__PURE__ */ jsx5(
211
+ return /* @__PURE__ */ jsx4(
231
212
  TooltipPrimitive.Provider,
232
213
  {
233
214
  "data-slot": "tooltip-provider",
@@ -238,7 +219,7 @@ function TooltipProvider({
238
219
  }
239
220
 
240
221
  // src/components/ui/sidebar.tsx
241
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
222
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
242
223
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
243
224
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
244
225
  var SIDEBAR_WIDTH = "16rem";
@@ -293,7 +274,7 @@ function SidebarProvider({
293
274
  }),
294
275
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
295
276
  );
296
- return /* @__PURE__ */ jsx6(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx6(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx6(
277
+ return /* @__PURE__ */ jsx5(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx5(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx5(
297
278
  "div",
298
279
  {
299
280
  "data-slot": "sidebar-wrapper",
@@ -322,7 +303,7 @@ function Sidebar({
322
303
  }) {
323
304
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
324
305
  if (collapsible === "none") {
325
- return /* @__PURE__ */ jsx6(
306
+ return /* @__PURE__ */ jsx5(
326
307
  "div",
327
308
  {
328
309
  "data-slot": "sidebar",
@@ -336,7 +317,7 @@ function Sidebar({
336
317
  );
337
318
  }
338
319
  if (isMobile) {
339
- return /* @__PURE__ */ jsx6(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs3(
320
+ return /* @__PURE__ */ jsx5(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs3(
340
321
  SheetContent,
341
322
  {
342
323
  "data-sidebar": "sidebar",
@@ -349,10 +330,10 @@ function Sidebar({
349
330
  side,
350
331
  children: [
351
332
  /* @__PURE__ */ jsxs3(SheetHeader, { className: "sr-only", children: [
352
- /* @__PURE__ */ jsx6(SheetTitle, { children: "Sidebar" }),
353
- /* @__PURE__ */ jsx6(SheetDescription, { children: "Displays the mobile sidebar." })
333
+ /* @__PURE__ */ jsx5(SheetTitle, { children: "Sidebar" }),
334
+ /* @__PURE__ */ jsx5(SheetDescription, { children: "Displays the mobile sidebar." })
354
335
  ] }),
355
- /* @__PURE__ */ jsx6("div", { className: "flex h-full w-full flex-col", children })
336
+ /* @__PURE__ */ jsx5("div", { className: "flex h-full w-full flex-col", children })
356
337
  ]
357
338
  }
358
339
  ) });
@@ -367,7 +348,7 @@ function Sidebar({
367
348
  "data-side": side,
368
349
  "data-slot": "sidebar",
369
350
  children: [
370
- /* @__PURE__ */ jsx6(
351
+ /* @__PURE__ */ jsx5(
371
352
  "div",
372
353
  {
373
354
  "data-slot": "sidebar-gap",
@@ -379,7 +360,7 @@ function Sidebar({
379
360
  )
380
361
  }
381
362
  ),
382
- /* @__PURE__ */ jsx6(
363
+ /* @__PURE__ */ jsx5(
383
364
  "div",
384
365
  {
385
366
  "data-slot": "sidebar-container",
@@ -392,7 +373,7 @@ function Sidebar({
392
373
  className
393
374
  ),
394
375
  ...props,
395
- children: /* @__PURE__ */ jsx6(
376
+ children: /* @__PURE__ */ jsx5(
396
377
  "div",
397
378
  {
398
379
  "data-sidebar": "sidebar",
@@ -427,14 +408,14 @@ function SidebarTrigger({
427
408
  },
428
409
  ...props,
429
410
  children: [
430
- /* @__PURE__ */ jsx6(PanelLeftIcon, { color: "white" }),
431
- /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Toggle Sidebar" })
411
+ /* @__PURE__ */ jsx5(PanelLeftIcon, { color: "white" }),
412
+ /* @__PURE__ */ jsx5("span", { className: "sr-only", children: "Toggle Sidebar" })
432
413
  ]
433
414
  }
434
415
  );
435
416
  }
436
417
  function SidebarInset({ className, ...props }) {
437
- return /* @__PURE__ */ jsx6(
418
+ return /* @__PURE__ */ jsx5(
438
419
  "main",
439
420
  {
440
421
  "data-slot": "sidebar-inset",
@@ -448,7 +429,7 @@ function SidebarInset({ className, ...props }) {
448
429
  );
449
430
  }
450
431
  function SidebarContent({ className, ...props }) {
451
- return /* @__PURE__ */ jsx6(
432
+ return /* @__PURE__ */ jsx5(
452
433
  "div",
453
434
  {
454
435
  "data-slot": "sidebar-content",
@@ -462,7 +443,7 @@ function SidebarContent({ className, ...props }) {
462
443
  );
463
444
  }
464
445
  function SidebarGroup({ className, ...props }) {
465
- return /* @__PURE__ */ jsx6(
446
+ return /* @__PURE__ */ jsx5(
466
447
  "div",
467
448
  {
468
449
  "data-slot": "sidebar-group",
@@ -478,7 +459,7 @@ function SidebarGroupLabel({
478
459
  ...props
479
460
  }) {
480
461
  const Comp = asChild ? Slot2 : "div";
481
- return /* @__PURE__ */ jsx6(
462
+ return /* @__PURE__ */ jsx5(
482
463
  Comp,
483
464
  {
484
465
  "data-slot": "sidebar-group-label",
@@ -493,7 +474,7 @@ function SidebarGroupLabel({
493
474
  );
494
475
  }
495
476
  function SidebarMenu({ className, ...props }) {
496
- return /* @__PURE__ */ jsx6(
477
+ return /* @__PURE__ */ jsx5(
497
478
  "ul",
498
479
  {
499
480
  "data-slot": "sidebar-menu",
@@ -504,7 +485,7 @@ function SidebarMenu({ className, ...props }) {
504
485
  );
505
486
  }
506
487
  function SidebarMenuItem({ className, ...props }) {
507
- return /* @__PURE__ */ jsx6(
488
+ return /* @__PURE__ */ jsx5(
508
489
  "li",
509
490
  {
510
491
  "data-slot": "sidebar-menu-item",
@@ -536,101 +517,151 @@ var sidebarMenuButtonVariants = cva2(
536
517
  );
537
518
 
538
519
  // src/components/editor-shell/EditorShell.tsx
539
- import { jsx as jsx7 } from "react/jsx-runtime";
520
+ import { jsx as jsx6 } from "react/jsx-runtime";
540
521
  function EditorShell({ children }) {
541
- return /* @__PURE__ */ jsx7(
522
+ return /* @__PURE__ */ jsx6(
542
523
  "div",
543
524
  {
544
525
  className: "\r\n relative w-full h-full flex flex-col min-h-0 isolate\r\n ",
545
526
  "data-easyflow-editor": true,
546
- children: /* @__PURE__ */ jsx7(SidebarProvider, { children })
527
+ children: /* @__PURE__ */ jsx6(SidebarProvider, { children })
547
528
  }
548
529
  );
549
530
  }
550
531
 
551
532
  // src/components/editorLayout/editorLayout.tsx
552
- import { useState as useState4, useEffect as useEffect2, useRef as useRef2, useCallback as useCallback3, useMemo as useMemo3 } from "react";
533
+ import { useState as useState7, useEffect as useEffect2, useRef, useCallback as useCallback5, useMemo as useMemo2 } from "react";
553
534
 
554
535
  // src/components/sidebar/EditorSidebar.tsx
555
- import { useState as useState3, memo, useCallback as useCallback2 } from "react";
556
- import { MoreHorizontal, Plus, FileText } from "lucide-react";
557
- import { motion, AnimatePresence } from "framer-motion";
536
+ import { memo as memo5 } from "react";
537
+ import { Plus } from "lucide-react";
538
+ import { AnimatePresence as AnimatePresence2 } from "framer-motion";
558
539
 
559
- // src/components/ui/dropdown-menu.tsx
560
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
561
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
562
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
563
- function DropdownMenu({
564
- ...props
565
- }) {
566
- return /* @__PURE__ */ jsx8(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
567
- }
568
- function DropdownMenuTrigger({
569
- ...props
540
+ // src/components/sidebar/tabItem.tsx
541
+ import { useState as useState6, memo as memo4, useCallback as useCallback4 } from "react";
542
+ import { FileText as FileText2, ChevronRight } from "lucide-react";
543
+ import { motion as motion2, AnimatePresence } from "framer-motion";
544
+
545
+ // src/components/sidebar/inlineInput.tsx
546
+ import { useState as useState3, memo, useCallback as useCallback2 } from "react";
547
+ import { jsx as jsx7 } from "react/jsx-runtime";
548
+ var InlineInput = memo(function InlineInput2({
549
+ value,
550
+ onCommit,
551
+ onCancel,
552
+ className = ""
570
553
  }) {
571
- return /* @__PURE__ */ jsx8(
572
- DropdownMenuPrimitive.Trigger,
573
- {
574
- "data-slot": "dropdown-menu-trigger",
575
- ...props
576
- }
554
+ const [tempValue, setTempValue] = useState3(value);
555
+ const handleCommit = useCallback2(() => {
556
+ onCommit(tempValue.trim() || "Untitled");
557
+ }, [tempValue, onCommit]);
558
+ const handleKeyDown = useCallback2(
559
+ (e) => {
560
+ if (e.key === "Enter") {
561
+ e.preventDefault();
562
+ handleCommit();
563
+ } else if (e.key === "Escape") {
564
+ e.preventDefault();
565
+ onCancel();
566
+ }
567
+ },
568
+ [handleCommit, onCancel]
577
569
  );
578
- }
579
- function DropdownMenuContent({
580
- className,
581
- sideOffset = 4,
582
- ...props
583
- }) {
584
- return /* @__PURE__ */ jsx8(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx8(
585
- DropdownMenuPrimitive.Content,
570
+ return /* @__PURE__ */ jsx7(
571
+ "input",
586
572
  {
587
- "data-slot": "dropdown-menu-content",
588
- sideOffset,
589
- className: cn(
590
- "bg-[#171717] text-[#a1a1a5] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[10px] border-[#e8e8fd0d] border p-1 shadow-md",
591
- className
592
- ),
593
- ...props
573
+ type: "text",
574
+ value: tempValue,
575
+ autoFocus: true,
576
+ onChange: (e) => setTempValue(e.target.value),
577
+ onBlur: handleCommit,
578
+ onKeyDown: handleKeyDown,
579
+ className: `bg-background border border-input rounded px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-ring ${className}`,
580
+ onClick: (e) => e.stopPropagation()
594
581
  }
595
- ) });
596
- }
597
- function DropdownMenuItem({
598
- className,
599
- inset,
600
- variant = "default",
601
- ...props
582
+ );
583
+ });
584
+
585
+ // src/components/sidebar/optionsMenu.tsx
586
+ import { useState as useState4, memo as memo2 } from "react";
587
+ import { MoreHorizontal } from "lucide-react";
588
+ import { Fragment, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
589
+ var OptionsMenu = memo2(function OptionsMenu2({
590
+ canDelete = true,
591
+ onAddSubTab,
592
+ onDelete
602
593
  }) {
603
- return /* @__PURE__ */ jsx8(
604
- DropdownMenuPrimitive.Item,
605
- {
606
- "data-slot": "dropdown-menu-item",
607
- "data-inset": inset,
608
- "data-variant": variant,
609
- className: cn(
610
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
611
- className
594
+ const [isOpen, setIsOpen] = useState4(false);
595
+ return /* @__PURE__ */ jsxs4("div", { className: "relative", children: [
596
+ /* @__PURE__ */ jsx8(
597
+ "button",
598
+ {
599
+ onClick: (e) => {
600
+ e.stopPropagation();
601
+ setIsOpen(!isOpen);
602
+ },
603
+ className: "opacity-0 group-hover:opacity-100 rounded p-1 transition-all duration-150 hover:bg-accent/80",
604
+ "aria-label": "Options",
605
+ children: /* @__PURE__ */ jsx8(MoreHorizontal, { size: 14 })
606
+ }
607
+ ),
608
+ isOpen && /* @__PURE__ */ jsxs4(Fragment, { children: [
609
+ /* @__PURE__ */ jsx8(
610
+ "div",
611
+ {
612
+ className: "fixed inset-0 z-10",
613
+ onClick: () => setIsOpen(false)
614
+ }
612
615
  ),
613
- ...props
614
- }
615
- );
616
- }
616
+ /* @__PURE__ */ jsxs4("div", { className: "absolute right-0 top-full mt-1 z-20 w-40 rounded-md border bg-popover shadow-lg", children: [
617
+ onAddSubTab && /* @__PURE__ */ jsx8(
618
+ "button",
619
+ {
620
+ onClick: (e) => {
621
+ e.stopPropagation();
622
+ onAddSubTab();
623
+ setIsOpen(false);
624
+ },
625
+ className: "w-full px-3 py-2 text-left text-sm hover:bg-accent transition-colors",
626
+ children: "Add subtab"
627
+ }
628
+ ),
629
+ canDelete && /* @__PURE__ */ jsx8(
630
+ "button",
631
+ {
632
+ onClick: (e) => {
633
+ e.stopPropagation();
634
+ onDelete();
635
+ setIsOpen(false);
636
+ },
637
+ className: "w-full px-3 py-2 text-left text-sm text-red-500 hover:bg-accent hover:text-red-600 transition-colors",
638
+ children: "Delete"
639
+ }
640
+ )
641
+ ] })
642
+ ] })
643
+ ] });
644
+ });
617
645
 
618
- // src/components/sidebar/EditorSidebar.tsx
619
- import { ChevronRight } from "lucide-react";
620
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
646
+ // src/components/sidebar/subtabItem.tsx
647
+ import { useState as useState5, memo as memo3, useCallback as useCallback3 } from "react";
648
+ import { FileText } from "lucide-react";
649
+ import { motion } from "framer-motion";
650
+
651
+ // src/types/animations.ts
621
652
  var tabVariants = {
622
653
  initial: { opacity: 0, x: -20, height: 0 },
623
654
  animate: {
624
655
  opacity: 1,
625
656
  x: 0,
626
657
  height: "auto",
627
- transition: { duration: 0.3, ease: "easeOut" }
658
+ transition: { duration: 0.2, ease: "easeOut" }
628
659
  },
629
660
  exit: {
630
661
  opacity: 0,
631
662
  x: -20,
632
663
  height: 0,
633
- transition: { duration: 0.2, ease: "easeIn" }
664
+ transition: { duration: 0.15, ease: "easeIn" }
634
665
  }
635
666
  };
636
667
  var subtabVariants = {
@@ -639,176 +670,45 @@ var subtabVariants = {
639
670
  opacity: 1,
640
671
  x: 0,
641
672
  height: "auto",
642
- transition: { duration: 0.25, ease: "easeOut" }
673
+ transition: { duration: 0.15, ease: "easeOut" }
643
674
  },
644
675
  exit: {
645
676
  opacity: 0,
646
677
  x: -10,
647
678
  height: 0,
648
- transition: { duration: 0.15, ease: "easeIn" }
679
+ transition: { duration: 0.1, ease: "easeIn" }
649
680
  }
650
681
  };
651
- var SubTabTitle = memo(function SubTabTitle2({
652
- isEditing,
653
- title,
654
- tempTitle,
655
- onTitleChange,
656
- onStartEdit,
657
- onCommit,
658
- onCancel,
659
- onSelect,
660
- tabId,
661
- subTabId
662
- }) {
663
- return isEditing ? /* @__PURE__ */ jsx9(
664
- Input,
665
- {
666
- value: tempTitle,
667
- autoFocus: true,
668
- onChange: (e) => onTitleChange(e.target.value),
669
- onBlur: onCommit,
670
- onKeyDown: (e) => {
671
- if (e.key === "Enter") onCommit();
672
- if (e.key === "Escape") onCancel();
673
- },
674
- className: "h-6 transition-all duration-200"
675
- }
676
- ) : /* @__PURE__ */ jsx9(
677
- "button",
678
- {
679
- className: "w-full truncate text-left transition-colors duration-200 hover:text-foreground",
680
- onClick: onSelect,
681
- onDoubleClick: onStartEdit,
682
- children: title
683
- }
684
- );
685
- });
686
- var TabTitle = memo(function TabTitle2({
687
- isEditing,
688
- title,
689
- tempTitle,
690
- onTitleChange,
691
- onStartEdit,
692
- onCommit,
693
- onCancel,
694
- onSelect
695
- }) {
696
- return isEditing ? /* @__PURE__ */ jsx9(
697
- Input,
698
- {
699
- value: tempTitle,
700
- autoFocus: true,
701
- onChange: (e) => onTitleChange(e.target.value),
702
- onBlur: onCommit,
703
- onKeyDown: (e) => {
704
- if (e.key === "Enter") onCommit();
705
- if (e.key === "Escape") onCancel();
706
- },
707
- className: "h-7 transition-all duration-200"
708
- }
709
- ) : /* @__PURE__ */ jsx9(
710
- "button",
711
- {
712
- className: "w-full truncate text-left text-sm transition-colors duration-200 hover:text-foreground",
713
- onClick: onSelect,
714
- onDoubleClick: onStartEdit,
715
- children: title
716
- }
717
- );
718
- });
719
- var SubTabMenu = memo(function SubTabMenu2({
720
- onDelete
721
- }) {
722
- return /* @__PURE__ */ jsxs5(DropdownMenu, { children: [
723
- /* @__PURE__ */ jsx9(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx9(
724
- "button",
725
- {
726
- className: "opacity-0 group-hover:opacity-100 rounded p-1 transition-all duration-200 hover:bg-accent/80",
727
- "aria-label": "Subtab options",
728
- children: /* @__PURE__ */ jsx9(MoreHorizontal, { size: 14 })
729
- }
730
- ) }),
731
- /* @__PURE__ */ jsx9(DropdownMenuContent, { align: "end", className: "w-40", children: /* @__PURE__ */ jsx9(
732
- DropdownMenuItem,
733
- {
734
- className: "text-red-500 cursor-pointer transition-colors duration-150 focus:text-red-600",
735
- onClick: onDelete,
736
- children: "Delete"
737
- }
738
- ) })
739
- ] });
740
- });
741
- var TabMenu = memo(function TabMenu2({
742
- canDelete,
743
- onAddSubTab,
744
- onDelete
745
- }) {
746
- return /* @__PURE__ */ jsxs5(DropdownMenu, { children: [
747
- /* @__PURE__ */ jsx9(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx9(
748
- "button",
749
- {
750
- className: "opacity-0 group-hover:opacity-100 rounded p-1 transition-all duration-200 hover:bg-accent/80",
751
- "aria-label": "Tab options",
752
- children: /* @__PURE__ */ jsx9(MoreHorizontal, { size: 14 })
753
- }
754
- ) }),
755
- /* @__PURE__ */ jsxs5(DropdownMenuContent, { align: "end", className: "w-40", children: [
756
- /* @__PURE__ */ jsx9(
757
- DropdownMenuItem,
758
- {
759
- onClick: onAddSubTab,
760
- className: "cursor-pointer transition-colors duration-150",
761
- children: "Add subtab"
762
- }
763
- ),
764
- canDelete && /* @__PURE__ */ jsx9(
765
- DropdownMenuItem,
766
- {
767
- className: "text-red-500 cursor-pointer transition-colors duration-150 focus:text-red-600",
768
- onClick: onDelete,
769
- children: "Delete"
770
- }
771
- )
772
- ] })
773
- ] });
774
- });
775
- var SubTabItem = memo(
682
+
683
+ // src/components/sidebar/subtabItem.tsx
684
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
685
+ var SubTabItem = memo3(
776
686
  function SubTabItem2({
777
- tab,
778
- st,
779
- activeSubTabId,
780
- editingSubId,
781
- tempTitle,
687
+ subTab,
688
+ tabId,
689
+ isActive,
782
690
  onSelect,
783
- startRenameSubTab,
784
- commitRenameSubTab,
785
- setEditingSubId,
786
- setTempTitle,
787
- onDeleteSubTab
691
+ onRename,
692
+ onDelete
788
693
  }) {
789
- const isActiveSubTab = st.id === activeSubTabId;
790
- const isEditing = editingSubId === st.id;
791
- const handleSelect = useCallback2(() => {
792
- onSelect(tab.id, st.id);
793
- }, [onSelect, tab.id, st.id]);
794
- const handleEdit = useCallback2(() => {
795
- startRenameSubTab(st.id, st.title);
796
- }, [startRenameSubTab, st.id, st.title]);
797
- const handleCommit = useCallback2(() => {
798
- commitRenameSubTab(tab.id);
799
- }, [commitRenameSubTab, tab.id]);
800
- const handleDelete = useCallback2(() => {
801
- onDeleteSubTab(tab.id, st.id);
802
- }, [onDeleteSubTab, tab.id, st.id]);
803
- const handleTitleChange = useCallback2(
804
- (val) => {
805
- setTempTitle(val);
694
+ const [isEditing, setIsEditing] = useState5(false);
695
+ const handleDoubleClick = useCallback3(
696
+ (e) => {
697
+ e.stopPropagation();
698
+ setIsEditing(true);
699
+ },
700
+ []
701
+ );
702
+ const handleCommit = useCallback3(
703
+ (title) => {
704
+ onRename(title);
705
+ setIsEditing(false);
806
706
  },
807
- [setTempTitle]
707
+ [onRename]
808
708
  );
809
- const handleCancel = useCallback2(() => {
810
- setEditingSubId(null);
811
- }, [setEditingSubId]);
709
+ const handleCancel = useCallback3(() => {
710
+ setIsEditing(false);
711
+ }, []);
812
712
  return /* @__PURE__ */ jsxs5(
813
713
  motion.div,
814
714
  {
@@ -819,206 +719,191 @@ var SubTabItem = memo(
819
719
  layout: true,
820
720
  className: `
821
721
  group ml-9 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm
822
- transition-all duration-200 ease-in-out
823
- ${isActiveSubTab ? "bg-accent" : "hover:bg-accent/50"}
722
+ transition-colors duration-150
723
+ ${isActive ? "bg-accent" : "hover:bg-accent/50"}
824
724
  `,
825
725
  children: [
826
726
  /* @__PURE__ */ jsx9(
827
727
  FileText,
828
728
  {
829
729
  size: 14,
830
- className: `flex-shrink-0 transition-all duration-200 ${isActiveSubTab ? "opacity-100" : "opacity-50 group-hover:opacity-100"}`
730
+ className: `flex-shrink-0 transition-opacity duration-150 ${isActive ? "opacity-100" : "opacity-50 group-hover:opacity-100"}`
831
731
  }
832
732
  ),
833
- /* @__PURE__ */ jsx9("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx9(
834
- SubTabTitle,
733
+ /* @__PURE__ */ jsx9("div", { className: "flex-1 min-w-0", children: isEditing ? /* @__PURE__ */ jsx9(
734
+ InlineInput,
835
735
  {
836
- isEditing,
837
- title: st.title,
838
- tempTitle,
839
- onTitleChange: handleTitleChange,
840
- onStartEdit: handleEdit,
736
+ value: subTab.title,
841
737
  onCommit: handleCommit,
842
738
  onCancel: handleCancel,
843
- onSelect: handleSelect,
844
- tabId: tab.id,
845
- subTabId: st.id
739
+ className: "h-6 w-full"
740
+ }
741
+ ) : /* @__PURE__ */ jsx9(
742
+ "button",
743
+ {
744
+ className: "w-full truncate text-left transition-colors duration-150 hover:text-foreground",
745
+ onClick: onSelect,
746
+ onDoubleClick: handleDoubleClick,
747
+ children: subTab.title
846
748
  }
847
749
  ) }),
848
- /* @__PURE__ */ jsx9(SubTabMenu, { onDelete: handleDelete })
750
+ /* @__PURE__ */ jsx9(OptionsMenu, { onDelete })
849
751
  ]
850
- },
851
- st.id
752
+ }
852
753
  );
853
754
  },
854
- (prevProps, nextProps) => {
855
- return prevProps.st.id === nextProps.st.id && prevProps.activeSubTabId === nextProps.activeSubTabId && prevProps.editingSubId === nextProps.editingSubId && prevProps.tempTitle === nextProps.tempTitle && prevProps.st.title === nextProps.st.title;
856
- }
755
+ (prev, next) => prev.subTab.id === next.subTab.id && prev.subTab.title === next.subTab.title && prev.isActive === next.isActive
857
756
  );
858
- var TabItem = memo(
757
+
758
+ // src/components/sidebar/tabItem.tsx
759
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
760
+ var TabItem = memo4(
859
761
  function TabItem2({
860
762
  tab,
861
- activeTabId,
763
+ isActive,
764
+ hasActiveSubTab,
862
765
  activeSubTabId,
863
- canDeleteTab,
864
- editingId,
865
- editingSubId,
866
- tempTitle,
867
- openTabs,
766
+ canDelete,
868
767
  onSelect,
869
- onAddSubTab,
768
+ onRename,
870
769
  onDelete,
871
- startRenameTab,
872
- startRenameSubTab,
873
- commitRenameTab,
874
- commitRenameSubTab,
875
- setEditingId,
876
- setEditingSubId,
877
- setTempTitle,
878
- toggleTabOpen,
770
+ onAddSubTab,
879
771
  onRenameSubTab,
880
- onDeleteSubTab,
881
- setOpenTabs
772
+ onDeleteSubTab
882
773
  }) {
883
- const isOpen = openTabs[tab.id];
774
+ const [isEditing, setIsEditing] = useState6(false);
775
+ const [isOpen, setIsOpen] = useState6(hasActiveSubTab);
884
776
  const hasSubtabs = tab.subtabs.length > 0;
885
- const isActiveTab = tab.id === activeTabId && !activeSubTabId;
886
- const isEditing = editingId === tab.id;
887
- const handleSelect = useCallback2(() => {
888
- onSelect(tab.id);
889
- }, [onSelect, tab.id]);
890
- const handleEdit = useCallback2(() => {
891
- startRenameTab(tab.id, tab.title);
892
- }, [startRenameTab, tab.id, tab.title]);
893
- const handleCommit = useCallback2(() => {
894
- commitRenameTab();
895
- }, [commitRenameTab]);
896
- const handleTitleChange = useCallback2(
897
- (val) => {
898
- setTempTitle(val);
777
+ const handleDoubleClick = useCallback4(
778
+ (e) => {
779
+ e.stopPropagation();
780
+ setIsEditing(true);
781
+ },
782
+ []
783
+ );
784
+ const handleCommit = useCallback4(
785
+ (title) => {
786
+ onRename(title);
787
+ setIsEditing(false);
899
788
  },
900
- [setTempTitle]
789
+ [onRename]
901
790
  );
902
- const handleCancel = useCallback2(() => {
903
- setEditingId(null);
904
- }, [setEditingId]);
905
- const handleAddSubTab = useCallback2(() => {
906
- onAddSubTab(tab.id);
907
- setOpenTabs((prev) => ({
908
- ...prev,
909
- [tab.id]: true
910
- }));
911
- }, [onAddSubTab, tab.id, setOpenTabs]);
912
- const handleToggle = useCallback2(
791
+ const handleCancel = useCallback4(() => {
792
+ setIsEditing(false);
793
+ }, []);
794
+ const handleToggle = useCallback4(
913
795
  (e) => {
914
796
  e.stopPropagation();
915
- toggleTabOpen(tab.id);
797
+ setIsOpen((prev) => !prev);
916
798
  },
917
- [toggleTabOpen, tab.id]
799
+ []
918
800
  );
919
- const handleDelete = useCallback2(() => {
920
- onDelete(tab.id);
921
- }, [onDelete, tab.id]);
922
- return /* @__PURE__ */ jsx9(
923
- motion.div,
801
+ const handleAddSubTab = useCallback4(() => {
802
+ onAddSubTab();
803
+ setIsOpen(true);
804
+ }, [onAddSubTab]);
805
+ if (hasActiveSubTab && !isOpen) {
806
+ setIsOpen(true);
807
+ }
808
+ return /* @__PURE__ */ jsxs6(
809
+ motion2.div,
924
810
  {
925
811
  variants: tabVariants,
926
812
  initial: "initial",
927
813
  animate: "animate",
928
814
  exit: "exit",
929
815
  layout: true,
930
- children: /* @__PURE__ */ jsxs5(SidebarMenuItem, { className: "list-none", children: [
931
- /* @__PURE__ */ jsxs5(
816
+ children: [
817
+ /* @__PURE__ */ jsxs6(
932
818
  "div",
933
819
  {
934
820
  className: `
935
- group flex items-center gap-2 rounded-md px-2 py-1.5
936
- transition-all duration-200 ease-in-out
937
- ${isActiveTab ? "bg-accent" : "hover:bg-accent/50"}
938
- `,
821
+ group flex items-center gap-2 rounded-md px-2 py-1.5
822
+ transition-colors duration-150
823
+ ${isActive ? "bg-accent" : "hover:bg-accent/50"}
824
+ `,
939
825
  children: [
940
- hasSubtabs && /* @__PURE__ */ jsx9(
826
+ hasSubtabs && /* @__PURE__ */ jsx10(
941
827
  "button",
942
828
  {
943
829
  onClick: handleToggle,
944
- className: "flex h-5 w-5 items-center justify-center rounded transition-all duration-200 hover:bg-accent/80",
945
- "aria-label": isOpen ? "Collapse subtabs" : "Expand subtabs",
946
- children: /* @__PURE__ */ jsx9(
830
+ className: "flex h-5 w-5 items-center justify-center rounded transition-all duration-150 hover:bg-accent/80",
831
+ "aria-label": isOpen ? "Collapse" : "Expand",
832
+ children: /* @__PURE__ */ jsx10(
947
833
  ChevronRight,
948
834
  {
949
835
  size: 14,
950
- className: `transition-transform duration-300 ease-in-out ${isOpen ? "rotate-90" : ""}`
836
+ className: `transition-transform duration-200 ${isOpen ? "rotate-90" : ""}`
951
837
  }
952
838
  )
953
839
  }
954
840
  ),
955
- /* @__PURE__ */ jsx9(
956
- FileText,
841
+ /* @__PURE__ */ jsx10(
842
+ FileText2,
957
843
  {
958
844
  size: 16,
959
- className: `flex-shrink-0 transition-all duration-200 ${hasSubtabs ? "" : "ml-5"} ${isActiveTab ? "opacity-100" : "opacity-60 group-hover:opacity-100"}`
845
+ className: `flex-shrink-0 transition-opacity duration-150 ${hasSubtabs ? "" : "ml-5"} ${isActive ? "opacity-100" : "opacity-60 group-hover:opacity-100"}`
960
846
  }
961
847
  ),
962
- /* @__PURE__ */ jsx9("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx9(
963
- TabTitle,
848
+ /* @__PURE__ */ jsx10("div", { className: "flex-1 min-w-0", children: isEditing ? /* @__PURE__ */ jsx10(
849
+ InlineInput,
964
850
  {
965
- isEditing,
966
- title: tab.title,
967
- tempTitle,
968
- onTitleChange: handleTitleChange,
969
- onStartEdit: handleEdit,
851
+ value: tab.title,
970
852
  onCommit: handleCommit,
971
853
  onCancel: handleCancel,
972
- onSelect: handleSelect
854
+ className: "h-7 w-full"
855
+ }
856
+ ) : /* @__PURE__ */ jsx10(
857
+ "button",
858
+ {
859
+ className: "w-full truncate text-left text-sm transition-colors duration-150 hover:text-foreground",
860
+ onClick: onSelect,
861
+ onDoubleClick: handleDoubleClick,
862
+ children: tab.title
973
863
  }
974
864
  ) }),
975
- /* @__PURE__ */ jsx9(
976
- TabMenu,
865
+ /* @__PURE__ */ jsx10(
866
+ OptionsMenu,
977
867
  {
978
- canDelete: canDeleteTab,
868
+ canDelete,
979
869
  onAddSubTab: handleAddSubTab,
980
- onDelete: handleDelete
870
+ onDelete
981
871
  }
982
872
  )
983
873
  ]
984
874
  }
985
875
  ),
986
- hasSubtabs && /* @__PURE__ */ jsx9(
876
+ hasSubtabs && /* @__PURE__ */ jsx10(
987
877
  "div",
988
878
  {
989
879
  className: `
990
- grid transition-all duration-300 ease-in-out
991
- ${isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}
992
- `,
993
- children: /* @__PURE__ */ jsx9("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx9("div", { className: "pt-1 space-y-1", children: /* @__PURE__ */ jsx9(AnimatePresence, { mode: "popLayout", children: tab.subtabs.map((st) => /* @__PURE__ */ jsx9(
880
+ grid transition-all duration-200 ease-in-out
881
+ ${isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}
882
+ `,
883
+ children: /* @__PURE__ */ jsx10("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx10("div", { className: "pt-1 space-y-1", children: /* @__PURE__ */ jsx10(AnimatePresence, { mode: "popLayout", children: tab.subtabs.map((subTab) => /* @__PURE__ */ jsx10(
994
884
  SubTabItem,
995
885
  {
996
- tab,
997
- st,
998
- activeSubTabId,
999
- editingSubId,
1000
- tempTitle,
1001
- onSelect,
1002
- startRenameSubTab,
1003
- commitRenameSubTab,
1004
- setEditingSubId,
1005
- setTempTitle,
1006
- onDeleteSubTab
886
+ subTab,
887
+ tabId: tab.id,
888
+ isActive: subTab.id === activeSubTabId,
889
+ onSelect: () => onSelect(),
890
+ onRename: (title) => onRenameSubTab(subTab.id, title),
891
+ onDelete: () => onDeleteSubTab(subTab.id)
1007
892
  },
1008
- st.id
893
+ subTab.id
1009
894
  )) }) }) })
1010
895
  }
1011
896
  )
1012
- ] })
1013
- },
1014
- tab.id
897
+ ]
898
+ }
1015
899
  );
1016
900
  },
1017
- (prevProps, nextProps) => {
1018
- return prevProps.tab.id === nextProps.tab.id && prevProps.tab.title === nextProps.tab.title && prevProps.tab.subtabs.length === nextProps.tab.subtabs.length && prevProps.activeTabId === nextProps.activeTabId && prevProps.activeSubTabId === nextProps.activeSubTabId && prevProps.editingId === nextProps.editingId && prevProps.editingSubId === nextProps.editingSubId && prevProps.openTabs[prevProps.tab.id] === nextProps.openTabs[nextProps.tab.id];
1019
- }
901
+ (prev, next) => prev.tab.id === next.tab.id && prev.tab.title === next.tab.title && prev.tab.subtabs.length === next.tab.subtabs.length && prev.isActive === next.isActive && prev.activeSubTabId === next.activeSubTabId && prev.hasActiveSubTab === next.hasActiveSubTab
1020
902
  );
1021
- var AppSidebar = memo(
903
+
904
+ // src/components/sidebar/EditorSidebar.tsx
905
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
906
+ var AppSidebar = memo5(
1022
907
  function AppSidebar2({
1023
908
  tabs,
1024
909
  activeTabId,
@@ -1032,80 +917,35 @@ var AppSidebar = memo(
1032
917
  onRenameSubTab,
1033
918
  onDeleteSubTab
1034
919
  }) {
1035
- const [editingId, setEditingId] = useState3(null);
1036
- const [editingSubId, setEditingSubId] = useState3(null);
1037
- const [tempTitle, setTempTitle] = useState3("");
1038
- const [openTabs, setOpenTabs] = useState3({});
1039
- const startRenameTab = useCallback2((id, title) => {
1040
- setEditingId(id);
1041
- setEditingSubId(null);
1042
- setTempTitle(title);
1043
- }, []);
1044
- const startRenameSubTab = useCallback2((id, title) => {
1045
- setEditingSubId(id);
1046
- setEditingId(null);
1047
- setTempTitle(title);
1048
- }, []);
1049
- const commitRenameTab = useCallback2(() => {
1050
- if (!editingId) return;
1051
- onRename(editingId, tempTitle.trim() || "Untitled");
1052
- setEditingId(null);
1053
- }, [editingId, tempTitle, onRename]);
1054
- const commitRenameSubTab = useCallback2(
1055
- (tabId) => {
1056
- if (!editingSubId || !onRenameSubTab) return;
1057
- onRenameSubTab(tabId, editingSubId, tempTitle.trim() || "Untitled");
1058
- setEditingSubId(null);
1059
- },
1060
- [editingSubId, tempTitle, onRenameSubTab]
1061
- );
1062
- const toggleTabOpen = useCallback2((tabId) => {
1063
- setOpenTabs((prev) => ({
1064
- ...prev,
1065
- [tabId]: !prev[tabId]
1066
- }));
1067
- }, []);
1068
- return /* @__PURE__ */ jsx9(Sidebar, { children: /* @__PURE__ */ jsx9(SidebarContent, { children: /* @__PURE__ */ jsxs5(SidebarGroup, { children: [
1069
- /* @__PURE__ */ jsxs5(SidebarGroupLabel, { className: "flex items-center justify-between", children: [
920
+ return /* @__PURE__ */ jsx11(Sidebar, { children: /* @__PURE__ */ jsx11(SidebarContent, { children: /* @__PURE__ */ jsxs7(SidebarGroup, { children: [
921
+ /* @__PURE__ */ jsxs7(SidebarGroupLabel, { className: "flex items-center justify-between", children: [
1070
922
  "Documents",
1071
- /* @__PURE__ */ jsx9(
923
+ /* @__PURE__ */ jsx11(
1072
924
  "button",
1073
925
  {
1074
926
  onClick: onAddTab,
1075
- className: "rounded p-1 transition-all duration-200 hover:bg-accent hover:scale-110",
927
+ className: "rounded p-1 transition-all duration-150 hover:bg-accent hover:scale-110",
1076
928
  "aria-label": "Add new document",
1077
- children: /* @__PURE__ */ jsx9(Plus, { size: 16 })
929
+ children: /* @__PURE__ */ jsx11(Plus, { size: 16 })
1078
930
  }
1079
931
  )
1080
932
  ] }),
1081
- /* @__PURE__ */ jsx9(SidebarMenu, { children: /* @__PURE__ */ jsx9(AnimatePresence, { mode: "popLayout", children: tabs.map((tab) => /* @__PURE__ */ jsx9(
933
+ /* @__PURE__ */ jsx11(SidebarMenu, { children: /* @__PURE__ */ jsx11(AnimatePresence2, { mode: "popLayout", children: tabs?.map((tab) => /* @__PURE__ */ jsx11(SidebarMenuItem, { className: "list-none", children: /* @__PURE__ */ jsx11(
1082
934
  TabItem,
1083
935
  {
1084
936
  tab,
1085
- activeTabId,
937
+ isActive: tab.id === activeTabId && !activeSubTabId,
938
+ hasActiveSubTab: tab.id === activeTabId && activeSubTabId !== null,
1086
939
  activeSubTabId,
1087
- canDeleteTab,
1088
- editingId,
1089
- editingSubId,
1090
- tempTitle,
1091
- openTabs,
1092
- onSelect,
1093
- onAddSubTab,
1094
- onDelete,
1095
- startRenameTab,
1096
- startRenameSubTab,
1097
- commitRenameTab,
1098
- commitRenameSubTab,
1099
- setEditingId,
1100
- setEditingSubId,
1101
- setTempTitle,
1102
- toggleTabOpen,
1103
- onRenameSubTab,
1104
- onDeleteSubTab,
1105
- setOpenTabs
1106
- },
1107
- tab.id
1108
- )) }) })
940
+ canDelete: canDeleteTab,
941
+ onSelect: () => onSelect(tab.id),
942
+ onRename: (title) => onRename(tab.id, title),
943
+ onDelete: () => onDelete(tab.id),
944
+ onAddSubTab: () => onAddSubTab(tab.id),
945
+ onRenameSubTab: (subTabId, title) => onRenameSubTab(tab.id, subTabId, title),
946
+ onDeleteSubTab: (subTabId) => onDeleteSubTab(tab.id, subTabId)
947
+ }
948
+ ) }, tab.id)) }) })
1109
949
  ] }) }) });
1110
950
  },
1111
951
  (prevProps, nextProps) => {
@@ -1115,7 +955,7 @@ var AppSidebar = memo(
1115
955
 
1116
956
  // src/contexts/EditorBridge.tsx
1117
957
  import { createContext as createContext2, useContext as useContext2 } from "react";
1118
- import { jsx as jsx10 } from "react/jsx-runtime";
958
+ import { jsx as jsx12 } from "react/jsx-runtime";
1119
959
  var EditorBridgeContext = createContext2(
1120
960
  void 0
1121
961
  );
@@ -1123,7 +963,7 @@ function EditorBridgeProvider({
1123
963
  children,
1124
964
  value
1125
965
  }) {
1126
- return /* @__PURE__ */ jsx10(EditorBridgeContext.Provider, { value, children });
966
+ return /* @__PURE__ */ jsx12(EditorBridgeContext.Provider, { value, children });
1127
967
  }
1128
968
  function useEditorBridge() {
1129
969
  const ctx = useContext2(EditorBridgeContext);
@@ -1135,42 +975,42 @@ function useEditorBridge() {
1135
975
 
1136
976
  // src/contexts/EditorStateProvider.tsx
1137
977
  import { createContext as createContext3, useContext as useContext3 } from "react";
1138
- import { jsx as jsx11 } from "react/jsx-runtime";
978
+ import { jsx as jsx13 } from "react/jsx-runtime";
1139
979
  var EditorStateContext = createContext3(null);
1140
980
  function EditorStateProvider({ children, value }) {
1141
- return /* @__PURE__ */ jsx11(EditorStateContext.Provider, { value, children });
981
+ return /* @__PURE__ */ jsx13(EditorStateContext.Provider, { value, children });
1142
982
  }
1143
983
 
1144
984
  // src/contexts/EditorActionsProvider.tsx
1145
985
  import { createContext as createContext4, useContext as useContext4 } from "react";
1146
- import { jsx as jsx12 } from "react/jsx-runtime";
986
+ import { jsx as jsx14 } from "react/jsx-runtime";
1147
987
  var EditorActionsContext = createContext4(null);
1148
988
  function EditorActionsProvider({ children, value }) {
1149
- return /* @__PURE__ */ jsx12(EditorActionsContext.Provider, { value, children });
989
+ return /* @__PURE__ */ jsx14(EditorActionsContext.Provider, { value, children });
1150
990
  }
1151
991
 
1152
992
  // src/contexts/themeProvider.tsx
1153
993
  import { ThemeProvider as NextThemesProvider } from "next-themes";
1154
- import { jsx as jsx13 } from "react/jsx-runtime";
994
+ import { jsx as jsx15 } from "react/jsx-runtime";
1155
995
  function ThemeProvider({ children, ...props }) {
1156
- return /* @__PURE__ */ jsx13(NextThemesProvider, { ...props, children });
996
+ return /* @__PURE__ */ jsx15(NextThemesProvider, { ...props, children });
1157
997
  }
1158
998
 
1159
999
  // src/components/editorLayout/editorLayout.tsx
1160
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
1000
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1161
1001
  function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1162
- const [editor, setEditor] = useState4(null);
1163
- const [tabs, setTabs] = useState4([]);
1164
- const [activeTabId, setActiveTabId] = useState4("");
1165
- const [activeSubTabId, setActiveSubTabId] = useState4(null);
1166
- const debouncedSaveRef = useRef2(null);
1167
- const onChangeDebounceRef = useRef2(null);
1168
- const isRestoringRef = useRef2(false);
1169
- const editorState = useMemo3(
1002
+ const [editor, setEditor] = useState7(null);
1003
+ const [tabs, setTabs] = useState7([]);
1004
+ const [activeTabId, setActiveTabId] = useState7("");
1005
+ const [activeSubTabId, setActiveSubTabId] = useState7(null);
1006
+ const debouncedSaveRef = useRef(null);
1007
+ const onChangeDebounceRef = useRef(null);
1008
+ const isRestoringRef = useRef(false);
1009
+ const editorState = useMemo2(
1170
1010
  () => ({ tabs, activeTabId, activeSubTabId }),
1171
1011
  [tabs, activeTabId, activeSubTabId]
1172
1012
  );
1173
- const emitChangeDebounced = useCallback3(
1013
+ const emitChangeDebounced = useCallback5(
1174
1014
  (payload) => {
1175
1015
  if (!onChange) return;
1176
1016
  if (onChangeDebounceRef.current) clearTimeout(onChangeDebounceRef.current);
@@ -1178,7 +1018,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1178
1018
  },
1179
1019
  [onChange]
1180
1020
  );
1181
- const emitChange = useCallback3(
1021
+ const emitChange = useCallback5(
1182
1022
  (source) => {
1183
1023
  if (!onChange) return;
1184
1024
  emitChangeDebounced({ tabs, activeTabId, activeSubTabId, source });
@@ -1197,7 +1037,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1197
1037
  useEffect2(() => {
1198
1038
  onTabsChange?.(tabs);
1199
1039
  }, [tabs, onTabsChange]);
1200
- const saveCurrentContent = useCallback3(() => {
1040
+ const saveCurrentContent = useCallback5(() => {
1201
1041
  if (!editor) return tabs;
1202
1042
  const json = editor.getJSON();
1203
1043
  return tabs.map((tab) => {
@@ -1213,7 +1053,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1213
1053
  return { ...tab, content: json };
1214
1054
  });
1215
1055
  }, [editor, tabs, activeTabId, activeSubTabId]);
1216
- const saveFromEditor = useCallback3(
1056
+ const saveFromEditor = useCallback5(
1217
1057
  (editorInstance, source = "editor") => {
1218
1058
  const json = editorInstance.getJSON();
1219
1059
  setTabs((prev) => {
@@ -1242,7 +1082,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1242
1082
  },
1243
1083
  [activeTabId, activeSubTabId, emitChangeDebounced]
1244
1084
  );
1245
- const debouncedSave = useCallback3(
1085
+ const debouncedSave = useCallback5(
1246
1086
  (editorInstance) => {
1247
1087
  if (debouncedSaveRef.current) clearTimeout(debouncedSaveRef.current);
1248
1088
  debouncedSaveRef.current = setTimeout(() => {
@@ -1251,7 +1091,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1251
1091
  },
1252
1092
  [saveFromEditor]
1253
1093
  );
1254
- const addTab = useCallback3(() => {
1094
+ const addTab = useCallback5(() => {
1255
1095
  if (debouncedSaveRef.current) {
1256
1096
  clearTimeout(debouncedSaveRef.current);
1257
1097
  debouncedSaveRef.current = null;
@@ -1273,7 +1113,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1273
1113
  source: "add-tab"
1274
1114
  });
1275
1115
  }, [saveCurrentContent, editor, emitChangeDebounced]);
1276
- const addSubTab = useCallback3(
1116
+ const addSubTab = useCallback5(
1277
1117
  (tabId) => {
1278
1118
  if (debouncedSaveRef.current) {
1279
1119
  clearTimeout(debouncedSaveRef.current);
@@ -1300,7 +1140,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1300
1140
  },
1301
1141
  [saveCurrentContent, editor, emitChangeDebounced]
1302
1142
  );
1303
- const selectNode = useCallback3(
1143
+ const selectNode = useCallback5(
1304
1144
  (tabId, subId) => {
1305
1145
  if (debouncedSaveRef.current) {
1306
1146
  clearTimeout(debouncedSaveRef.current);
@@ -1319,13 +1159,13 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1319
1159
  },
1320
1160
  [saveCurrentContent, emitChangeDebounced]
1321
1161
  );
1322
- const renameTab = useCallback3(
1162
+ const renameTab = useCallback5(
1323
1163
  (id, title) => {
1324
1164
  setTabs((prev) => prev.map((t) => t.id === id ? { ...t, title } : t));
1325
1165
  },
1326
1166
  []
1327
1167
  );
1328
- const deleteTab = useCallback3(
1168
+ const deleteTab = useCallback5(
1329
1169
  (id) => {
1330
1170
  if (debouncedSaveRef.current) {
1331
1171
  clearTimeout(debouncedSaveRef.current);
@@ -1348,7 +1188,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1348
1188
  },
1349
1189
  [activeTabId, tabs, saveCurrentContent, editor, emitChange]
1350
1190
  );
1351
- const deleteSubTab = useCallback3(
1191
+ const deleteSubTab = useCallback5(
1352
1192
  (tabId, subTabId) => {
1353
1193
  setTabs(
1354
1194
  (prev) => prev.map((tab) => {
@@ -1365,7 +1205,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1365
1205
  },
1366
1206
  [activeSubTabId, editor, emitChange]
1367
1207
  );
1368
- const renameSubTab = useCallback3(
1208
+ const renameSubTab = useCallback5(
1369
1209
  (tabId, subTabId, title) => {
1370
1210
  setTabs(
1371
1211
  (prev) => prev.map(
@@ -1380,7 +1220,7 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1380
1220
  },
1381
1221
  []
1382
1222
  );
1383
- const editorActions = useMemo3(
1223
+ const editorActions = useMemo2(
1384
1224
  () => ({
1385
1225
  addTab,
1386
1226
  addSubTab,
@@ -1407,8 +1247,8 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1407
1247
  }
1408
1248
  isRestoringRef.current = false;
1409
1249
  }, [editor, tabs, activeTabId, activeSubTabId]);
1410
- return /* @__PURE__ */ jsx14(ThemeProvider, { attribute: "class", defaultTheme: "system", enableSystem: true, children: /* @__PURE__ */ jsx14(EditorBridgeProvider, { value: { editorContent: editor, setEditorContent: setEditor, debouncedSave }, children: /* @__PURE__ */ jsx14(EditorStateProvider, { value: editorState, children: /* @__PURE__ */ jsx14(EditorActionsProvider, { value: editorActions, children: /* @__PURE__ */ jsx14(SidebarProvider, { children: /* @__PURE__ */ jsxs6("div", { className: "flex h-full w-full min-h-0 relative", children: [
1411
- /* @__PURE__ */ jsx14(
1250
+ return /* @__PURE__ */ jsx16(ThemeProvider, { attribute: "class", defaultTheme: "system", enableSystem: true, children: /* @__PURE__ */ jsx16(EditorBridgeProvider, { value: { editorContent: editor, setEditorContent: setEditor, debouncedSave }, children: /* @__PURE__ */ jsx16(EditorStateProvider, { value: editorState, children: /* @__PURE__ */ jsx16(EditorActionsProvider, { value: editorActions, children: /* @__PURE__ */ jsx16(SidebarProvider, { children: /* @__PURE__ */ jsxs8("div", { className: "flex h-full w-full min-h-0 relative", children: [
1251
+ /* @__PURE__ */ jsx16(
1412
1252
  AppSidebar,
1413
1253
  {
1414
1254
  tabs,
@@ -1424,15 +1264,15 @@ function EditorLayout({ children, onChange, initialTabs, onTabsChange }) {
1424
1264
  onDeleteSubTab: deleteSubTab
1425
1265
  }
1426
1266
  ),
1427
- /* @__PURE__ */ jsxs6(SidebarInset, { className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [
1428
- /* @__PURE__ */ jsx14("header", { className: "h-12 flex-shrink-0 border-b flex items-center px-4", children: /* @__PURE__ */ jsx14(SidebarTrigger, {}) }),
1429
- /* @__PURE__ */ jsx14("div", { className: "flex-1 min-h-0 overflow-auto", children })
1267
+ /* @__PURE__ */ jsxs8(SidebarInset, { className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [
1268
+ /* @__PURE__ */ jsx16("header", { className: "h-12 flex-shrink-0 border-b flex items-center px-4", children: /* @__PURE__ */ jsx16(SidebarTrigger, {}) }),
1269
+ /* @__PURE__ */ jsx16("div", { className: "flex-1 min-h-0 overflow-auto", children })
1430
1270
  ] })
1431
1271
  ] }) }) }) }) }) });
1432
1272
  }
1433
1273
 
1434
1274
  // src/components/tiptap-templates/simple/simple-editor.tsx
1435
- import { useEffect as useEffect23, useRef as useRef8, useState as useState30 } from "react";
1275
+ import { useEffect as useEffect23, useRef as useRef7, useState as useState33 } from "react";
1436
1276
  import { EditorContent, EditorContext, useEditor } from "@tiptap/react";
1437
1277
  import { StarterKit } from "@tiptap/starter-kit";
1438
1278
  import Image from "@tiptap/extension-image";
@@ -1615,7 +1455,7 @@ var FontSizeStepper = Extension.create({
1615
1455
  });
1616
1456
 
1617
1457
  // src/components/tiptap-ui-primitive/button/button.tsx
1618
- import { forwardRef as forwardRef2, Fragment, useMemo as useMemo5 } from "react";
1458
+ import { forwardRef as forwardRef2, Fragment as Fragment2, useMemo as useMemo4 } from "react";
1619
1459
 
1620
1460
  // src/components/tiptap-ui-primitive/tooltip/tooltip.tsx
1621
1461
  import {
@@ -1624,8 +1464,8 @@ import {
1624
1464
  forwardRef,
1625
1465
  isValidElement,
1626
1466
  useContext as useContext5,
1627
- useMemo as useMemo4,
1628
- useState as useState5,
1467
+ useMemo as useMemo3,
1468
+ useState as useState8,
1629
1469
  version
1630
1470
  } from "react";
1631
1471
  import {
@@ -1643,7 +1483,7 @@ import {
1643
1483
  FloatingPortal,
1644
1484
  FloatingDelayGroup
1645
1485
  } from "@floating-ui/react";
1646
- import { jsx as jsx15 } from "react/jsx-runtime";
1486
+ import { jsx as jsx17 } from "react/jsx-runtime";
1647
1487
  function useTooltip({
1648
1488
  initialOpen = false,
1649
1489
  placement = "top",
@@ -1652,7 +1492,7 @@ function useTooltip({
1652
1492
  delay = 600,
1653
1493
  closeDelay = 0
1654
1494
  } = {}) {
1655
- const [uncontrolledOpen, setUncontrolledOpen] = useState5(initialOpen);
1495
+ const [uncontrolledOpen, setUncontrolledOpen] = useState8(initialOpen);
1656
1496
  const open = controlledOpen ?? uncontrolledOpen;
1657
1497
  const setOpen = setControlledOpen ?? setUncontrolledOpen;
1658
1498
  const data = useFloating({
@@ -1686,7 +1526,7 @@ function useTooltip({
1686
1526
  const dismiss = useDismiss(context);
1687
1527
  const role = useRole(context, { role: "tooltip" });
1688
1528
  const interactions = useInteractions([hover, focus, dismiss, role]);
1689
- return useMemo4(
1529
+ return useMemo3(
1690
1530
  () => ({
1691
1531
  open,
1692
1532
  setOpen,
@@ -1707,14 +1547,14 @@ function useTooltipContext() {
1707
1547
  function Tooltip2({ children, ...props }) {
1708
1548
  const tooltip = useTooltip(props);
1709
1549
  if (!props.useDelayGroup) {
1710
- return /* @__PURE__ */ jsx15(TooltipContext.Provider, { value: tooltip, children });
1550
+ return /* @__PURE__ */ jsx17(TooltipContext.Provider, { value: tooltip, children });
1711
1551
  }
1712
- return /* @__PURE__ */ jsx15(
1552
+ return /* @__PURE__ */ jsx17(
1713
1553
  FloatingDelayGroup,
1714
1554
  {
1715
1555
  delay: { open: props.delay ?? 0, close: props.closeDelay ?? 0 },
1716
1556
  timeoutMs: props.timeout,
1717
- children: /* @__PURE__ */ jsx15(TooltipContext.Provider, { value: tooltip, children })
1557
+ children: /* @__PURE__ */ jsx17(TooltipContext.Provider, { value: tooltip, children })
1718
1558
  }
1719
1559
  );
1720
1560
  }
@@ -1743,7 +1583,7 @@ var TooltipTrigger2 = forwardRef(
1743
1583
  })
1744
1584
  );
1745
1585
  }
1746
- return /* @__PURE__ */ jsx15(
1586
+ return /* @__PURE__ */ jsx17(
1747
1587
  "button",
1748
1588
  {
1749
1589
  ref,
@@ -1759,7 +1599,7 @@ var TooltipContent2 = forwardRef(
1759
1599
  const context = useTooltipContext();
1760
1600
  const ref = useMergeRefs([context.refs.setFloating, propRef]);
1761
1601
  if (!context.open) return null;
1762
- const content = /* @__PURE__ */ jsx15(
1602
+ const content = /* @__PURE__ */ jsx17(
1763
1603
  "div",
1764
1604
  {
1765
1605
  ref,
@@ -1773,7 +1613,7 @@ var TooltipContent2 = forwardRef(
1773
1613
  }
1774
1614
  );
1775
1615
  if (portal) {
1776
- return /* @__PURE__ */ jsx15(FloatingPortal, { ...portalProps, children: content });
1616
+ return /* @__PURE__ */ jsx17(FloatingPortal, { ...portalProps, children: content });
1777
1617
  }
1778
1618
  return content;
1779
1619
  }
@@ -2090,14 +1930,14 @@ var FontSizeExtension = Extension2.create({
2090
1930
  });
2091
1931
 
2092
1932
  // src/components/tiptap-ui-primitive/button/button.tsx
2093
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
1933
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
2094
1934
  var ShortcutDisplay = ({
2095
1935
  shortcuts
2096
1936
  }) => {
2097
1937
  if (shortcuts.length === 0) return null;
2098
- return /* @__PURE__ */ jsx16("div", { children: shortcuts.map((key, index) => /* @__PURE__ */ jsxs7(Fragment, { children: [
2099
- index > 0 && /* @__PURE__ */ jsx16("kbd", { children: "+" }),
2100
- /* @__PURE__ */ jsx16("kbd", { children: key })
1938
+ return /* @__PURE__ */ jsx18("div", { children: shortcuts.map((key, index) => /* @__PURE__ */ jsxs9(Fragment2, { children: [
1939
+ index > 0 && /* @__PURE__ */ jsx18("kbd", { children: "+" }),
1940
+ /* @__PURE__ */ jsx18("kbd", { children: key })
2101
1941
  ] }, index)) });
2102
1942
  };
2103
1943
  var Button2 = forwardRef2(
@@ -2110,12 +1950,12 @@ var Button2 = forwardRef2(
2110
1950
  "aria-label": ariaLabel,
2111
1951
  ...props
2112
1952
  }, ref) => {
2113
- const shortcuts = useMemo5(
1953
+ const shortcuts = useMemo4(
2114
1954
  () => parseShortcutKeys({ shortcutKeys }),
2115
1955
  [shortcutKeys]
2116
1956
  );
2117
1957
  if (!tooltip || !showTooltip) {
2118
- return /* @__PURE__ */ jsx16(
1958
+ return /* @__PURE__ */ jsx18(
2119
1959
  "button",
2120
1960
  {
2121
1961
  className: cn2("tiptap-button", className),
@@ -2126,8 +1966,8 @@ var Button2 = forwardRef2(
2126
1966
  }
2127
1967
  );
2128
1968
  }
2129
- return /* @__PURE__ */ jsxs7(Tooltip2, { delay: 200, children: [
2130
- /* @__PURE__ */ jsx16(
1969
+ return /* @__PURE__ */ jsxs9(Tooltip2, { delay: 200, children: [
1970
+ /* @__PURE__ */ jsx18(
2131
1971
  TooltipTrigger2,
2132
1972
  {
2133
1973
  className: cn2("tiptap-button", className),
@@ -2137,16 +1977,16 @@ var Button2 = forwardRef2(
2137
1977
  children
2138
1978
  }
2139
1979
  ),
2140
- /* @__PURE__ */ jsxs7(TooltipContent2, { children: [
1980
+ /* @__PURE__ */ jsxs9(TooltipContent2, { children: [
2141
1981
  tooltip,
2142
- /* @__PURE__ */ jsx16(ShortcutDisplay, { shortcuts })
1982
+ /* @__PURE__ */ jsx18(ShortcutDisplay, { shortcuts })
2143
1983
  ] })
2144
1984
  ] });
2145
1985
  }
2146
1986
  );
2147
1987
  Button2.displayName = "Button";
2148
1988
  var ButtonGroup = forwardRef2(({ className, children, orientation = "vertical", ...props }, ref) => {
2149
- return /* @__PURE__ */ jsx16(
1989
+ return /* @__PURE__ */ jsx18(
2150
1990
  "div",
2151
1991
  {
2152
1992
  ref,
@@ -2161,7 +2001,7 @@ var ButtonGroup = forwardRef2(({ className, children, orientation = "vertical",
2161
2001
  ButtonGroup.displayName = "ButtonGroup";
2162
2002
 
2163
2003
  // src/components/tiptap-ui-primitive/spacer/spacer.tsx
2164
- import { jsx as jsx17 } from "react/jsx-runtime";
2004
+ import { jsx as jsx19 } from "react/jsx-runtime";
2165
2005
  function Spacer({
2166
2006
  orientation = "horizontal",
2167
2007
  size,
@@ -2176,20 +2016,20 @@ function Spacer({
2176
2016
  height: orientation === "horizontal" ? "1px" : size
2177
2017
  }
2178
2018
  };
2179
- return /* @__PURE__ */ jsx17("div", { ...props, style: computedStyle });
2019
+ return /* @__PURE__ */ jsx19("div", { ...props, style: computedStyle });
2180
2020
  }
2181
2021
 
2182
2022
  // src/components/tiptap-ui-primitive/toolbar/toolbar.tsx
2183
- import { forwardRef as forwardRef4, useCallback as useCallback5, useEffect as useEffect4, useRef as useRef4, useState as useState7 } from "react";
2023
+ import { forwardRef as forwardRef4, useCallback as useCallback7, useEffect as useEffect4, useRef as useRef3, useState as useState10 } from "react";
2184
2024
 
2185
2025
  // src/components/tiptap-ui-primitive/separator/separator.tsx
2186
2026
  import { forwardRef as forwardRef3 } from "react";
2187
- import { jsx as jsx18 } from "react/jsx-runtime";
2188
- var Separator3 = forwardRef3(
2027
+ import { jsx as jsx20 } from "react/jsx-runtime";
2028
+ var Separator2 = forwardRef3(
2189
2029
  ({ decorative, orientation = "vertical", className, ...divProps }, ref) => {
2190
2030
  const ariaOrientation = orientation === "vertical" ? orientation : void 0;
2191
2031
  const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
2192
- return /* @__PURE__ */ jsx18(
2032
+ return /* @__PURE__ */ jsx20(
2193
2033
  "div",
2194
2034
  {
2195
2035
  className: cn2("tiptap-separator", className),
@@ -2201,10 +2041,10 @@ var Separator3 = forwardRef3(
2201
2041
  );
2202
2042
  }
2203
2043
  );
2204
- Separator3.displayName = "Separator";
2044
+ Separator2.displayName = "Separator";
2205
2045
 
2206
2046
  // src/hooks/use-menu-navigation.ts
2207
- import { useEffect as useEffect3, useState as useState6 } from "react";
2047
+ import { useEffect as useEffect3, useState as useState9 } from "react";
2208
2048
  function useMenuNavigation({
2209
2049
  editor,
2210
2050
  containerRef,
@@ -2215,7 +2055,7 @@ function useMenuNavigation({
2215
2055
  orientation = "vertical",
2216
2056
  autoSelectFirstItem = true
2217
2057
  }) {
2218
- const [selectedIndex, setSelectedIndex] = useState6(
2058
+ const [selectedIndex, setSelectedIndex] = useState9(
2219
2059
  autoSelectFirstItem ? 0 : -1
2220
2060
  );
2221
2061
  useEffect3(() => {
@@ -2328,7 +2168,7 @@ function useMenuNavigation({
2328
2168
  }
2329
2169
 
2330
2170
  // src/hooks/use-composed-ref.ts
2331
- import { useCallback as useCallback4, useRef as useRef3 } from "react";
2171
+ import { useCallback as useCallback6, useRef as useRef2 } from "react";
2332
2172
  var updateRef = (ref, value) => {
2333
2173
  if (typeof ref === "function") {
2334
2174
  ref(value);
@@ -2338,8 +2178,8 @@ var updateRef = (ref, value) => {
2338
2178
  }
2339
2179
  };
2340
2180
  var useComposedRef = (libRef, userRef) => {
2341
- const prevUserRef = useRef3(null);
2342
- return useCallback4(
2181
+ const prevUserRef = useRef2(null);
2182
+ return useCallback6(
2343
2183
  (instance) => {
2344
2184
  if (libRef && "current" in libRef) {
2345
2185
  ;
@@ -2358,10 +2198,10 @@ var useComposedRef = (libRef, userRef) => {
2358
2198
  };
2359
2199
 
2360
2200
  // src/components/tiptap-ui-primitive/toolbar/toolbar.tsx
2361
- import { jsx as jsx19 } from "react/jsx-runtime";
2201
+ import { jsx as jsx21 } from "react/jsx-runtime";
2362
2202
  var useToolbarNavigation = (toolbarRef) => {
2363
- const [items, setItems] = useState7([]);
2364
- const collectItems = useCallback5(() => {
2203
+ const [items, setItems] = useState10([]);
2204
+ const collectItems = useCallback7(() => {
2365
2205
  if (!toolbarRef.current) return [];
2366
2206
  return Array.from(
2367
2207
  toolbarRef.current.querySelectorAll(
@@ -2412,10 +2252,10 @@ var useToolbarNavigation = (toolbarRef) => {
2412
2252
  };
2413
2253
  var Toolbar = forwardRef4(
2414
2254
  ({ children, className, variant = "fixed", ...props }, ref) => {
2415
- const toolbarRef = useRef4(null);
2255
+ const toolbarRef = useRef3(null);
2416
2256
  const composedRef = useComposedRef(toolbarRef, ref);
2417
2257
  useToolbarNavigation(toolbarRef);
2418
- return /* @__PURE__ */ jsx19(
2258
+ return /* @__PURE__ */ jsx21(
2419
2259
  "div",
2420
2260
  {
2421
2261
  ref: composedRef,
@@ -2431,7 +2271,7 @@ var Toolbar = forwardRef4(
2431
2271
  );
2432
2272
  Toolbar.displayName = "Toolbar";
2433
2273
  var ToolbarGroup = forwardRef4(
2434
- ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx19(
2274
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx21(
2435
2275
  "div",
2436
2276
  {
2437
2277
  ref,
@@ -2444,7 +2284,7 @@ var ToolbarGroup = forwardRef4(
2444
2284
  );
2445
2285
  ToolbarGroup.displayName = "ToolbarGroup";
2446
2286
  var ToolbarSeparator = forwardRef4(
2447
- ({ ...props }, ref) => /* @__PURE__ */ jsx19(Separator3, { ref, orientation: "vertical", decorative: true, ...props })
2287
+ ({ ...props }, ref) => /* @__PURE__ */ jsx21(Separator2, { ref, orientation: "vertical", decorative: true, ...props })
2448
2288
  );
2449
2289
  ToolbarSeparator.displayName = "ToolbarSeparator";
2450
2290
 
@@ -2460,11 +2300,11 @@ import {
2460
2300
  Heading3,
2461
2301
  Code
2462
2302
  } from "lucide-react";
2463
- import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
2303
+ import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
2464
2304
  function BubbleMenuInline() {
2465
2305
  const { editor } = useCurrentEditor();
2466
2306
  if (!editor) return null;
2467
- return /* @__PURE__ */ jsx20(
2307
+ return /* @__PURE__ */ jsx22(
2468
2308
  BubbleMenu,
2469
2309
  {
2470
2310
  editor,
@@ -2483,81 +2323,81 @@ function BubbleMenuInline() {
2483
2323
  if (hasImage) return false;
2484
2324
  return true;
2485
2325
  },
2486
- children: /* @__PURE__ */ jsxs8(
2326
+ children: /* @__PURE__ */ jsxs10(
2487
2327
  "div",
2488
2328
  {
2489
2329
  className: "relative flex items-center gap-1 rounded-md border bg-[#171717] text-[#a1a1a6] p-1 shadow-md z-[15]\r\n animate-in fade-in slide-in-from-top-2 duration-200",
2490
2330
  children: [
2491
- /* @__PURE__ */ jsx20(
2331
+ /* @__PURE__ */ jsx22(
2492
2332
  Button,
2493
2333
  {
2494
2334
  variant: "ghost",
2495
2335
  size: "sm",
2496
2336
  onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
2497
2337
  className: editor.isActive("heading", { level: 1 }) ? "bg-accent" : "",
2498
- children: /* @__PURE__ */ jsx20(Heading1, { size: 15 })
2338
+ children: /* @__PURE__ */ jsx22(Heading1, { size: 15 })
2499
2339
  }
2500
2340
  ),
2501
- /* @__PURE__ */ jsx20(
2341
+ /* @__PURE__ */ jsx22(
2502
2342
  Button,
2503
2343
  {
2504
2344
  variant: "ghost",
2505
2345
  size: "sm",
2506
2346
  onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
2507
2347
  className: editor.isActive("heading", { level: 2 }) ? "bg-accent" : "",
2508
- children: /* @__PURE__ */ jsx20(Heading2, { size: 15 })
2348
+ children: /* @__PURE__ */ jsx22(Heading2, { size: 15 })
2509
2349
  }
2510
2350
  ),
2511
- /* @__PURE__ */ jsx20(
2351
+ /* @__PURE__ */ jsx22(
2512
2352
  Button,
2513
2353
  {
2514
2354
  variant: "ghost",
2515
2355
  size: "sm",
2516
2356
  onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
2517
2357
  className: editor.isActive("heading", { level: 3 }) ? "bg-accent" : "",
2518
- children: /* @__PURE__ */ jsx20(Heading3, { size: 15 })
2358
+ children: /* @__PURE__ */ jsx22(Heading3, { size: 15 })
2519
2359
  }
2520
2360
  ),
2521
- /* @__PURE__ */ jsx20(Separator, { orientation: "vertical", className: "mx-1" }),
2522
- /* @__PURE__ */ jsx20(
2361
+ /* @__PURE__ */ jsx22(Separator, { orientation: "vertical", className: "mx-1" }),
2362
+ /* @__PURE__ */ jsx22(
2523
2363
  Button,
2524
2364
  {
2525
2365
  variant: "ghost",
2526
2366
  size: "sm",
2527
2367
  onClick: () => editor.chain().focus().toggleBulletList().run(),
2528
2368
  className: editor.isActive("bulletList") ? "bg-accent" : "",
2529
- children: /* @__PURE__ */ jsx20(List, { size: 15 })
2369
+ children: /* @__PURE__ */ jsx22(List, { size: 15 })
2530
2370
  }
2531
2371
  ),
2532
- /* @__PURE__ */ jsx20(
2372
+ /* @__PURE__ */ jsx22(
2533
2373
  Button,
2534
2374
  {
2535
2375
  variant: "ghost",
2536
2376
  size: "sm",
2537
2377
  onClick: () => editor.chain().focus().toggleOrderedList().run(),
2538
2378
  className: editor.isActive("orderedList") ? "bg-accent" : "",
2539
- children: /* @__PURE__ */ jsx20(ListOrdered, { size: 15 })
2379
+ children: /* @__PURE__ */ jsx22(ListOrdered, { size: 15 })
2540
2380
  }
2541
2381
  ),
2542
- /* @__PURE__ */ jsx20(
2382
+ /* @__PURE__ */ jsx22(
2543
2383
  Button,
2544
2384
  {
2545
2385
  variant: "ghost",
2546
2386
  size: "sm",
2547
2387
  onClick: () => editor.chain().focus().toggleTaskList().run(),
2548
2388
  className: editor.isActive("taskList") ? "bg-accent" : "",
2549
- children: /* @__PURE__ */ jsx20(CheckSquare, { size: 15 })
2389
+ children: /* @__PURE__ */ jsx22(CheckSquare, { size: 15 })
2550
2390
  }
2551
2391
  ),
2552
- /* @__PURE__ */ jsx20(Separator, { orientation: "vertical", className: "mx-1" }),
2553
- /* @__PURE__ */ jsx20(
2392
+ /* @__PURE__ */ jsx22(Separator, { orientation: "vertical", className: "mx-1" }),
2393
+ /* @__PURE__ */ jsx22(
2554
2394
  Button,
2555
2395
  {
2556
2396
  variant: "ghost",
2557
2397
  size: "sm",
2558
2398
  onClick: () => editor.chain().focus().toggleCodeBlock().run(),
2559
2399
  className: editor.isActive("codeBlock") ? "bg-accent" : "",
2560
- children: /* @__PURE__ */ jsx20(Code, { size: 15 })
2400
+ children: /* @__PURE__ */ jsx22(Code, { size: 15 })
2561
2401
  }
2562
2402
  )
2563
2403
  ]
@@ -2572,14 +2412,14 @@ import { mergeAttributes as mergeAttributes2, Node as Node4 } from "@tiptap/reac
2572
2412
  import { ReactNodeViewRenderer } from "@tiptap/react";
2573
2413
 
2574
2414
  // src/components/tiptap-node/image-upload-node/image-upload-node.tsx
2575
- import { useRef as useRef5, useState as useState8 } from "react";
2415
+ import { useRef as useRef4, useState as useState11 } from "react";
2576
2416
  import { NodeViewWrapper } from "@tiptap/react";
2577
2417
 
2578
2418
  // src/components/tiptap-icons/close-icon.tsx
2579
- import { memo as memo2 } from "react";
2580
- import { jsx as jsx21 } from "react/jsx-runtime";
2581
- var CloseIcon = memo2(({ className, ...props }) => {
2582
- return /* @__PURE__ */ jsx21(
2419
+ import { memo as memo6 } from "react";
2420
+ import { jsx as jsx23 } from "react/jsx-runtime";
2421
+ var CloseIcon = memo6(({ className, ...props }) => {
2422
+ return /* @__PURE__ */ jsx23(
2583
2423
  "svg",
2584
2424
  {
2585
2425
  width: "24",
@@ -2589,7 +2429,7 @@ var CloseIcon = memo2(({ className, ...props }) => {
2589
2429
  fill: "currentColor",
2590
2430
  xmlns: "http://www.w3.org/2000/svg",
2591
2431
  ...props,
2592
- children: /* @__PURE__ */ jsx21(
2432
+ children: /* @__PURE__ */ jsx23(
2593
2433
  "path",
2594
2434
  {
2595
2435
  d: "M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z",
@@ -2602,9 +2442,9 @@ var CloseIcon = memo2(({ className, ...props }) => {
2602
2442
  CloseIcon.displayName = "CloseIcon";
2603
2443
 
2604
2444
  // src/components/tiptap-node/image-upload-node/image-upload-node.tsx
2605
- import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
2445
+ import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
2606
2446
  function useFileUpload(options) {
2607
- const [fileItems, setFileItems] = useState8([]);
2447
+ const [fileItems, setFileItems] = useState11([]);
2608
2448
  const uploadFile = async (file) => {
2609
2449
  if (file.size > options.maxSize) {
2610
2450
  const error = new Error(
@@ -2710,7 +2550,7 @@ function useFileUpload(options) {
2710
2550
  clearAllFiles
2711
2551
  };
2712
2552
  }
2713
- var CloudUploadIcon = () => /* @__PURE__ */ jsxs9(
2553
+ var CloudUploadIcon = () => /* @__PURE__ */ jsxs11(
2714
2554
  "svg",
2715
2555
  {
2716
2556
  width: "24",
@@ -2720,14 +2560,14 @@ var CloudUploadIcon = () => /* @__PURE__ */ jsxs9(
2720
2560
  fill: "currentColor",
2721
2561
  xmlns: "http://www.w3.org/2000/svg",
2722
2562
  children: [
2723
- /* @__PURE__ */ jsx22(
2563
+ /* @__PURE__ */ jsx24(
2724
2564
  "path",
2725
2565
  {
2726
2566
  d: "M11.1953 4.41771C10.3478 4.08499 9.43578 3.94949 8.5282 4.02147C7.62062 4.09345 6.74133 4.37102 5.95691 4.83316C5.1725 5.2953 4.50354 5.92989 4.00071 6.68886C3.49788 7.44783 3.17436 8.31128 3.05465 9.2138C2.93495 10.1163 3.0222 11.0343 3.3098 11.8981C3.5974 12.7619 4.07781 13.5489 4.71463 14.1995C5.10094 14.5942 5.09414 15.2274 4.69945 15.6137C4.30476 16 3.67163 15.9932 3.28532 15.5985C2.43622 14.731 1.79568 13.6816 1.41221 12.5299C1.02875 11.3781 0.91241 10.1542 1.07201 8.95084C1.23162 7.74748 1.66298 6.59621 2.33343 5.58425C3.00387 4.57229 3.89581 3.72617 4.9417 3.10998C5.98758 2.4938 7.15998 2.1237 8.37008 2.02773C9.58018 1.93176 10.7963 2.11243 11.9262 2.55605C13.0561 2.99968 14.0703 3.69462 14.8919 4.58825C15.5423 5.29573 16.0585 6.11304 16.4177 7.00002H17.4999C18.6799 6.99991 19.8288 7.37933 20.7766 8.08222C21.7245 8.78515 22.4212 9.7743 22.7637 10.9036C23.1062 12.0328 23.0765 13.2423 22.6788 14.3534C22.2812 15.4644 21.5367 16.4181 20.5554 17.0736C20.0962 17.3803 19.4752 17.2567 19.1684 16.7975C18.8617 16.3382 18.9853 15.7172 19.4445 15.4105C20.069 14.9934 20.5427 14.3865 20.7958 13.6794C21.0488 12.9724 21.0678 12.2027 20.8498 11.4841C20.6318 10.7655 20.1885 10.136 19.5853 9.6887C18.9821 9.24138 18.251 8.99993 17.5001 9.00002H15.71C15.2679 9.00002 14.8783 8.70973 14.7518 8.28611C14.4913 7.41374 14.0357 6.61208 13.4195 5.94186C12.8034 5.27164 12.0427 4.75043 11.1953 4.41771Z",
2727
2567
  fill: "currentColor"
2728
2568
  }
2729
2569
  ),
2730
- /* @__PURE__ */ jsx22(
2570
+ /* @__PURE__ */ jsx24(
2731
2571
  "path",
2732
2572
  {
2733
2573
  d: "M11 14.4142V21C11 21.5523 11.4477 22 12 22C12.5523 22 13 21.5523 13 21V14.4142L15.2929 16.7071C15.6834 17.0976 16.3166 17.0976 16.7071 16.7071C17.0976 16.3166 17.0976 15.6834 16.7071 15.2929L12.7078 11.2936C12.7054 11.2912 12.703 11.2888 12.7005 11.2864C12.5208 11.1099 12.2746 11.0008 12.003 11L12 11L11.997 11C11.8625 11.0004 11.7343 11.0273 11.6172 11.0759C11.502 11.1236 11.3938 11.1937 11.2995 11.2864C11.297 11.2888 11.2946 11.2912 11.2922 11.2936L7.29289 15.2929C6.90237 15.6834 6.90237 16.3166 7.29289 16.7071C7.68342 17.0976 8.31658 17.0976 8.70711 16.7071L11 14.4142Z",
@@ -2737,7 +2577,7 @@ var CloudUploadIcon = () => /* @__PURE__ */ jsxs9(
2737
2577
  ]
2738
2578
  }
2739
2579
  );
2740
- var FileIcon = () => /* @__PURE__ */ jsx22(
2580
+ var FileIcon = () => /* @__PURE__ */ jsx24(
2741
2581
  "svg",
2742
2582
  {
2743
2583
  width: "43",
@@ -2746,7 +2586,7 @@ var FileIcon = () => /* @__PURE__ */ jsx22(
2746
2586
  fill: "currentColor",
2747
2587
  className: "tiptap-image-upload-dropzone-rect-primary",
2748
2588
  xmlns: "http://www.w3.org/2000/svg",
2749
- children: /* @__PURE__ */ jsx22(
2589
+ children: /* @__PURE__ */ jsx24(
2750
2590
  "path",
2751
2591
  {
2752
2592
  d: "M0.75 10.75C0.75 5.64137 4.89137 1.5 10 1.5H32.3431C33.2051 1.5 34.0317 1.84241 34.6412 2.4519L40.2981 8.10876C40.9076 8.71825 41.25 9.5449 41.25 10.4069V46.75C41.25 51.8586 37.1086 56 32 56H10C4.89137 56 0.75 51.8586 0.75 46.75V10.75Z",
@@ -2758,7 +2598,7 @@ var FileIcon = () => /* @__PURE__ */ jsx22(
2758
2598
  )
2759
2599
  }
2760
2600
  );
2761
- var FileCornerIcon = () => /* @__PURE__ */ jsx22(
2601
+ var FileCornerIcon = () => /* @__PURE__ */ jsx24(
2762
2602
  "svg",
2763
2603
  {
2764
2604
  width: "10",
@@ -2767,7 +2607,7 @@ var FileCornerIcon = () => /* @__PURE__ */ jsx22(
2767
2607
  viewBox: "0 0 10 10",
2768
2608
  fill: "currentColor",
2769
2609
  xmlns: "http://www.w3.org/2000/svg",
2770
- children: /* @__PURE__ */ jsx22(
2610
+ children: /* @__PURE__ */ jsx24(
2771
2611
  "path",
2772
2612
  {
2773
2613
  d: "M0 0.75H0.343146C1.40401 0.75 2.42143 1.17143 3.17157 1.92157L8.82843 7.57843C9.57857 8.32857 10 9.34599 10 10.4069V10.75H4C1.79086 10.75 0 8.95914 0 6.75V0.75Z",
@@ -2780,8 +2620,8 @@ var ImageUploadDragArea = ({
2780
2620
  onFile,
2781
2621
  children
2782
2622
  }) => {
2783
- const [isDragOver, setIsDragOver] = useState8(false);
2784
- const [isDragActive, setIsDragActive] = useState8(false);
2623
+ const [isDragOver, setIsDragOver] = useState11(false);
2624
+ const [isDragActive, setIsDragActive] = useState11(false);
2785
2625
  const handleDragEnter = (e) => {
2786
2626
  e.preventDefault();
2787
2627
  e.stopPropagation();
@@ -2810,7 +2650,7 @@ var ImageUploadDragArea = ({
2810
2650
  onFile(files);
2811
2651
  }
2812
2652
  };
2813
- return /* @__PURE__ */ jsx22(
2653
+ return /* @__PURE__ */ jsx24(
2814
2654
  "div",
2815
2655
  {
2816
2656
  className: `tiptap-image-upload-drag-area ${isDragActive ? "drag-active" : ""} ${isDragOver ? "drag-over" : ""}`,
@@ -2833,28 +2673,28 @@ var ImageUploadPreview = ({
2833
2673
  const i = Math.floor(Math.log(bytes) / Math.log(k));
2834
2674
  return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
2835
2675
  };
2836
- return /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-preview", children: [
2837
- fileItem.status === "uploading" && /* @__PURE__ */ jsx22(
2676
+ return /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-preview", children: [
2677
+ fileItem.status === "uploading" && /* @__PURE__ */ jsx24(
2838
2678
  "div",
2839
2679
  {
2840
2680
  className: "tiptap-image-upload-progress",
2841
2681
  style: { width: `${fileItem.progress}%` }
2842
2682
  }
2843
2683
  ),
2844
- /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-preview-content", children: [
2845
- /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-file-info", children: [
2846
- /* @__PURE__ */ jsx22("div", { className: "tiptap-image-upload-file-icon", children: /* @__PURE__ */ jsx22(CloudUploadIcon, {}) }),
2847
- /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-details", children: [
2848
- /* @__PURE__ */ jsx22("span", { className: "tiptap-image-upload-text", children: fileItem.file.name }),
2849
- /* @__PURE__ */ jsx22("span", { className: "tiptap-image-upload-subtext", children: formatFileSize(fileItem.file.size) })
2684
+ /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-preview-content", children: [
2685
+ /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-file-info", children: [
2686
+ /* @__PURE__ */ jsx24("div", { className: "tiptap-image-upload-file-icon", children: /* @__PURE__ */ jsx24(CloudUploadIcon, {}) }),
2687
+ /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-details", children: [
2688
+ /* @__PURE__ */ jsx24("span", { className: "tiptap-image-upload-text", children: fileItem.file.name }),
2689
+ /* @__PURE__ */ jsx24("span", { className: "tiptap-image-upload-subtext", children: formatFileSize(fileItem.file.size) })
2850
2690
  ] })
2851
2691
  ] }),
2852
- /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-actions", children: [
2853
- fileItem.status === "uploading" && /* @__PURE__ */ jsxs9("span", { className: "tiptap-image-upload-progress-text", children: [
2692
+ /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-actions", children: [
2693
+ fileItem.status === "uploading" && /* @__PURE__ */ jsxs11("span", { className: "tiptap-image-upload-progress-text", children: [
2854
2694
  fileItem.progress,
2855
2695
  "%"
2856
2696
  ] }),
2857
- /* @__PURE__ */ jsx22(
2697
+ /* @__PURE__ */ jsx24(
2858
2698
  Button2,
2859
2699
  {
2860
2700
  type: "button",
@@ -2863,7 +2703,7 @@ var ImageUploadPreview = ({
2863
2703
  e.stopPropagation();
2864
2704
  onRemove();
2865
2705
  },
2866
- children: /* @__PURE__ */ jsx22(CloseIcon, { className: "tiptap-button-icon" })
2706
+ children: /* @__PURE__ */ jsx24(CloseIcon, { className: "tiptap-button-icon" })
2867
2707
  }
2868
2708
  )
2869
2709
  ] })
@@ -2873,18 +2713,18 @@ var ImageUploadPreview = ({
2873
2713
  var DropZoneContent = ({
2874
2714
  maxSize,
2875
2715
  limit
2876
- }) => /* @__PURE__ */ jsxs9(Fragment2, { children: [
2877
- /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-dropzone", children: [
2878
- /* @__PURE__ */ jsx22(FileIcon, {}),
2879
- /* @__PURE__ */ jsx22(FileCornerIcon, {}),
2880
- /* @__PURE__ */ jsx22("div", { className: "tiptap-image-upload-icon-container", children: /* @__PURE__ */ jsx22(CloudUploadIcon, {}) })
2716
+ }) => /* @__PURE__ */ jsxs11(Fragment3, { children: [
2717
+ /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-dropzone", children: [
2718
+ /* @__PURE__ */ jsx24(FileIcon, {}),
2719
+ /* @__PURE__ */ jsx24(FileCornerIcon, {}),
2720
+ /* @__PURE__ */ jsx24("div", { className: "tiptap-image-upload-icon-container", children: /* @__PURE__ */ jsx24(CloudUploadIcon, {}) })
2881
2721
  ] }),
2882
- /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-content", children: [
2883
- /* @__PURE__ */ jsxs9("span", { className: "tiptap-image-upload-text", children: [
2884
- /* @__PURE__ */ jsx22("em", { children: "Click to upload" }),
2722
+ /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-content", children: [
2723
+ /* @__PURE__ */ jsxs11("span", { className: "tiptap-image-upload-text", children: [
2724
+ /* @__PURE__ */ jsx24("em", { children: "Click to upload" }),
2885
2725
  " or drag and drop"
2886
2726
  ] }),
2887
- /* @__PURE__ */ jsxs9("span", { className: "tiptap-image-upload-subtext", children: [
2727
+ /* @__PURE__ */ jsxs11("span", { className: "tiptap-image-upload-subtext", children: [
2888
2728
  "Maximum ",
2889
2729
  limit,
2890
2730
  " file",
@@ -2897,7 +2737,7 @@ var DropZoneContent = ({
2897
2737
  ] });
2898
2738
  var ImageUploadNode = (props) => {
2899
2739
  const { accept, limit, maxSize } = props.node.attrs;
2900
- const inputRef = useRef5(null);
2740
+ const inputRef = useRef4(null);
2901
2741
  const extension = props.extension;
2902
2742
  const uploadOptions = {
2903
2743
  maxSize,
@@ -2945,22 +2785,22 @@ var ImageUploadNode = (props) => {
2945
2785
  }
2946
2786
  };
2947
2787
  const hasFiles = fileItems.length > 0;
2948
- return /* @__PURE__ */ jsxs9(
2788
+ return /* @__PURE__ */ jsxs11(
2949
2789
  NodeViewWrapper,
2950
2790
  {
2951
2791
  className: "tiptap-image-upload",
2952
2792
  tabIndex: 0,
2953
2793
  onClick: handleClick,
2954
2794
  children: [
2955
- !hasFiles && /* @__PURE__ */ jsx22(ImageUploadDragArea, { onFile: handleUpload, children: /* @__PURE__ */ jsx22(DropZoneContent, { maxSize, limit }) }),
2956
- hasFiles && /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-previews", children: [
2957
- fileItems.length > 1 && /* @__PURE__ */ jsxs9("div", { className: "tiptap-image-upload-header", children: [
2958
- /* @__PURE__ */ jsxs9("span", { children: [
2795
+ !hasFiles && /* @__PURE__ */ jsx24(ImageUploadDragArea, { onFile: handleUpload, children: /* @__PURE__ */ jsx24(DropZoneContent, { maxSize, limit }) }),
2796
+ hasFiles && /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-previews", children: [
2797
+ fileItems.length > 1 && /* @__PURE__ */ jsxs11("div", { className: "tiptap-image-upload-header", children: [
2798
+ /* @__PURE__ */ jsxs11("span", { children: [
2959
2799
  "Uploading ",
2960
2800
  fileItems.length,
2961
2801
  " files"
2962
2802
  ] }),
2963
- /* @__PURE__ */ jsx22(
2803
+ /* @__PURE__ */ jsx24(
2964
2804
  Button2,
2965
2805
  {
2966
2806
  type: "button",
@@ -2973,7 +2813,7 @@ var ImageUploadNode = (props) => {
2973
2813
  }
2974
2814
  )
2975
2815
  ] }),
2976
- fileItems.map((fileItem) => /* @__PURE__ */ jsx22(
2816
+ fileItems.map((fileItem) => /* @__PURE__ */ jsx24(
2977
2817
  ImageUploadPreview,
2978
2818
  {
2979
2819
  fileItem,
@@ -2982,7 +2822,7 @@ var ImageUploadNode = (props) => {
2982
2822
  fileItem.id
2983
2823
  ))
2984
2824
  ] }),
2985
- /* @__PURE__ */ jsx22(
2825
+ /* @__PURE__ */ jsx24(
2986
2826
  "input",
2987
2827
  {
2988
2828
  ref: inputRef,
@@ -3091,13 +2931,13 @@ var HorizontalRule = TiptapHorizontalRule.extend({
3091
2931
  });
3092
2932
 
3093
2933
  // src/components/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx
3094
- import { forwardRef as forwardRef9, useCallback as useCallback8, useState as useState10 } from "react";
2934
+ import { forwardRef as forwardRef9, useCallback as useCallback10, useState as useState13 } from "react";
3095
2935
 
3096
2936
  // src/components/tiptap-icons/chevron-down-icon.tsx
3097
- import { memo as memo3 } from "react";
3098
- import { jsx as jsx23 } from "react/jsx-runtime";
3099
- var ChevronDownIcon = memo3(({ className, ...props }) => {
3100
- return /* @__PURE__ */ jsx23(
2937
+ import { memo as memo7 } from "react";
2938
+ import { jsx as jsx25 } from "react/jsx-runtime";
2939
+ var ChevronDownIcon = memo7(({ className, ...props }) => {
2940
+ return /* @__PURE__ */ jsx25(
3101
2941
  "svg",
3102
2942
  {
3103
2943
  width: "24",
@@ -3107,7 +2947,7 @@ var ChevronDownIcon = memo3(({ className, ...props }) => {
3107
2947
  fill: "currentColor",
3108
2948
  xmlns: "http://www.w3.org/2000/svg",
3109
2949
  ...props,
3110
- children: /* @__PURE__ */ jsx23(
2950
+ children: /* @__PURE__ */ jsx25(
3111
2951
  "path",
3112
2952
  {
3113
2953
  fillRule: "evenodd",
@@ -3123,10 +2963,10 @@ ChevronDownIcon.displayName = "ChevronDownIcon";
3123
2963
 
3124
2964
  // src/hooks/use-tiptap-editor.ts
3125
2965
  import { useCurrentEditor as useCurrentEditor2, useEditorState } from "@tiptap/react";
3126
- import { useMemo as useMemo6 } from "react";
2966
+ import { useMemo as useMemo5 } from "react";
3127
2967
  function useTiptapEditor(providedEditor) {
3128
2968
  const { editor: coreEditor } = useCurrentEditor2();
3129
- const mainEditor = useMemo6(
2969
+ const mainEditor = useMemo5(
3130
2970
  () => providedEditor || coreEditor,
3131
2971
  [providedEditor, coreEditor]
3132
2972
  );
@@ -3151,11 +2991,11 @@ function useTiptapEditor(providedEditor) {
3151
2991
  }
3152
2992
 
3153
2993
  // src/components/tiptap-ui/heading-button/heading-button.tsx
3154
- import { forwardRef as forwardRef6, useCallback as useCallback6 } from "react";
2994
+ import { forwardRef as forwardRef6, useCallback as useCallback8 } from "react";
3155
2995
 
3156
2996
  // src/components/tiptap-ui-primitive/badge/badge.tsx
3157
2997
  import { forwardRef as forwardRef5 } from "react";
3158
- import { jsx as jsx24 } from "react/jsx-runtime";
2998
+ import { jsx as jsx26 } from "react/jsx-runtime";
3159
2999
  var Badge = forwardRef5(
3160
3000
  ({
3161
3001
  variant,
@@ -3166,7 +3006,7 @@ var Badge = forwardRef5(
3166
3006
  children,
3167
3007
  ...props
3168
3008
  }, ref) => {
3169
- return /* @__PURE__ */ jsx24(
3009
+ return /* @__PURE__ */ jsx26(
3170
3010
  "div",
3171
3011
  {
3172
3012
  ref,
@@ -3184,12 +3024,12 @@ var Badge = forwardRef5(
3184
3024
  Badge.displayName = "Badge";
3185
3025
 
3186
3026
  // src/components/tiptap-ui/heading-button/heading-button.tsx
3187
- import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
3027
+ import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
3188
3028
  function HeadingShortcutBadge({
3189
3029
  level,
3190
3030
  shortcutKeys = HEADING_SHORTCUT_KEYS[level]
3191
3031
  }) {
3192
- return /* @__PURE__ */ jsx25(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
3032
+ return /* @__PURE__ */ jsx27(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
3193
3033
  }
3194
3034
  var HeadingButton = forwardRef6(
3195
3035
  ({
@@ -3218,7 +3058,7 @@ var HeadingButton = forwardRef6(
3218
3058
  hideWhenUnavailable,
3219
3059
  onToggled
3220
3060
  });
3221
- const handleClick = useCallback6(
3061
+ const handleClick = useCallback8(
3222
3062
  (event) => {
3223
3063
  onClick?.(event);
3224
3064
  if (event.defaultPrevented) return;
@@ -3229,7 +3069,7 @@ var HeadingButton = forwardRef6(
3229
3069
  if (!isVisible) {
3230
3070
  return null;
3231
3071
  }
3232
- return /* @__PURE__ */ jsx25(
3072
+ return /* @__PURE__ */ jsx27(
3233
3073
  Button2,
3234
3074
  {
3235
3075
  type: "button",
@@ -3245,10 +3085,10 @@ var HeadingButton = forwardRef6(
3245
3085
  onClick: handleClick,
3246
3086
  ...buttonProps,
3247
3087
  ref,
3248
- children: children ?? /* @__PURE__ */ jsxs10(Fragment3, { children: [
3249
- /* @__PURE__ */ jsx25(Icon, { className: "tiptap-button-icon" }),
3250
- text && /* @__PURE__ */ jsx25("span", { className: "tiptap-button-text", children: text }),
3251
- showShortcut && /* @__PURE__ */ jsx25(HeadingShortcutBadge, { level, shortcutKeys })
3088
+ children: children ?? /* @__PURE__ */ jsxs12(Fragment4, { children: [
3089
+ /* @__PURE__ */ jsx27(Icon, { className: "tiptap-button-icon" }),
3090
+ text && /* @__PURE__ */ jsx27("span", { className: "tiptap-button-text", children: text }),
3091
+ showShortcut && /* @__PURE__ */ jsx27(HeadingShortcutBadge, { level, shortcutKeys })
3252
3092
  ] })
3253
3093
  }
3254
3094
  );
@@ -3257,14 +3097,14 @@ var HeadingButton = forwardRef6(
3257
3097
  HeadingButton.displayName = "HeadingButton";
3258
3098
 
3259
3099
  // src/components/tiptap-ui/heading-button/use-heading.ts
3260
- import { useCallback as useCallback7, useEffect as useEffect5, useState as useState9 } from "react";
3100
+ import { useCallback as useCallback9, useEffect as useEffect5, useState as useState12 } from "react";
3261
3101
  import { NodeSelection as NodeSelection2, TextSelection as TextSelection2 } from "@tiptap/pm/state";
3262
3102
 
3263
3103
  // src/components/tiptap-icons/heading-one-icon.tsx
3264
- import { memo as memo4 } from "react";
3265
- import { jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
3266
- var HeadingOneIcon = memo4(({ className, ...props }) => {
3267
- return /* @__PURE__ */ jsxs11(
3104
+ import { memo as memo8 } from "react";
3105
+ import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
3106
+ var HeadingOneIcon = memo8(({ className, ...props }) => {
3107
+ return /* @__PURE__ */ jsxs13(
3268
3108
  "svg",
3269
3109
  {
3270
3110
  width: "24",
@@ -3275,14 +3115,14 @@ var HeadingOneIcon = memo4(({ className, ...props }) => {
3275
3115
  xmlns: "http://www.w3.org/2000/svg",
3276
3116
  ...props,
3277
3117
  children: [
3278
- /* @__PURE__ */ jsx26(
3118
+ /* @__PURE__ */ jsx28(
3279
3119
  "path",
3280
3120
  {
3281
3121
  d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
3282
3122
  fill: "currentColor"
3283
3123
  }
3284
3124
  ),
3285
- /* @__PURE__ */ jsx26(
3125
+ /* @__PURE__ */ jsx28(
3286
3126
  "path",
3287
3127
  {
3288
3128
  d: "M21.0001 10C21.0001 9.63121 20.7971 9.29235 20.472 9.11833C20.1468 8.94431 19.7523 8.96338 19.4454 9.16795L16.4454 11.168C15.9859 11.4743 15.8617 12.0952 16.1681 12.5547C16.4744 13.0142 17.0953 13.1384 17.5548 12.8321L19.0001 11.8685V18C19.0001 18.5523 19.4478 19 20.0001 19C20.5524 19 21.0001 18.5523 21.0001 18V10Z",
@@ -3296,10 +3136,10 @@ var HeadingOneIcon = memo4(({ className, ...props }) => {
3296
3136
  HeadingOneIcon.displayName = "HeadingOneIcon";
3297
3137
 
3298
3138
  // src/components/tiptap-icons/heading-two-icon.tsx
3299
- import { memo as memo5 } from "react";
3300
- import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
3301
- var HeadingTwoIcon = memo5(({ className, ...props }) => {
3302
- return /* @__PURE__ */ jsxs12(
3139
+ import { memo as memo9 } from "react";
3140
+ import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
3141
+ var HeadingTwoIcon = memo9(({ className, ...props }) => {
3142
+ return /* @__PURE__ */ jsxs14(
3303
3143
  "svg",
3304
3144
  {
3305
3145
  width: "24",
@@ -3310,14 +3150,14 @@ var HeadingTwoIcon = memo5(({ className, ...props }) => {
3310
3150
  xmlns: "http://www.w3.org/2000/svg",
3311
3151
  ...props,
3312
3152
  children: [
3313
- /* @__PURE__ */ jsx27(
3153
+ /* @__PURE__ */ jsx29(
3314
3154
  "path",
3315
3155
  {
3316
3156
  d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
3317
3157
  fill: "currentColor"
3318
3158
  }
3319
3159
  ),
3320
- /* @__PURE__ */ jsx27(
3160
+ /* @__PURE__ */ jsx29(
3321
3161
  "path",
3322
3162
  {
3323
3163
  d: "M22.0001 12C22.0001 10.7611 21.1663 9.79297 20.0663 9.42632C18.9547 9.05578 17.6171 9.28724 16.4001 10.2C15.9582 10.5314 15.8687 11.1582 16.2001 11.6C16.5314 12.0418 17.1582 12.1314 17.6001 11.8C18.383 11.2128 19.0455 11.1942 19.4338 11.3237C19.8339 11.457 20.0001 11.7389 20.0001 12C20.0001 12.4839 19.8554 12.7379 19.6537 12.9481C19.4275 13.1837 19.1378 13.363 18.7055 13.6307C18.6313 13.6767 18.553 13.7252 18.4701 13.777C17.9572 14.0975 17.3128 14.5261 16.8163 15.2087C16.3007 15.9177 16.0001 16.8183 16.0001 18C16.0001 18.5523 16.4478 19 17.0001 19H21.0001C21.5523 19 22.0001 18.5523 22.0001 18C22.0001 17.4477 21.5523 17 21.0001 17H18.131C18.21 16.742 18.3176 16.5448 18.4338 16.385C18.6873 16.0364 19.0429 15.7775 19.5301 15.473C19.5898 15.4357 19.6536 15.3966 19.7205 15.3556C20.139 15.0992 20.6783 14.7687 21.0964 14.3332C21.6447 13.7621 22.0001 13.0161 22.0001 12Z",
@@ -3331,10 +3171,10 @@ var HeadingTwoIcon = memo5(({ className, ...props }) => {
3331
3171
  HeadingTwoIcon.displayName = "HeadingTwoIcon";
3332
3172
 
3333
3173
  // src/components/tiptap-icons/heading-three-icon.tsx
3334
- import { memo as memo6 } from "react";
3335
- import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
3336
- var HeadingThreeIcon = memo6(({ className, ...props }) => {
3337
- return /* @__PURE__ */ jsxs13(
3174
+ import { memo as memo10 } from "react";
3175
+ import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
3176
+ var HeadingThreeIcon = memo10(({ className, ...props }) => {
3177
+ return /* @__PURE__ */ jsxs15(
3338
3178
  "svg",
3339
3179
  {
3340
3180
  width: "24",
@@ -3345,14 +3185,14 @@ var HeadingThreeIcon = memo6(({ className, ...props }) => {
3345
3185
  xmlns: "http://www.w3.org/2000/svg",
3346
3186
  ...props,
3347
3187
  children: [
3348
- /* @__PURE__ */ jsx28(
3188
+ /* @__PURE__ */ jsx30(
3349
3189
  "path",
3350
3190
  {
3351
3191
  d: "M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z",
3352
3192
  fill: "currentColor"
3353
3193
  }
3354
3194
  ),
3355
- /* @__PURE__ */ jsx28(
3195
+ /* @__PURE__ */ jsx30(
3356
3196
  "path",
3357
3197
  {
3358
3198
  fillRule: "evenodd",
@@ -3361,7 +3201,7 @@ var HeadingThreeIcon = memo6(({ className, ...props }) => {
3361
3201
  fill: "currentColor"
3362
3202
  }
3363
3203
  ),
3364
- /* @__PURE__ */ jsx28(
3204
+ /* @__PURE__ */ jsx30(
3365
3205
  "path",
3366
3206
  {
3367
3207
  fillRule: "evenodd",
@@ -3377,10 +3217,10 @@ var HeadingThreeIcon = memo6(({ className, ...props }) => {
3377
3217
  HeadingThreeIcon.displayName = "HeadingThreeIcon";
3378
3218
 
3379
3219
  // src/components/tiptap-icons/heading-four-icon.tsx
3380
- import { memo as memo7 } from "react";
3381
- import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
3382
- var HeadingFourIcon = memo7(({ className, ...props }) => {
3383
- return /* @__PURE__ */ jsxs14(
3220
+ import { memo as memo11 } from "react";
3221
+ import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
3222
+ var HeadingFourIcon = memo11(({ className, ...props }) => {
3223
+ return /* @__PURE__ */ jsxs16(
3384
3224
  "svg",
3385
3225
  {
3386
3226
  width: "24",
@@ -3391,14 +3231,14 @@ var HeadingFourIcon = memo7(({ className, ...props }) => {
3391
3231
  xmlns: "http://www.w3.org/2000/svg",
3392
3232
  ...props,
3393
3233
  children: [
3394
- /* @__PURE__ */ jsx29(
3234
+ /* @__PURE__ */ jsx31(
3395
3235
  "path",
3396
3236
  {
3397
3237
  d: "M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z",
3398
3238
  fill: "currentColor"
3399
3239
  }
3400
3240
  ),
3401
- /* @__PURE__ */ jsx29(
3241
+ /* @__PURE__ */ jsx31(
3402
3242
  "path",
3403
3243
  {
3404
3244
  d: "M17 9C17.5523 9 18 9.44772 18 10V13H20V10C20 9.44772 20.4477 9 21 9C21.5523 9 22 9.44772 22 10V18C22 18.5523 21.5523 19 21 19C20.4477 19 20 18.5523 20 18V15H17C16.4477 15 16 14.5523 16 14V10C16 9.44772 16.4477 9 17 9Z",
@@ -3412,10 +3252,10 @@ var HeadingFourIcon = memo7(({ className, ...props }) => {
3412
3252
  HeadingFourIcon.displayName = "HeadingFourIcon";
3413
3253
 
3414
3254
  // src/components/tiptap-icons/heading-five-icon.tsx
3415
- import { memo as memo8 } from "react";
3416
- import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
3417
- var HeadingFiveIcon = memo8(({ className, ...props }) => {
3418
- return /* @__PURE__ */ jsxs15(
3255
+ import { memo as memo12 } from "react";
3256
+ import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
3257
+ var HeadingFiveIcon = memo12(({ className, ...props }) => {
3258
+ return /* @__PURE__ */ jsxs17(
3419
3259
  "svg",
3420
3260
  {
3421
3261
  width: "24",
@@ -3426,14 +3266,14 @@ var HeadingFiveIcon = memo8(({ className, ...props }) => {
3426
3266
  xmlns: "http://www.w3.org/2000/svg",
3427
3267
  ...props,
3428
3268
  children: [
3429
- /* @__PURE__ */ jsx30(
3269
+ /* @__PURE__ */ jsx32(
3430
3270
  "path",
3431
3271
  {
3432
3272
  d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
3433
3273
  fill: "currentColor"
3434
3274
  }
3435
3275
  ),
3436
- /* @__PURE__ */ jsx30(
3276
+ /* @__PURE__ */ jsx32(
3437
3277
  "path",
3438
3278
  {
3439
3279
  d: "M16 10C16 9.44772 16.4477 9 17 9H21C21.5523 9 22 9.44772 22 10C22 10.5523 21.5523 11 21 11H18V12H18.3C20.2754 12 22 13.4739 22 15.5C22 17.5261 20.2754 19 18.3 19C17.6457 19 17.0925 18.8643 16.5528 18.5944C16.0588 18.3474 15.8586 17.7468 16.1055 17.2528C16.3525 16.7588 16.9532 16.5586 17.4472 16.8056C17.7074 16.9357 17.9542 17 18.3 17C19.3246 17 20 16.2739 20 15.5C20 14.7261 19.3246 14 18.3 14H17C16.4477 14 16 13.5523 16 13L16 12.9928V10Z",
@@ -3447,10 +3287,10 @@ var HeadingFiveIcon = memo8(({ className, ...props }) => {
3447
3287
  HeadingFiveIcon.displayName = "HeadingFiveIcon";
3448
3288
 
3449
3289
  // src/components/tiptap-icons/heading-six-icon.tsx
3450
- import { memo as memo9 } from "react";
3451
- import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
3452
- var HeadingSixIcon = memo9(({ className, ...props }) => {
3453
- return /* @__PURE__ */ jsxs16(
3290
+ import { memo as memo13 } from "react";
3291
+ import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
3292
+ var HeadingSixIcon = memo13(({ className, ...props }) => {
3293
+ return /* @__PURE__ */ jsxs18(
3454
3294
  "svg",
3455
3295
  {
3456
3296
  width: "24",
@@ -3461,14 +3301,14 @@ var HeadingSixIcon = memo9(({ className, ...props }) => {
3461
3301
  xmlns: "http://www.w3.org/2000/svg",
3462
3302
  ...props,
3463
3303
  children: [
3464
- /* @__PURE__ */ jsx31(
3304
+ /* @__PURE__ */ jsx33(
3465
3305
  "path",
3466
3306
  {
3467
3307
  d: "M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",
3468
3308
  fill: "currentColor"
3469
3309
  }
3470
3310
  ),
3471
- /* @__PURE__ */ jsx31(
3311
+ /* @__PURE__ */ jsx33(
3472
3312
  "path",
3473
3313
  {
3474
3314
  fillRule: "evenodd",
@@ -3587,7 +3427,7 @@ function useHeading(config) {
3587
3427
  onToggled
3588
3428
  } = config;
3589
3429
  const { editor } = useTiptapEditor(providedEditor);
3590
- const [isVisible, setIsVisible] = useState9(true);
3430
+ const [isVisible, setIsVisible] = useState12(true);
3591
3431
  const canToggleState = canToggle(editor, level);
3592
3432
  const isActive = isHeadingActive(editor, level);
3593
3433
  useEffect5(() => {
@@ -3601,7 +3441,7 @@ function useHeading(config) {
3601
3441
  editor.off("selectionUpdate", handleSelectionUpdate);
3602
3442
  };
3603
3443
  }, [editor, level, hideWhenUnavailable]);
3604
- const handleToggle = useCallback7(() => {
3444
+ const handleToggle = useCallback9(() => {
3605
3445
  if (!editor) return false;
3606
3446
  const success = toggleHeading(editor, level);
3607
3447
  if (success) {
@@ -3622,36 +3462,36 @@ function useHeading(config) {
3622
3462
 
3623
3463
  // src/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.tsx
3624
3464
  import { forwardRef as forwardRef7 } from "react";
3625
- import * as DropdownMenuPrimitive2 from "@radix-ui/react-dropdown-menu";
3626
- import { jsx as jsx32 } from "react/jsx-runtime";
3627
- function DropdownMenu2({
3465
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3466
+ import { jsx as jsx34 } from "react/jsx-runtime";
3467
+ function DropdownMenu({
3628
3468
  ...props
3629
3469
  }) {
3630
- return /* @__PURE__ */ jsx32(DropdownMenuPrimitive2.Root, { modal: false, ...props });
3470
+ return /* @__PURE__ */ jsx34(DropdownMenuPrimitive.Root, { modal: false, ...props });
3631
3471
  }
3632
3472
  function DropdownMenuPortal({
3633
3473
  ...props
3634
3474
  }) {
3635
- return /* @__PURE__ */ jsx32(DropdownMenuPrimitive2.Portal, { ...props });
3475
+ return /* @__PURE__ */ jsx34(DropdownMenuPrimitive.Portal, { ...props });
3636
3476
  }
3637
- var DropdownMenuTrigger2 = forwardRef7(({ ...props }, ref) => /* @__PURE__ */ jsx32(DropdownMenuPrimitive2.Trigger, { ref, ...props }));
3638
- DropdownMenuTrigger2.displayName = DropdownMenuPrimitive2.Trigger.displayName;
3639
- var DropdownMenuItem2 = DropdownMenuPrimitive2.Item;
3477
+ var DropdownMenuTrigger = forwardRef7(({ ...props }, ref) => /* @__PURE__ */ jsx34(DropdownMenuPrimitive.Trigger, { ref, ...props }));
3478
+ DropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;
3479
+ var DropdownMenuItem = DropdownMenuPrimitive.Item;
3640
3480
  var DropdownMenuSubContent = forwardRef7(({ className, portal = true, ...props }, ref) => {
3641
- const content = /* @__PURE__ */ jsx32(
3642
- DropdownMenuPrimitive2.SubContent,
3481
+ const content = /* @__PURE__ */ jsx34(
3482
+ DropdownMenuPrimitive.SubContent,
3643
3483
  {
3644
3484
  ref,
3645
3485
  className: cn2("tiptap-dropdown-menu", className),
3646
3486
  ...props
3647
3487
  }
3648
3488
  );
3649
- return portal ? /* @__PURE__ */ jsx32(DropdownMenuPortal, { ...typeof portal === "object" ? portal : {}, children: content }) : content;
3489
+ return portal ? /* @__PURE__ */ jsx34(DropdownMenuPortal, { ...typeof portal === "object" ? portal : {}, children: content }) : content;
3650
3490
  });
3651
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive2.SubContent.displayName;
3652
- var DropdownMenuContent2 = forwardRef7(({ className, sideOffset = 4, portal = false, ...props }, ref) => {
3653
- const content = /* @__PURE__ */ jsx32(
3654
- DropdownMenuPrimitive2.Content,
3491
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
3492
+ var DropdownMenuContent = forwardRef7(({ className, sideOffset = 4, portal = false, ...props }, ref) => {
3493
+ const content = /* @__PURE__ */ jsx34(
3494
+ DropdownMenuPrimitive.Content,
3655
3495
  {
3656
3496
  ref,
3657
3497
  sideOffset,
@@ -3660,22 +3500,22 @@ var DropdownMenuContent2 = forwardRef7(({ className, sideOffset = 4, portal = fa
3660
3500
  ...props
3661
3501
  }
3662
3502
  );
3663
- return portal ? /* @__PURE__ */ jsx32(DropdownMenuPortal, { ...typeof portal === "object" ? portal : {}, children: content }) : content;
3503
+ return portal ? /* @__PURE__ */ jsx34(DropdownMenuPortal, { ...typeof portal === "object" ? portal : {}, children: content }) : content;
3664
3504
  });
3665
- DropdownMenuContent2.displayName = DropdownMenuPrimitive2.Content.displayName;
3505
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
3666
3506
 
3667
3507
  // src/components/tiptap-ui-primitive/card/card.tsx
3668
3508
  import { forwardRef as forwardRef8 } from "react";
3669
- import { jsx as jsx33 } from "react/jsx-runtime";
3509
+ import { jsx as jsx35 } from "react/jsx-runtime";
3670
3510
  var Card = forwardRef8(
3671
3511
  ({ className, ...props }, ref) => {
3672
- return /* @__PURE__ */ jsx33("div", { ref, className: cn2("tiptap-card", className), ...props });
3512
+ return /* @__PURE__ */ jsx35("div", { ref, className: cn2("tiptap-card", className), ...props });
3673
3513
  }
3674
3514
  );
3675
3515
  Card.displayName = "Card";
3676
3516
  var CardHeader = forwardRef8(
3677
3517
  ({ className, ...props }, ref) => {
3678
- return /* @__PURE__ */ jsx33(
3518
+ return /* @__PURE__ */ jsx35(
3679
3519
  "div",
3680
3520
  {
3681
3521
  ref,
@@ -3688,12 +3528,12 @@ var CardHeader = forwardRef8(
3688
3528
  CardHeader.displayName = "CardHeader";
3689
3529
  var CardBody = forwardRef8(
3690
3530
  ({ className, ...props }, ref) => {
3691
- return /* @__PURE__ */ jsx33("div", { ref, className: cn2("tiptap-card-body", className), ...props });
3531
+ return /* @__PURE__ */ jsx35("div", { ref, className: cn2("tiptap-card-body", className), ...props });
3692
3532
  }
3693
3533
  );
3694
3534
  CardBody.displayName = "CardBody";
3695
3535
  var CardItemGroup = forwardRef8(({ className, orientation = "vertical", ...props }, ref) => {
3696
- return /* @__PURE__ */ jsx33(
3536
+ return /* @__PURE__ */ jsx35(
3697
3537
  "div",
3698
3538
  {
3699
3539
  ref,
@@ -3706,7 +3546,7 @@ var CardItemGroup = forwardRef8(({ className, orientation = "vertical", ...props
3706
3546
  CardItemGroup.displayName = "CardItemGroup";
3707
3547
  var CardGroupLabel = forwardRef8(
3708
3548
  ({ className, ...props }, ref) => {
3709
- return /* @__PURE__ */ jsx33(
3549
+ return /* @__PURE__ */ jsx35(
3710
3550
  "div",
3711
3551
  {
3712
3552
  ref,
@@ -3719,7 +3559,7 @@ var CardGroupLabel = forwardRef8(
3719
3559
  CardGroupLabel.displayName = "CardGroupLabel";
3720
3560
  var CardFooter = forwardRef8(
3721
3561
  ({ className, ...props }, ref) => {
3722
- return /* @__PURE__ */ jsx33(
3562
+ return /* @__PURE__ */ jsx35(
3723
3563
  "div",
3724
3564
  {
3725
3565
  ref,
@@ -3732,7 +3572,7 @@ var CardFooter = forwardRef8(
3732
3572
  CardFooter.displayName = "CardFooter";
3733
3573
 
3734
3574
  // src/components/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx
3735
- import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
3575
+ import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
3736
3576
  var HeadingDropdownMenu = forwardRef9(
3737
3577
  ({
3738
3578
  editor: providedEditor,
@@ -3743,13 +3583,13 @@ var HeadingDropdownMenu = forwardRef9(
3743
3583
  ...buttonProps
3744
3584
  }, ref) => {
3745
3585
  const { editor } = useTiptapEditor(providedEditor);
3746
- const [isOpen, setIsOpen] = useState10(false);
3586
+ const [isOpen, setIsOpen] = useState13(false);
3747
3587
  const { isVisible, isActive, canToggle: canToggle2, Icon } = useHeadingDropdownMenu({
3748
3588
  editor,
3749
3589
  levels,
3750
3590
  hideWhenUnavailable
3751
3591
  });
3752
- const handleOpenChange = useCallback8(
3592
+ const handleOpenChange = useCallback10(
3753
3593
  (open) => {
3754
3594
  if (!editor || !canToggle2) return;
3755
3595
  setIsOpen(open);
@@ -3760,8 +3600,8 @@ var HeadingDropdownMenu = forwardRef9(
3760
3600
  if (!isVisible) {
3761
3601
  return null;
3762
3602
  }
3763
- return /* @__PURE__ */ jsxs17(DropdownMenu2, { modal: true, open: isOpen, onOpenChange: handleOpenChange, children: [
3764
- /* @__PURE__ */ jsx34(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs17(
3603
+ return /* @__PURE__ */ jsxs19(DropdownMenu, { modal: true, open: isOpen, onOpenChange: handleOpenChange, children: [
3604
+ /* @__PURE__ */ jsx36(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs19(
3765
3605
  Button2,
3766
3606
  {
3767
3607
  type: "button",
@@ -3777,12 +3617,12 @@ var HeadingDropdownMenu = forwardRef9(
3777
3617
  ...buttonProps,
3778
3618
  ref,
3779
3619
  children: [
3780
- /* @__PURE__ */ jsx34(Icon, { className: "tiptap-button-icon" }),
3781
- /* @__PURE__ */ jsx34(ChevronDownIcon, { className: "tiptap-button-dropdown-small" })
3620
+ /* @__PURE__ */ jsx36(Icon, { className: "tiptap-button-icon" }),
3621
+ /* @__PURE__ */ jsx36(ChevronDownIcon, { className: "tiptap-button-dropdown-small" })
3782
3622
  ]
3783
3623
  }
3784
3624
  ) }),
3785
- /* @__PURE__ */ jsx34(DropdownMenuContent2, { align: "start", portal, children: /* @__PURE__ */ jsx34(Card, { children: /* @__PURE__ */ jsx34(CardBody, { children: /* @__PURE__ */ jsx34(ButtonGroup, { children: levels.map((level) => /* @__PURE__ */ jsx34(DropdownMenuItem2, { asChild: true, children: /* @__PURE__ */ jsx34(
3625
+ /* @__PURE__ */ jsx36(DropdownMenuContent, { align: "start", portal, children: /* @__PURE__ */ jsx36(Card, { children: /* @__PURE__ */ jsx36(CardBody, { children: /* @__PURE__ */ jsx36(ButtonGroup, { children: levels.map((level) => /* @__PURE__ */ jsx36(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx36(
3786
3626
  HeadingButton,
3787
3627
  {
3788
3628
  editor,
@@ -3797,13 +3637,13 @@ var HeadingDropdownMenu = forwardRef9(
3797
3637
  HeadingDropdownMenu.displayName = "HeadingDropdownMenu";
3798
3638
 
3799
3639
  // src/components/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.ts
3800
- import { useEffect as useEffect6, useState as useState11 } from "react";
3640
+ import { useEffect as useEffect6, useState as useState14 } from "react";
3801
3641
 
3802
3642
  // src/components/tiptap-icons/heading-icon.tsx
3803
- import { memo as memo10 } from "react";
3804
- import { jsx as jsx35 } from "react/jsx-runtime";
3805
- var HeadingIcon = memo10(({ className, ...props }) => {
3806
- return /* @__PURE__ */ jsx35(
3643
+ import { memo as memo14 } from "react";
3644
+ import { jsx as jsx37 } from "react/jsx-runtime";
3645
+ var HeadingIcon = memo14(({ className, ...props }) => {
3646
+ return /* @__PURE__ */ jsx37(
3807
3647
  "svg",
3808
3648
  {
3809
3649
  width: "24",
@@ -3813,7 +3653,7 @@ var HeadingIcon = memo10(({ className, ...props }) => {
3813
3653
  fill: "currentColor",
3814
3654
  xmlns: "http://www.w3.org/2000/svg",
3815
3655
  ...props,
3816
- children: /* @__PURE__ */ jsx35(
3656
+ children: /* @__PURE__ */ jsx37(
3817
3657
  "path",
3818
3658
  {
3819
3659
  d: "M6 3C6.55228 3 7 3.44772 7 4V11H17V4C17 3.44772 17.4477 3 18 3C18.5523 3 19 3.44772 19 4V20C19 20.5523 18.5523 21 18 21C17.4477 21 17 20.5523 17 20V13H7V20C7 20.5523 6.55228 21 6 21C5.44772 21 5 20.5523 5 20V4C5 3.44772 5.44772 3 6 3Z",
@@ -3837,7 +3677,7 @@ function useHeadingDropdownMenu(config) {
3837
3677
  hideWhenUnavailable = false
3838
3678
  } = config || {};
3839
3679
  const { editor } = useTiptapEditor(providedEditor);
3840
- const [isVisible, setIsVisible] = useState11(true);
3680
+ const [isVisible, setIsVisible] = useState14(true);
3841
3681
  const activeLevel = getActiveHeadingLevel(editor, levels);
3842
3682
  const isActive = isHeadingActive(editor);
3843
3683
  const canToggleState = canToggle(editor);
@@ -3866,12 +3706,12 @@ function useHeadingDropdownMenu(config) {
3866
3706
  }
3867
3707
 
3868
3708
  // src/components/tiptap-ui/image-upload-button/image-upload-button.tsx
3869
- import { forwardRef as forwardRef10, useCallback as useCallback9 } from "react";
3870
- import { Fragment as Fragment4, jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
3709
+ import { forwardRef as forwardRef10, useCallback as useCallback11 } from "react";
3710
+ import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
3871
3711
  function ImageShortcutBadge({
3872
3712
  shortcutKeys = IMAGE_UPLOAD_SHORTCUT_KEY
3873
3713
  }) {
3874
- return /* @__PURE__ */ jsx36(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
3714
+ return /* @__PURE__ */ jsx38(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
3875
3715
  }
3876
3716
  var ImageUploadButton = forwardRef10(
3877
3717
  ({
@@ -3899,7 +3739,7 @@ var ImageUploadButton = forwardRef10(
3899
3739
  hideWhenUnavailable,
3900
3740
  onInserted
3901
3741
  });
3902
- const handleClick = useCallback9(
3742
+ const handleClick = useCallback11(
3903
3743
  async (event) => {
3904
3744
  onClick?.(event);
3905
3745
  if (event.defaultPrevented) return;
@@ -3911,7 +3751,7 @@ var ImageUploadButton = forwardRef10(
3911
3751
  return null;
3912
3752
  }
3913
3753
  const RenderIcon = CustomIcon ?? Icon;
3914
- return /* @__PURE__ */ jsx36(
3754
+ return /* @__PURE__ */ jsx38(
3915
3755
  Button2,
3916
3756
  {
3917
3757
  type: "button",
@@ -3927,10 +3767,10 @@ var ImageUploadButton = forwardRef10(
3927
3767
  onClick: handleClick,
3928
3768
  ...buttonProps,
3929
3769
  ref,
3930
- children: children ?? /* @__PURE__ */ jsxs18(Fragment4, { children: [
3931
- /* @__PURE__ */ jsx36(RenderIcon, { className: "tiptap-button-icon" }),
3932
- text && /* @__PURE__ */ jsx36("span", { className: "tiptap-button-text", children: text }),
3933
- showShortcut && /* @__PURE__ */ jsx36(ImageShortcutBadge, { shortcutKeys })
3770
+ children: children ?? /* @__PURE__ */ jsxs20(Fragment5, { children: [
3771
+ /* @__PURE__ */ jsx38(RenderIcon, { className: "tiptap-button-icon" }),
3772
+ text && /* @__PURE__ */ jsx38("span", { className: "tiptap-button-text", children: text }),
3773
+ showShortcut && /* @__PURE__ */ jsx38(ImageShortcutBadge, { shortcutKeys })
3934
3774
  ] })
3935
3775
  }
3936
3776
  );
@@ -3939,13 +3779,13 @@ var ImageUploadButton = forwardRef10(
3939
3779
  ImageUploadButton.displayName = "ImageUploadButton";
3940
3780
 
3941
3781
  // src/components/tiptap-ui/image-upload-button/use-image-upload.ts
3942
- import { useCallback as useCallback10, useEffect as useEffect8, useState as useState13 } from "react";
3782
+ import { useCallback as useCallback12, useEffect as useEffect8, useState as useState16 } from "react";
3943
3783
  import { useHotkeys } from "react-hotkeys-hook";
3944
3784
 
3945
3785
  // src/hooks/use-is-breakpoint.ts
3946
- import { useEffect as useEffect7, useState as useState12 } from "react";
3786
+ import { useEffect as useEffect7, useState as useState15 } from "react";
3947
3787
  function useIsBreakpoint(mode = "max", breakpoint = 768) {
3948
- const [matches, setMatches] = useState12(void 0);
3788
+ const [matches, setMatches] = useState15(void 0);
3949
3789
  useEffect7(() => {
3950
3790
  const query = mode === "min" ? `(min-width: ${breakpoint}px)` : `(max-width: ${breakpoint - 1}px)`;
3951
3791
  const mql = window.matchMedia(query);
@@ -3958,10 +3798,10 @@ function useIsBreakpoint(mode = "max", breakpoint = 768) {
3958
3798
  }
3959
3799
 
3960
3800
  // src/components/tiptap-icons/image-plus-icon.tsx
3961
- import { memo as memo11 } from "react";
3962
- import { jsx as jsx37 } from "react/jsx-runtime";
3963
- var ImagePlusIcon = memo11(({ className, ...props }) => {
3964
- return /* @__PURE__ */ jsx37(
3801
+ import { memo as memo15 } from "react";
3802
+ import { jsx as jsx39 } from "react/jsx-runtime";
3803
+ var ImagePlusIcon = memo15(({ className, ...props }) => {
3804
+ return /* @__PURE__ */ jsx39(
3965
3805
  "svg",
3966
3806
  {
3967
3807
  width: "24",
@@ -3971,7 +3811,7 @@ var ImagePlusIcon = memo11(({ className, ...props }) => {
3971
3811
  fill: "currentColor",
3972
3812
  xmlns: "http://www.w3.org/2000/svg",
3973
3813
  ...props,
3974
- children: /* @__PURE__ */ jsx37(
3814
+ children: /* @__PURE__ */ jsx39(
3975
3815
  "path",
3976
3816
  {
3977
3817
  fillRule: "evenodd",
@@ -4045,7 +3885,7 @@ function useImageUpload(config) {
4045
3885
  } = config || {};
4046
3886
  const { editor } = useTiptapEditor(providedEditor);
4047
3887
  const isMobile = useIsBreakpoint();
4048
- const [isVisible, setIsVisible] = useState13(true);
3888
+ const [isVisible, setIsVisible] = useState16(true);
4049
3889
  const canInsert = canInsertImage(editor);
4050
3890
  const isActive = isImageActive(editor);
4051
3891
  useEffect8(() => {
@@ -4059,7 +3899,7 @@ function useImageUpload(config) {
4059
3899
  editor.off("selectionUpdate", handleSelectionUpdate);
4060
3900
  };
4061
3901
  }, [editor, hideWhenUnavailable]);
4062
- const handleImage = useCallback10(async () => {
3902
+ const handleImage = useCallback12(async () => {
4063
3903
  if (!editor) return false;
4064
3904
  const success = insertImage(editor);
4065
3905
  if (await success) {
@@ -4091,16 +3931,16 @@ function useImageUpload(config) {
4091
3931
  }
4092
3932
 
4093
3933
  // src/components/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx
4094
- import { useCallback as useCallback13, useState as useState16 } from "react";
3934
+ import { useCallback as useCallback15, useState as useState19 } from "react";
4095
3935
 
4096
3936
  // src/components/tiptap-ui/list-button/list-button.tsx
4097
- import { forwardRef as forwardRef11, useCallback as useCallback11 } from "react";
4098
- import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
3937
+ import { forwardRef as forwardRef11, useCallback as useCallback13 } from "react";
3938
+ import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
4099
3939
  function ListShortcutBadge({
4100
3940
  type,
4101
3941
  shortcutKeys = LIST_SHORTCUT_KEYS[type]
4102
3942
  }) {
4103
- return /* @__PURE__ */ jsx38(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
3943
+ return /* @__PURE__ */ jsx40(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
4104
3944
  }
4105
3945
  var ListButton = forwardRef11(
4106
3946
  ({
@@ -4129,7 +3969,7 @@ var ListButton = forwardRef11(
4129
3969
  hideWhenUnavailable,
4130
3970
  onToggled
4131
3971
  });
4132
- const handleClick = useCallback11(
3972
+ const handleClick = useCallback13(
4133
3973
  (event) => {
4134
3974
  onClick?.(event);
4135
3975
  if (event.defaultPrevented) return;
@@ -4140,7 +3980,7 @@ var ListButton = forwardRef11(
4140
3980
  if (!isVisible) {
4141
3981
  return null;
4142
3982
  }
4143
- return /* @__PURE__ */ jsx38(
3983
+ return /* @__PURE__ */ jsx40(
4144
3984
  Button2,
4145
3985
  {
4146
3986
  type: "button",
@@ -4156,10 +3996,10 @@ var ListButton = forwardRef11(
4156
3996
  onClick: handleClick,
4157
3997
  ...buttonProps,
4158
3998
  ref,
4159
- children: children ?? /* @__PURE__ */ jsxs19(Fragment5, { children: [
4160
- /* @__PURE__ */ jsx38(Icon, { className: "tiptap-button-icon" }),
4161
- text && /* @__PURE__ */ jsx38("span", { className: "tiptap-button-text", children: text }),
4162
- showShortcut && /* @__PURE__ */ jsx38(ListShortcutBadge, { type, shortcutKeys })
3999
+ children: children ?? /* @__PURE__ */ jsxs21(Fragment6, { children: [
4000
+ /* @__PURE__ */ jsx40(Icon, { className: "tiptap-button-icon" }),
4001
+ text && /* @__PURE__ */ jsx40("span", { className: "tiptap-button-text", children: text }),
4002
+ showShortcut && /* @__PURE__ */ jsx40(ListShortcutBadge, { type, shortcutKeys })
4163
4003
  ] })
4164
4004
  }
4165
4005
  );
@@ -4168,14 +4008,14 @@ var ListButton = forwardRef11(
4168
4008
  ListButton.displayName = "ListButton";
4169
4009
 
4170
4010
  // src/components/tiptap-ui/list-button/use-list.ts
4171
- import { useCallback as useCallback12, useEffect as useEffect9, useState as useState14 } from "react";
4011
+ import { useCallback as useCallback14, useEffect as useEffect9, useState as useState17 } from "react";
4172
4012
  import { NodeSelection as NodeSelection3, TextSelection as TextSelection3 } from "@tiptap/pm/state";
4173
4013
 
4174
4014
  // src/components/tiptap-icons/list-icon.tsx
4175
- import { memo as memo12 } from "react";
4176
- import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
4177
- var ListIcon = memo12(({ className, ...props }) => {
4178
- return /* @__PURE__ */ jsxs20(
4015
+ import { memo as memo16 } from "react";
4016
+ import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
4017
+ var ListIcon = memo16(({ className, ...props }) => {
4018
+ return /* @__PURE__ */ jsxs22(
4179
4019
  "svg",
4180
4020
  {
4181
4021
  width: "24",
@@ -4186,7 +4026,7 @@ var ListIcon = memo12(({ className, ...props }) => {
4186
4026
  xmlns: "http://www.w3.org/2000/svg",
4187
4027
  ...props,
4188
4028
  children: [
4189
- /* @__PURE__ */ jsx39(
4029
+ /* @__PURE__ */ jsx41(
4190
4030
  "path",
4191
4031
  {
4192
4032
  fillRule: "evenodd",
@@ -4195,7 +4035,7 @@ var ListIcon = memo12(({ className, ...props }) => {
4195
4035
  fill: "currentColor"
4196
4036
  }
4197
4037
  ),
4198
- /* @__PURE__ */ jsx39(
4038
+ /* @__PURE__ */ jsx41(
4199
4039
  "path",
4200
4040
  {
4201
4041
  fillRule: "evenodd",
@@ -4204,7 +4044,7 @@ var ListIcon = memo12(({ className, ...props }) => {
4204
4044
  fill: "currentColor"
4205
4045
  }
4206
4046
  ),
4207
- /* @__PURE__ */ jsx39(
4047
+ /* @__PURE__ */ jsx41(
4208
4048
  "path",
4209
4049
  {
4210
4050
  fillRule: "evenodd",
@@ -4213,7 +4053,7 @@ var ListIcon = memo12(({ className, ...props }) => {
4213
4053
  fill: "currentColor"
4214
4054
  }
4215
4055
  ),
4216
- /* @__PURE__ */ jsx39(
4056
+ /* @__PURE__ */ jsx41(
4217
4057
  "path",
4218
4058
  {
4219
4059
  fillRule: "evenodd",
@@ -4222,7 +4062,7 @@ var ListIcon = memo12(({ className, ...props }) => {
4222
4062
  fill: "currentColor"
4223
4063
  }
4224
4064
  ),
4225
- /* @__PURE__ */ jsx39(
4065
+ /* @__PURE__ */ jsx41(
4226
4066
  "path",
4227
4067
  {
4228
4068
  fillRule: "evenodd",
@@ -4231,7 +4071,7 @@ var ListIcon = memo12(({ className, ...props }) => {
4231
4071
  fill: "currentColor"
4232
4072
  }
4233
4073
  ),
4234
- /* @__PURE__ */ jsx39(
4074
+ /* @__PURE__ */ jsx41(
4235
4075
  "path",
4236
4076
  {
4237
4077
  fillRule: "evenodd",
@@ -4247,10 +4087,10 @@ var ListIcon = memo12(({ className, ...props }) => {
4247
4087
  ListIcon.displayName = "ListIcon";
4248
4088
 
4249
4089
  // src/components/tiptap-icons/list-ordered-icon.tsx
4250
- import { memo as memo13 } from "react";
4251
- import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
4252
- var ListOrderedIcon = memo13(({ className, ...props }) => {
4253
- return /* @__PURE__ */ jsxs21(
4090
+ import { memo as memo17 } from "react";
4091
+ import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
4092
+ var ListOrderedIcon = memo17(({ className, ...props }) => {
4093
+ return /* @__PURE__ */ jsxs23(
4254
4094
  "svg",
4255
4095
  {
4256
4096
  width: "24",
@@ -4261,7 +4101,7 @@ var ListOrderedIcon = memo13(({ className, ...props }) => {
4261
4101
  xmlns: "http://www.w3.org/2000/svg",
4262
4102
  ...props,
4263
4103
  children: [
4264
- /* @__PURE__ */ jsx40(
4104
+ /* @__PURE__ */ jsx42(
4265
4105
  "path",
4266
4106
  {
4267
4107
  fillRule: "evenodd",
@@ -4270,7 +4110,7 @@ var ListOrderedIcon = memo13(({ className, ...props }) => {
4270
4110
  fill: "currentColor"
4271
4111
  }
4272
4112
  ),
4273
- /* @__PURE__ */ jsx40(
4113
+ /* @__PURE__ */ jsx42(
4274
4114
  "path",
4275
4115
  {
4276
4116
  fillRule: "evenodd",
@@ -4279,7 +4119,7 @@ var ListOrderedIcon = memo13(({ className, ...props }) => {
4279
4119
  fill: "currentColor"
4280
4120
  }
4281
4121
  ),
4282
- /* @__PURE__ */ jsx40(
4122
+ /* @__PURE__ */ jsx42(
4283
4123
  "path",
4284
4124
  {
4285
4125
  fillRule: "evenodd",
@@ -4288,7 +4128,7 @@ var ListOrderedIcon = memo13(({ className, ...props }) => {
4288
4128
  fill: "currentColor"
4289
4129
  }
4290
4130
  ),
4291
- /* @__PURE__ */ jsx40(
4131
+ /* @__PURE__ */ jsx42(
4292
4132
  "path",
4293
4133
  {
4294
4134
  fillRule: "evenodd",
@@ -4297,7 +4137,7 @@ var ListOrderedIcon = memo13(({ className, ...props }) => {
4297
4137
  fill: "currentColor"
4298
4138
  }
4299
4139
  ),
4300
- /* @__PURE__ */ jsx40(
4140
+ /* @__PURE__ */ jsx42(
4301
4141
  "path",
4302
4142
  {
4303
4143
  fillRule: "evenodd",
@@ -4306,7 +4146,7 @@ var ListOrderedIcon = memo13(({ className, ...props }) => {
4306
4146
  fill: "currentColor"
4307
4147
  }
4308
4148
  ),
4309
- /* @__PURE__ */ jsx40(
4149
+ /* @__PURE__ */ jsx42(
4310
4150
  "path",
4311
4151
  {
4312
4152
  fillRule: "evenodd",
@@ -4322,10 +4162,10 @@ var ListOrderedIcon = memo13(({ className, ...props }) => {
4322
4162
  ListOrderedIcon.displayName = "ListOrderedIcon";
4323
4163
 
4324
4164
  // src/components/tiptap-icons/list-todo-icon.tsx
4325
- import { memo as memo14 } from "react";
4326
- import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
4327
- var ListTodoIcon = memo14(({ className, ...props }) => {
4328
- return /* @__PURE__ */ jsxs22(
4165
+ import { memo as memo18 } from "react";
4166
+ import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
4167
+ var ListTodoIcon = memo18(({ className, ...props }) => {
4168
+ return /* @__PURE__ */ jsxs24(
4329
4169
  "svg",
4330
4170
  {
4331
4171
  width: "24",
@@ -4336,7 +4176,7 @@ var ListTodoIcon = memo14(({ className, ...props }) => {
4336
4176
  xmlns: "http://www.w3.org/2000/svg",
4337
4177
  ...props,
4338
4178
  children: [
4339
- /* @__PURE__ */ jsx41(
4179
+ /* @__PURE__ */ jsx43(
4340
4180
  "path",
4341
4181
  {
4342
4182
  fillRule: "evenodd",
@@ -4345,7 +4185,7 @@ var ListTodoIcon = memo14(({ className, ...props }) => {
4345
4185
  fill: "currentColor"
4346
4186
  }
4347
4187
  ),
4348
- /* @__PURE__ */ jsx41(
4188
+ /* @__PURE__ */ jsx43(
4349
4189
  "path",
4350
4190
  {
4351
4191
  fillRule: "evenodd",
@@ -4354,7 +4194,7 @@ var ListTodoIcon = memo14(({ className, ...props }) => {
4354
4194
  fill: "currentColor"
4355
4195
  }
4356
4196
  ),
4357
- /* @__PURE__ */ jsx41(
4197
+ /* @__PURE__ */ jsx43(
4358
4198
  "path",
4359
4199
  {
4360
4200
  fillRule: "evenodd",
@@ -4363,7 +4203,7 @@ var ListTodoIcon = memo14(({ className, ...props }) => {
4363
4203
  fill: "currentColor"
4364
4204
  }
4365
4205
  ),
4366
- /* @__PURE__ */ jsx41(
4206
+ /* @__PURE__ */ jsx43(
4367
4207
  "path",
4368
4208
  {
4369
4209
  fillRule: "evenodd",
@@ -4372,7 +4212,7 @@ var ListTodoIcon = memo14(({ className, ...props }) => {
4372
4212
  fill: "currentColor"
4373
4213
  }
4374
4214
  ),
4375
- /* @__PURE__ */ jsx41(
4215
+ /* @__PURE__ */ jsx43(
4376
4216
  "path",
4377
4217
  {
4378
4218
  fillRule: "evenodd",
@@ -4516,7 +4356,7 @@ function useList(config) {
4516
4356
  onToggled
4517
4357
  } = config;
4518
4358
  const { editor } = useTiptapEditor(providedEditor);
4519
- const [isVisible, setIsVisible] = useState14(true);
4359
+ const [isVisible, setIsVisible] = useState17(true);
4520
4360
  const canToggle2 = canToggleList(editor, type);
4521
4361
  const isActive = isListActive(editor, type);
4522
4362
  useEffect9(() => {
@@ -4530,7 +4370,7 @@ function useList(config) {
4530
4370
  editor.off("selectionUpdate", handleSelectionUpdate);
4531
4371
  };
4532
4372
  }, [editor, type, hideWhenUnavailable]);
4533
- const handleToggle = useCallback12(() => {
4373
+ const handleToggle = useCallback14(() => {
4534
4374
  if (!editor) return false;
4535
4375
  const success = toggleList(editor, type);
4536
4376
  if (success) {
@@ -4550,7 +4390,7 @@ function useList(config) {
4550
4390
  }
4551
4391
 
4552
4392
  // src/components/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.ts
4553
- import { useEffect as useEffect10, useMemo as useMemo7, useState as useState15 } from "react";
4393
+ import { useEffect as useEffect10, useMemo as useMemo6, useState as useState18 } from "react";
4554
4394
  var listOptions = [
4555
4395
  {
4556
4396
  label: "Bullet List",
@@ -4602,9 +4442,9 @@ function useListDropdownMenu(config) {
4602
4442
  hideWhenUnavailable = false
4603
4443
  } = config || {};
4604
4444
  const { editor } = useTiptapEditor(providedEditor);
4605
- const [isVisible, setIsVisible] = useState15(true);
4445
+ const [isVisible, setIsVisible] = useState18(true);
4606
4446
  const listInSchema = types.some((type) => isNodeInSchema(type, editor));
4607
- const filteredLists = useMemo7(() => getFilteredListOptions(types), [types]);
4447
+ const filteredLists = useMemo6(() => getFilteredListOptions(types), [types]);
4608
4448
  const canToggleAny = canToggleAnyList(editor, types);
4609
4449
  const isAnyActive = isAnyListActive(editor, types);
4610
4450
  const activeType = getActiveListType(editor, types);
@@ -4641,7 +4481,7 @@ function useListDropdownMenu(config) {
4641
4481
  }
4642
4482
 
4643
4483
  // src/components/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx
4644
- import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
4484
+ import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
4645
4485
  function ListDropdownMenu({
4646
4486
  editor: providedEditor,
4647
4487
  types = ["bulletList", "orderedList", "taskList"],
@@ -4651,13 +4491,13 @@ function ListDropdownMenu({
4651
4491
  ...props
4652
4492
  }) {
4653
4493
  const { editor } = useTiptapEditor(providedEditor);
4654
- const [isOpen, setIsOpen] = useState16(false);
4494
+ const [isOpen, setIsOpen] = useState19(false);
4655
4495
  const { filteredLists, canToggle: canToggle2, isActive, isVisible, Icon } = useListDropdownMenu({
4656
4496
  editor,
4657
4497
  types,
4658
4498
  hideWhenUnavailable
4659
4499
  });
4660
- const handleOnOpenChange = useCallback13(
4500
+ const handleOnOpenChange = useCallback15(
4661
4501
  (open) => {
4662
4502
  setIsOpen(open);
4663
4503
  onOpenChange?.(open);
@@ -4667,8 +4507,8 @@ function ListDropdownMenu({
4667
4507
  if (!isVisible) {
4668
4508
  return null;
4669
4509
  }
4670
- return /* @__PURE__ */ jsxs23(DropdownMenu2, { open: isOpen, onOpenChange: handleOnOpenChange, children: [
4671
- /* @__PURE__ */ jsx42(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs23(
4510
+ return /* @__PURE__ */ jsxs25(DropdownMenu, { open: isOpen, onOpenChange: handleOnOpenChange, children: [
4511
+ /* @__PURE__ */ jsx44(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(
4672
4512
  Button2,
4673
4513
  {
4674
4514
  type: "button",
@@ -4682,12 +4522,12 @@ function ListDropdownMenu({
4682
4522
  tooltip: "List",
4683
4523
  ...props,
4684
4524
  children: [
4685
- /* @__PURE__ */ jsx42(Icon, { className: "tiptap-button-icon" }),
4686
- /* @__PURE__ */ jsx42(ChevronDownIcon, { className: "tiptap-button-dropdown-small" })
4525
+ /* @__PURE__ */ jsx44(Icon, { className: "tiptap-button-icon" }),
4526
+ /* @__PURE__ */ jsx44(ChevronDownIcon, { className: "tiptap-button-dropdown-small" })
4687
4527
  ]
4688
4528
  }
4689
4529
  ) }),
4690
- /* @__PURE__ */ jsx42(DropdownMenuContent2, { align: "start", portal, children: /* @__PURE__ */ jsx42(Card, { children: /* @__PURE__ */ jsx42(CardBody, { children: /* @__PURE__ */ jsx42(ButtonGroup, { children: filteredLists.map((option) => /* @__PURE__ */ jsx42(DropdownMenuItem2, { asChild: true, children: /* @__PURE__ */ jsx42(
4530
+ /* @__PURE__ */ jsx44(DropdownMenuContent, { align: "start", portal, children: /* @__PURE__ */ jsx44(Card, { children: /* @__PURE__ */ jsx44(CardBody, { children: /* @__PURE__ */ jsx44(ButtonGroup, { children: filteredLists.map((option) => /* @__PURE__ */ jsx44(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx44(
4691
4531
  ListButton,
4692
4532
  {
4693
4533
  editor,
@@ -4700,12 +4540,12 @@ function ListDropdownMenu({
4700
4540
  }
4701
4541
 
4702
4542
  // src/components/tiptap-ui/blockquote-button/blockquote-button.tsx
4703
- import { forwardRef as forwardRef12, useCallback as useCallback14 } from "react";
4704
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
4543
+ import { forwardRef as forwardRef12, useCallback as useCallback16 } from "react";
4544
+ import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
4705
4545
  function BlockquoteShortcutBadge({
4706
4546
  shortcutKeys = BLOCKQUOTE_SHORTCUT_KEY
4707
4547
  }) {
4708
- return /* @__PURE__ */ jsx43(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
4548
+ return /* @__PURE__ */ jsx45(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
4709
4549
  }
4710
4550
  var BlockquoteButton = forwardRef12(
4711
4551
  ({
@@ -4732,7 +4572,7 @@ var BlockquoteButton = forwardRef12(
4732
4572
  hideWhenUnavailable,
4733
4573
  onToggled
4734
4574
  });
4735
- const handleClick = useCallback14(
4575
+ const handleClick = useCallback16(
4736
4576
  (event) => {
4737
4577
  onClick?.(event);
4738
4578
  if (event.defaultPrevented) return;
@@ -4743,7 +4583,7 @@ var BlockquoteButton = forwardRef12(
4743
4583
  if (!isVisible) {
4744
4584
  return null;
4745
4585
  }
4746
- return /* @__PURE__ */ jsx43(
4586
+ return /* @__PURE__ */ jsx45(
4747
4587
  Button2,
4748
4588
  {
4749
4589
  type: "button",
@@ -4759,10 +4599,10 @@ var BlockquoteButton = forwardRef12(
4759
4599
  onClick: handleClick,
4760
4600
  ...buttonProps,
4761
4601
  ref,
4762
- children: children ?? /* @__PURE__ */ jsxs24(Fragment6, { children: [
4763
- /* @__PURE__ */ jsx43(Icon, { className: "tiptap-button-icon" }),
4764
- text && /* @__PURE__ */ jsx43("span", { className: "tiptap-button-text", children: text }),
4765
- showShortcut && /* @__PURE__ */ jsx43(BlockquoteShortcutBadge, { shortcutKeys })
4602
+ children: children ?? /* @__PURE__ */ jsxs26(Fragment7, { children: [
4603
+ /* @__PURE__ */ jsx45(Icon, { className: "tiptap-button-icon" }),
4604
+ text && /* @__PURE__ */ jsx45("span", { className: "tiptap-button-text", children: text }),
4605
+ showShortcut && /* @__PURE__ */ jsx45(BlockquoteShortcutBadge, { shortcutKeys })
4766
4606
  ] })
4767
4607
  }
4768
4608
  );
@@ -4771,14 +4611,14 @@ var BlockquoteButton = forwardRef12(
4771
4611
  BlockquoteButton.displayName = "BlockquoteButton";
4772
4612
 
4773
4613
  // src/components/tiptap-ui/blockquote-button/use-blockquote.ts
4774
- import { useCallback as useCallback15, useEffect as useEffect11, useState as useState17 } from "react";
4614
+ import { useCallback as useCallback17, useEffect as useEffect11, useState as useState20 } from "react";
4775
4615
  import { NodeSelection as NodeSelection4, TextSelection as TextSelection4 } from "@tiptap/pm/state";
4776
4616
 
4777
4617
  // src/components/tiptap-icons/blockquote-icon.tsx
4778
- import { memo as memo15 } from "react";
4779
- import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
4780
- var BlockquoteIcon = memo15(({ className, ...props }) => {
4781
- return /* @__PURE__ */ jsxs25(
4618
+ import { memo as memo19 } from "react";
4619
+ import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
4620
+ var BlockquoteIcon = memo19(({ className, ...props }) => {
4621
+ return /* @__PURE__ */ jsxs27(
4782
4622
  "svg",
4783
4623
  {
4784
4624
  width: "24",
@@ -4789,7 +4629,7 @@ var BlockquoteIcon = memo15(({ className, ...props }) => {
4789
4629
  xmlns: "http://www.w3.org/2000/svg",
4790
4630
  ...props,
4791
4631
  children: [
4792
- /* @__PURE__ */ jsx44(
4632
+ /* @__PURE__ */ jsx46(
4793
4633
  "path",
4794
4634
  {
4795
4635
  fillRule: "evenodd",
@@ -4798,7 +4638,7 @@ var BlockquoteIcon = memo15(({ className, ...props }) => {
4798
4638
  fill: "currentColor"
4799
4639
  }
4800
4640
  ),
4801
- /* @__PURE__ */ jsx44(
4641
+ /* @__PURE__ */ jsx46(
4802
4642
  "path",
4803
4643
  {
4804
4644
  fillRule: "evenodd",
@@ -4807,7 +4647,7 @@ var BlockquoteIcon = memo15(({ className, ...props }) => {
4807
4647
  fill: "currentColor"
4808
4648
  }
4809
4649
  ),
4810
- /* @__PURE__ */ jsx44(
4650
+ /* @__PURE__ */ jsx46(
4811
4651
  "path",
4812
4652
  {
4813
4653
  fillRule: "evenodd",
@@ -4816,7 +4656,7 @@ var BlockquoteIcon = memo15(({ className, ...props }) => {
4816
4656
  fill: "currentColor"
4817
4657
  }
4818
4658
  ),
4819
- /* @__PURE__ */ jsx44(
4659
+ /* @__PURE__ */ jsx46(
4820
4660
  "path",
4821
4661
  {
4822
4662
  fillRule: "evenodd",
@@ -4904,7 +4744,7 @@ function useBlockquote(config) {
4904
4744
  onToggled
4905
4745
  } = config || {};
4906
4746
  const { editor } = useTiptapEditor(providedEditor);
4907
- const [isVisible, setIsVisible] = useState17(true);
4747
+ const [isVisible, setIsVisible] = useState20(true);
4908
4748
  const canToggle2 = canToggleBlockquote(editor);
4909
4749
  const isActive = editor?.isActive("blockquote") || false;
4910
4750
  useEffect11(() => {
@@ -4918,7 +4758,7 @@ function useBlockquote(config) {
4918
4758
  editor.off("selectionUpdate", handleSelectionUpdate);
4919
4759
  };
4920
4760
  }, [editor, hideWhenUnavailable]);
4921
- const handleToggle = useCallback15(() => {
4761
+ const handleToggle = useCallback17(() => {
4922
4762
  if (!editor) return false;
4923
4763
  const success = toggleBlockquote(editor);
4924
4764
  if (success) {
@@ -4938,13 +4778,13 @@ function useBlockquote(config) {
4938
4778
  }
4939
4779
 
4940
4780
  // src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx
4941
- import { forwardRef as forwardRef14, useMemo as useMemo9, useRef as useRef6, useState as useState19 } from "react";
4781
+ import { forwardRef as forwardRef14, useMemo as useMemo8, useRef as useRef5, useState as useState22 } from "react";
4942
4782
 
4943
4783
  // src/components/tiptap-icons/ban-icon.tsx
4944
- import { memo as memo16 } from "react";
4945
- import { jsx as jsx45 } from "react/jsx-runtime";
4946
- var BanIcon = memo16(({ className, ...props }) => {
4947
- return /* @__PURE__ */ jsx45(
4784
+ import { memo as memo20 } from "react";
4785
+ import { jsx as jsx47 } from "react/jsx-runtime";
4786
+ var BanIcon = memo20(({ className, ...props }) => {
4787
+ return /* @__PURE__ */ jsx47(
4948
4788
  "svg",
4949
4789
  {
4950
4790
  width: "24",
@@ -4954,7 +4794,7 @@ var BanIcon = memo16(({ className, ...props }) => {
4954
4794
  fill: "currentColor",
4955
4795
  xmlns: "http://www.w3.org/2000/svg",
4956
4796
  ...props,
4957
- children: /* @__PURE__ */ jsx45(
4797
+ children: /* @__PURE__ */ jsx47(
4958
4798
  "path",
4959
4799
  {
4960
4800
  fillRule: "evenodd",
@@ -4969,10 +4809,10 @@ var BanIcon = memo16(({ className, ...props }) => {
4969
4809
  BanIcon.displayName = "BanIcon";
4970
4810
 
4971
4811
  // src/components/tiptap-icons/highlighter-icon.tsx
4972
- import { memo as memo17 } from "react";
4973
- import { jsx as jsx46 } from "react/jsx-runtime";
4974
- var HighlighterIcon = memo17(({ className, ...props }) => {
4975
- return /* @__PURE__ */ jsx46(
4812
+ import { memo as memo21 } from "react";
4813
+ import { jsx as jsx48 } from "react/jsx-runtime";
4814
+ var HighlighterIcon = memo21(({ className, ...props }) => {
4815
+ return /* @__PURE__ */ jsx48(
4976
4816
  "svg",
4977
4817
  {
4978
4818
  width: "24",
@@ -4982,7 +4822,7 @@ var HighlighterIcon = memo17(({ className, ...props }) => {
4982
4822
  fill: "currentColor",
4983
4823
  xmlns: "http://www.w3.org/2000/svg",
4984
4824
  ...props,
4985
- children: /* @__PURE__ */ jsx46(
4825
+ children: /* @__PURE__ */ jsx48(
4986
4826
  "path",
4987
4827
  {
4988
4828
  fillRule: "evenodd",
@@ -4998,16 +4838,16 @@ HighlighterIcon.displayName = "HighlighterIcon";
4998
4838
 
4999
4839
  // src/components/tiptap-ui-primitive/popover/popover.tsx
5000
4840
  import * as PopoverPrimitive from "@radix-ui/react-popover";
5001
- import { jsx as jsx47 } from "react/jsx-runtime";
4841
+ import { jsx as jsx49 } from "react/jsx-runtime";
5002
4842
  function Popover({
5003
4843
  ...props
5004
4844
  }) {
5005
- return /* @__PURE__ */ jsx47(PopoverPrimitive.Root, { ...props });
4845
+ return /* @__PURE__ */ jsx49(PopoverPrimitive.Root, { ...props });
5006
4846
  }
5007
4847
  function PopoverTrigger({
5008
4848
  ...props
5009
4849
  }) {
5010
- return /* @__PURE__ */ jsx47(PopoverPrimitive.Trigger, { ...props });
4850
+ return /* @__PURE__ */ jsx49(PopoverPrimitive.Trigger, { ...props });
5011
4851
  }
5012
4852
  function PopoverContent({
5013
4853
  className,
@@ -5015,7 +4855,7 @@ function PopoverContent({
5015
4855
  sideOffset = 4,
5016
4856
  ...props
5017
4857
  }) {
5018
- return /* @__PURE__ */ jsx47(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx47(
4858
+ return /* @__PURE__ */ jsx49(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx49(
5019
4859
  PopoverPrimitive.Content,
5020
4860
  {
5021
4861
  align,
@@ -5027,12 +4867,12 @@ function PopoverContent({
5027
4867
  }
5028
4868
 
5029
4869
  // src/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx
5030
- import { forwardRef as forwardRef13, useCallback as useCallback16, useMemo as useMemo8 } from "react";
5031
- import { Fragment as Fragment7, jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
4870
+ import { forwardRef as forwardRef13, useCallback as useCallback18, useMemo as useMemo7 } from "react";
4871
+ import { Fragment as Fragment8, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
5032
4872
  function ColorHighlightShortcutBadge({
5033
4873
  shortcutKeys = COLOR_HIGHLIGHT_SHORTCUT_KEY
5034
4874
  }) {
5035
- return /* @__PURE__ */ jsx48(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
4875
+ return /* @__PURE__ */ jsx50(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
5036
4876
  }
5037
4877
  var ColorHighlightButton = forwardRef13(
5038
4878
  ({
@@ -5064,7 +4904,7 @@ var ColorHighlightButton = forwardRef13(
5064
4904
  mode,
5065
4905
  onApplied
5066
4906
  });
5067
- const handleClick = useCallback16(
4907
+ const handleClick = useCallback18(
5068
4908
  (event) => {
5069
4909
  onClick?.(event);
5070
4910
  if (event.defaultPrevented) return;
@@ -5072,7 +4912,7 @@ var ColorHighlightButton = forwardRef13(
5072
4912
  },
5073
4913
  [handleColorHighlight, onClick]
5074
4914
  );
5075
- const buttonStyle = useMemo8(
4915
+ const buttonStyle = useMemo7(
5076
4916
  () => ({
5077
4917
  ...style,
5078
4918
  "--highlight-color": highlightColor
@@ -5082,7 +4922,7 @@ var ColorHighlightButton = forwardRef13(
5082
4922
  if (!isVisible) {
5083
4923
  return null;
5084
4924
  }
5085
- return /* @__PURE__ */ jsx48(
4925
+ return /* @__PURE__ */ jsx50(
5086
4926
  Button2,
5087
4927
  {
5088
4928
  type: "button",
@@ -5099,16 +4939,16 @@ var ColorHighlightButton = forwardRef13(
5099
4939
  style: buttonStyle,
5100
4940
  ...buttonProps,
5101
4941
  ref,
5102
- children: children ?? /* @__PURE__ */ jsxs26(Fragment7, { children: [
5103
- /* @__PURE__ */ jsx48(
4942
+ children: children ?? /* @__PURE__ */ jsxs28(Fragment8, { children: [
4943
+ /* @__PURE__ */ jsx50(
5104
4944
  "span",
5105
4945
  {
5106
4946
  className: "tiptap-button-highlight",
5107
4947
  style: { "--highlight-color": highlightColor }
5108
4948
  }
5109
4949
  ),
5110
- text && /* @__PURE__ */ jsx48("span", { className: "tiptap-button-text", children: text }),
5111
- showShortcut && /* @__PURE__ */ jsx48(ColorHighlightShortcutBadge, { shortcutKeys })
4950
+ text && /* @__PURE__ */ jsx50("span", { className: "tiptap-button-text", children: text }),
4951
+ showShortcut && /* @__PURE__ */ jsx50(ColorHighlightShortcutBadge, { shortcutKeys })
5112
4952
  ] })
5113
4953
  }
5114
4954
  );
@@ -5117,7 +4957,7 @@ var ColorHighlightButton = forwardRef13(
5117
4957
  ColorHighlightButton.displayName = "ColorHighlightButton";
5118
4958
 
5119
4959
  // src/components/tiptap-ui/color-highlight-button/use-color-highlight.ts
5120
- import { useCallback as useCallback17, useEffect as useEffect12, useState as useState18 } from "react";
4960
+ import { useCallback as useCallback19, useEffect as useEffect12, useState as useState21 } from "react";
5121
4961
  import { useHotkeys as useHotkeys2 } from "react-hotkeys-hook";
5122
4962
  var COLOR_HIGHLIGHT_SHORTCUT_KEY = "mod+shift+h";
5123
4963
  var HIGHLIGHT_COLORS = [
@@ -5248,7 +5088,7 @@ function useColorHighlight(config) {
5248
5088
  } = config;
5249
5089
  const { editor } = useTiptapEditor(providedEditor);
5250
5090
  const isMobile = useIsBreakpoint();
5251
- const [isVisible, setIsVisible] = useState18(true);
5091
+ const [isVisible, setIsVisible] = useState21(true);
5252
5092
  const canColorHighlightState = canColorHighlight(editor, mode);
5253
5093
  const isActive = isColorHighlightActive(editor, highlightColor, mode);
5254
5094
  useEffect12(() => {
@@ -5262,7 +5102,7 @@ function useColorHighlight(config) {
5262
5102
  editor.off("selectionUpdate", handleSelectionUpdate);
5263
5103
  };
5264
5104
  }, [editor, hideWhenUnavailable, mode]);
5265
- const handleColorHighlight = useCallback17(() => {
5105
+ const handleColorHighlight = useCallback19(() => {
5266
5106
  if (!editor || !canColorHighlightState || !highlightColor || !label)
5267
5107
  return false;
5268
5108
  if (mode === "mark") {
@@ -5290,7 +5130,7 @@ function useColorHighlight(config) {
5290
5130
  return success;
5291
5131
  }
5292
5132
  }, [canColorHighlightState, highlightColor, editor, label, onApplied, mode]);
5293
- const handleRemoveHighlight = useCallback17(() => {
5133
+ const handleRemoveHighlight = useCallback19(() => {
5294
5134
  const success = removeHighlight(editor, mode);
5295
5135
  if (success) {
5296
5136
  onApplied?.({ color: "", label: "Remove highlight", mode });
@@ -5323,8 +5163,8 @@ function useColorHighlight(config) {
5323
5163
  }
5324
5164
 
5325
5165
  // src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx
5326
- import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
5327
- var ColorHighlightPopoverButton = forwardRef14(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx49(
5166
+ import { jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
5167
+ var ColorHighlightPopoverButton = forwardRef14(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx51(
5328
5168
  Button2,
5329
5169
  {
5330
5170
  type: "button",
@@ -5337,7 +5177,7 @@ var ColorHighlightPopoverButton = forwardRef14(({ className, children, ...props
5337
5177
  tooltip: "Highlight",
5338
5178
  ref,
5339
5179
  ...props,
5340
- children: children ?? /* @__PURE__ */ jsx49(HighlighterIcon, { className: "tiptap-button-icon" })
5180
+ children: children ?? /* @__PURE__ */ jsx51(HighlighterIcon, { className: "tiptap-button-icon" })
5341
5181
  }
5342
5182
  ));
5343
5183
  ColorHighlightPopoverButton.displayName = "ColorHighlightPopoverButton";
@@ -5353,8 +5193,8 @@ function ColorHighlightPopoverContent({
5353
5193
  }) {
5354
5194
  const { handleRemoveHighlight } = useColorHighlight({ editor });
5355
5195
  const isMobile = useIsBreakpoint();
5356
- const containerRef = useRef6(null);
5357
- const menuItems = useMemo9(
5196
+ const containerRef = useRef5(null);
5197
+ const menuItems = useMemo8(
5358
5198
  () => [...colors, { label: "Remove highlight", value: "none" }],
5359
5199
  [colors]
5360
5200
  );
@@ -5373,14 +5213,14 @@ function ColorHighlightPopoverContent({
5373
5213
  },
5374
5214
  autoSelectFirstItem: false
5375
5215
  });
5376
- return /* @__PURE__ */ jsx49(
5216
+ return /* @__PURE__ */ jsx51(
5377
5217
  Card,
5378
5218
  {
5379
5219
  ref: containerRef,
5380
5220
  tabIndex: 0,
5381
5221
  style: isMobile ? { boxShadow: "none", border: 0 } : {},
5382
- children: /* @__PURE__ */ jsx49(CardBody, { style: isMobile ? { padding: 0 } : {}, children: /* @__PURE__ */ jsxs27(CardItemGroup, { orientation: "horizontal", children: [
5383
- /* @__PURE__ */ jsx49(ButtonGroup, { orientation: "horizontal", children: colors.map((color, index) => /* @__PURE__ */ jsx49(
5222
+ children: /* @__PURE__ */ jsx51(CardBody, { style: isMobile ? { padding: 0 } : {}, children: /* @__PURE__ */ jsxs29(CardItemGroup, { orientation: "horizontal", children: [
5223
+ /* @__PURE__ */ jsx51(ButtonGroup, { orientation: "horizontal", children: colors.map((color, index) => /* @__PURE__ */ jsx51(
5384
5224
  ColorHighlightButton,
5385
5225
  {
5386
5226
  editor,
@@ -5392,8 +5232,8 @@ function ColorHighlightPopoverContent({
5392
5232
  },
5393
5233
  color.value
5394
5234
  )) }),
5395
- /* @__PURE__ */ jsx49(Separator3, {}),
5396
- /* @__PURE__ */ jsx49(ButtonGroup, { orientation: "horizontal", children: /* @__PURE__ */ jsx49(
5235
+ /* @__PURE__ */ jsx51(Separator2, {}),
5236
+ /* @__PURE__ */ jsx51(ButtonGroup, { orientation: "horizontal", children: /* @__PURE__ */ jsx51(
5397
5237
  Button2,
5398
5238
  {
5399
5239
  onClick: handleRemoveHighlight,
@@ -5404,7 +5244,7 @@ function ColorHighlightPopoverContent({
5404
5244
  role: "menuitem",
5405
5245
  "data-style": "ghost",
5406
5246
  "data-highlighted": selectedIndex === colors.length,
5407
- children: /* @__PURE__ */ jsx49(BanIcon, { className: "tiptap-button-icon" })
5247
+ children: /* @__PURE__ */ jsx51(BanIcon, { className: "tiptap-button-icon" })
5408
5248
  }
5409
5249
  ) })
5410
5250
  ] }) })
@@ -5413,13 +5253,13 @@ function ColorHighlightPopoverContent({
5413
5253
  }
5414
5254
 
5415
5255
  // src/components/tiptap-ui/link-popover/link-popover.tsx
5416
- import { forwardRef as forwardRef15, useCallback as useCallback18, useEffect as useEffect13, useState as useState20 } from "react";
5256
+ import { forwardRef as forwardRef15, useCallback as useCallback20, useEffect as useEffect13, useState as useState23 } from "react";
5417
5257
 
5418
5258
  // src/components/tiptap-icons/corner-down-left-icon.tsx
5419
- import { memo as memo18 } from "react";
5420
- import { jsx as jsx50 } from "react/jsx-runtime";
5421
- var CornerDownLeftIcon = memo18(({ className, ...props }) => {
5422
- return /* @__PURE__ */ jsx50(
5259
+ import { memo as memo22 } from "react";
5260
+ import { jsx as jsx52 } from "react/jsx-runtime";
5261
+ var CornerDownLeftIcon = memo22(({ className, ...props }) => {
5262
+ return /* @__PURE__ */ jsx52(
5423
5263
  "svg",
5424
5264
  {
5425
5265
  width: "24",
@@ -5429,7 +5269,7 @@ var CornerDownLeftIcon = memo18(({ className, ...props }) => {
5429
5269
  fill: "currentColor",
5430
5270
  xmlns: "http://www.w3.org/2000/svg",
5431
5271
  ...props,
5432
- children: /* @__PURE__ */ jsx50(
5272
+ children: /* @__PURE__ */ jsx52(
5433
5273
  "path",
5434
5274
  {
5435
5275
  fillRule: "evenodd",
@@ -5444,10 +5284,10 @@ var CornerDownLeftIcon = memo18(({ className, ...props }) => {
5444
5284
  CornerDownLeftIcon.displayName = "CornerDownLeftIcon";
5445
5285
 
5446
5286
  // src/components/tiptap-icons/external-link-icon.tsx
5447
- import { memo as memo19 } from "react";
5448
- import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
5449
- var ExternalLinkIcon = memo19(({ className, ...props }) => {
5450
- return /* @__PURE__ */ jsxs28(
5287
+ import { memo as memo23 } from "react";
5288
+ import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
5289
+ var ExternalLinkIcon = memo23(({ className, ...props }) => {
5290
+ return /* @__PURE__ */ jsxs30(
5451
5291
  "svg",
5452
5292
  {
5453
5293
  width: "24",
@@ -5458,14 +5298,14 @@ var ExternalLinkIcon = memo19(({ className, ...props }) => {
5458
5298
  xmlns: "http://www.w3.org/2000/svg",
5459
5299
  ...props,
5460
5300
  children: [
5461
- /* @__PURE__ */ jsx51(
5301
+ /* @__PURE__ */ jsx53(
5462
5302
  "path",
5463
5303
  {
5464
5304
  d: "M14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L10.7071 14.7071C10.3166 15.0976 9.68342 15.0976 9.29289 14.7071C8.90237 14.3166 8.90237 13.6834 9.29289 13.2929L18.5858 4H15C14.4477 4 14 3.55228 14 3Z",
5465
5305
  fill: "currentColor"
5466
5306
  }
5467
5307
  ),
5468
- /* @__PURE__ */ jsx51(
5308
+ /* @__PURE__ */ jsx53(
5469
5309
  "path",
5470
5310
  {
5471
5311
  d: "M4.29289 7.29289C4.48043 7.10536 4.73478 7 5 7H11C11.5523 7 12 6.55228 12 6C12 5.44772 11.5523 5 11 5H5C4.20435 5 3.44129 5.31607 2.87868 5.87868C2.31607 6.44129 2 7.20435 2 8V19C2 19.7957 2.31607 20.5587 2.87868 21.1213C3.44129 21.6839 4.20435 22 5 22H16C16.7957 22 17.5587 21.6839 18.1213 21.1213C18.6839 20.5587 19 19.7957 19 19V13C19 12.4477 18.5523 12 18 12C17.4477 12 17 12.4477 17 13V19C17 19.2652 16.8946 19.5196 16.7071 19.7071C16.5196 19.8946 16.2652 20 16 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V8C4 7.73478 4.10536 7.48043 4.29289 7.29289Z",
@@ -5479,10 +5319,10 @@ var ExternalLinkIcon = memo19(({ className, ...props }) => {
5479
5319
  ExternalLinkIcon.displayName = "ExternalLinkIcon";
5480
5320
 
5481
5321
  // src/components/tiptap-icons/link-icon.tsx
5482
- import { memo as memo20 } from "react";
5483
- import { jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
5484
- var LinkIcon = memo20(({ className, ...props }) => {
5485
- return /* @__PURE__ */ jsxs29(
5322
+ import { memo as memo24 } from "react";
5323
+ import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
5324
+ var LinkIcon = memo24(({ className, ...props }) => {
5325
+ return /* @__PURE__ */ jsxs31(
5486
5326
  "svg",
5487
5327
  {
5488
5328
  width: "24",
@@ -5493,14 +5333,14 @@ var LinkIcon = memo20(({ className, ...props }) => {
5493
5333
  xmlns: "http://www.w3.org/2000/svg",
5494
5334
  ...props,
5495
5335
  children: [
5496
- /* @__PURE__ */ jsx52(
5336
+ /* @__PURE__ */ jsx54(
5497
5337
  "path",
5498
5338
  {
5499
5339
  d: "M16.9958 1.06669C15.4226 1.05302 13.907 1.65779 12.7753 2.75074L12.765 2.76086L11.045 4.47086C10.6534 4.86024 10.6515 5.49341 11.0409 5.88507C11.4303 6.27673 12.0634 6.27858 12.4551 5.88919L14.1697 4.18456C14.9236 3.45893 15.9319 3.05752 16.9784 3.06662C18.0272 3.07573 19.0304 3.49641 19.772 4.23804C20.5137 4.97967 20.9344 5.98292 20.9435 7.03171C20.9526 8.07776 20.5515 9.08563 19.8265 9.83941L16.833 12.8329C16.4274 13.2386 15.9393 13.5524 15.4019 13.7529C14.8645 13.9533 14.2903 14.0359 13.7181 13.9949C13.146 13.9539 12.5894 13.7904 12.0861 13.5154C11.5827 13.2404 11.1444 12.8604 10.8008 12.401C10.47 11.9588 9.84333 11.8685 9.40108 12.1993C8.95883 12.5301 8.86849 13.1568 9.1993 13.599C9.71464 14.288 10.3721 14.858 11.1272 15.2705C11.8822 15.683 12.7171 15.9283 13.5753 15.9898C14.4334 16.0513 15.2948 15.9274 16.1009 15.6267C16.907 15.326 17.639 14.8555 18.2473 14.247L21.2472 11.2471L21.2593 11.2347C22.3523 10.1031 22.9571 8.58751 22.9434 7.01433C22.9297 5.44115 22.2987 3.93628 21.1863 2.82383C20.0738 1.71138 18.5689 1.08036 16.9958 1.06669Z",
5500
5340
  fill: "currentColor"
5501
5341
  }
5502
5342
  ),
5503
- /* @__PURE__ */ jsx52(
5343
+ /* @__PURE__ */ jsx54(
5504
5344
  "path",
5505
5345
  {
5506
5346
  d: "M10.4247 8.0102C9.56657 7.94874 8.70522 8.07256 7.89911 8.37326C7.09305 8.67395 6.36096 9.14458 5.75272 9.753L2.75285 12.7529L2.74067 12.7653C1.64772 13.8969 1.04295 15.4125 1.05662 16.9857C1.07029 18.5589 1.70131 20.0637 2.81376 21.1762C3.9262 22.2886 5.43108 22.9196 7.00426 22.9333C8.57744 22.947 10.0931 22.3422 11.2247 21.2493L11.2371 21.2371L12.9471 19.5271C13.3376 19.1366 13.3376 18.5034 12.9471 18.1129C12.5565 17.7223 11.9234 17.7223 11.5328 18.1129L9.82932 19.8164C9.07555 20.5414 8.06768 20.9425 7.02164 20.9334C5.97285 20.9243 4.9696 20.5036 4.22797 19.762C3.48634 19.0203 3.06566 18.0171 3.05655 16.9683C3.04746 15.9222 3.44851 14.9144 4.17355 14.1606L7.16719 11.167C7.5727 10.7613 8.06071 10.4476 8.59811 10.2471C9.13552 10.0467 9.70976 9.96412 10.2819 10.0051C10.854 10.0461 11.4106 10.2096 11.9139 10.4846C12.4173 10.7596 12.8556 11.1397 13.1992 11.599C13.53 12.0412 14.1567 12.1316 14.5989 11.8007C15.0412 11.4699 15.1315 10.8433 14.8007 10.401C14.2854 9.71205 13.6279 9.14198 12.8729 8.72948C12.1178 8.31697 11.2829 8.07166 10.4247 8.0102Z",
@@ -5514,10 +5354,10 @@ var LinkIcon = memo20(({ className, ...props }) => {
5514
5354
  LinkIcon.displayName = "LinkIcon";
5515
5355
 
5516
5356
  // src/components/tiptap-icons/trash-icon.tsx
5517
- import { memo as memo21 } from "react";
5518
- import { jsx as jsx53 } from "react/jsx-runtime";
5519
- var TrashIcon = memo21(({ className, ...props }) => {
5520
- return /* @__PURE__ */ jsx53(
5357
+ import { memo as memo25 } from "react";
5358
+ import { jsx as jsx55 } from "react/jsx-runtime";
5359
+ var TrashIcon = memo25(({ className, ...props }) => {
5360
+ return /* @__PURE__ */ jsx55(
5521
5361
  "svg",
5522
5362
  {
5523
5363
  width: "24",
@@ -5527,7 +5367,7 @@ var TrashIcon = memo21(({ className, ...props }) => {
5527
5367
  fill: "currentColor",
5528
5368
  xmlns: "http://www.w3.org/2000/svg",
5529
5369
  ...props,
5530
- children: /* @__PURE__ */ jsx53(
5370
+ children: /* @__PURE__ */ jsx55(
5531
5371
  "path",
5532
5372
  {
5533
5373
  fillRule: "evenodd",
@@ -5542,23 +5382,23 @@ var TrashIcon = memo21(({ className, ...props }) => {
5542
5382
  TrashIcon.displayName = "TrashIcon";
5543
5383
 
5544
5384
  // src/components/tiptap-ui-primitive/input/input.tsx
5545
- import { jsx as jsx54 } from "react/jsx-runtime";
5546
- function Input2({ className, type, ...props }) {
5547
- return /* @__PURE__ */ jsx54("input", { type, className: cn2("tiptap-input", className), ...props });
5385
+ import { jsx as jsx56 } from "react/jsx-runtime";
5386
+ function Input({ className, type, ...props }) {
5387
+ return /* @__PURE__ */ jsx56("input", { type, className: cn2("tiptap-input", className), ...props });
5548
5388
  }
5549
5389
  function InputGroup({
5550
5390
  className,
5551
5391
  children,
5552
5392
  ...props
5553
5393
  }) {
5554
- return /* @__PURE__ */ jsx54("div", { className: cn2("tiptap-input-group", className), ...props, children });
5394
+ return /* @__PURE__ */ jsx56("div", { className: cn2("tiptap-input-group", className), ...props, children });
5555
5395
  }
5556
5396
 
5557
5397
  // src/components/tiptap-ui/link-popover/link-popover.tsx
5558
- import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
5398
+ import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
5559
5399
  var LinkButton = forwardRef15(
5560
5400
  ({ className, children, ...props }, ref) => {
5561
- return /* @__PURE__ */ jsx55(
5401
+ return /* @__PURE__ */ jsx57(
5562
5402
  Button2,
5563
5403
  {
5564
5404
  type: "button",
@@ -5570,7 +5410,7 @@ var LinkButton = forwardRef15(
5570
5410
  tooltip: "Link",
5571
5411
  ref,
5572
5412
  ...props,
5573
- children: children || /* @__PURE__ */ jsx55(LinkIcon, { className: "tiptap-button-icon" })
5413
+ children: children || /* @__PURE__ */ jsx57(LinkIcon, { className: "tiptap-button-icon" })
5574
5414
  }
5575
5415
  );
5576
5416
  }
@@ -5591,21 +5431,21 @@ var LinkMain = ({
5591
5431
  setLink();
5592
5432
  }
5593
5433
  };
5594
- return /* @__PURE__ */ jsx55(
5434
+ return /* @__PURE__ */ jsx57(
5595
5435
  Card,
5596
5436
  {
5597
5437
  style: {
5598
5438
  ...isMobile ? { boxShadow: "none", border: 0 } : {}
5599
5439
  },
5600
- children: /* @__PURE__ */ jsx55(
5440
+ children: /* @__PURE__ */ jsx57(
5601
5441
  CardBody,
5602
5442
  {
5603
5443
  style: {
5604
5444
  ...isMobile ? { padding: 0 } : {}
5605
5445
  },
5606
- children: /* @__PURE__ */ jsxs30(CardItemGroup, { orientation: "horizontal", children: [
5607
- /* @__PURE__ */ jsx55(InputGroup, { children: /* @__PURE__ */ jsx55(
5608
- Input2,
5446
+ children: /* @__PURE__ */ jsxs32(CardItemGroup, { orientation: "horizontal", children: [
5447
+ /* @__PURE__ */ jsx57(InputGroup, { children: /* @__PURE__ */ jsx57(
5448
+ Input,
5609
5449
  {
5610
5450
  type: "url",
5611
5451
  placeholder: "Paste a link...",
@@ -5618,7 +5458,7 @@ var LinkMain = ({
5618
5458
  autoCapitalize: "off"
5619
5459
  }
5620
5460
  ) }),
5621
- /* @__PURE__ */ jsx55(ButtonGroup, { orientation: "horizontal", children: /* @__PURE__ */ jsx55(
5461
+ /* @__PURE__ */ jsx57(ButtonGroup, { orientation: "horizontal", children: /* @__PURE__ */ jsx57(
5622
5462
  Button2,
5623
5463
  {
5624
5464
  type: "button",
@@ -5626,12 +5466,12 @@ var LinkMain = ({
5626
5466
  title: "Apply link",
5627
5467
  disabled: !url && !isActive,
5628
5468
  "data-style": "ghost",
5629
- children: /* @__PURE__ */ jsx55(CornerDownLeftIcon, { className: "tiptap-button-icon" })
5469
+ children: /* @__PURE__ */ jsx57(CornerDownLeftIcon, { className: "tiptap-button-icon" })
5630
5470
  }
5631
5471
  ) }),
5632
- /* @__PURE__ */ jsx55(Separator3, {}),
5633
- /* @__PURE__ */ jsxs30(ButtonGroup, { orientation: "horizontal", children: [
5634
- /* @__PURE__ */ jsx55(
5472
+ /* @__PURE__ */ jsx57(Separator2, {}),
5473
+ /* @__PURE__ */ jsxs32(ButtonGroup, { orientation: "horizontal", children: [
5474
+ /* @__PURE__ */ jsx57(
5635
5475
  Button2,
5636
5476
  {
5637
5477
  type: "button",
@@ -5639,10 +5479,10 @@ var LinkMain = ({
5639
5479
  title: "Open in new window",
5640
5480
  disabled: !url && !isActive,
5641
5481
  "data-style": "ghost",
5642
- children: /* @__PURE__ */ jsx55(ExternalLinkIcon, { className: "tiptap-button-icon" })
5482
+ children: /* @__PURE__ */ jsx57(ExternalLinkIcon, { className: "tiptap-button-icon" })
5643
5483
  }
5644
5484
  ),
5645
- /* @__PURE__ */ jsx55(
5485
+ /* @__PURE__ */ jsx57(
5646
5486
  Button2,
5647
5487
  {
5648
5488
  type: "button",
@@ -5650,7 +5490,7 @@ var LinkMain = ({
5650
5490
  title: "Remove link",
5651
5491
  disabled: !url && !isActive,
5652
5492
  "data-style": "ghost",
5653
- children: /* @__PURE__ */ jsx55(TrashIcon, { className: "tiptap-button-icon" })
5493
+ children: /* @__PURE__ */ jsx57(TrashIcon, { className: "tiptap-button-icon" })
5654
5494
  }
5655
5495
  )
5656
5496
  ] })
@@ -5664,7 +5504,7 @@ var LinkContent = ({ editor }) => {
5664
5504
  const linkPopover = useLinkPopover({
5665
5505
  editor
5666
5506
  });
5667
- return /* @__PURE__ */ jsx55(LinkMain, { ...linkPopover });
5507
+ return /* @__PURE__ */ jsx57(LinkMain, { ...linkPopover });
5668
5508
  };
5669
5509
  var LinkPopover = forwardRef15(
5670
5510
  ({
@@ -5678,7 +5518,7 @@ var LinkPopover = forwardRef15(
5678
5518
  ...buttonProps
5679
5519
  }, ref) => {
5680
5520
  const { editor } = useTiptapEditor(providedEditor);
5681
- const [isOpen, setIsOpen] = useState20(false);
5521
+ const [isOpen, setIsOpen] = useState23(false);
5682
5522
  const {
5683
5523
  isVisible,
5684
5524
  canSet,
@@ -5695,18 +5535,18 @@ var LinkPopover = forwardRef15(
5695
5535
  hideWhenUnavailable,
5696
5536
  onSetLink
5697
5537
  });
5698
- const handleOnOpenChange = useCallback18(
5538
+ const handleOnOpenChange = useCallback20(
5699
5539
  (nextIsOpen) => {
5700
5540
  setIsOpen(nextIsOpen);
5701
5541
  onOpenChange?.(nextIsOpen);
5702
5542
  },
5703
5543
  [onOpenChange]
5704
5544
  );
5705
- const handleSetLink = useCallback18(() => {
5545
+ const handleSetLink = useCallback20(() => {
5706
5546
  setLink();
5707
5547
  setIsOpen(false);
5708
5548
  }, [setLink]);
5709
- const handleClick = useCallback18(
5549
+ const handleClick = useCallback20(
5710
5550
  (event) => {
5711
5551
  onClick?.(event);
5712
5552
  if (event.defaultPrevented) return;
@@ -5722,8 +5562,8 @@ var LinkPopover = forwardRef15(
5722
5562
  if (!isVisible) {
5723
5563
  return null;
5724
5564
  }
5725
- return /* @__PURE__ */ jsxs30(Popover, { open: isOpen, onOpenChange: handleOnOpenChange, children: [
5726
- /* @__PURE__ */ jsx55(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(
5565
+ return /* @__PURE__ */ jsxs32(Popover, { open: isOpen, onOpenChange: handleOnOpenChange, children: [
5566
+ /* @__PURE__ */ jsx57(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(
5727
5567
  LinkButton,
5728
5568
  {
5729
5569
  disabled: !canSet,
@@ -5734,10 +5574,10 @@ var LinkPopover = forwardRef15(
5734
5574
  onClick: handleClick,
5735
5575
  ...buttonProps,
5736
5576
  ref,
5737
- children: children ?? /* @__PURE__ */ jsx55(Icon, { className: "tiptap-button-icon" })
5577
+ children: children ?? /* @__PURE__ */ jsx57(Icon, { className: "tiptap-button-icon" })
5738
5578
  }
5739
5579
  ) }),
5740
- /* @__PURE__ */ jsx55(PopoverContent, { children: /* @__PURE__ */ jsx55(
5580
+ /* @__PURE__ */ jsx57(PopoverContent, { children: /* @__PURE__ */ jsx57(
5741
5581
  LinkMain,
5742
5582
  {
5743
5583
  url,
@@ -5754,7 +5594,7 @@ var LinkPopover = forwardRef15(
5754
5594
  LinkPopover.displayName = "LinkPopover";
5755
5595
 
5756
5596
  // src/components/tiptap-ui/link-popover/use-link-popover.ts
5757
- import { useCallback as useCallback19, useEffect as useEffect14, useState as useState21 } from "react";
5597
+ import { useCallback as useCallback21, useEffect as useEffect14, useState as useState24 } from "react";
5758
5598
  function canSetLink(editor) {
5759
5599
  if (!editor || !editor.isEditable) return false;
5760
5600
  if (isNodeTypeSelected(editor, ["image"], true)) return false;
@@ -5777,7 +5617,7 @@ function shouldShowLinkButton(props) {
5777
5617
  }
5778
5618
  function useLinkHandler(props) {
5779
5619
  const { editor, onSetLink } = props;
5780
- const [url, setUrl] = useState21(null);
5620
+ const [url, setUrl] = useState24(null);
5781
5621
  useEffect14(() => {
5782
5622
  if (!editor) return;
5783
5623
  const { href } = editor.getAttributes("link");
@@ -5796,7 +5636,7 @@ function useLinkHandler(props) {
5796
5636
  editor.off("selectionUpdate", updateLinkState);
5797
5637
  };
5798
5638
  }, [editor]);
5799
- const setLink = useCallback19(() => {
5639
+ const setLink = useCallback21(() => {
5800
5640
  if (!url || !editor) return;
5801
5641
  const { selection } = editor.state;
5802
5642
  const isEmpty = selection.empty;
@@ -5809,12 +5649,12 @@ function useLinkHandler(props) {
5809
5649
  setUrl(null);
5810
5650
  onSetLink?.();
5811
5651
  }, [editor, onSetLink, url]);
5812
- const removeLink = useCallback19(() => {
5652
+ const removeLink = useCallback21(() => {
5813
5653
  if (!editor) return;
5814
5654
  editor.chain().focus().extendMarkRange("link").unsetLink().setMeta("preventAutolink", true).run();
5815
5655
  setUrl("");
5816
5656
  }, [editor]);
5817
- const openLink = useCallback19(
5657
+ const openLink = useCallback21(
5818
5658
  (target = "_blank", features = "noopener,noreferrer") => {
5819
5659
  if (!url) return;
5820
5660
  const safeUrl = sanitizeUrl(url, window.location.href);
@@ -5836,7 +5676,7 @@ function useLinkState(props) {
5836
5676
  const { editor, hideWhenUnavailable = false } = props;
5837
5677
  const canSet = canSetLink(editor);
5838
5678
  const isActive = isLinkActive(editor);
5839
- const [isVisible, setIsVisible] = useState21(true);
5679
+ const [isVisible, setIsVisible] = useState24(true);
5840
5680
  useEffect14(() => {
5841
5681
  if (!editor) return;
5842
5682
  const handleSelectionUpdate = () => {
@@ -5885,13 +5725,13 @@ function useLinkPopover(config) {
5885
5725
  }
5886
5726
 
5887
5727
  // src/components/tiptap-ui/mark-button/mark-button.tsx
5888
- import { forwardRef as forwardRef16, useCallback as useCallback20 } from "react";
5889
- import { Fragment as Fragment8, jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
5728
+ import { forwardRef as forwardRef16, useCallback as useCallback22 } from "react";
5729
+ import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
5890
5730
  function MarkShortcutBadge({
5891
5731
  type,
5892
5732
  shortcutKeys = MARK_SHORTCUT_KEYS[type]
5893
5733
  }) {
5894
- return /* @__PURE__ */ jsx56(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
5734
+ return /* @__PURE__ */ jsx58(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
5895
5735
  }
5896
5736
  var MarkButton = forwardRef16(
5897
5737
  ({
@@ -5920,7 +5760,7 @@ var MarkButton = forwardRef16(
5920
5760
  hideWhenUnavailable,
5921
5761
  onToggled
5922
5762
  });
5923
- const handleClick = useCallback20(
5763
+ const handleClick = useCallback22(
5924
5764
  (event) => {
5925
5765
  onClick?.(event);
5926
5766
  if (event.defaultPrevented) return;
@@ -5931,7 +5771,7 @@ var MarkButton = forwardRef16(
5931
5771
  if (!isVisible) {
5932
5772
  return null;
5933
5773
  }
5934
- return /* @__PURE__ */ jsx56(
5774
+ return /* @__PURE__ */ jsx58(
5935
5775
  Button2,
5936
5776
  {
5937
5777
  type: "button",
@@ -5947,10 +5787,10 @@ var MarkButton = forwardRef16(
5947
5787
  onClick: handleClick,
5948
5788
  ...buttonProps,
5949
5789
  ref,
5950
- children: children ?? /* @__PURE__ */ jsxs31(Fragment8, { children: [
5951
- /* @__PURE__ */ jsx56(Icon, { className: "tiptap-button-icon" }),
5952
- text && /* @__PURE__ */ jsx56("span", { className: "tiptap-button-text", children: text }),
5953
- showShortcut && /* @__PURE__ */ jsx56(MarkShortcutBadge, { type, shortcutKeys })
5790
+ children: children ?? /* @__PURE__ */ jsxs33(Fragment9, { children: [
5791
+ /* @__PURE__ */ jsx58(Icon, { className: "tiptap-button-icon" }),
5792
+ text && /* @__PURE__ */ jsx58("span", { className: "tiptap-button-text", children: text }),
5793
+ showShortcut && /* @__PURE__ */ jsx58(MarkShortcutBadge, { type, shortcutKeys })
5954
5794
  ] })
5955
5795
  }
5956
5796
  );
@@ -5959,13 +5799,13 @@ var MarkButton = forwardRef16(
5959
5799
  MarkButton.displayName = "MarkButton";
5960
5800
 
5961
5801
  // src/components/tiptap-ui/mark-button/use-mark.ts
5962
- import { useCallback as useCallback21, useEffect as useEffect15, useState as useState22 } from "react";
5802
+ import { useCallback as useCallback23, useEffect as useEffect15, useState as useState25 } from "react";
5963
5803
 
5964
5804
  // src/components/tiptap-icons/bold-icon.tsx
5965
- import { memo as memo22 } from "react";
5966
- import { jsx as jsx57 } from "react/jsx-runtime";
5967
- var BoldIcon = memo22(({ className, ...props }) => {
5968
- return /* @__PURE__ */ jsx57(
5805
+ import { memo as memo26 } from "react";
5806
+ import { jsx as jsx59 } from "react/jsx-runtime";
5807
+ var BoldIcon = memo26(({ className, ...props }) => {
5808
+ return /* @__PURE__ */ jsx59(
5969
5809
  "svg",
5970
5810
  {
5971
5811
  width: "24",
@@ -5975,7 +5815,7 @@ var BoldIcon = memo22(({ className, ...props }) => {
5975
5815
  fill: "currentColor",
5976
5816
  xmlns: "http://www.w3.org/2000/svg",
5977
5817
  ...props,
5978
- children: /* @__PURE__ */ jsx57(
5818
+ children: /* @__PURE__ */ jsx59(
5979
5819
  "path",
5980
5820
  {
5981
5821
  fillRule: "evenodd",
@@ -5990,10 +5830,10 @@ var BoldIcon = memo22(({ className, ...props }) => {
5990
5830
  BoldIcon.displayName = "BoldIcon";
5991
5831
 
5992
5832
  // src/components/tiptap-icons/code2-icon.tsx
5993
- import { memo as memo23 } from "react";
5994
- import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
5995
- var Code2Icon = memo23(({ className, ...props }) => {
5996
- return /* @__PURE__ */ jsxs32(
5833
+ import { memo as memo27 } from "react";
5834
+ import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
5835
+ var Code2Icon = memo27(({ className, ...props }) => {
5836
+ return /* @__PURE__ */ jsxs34(
5997
5837
  "svg",
5998
5838
  {
5999
5839
  width: "24",
@@ -6004,21 +5844,21 @@ var Code2Icon = memo23(({ className, ...props }) => {
6004
5844
  xmlns: "http://www.w3.org/2000/svg",
6005
5845
  ...props,
6006
5846
  children: [
6007
- /* @__PURE__ */ jsx58(
5847
+ /* @__PURE__ */ jsx60(
6008
5848
  "path",
6009
5849
  {
6010
5850
  d: "M15.4545 4.2983C15.6192 3.77115 15.3254 3.21028 14.7983 3.04554C14.2712 2.88081 13.7103 3.1746 13.5455 3.70175L8.54554 19.7017C8.38081 20.2289 8.6746 20.7898 9.20175 20.9545C9.72889 21.1192 10.2898 20.8254 10.4545 20.2983L15.4545 4.2983Z",
6011
5851
  fill: "currentColor"
6012
5852
  }
6013
5853
  ),
6014
- /* @__PURE__ */ jsx58(
5854
+ /* @__PURE__ */ jsx60(
6015
5855
  "path",
6016
5856
  {
6017
5857
  d: "M6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.70711L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289Z",
6018
5858
  fill: "currentColor"
6019
5859
  }
6020
5860
  ),
6021
- /* @__PURE__ */ jsx58(
5861
+ /* @__PURE__ */ jsx60(
6022
5862
  "path",
6023
5863
  {
6024
5864
  d: "M17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C23.0976 11.6834 23.0976 12.3166 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z",
@@ -6032,10 +5872,10 @@ var Code2Icon = memo23(({ className, ...props }) => {
6032
5872
  Code2Icon.displayName = "Code2Icon";
6033
5873
 
6034
5874
  // src/components/tiptap-icons/italic-icon.tsx
6035
- import { memo as memo24 } from "react";
6036
- import { jsx as jsx59 } from "react/jsx-runtime";
6037
- var ItalicIcon = memo24(({ className, ...props }) => {
6038
- return /* @__PURE__ */ jsx59(
5875
+ import { memo as memo28 } from "react";
5876
+ import { jsx as jsx61 } from "react/jsx-runtime";
5877
+ var ItalicIcon = memo28(({ className, ...props }) => {
5878
+ return /* @__PURE__ */ jsx61(
6039
5879
  "svg",
6040
5880
  {
6041
5881
  width: "24",
@@ -6045,7 +5885,7 @@ var ItalicIcon = memo24(({ className, ...props }) => {
6045
5885
  fill: "currentColor",
6046
5886
  xmlns: "http://www.w3.org/2000/svg",
6047
5887
  ...props,
6048
- children: /* @__PURE__ */ jsx59(
5888
+ children: /* @__PURE__ */ jsx61(
6049
5889
  "path",
6050
5890
  {
6051
5891
  d: "M15.0222 3H19C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H15.693L10.443 19H14C14.5523 19 15 19.4477 15 20C15 20.5523 14.5523 21 14 21H9.02418C9.00802 21.0004 8.99181 21.0004 8.97557 21H5C4.44772 21 4 20.5523 4 20C4 19.4477 4.44772 19 5 19H8.30704L13.557 5H10C9.44772 5 9 4.55228 9 4C9 3.44772 9.44772 3 10 3H14.9782C14.9928 2.99968 15.0075 2.99967 15.0222 3Z",
@@ -6058,10 +5898,10 @@ var ItalicIcon = memo24(({ className, ...props }) => {
6058
5898
  ItalicIcon.displayName = "ItalicIcon";
6059
5899
 
6060
5900
  // src/components/tiptap-icons/strike-icon.tsx
6061
- import { memo as memo25 } from "react";
6062
- import { jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
6063
- var StrikeIcon = memo25(({ className, ...props }) => {
6064
- return /* @__PURE__ */ jsxs33(
5901
+ import { memo as memo29 } from "react";
5902
+ import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
5903
+ var StrikeIcon = memo29(({ className, ...props }) => {
5904
+ return /* @__PURE__ */ jsxs35(
6065
5905
  "svg",
6066
5906
  {
6067
5907
  width: "24",
@@ -6072,14 +5912,14 @@ var StrikeIcon = memo25(({ className, ...props }) => {
6072
5912
  xmlns: "http://www.w3.org/2000/svg",
6073
5913
  ...props,
6074
5914
  children: [
6075
- /* @__PURE__ */ jsx60(
5915
+ /* @__PURE__ */ jsx62(
6076
5916
  "path",
6077
5917
  {
6078
5918
  d: "M9.00039 3H16.0001C16.5524 3 17.0001 3.44772 17.0001 4C17.0001 4.55229 16.5524 5 16.0001 5H9.00011C8.68006 4.99983 8.36412 5.07648 8.07983 5.22349C7.79555 5.37051 7.55069 5.5836 7.36585 5.84487C7.181 6.10614 7.06155 6.40796 7.01754 6.72497C6.97352 7.04198 7.00623 7.36492 7.11292 7.66667C7.29701 8.18737 7.02414 8.75872 6.50344 8.94281C5.98274 9.1269 5.4114 8.85403 5.2273 8.33333C5.01393 7.72984 4.94851 7.08396 5.03654 6.44994C5.12456 5.81592 5.36346 5.21229 5.73316 4.68974C6.10285 4.1672 6.59256 3.74101 7.16113 3.44698C7.72955 3.15303 8.36047 2.99975 9.00039 3Z",
6079
5919
  fill: "currentColor"
6080
5920
  }
6081
5921
  ),
6082
- /* @__PURE__ */ jsx60(
5922
+ /* @__PURE__ */ jsx62(
6083
5923
  "path",
6084
5924
  {
6085
5925
  d: "M18 13H20C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11H4C3.44772 11 3 11.4477 3 12C3 12.5523 3.44772 13 4 13H14C14.7956 13 15.5587 13.3161 16.1213 13.8787C16.6839 14.4413 17 15.2044 17 16C17 16.7956 16.6839 17.5587 16.1213 18.1213C15.5587 18.6839 14.7956 19 14 19H6C5.44772 19 5 19.4477 5 20C5 20.5523 5.44772 21 6 21H14C15.3261 21 16.5979 20.4732 17.5355 19.5355C18.4732 18.5979 19 17.3261 19 16C19 14.9119 18.6453 13.8604 18 13Z",
@@ -6093,10 +5933,10 @@ var StrikeIcon = memo25(({ className, ...props }) => {
6093
5933
  StrikeIcon.displayName = "StrikeIcon";
6094
5934
 
6095
5935
  // src/components/tiptap-icons/subscript-icon.tsx
6096
- import { memo as memo26 } from "react";
6097
- import { jsx as jsx61, jsxs as jsxs34 } from "react/jsx-runtime";
6098
- var SubscriptIcon = memo26(({ className, ...props }) => {
6099
- return /* @__PURE__ */ jsxs34(
5936
+ import { memo as memo30 } from "react";
5937
+ import { jsx as jsx63, jsxs as jsxs36 } from "react/jsx-runtime";
5938
+ var SubscriptIcon = memo30(({ className, ...props }) => {
5939
+ return /* @__PURE__ */ jsxs36(
6100
5940
  "svg",
6101
5941
  {
6102
5942
  width: "24",
@@ -6107,7 +5947,7 @@ var SubscriptIcon = memo26(({ className, ...props }) => {
6107
5947
  xmlns: "http://www.w3.org/2000/svg",
6108
5948
  ...props,
6109
5949
  children: [
6110
- /* @__PURE__ */ jsx61(
5950
+ /* @__PURE__ */ jsx63(
6111
5951
  "path",
6112
5952
  {
6113
5953
  fillRule: "evenodd",
@@ -6116,7 +5956,7 @@ var SubscriptIcon = memo26(({ className, ...props }) => {
6116
5956
  fill: "currentColor"
6117
5957
  }
6118
5958
  ),
6119
- /* @__PURE__ */ jsx61(
5959
+ /* @__PURE__ */ jsx63(
6120
5960
  "path",
6121
5961
  {
6122
5962
  fillRule: "evenodd",
@@ -6125,7 +5965,7 @@ var SubscriptIcon = memo26(({ className, ...props }) => {
6125
5965
  fill: "currentColor"
6126
5966
  }
6127
5967
  ),
6128
- /* @__PURE__ */ jsx61(
5968
+ /* @__PURE__ */ jsx63(
6129
5969
  "path",
6130
5970
  {
6131
5971
  fillRule: "evenodd",
@@ -6141,10 +5981,10 @@ var SubscriptIcon = memo26(({ className, ...props }) => {
6141
5981
  SubscriptIcon.displayName = "SubscriptIcon";
6142
5982
 
6143
5983
  // src/components/tiptap-icons/superscript-icon.tsx
6144
- import { memo as memo27 } from "react";
6145
- import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
6146
- var SuperscriptIcon = memo27(({ className, ...props }) => {
6147
- return /* @__PURE__ */ jsxs35(
5984
+ import { memo as memo31 } from "react";
5985
+ import { jsx as jsx64, jsxs as jsxs37 } from "react/jsx-runtime";
5986
+ var SuperscriptIcon = memo31(({ className, ...props }) => {
5987
+ return /* @__PURE__ */ jsxs37(
6148
5988
  "svg",
6149
5989
  {
6150
5990
  width: "24",
@@ -6155,7 +5995,7 @@ var SuperscriptIcon = memo27(({ className, ...props }) => {
6155
5995
  xmlns: "http://www.w3.org/2000/svg",
6156
5996
  ...props,
6157
5997
  children: [
6158
- /* @__PURE__ */ jsx62(
5998
+ /* @__PURE__ */ jsx64(
6159
5999
  "path",
6160
6000
  {
6161
6001
  fillRule: "evenodd",
@@ -6164,7 +6004,7 @@ var SuperscriptIcon = memo27(({ className, ...props }) => {
6164
6004
  fill: "currentColor"
6165
6005
  }
6166
6006
  ),
6167
- /* @__PURE__ */ jsx62(
6007
+ /* @__PURE__ */ jsx64(
6168
6008
  "path",
6169
6009
  {
6170
6010
  fillRule: "evenodd",
@@ -6173,7 +6013,7 @@ var SuperscriptIcon = memo27(({ className, ...props }) => {
6173
6013
  fill: "currentColor"
6174
6014
  }
6175
6015
  ),
6176
- /* @__PURE__ */ jsx62(
6016
+ /* @__PURE__ */ jsx64(
6177
6017
  "path",
6178
6018
  {
6179
6019
  fillRule: "evenodd",
@@ -6189,10 +6029,10 @@ var SuperscriptIcon = memo27(({ className, ...props }) => {
6189
6029
  SuperscriptIcon.displayName = "SuperscriptIcon";
6190
6030
 
6191
6031
  // src/components/tiptap-icons/underline-icon.tsx
6192
- import { memo as memo28 } from "react";
6193
- import { jsx as jsx63 } from "react/jsx-runtime";
6194
- var UnderlineIcon = memo28(({ className, ...props }) => {
6195
- return /* @__PURE__ */ jsx63(
6032
+ import { memo as memo32 } from "react";
6033
+ import { jsx as jsx65 } from "react/jsx-runtime";
6034
+ var UnderlineIcon = memo32(({ className, ...props }) => {
6035
+ return /* @__PURE__ */ jsx65(
6196
6036
  "svg",
6197
6037
  {
6198
6038
  width: "24",
@@ -6202,7 +6042,7 @@ var UnderlineIcon = memo28(({ className, ...props }) => {
6202
6042
  fill: "currentColor",
6203
6043
  xmlns: "http://www.w3.org/2000/svg",
6204
6044
  ...props,
6205
- children: /* @__PURE__ */ jsx63(
6045
+ children: /* @__PURE__ */ jsx65(
6206
6046
  "path",
6207
6047
  {
6208
6048
  fillRule: "evenodd",
@@ -6270,7 +6110,7 @@ function useMark(config) {
6270
6110
  onToggled
6271
6111
  } = config;
6272
6112
  const { editor } = useTiptapEditor(providedEditor);
6273
- const [isVisible, setIsVisible] = useState22(true);
6113
+ const [isVisible, setIsVisible] = useState25(true);
6274
6114
  const canToggle2 = canToggleMark(editor, type);
6275
6115
  const isActive = isMarkActive(editor, type);
6276
6116
  useEffect15(() => {
@@ -6284,7 +6124,7 @@ function useMark(config) {
6284
6124
  editor.off("selectionUpdate", handleSelectionUpdate);
6285
6125
  };
6286
6126
  }, [editor, type, hideWhenUnavailable]);
6287
- const handleMark = useCallback21(() => {
6127
+ const handleMark = useCallback23(() => {
6288
6128
  if (!editor) return false;
6289
6129
  const success = toggleMark(editor, type);
6290
6130
  if (success) {
@@ -6304,13 +6144,13 @@ function useMark(config) {
6304
6144
  }
6305
6145
 
6306
6146
  // src/components/tiptap-ui/text-align-button/text-align-button.tsx
6307
- import { forwardRef as forwardRef17, useCallback as useCallback22 } from "react";
6308
- import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs36 } from "react/jsx-runtime";
6147
+ import { forwardRef as forwardRef17, useCallback as useCallback24 } from "react";
6148
+ import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
6309
6149
  function TextAlignShortcutBadge({
6310
6150
  align,
6311
6151
  shortcutKeys = TEXT_ALIGN_SHORTCUT_KEYS[align]
6312
6152
  }) {
6313
- return /* @__PURE__ */ jsx64(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
6153
+ return /* @__PURE__ */ jsx66(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
6314
6154
  }
6315
6155
  var TextAlignButton = forwardRef17(
6316
6156
  ({
@@ -6340,7 +6180,7 @@ var TextAlignButton = forwardRef17(
6340
6180
  hideWhenUnavailable,
6341
6181
  onAligned
6342
6182
  });
6343
- const handleClick = useCallback22(
6183
+ const handleClick = useCallback24(
6344
6184
  (event) => {
6345
6185
  onClick?.(event);
6346
6186
  if (event.defaultPrevented) return;
@@ -6352,7 +6192,7 @@ var TextAlignButton = forwardRef17(
6352
6192
  return null;
6353
6193
  }
6354
6194
  const RenderIcon = CustomIcon ?? Icon;
6355
- return /* @__PURE__ */ jsx64(
6195
+ return /* @__PURE__ */ jsx66(
6356
6196
  Button2,
6357
6197
  {
6358
6198
  type: "button",
@@ -6368,10 +6208,10 @@ var TextAlignButton = forwardRef17(
6368
6208
  onClick: handleClick,
6369
6209
  ...buttonProps,
6370
6210
  ref,
6371
- children: children ?? /* @__PURE__ */ jsxs36(Fragment9, { children: [
6372
- /* @__PURE__ */ jsx64(RenderIcon, { className: "tiptap-button-icon" }),
6373
- text && /* @__PURE__ */ jsx64("span", { className: "tiptap-button-text", children: text }),
6374
- showShortcut && /* @__PURE__ */ jsx64(
6211
+ children: children ?? /* @__PURE__ */ jsxs38(Fragment10, { children: [
6212
+ /* @__PURE__ */ jsx66(RenderIcon, { className: "tiptap-button-icon" }),
6213
+ text && /* @__PURE__ */ jsx66("span", { className: "tiptap-button-text", children: text }),
6214
+ showShortcut && /* @__PURE__ */ jsx66(
6375
6215
  TextAlignShortcutBadge,
6376
6216
  {
6377
6217
  align,
@@ -6386,13 +6226,13 @@ var TextAlignButton = forwardRef17(
6386
6226
  TextAlignButton.displayName = "TextAlignButton";
6387
6227
 
6388
6228
  // src/components/tiptap-ui/text-align-button/use-text-align.ts
6389
- import { useCallback as useCallback23, useEffect as useEffect16, useState as useState23 } from "react";
6229
+ import { useCallback as useCallback25, useEffect as useEffect16, useState as useState26 } from "react";
6390
6230
 
6391
6231
  // src/components/tiptap-icons/align-center-icon.tsx
6392
- import { memo as memo29 } from "react";
6393
- import { jsx as jsx65, jsxs as jsxs37 } from "react/jsx-runtime";
6394
- var AlignCenterIcon = memo29(({ className, ...props }) => {
6395
- return /* @__PURE__ */ jsxs37(
6232
+ import { memo as memo33 } from "react";
6233
+ import { jsx as jsx67, jsxs as jsxs39 } from "react/jsx-runtime";
6234
+ var AlignCenterIcon = memo33(({ className, ...props }) => {
6235
+ return /* @__PURE__ */ jsxs39(
6396
6236
  "svg",
6397
6237
  {
6398
6238
  width: "24",
@@ -6403,7 +6243,7 @@ var AlignCenterIcon = memo29(({ className, ...props }) => {
6403
6243
  xmlns: "http://www.w3.org/2000/svg",
6404
6244
  ...props,
6405
6245
  children: [
6406
- /* @__PURE__ */ jsx65(
6246
+ /* @__PURE__ */ jsx67(
6407
6247
  "path",
6408
6248
  {
6409
6249
  fillRule: "evenodd",
@@ -6412,7 +6252,7 @@ var AlignCenterIcon = memo29(({ className, ...props }) => {
6412
6252
  fill: "currentColor"
6413
6253
  }
6414
6254
  ),
6415
- /* @__PURE__ */ jsx65(
6255
+ /* @__PURE__ */ jsx67(
6416
6256
  "path",
6417
6257
  {
6418
6258
  fillRule: "evenodd",
@@ -6421,7 +6261,7 @@ var AlignCenterIcon = memo29(({ className, ...props }) => {
6421
6261
  fill: "currentColor"
6422
6262
  }
6423
6263
  ),
6424
- /* @__PURE__ */ jsx65(
6264
+ /* @__PURE__ */ jsx67(
6425
6265
  "path",
6426
6266
  {
6427
6267
  fillRule: "evenodd",
@@ -6437,10 +6277,10 @@ var AlignCenterIcon = memo29(({ className, ...props }) => {
6437
6277
  AlignCenterIcon.displayName = "AlignCenterIcon";
6438
6278
 
6439
6279
  // src/components/tiptap-icons/align-justify-icon.tsx
6440
- import { memo as memo30 } from "react";
6441
- import { jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
6442
- var AlignJustifyIcon = memo30(({ className, ...props }) => {
6443
- return /* @__PURE__ */ jsxs38(
6280
+ import { memo as memo34 } from "react";
6281
+ import { jsx as jsx68, jsxs as jsxs40 } from "react/jsx-runtime";
6282
+ var AlignJustifyIcon = memo34(({ className, ...props }) => {
6283
+ return /* @__PURE__ */ jsxs40(
6444
6284
  "svg",
6445
6285
  {
6446
6286
  width: "24",
@@ -6451,7 +6291,7 @@ var AlignJustifyIcon = memo30(({ className, ...props }) => {
6451
6291
  xmlns: "http://www.w3.org/2000/svg",
6452
6292
  ...props,
6453
6293
  children: [
6454
- /* @__PURE__ */ jsx66(
6294
+ /* @__PURE__ */ jsx68(
6455
6295
  "path",
6456
6296
  {
6457
6297
  fillRule: "evenodd",
@@ -6460,7 +6300,7 @@ var AlignJustifyIcon = memo30(({ className, ...props }) => {
6460
6300
  fill: "currentColor"
6461
6301
  }
6462
6302
  ),
6463
- /* @__PURE__ */ jsx66(
6303
+ /* @__PURE__ */ jsx68(
6464
6304
  "path",
6465
6305
  {
6466
6306
  fillRule: "evenodd",
@@ -6469,7 +6309,7 @@ var AlignJustifyIcon = memo30(({ className, ...props }) => {
6469
6309
  fill: "currentColor"
6470
6310
  }
6471
6311
  ),
6472
- /* @__PURE__ */ jsx66(
6312
+ /* @__PURE__ */ jsx68(
6473
6313
  "path",
6474
6314
  {
6475
6315
  fillRule: "evenodd",
@@ -6485,10 +6325,10 @@ var AlignJustifyIcon = memo30(({ className, ...props }) => {
6485
6325
  AlignJustifyIcon.displayName = "AlignJustifyIcon";
6486
6326
 
6487
6327
  // src/components/tiptap-icons/align-left-icon.tsx
6488
- import { memo as memo31 } from "react";
6489
- import { jsx as jsx67, jsxs as jsxs39 } from "react/jsx-runtime";
6490
- var AlignLeftIcon = memo31(({ className, ...props }) => {
6491
- return /* @__PURE__ */ jsxs39(
6328
+ import { memo as memo35 } from "react";
6329
+ import { jsx as jsx69, jsxs as jsxs41 } from "react/jsx-runtime";
6330
+ var AlignLeftIcon = memo35(({ className, ...props }) => {
6331
+ return /* @__PURE__ */ jsxs41(
6492
6332
  "svg",
6493
6333
  {
6494
6334
  width: "24",
@@ -6499,7 +6339,7 @@ var AlignLeftIcon = memo31(({ className, ...props }) => {
6499
6339
  xmlns: "http://www.w3.org/2000/svg",
6500
6340
  ...props,
6501
6341
  children: [
6502
- /* @__PURE__ */ jsx67(
6342
+ /* @__PURE__ */ jsx69(
6503
6343
  "path",
6504
6344
  {
6505
6345
  fillRule: "evenodd",
@@ -6508,7 +6348,7 @@ var AlignLeftIcon = memo31(({ className, ...props }) => {
6508
6348
  fill: "currentColor"
6509
6349
  }
6510
6350
  ),
6511
- /* @__PURE__ */ jsx67(
6351
+ /* @__PURE__ */ jsx69(
6512
6352
  "path",
6513
6353
  {
6514
6354
  fillRule: "evenodd",
@@ -6517,7 +6357,7 @@ var AlignLeftIcon = memo31(({ className, ...props }) => {
6517
6357
  fill: "currentColor"
6518
6358
  }
6519
6359
  ),
6520
- /* @__PURE__ */ jsx67(
6360
+ /* @__PURE__ */ jsx69(
6521
6361
  "path",
6522
6362
  {
6523
6363
  fillRule: "evenodd",
@@ -6533,10 +6373,10 @@ var AlignLeftIcon = memo31(({ className, ...props }) => {
6533
6373
  AlignLeftIcon.displayName = "AlignLeftIcon";
6534
6374
 
6535
6375
  // src/components/tiptap-icons/align-right-icon.tsx
6536
- import { memo as memo32 } from "react";
6537
- import { jsx as jsx68, jsxs as jsxs40 } from "react/jsx-runtime";
6538
- var AlignRightIcon = memo32(({ className, ...props }) => {
6539
- return /* @__PURE__ */ jsxs40(
6376
+ import { memo as memo36 } from "react";
6377
+ import { jsx as jsx70, jsxs as jsxs42 } from "react/jsx-runtime";
6378
+ var AlignRightIcon = memo36(({ className, ...props }) => {
6379
+ return /* @__PURE__ */ jsxs42(
6540
6380
  "svg",
6541
6381
  {
6542
6382
  width: "24",
@@ -6547,7 +6387,7 @@ var AlignRightIcon = memo32(({ className, ...props }) => {
6547
6387
  xmlns: "http://www.w3.org/2000/svg",
6548
6388
  ...props,
6549
6389
  children: [
6550
- /* @__PURE__ */ jsx68(
6390
+ /* @__PURE__ */ jsx70(
6551
6391
  "path",
6552
6392
  {
6553
6393
  fillRule: "evenodd",
@@ -6556,7 +6396,7 @@ var AlignRightIcon = memo32(({ className, ...props }) => {
6556
6396
  fill: "currentColor"
6557
6397
  }
6558
6398
  ),
6559
- /* @__PURE__ */ jsx68(
6399
+ /* @__PURE__ */ jsx70(
6560
6400
  "path",
6561
6401
  {
6562
6402
  fillRule: "evenodd",
@@ -6565,7 +6405,7 @@ var AlignRightIcon = memo32(({ className, ...props }) => {
6565
6405
  fill: "currentColor"
6566
6406
  }
6567
6407
  ),
6568
- /* @__PURE__ */ jsx68(
6408
+ /* @__PURE__ */ jsx70(
6569
6409
  "path",
6570
6410
  {
6571
6411
  fillRule: "evenodd",
@@ -6638,7 +6478,7 @@ function useTextAlign(config) {
6638
6478
  onAligned
6639
6479
  } = config;
6640
6480
  const { editor } = useTiptapEditor(providedEditor);
6641
- const [isVisible, setIsVisible] = useState23(true);
6481
+ const [isVisible, setIsVisible] = useState26(true);
6642
6482
  const canAlign = canSetTextAlign(editor, align);
6643
6483
  const isActive = isTextAlignActive(editor, align);
6644
6484
  useEffect16(() => {
@@ -6652,7 +6492,7 @@ function useTextAlign(config) {
6652
6492
  editor.off("selectionUpdate", handleSelectionUpdate);
6653
6493
  };
6654
6494
  }, [editor, hideWhenUnavailable, align]);
6655
- const handleTextAlign = useCallback23(() => {
6495
+ const handleTextAlign = useCallback25(() => {
6656
6496
  if (!editor) return false;
6657
6497
  const success = setTextAlign(editor, align);
6658
6498
  if (success) {
@@ -6672,13 +6512,13 @@ function useTextAlign(config) {
6672
6512
  }
6673
6513
 
6674
6514
  // src/components/tiptap-ui/undo-redo-button/undo-redo-button.tsx
6675
- import { forwardRef as forwardRef18, useCallback as useCallback24 } from "react";
6676
- import { Fragment as Fragment10, jsx as jsx69, jsxs as jsxs41 } from "react/jsx-runtime";
6515
+ import { forwardRef as forwardRef18, useCallback as useCallback26 } from "react";
6516
+ import { Fragment as Fragment11, jsx as jsx71, jsxs as jsxs43 } from "react/jsx-runtime";
6677
6517
  function HistoryShortcutBadge({
6678
6518
  action,
6679
6519
  shortcutKeys = UNDO_REDO_SHORTCUT_KEYS[action]
6680
6520
  }) {
6681
- return /* @__PURE__ */ jsx69(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
6521
+ return /* @__PURE__ */ jsx71(Badge, { children: parseShortcutKeys({ shortcutKeys }) });
6682
6522
  }
6683
6523
  var UndoRedoButton = forwardRef18(
6684
6524
  ({
@@ -6699,7 +6539,7 @@ var UndoRedoButton = forwardRef18(
6699
6539
  hideWhenUnavailable,
6700
6540
  onExecuted
6701
6541
  });
6702
- const handleClick = useCallback24(
6542
+ const handleClick = useCallback26(
6703
6543
  (event) => {
6704
6544
  onClick?.(event);
6705
6545
  if (event.defaultPrevented) return;
@@ -6710,7 +6550,7 @@ var UndoRedoButton = forwardRef18(
6710
6550
  if (!isVisible) {
6711
6551
  return null;
6712
6552
  }
6713
- return /* @__PURE__ */ jsx69(
6553
+ return /* @__PURE__ */ jsx71(
6714
6554
  Button2,
6715
6555
  {
6716
6556
  type: "button",
@@ -6724,10 +6564,10 @@ var UndoRedoButton = forwardRef18(
6724
6564
  onClick: handleClick,
6725
6565
  ...buttonProps,
6726
6566
  ref,
6727
- children: children ?? /* @__PURE__ */ jsxs41(Fragment10, { children: [
6728
- /* @__PURE__ */ jsx69(Icon, { className: "tiptap-button-icon" }),
6729
- text && /* @__PURE__ */ jsx69("span", { className: "tiptap-button-text", children: text }),
6730
- showShortcut && /* @__PURE__ */ jsx69(
6567
+ children: children ?? /* @__PURE__ */ jsxs43(Fragment11, { children: [
6568
+ /* @__PURE__ */ jsx71(Icon, { className: "tiptap-button-icon" }),
6569
+ text && /* @__PURE__ */ jsx71("span", { className: "tiptap-button-text", children: text }),
6570
+ showShortcut && /* @__PURE__ */ jsx71(
6731
6571
  HistoryShortcutBadge,
6732
6572
  {
6733
6573
  action,
@@ -6742,13 +6582,13 @@ var UndoRedoButton = forwardRef18(
6742
6582
  UndoRedoButton.displayName = "UndoRedoButton";
6743
6583
 
6744
6584
  // src/components/tiptap-ui/undo-redo-button/use-undo-redo.ts
6745
- import { useCallback as useCallback25, useEffect as useEffect17, useState as useState24 } from "react";
6585
+ import { useCallback as useCallback27, useEffect as useEffect17, useState as useState27 } from "react";
6746
6586
 
6747
6587
  // src/components/tiptap-icons/redo2-icon.tsx
6748
- import { memo as memo33 } from "react";
6749
- import { jsx as jsx70 } from "react/jsx-runtime";
6750
- var Redo2Icon = memo33(({ className, ...props }) => {
6751
- return /* @__PURE__ */ jsx70(
6588
+ import { memo as memo37 } from "react";
6589
+ import { jsx as jsx72 } from "react/jsx-runtime";
6590
+ var Redo2Icon = memo37(({ className, ...props }) => {
6591
+ return /* @__PURE__ */ jsx72(
6752
6592
  "svg",
6753
6593
  {
6754
6594
  width: "24",
@@ -6758,7 +6598,7 @@ var Redo2Icon = memo33(({ className, ...props }) => {
6758
6598
  fill: "currentColor",
6759
6599
  xmlns: "http://www.w3.org/2000/svg",
6760
6600
  ...props,
6761
- children: /* @__PURE__ */ jsx70(
6601
+ children: /* @__PURE__ */ jsx72(
6762
6602
  "path",
6763
6603
  {
6764
6604
  fillRule: "evenodd",
@@ -6773,10 +6613,10 @@ var Redo2Icon = memo33(({ className, ...props }) => {
6773
6613
  Redo2Icon.displayName = "Redo2Icon";
6774
6614
 
6775
6615
  // src/components/tiptap-icons/undo2-icon.tsx
6776
- import { memo as memo34 } from "react";
6777
- import { jsx as jsx71 } from "react/jsx-runtime";
6778
- var Undo2Icon = memo34(({ className, ...props }) => {
6779
- return /* @__PURE__ */ jsx71(
6616
+ import { memo as memo38 } from "react";
6617
+ import { jsx as jsx73 } from "react/jsx-runtime";
6618
+ var Undo2Icon = memo38(({ className, ...props }) => {
6619
+ return /* @__PURE__ */ jsx73(
6780
6620
  "svg",
6781
6621
  {
6782
6622
  width: "24",
@@ -6786,7 +6626,7 @@ var Undo2Icon = memo34(({ className, ...props }) => {
6786
6626
  fill: "currentColor",
6787
6627
  xmlns: "http://www.w3.org/2000/svg",
6788
6628
  ...props,
6789
- children: /* @__PURE__ */ jsx71(
6629
+ children: /* @__PURE__ */ jsx73(
6790
6630
  "path",
6791
6631
  {
6792
6632
  fillRule: "evenodd",
@@ -6840,7 +6680,7 @@ function useUndoRedo(config) {
6840
6680
  onExecuted
6841
6681
  } = config;
6842
6682
  const { editor } = useTiptapEditor(providedEditor);
6843
- const [isVisible, setIsVisible] = useState24(true);
6683
+ const [isVisible, setIsVisible] = useState27(true);
6844
6684
  const canExecute = canExecuteUndoRedoAction(editor, action);
6845
6685
  useEffect17(() => {
6846
6686
  if (!editor) return;
@@ -6853,7 +6693,7 @@ function useUndoRedo(config) {
6853
6693
  editor.off("transaction", handleUpdate);
6854
6694
  };
6855
6695
  }, [editor, hideWhenUnavailable, action]);
6856
- const handleAction = useCallback25(() => {
6696
+ const handleAction = useCallback27(() => {
6857
6697
  if (!editor) return false;
6858
6698
  const success = executeUndoRedoAction(editor, action);
6859
6699
  if (success) {
@@ -6873,7 +6713,7 @@ function useUndoRedo(config) {
6873
6713
 
6874
6714
  // src/components/tiptap-ui/font-family-dropdown/font-family-dropdown.tsx
6875
6715
  import { useCurrentEditor as useCurrentEditor3 } from "@tiptap/react";
6876
- import { useState as useState25 } from "react";
6716
+ import { useState as useState28 } from "react";
6877
6717
 
6878
6718
  // src/lib/font.ts
6879
6719
  var FONT_OPTIONS = [
@@ -6917,12 +6757,12 @@ import { ChevronDown } from "lucide-react";
6917
6757
  // src/components/ui/command.tsx
6918
6758
  import { Command as CommandPrimitive } from "cmdk";
6919
6759
  import { SearchIcon } from "lucide-react";
6920
- import { jsx as jsx72, jsxs as jsxs42 } from "react/jsx-runtime";
6760
+ import { jsx as jsx74, jsxs as jsxs44 } from "react/jsx-runtime";
6921
6761
  function Command({
6922
6762
  className,
6923
6763
  ...props
6924
6764
  }) {
6925
- return /* @__PURE__ */ jsx72(
6765
+ return /* @__PURE__ */ jsx74(
6926
6766
  CommandPrimitive,
6927
6767
  {
6928
6768
  "data-slot": "command",
@@ -6938,14 +6778,14 @@ function CommandInput({
6938
6778
  className,
6939
6779
  ...props
6940
6780
  }) {
6941
- return /* @__PURE__ */ jsxs42(
6781
+ return /* @__PURE__ */ jsxs44(
6942
6782
  "div",
6943
6783
  {
6944
6784
  "data-slot": "command-input-wrapper",
6945
6785
  className: "flex h-9 items-center gap-2 border-b px-3",
6946
6786
  children: [
6947
- /* @__PURE__ */ jsx72(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
6948
- /* @__PURE__ */ jsx72(
6787
+ /* @__PURE__ */ jsx74(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
6788
+ /* @__PURE__ */ jsx74(
6949
6789
  CommandPrimitive.Input,
6950
6790
  {
6951
6791
  "data-slot": "command-input",
@@ -6964,7 +6804,7 @@ function CommandList({
6964
6804
  className,
6965
6805
  ...props
6966
6806
  }) {
6967
- return /* @__PURE__ */ jsx72(
6807
+ return /* @__PURE__ */ jsx74(
6968
6808
  CommandPrimitive.List,
6969
6809
  {
6970
6810
  "data-slot": "command-list",
@@ -6979,7 +6819,7 @@ function CommandList({
6979
6819
  function CommandEmpty({
6980
6820
  ...props
6981
6821
  }) {
6982
- return /* @__PURE__ */ jsx72(
6822
+ return /* @__PURE__ */ jsx74(
6983
6823
  CommandPrimitive.Empty,
6984
6824
  {
6985
6825
  "data-slot": "command-empty",
@@ -6992,7 +6832,7 @@ function CommandGroup({
6992
6832
  className,
6993
6833
  ...props
6994
6834
  }) {
6995
- return /* @__PURE__ */ jsx72(
6835
+ return /* @__PURE__ */ jsx74(
6996
6836
  CommandPrimitive.Group,
6997
6837
  {
6998
6838
  "data-slot": "command-group",
@@ -7008,7 +6848,7 @@ function CommandItem({
7008
6848
  className,
7009
6849
  ...props
7010
6850
  }) {
7011
- return /* @__PURE__ */ jsx72(
6851
+ return /* @__PURE__ */ jsx74(
7012
6852
  CommandPrimitive.Item,
7013
6853
  {
7014
6854
  "data-slot": "command-item",
@@ -7023,16 +6863,16 @@ function CommandItem({
7023
6863
 
7024
6864
  // src/components/ui/popover.tsx
7025
6865
  import * as PopoverPrimitive2 from "@radix-ui/react-popover";
7026
- import { jsx as jsx73 } from "react/jsx-runtime";
6866
+ import { jsx as jsx75 } from "react/jsx-runtime";
7027
6867
  function Popover2({
7028
6868
  ...props
7029
6869
  }) {
7030
- return /* @__PURE__ */ jsx73(PopoverPrimitive2.Root, { "data-slot": "popover", ...props });
6870
+ return /* @__PURE__ */ jsx75(PopoverPrimitive2.Root, { "data-slot": "popover", ...props });
7031
6871
  }
7032
6872
  function PopoverTrigger2({
7033
6873
  ...props
7034
6874
  }) {
7035
- return /* @__PURE__ */ jsx73(PopoverPrimitive2.Trigger, { "data-slot": "popover-trigger", ...props });
6875
+ return /* @__PURE__ */ jsx75(PopoverPrimitive2.Trigger, { "data-slot": "popover-trigger", ...props });
7036
6876
  }
7037
6877
  function PopoverContent2({
7038
6878
  className,
@@ -7040,7 +6880,7 @@ function PopoverContent2({
7040
6880
  sideOffset = 4,
7041
6881
  ...props
7042
6882
  }) {
7043
- return /* @__PURE__ */ jsx73(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx73(
6883
+ return /* @__PURE__ */ jsx75(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx75(
7044
6884
  PopoverPrimitive2.Content,
7045
6885
  {
7046
6886
  "data-slot": "popover-content",
@@ -7056,10 +6896,10 @@ function PopoverContent2({
7056
6896
  }
7057
6897
 
7058
6898
  // src/components/tiptap-ui/font-family-dropdown/font-family-dropdown.tsx
7059
- import { jsx as jsx74, jsxs as jsxs43 } from "react/jsx-runtime";
6899
+ import { jsx as jsx76, jsxs as jsxs45 } from "react/jsx-runtime";
7060
6900
  function FontFamilyDropdown() {
7061
6901
  const { editor } = useCurrentEditor3();
7062
- const [open, setOpen] = useState25(false);
6902
+ const [open, setOpen] = useState28(false);
7063
6903
  if (!editor) return null;
7064
6904
  const currentFont = editor.getAttributes("textStyle").fontFamily || "Font Family";
7065
6905
  const applyFont = (family) => {
@@ -7077,19 +6917,19 @@ function FontFamilyDropdown() {
7077
6917
  }
7078
6918
  }, 0);
7079
6919
  };
7080
- return /* @__PURE__ */ jsxs43(Popover2, { open, onOpenChange: setOpen, children: [
7081
- /* @__PURE__ */ jsx74(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs43(
6920
+ return /* @__PURE__ */ jsxs45(Popover2, { open, onOpenChange: setOpen, children: [
6921
+ /* @__PURE__ */ jsx76(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs45(
7082
6922
  Button,
7083
6923
  {
7084
6924
  variant: "outlineFontFamily",
7085
6925
  className: "\r\n min-w-[90px] h-7 px-2 flex items-center justify-between rounded-sm\r\n border-[#a3a3a8] text-[#a3a3a8]\r\n hover:border-[#000] hover:text-[#fff] transition-colors\r\n ",
7086
6926
  children: [
7087
6927
  currentFont,
7088
- /* @__PURE__ */ jsx74(ChevronDown, { className: "w-4 h-4" })
6928
+ /* @__PURE__ */ jsx76(ChevronDown, { className: "w-4 h-4" })
7089
6929
  ]
7090
6930
  }
7091
6931
  ) }),
7092
- /* @__PURE__ */ jsx74(
6932
+ /* @__PURE__ */ jsx76(
7093
6933
  PopoverContent2,
7094
6934
  {
7095
6935
  className: "w-[300px] p-0",
@@ -7100,12 +6940,12 @@ function FontFamilyDropdown() {
7100
6940
  e.preventDefault();
7101
6941
  }
7102
6942
  },
7103
- children: /* @__PURE__ */ jsxs43(Command, { children: [
7104
- /* @__PURE__ */ jsx74("div", { className: "cmd-input-wrapper", children: /* @__PURE__ */ jsx74(CommandInput, { placeholder: "Search font..." }) }),
7105
- /* @__PURE__ */ jsxs43(CommandList, { className: "max-h-[220px]", children: [
7106
- /* @__PURE__ */ jsx74(CommandEmpty, { children: "No font found." }),
7107
- /* @__PURE__ */ jsxs43(CommandGroup, { children: [
7108
- /* @__PURE__ */ jsx74(
6943
+ children: /* @__PURE__ */ jsxs45(Command, { children: [
6944
+ /* @__PURE__ */ jsx76("div", { className: "cmd-input-wrapper", children: /* @__PURE__ */ jsx76(CommandInput, { placeholder: "Search font..." }) }),
6945
+ /* @__PURE__ */ jsxs45(CommandList, { className: "max-h-[220px]", children: [
6946
+ /* @__PURE__ */ jsx76(CommandEmpty, { children: "No font found." }),
6947
+ /* @__PURE__ */ jsxs45(CommandGroup, { children: [
6948
+ /* @__PURE__ */ jsx76(
7109
6949
  CommandItem,
7110
6950
  {
7111
6951
  onSelect: () => {
@@ -7128,7 +6968,7 @@ function FontFamilyDropdown() {
7128
6968
  },
7129
6969
  "default"
7130
6970
  ),
7131
- FONT_OPTIONS.map(({ label, cssFontFamily }) => /* @__PURE__ */ jsx74(
6971
+ FONT_OPTIONS.map(({ label, cssFontFamily }) => /* @__PURE__ */ jsx76(
7132
6972
  CommandItem,
7133
6973
  {
7134
6974
  onSelect: () => {
@@ -7149,7 +6989,7 @@ function FontFamilyDropdown() {
7149
6989
  }
7150
6990
 
7151
6991
  // src/components/tiptap-ui/color-picker/color-picker.tsx
7152
- import { useState as useState26, useEffect as useEffect18 } from "react";
6992
+ import { useState as useState29, useEffect as useEffect18 } from "react";
7153
6993
  import { useCurrentEditor as useCurrentEditor4 } from "@tiptap/react";
7154
6994
  import { HexColorPicker } from "react-colorful";
7155
6995
 
@@ -7239,12 +7079,12 @@ import { debounce } from "lodash";
7239
7079
 
7240
7080
  // src/components/ui/label.tsx
7241
7081
  import * as LabelPrimitive from "@radix-ui/react-label";
7242
- import { jsx as jsx75 } from "react/jsx-runtime";
7243
- function Label2({
7082
+ import { jsx as jsx77 } from "react/jsx-runtime";
7083
+ function Label({
7244
7084
  className,
7245
7085
  ...props
7246
7086
  }) {
7247
- return /* @__PURE__ */ jsx75(
7087
+ return /* @__PURE__ */ jsx77(
7248
7088
  LabelPrimitive.Root,
7249
7089
  {
7250
7090
  "data-slot": "label",
@@ -7259,14 +7099,14 @@ function Label2({
7259
7099
 
7260
7100
  // src/components/tiptap-ui/color-picker/color-picker.tsx
7261
7101
  import React4 from "react";
7262
- import { jsx as jsx76, jsxs as jsxs44 } from "react/jsx-runtime";
7102
+ import { jsx as jsx78, jsxs as jsxs46 } from "react/jsx-runtime";
7263
7103
  function ColorPicker({ type = "text" }) {
7264
7104
  const { editor } = useCurrentEditor4();
7265
- const [open, setOpen] = useState26(false);
7266
- const [color, setColor] = useState26("#000000");
7267
- const [showCustom, setShowCustom] = useState26(false);
7268
- const [tempHex, setTempHex] = useState26("#000000");
7269
- const [canApply, setCanApply] = useState26(false);
7105
+ const [open, setOpen] = useState29(false);
7106
+ const [color, setColor] = useState29("#000000");
7107
+ const [showCustom, setShowCustom] = useState29(false);
7108
+ const [tempHex, setTempHex] = useState29("#000000");
7109
+ const [canApply, setCanApply] = useState29(false);
7270
7110
  useEffect18(() => {
7271
7111
  const current = type === "text" ? editor?.getAttributes("textStyle").color || "#000000" : editor?.getAttributes("highlight")?.color || "#FFFF00";
7272
7112
  setColor(current);
@@ -7309,15 +7149,15 @@ function ColorPicker({ type = "text" }) {
7309
7149
  []
7310
7150
  );
7311
7151
  if (!editor) return null;
7312
- return /* @__PURE__ */ jsxs44(Popover2, { open, onOpenChange: (v) => setOpen(v), children: [
7313
- /* @__PURE__ */ jsx76(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs44(
7152
+ return /* @__PURE__ */ jsxs46(Popover2, { open, onOpenChange: (v) => setOpen(v), children: [
7153
+ /* @__PURE__ */ jsx78(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs46(
7314
7154
  Button,
7315
7155
  {
7316
7156
  variant: "outlineFontFamily",
7317
7157
  className: "flex items-center h-7 rounded-sm px-2 border-[#a3a3a8] text-[#a3a3a8] hover:text-white",
7318
7158
  children: [
7319
7159
  "Color",
7320
- /* @__PURE__ */ jsx76(
7160
+ /* @__PURE__ */ jsx78(
7321
7161
  "span",
7322
7162
  {
7323
7163
  className: "w-3 h-3 ml-2 rounded-sm border border-black/20",
@@ -7327,16 +7167,16 @@ function ColorPicker({ type = "text" }) {
7327
7167
  ]
7328
7168
  }
7329
7169
  ) }),
7330
- /* @__PURE__ */ jsxs44(
7170
+ /* @__PURE__ */ jsxs46(
7331
7171
  PopoverContent2,
7332
7172
  {
7333
7173
  className: "w-[260px] p-3",
7334
7174
  align: "start",
7335
7175
  onClick: (e) => e.stopPropagation(),
7336
7176
  children: [
7337
- /* @__PURE__ */ jsx76(Label2, { className: "text-xs mb-2", children: type === "text" ? "Text Color" : "Highlight Color" }),
7338
- !showCustom && /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-3", children: [
7339
- /* @__PURE__ */ jsx76("div", { className: "grid grid-cols-7 gap-1", children: GRADIENT_ROWS_70.map((c) => /* @__PURE__ */ jsx76(
7177
+ /* @__PURE__ */ jsx78(Label, { className: "text-xs mb-2", children: type === "text" ? "Text Color" : "Highlight Color" }),
7178
+ !showCustom && /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-3", children: [
7179
+ /* @__PURE__ */ jsx78("div", { className: "grid grid-cols-7 gap-1", children: GRADIENT_ROWS_70.map((c) => /* @__PURE__ */ jsx78(
7340
7180
  "div",
7341
7181
  {
7342
7182
  onClick: () => {
@@ -7348,7 +7188,7 @@ function ColorPicker({ type = "text" }) {
7348
7188
  },
7349
7189
  c
7350
7190
  )) }),
7351
- /* @__PURE__ */ jsx76(
7191
+ /* @__PURE__ */ jsx78(
7352
7192
  Button,
7353
7193
  {
7354
7194
  size: "sm",
@@ -7362,7 +7202,7 @@ function ColorPicker({ type = "text" }) {
7362
7202
  )
7363
7203
  ] }),
7364
7204
  showCustom && // stop mouse/pointer events from bubbling so popover doesn't treat them as outside clicks
7365
- /* @__PURE__ */ jsxs44(
7205
+ /* @__PURE__ */ jsxs46(
7366
7206
  "div",
7367
7207
  {
7368
7208
  className: "flex flex-col gap-3",
@@ -7372,7 +7212,7 @@ function ColorPicker({ type = "text" }) {
7372
7212
  onPointerUp: (e) => e.stopPropagation(),
7373
7213
  onClick: (e) => e.stopPropagation(),
7374
7214
  children: [
7375
- /* @__PURE__ */ jsx76(
7215
+ /* @__PURE__ */ jsx78(
7376
7216
  HexColorPicker,
7377
7217
  {
7378
7218
  color: tempHex,
@@ -7383,8 +7223,8 @@ function ColorPicker({ type = "text" }) {
7383
7223
  onMouseUp: (e) => e.stopPropagation()
7384
7224
  }
7385
7225
  ),
7386
- /* @__PURE__ */ jsxs44("div", { className: "flex gap-2 items-center", children: [
7387
- /* @__PURE__ */ jsx76(
7226
+ /* @__PURE__ */ jsxs46("div", { className: "flex gap-2 items-center", children: [
7227
+ /* @__PURE__ */ jsx78(
7388
7228
  "input",
7389
7229
  {
7390
7230
  value: tempHex,
@@ -7395,7 +7235,7 @@ function ColorPicker({ type = "text" }) {
7395
7235
  className: "w-full px-2 py-1 border rounded text-sm"
7396
7236
  }
7397
7237
  ),
7398
- /* @__PURE__ */ jsx76(
7238
+ /* @__PURE__ */ jsx78(
7399
7239
  Button,
7400
7240
  {
7401
7241
  size: "sm",
@@ -7408,7 +7248,7 @@ function ColorPicker({ type = "text" }) {
7408
7248
  }
7409
7249
  )
7410
7250
  ] }),
7411
- /* @__PURE__ */ jsx76("div", { className: "flex justify-end mt-2", children: /* @__PURE__ */ jsx76(
7251
+ /* @__PURE__ */ jsx78("div", { className: "flex justify-end mt-2", children: /* @__PURE__ */ jsx78(
7412
7252
  Button,
7413
7253
  {
7414
7254
  size: "sm",
@@ -7433,13 +7273,13 @@ function ColorPicker({ type = "text" }) {
7433
7273
  }
7434
7274
 
7435
7275
  // src/components/tiptap-ui/table-dropdown-menu/table-dropdown-menu.tsx
7436
- import { useState as useState27 } from "react";
7276
+ import { useState as useState30 } from "react";
7437
7277
  import { useCurrentEditor as useCurrentEditor5 } from "@tiptap/react";
7438
7278
  import { FiTable } from "react-icons/fi";
7439
- import { jsx as jsx77, jsxs as jsxs45 } from "react/jsx-runtime";
7279
+ import { jsx as jsx79, jsxs as jsxs47 } from "react/jsx-runtime";
7440
7280
  function TableDropdownMenu() {
7441
7281
  const { editor } = useCurrentEditor5();
7442
- const [open, setOpen] = useState27(false);
7282
+ const [open, setOpen] = useState30(false);
7443
7283
  if (!editor) return null;
7444
7284
  const handleAction = (action) => {
7445
7285
  switch (action) {
@@ -7478,31 +7318,31 @@ function TableDropdownMenu() {
7478
7318
  }
7479
7319
  setOpen(false);
7480
7320
  };
7481
- return /* @__PURE__ */ jsxs45(Popover2, { open, onOpenChange: setOpen, children: [
7482
- /* @__PURE__ */ jsx77(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx77(Button, { variant: "tableButton", size: "sm", children: /* @__PURE__ */ jsx77(FiTable, { size: 16, color: "#a3a3a8" }) }) }),
7483
- /* @__PURE__ */ jsx77(PopoverContent2, { className: "w-[220px] p-0", align: "start", children: /* @__PURE__ */ jsxs45(Command, { children: [
7484
- /* @__PURE__ */ jsx77(CommandInput, { placeholder: "Search table actions..." }),
7485
- /* @__PURE__ */ jsx77(CommandList, { className: "max-h-[260px]", children: /* @__PURE__ */ jsxs45(CommandGroup, { children: [
7486
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("insert"), children: "Insert Table" }),
7487
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("addColBefore"), children: "Add Column Before" }),
7488
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("addColAfter"), children: "Add Column After" }),
7489
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("delCol"), children: "Delete Column" }),
7490
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("addRowBefore"), children: "Add Row Before" }),
7491
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("addRowAfter"), children: "Add Row After" }),
7492
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("delRow"), children: "Delete Row" }),
7493
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("merge"), children: "Merge Cells" }),
7494
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("split"), children: "Split Cells" }),
7495
- /* @__PURE__ */ jsx77(CommandItem, { onSelect: () => handleAction("deleteTable"), children: "Delete Table" })
7321
+ return /* @__PURE__ */ jsxs47(Popover2, { open, onOpenChange: setOpen, children: [
7322
+ /* @__PURE__ */ jsx79(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx79(Button, { variant: "tableButton", size: "sm", children: /* @__PURE__ */ jsx79(FiTable, { size: 16, color: "#a3a3a8" }) }) }),
7323
+ /* @__PURE__ */ jsx79(PopoverContent2, { className: "w-[220px] p-0", align: "start", children: /* @__PURE__ */ jsxs47(Command, { children: [
7324
+ /* @__PURE__ */ jsx79(CommandInput, { placeholder: "Search table actions..." }),
7325
+ /* @__PURE__ */ jsx79(CommandList, { className: "max-h-[260px]", children: /* @__PURE__ */ jsxs47(CommandGroup, { children: [
7326
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("insert"), children: "Insert Table" }),
7327
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addColBefore"), children: "Add Column Before" }),
7328
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addColAfter"), children: "Add Column After" }),
7329
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("delCol"), children: "Delete Column" }),
7330
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addRowBefore"), children: "Add Row Before" }),
7331
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("addRowAfter"), children: "Add Row After" }),
7332
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("delRow"), children: "Delete Row" }),
7333
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("merge"), children: "Merge Cells" }),
7334
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("split"), children: "Split Cells" }),
7335
+ /* @__PURE__ */ jsx79(CommandItem, { onSelect: () => handleAction("deleteTable"), children: "Delete Table" })
7496
7336
  ] }) })
7497
7337
  ] }) })
7498
7338
  ] });
7499
7339
  }
7500
7340
 
7501
7341
  // src/components/tiptap-icons/arrow-left-icon.tsx
7502
- import { memo as memo35 } from "react";
7503
- import { jsx as jsx78 } from "react/jsx-runtime";
7504
- var ArrowLeftIcon = memo35(({ className, ...props }) => {
7505
- return /* @__PURE__ */ jsx78(
7342
+ import { memo as memo39 } from "react";
7343
+ import { jsx as jsx80 } from "react/jsx-runtime";
7344
+ var ArrowLeftIcon = memo39(({ className, ...props }) => {
7345
+ return /* @__PURE__ */ jsx80(
7506
7346
  "svg",
7507
7347
  {
7508
7348
  width: "24",
@@ -7512,7 +7352,7 @@ var ArrowLeftIcon = memo35(({ className, ...props }) => {
7512
7352
  fill: "currentColor",
7513
7353
  xmlns: "http://www.w3.org/2000/svg",
7514
7354
  ...props,
7515
- children: /* @__PURE__ */ jsx78(
7355
+ children: /* @__PURE__ */ jsx80(
7516
7356
  "path",
7517
7357
  {
7518
7358
  d: "M12.7071 5.70711C13.0976 5.31658 13.0976 4.68342 12.7071 4.29289C12.3166 3.90237 11.6834 3.90237 11.2929 4.29289L4.29289 11.2929C3.90237 11.6834 3.90237 12.3166 4.29289 12.7071L11.2929 19.7071C11.6834 20.0976 12.3166 20.0976 12.7071 19.7071C13.0976 19.3166 13.0976 18.6834 12.7071 18.2929L7.41421 13L19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11L7.41421 11L12.7071 5.70711Z",
@@ -7525,15 +7365,15 @@ var ArrowLeftIcon = memo35(({ className, ...props }) => {
7525
7365
  ArrowLeftIcon.displayName = "ArrowLeftIcon";
7526
7366
 
7527
7367
  // src/hooks/use-window-size.ts
7528
- import { useEffect as useEffect20, useState as useState28 } from "react";
7368
+ import { useEffect as useEffect20, useState as useState31 } from "react";
7529
7369
 
7530
7370
  // src/hooks/use-throttled-callback.ts
7531
7371
  import throttle from "lodash.throttle";
7532
7372
 
7533
7373
  // src/hooks/use-unmount.ts
7534
- import { useRef as useRef7, useEffect as useEffect19 } from "react";
7374
+ import { useRef as useRef6, useEffect as useEffect19 } from "react";
7535
7375
  var useUnmount = (callback) => {
7536
- const ref = useRef7(callback);
7376
+ const ref = useRef6(callback);
7537
7377
  ref.current = callback;
7538
7378
  useEffect19(
7539
7379
  () => () => {
@@ -7544,13 +7384,13 @@ var useUnmount = (callback) => {
7544
7384
  };
7545
7385
 
7546
7386
  // src/hooks/use-throttled-callback.ts
7547
- import { useMemo as useMemo10 } from "react";
7387
+ import { useMemo as useMemo9 } from "react";
7548
7388
  var defaultOptions = {
7549
7389
  leading: false,
7550
7390
  trailing: true
7551
7391
  };
7552
7392
  function useThrottledCallback(fn, wait = 250, dependencies = [], options = defaultOptions) {
7553
- const handler = useMemo10(
7393
+ const handler = useMemo9(
7554
7394
  () => throttle(fn, wait, options),
7555
7395
  // eslint-disable-next-line react-hooks/exhaustive-deps
7556
7396
  dependencies
@@ -7563,7 +7403,7 @@ function useThrottledCallback(fn, wait = 250, dependencies = [], options = defau
7563
7403
 
7564
7404
  // src/hooks/use-window-size.ts
7565
7405
  function useWindowSize() {
7566
- const [windowSize, setWindowSize] = useState28({
7406
+ const [windowSize, setWindowSize] = useState31({
7567
7407
  width: 0,
7568
7408
  height: 0,
7569
7409
  offsetTop: 0,
@@ -7601,7 +7441,7 @@ function useWindowSize() {
7601
7441
  }
7602
7442
 
7603
7443
  // src/hooks/use-element-rect.ts
7604
- import { useCallback as useCallback26, useEffect as useEffect21, useState as useState29 } from "react";
7444
+ import { useCallback as useCallback28, useEffect as useEffect21, useState as useState32 } from "react";
7605
7445
  var initialRect = {
7606
7446
  x: 0,
7607
7447
  y: 0,
@@ -7621,8 +7461,8 @@ function useElementRect({
7621
7461
  throttleMs = 100,
7622
7462
  useResizeObserver = true
7623
7463
  } = {}) {
7624
- const [rect, setRect] = useState29(initialRect);
7625
- const getTargetElement = useCallback26(() => {
7464
+ const [rect, setRect] = useState32(initialRect);
7465
+ const getTargetElement = useCallback28(() => {
7626
7466
  if (!enabled || !isClientSide()) return null;
7627
7467
  if (!element) {
7628
7468
  return document.body;
@@ -7738,71 +7578,71 @@ function useCursorVisibility({
7738
7578
  }
7739
7579
 
7740
7580
  // src/components/tiptap-templates/simple/simple-editor.tsx
7741
- import { Fragment as Fragment11, jsx as jsx79, jsxs as jsxs46 } from "react/jsx-runtime";
7581
+ import { Fragment as Fragment12, jsx as jsx81, jsxs as jsxs48 } from "react/jsx-runtime";
7742
7582
  var MainToolbarContent = ({
7743
7583
  onHighlighterClick,
7744
7584
  onLinkClick,
7745
7585
  isMobile
7746
7586
  }) => {
7747
- return /* @__PURE__ */ jsxs46(Fragment11, { children: [
7748
- /* @__PURE__ */ jsx79(Spacer, {}),
7749
- /* @__PURE__ */ jsx79(FontFamilyDropdown, {}),
7750
- /* @__PURE__ */ jsx79(ColorPicker, { type: "text" }),
7751
- /* @__PURE__ */ jsxs46(ToolbarGroup, { children: [
7752
- /* @__PURE__ */ jsx79(MarkButton, { type: "bold" }),
7753
- /* @__PURE__ */ jsx79(MarkButton, { type: "italic" }),
7754
- /* @__PURE__ */ jsx79(MarkButton, { type: "strike" }),
7755
- /* @__PURE__ */ jsx79(MarkButton, { type: "code" }),
7756
- /* @__PURE__ */ jsx79(MarkButton, { type: "underline" }),
7757
- /* @__PURE__ */ jsx79(UndoRedoButton, { action: "undo" }),
7758
- /* @__PURE__ */ jsx79(UndoRedoButton, { action: "redo" })
7587
+ return /* @__PURE__ */ jsxs48(Fragment12, { children: [
7588
+ /* @__PURE__ */ jsx81(Spacer, {}),
7589
+ /* @__PURE__ */ jsx81(FontFamilyDropdown, {}),
7590
+ /* @__PURE__ */ jsx81(ColorPicker, { type: "text" }),
7591
+ /* @__PURE__ */ jsxs48(ToolbarGroup, { children: [
7592
+ /* @__PURE__ */ jsx81(MarkButton, { type: "bold" }),
7593
+ /* @__PURE__ */ jsx81(MarkButton, { type: "italic" }),
7594
+ /* @__PURE__ */ jsx81(MarkButton, { type: "strike" }),
7595
+ /* @__PURE__ */ jsx81(MarkButton, { type: "code" }),
7596
+ /* @__PURE__ */ jsx81(MarkButton, { type: "underline" }),
7597
+ /* @__PURE__ */ jsx81(UndoRedoButton, { action: "undo" }),
7598
+ /* @__PURE__ */ jsx81(UndoRedoButton, { action: "redo" })
7759
7599
  ] }),
7760
- /* @__PURE__ */ jsx79(ToolbarSeparator, {}),
7761
- /* @__PURE__ */ jsxs46(ToolbarGroup, { children: [
7762
- /* @__PURE__ */ jsx79(TextAlignButton, { align: "left" }),
7763
- /* @__PURE__ */ jsx79(TextAlignButton, { align: "center" }),
7764
- /* @__PURE__ */ jsx79(TextAlignButton, { align: "right" }),
7765
- /* @__PURE__ */ jsx79(TextAlignButton, { align: "justify" })
7600
+ /* @__PURE__ */ jsx81(ToolbarSeparator, {}),
7601
+ /* @__PURE__ */ jsxs48(ToolbarGroup, { children: [
7602
+ /* @__PURE__ */ jsx81(TextAlignButton, { align: "left" }),
7603
+ /* @__PURE__ */ jsx81(TextAlignButton, { align: "center" }),
7604
+ /* @__PURE__ */ jsx81(TextAlignButton, { align: "right" }),
7605
+ /* @__PURE__ */ jsx81(TextAlignButton, { align: "justify" })
7766
7606
  ] }),
7767
- /* @__PURE__ */ jsx79(ToolbarSeparator, {}),
7768
- /* @__PURE__ */ jsxs46(ToolbarGroup, { children: [
7769
- /* @__PURE__ */ jsx79(HeadingDropdownMenu, { levels: [1, 2, 3, 4], portal: isMobile }),
7770
- /* @__PURE__ */ jsx79(
7607
+ /* @__PURE__ */ jsx81(ToolbarSeparator, {}),
7608
+ /* @__PURE__ */ jsxs48(ToolbarGroup, { children: [
7609
+ /* @__PURE__ */ jsx81(HeadingDropdownMenu, { levels: [1, 2, 3, 4], portal: isMobile }),
7610
+ /* @__PURE__ */ jsx81(
7771
7611
  ListDropdownMenu,
7772
7612
  {
7773
7613
  types: ["bulletList", "orderedList", "taskList"],
7774
7614
  portal: isMobile
7775
7615
  }
7776
7616
  ),
7777
- /* @__PURE__ */ jsx79(BlockquoteButton, {})
7617
+ /* @__PURE__ */ jsx81(BlockquoteButton, {})
7778
7618
  ] }),
7779
- /* @__PURE__ */ jsx79(ToolbarGroup, { children: /* @__PURE__ */ jsx79(TableDropdownMenu, {}) }),
7780
- /* @__PURE__ */ jsx79(ToolbarGroup, {}),
7781
- /* @__PURE__ */ jsx79(ToolbarSeparator, {}),
7782
- /* @__PURE__ */ jsx79(ToolbarGroup, { children: /* @__PURE__ */ jsx79(ImageUploadButton, { text: "Add" }) }),
7783
- /* @__PURE__ */ jsx79(Spacer, {}),
7784
- isMobile && /* @__PURE__ */ jsx79(ToolbarSeparator, {})
7619
+ /* @__PURE__ */ jsx81(ToolbarGroup, { children: /* @__PURE__ */ jsx81(TableDropdownMenu, {}) }),
7620
+ /* @__PURE__ */ jsx81(ToolbarGroup, {}),
7621
+ /* @__PURE__ */ jsx81(ToolbarSeparator, {}),
7622
+ /* @__PURE__ */ jsx81(ToolbarGroup, { children: /* @__PURE__ */ jsx81(ImageUploadButton, { text: "Add" }) }),
7623
+ /* @__PURE__ */ jsx81(Spacer, {}),
7624
+ isMobile && /* @__PURE__ */ jsx81(ToolbarSeparator, {})
7785
7625
  ] });
7786
7626
  };
7787
7627
  var MobileToolbarContent = ({
7788
7628
  type,
7789
7629
  onBack
7790
- }) => /* @__PURE__ */ jsxs46(Fragment11, { children: [
7791
- /* @__PURE__ */ jsx79(ToolbarGroup, { children: /* @__PURE__ */ jsxs46(Button2, { "data-style": "ghost", onClick: onBack, children: [
7792
- /* @__PURE__ */ jsx79(ArrowLeftIcon, { className: "tiptap-button-icon" }),
7793
- type === "highlighter" ? /* @__PURE__ */ jsx79(HighlighterIcon, { className: "tiptap-button-icon" }) : /* @__PURE__ */ jsx79(LinkIcon, { className: "tiptap-button-icon" })
7630
+ }) => /* @__PURE__ */ jsxs48(Fragment12, { children: [
7631
+ /* @__PURE__ */ jsx81(ToolbarGroup, { children: /* @__PURE__ */ jsxs48(Button2, { "data-style": "ghost", onClick: onBack, children: [
7632
+ /* @__PURE__ */ jsx81(ArrowLeftIcon, { className: "tiptap-button-icon" }),
7633
+ type === "highlighter" ? /* @__PURE__ */ jsx81(HighlighterIcon, { className: "tiptap-button-icon" }) : /* @__PURE__ */ jsx81(LinkIcon, { className: "tiptap-button-icon" })
7794
7634
  ] }) }),
7795
- /* @__PURE__ */ jsx79(ToolbarSeparator, {}),
7796
- type === "highlighter" ? /* @__PURE__ */ jsx79(ColorHighlightPopoverContent, {}) : /* @__PURE__ */ jsx79(LinkContent, {})
7635
+ /* @__PURE__ */ jsx81(ToolbarSeparator, {}),
7636
+ type === "highlighter" ? /* @__PURE__ */ jsx81(ColorHighlightPopoverContent, {}) : /* @__PURE__ */ jsx81(LinkContent, {})
7797
7637
  ] });
7798
7638
  function SimpleEditor() {
7799
7639
  const { setEditorContent, debouncedSave } = useEditorBridge();
7800
7640
  const isMobile = useIsBreakpoint();
7801
7641
  const { height } = useWindowSize();
7802
- const [mobileView, setMobileView] = useState30(
7642
+ const [mobileView, setMobileView] = useState33(
7803
7643
  "main"
7804
7644
  );
7805
- const toolbarRef = useRef8(null);
7645
+ const toolbarRef = useRef7(null);
7806
7646
  const editor = useEditor({
7807
7647
  immediatelyRender: false,
7808
7648
  editorProps: {
@@ -7903,8 +7743,8 @@ function SimpleEditor() {
7903
7743
  window.visualViewport?.removeEventListener("scroll", updatePosition);
7904
7744
  };
7905
7745
  }, []);
7906
- return /* @__PURE__ */ jsx79("div", { className: "simple-editor-wrapper", children: /* @__PURE__ */ jsxs46(EditorContext.Provider, { value: { editor }, children: [
7907
- /* @__PURE__ */ jsx79(
7746
+ return /* @__PURE__ */ jsx81("div", { className: "simple-editor-wrapper", children: /* @__PURE__ */ jsxs48(EditorContext.Provider, { value: { editor }, children: [
7747
+ /* @__PURE__ */ jsx81(
7908
7748
  Toolbar,
7909
7749
  {
7910
7750
  ref: toolbarRef,
@@ -7913,14 +7753,14 @@ function SimpleEditor() {
7913
7753
  bottom: `calc(100% - ${height - rect.y}px)`
7914
7754
  } : {}
7915
7755
  },
7916
- children: mobileView === "main" ? /* @__PURE__ */ jsx79(
7756
+ children: mobileView === "main" ? /* @__PURE__ */ jsx81(
7917
7757
  MainToolbarContent,
7918
7758
  {
7919
7759
  onHighlighterClick: () => setMobileView("highlighter"),
7920
7760
  onLinkClick: () => setMobileView("link"),
7921
7761
  isMobile
7922
7762
  }
7923
- ) : /* @__PURE__ */ jsx79(
7763
+ ) : /* @__PURE__ */ jsx81(
7924
7764
  MobileToolbarContent,
7925
7765
  {
7926
7766
  type: mobileView === "highlighter" ? "highlighter" : "link",
@@ -7929,14 +7769,14 @@ function SimpleEditor() {
7929
7769
  )
7930
7770
  }
7931
7771
  ),
7932
- /* @__PURE__ */ jsx79(
7772
+ /* @__PURE__ */ jsx81(
7933
7773
  EditorContent,
7934
7774
  {
7935
7775
  editor,
7936
7776
  role: "presentation",
7937
7777
  autoFocus: true,
7938
7778
  className: "simple-editor-content",
7939
- children: editor && /* @__PURE__ */ jsx79(BubbleMenuInline, {})
7779
+ children: editor && /* @__PURE__ */ jsx81(BubbleMenuInline, {})
7940
7780
  }
7941
7781
  )
7942
7782
  ] }) });
@@ -7944,9 +7784,9 @@ function SimpleEditor() {
7944
7784
 
7945
7785
  // src/components/editor/editor.tsx
7946
7786
  import clsx2 from "clsx";
7947
- import { jsx as jsx80 } from "react/jsx-runtime";
7787
+ import { jsx as jsx82 } from "react/jsx-runtime";
7948
7788
  function Editor({ onChange, className, style, onTabsChange, initialTabs }) {
7949
- return /* @__PURE__ */ jsx80(
7789
+ return /* @__PURE__ */ jsx82(
7950
7790
  "div",
7951
7791
  {
7952
7792
  className: clsx2(
@@ -7954,16 +7794,16 @@ function Editor({ onChange, className, style, onTabsChange, initialTabs }) {
7954
7794
  className
7955
7795
  ),
7956
7796
  style,
7957
- children: /* @__PURE__ */ jsx80(EditorShell, { children: /* @__PURE__ */ jsx80(EditorLayout, { onChange, initialTabs, onTabsChange, children: /* @__PURE__ */ jsx80(SimpleEditor, {}) }) })
7797
+ children: /* @__PURE__ */ jsx82(EditorShell, { children: /* @__PURE__ */ jsx82(EditorLayout, { onChange, initialTabs, onTabsChange, children: /* @__PURE__ */ jsx82(SimpleEditor, {}) }) })
7958
7798
  }
7959
7799
  );
7960
7800
  }
7961
7801
 
7962
7802
  // src/hooks/use-scrolling.ts
7963
- import { useEffect as useEffect24, useState as useState31 } from "react";
7803
+ import { useEffect as useEffect24, useState as useState34 } from "react";
7964
7804
  function useScrolling(target, options = {}) {
7965
7805
  const { debounce: debounce2 = 150, fallbackToDocument = true } = options;
7966
- const [isScrolling, setIsScrolling] = useState31(false);
7806
+ const [isScrolling, setIsScrolling] = useState34(false);
7967
7807
  useEffect24(() => {
7968
7808
  const element = target && typeof Window !== "undefined" && target instanceof Window ? target : target?.current ?? window;
7969
7809
  const eventTarget = fallbackToDocument && element === window && typeof document !== "undefined" ? document : element;