@underverse-ui/underverse 1.0.193 → 1.0.194

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.cjs CHANGED
@@ -14499,7 +14499,7 @@ function Calendar4({
14499
14499
  xl: { cell: dense ? "min-h-48" : "min-h-52", day: "text-xl" }
14500
14500
  };
14501
14501
  const cellSz = CELL_EVENT_STYLES[size];
14502
- const VARIANT_STYLES2 = {
14502
+ const VARIANT_STYLES = {
14503
14503
  default: "border border-border/60 rounded-2xl md:rounded-3xl bg-linear-to-br from-card via-card to-card/95 shadow-sm backdrop-blur-sm",
14504
14504
  bordered: "border-2 border-border/70 rounded-2xl md:rounded-3xl bg-linear-to-br from-card via-card to-card/95 shadow-md hover:shadow-lg transition-shadow duration-300",
14505
14505
  card: "border border-border/50 rounded-3xl bg-linear-to-br from-card via-background/95 to-card shadow-lg hover:shadow-xl transition-shadow duration-300 backdrop-blur-md",
@@ -27447,17 +27447,35 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
27447
27447
  var NotificationModal_default = NotificationModal;
27448
27448
 
27449
27449
  // src/components/AccessDenied.tsx
27450
- var import_lucide_react40 = require("lucide-react");
27450
+ var import_react43 = require("react");
27451
27451
  var import_jsx_runtime75 = require("react/jsx-runtime");
27452
- var VARIANT_STYLES = {
27453
- destructive: { bg: "bg-destructive/5", border: "border-destructive/20", text: "text-destructive" },
27454
- warning: { bg: "bg-warning/5", border: "border-warning/20", text: "text-warning" },
27455
- info: { bg: "bg-info/5", border: "border-info/20", text: "text-info" }
27452
+ var VARIANT_COLOR_VARS = {
27453
+ destructive: "var(--destructive)",
27454
+ warning: "var(--warning)",
27455
+ info: "var(--info)"
27456
27456
  };
27457
- var DEFAULT_ICONS = {
27458
- destructive: import_lucide_react40.ShieldAlert,
27459
- warning: import_lucide_react40.Ban,
27460
- info: import_lucide_react40.Lock
27457
+ var VARIANT_DESIGNS = {
27458
+ destructive: {
27459
+ borderColor: "border-destructive/20 hover:border-destructive/40 focus-within:border-destructive/30",
27460
+ iconBg: "from-destructive/15 to-destructive/5 dark:from-destructive/25 dark:to-destructive/10",
27461
+ iconBorder: "border-destructive/20 group-hover:border-destructive/50",
27462
+ pulseRing: "bg-destructive/10 ring-destructive/5 dark:bg-destructive/20 dark:ring-destructive/10",
27463
+ textColor: "text-destructive"
27464
+ },
27465
+ warning: {
27466
+ borderColor: "border-warning/20 hover:border-warning/40 focus-within:border-warning/30",
27467
+ iconBg: "from-warning/15 to-warning/5 dark:from-warning/25 dark:to-warning/10",
27468
+ iconBorder: "border-warning/20 group-hover:border-warning/50",
27469
+ pulseRing: "bg-warning/10 ring-warning/5 dark:bg-warning/20 dark:ring-warning/10",
27470
+ textColor: "text-warning"
27471
+ },
27472
+ info: {
27473
+ borderColor: "border-info/20 hover:border-info/40 focus-within:border-info/30",
27474
+ iconBg: "from-info/15 to-info/5 dark:from-info/25 dark:to-info/10",
27475
+ iconBorder: "border-info/20 group-hover:border-info/50",
27476
+ pulseRing: "bg-info/10 ring-info/5 dark:bg-info/20 dark:ring-info/10",
27477
+ textColor: "text-info"
27478
+ }
27461
27479
  };
27462
27480
  function AccessDenied({
27463
27481
  title = "Access Restricted",
@@ -27466,30 +27484,278 @@ function AccessDenied({
27466
27484
  icon: Icon,
27467
27485
  className,
27468
27486
  children,
27469
- overflowHidden = true
27487
+ overflowHidden = true,
27488
+ code = "403"
27470
27489
  }) {
27471
- const styles = VARIANT_STYLES[variant];
27472
- const UsedIcon = Icon || DEFAULT_ICONS[variant];
27473
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27490
+ const design = VARIANT_DESIGNS[variant];
27491
+ const colorVar = VARIANT_COLOR_VARS[variant];
27492
+ const reactId = (0, import_react43.useId)();
27493
+ const cleanId = reactId.replace(/:/g, "");
27494
+ const clipId = `white-clip-${cleanId}`;
27495
+ const textId = `text-s-${cleanId}`;
27496
+ const eyeId = `white-eye-${cleanId}`;
27497
+ const tornilloId = `tornillo-${cleanId}`;
27498
+ const svgRef = (0, import_react43.useRef)(null);
27499
+ const [mousePos, setMousePos] = (0, import_react43.useState)({ x: 0, y: 0 });
27500
+ const [eyeCoords, setEyeCoords] = (0, import_react43.useState)({ cx: 130, cy: 65 });
27501
+ const [isHovered, setIsHovered] = (0, import_react43.useState)(false);
27502
+ const handleMouseMove2 = (e) => {
27503
+ const rect = e.currentTarget.getBoundingClientRect();
27504
+ setMousePos({
27505
+ x: e.clientX - rect.left,
27506
+ y: e.clientY - rect.top
27507
+ });
27508
+ };
27509
+ (0, import_react43.useEffect)(() => {
27510
+ const handleGlobalMouseMove = (e) => {
27511
+ if (!svgRef.current) return;
27512
+ const rect = svgRef.current.getBoundingClientRect();
27513
+ const eyeCenterX = rect.left + rect.width * (130 / 260);
27514
+ const eyeCenterY = rect.top + rect.height * (65 / 118.9);
27515
+ const dx = e.clientX - eyeCenterX;
27516
+ const dy = e.clientY - eyeCenterY;
27517
+ const distance = Math.sqrt(dx * dx + dy * dy);
27518
+ const maxShift = 11;
27519
+ let shiftX = 0;
27520
+ let shiftY = 0;
27521
+ if (distance > 0) {
27522
+ const currentShift = Math.min(maxShift, distance / 12);
27523
+ shiftX = dx / distance * currentShift;
27524
+ shiftY = dy / distance * currentShift;
27525
+ }
27526
+ setEyeCoords({
27527
+ cx: 130 + shiftX,
27528
+ cy: 65 + shiftY
27529
+ });
27530
+ };
27531
+ const handleGlobalTouchMove = (e) => {
27532
+ if (e.touches.length > 0 && svgRef.current) {
27533
+ const rect = svgRef.current.getBoundingClientRect();
27534
+ const eyeCenterX = rect.left + rect.width * (130 / 260);
27535
+ const eyeCenterY = rect.top + rect.height * (65 / 118.9);
27536
+ const dx = e.touches[0].clientX - eyeCenterX;
27537
+ const dy = e.touches[0].clientY - eyeCenterY;
27538
+ const distance = Math.sqrt(dx * dx + dy * dy);
27539
+ const maxShift = 11;
27540
+ let shiftX = 0;
27541
+ let shiftY = 0;
27542
+ if (distance > 0) {
27543
+ const currentShift = Math.min(maxShift, distance / 12);
27544
+ shiftX = dx / distance * currentShift;
27545
+ shiftY = dy / distance * currentShift;
27546
+ }
27547
+ setEyeCoords({
27548
+ cx: 130 + shiftX,
27549
+ cy: 65 + shiftY
27550
+ });
27551
+ }
27552
+ };
27553
+ window.addEventListener("mousemove", handleGlobalMouseMove);
27554
+ window.addEventListener("touchmove", handleGlobalTouchMove);
27555
+ return () => {
27556
+ window.removeEventListener("mousemove", handleGlobalMouseMove);
27557
+ window.removeEventListener("touchmove", handleGlobalTouchMove);
27558
+ };
27559
+ }, []);
27560
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
27474
27561
  Card_default,
27475
27562
  {
27476
- className: cn("p-8 text-center shadow-sm", styles.bg, styles.border, className),
27477
- innerClassName: !overflowHidden ? "overflow-visible" : void 0,
27478
- children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
27479
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: cn("p-3 rounded-lg", styles.bg.replace("/5", "/10")), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(UsedIcon, { className: cn("w-8 h-8", styles.text) }) }),
27480
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { children: [
27481
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("h3", { className: cn("font-semibold mb-2", styles.text), children: title }),
27482
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: cn(styles.text.replace("text-", "text-") + "/80", "text-sm"), children: description })
27563
+ className: cn(
27564
+ "relative p-8 md:p-12 text-center shadow-lg transition-all duration-500 ease-out",
27565
+ "bg-linear-to-br from-card/95 via-card/90 to-card/85",
27566
+ "border backdrop-blur-md group/ad",
27567
+ design.borderColor,
27568
+ className
27569
+ ),
27570
+ innerClassName: cn(
27571
+ "relative overflow-hidden",
27572
+ !overflowHidden ? "overflow-visible" : void 0
27573
+ ),
27574
+ onMouseEnter: () => setIsHovered(true),
27575
+ onMouseLeave: () => setIsHovered(false),
27576
+ onMouseMove: handleMouseMove2,
27577
+ children: [
27578
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("style", { dangerouslySetInnerHTML: { __html: `
27579
+ @keyframes ad-float {
27580
+ 0%, 100% { transform: translateY(0); }
27581
+ 50% { transform: translateY(-6px); }
27582
+ }
27583
+ @keyframes ad-drift {
27584
+ 0%, 100% { transform: translate(0, 0) scale(1); }
27585
+ 50% { transform: translate(12%, -8%) scale(1.08); }
27586
+ }
27587
+ @keyframes ad-drift-rev {
27588
+ 0%, 100% { transform: translate(0, 0) scale(1); }
27589
+ 50% { transform: translate(-10%, 12%) scale(0.92); }
27590
+ }
27591
+ @keyframes ad-alarm {
27592
+ 0%, 100% { opacity: 1; }
27593
+ 50% { opacity: 0.35; }
27594
+ }
27595
+ .animate-ad-float {
27596
+ animation: ad-float 5s ease-in-out infinite;
27597
+ }
27598
+ .animate-ad-drift-1 {
27599
+ animation: ad-drift 10s ease-in-out infinite;
27600
+ }
27601
+ .animate-ad-drift-2 {
27602
+ animation: ad-drift-rev 12s ease-in-out infinite;
27603
+ }
27604
+ .animate-ad-alarm {
27605
+ animation: ad-alarm 0.5s ease-in-out infinite;
27606
+ }
27607
+ ` } }),
27608
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "absolute inset-0 pointer-events-none overflow-hidden rounded-2xl md:rounded-3xl", children: [
27609
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27610
+ "div",
27611
+ {
27612
+ className: "absolute -top-24 -left-24 w-64 h-64 rounded-full transition-transform duration-700 ease-out group-hover/ad:scale-110 animate-ad-drift-1",
27613
+ style: {
27614
+ backgroundImage: `radial-gradient(circle at center, color-mix(in oklch, ${colorVar} 25%, transparent) 0%, transparent 70%)`
27615
+ }
27616
+ }
27617
+ ),
27618
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27619
+ "div",
27620
+ {
27621
+ className: "absolute -bottom-20 -right-20 w-48 h-48 rounded-full transition-transform duration-700 ease-out group-hover/ad:scale-105 animate-ad-drift-2",
27622
+ style: {
27623
+ backgroundImage: `radial-gradient(circle at center, color-mix(in oklch, ${colorVar} 15%, transparent) 0%, transparent 70%)`
27624
+ }
27625
+ }
27626
+ )
27483
27627
  ] }),
27484
- children && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "mt-2 flex flex-wrap gap-2 justify-center", children })
27485
- ] })
27628
+ isHovered && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27629
+ "div",
27630
+ {
27631
+ className: "absolute inset-0 pointer-events-none transition-opacity duration-500 opacity-100 rounded-2xl md:rounded-3xl",
27632
+ style: {
27633
+ background: `radial-gradient(350px circle at ${mousePos.x}px ${mousePos.y}px, color-mix(in oklch, ${colorVar} 14%, transparent) 0%, transparent 80%)`
27634
+ }
27635
+ }
27636
+ ),
27637
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27638
+ "div",
27639
+ {
27640
+ className: "absolute inset-0 opacity-[0.03] dark:opacity-[0.06] pointer-events-none transition-opacity duration-300 group-hover/ad:opacity-[0.05] dark:group-hover/ad:opacity-[0.08]",
27641
+ style: {
27642
+ backgroundImage: `radial-gradient(currentColor 1.2px, transparent 1.2px)`,
27643
+ backgroundSize: "20px 20px"
27644
+ }
27645
+ }
27646
+ ),
27647
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "absolute inset-0 select-none flex items-center justify-center pointer-events-none overflow-hidden rounded-2xl md:rounded-3xl z-0", children: [
27648
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "text-[120px] md:text-[180px] font-black tracking-tighter opacity-10 dark:opacity-15 select-none text-muted-foreground/40 dark:text-muted-foreground/30 font-sans", children: code }),
27649
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27650
+ "div",
27651
+ {
27652
+ className: "absolute text-[120px] md:text-[180px] font-black tracking-tighter select-none font-sans",
27653
+ style: {
27654
+ color: colorVar,
27655
+ opacity: isHovered ? 0.75 : 0,
27656
+ transition: "opacity 300ms ease",
27657
+ maskImage: `radial-gradient(120px circle at ${mousePos.x}px ${mousePos.y}px, black, transparent 120px)`,
27658
+ WebkitMaskImage: `radial-gradient(120px circle at ${mousePos.x}px ${mousePos.y}px, black, transparent 120px)`,
27659
+ filter: `drop-shadow(0 0 25px color-mix(in oklch, ${colorVar} 50%, transparent))`
27660
+ },
27661
+ children: code
27662
+ }
27663
+ )
27664
+ ] }),
27665
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "relative z-10 flex flex-col items-center gap-6", children: [
27666
+ Icon ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "relative flex items-center justify-center animate-ad-float", children: [
27667
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27668
+ "div",
27669
+ {
27670
+ className: cn(
27671
+ "absolute w-20 h-20 rounded-full opacity-60 animate-pulse duration-2000 ring-8",
27672
+ design.pulseRing
27673
+ )
27674
+ }
27675
+ ),
27676
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27677
+ "div",
27678
+ {
27679
+ className: cn(
27680
+ "relative flex items-center justify-center p-4 rounded-2xl",
27681
+ "bg-linear-to-b border shadow-md transition-all duration-500 ease-out",
27682
+ "group-hover/ad:rotate-6 group-hover/ad:scale-105 group-hover/ad:shadow-lg",
27683
+ design.iconBg,
27684
+ design.iconBorder
27685
+ ),
27686
+ children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Icon, { className: cn("w-10 h-10 transition-transform duration-500 group-hover/ad:scale-110", design.textColor) })
27687
+ }
27688
+ )
27689
+ ] }) : (
27690
+ /* Interactive Robot Face Illustration */
27691
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "relative w-full max-w-65 h-30 select-none animate-ad-float", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
27692
+ "svg",
27693
+ {
27694
+ ref: svgRef,
27695
+ xmlns: "http://www.w3.org/2000/svg",
27696
+ id: "robot-error",
27697
+ viewBox: "0 0 260 118.9",
27698
+ role: "img",
27699
+ className: "w-full h-full",
27700
+ children: [
27701
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("title", { children: "403 Error" }),
27702
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("defs", { children: [
27703
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("clipPath", { id: clipId, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("circle", { id: eyeId, cx: "130", cy: "65", r: "20" }) }),
27704
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("text", { id: textId, className: "font-sans font-black tracking-tighter", y: "106", style: { fontSize: code.length > 3 ? "80px" : "120px" }, children: code })
27705
+ ] }),
27706
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27707
+ "path",
27708
+ {
27709
+ className: "animate-ad-alarm",
27710
+ fill: variant === "destructive" ? "#e62326" : variant === "warning" ? "var(--warning)" : "var(--info)",
27711
+ d: "M120.9 19.6V9.1c0-5 4.1-9.1 9.1-9.1h0c5 0 9.1 4.1 9.1 9.1v10.6"
27712
+ }
27713
+ ),
27714
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("use", { href: `#${textId}`, x: "-0.5px", y: "-1px", fill: "currentColor", className: "opacity-15 dark:opacity-10 text-muted-foreground" }),
27715
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("use", { href: `#${textId}`, fill: "currentColor", className: "opacity-10 dark:opacity-5 text-muted-foreground" }),
27716
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("g", { id: "robot", children: [
27717
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("g", { id: "eye-wrap", children: [
27718
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("use", { href: `#${eyeId}`, fill: "currentColor", className: "opacity-20 dark:opacity-15 text-muted-foreground" }),
27719
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
27720
+ "circle",
27721
+ {
27722
+ id: "eyef",
27723
+ clipPath: `url(#${clipId})`,
27724
+ fill: "currentColor",
27725
+ className: "text-foreground",
27726
+ stroke: variant === "destructive" ? "#e62326" : variant === "warning" ? "var(--warning)" : "var(--info)",
27727
+ strokeWidth: "2.5",
27728
+ strokeMiterlimit: "10",
27729
+ cx: eyeCoords.cx,
27730
+ cy: eyeCoords.cy,
27731
+ r: "11"
27732
+ }
27733
+ ),
27734
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("ellipse", { fill: "currentColor", className: "opacity-30 dark:opacity-20 text-muted-foreground", cx: "130", cy: "40", rx: "18", ry: "12" })
27735
+ ] }),
27736
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("circle", { className: "opacity-40 dark:opacity-30 text-muted-foreground", fill: "currentColor", cx: "105", cy: "32", r: "2.5", id: tornilloId }),
27737
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("use", { href: `#${tornilloId}`, x: "50" }),
27738
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("use", { href: `#${tornilloId}`, x: "50", y: "60" }),
27739
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("use", { href: `#${tornilloId}`, y: "60" })
27740
+ ] })
27741
+ ]
27742
+ }
27743
+ ) })
27744
+ ),
27745
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "space-y-2.5 max-w-sm mx-auto", children: [
27746
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("h3", { className: "text-xl md:text-2xl font-bold tracking-tight text-foreground transition-colors duration-300", children: title }),
27747
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "text-sm md:text-base text-muted-foreground/80 leading-relaxed font-normal", children: description })
27748
+ ] }),
27749
+ children && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "mt-2 flex flex-wrap gap-3 justify-center items-center relative z-20", children })
27750
+ ] })
27751
+ ]
27486
27752
  }
27487
27753
  );
27488
27754
  }
27489
27755
 
27490
27756
  // src/components/ThemeToggleHeadless.tsx
27491
- var import_lucide_react41 = require("lucide-react");
27492
- var import_react43 = require("react");
27757
+ var import_lucide_react40 = require("lucide-react");
27758
+ var import_react44 = require("react");
27493
27759
  var import_react_dom6 = require("react-dom");
27494
27760
  var import_jsx_runtime76 = require("react/jsx-runtime");
27495
27761
  function ThemeToggleHeadless({
@@ -27498,14 +27764,14 @@ function ThemeToggleHeadless({
27498
27764
  labels,
27499
27765
  className
27500
27766
  }) {
27501
- const [isOpen, setIsOpen] = (0, import_react43.useState)(false);
27767
+ const [isOpen, setIsOpen] = (0, import_react44.useState)(false);
27502
27768
  const isHydrated = useHydrated();
27503
- const triggerRef = (0, import_react43.useRef)(null);
27504
- const [dropdownPosition, setDropdownPosition] = (0, import_react43.useState)(null);
27769
+ const triggerRef = (0, import_react44.useRef)(null);
27770
+ const [dropdownPosition, setDropdownPosition] = (0, import_react44.useState)(null);
27505
27771
  const themes = [
27506
- { value: "light", label: labels?.light ?? "Light", icon: import_lucide_react41.Sun },
27507
- { value: "dark", label: labels?.dark ?? "Dark", icon: import_lucide_react41.Moon },
27508
- { value: "system", label: labels?.system ?? "System", icon: import_lucide_react41.Monitor }
27772
+ { value: "light", label: labels?.light ?? "Light", icon: import_lucide_react40.Sun },
27773
+ { value: "dark", label: labels?.dark ?? "Dark", icon: import_lucide_react40.Moon },
27774
+ { value: "system", label: labels?.system ?? "System", icon: import_lucide_react40.Monitor }
27509
27775
  ];
27510
27776
  const current = isHydrated ? themes.find((t) => t.value === theme) || themes[2] : themes[2];
27511
27777
  const CurrentIcon = current.icon;
@@ -27590,9 +27856,9 @@ function ThemeToggleHeadless({
27590
27856
  }
27591
27857
 
27592
27858
  // src/components/LanguageSwitcherHeadless.tsx
27593
- var import_react44 = require("react");
27859
+ var import_react45 = require("react");
27594
27860
  var import_react_dom7 = require("react-dom");
27595
- var import_lucide_react42 = require("lucide-react");
27861
+ var import_lucide_react41 = require("lucide-react");
27596
27862
  var import_jsx_runtime77 = require("react/jsx-runtime");
27597
27863
  function LanguageSwitcherHeadless({
27598
27864
  locales,
@@ -27601,9 +27867,9 @@ function LanguageSwitcherHeadless({
27601
27867
  labels,
27602
27868
  className
27603
27869
  }) {
27604
- const [isOpen, setIsOpen] = (0, import_react44.useState)(false);
27605
- const [dropdownPosition, setDropdownPosition] = (0, import_react44.useState)(null);
27606
- const triggerButtonRef = (0, import_react44.useRef)(null);
27870
+ const [isOpen, setIsOpen] = (0, import_react45.useState)(false);
27871
+ const [dropdownPosition, setDropdownPosition] = (0, import_react45.useState)(null);
27872
+ const triggerButtonRef = (0, import_react45.useRef)(null);
27607
27873
  const currentLanguage = locales.find((l) => l.code === currentLocale) || locales[0];
27608
27874
  const calculatePosition = () => {
27609
27875
  const rect = triggerButtonRef.current?.getBoundingClientRect();
@@ -27635,7 +27901,7 @@ function LanguageSwitcherHeadless({
27635
27901
  "aria-expanded": isOpen,
27636
27902
  "aria-label": labels?.heading ?? "Language",
27637
27903
  title: labels?.heading ?? "Language",
27638
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react42.Globe, { className: "h-5 w-5" })
27904
+ children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react41.Globe, { className: "h-5 w-5" })
27639
27905
  }
27640
27906
  ),
27641
27907
  isOpen && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
@@ -27689,7 +27955,7 @@ var VARIANT_STYLES_ALERT = {
27689
27955
  };
27690
27956
 
27691
27957
  // src/contexts/translation-adapter.tsx
27692
- var React72 = __toESM(require("react"), 1);
27958
+ var React73 = __toESM(require("react"), 1);
27693
27959
  var import_jsx_runtime78 = require("react/jsx-runtime");
27694
27960
  function isUnresolvedTranslation2(value, namespace, key) {
27695
27961
  return value === key || value === `${namespace}.${key}`;
@@ -27714,7 +27980,7 @@ function useTranslations(namespace) {
27714
27980
  const nextIntlBridge = useNextIntlBridge();
27715
27981
  const internalLocale = useUnderverseLocale();
27716
27982
  const internalT = useUnderverseTranslations(namespace);
27717
- return React72.useCallback((key, params) => {
27983
+ return React73.useCallback((key, params) => {
27718
27984
  if (nextIntlBridge) {
27719
27985
  const nextIntlResult = nextIntlBridge.translate(namespace, key, params);
27720
27986
  if (nextIntlResult.translated && !isUnresolvedTranslation2(nextIntlResult.translated, namespace, key)) {
@@ -27739,8 +28005,8 @@ function useLocale2() {
27739
28005
  }
27740
28006
 
27741
28007
  // src/components/UEditor/UEditor.tsx
27742
- var import_react82 = __toESM(require("react"), 1);
27743
- var import_react83 = require("@tiptap/react");
28008
+ var import_react83 = __toESM(require("react"), 1);
28009
+ var import_react84 = require("@tiptap/react");
27744
28010
 
27745
28011
  // src/components/UEditor/extensions.ts
27746
28012
  var import_core16 = require("@tiptap/core");
@@ -27760,14 +28026,14 @@ var import_extension_task_item = __toESM(require("@tiptap/extension-task-item"),
27760
28026
  var import_extension_blockquote = __toESM(require("@tiptap/extension-blockquote"), 1);
27761
28027
  var import_extension_code = __toESM(require("@tiptap/extension-code"), 1);
27762
28028
  var import_core17 = require("@tiptap/core");
27763
- var import_react67 = require("@tiptap/react");
28029
+ var import_react68 = require("@tiptap/react");
27764
28030
 
27765
28031
  // src/components/UEditor/callout.ts
27766
28032
  var import_core = require("@tiptap/core");
27767
- var import_react46 = require("@tiptap/react");
28033
+ var import_react47 = require("@tiptap/react");
27768
28034
 
27769
28035
  // src/components/UEditor/CalloutView.tsx
27770
- var import_react45 = require("@tiptap/react");
28036
+ var import_react46 = require("@tiptap/react");
27771
28037
 
27772
28038
  // src/components/UEditor/emoji-picker.tsx
27773
28039
  var import_jsx_runtime79 = require("react/jsx-runtime");
@@ -27789,7 +28055,7 @@ var CalloutView = ({ node, updateAttributes, selected }) => {
27789
28055
  const currentEmoji = node.attrs.emoji ?? "\u{1F4A1}";
27790
28056
  const currentBgColor = node.attrs.backgroundColor ?? "var(--muted)";
27791
28057
  return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
27792
- import_react45.NodeViewWrapper,
28058
+ import_react46.NodeViewWrapper,
27793
28059
  {
27794
28060
  className: cn(
27795
28061
  "flex items-start gap-4 rounded-xl border p-4 my-4 transition-all duration-200 border-border/50",
@@ -27832,7 +28098,7 @@ var CalloutView = ({ node, updateAttributes, selected }) => {
27832
28098
  ] })
27833
28099
  }
27834
28100
  ) }),
27835
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react45.NodeViewContent, { className: "min-w-0 flex-1 outline-none" })
28101
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react46.NodeViewContent, { className: "min-w-0 flex-1 outline-none" })
27836
28102
  ]
27837
28103
  }
27838
28104
  );
@@ -27883,7 +28149,7 @@ var Callout = import_core.Node.create({
27883
28149
  ];
27884
28150
  },
27885
28151
  addNodeView() {
27886
- return (0, import_react46.ReactNodeViewRenderer)(CalloutView);
28152
+ return (0, import_react47.ReactNodeViewRenderer)(CalloutView);
27887
28153
  },
27888
28154
  addCommands() {
27889
28155
  return {
@@ -27896,12 +28162,12 @@ var Callout = import_core.Node.create({
27896
28162
 
27897
28163
  // src/components/UEditor/bookmark.ts
27898
28164
  var import_core2 = require("@tiptap/core");
27899
- var import_react49 = require("@tiptap/react");
28165
+ var import_react50 = require("@tiptap/react");
27900
28166
 
27901
28167
  // src/components/UEditor/BookmarkView.tsx
27902
- var import_react47 = __toESM(require("react"), 1);
27903
- var import_react48 = require("@tiptap/react");
27904
- var import_lucide_react43 = require("lucide-react");
28168
+ var import_react48 = __toESM(require("react"), 1);
28169
+ var import_react49 = require("@tiptap/react");
28170
+ var import_lucide_react42 = require("lucide-react");
27905
28171
 
27906
28172
  // src/components/UEditor/url-safety.ts
27907
28173
  var LINK_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "tel:"]);
@@ -27980,17 +28246,17 @@ var import_jsx_runtime81 = require("react/jsx-runtime");
27980
28246
  var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
27981
28247
  const t = useSmartTranslations("UEditor");
27982
28248
  const { url, title, description, image, publisher } = node.attrs;
27983
- const [loading2, setLoading] = (0, import_react47.useState)(false);
27984
- const [error, setError] = (0, import_react47.useState)(false);
27985
- const [retryToken, setRetryToken] = (0, import_react47.useState)(0);
27986
- const lastFetchKeyRef = import_react47.default.useRef("");
27987
- const fetchRequestIdRef = import_react47.default.useRef(0);
28249
+ const [loading2, setLoading] = (0, import_react48.useState)(false);
28250
+ const [error, setError] = (0, import_react48.useState)(false);
28251
+ const [retryToken, setRetryToken] = (0, import_react48.useState)(0);
28252
+ const lastFetchKeyRef = import_react48.default.useRef("");
28253
+ const fetchRequestIdRef = import_react48.default.useRef(0);
27988
28254
  const safeUrl = sanitizeUEditorUrl(String(url ?? ""), "link");
27989
28255
  const safeImage = sanitizeUEditorUrl(String(image ?? ""), "image");
27990
28256
  const clickToOpenNewTabMessage = t("bookmark.clickToOpenNewTab");
27991
28257
  const clickToOpenLinkMessage = t("bookmark.clickToOpenLink");
27992
28258
  const noDescriptionMessage = t("bookmark.noDescription");
27993
- (0, import_react47.useEffect)(() => {
28259
+ (0, import_react48.useEffect)(() => {
27994
28260
  if (title && retryToken === 0) return;
27995
28261
  if (!safeUrl) return;
27996
28262
  const fetchKey = `${safeUrl}\0${retryToken}`;
@@ -28093,7 +28359,7 @@ var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
28093
28359
  }
28094
28360
  })();
28095
28361
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
28096
- import_react48.NodeViewWrapper,
28362
+ import_react49.NodeViewWrapper,
28097
28363
  {
28098
28364
  className: cn(
28099
28365
  "my-4 block overflow-hidden rounded-xl border border-border/60 bg-muted/20 hover:bg-muted/30 transition-all duration-200 cursor-pointer select-none",
@@ -28115,7 +28381,7 @@ var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
28115
28381
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex-1 p-4 flex flex-col justify-between gap-1 min-w-0", children: [
28116
28382
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
28117
28383
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "text-xs text-muted-foreground font-medium flex items-center gap-1.5 truncate", children: [
28118
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react43.Globe, { className: "h-3 w-3 flex-shrink-0" }),
28384
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react42.Globe, { className: "h-3 w-3 flex-shrink-0" }),
28119
28385
  displayPublisher
28120
28386
  ] }),
28121
28387
  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h4", { className: "text-sm font-semibold text-foreground line-clamp-1 break-all", children: title || safeUrl || String(url ?? "") }),
@@ -28123,11 +28389,11 @@ var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
28123
28389
  ] }),
28124
28390
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "text-[11px] text-primary/80 font-mono mt-2 truncate flex items-center gap-1", children: [
28125
28391
  safeUrl || String(url ?? ""),
28126
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react43.ExternalLink, { className: "h-3 w-3 flex-shrink-0" })
28392
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react42.ExternalLink, { className: "h-3 w-3 flex-shrink-0" })
28127
28393
  ] }),
28128
28394
  error && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "mt-2 flex flex-wrap items-center gap-2 text-xs text-destructive", children: [
28129
28395
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
28130
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react43.AlertCircle, { className: "h-3.5 w-3.5" }),
28396
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react42.AlertCircle, { className: "h-3.5 w-3.5" }),
28131
28397
  t("bookmark.previewFailed")
28132
28398
  ] }),
28133
28399
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
@@ -28137,7 +28403,7 @@ var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
28137
28403
  onClick: handleRetryPreview,
28138
28404
  className: "inline-flex items-center gap-1 rounded-md border border-destructive/30 px-2 py-0.5 font-medium hover:bg-destructive/10",
28139
28405
  children: [
28140
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react43.RefreshCw, { className: "h-3 w-3" }),
28406
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react42.RefreshCw, { className: "h-3 w-3" }),
28141
28407
  t("bookmark.retryPreview")
28142
28408
  ]
28143
28409
  }
@@ -28231,7 +28497,7 @@ var Bookmark = import_core2.Node.create({
28231
28497
  ];
28232
28498
  },
28233
28499
  addNodeView() {
28234
- return (0, import_react49.ReactNodeViewRenderer)(BookmarkView);
28500
+ return (0, import_react50.ReactNodeViewRenderer)(BookmarkView);
28235
28501
  },
28236
28502
  addCommands() {
28237
28503
  return {
@@ -28277,12 +28543,12 @@ var Bookmark = import_core2.Node.create({
28277
28543
 
28278
28544
  // src/components/UEditor/file-card.ts
28279
28545
  var import_core3 = require("@tiptap/core");
28280
- var import_react52 = require("@tiptap/react");
28546
+ var import_react53 = require("@tiptap/react");
28281
28547
 
28282
28548
  // src/components/UEditor/FileCardView.tsx
28283
- var import_react50 = require("react");
28284
- var import_react51 = require("@tiptap/react");
28285
- var import_lucide_react44 = require("lucide-react");
28549
+ var import_react51 = require("react");
28550
+ var import_react52 = require("@tiptap/react");
28551
+ var import_lucide_react43 = require("lucide-react");
28286
28552
  var import_jsx_runtime82 = require("react/jsx-runtime");
28287
28553
  function formatBytes(bytes, decimals = 1) {
28288
28554
  if (!Number.isFinite(bytes) || bytes <= 0) return "0 Bytes";
@@ -28294,11 +28560,11 @@ function formatBytes(bytes, decimals = 1) {
28294
28560
  }
28295
28561
  function getFileIcon2(type) {
28296
28562
  const mime = String(type || "").toLowerCase();
28297
- if (mime.includes("pdf")) return import_lucide_react44.FileText;
28298
- if (mime.startsWith("image/")) return import_lucide_react44.Image;
28299
- if (mime.startsWith("audio/")) return import_lucide_react44.Music;
28300
- if (mime.startsWith("video/")) return import_lucide_react44.Video;
28301
- return import_lucide_react44.File;
28563
+ if (mime.includes("pdf")) return import_lucide_react43.FileText;
28564
+ if (mime.startsWith("image/")) return import_lucide_react43.Image;
28565
+ if (mime.startsWith("audio/")) return import_lucide_react43.Music;
28566
+ if (mime.startsWith("video/")) return import_lucide_react43.Video;
28567
+ return import_lucide_react43.File;
28302
28568
  }
28303
28569
  function dataURLtoFile(dataurl, filename, mimeType) {
28304
28570
  try {
@@ -28330,15 +28596,15 @@ var FileCardView = ({ node, selected, editor, updateAttributes }) => {
28330
28596
  const t = useSmartTranslations("UEditor");
28331
28597
  const { src, fileName, fileSize, fileType } = node.attrs;
28332
28598
  const FileIcon = getFileIcon2(fileType);
28333
- const [uploadError, setUploadError] = (0, import_react50.useState)(null);
28334
- const [retryToken, setRetryToken] = (0, import_react50.useState)(0);
28335
- const uploadAttemptedRef = (0, import_react50.useRef)(false);
28336
- const lastUploadSrcRef = (0, import_react50.useRef)("");
28337
- const uploadRequestIdRef = (0, import_react50.useRef)(0);
28599
+ const [uploadError, setUploadError] = (0, import_react51.useState)(null);
28600
+ const [retryToken, setRetryToken] = (0, import_react51.useState)(0);
28601
+ const uploadAttemptedRef = (0, import_react51.useRef)(false);
28602
+ const lastUploadSrcRef = (0, import_react51.useRef)("");
28603
+ const uploadRequestIdRef = (0, import_react51.useRef)(0);
28338
28604
  const safeSrc = sanitizeUEditorUrl(String(src ?? ""), "file");
28339
28605
  const extension = editor?.extensionManager?.extensions?.find((item) => item.name === "fileCard");
28340
28606
  const uploadFn = extension?.options?.upload;
28341
- (0, import_react50.useEffect)(() => {
28607
+ (0, import_react51.useEffect)(() => {
28342
28608
  if (lastUploadSrcRef.current !== safeSrc) {
28343
28609
  lastUploadSrcRef.current = safeSrc;
28344
28610
  uploadAttemptedRef.current = false;
@@ -28399,7 +28665,7 @@ var FileCardView = ({ node, selected, editor, updateAttributes }) => {
28399
28665
  setRetryToken((value) => value + 1);
28400
28666
  };
28401
28667
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
28402
- import_react51.NodeViewWrapper,
28668
+ import_react52.NodeViewWrapper,
28403
28669
  {
28404
28670
  className: cn(
28405
28671
  "my-4 flex items-center justify-between rounded-xl border border-border/60 bg-card p-4 hover:bg-muted/15 transition-all duration-200 cursor-pointer select-none",
@@ -28424,7 +28690,7 @@ var FileCardView = ({ node, selected, editor, updateAttributes }) => {
28424
28690
  onClick: handleRetryUpload,
28425
28691
  className: "inline-flex items-center gap-1 rounded-md border border-destructive/30 px-1.5 py-0.5 text-[11px] font-medium text-destructive hover:bg-destructive/10",
28426
28692
  children: [
28427
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react44.RefreshCw, { className: "h-3 w-3" }),
28693
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react43.RefreshCw, { className: "h-3 w-3" }),
28428
28694
  t("fileCard.retryUpload")
28429
28695
  ]
28430
28696
  }
@@ -28438,7 +28704,7 @@ var FileCardView = ({ node, selected, editor, updateAttributes }) => {
28438
28704
  type: "button",
28439
28705
  onClick: handleDownload,
28440
28706
  className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-background text-muted-foreground hover:text-foreground hover:bg-muted active:scale-95 transition-all focus:outline-none",
28441
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react44.Download, { className: "h-4 w-4" })
28707
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react43.Download, { className: "h-4 w-4" })
28442
28708
  }
28443
28709
  )
28444
28710
  ]
@@ -28515,7 +28781,7 @@ var FileCard = import_core3.Node.create({
28515
28781
  ];
28516
28782
  },
28517
28783
  addNodeView() {
28518
- return (0, import_react52.ReactNodeViewRenderer)(FileCardView);
28784
+ return (0, import_react53.ReactNodeViewRenderer)(FileCardView);
28519
28785
  },
28520
28786
  addCommands() {
28521
28787
  return {
@@ -28538,11 +28804,11 @@ var FileCard = import_core3.Node.create({
28538
28804
 
28539
28805
  // src/components/UEditor/form-checkbox.ts
28540
28806
  var import_core4 = require("@tiptap/core");
28541
- var import_react54 = require("@tiptap/react");
28807
+ var import_react55 = require("@tiptap/react");
28542
28808
 
28543
28809
  // src/components/UEditor/FormCheckboxView.tsx
28544
- var import_react53 = require("@tiptap/react");
28545
- var import_lucide_react45 = require("lucide-react");
28810
+ var import_react54 = require("@tiptap/react");
28811
+ var import_lucide_react44 = require("lucide-react");
28546
28812
  var import_jsx_runtime83 = require("react/jsx-runtime");
28547
28813
  var FormCheckboxView = ({ node, updateAttributes, editor, selected }) => {
28548
28814
  const isChecked = !!node.attrs.checked;
@@ -28560,7 +28826,7 @@ var FormCheckboxView = ({ node, updateAttributes, editor, selected }) => {
28560
28826
  }
28561
28827
  };
28562
28828
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
28563
- import_react53.NodeViewWrapper,
28829
+ import_react54.NodeViewWrapper,
28564
28830
  {
28565
28831
  as: "span",
28566
28832
  className: cn(
@@ -28589,7 +28855,7 @@ var FormCheckboxView = ({ node, updateAttributes, editor, selected }) => {
28589
28855
  "transition-transform duration-200 ease-out-back",
28590
28856
  isChecked ? "scale-100 opacity-100" : "scale-50 opacity-0"
28591
28857
  ),
28592
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react45.Check, { className: "w-3.5 h-3.5 stroke-[3px]" })
28858
+ children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react44.Check, { className: "w-3.5 h-3.5 stroke-[3px]" })
28593
28859
  }
28594
28860
  )
28595
28861
  }
@@ -28677,7 +28943,7 @@ var FormCheckbox2 = import_core4.Node.create({
28677
28943
  ];
28678
28944
  },
28679
28945
  addNodeView() {
28680
- return (0, import_react54.ReactNodeViewRenderer)(FormCheckboxView);
28946
+ return (0, import_react55.ReactNodeViewRenderer)(FormCheckboxView);
28681
28947
  },
28682
28948
  addCommands() {
28683
28949
  return {
@@ -28693,11 +28959,11 @@ var FormCheckbox2 = import_core4.Node.create({
28693
28959
 
28694
28960
  // src/components/UEditor/form-radio.ts
28695
28961
  var import_core5 = require("@tiptap/core");
28696
- var import_react56 = require("@tiptap/react");
28962
+ var import_react57 = require("@tiptap/react");
28697
28963
 
28698
28964
  // src/components/UEditor/FormRadioView.tsx
28699
- var import_react55 = require("@tiptap/react");
28700
- var import_lucide_react46 = require("lucide-react");
28965
+ var import_react56 = require("@tiptap/react");
28966
+ var import_lucide_react45 = require("lucide-react");
28701
28967
  var import_jsx_runtime84 = require("react/jsx-runtime");
28702
28968
  var FormRadioView = ({ node, updateAttributes, editor, selected }) => {
28703
28969
  const t = useSmartTranslations("UEditor");
@@ -28716,7 +28982,7 @@ var FormRadioView = ({ node, updateAttributes, editor, selected }) => {
28716
28982
  }
28717
28983
  };
28718
28984
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
28719
- import_react55.NodeViewWrapper,
28985
+ import_react56.NodeViewWrapper,
28720
28986
  {
28721
28987
  as: "span",
28722
28988
  className: cn(
@@ -28759,7 +29025,7 @@ var FormRadioView = ({ node, updateAttributes, editor, selected }) => {
28759
29025
  type: "button",
28760
29026
  className: "p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors outline-none cursor-pointer",
28761
29027
  title: t("radio.editGroup") || "Edit Group",
28762
- children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react46.Settings, { className: "w-3.5 h-3.5" })
29028
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react45.Settings, { className: "w-3.5 h-3.5" })
28763
29029
  }
28764
29030
  ),
28765
29031
  children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "p-3 w-52 flex flex-col gap-2 bg-card border rounded-xl shadow-lg text-card-foreground", children: [
@@ -28866,7 +29132,7 @@ var FormRadio = import_core5.Node.create({
28866
29132
  ];
28867
29133
  },
28868
29134
  addNodeView() {
28869
- return (0, import_react56.ReactNodeViewRenderer)(FormRadioView);
29135
+ return (0, import_react57.ReactNodeViewRenderer)(FormRadioView);
28870
29136
  },
28871
29137
  addCommands() {
28872
29138
  return {
@@ -28928,9 +29194,9 @@ var import_lowlight = require("lowlight");
28928
29194
  // src/components/UEditor/slash-command.tsx
28929
29195
  var import_core6 = require("@tiptap/core");
28930
29196
  var import_suggestion = __toESM(require("@tiptap/suggestion"), 1);
28931
- var import_react57 = require("@tiptap/react");
28932
- var import_react58 = __toESM(require("react"), 1);
28933
- var import_lucide_react47 = require("lucide-react");
29197
+ var import_react58 = require("@tiptap/react");
29198
+ var import_react59 = __toESM(require("react"), 1);
29199
+ var import_lucide_react46 = require("lucide-react");
28934
29200
 
28935
29201
  // src/components/UEditor/tippy-interop.ts
28936
29202
  var import_tippy = __toESM(require("tippy.js"), 1);
@@ -28996,9 +29262,9 @@ var DEFAULT_MESSAGES = {
28996
29262
  formRadioDesc: "Insert an interactive radio button field"
28997
29263
  };
28998
29264
  function useResettingIndex2(resetToken) {
28999
- const [state, setState] = import_react58.default.useState({ resetToken, index: 0 });
29265
+ const [state, setState] = import_react59.default.useState({ resetToken, index: 0 });
29000
29266
  const selectedIndex = Object.is(state.resetToken, resetToken) ? state.index : 0;
29001
- const setSelectedIndex = import_react58.default.useCallback((nextIndex) => {
29267
+ const setSelectedIndex = import_react59.default.useCallback((nextIndex) => {
29002
29268
  setState((prev) => {
29003
29269
  const prevIndex = Object.is(prev.resetToken, resetToken) ? prev.index : 0;
29004
29270
  return {
@@ -29060,7 +29326,7 @@ function buildSlashCommandItems({
29060
29326
  const run = (handler) => handler;
29061
29327
  return [
29062
29328
  {
29063
- icon: import_lucide_react47.Type,
29329
+ icon: import_lucide_react46.Type,
29064
29330
  title: messages.text,
29065
29331
  description: messages.textDesc,
29066
29332
  command: run(({ editor, range }) => {
@@ -29068,7 +29334,7 @@ function buildSlashCommandItems({
29068
29334
  })
29069
29335
  },
29070
29336
  {
29071
- icon: import_lucide_react47.Heading1,
29337
+ icon: import_lucide_react46.Heading1,
29072
29338
  title: messages.heading1,
29073
29339
  description: messages.heading1Desc,
29074
29340
  command: run(({ editor, range }) => {
@@ -29076,7 +29342,7 @@ function buildSlashCommandItems({
29076
29342
  })
29077
29343
  },
29078
29344
  {
29079
- icon: import_lucide_react47.Heading2,
29345
+ icon: import_lucide_react46.Heading2,
29080
29346
  title: messages.heading2,
29081
29347
  description: messages.heading2Desc,
29082
29348
  command: run(({ editor, range }) => {
@@ -29084,7 +29350,7 @@ function buildSlashCommandItems({
29084
29350
  })
29085
29351
  },
29086
29352
  {
29087
- icon: import_lucide_react47.Heading3,
29353
+ icon: import_lucide_react46.Heading3,
29088
29354
  title: messages.heading3,
29089
29355
  description: messages.heading3Desc,
29090
29356
  command: run(({ editor, range }) => {
@@ -29092,7 +29358,7 @@ function buildSlashCommandItems({
29092
29358
  })
29093
29359
  },
29094
29360
  {
29095
- icon: import_lucide_react47.List,
29361
+ icon: import_lucide_react46.List,
29096
29362
  title: messages.bulletList,
29097
29363
  description: messages.bulletListDesc,
29098
29364
  command: run(({ editor, range }) => {
@@ -29100,7 +29366,7 @@ function buildSlashCommandItems({
29100
29366
  })
29101
29367
  },
29102
29368
  {
29103
- icon: import_lucide_react47.ListOrdered,
29369
+ icon: import_lucide_react46.ListOrdered,
29104
29370
  title: messages.orderedList,
29105
29371
  description: messages.orderedListDesc,
29106
29372
  command: run(({ editor, range }) => {
@@ -29108,7 +29374,7 @@ function buildSlashCommandItems({
29108
29374
  })
29109
29375
  },
29110
29376
  {
29111
- icon: import_lucide_react47.ListTodo,
29377
+ icon: import_lucide_react46.ListTodo,
29112
29378
  title: messages.todoList,
29113
29379
  description: messages.todoListDesc,
29114
29380
  command: run(({ editor, range }) => {
@@ -29116,7 +29382,7 @@ function buildSlashCommandItems({
29116
29382
  })
29117
29383
  },
29118
29384
  {
29119
- icon: import_lucide_react47.Quote,
29385
+ icon: import_lucide_react46.Quote,
29120
29386
  title: messages.quote,
29121
29387
  description: messages.quoteDesc,
29122
29388
  command: run(({ editor, range }) => {
@@ -29124,7 +29390,7 @@ function buildSlashCommandItems({
29124
29390
  })
29125
29391
  },
29126
29392
  {
29127
- icon: import_lucide_react47.FileCode,
29393
+ icon: import_lucide_react46.FileCode,
29128
29394
  title: messages.codeBlock,
29129
29395
  description: messages.codeBlockDesc,
29130
29396
  command: run(({ editor, range }) => {
@@ -29132,7 +29398,7 @@ function buildSlashCommandItems({
29132
29398
  })
29133
29399
  },
29134
29400
  {
29135
- icon: import_lucide_react47.Minus,
29401
+ icon: import_lucide_react46.Minus,
29136
29402
  title: messages.divider,
29137
29403
  description: messages.dividerDesc,
29138
29404
  command: run(({ editor, range }) => {
@@ -29140,7 +29406,7 @@ function buildSlashCommandItems({
29140
29406
  })
29141
29407
  },
29142
29408
  {
29143
- icon: import_lucide_react47.Table,
29409
+ icon: import_lucide_react46.Table,
29144
29410
  title: messages.table,
29145
29411
  description: messages.tableDesc,
29146
29412
  command: run(({ editor, range }) => {
@@ -29148,7 +29414,7 @@ function buildSlashCommandItems({
29148
29414
  })
29149
29415
  },
29150
29416
  {
29151
- icon: import_lucide_react47.Info,
29417
+ icon: import_lucide_react46.Info,
29152
29418
  title: messages.callout || "Callout",
29153
29419
  description: messages.calloutDesc || "Highlight key info with a callout block",
29154
29420
  command: run(({ editor, range }) => {
@@ -29156,7 +29422,7 @@ function buildSlashCommandItems({
29156
29422
  })
29157
29423
  },
29158
29424
  {
29159
- icon: import_lucide_react47.Bookmark,
29425
+ icon: import_lucide_react46.Bookmark,
29160
29426
  title: messages.bookmark || "Bookmark Card",
29161
29427
  description: messages.bookmarkDesc || "Embed a link as a bookmark card",
29162
29428
  command: run(({ editor, range }) => {
@@ -29167,7 +29433,7 @@ function buildSlashCommandItems({
29167
29433
  })
29168
29434
  },
29169
29435
  {
29170
- icon: import_lucide_react47.Paperclip,
29436
+ icon: import_lucide_react46.Paperclip,
29171
29437
  title: messages.fileCard || "File Attachment",
29172
29438
  description: messages.fileCardDesc || "Upload a file card attachment",
29173
29439
  command: run(({ editor, range }) => {
@@ -29192,7 +29458,7 @@ function buildSlashCommandItems({
29192
29458
  })
29193
29459
  },
29194
29460
  {
29195
- icon: import_lucide_react47.CheckSquare,
29461
+ icon: import_lucide_react46.CheckSquare,
29196
29462
  title: messages.formCheckbox,
29197
29463
  description: messages.formCheckboxDesc,
29198
29464
  searchTerms: ["checkbox", "square checkbox"],
@@ -29201,7 +29467,7 @@ function buildSlashCommandItems({
29201
29467
  })
29202
29468
  },
29203
29469
  {
29204
- icon: import_lucide_react47.CircleCheckBig,
29470
+ icon: import_lucide_react46.CircleCheckBig,
29205
29471
  title: messages.roundCheckbox,
29206
29472
  description: messages.roundCheckboxDesc,
29207
29473
  searchTerms: ["roundcheckbox", "round checkbox", "circle checkbox"],
@@ -29210,7 +29476,7 @@ function buildSlashCommandItems({
29210
29476
  })
29211
29477
  },
29212
29478
  {
29213
- icon: import_lucide_react47.CircleDot,
29479
+ icon: import_lucide_react46.CircleDot,
29214
29480
  title: messages.formRadio,
29215
29481
  description: messages.formRadioDesc,
29216
29482
  command: run(({ editor, range }) => {
@@ -29223,14 +29489,14 @@ function buildSlashCommandItems({
29223
29489
  return [item.title, item.description, ...item.searchTerms ?? []].some((value) => value.toLowerCase().includes(normalizedQuery));
29224
29490
  });
29225
29491
  }
29226
- var SlashCommandList = (0, import_react58.forwardRef)((props, ref) => {
29492
+ var SlashCommandList = (0, import_react59.forwardRef)((props, ref) => {
29227
29493
  const [selectedIndex, setSelectedIndex] = useResettingIndex2(props.items);
29228
- const listRef = (0, import_react58.useRef)(null);
29229
- (0, import_react58.useEffect)(() => {
29494
+ const listRef = (0, import_react59.useRef)(null);
29495
+ (0, import_react59.useEffect)(() => {
29230
29496
  const selectedElement = listRef.current?.querySelector(`[data-index="${selectedIndex}"]`);
29231
29497
  selectedElement?.scrollIntoView({ block: "nearest" });
29232
29498
  }, [selectedIndex, props.items]);
29233
- (0, import_react58.useImperativeHandle)(ref, () => ({
29499
+ (0, import_react59.useImperativeHandle)(ref, () => ({
29234
29500
  onKeyDown: (keyProps) => {
29235
29501
  if (!keyProps || !keyProps.event) return false;
29236
29502
  const { event } = keyProps;
@@ -29315,7 +29581,7 @@ var SlashCommand = import_core6.Extension.create({
29315
29581
  let popup;
29316
29582
  return {
29317
29583
  onStart: (props) => {
29318
- component = new import_react57.ReactRenderer(SlashCommandList, {
29584
+ component = new import_react58.ReactRenderer(SlashCommandList, {
29319
29585
  props: {
29320
29586
  ...props,
29321
29587
  messages
@@ -30194,15 +30460,15 @@ var ClipboardImages = import_core7.Extension.create({
30194
30460
  // src/components/UEditor/emoji-suggestion.tsx
30195
30461
  var import_core8 = require("@tiptap/core");
30196
30462
  var import_suggestion2 = __toESM(require("@tiptap/suggestion"), 1);
30197
- var import_react59 = require("@tiptap/react");
30463
+ var import_react60 = require("@tiptap/react");
30198
30464
  var import_state3 = require("@tiptap/pm/state");
30199
- var import_react60 = __toESM(require("react"), 1);
30200
- var import_lucide_react48 = require("lucide-react");
30465
+ var import_react61 = __toESM(require("react"), 1);
30466
+ var import_lucide_react47 = require("lucide-react");
30201
30467
  var import_jsx_runtime86 = require("react/jsx-runtime");
30202
30468
  function useResettingIndex3(resetToken) {
30203
- const [state, setState] = import_react60.default.useState({ resetToken, index: 0 });
30469
+ const [state, setState] = import_react61.default.useState({ resetToken, index: 0 });
30204
30470
  const selectedIndex = Object.is(state.resetToken, resetToken) ? state.index : 0;
30205
- const setSelectedIndex = import_react60.default.useCallback((nextIndex) => {
30471
+ const setSelectedIndex = import_react61.default.useCallback((nextIndex) => {
30206
30472
  setState((prev) => {
30207
30473
  const prevIndex = Object.is(prev.resetToken, resetToken) ? prev.index : 0;
30208
30474
  return {
@@ -30213,11 +30479,11 @@ function useResettingIndex3(resetToken) {
30213
30479
  }, [resetToken]);
30214
30480
  return [selectedIndex, setSelectedIndex];
30215
30481
  }
30216
- var EmojiList = (0, import_react60.forwardRef)((props, ref) => {
30482
+ var EmojiList = (0, import_react61.forwardRef)((props, ref) => {
30217
30483
  const t = useSmartTranslations("UEditor");
30218
30484
  const [selectedIndex, setSelectedIndex] = useResettingIndex3(props.items);
30219
30485
  const showingCountLabel = formatEmojiCountLabel(t("emojiSuggestion.showingCount"), 64, props.items.length);
30220
- (0, import_react60.useImperativeHandle)(ref, () => ({
30486
+ (0, import_react61.useImperativeHandle)(ref, () => ({
30221
30487
  onKeyDown: (keyProps) => {
30222
30488
  if (!keyProps || !keyProps.event) return false;
30223
30489
  const { event } = keyProps;
@@ -30252,7 +30518,7 @@ var EmojiList = (0, import_react60.forwardRef)((props, ref) => {
30252
30518
  }
30253
30519
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "w-80 max-h-80 overflow-y-auto bg-card border border-border/50 rounded-2xl shadow-lg", children: [
30254
30520
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "px-3 py-2 border-b bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-2", children: [
30255
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react48.Smile, { className: "w-4 h-4 text-primary" }),
30521
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react47.Smile, { className: "w-4 h-4 text-primary" }),
30256
30522
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: t("emojiSuggestion.title") })
30257
30523
  ] }) }),
30258
30524
  /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "p-3", children: [
@@ -30299,7 +30565,7 @@ var EmojiSuggestion = import_core8.Extension.create({
30299
30565
  let popup;
30300
30566
  return {
30301
30567
  onStart: (props) => {
30302
- component = new import_react59.ReactRenderer(EmojiList, {
30568
+ component = new import_react60.ReactRenderer(EmojiList, {
30303
30569
  props,
30304
30570
  editor: props.editor
30305
30571
  });
@@ -30347,10 +30613,10 @@ var EmojiSuggestion = import_core8.Extension.create({
30347
30613
  // src/components/UEditor/formula-suggestion.tsx
30348
30614
  var import_core9 = require("@tiptap/core");
30349
30615
  var import_suggestion3 = __toESM(require("@tiptap/suggestion"), 1);
30350
- var import_react61 = require("@tiptap/react");
30616
+ var import_react62 = require("@tiptap/react");
30351
30617
  var import_state4 = require("@tiptap/pm/state");
30352
- var import_react62 = __toESM(require("react"), 1);
30353
- var import_lucide_react49 = require("lucide-react");
30618
+ var import_react63 = __toESM(require("react"), 1);
30619
+ var import_lucide_react48 = require("lucide-react");
30354
30620
  var import_jsx_runtime87 = require("react/jsx-runtime");
30355
30621
  var FORMULA_FUNCTIONS = [
30356
30622
  {
@@ -30402,13 +30668,13 @@ function buildFormulaSuggestionItems({ query }) {
30402
30668
  function isFormulaFunctionSuggestionQuery(query) {
30403
30669
  return /^[A-Z]*$/i.test(query.trim());
30404
30670
  }
30405
- var FormulaSuggestionList = (0, import_react62.forwardRef)((props, ref) => {
30671
+ var FormulaSuggestionList = (0, import_react63.forwardRef)((props, ref) => {
30406
30672
  const t = useSmartTranslations("UEditor");
30407
- const [selectedIndex, setSelectedIndex] = import_react62.default.useState(0);
30408
- import_react62.default.useEffect(() => {
30673
+ const [selectedIndex, setSelectedIndex] = import_react63.default.useState(0);
30674
+ import_react63.default.useEffect(() => {
30409
30675
  setSelectedIndex(0);
30410
30676
  }, [props.items]);
30411
- (0, import_react62.useImperativeHandle)(ref, () => ({
30677
+ (0, import_react63.useImperativeHandle)(ref, () => ({
30412
30678
  onKeyDown: ({ event }) => {
30413
30679
  if (props.items.length === 0) return false;
30414
30680
  if (event.key === "ArrowUp") {
@@ -30434,7 +30700,7 @@ var FormulaSuggestionList = (0, import_react62.forwardRef)((props, ref) => {
30434
30700
  }
30435
30701
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "w-72 max-h-80 overflow-y-auto bg-card border border-border/50 rounded-lg shadow-lg", children: [
30436
30702
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "px-3 py-2 border-b bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2", children: [
30437
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react49.Sigma, { className: "w-4 h-4 text-primary" }),
30703
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react48.Sigma, { className: "w-4 h-4 text-primary" }),
30438
30704
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: t("formulaSuggestion.title") })
30439
30705
  ] }) }),
30440
30706
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "p-1.5", children: props.items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
@@ -30486,7 +30752,7 @@ var FormulaSuggestion = import_core9.Extension.create({
30486
30752
  let popup;
30487
30753
  return {
30488
30754
  onStart: (props) => {
30489
- component = new import_react61.ReactRenderer(FormulaSuggestionList, {
30755
+ component = new import_react62.ReactRenderer(FormulaSuggestionList, {
30490
30756
  props,
30491
30757
  editor: props.editor
30492
30758
  });
@@ -30604,10 +30870,10 @@ var UEditorPlaceholder = import_core10.Extension.create({
30604
30870
  });
30605
30871
 
30606
30872
  // src/components/UEditor/resizable-image.tsx
30607
- var import_react63 = require("react");
30873
+ var import_react64 = require("react");
30608
30874
  var import_extension_image = __toESM(require("@tiptap/extension-image"), 1);
30609
30875
  var import_core11 = require("@tiptap/core");
30610
- var import_react64 = require("@tiptap/react");
30876
+ var import_react65 = require("@tiptap/react");
30611
30877
 
30612
30878
  // src/components/UEditor/table-dom-utils.ts
30613
30879
  var DEFAULT_TABLE_ROW_HEIGHT = 25;
@@ -30793,16 +31059,16 @@ function sizeFromHeight(height, aspect, maxWidth) {
30793
31059
  }
30794
31060
  function ResizableImageNodeView(props) {
30795
31061
  const { node, selected, updateAttributes, editor, getPos } = props;
30796
- const wrapperRef = (0, import_react63.useRef)(null);
30797
- const imgRef = (0, import_react63.useRef)(null);
30798
- const resizePreviewRef = (0, import_react63.useRef)(null);
30799
- const [isHovered, setIsHovered] = (0, import_react63.useState)(false);
30800
- const [isResizing, setIsResizing] = (0, import_react63.useState)(false);
31062
+ const wrapperRef = (0, import_react64.useRef)(null);
31063
+ const imgRef = (0, import_react64.useRef)(null);
31064
+ const resizePreviewRef = (0, import_react64.useRef)(null);
31065
+ const [isHovered, setIsHovered] = (0, import_react64.useState)(false);
31066
+ const [isResizing, setIsResizing] = (0, import_react64.useState)(false);
30801
31067
  const widthAttr = toNullableNumber(node.attrs["width"]);
30802
31068
  const heightAttr = toNullableNumber(node.attrs["height"]);
30803
31069
  const textAlign = String(node.attrs["textAlign"] ?? "");
30804
31070
  const imageLayout = parseImageLayout(node.attrs["imageLayout"]);
30805
- const dragStateRef = (0, import_react63.useRef)(null);
31071
+ const dragStateRef = (0, import_react64.useRef)(null);
30806
31072
  const dispatchTableLayoutChange2 = () => {
30807
31073
  editor.view.dom.dispatchEvent(new CustomEvent(UEDITOR_TABLE_LAYOUT_CHANGE_EVENT, { bubbles: true }));
30808
31074
  };
@@ -30839,7 +31105,7 @@ function ResizableImageNodeView(props) {
30839
31105
  if (!drag || drag.frameId !== null) return;
30840
31106
  drag.frameId = window.requestAnimationFrame(applyPendingResizeFrame);
30841
31107
  };
30842
- (0, import_react63.useEffect)(() => {
31108
+ (0, import_react64.useEffect)(() => {
30843
31109
  return () => {
30844
31110
  const drag = dragStateRef.current;
30845
31111
  if (drag && drag.frameId !== null) {
@@ -30849,7 +31115,7 @@ function ResizableImageNodeView(props) {
30849
31115
  document.body.style.cursor = "";
30850
31116
  };
30851
31117
  }, []);
30852
- (0, import_react63.useEffect)(() => {
31118
+ (0, import_react64.useEffect)(() => {
30853
31119
  const img = imgRef.current;
30854
31120
  if (!img) return;
30855
31121
  const displayStyle = getImageDisplayStyle(widthAttr, heightAttr);
@@ -30957,7 +31223,7 @@ function ResizableImageNodeView(props) {
30957
31223
  const wrapperAlignClass = imageLayout === "block" ? textAlign === "center" ? "mx-auto" : textAlign === "right" ? "ml-auto" : textAlign === "justify" ? "mx-auto" : "" : "";
30958
31224
  const wrapperLayoutClass = imageLayout === "left" ? "float-left mr-4 mb-3 mt-1 clear-none max-w-[min(45%,20rem)]" : imageLayout === "right" ? "float-right ml-4 mb-3 mt-1 clear-none max-w-[min(45%,20rem)]" : "w-fit";
30959
31225
  return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
30960
- import_react64.NodeViewWrapper,
31226
+ import_react65.NodeViewWrapper,
30961
31227
  {
30962
31228
  as: "div",
30963
31229
  ref: wrapperRef,
@@ -31080,7 +31346,7 @@ var ResizableImage = import_extension_image.default.extend({
31080
31346
  return ["img", (0, import_core11.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes)];
31081
31347
  },
31082
31348
  addNodeView() {
31083
- return (0, import_react64.ReactNodeViewRenderer)(ResizableImageNodeView);
31349
+ return (0, import_react65.ReactNodeViewRenderer)(ResizableImageNodeView);
31084
31350
  }
31085
31351
  }).configure({
31086
31352
  allowBase64: true,
@@ -31799,9 +32065,9 @@ var UEditorTable = import_extension_table.Table.extend({
31799
32065
  var table_align_default = UEditorTable;
31800
32066
 
31801
32067
  // src/components/UEditor/CodeBlockView.tsx
31802
- var import_react65 = __toESM(require("react"), 1);
31803
- var import_react66 = require("@tiptap/react");
31804
- var import_lucide_react50 = require("lucide-react");
32068
+ var import_react66 = __toESM(require("react"), 1);
32069
+ var import_react67 = require("@tiptap/react");
32070
+ var import_lucide_react49 = require("lucide-react");
31805
32071
  var import_jsx_runtime89 = require("react/jsx-runtime");
31806
32072
  var LANGUAGES = [
31807
32073
  { label: "Plain Text", value: "text" },
@@ -31824,12 +32090,12 @@ var CodeBlockView = ({
31824
32090
  updateAttributes,
31825
32091
  extension
31826
32092
  }) => {
31827
- const [copied, setCopied] = (0, import_react65.useState)(false);
31828
- const [isDropdownOpen, setIsDropdownOpen] = (0, import_react65.useState)(false);
31829
- const timeoutRef = import_react65.default.useRef(null);
32093
+ const [copied, setCopied] = (0, import_react66.useState)(false);
32094
+ const [isDropdownOpen, setIsDropdownOpen] = (0, import_react66.useState)(false);
32095
+ const timeoutRef = import_react66.default.useRef(null);
31830
32096
  const currentLangValue = node.attrs.language || "text";
31831
32097
  const currentLangLabel = LANGUAGES.find((lang) => lang.value === currentLangValue)?.label || "Plain Text";
31832
- import_react65.default.useEffect(() => {
32098
+ import_react66.default.useEffect(() => {
31833
32099
  return () => {
31834
32100
  if (timeoutRef.current) {
31835
32101
  clearTimeout(timeoutRef.current);
@@ -31850,7 +32116,7 @@ var CodeBlockView = ({
31850
32116
  console.error("Failed to copy code text: ", err);
31851
32117
  }
31852
32118
  };
31853
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react66.NodeViewWrapper, { className: "group/code relative my-4 rounded-xl border border-border/60 bg-muted/40 p-4 font-mono text-sm shadow-sm overflow-visible", children: [
32119
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react67.NodeViewWrapper, { className: "group/code relative my-4 rounded-xl border border-border/60 bg-muted/40 p-4 font-mono text-sm shadow-sm overflow-visible", children: [
31854
32120
  /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
31855
32121
  "div",
31856
32122
  {
@@ -31866,7 +32132,7 @@ var CodeBlockView = ({
31866
32132
  className: "flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1 text-xs text-muted-foreground hover:text-foreground hover:bg-muted active:scale-95 transition-all focus:outline-none",
31867
32133
  children: [
31868
32134
  currentLangLabel,
31869
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react50.ChevronDown, { className: "h-3 w-3" })
32135
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react49.ChevronDown, { className: "h-3 w-3" })
31870
32136
  ]
31871
32137
  }
31872
32138
  ),
@@ -31903,13 +32169,13 @@ var CodeBlockView = ({
31903
32169
  onClick: handleCopy,
31904
32170
  className: "flex h-7 w-7 items-center justify-center rounded-lg border border-border bg-background text-muted-foreground hover:text-foreground hover:bg-muted active:scale-95 transition-all focus:outline-none",
31905
32171
  title: "Copy code",
31906
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react50.Check, { className: "h-3.5 w-3.5 text-success animate-in fade-in-0 zoom-in-75" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react50.Copy, { className: "h-3.5 w-3.5" })
32172
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react49.Check, { className: "h-3.5 w-3.5 text-success animate-in fade-in-0 zoom-in-75" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react49.Copy, { className: "h-3.5 w-3.5" })
31907
32173
  }
31908
32174
  )
31909
32175
  ]
31910
32176
  }
31911
32177
  ),
31912
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("pre", { className: "m-0 overflow-x-auto [scrollbar-width:thin] pt-4 sm:pt-0", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("code", { className: "bg-transparent! text-foreground!", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react66.NodeViewContent, {}) }) })
32178
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("pre", { className: "m-0 overflow-x-auto [scrollbar-width:thin] pt-4 sm:pt-0", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("code", { className: "bg-transparent! text-foreground!", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react67.NodeViewContent, {}) }) })
31913
32179
  ] });
31914
32180
  };
31915
32181
 
@@ -32197,7 +32463,7 @@ var CustomTaskList = import_extension_task_list.default.extend({
32197
32463
  var lowlight = (0, import_lowlight.createLowlight)(import_lowlight.common);
32198
32464
  var CustomCodeBlockLowlight = import_extension_code_block_lowlight.default.extend({
32199
32465
  addNodeView() {
32200
- return (0, import_react67.ReactNodeViewRenderer)(CodeBlockView);
32466
+ return (0, import_react68.ReactNodeViewRenderer)(CodeBlockView);
32201
32467
  }
32202
32468
  });
32203
32469
  function buildUEditorExtensions({
@@ -32347,14 +32613,14 @@ function buildUEditorExtensions({
32347
32613
  }
32348
32614
 
32349
32615
  // src/components/UEditor/toolbar.tsx
32350
- var import_react70 = __toESM(require("react"), 1);
32351
- var import_react71 = require("@tiptap/react");
32352
- var import_lucide_react53 = require("lucide-react");
32616
+ var import_react71 = __toESM(require("react"), 1);
32617
+ var import_react72 = require("@tiptap/react");
32618
+ var import_lucide_react52 = require("lucide-react");
32353
32619
  var import_tables4 = require("@tiptap/pm/tables");
32354
32620
 
32355
32621
  // src/components/UEditor/colors.tsx
32356
- var import_react68 = require("react");
32357
- var import_lucide_react51 = require("lucide-react");
32622
+ var import_react69 = require("react");
32623
+ var import_lucide_react50 = require("lucide-react");
32358
32624
  var import_jsx_runtime90 = require("react/jsx-runtime");
32359
32625
  var TextColorIcon = ({ color }) => {
32360
32626
  const underlineColor = color && color !== "inherit" ? color : "currentColor";
@@ -32373,7 +32639,7 @@ var TextColorIcon = ({ color }) => {
32373
32639
  var HighlightColorIcon = ({ color }) => {
32374
32640
  const underlineColor = color || "currentColor";
32375
32641
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "relative flex h-5 w-5 items-center justify-center leading-none", children: [
32376
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react51.Highlighter, { className: "h-4 w-4" }),
32642
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react50.Highlighter, { className: "h-4 w-4" }),
32377
32643
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
32378
32644
  "span",
32379
32645
  {
@@ -32387,7 +32653,7 @@ var HighlightColorIcon = ({ color }) => {
32387
32653
  var CellBgColorIcon = ({ color }) => {
32388
32654
  const underlineColor = color && color !== "inherit" ? color : "currentColor";
32389
32655
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "relative flex h-5 w-5 items-center justify-center leading-none", children: [
32390
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react51.Paintbrush, { className: "h-4 w-4" }),
32656
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react50.Paintbrush, { className: "h-4 w-4" }),
32391
32657
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
32392
32658
  "span",
32393
32659
  {
@@ -32401,7 +32667,7 @@ var CellBgColorIcon = ({ color }) => {
32401
32667
  var CellBorderIcon = ({ color }) => {
32402
32668
  const underlineColor = color && color !== "inherit" ? color : "currentColor";
32403
32669
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "relative flex h-5 w-5 items-center justify-center leading-none", children: [
32404
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react51.Grid, { className: "h-4 w-4" }),
32670
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react50.Grid, { className: "h-4 w-4" }),
32405
32671
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
32406
32672
  "span",
32407
32673
  {
@@ -32488,7 +32754,7 @@ function getSwatchCheckClass(color) {
32488
32754
  }
32489
32755
  var useEditorColors = () => {
32490
32756
  const t = useSmartTranslations("UEditor");
32491
- const textColors = (0, import_react68.useMemo)(
32757
+ const textColors = (0, import_react69.useMemo)(
32492
32758
  () => [
32493
32759
  { name: t("colors.default"), color: "inherit", cssClass: "text-foreground" },
32494
32760
  { name: t("colors.muted"), color: "var(--muted-foreground)", cssClass: "text-muted-foreground" },
@@ -32502,7 +32768,7 @@ var useEditorColors = () => {
32502
32768
  ],
32503
32769
  [t]
32504
32770
  );
32505
- const highlightColors = (0, import_react68.useMemo)(
32771
+ const highlightColors = (0, import_react69.useMemo)(
32506
32772
  () => [
32507
32773
  { name: t("colors.default"), color: "", cssClass: "" },
32508
32774
  { name: t("colors.muted"), color: "var(--muted)", cssClass: "bg-muted" },
@@ -32526,7 +32792,7 @@ var EditorColorPalette = ({
32526
32792
  label
32527
32793
  }) => {
32528
32794
  const t = useSmartTranslations("UEditor");
32529
- const colorInputRef = (0, import_react68.useRef)(null);
32795
+ const colorInputRef = (0, import_react69.useRef)(null);
32530
32796
  const automaticColor = colors[0]?.color ?? "";
32531
32797
  const paletteColors = colors.slice(1);
32532
32798
  return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "w-56 p-2", children: [
@@ -32543,7 +32809,7 @@ var EditorColorPalette = ({
32543
32809
  currentColor === automaticColor ? "border-primary text-primary" : "border-transparent text-foreground"
32544
32810
  ),
32545
32811
  children: [
32546
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "flex h-5 w-5 items-center justify-center rounded border border-border bg-background", children: currentColor === automaticColor && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react51.Check, { className: "h-3.5 w-3.5" }) }),
32812
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "flex h-5 w-5 items-center justify-center rounded border border-border bg-background", children: currentColor === automaticColor && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react50.Check, { className: "h-3.5 w-3.5" }) }),
32547
32813
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "flex-1 text-center", children: t("colors.automatic") })
32548
32814
  ]
32549
32815
  }
@@ -32560,7 +32826,7 @@ var EditorColorPalette = ({
32560
32826
  currentColor === c.color ? "border-primary ring-2 ring-primary/25" : "border-border/70"
32561
32827
  ),
32562
32828
  style: { backgroundColor: c.color || "transparent" },
32563
- children: currentColor === c.color && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react51.Check, { className: cn("h-3.5 w-3.5", getSwatchCheckClass(c.color)) }) })
32829
+ children: currentColor === c.color && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react50.Check, { className: cn("h-3.5 w-3.5", getSwatchCheckClass(c.color)) }) })
32564
32830
  }
32565
32831
  ) }, `${c.name}-${c.color}`)) }),
32566
32832
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
@@ -32582,7 +32848,7 @@ var EditorColorPalette = ({
32582
32848
  }
32583
32849
  ),
32584
32850
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "flex-1 text-center", children: t("colors.moreColors") }),
32585
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react51.Palette, { className: "h-4 w-4 text-muted-foreground" }),
32851
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react50.Palette, { className: "h-4 w-4 text-muted-foreground" }),
32586
32852
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
32587
32853
  "input",
32588
32854
  {
@@ -32728,8 +32994,8 @@ function deleteSelectedImage(editor) {
32728
32994
  }
32729
32995
 
32730
32996
  // src/components/UEditor/inputs.tsx
32731
- var import_react69 = require("react");
32732
- var import_lucide_react52 = require("lucide-react");
32997
+ var import_react70 = require("react");
32998
+ var import_lucide_react51 = require("lucide-react");
32733
32999
  var import_jsx_runtime91 = require("react/jsx-runtime");
32734
33000
  function normalizeUrl(raw) {
32735
33001
  return sanitizeUEditorUrl(raw, "link");
@@ -32740,11 +33006,11 @@ var LinkInput = ({
32740
33006
  initialUrl = ""
32741
33007
  }) => {
32742
33008
  const t = useSmartTranslations("UEditor");
32743
- const [url, setUrl] = (0, import_react69.useState)(initialUrl);
32744
- const [error, setError] = (0, import_react69.useState)("");
32745
- const inputRef = (0, import_react69.useRef)(null);
32746
- const errorId = (0, import_react69.useId)();
32747
- (0, import_react69.useEffect)(() => {
33009
+ const [url, setUrl] = (0, import_react70.useState)(initialUrl);
33010
+ const [error, setError] = (0, import_react70.useState)("");
33011
+ const inputRef = (0, import_react70.useRef)(null);
33012
+ const errorId = (0, import_react70.useId)();
33013
+ (0, import_react70.useEffect)(() => {
32748
33014
  inputRef.current?.focus();
32749
33015
  inputRef.current?.select();
32750
33016
  }, []);
@@ -32776,18 +33042,18 @@ var LinkInput = ({
32776
33042
  className: "flex-1 px-3 py-2 text-sm bg-muted/50 border-0 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 aria-invalid:ring-2 aria-invalid:ring-destructive/40"
32777
33043
  }
32778
33044
  ),
32779
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { type: "submit", className: "p-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react52.Check, { className: "w-4 h-4" }) }),
32780
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { type: "button", onClick: onCancel, className: "p-2 rounded-lg hover:bg-muted transition-colors text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react52.X, { className: "w-4 h-4" }) })
33045
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { type: "submit", className: "p-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react51.Check, { className: "w-4 h-4" }) }),
33046
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { type: "button", onClick: onCancel, className: "p-2 rounded-lg hover:bg-muted transition-colors text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react51.X, { className: "w-4 h-4" }) })
32781
33047
  ] }),
32782
33048
  error ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { id: errorId, role: "alert", className: "mt-1.5 px-1 text-xs text-destructive", children: error }) : null
32783
33049
  ] });
32784
33050
  };
32785
33051
  var ImageInput = ({ onSubmit, onCancel }) => {
32786
33052
  const t = useSmartTranslations("UEditor");
32787
- const [url, setUrl] = (0, import_react69.useState)("");
32788
- const [alt, setAlt] = (0, import_react69.useState)("");
32789
- const inputRef = (0, import_react69.useRef)(null);
32790
- (0, import_react69.useEffect)(() => {
33053
+ const [url, setUrl] = (0, import_react70.useState)("");
33054
+ const [alt, setAlt] = (0, import_react70.useState)("");
33055
+ const inputRef = (0, import_react70.useRef)(null);
33056
+ (0, import_react70.useEffect)(() => {
32791
33057
  inputRef.current?.focus();
32792
33058
  }, []);
32793
33059
  const handleSubmit = (e) => {
@@ -33253,7 +33519,7 @@ function fileToDataUrl2(file) {
33253
33519
  function formatTableInsertLabel(template, rows, cols) {
33254
33520
  return template.replace("{rows}", String(rows)).replace("{cols}", String(cols));
33255
33521
  }
33256
- var ToolbarButton = import_react70.default.forwardRef(({ onClick, onMouseDown, active, disabled, children, title, className }, ref) => {
33522
+ var ToolbarButton = import_react71.default.forwardRef(({ onClick, onMouseDown, active, disabled, children, title, className }, ref) => {
33257
33523
  const button = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33258
33524
  "button",
33259
33525
  {
@@ -33290,7 +33556,7 @@ var TableInsertGrid = ({
33290
33556
  previewTemplate,
33291
33557
  onInsert
33292
33558
  }) => {
33293
- const [selection, setSelection] = import_react70.default.useState({ rows: 3, cols: 3 });
33559
+ const [selection, setSelection] = import_react71.default.useState({ rows: 3, cols: 3 });
33294
33560
  const maxRows = 8;
33295
33561
  const maxCols = 8;
33296
33562
  return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "mb-2 rounded-xl border border-border/60 bg-muted/20 p-2", children: [
@@ -33343,18 +33609,18 @@ var EditorToolbar = ({
33343
33609
  letterSpacings
33344
33610
  }) => {
33345
33611
  const t = useSmartTranslations("UEditor");
33346
- (0, import_react71.useEditorState)({
33612
+ (0, import_react72.useEditorState)({
33347
33613
  editor,
33348
33614
  selector: ({ transactionNumber }) => transactionNumber
33349
33615
  });
33350
33616
  const { textColors, highlightColors } = useEditorColors();
33351
- const [showImageInput, setShowImageInput] = (0, import_react70.useState)(false);
33352
- const [showLinkInput, setShowLinkInput] = (0, import_react70.useState)(false);
33353
- const [isTableMenuOpen, setIsTableMenuOpen] = (0, import_react70.useState)(false);
33354
- const [preservedTableAnchorPos, setPreservedTableAnchorPos] = (0, import_react70.useState)(null);
33355
- const fileInputRef = (0, import_react70.useRef)(null);
33356
- const [isUploadingImage, setIsUploadingImage] = (0, import_react70.useState)(false);
33357
- const [imageUploadError, setImageUploadError] = (0, import_react70.useState)(null);
33617
+ const [showImageInput, setShowImageInput] = (0, import_react71.useState)(false);
33618
+ const [showLinkInput, setShowLinkInput] = (0, import_react71.useState)(false);
33619
+ const [isTableMenuOpen, setIsTableMenuOpen] = (0, import_react71.useState)(false);
33620
+ const [preservedTableAnchorPos, setPreservedTableAnchorPos] = (0, import_react71.useState)(null);
33621
+ const fileInputRef = (0, import_react71.useRef)(null);
33622
+ const [isUploadingImage, setIsUploadingImage] = (0, import_react71.useState)(false);
33623
+ const [imageUploadError, setImageUploadError] = (0, import_react71.useState)(null);
33358
33624
  const isImageSelected = editor.isActive("image");
33359
33625
  const imageAttrs = editor.getAttributes("image");
33360
33626
  const tableAnchorPos = getTableAnchorPos(editor);
@@ -33377,10 +33643,10 @@ var EditorToolbar = ({
33377
33643
  const currentHighlightColor = normalizeStyleValue(editor.getAttributes("highlight").color) || "";
33378
33644
  const currentLineHeight = normalizeStyleValue(textStyleAttrs.lineHeight);
33379
33645
  const currentLetterSpacing = normalizeStyleValue(textStyleAttrs.letterSpacing);
33380
- const availableFontFamilies = import_react70.default.useMemo(() => fontFamilies ?? getDefaultFontFamilies(t), [fontFamilies, t]);
33381
- const availableFontSizes = import_react70.default.useMemo(() => fontSizes ?? getDefaultFontSizes(), [fontSizes]);
33382
- const availableLineHeights = import_react70.default.useMemo(() => lineHeights ?? getDefaultLineHeights(), [lineHeights]);
33383
- const availableLetterSpacings = import_react70.default.useMemo(() => letterSpacings ?? getDefaultLetterSpacings(), [letterSpacings]);
33646
+ const availableFontFamilies = import_react71.default.useMemo(() => fontFamilies ?? getDefaultFontFamilies(t), [fontFamilies, t]);
33647
+ const availableFontSizes = import_react71.default.useMemo(() => fontSizes ?? getDefaultFontSizes(), [fontSizes]);
33648
+ const availableLineHeights = import_react71.default.useMemo(() => lineHeights ?? getDefaultLineHeights(), [lineHeights]);
33649
+ const availableLetterSpacings = import_react71.default.useMemo(() => letterSpacings ?? getDefaultLetterSpacings(), [letterSpacings]);
33384
33650
  const currentFontFamilyDisplayValue = currentFontFamily.split(",")[0]?.trim() ?? currentFontFamily;
33385
33651
  const currentFontFamilyLabel = availableFontFamilies.find((option) => normalizeStyleValue(option.value) === currentFontFamily)?.label ?? (currentFontFamilyDisplayValue || t("toolbar.fontDefault"));
33386
33652
  const currentFontSizeLabel = availableFontSizes.find((option) => normalizeStyleValue(option.value) === currentFontSize)?.label ?? "13";
@@ -33418,18 +33684,18 @@ var EditorToolbar = ({
33418
33684
  };
33419
33685
  if (variant === "minimal") {
33420
33686
  return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border/35 bg-muted/30 p-1.5", children: [
33421
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Undo, { className: "w-4 h-4" }) }),
33422
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Redo, { className: "w-4 h-4" }) }),
33687
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Undo, { className: "w-4 h-4" }) }),
33688
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Redo, { className: "w-4 h-4" }) }),
33423
33689
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarDivider, {}),
33424
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Bold, { className: "w-4 h-4" }) }),
33425
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Italic, { className: "w-4 h-4" }) }),
33690
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Bold, { className: "w-4 h-4" }) }),
33691
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Italic, { className: "w-4 h-4" }) }),
33426
33692
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33427
33693
  ToolbarButton,
33428
33694
  {
33429
33695
  onClick: () => editor.chain().focus().toggleBulletList().run(),
33430
33696
  active: editor.isActive("bulletList"),
33431
33697
  title: t("toolbar.bulletList"),
33432
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.List, { className: "w-4 h-4" })
33698
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.List, { className: "w-4 h-4" })
33433
33699
  }
33434
33700
  ),
33435
33701
  /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
@@ -33437,14 +33703,14 @@ var EditorToolbar = ({
33437
33703
  {
33438
33704
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33439
33705
  }, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: [
33440
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }),
33441
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
33706
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.SquareCheckBig, { className: "w-4 h-4" }),
33707
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33442
33708
  ] }),
33443
33709
  children: [
33444
33710
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33445
33711
  DropdownMenuItem,
33446
33712
  {
33447
- icon: import_lucide_react53.SquareCheckBig,
33713
+ icon: import_lucide_react52.SquareCheckBig,
33448
33714
  label: t("slashCommand.formCheckbox"),
33449
33715
  onClick: () => editor.chain().focus().setFormCheckbox().run()
33450
33716
  }
@@ -33452,7 +33718,7 @@ var EditorToolbar = ({
33452
33718
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33453
33719
  DropdownMenuItem,
33454
33720
  {
33455
- icon: import_lucide_react53.CircleCheckBig,
33721
+ icon: import_lucide_react52.CircleCheckBig,
33456
33722
  label: t("slashCommand.roundCheckbox"),
33457
33723
  onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
33458
33724
  }
@@ -33464,7 +33730,7 @@ var EditorToolbar = ({
33464
33730
  DropdownMenu,
33465
33731
  {
33466
33732
  contentClassName: "min-w-72",
33467
- trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Link, { className: "w-4 h-4" }) }),
33733
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Link, { className: "w-4 h-4" }) }),
33468
33734
  children: showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33469
33735
  LinkInput,
33470
33736
  {
@@ -33479,7 +33745,7 @@ var EditorToolbar = ({
33479
33745
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33480
33746
  DropdownMenuItem,
33481
33747
  {
33482
- icon: import_lucide_react53.Link,
33748
+ icon: import_lucide_react52.Link,
33483
33749
  label: t("toolbar.link"),
33484
33750
  onClick: () => setShowLinkInput(true),
33485
33751
  active: editor.isActive("link"),
@@ -33489,7 +33755,7 @@ var EditorToolbar = ({
33489
33755
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33490
33756
  DropdownMenuItem,
33491
33757
  {
33492
- icon: import_lucide_react53.Trash2,
33758
+ icon: import_lucide_react52.Trash2,
33493
33759
  label: t("toolbar.removeLink"),
33494
33760
  onClick: () => editor.chain().focus().extendMarkRange("link").unsetLink().run(),
33495
33761
  disabled: !editor.isActive("link"),
@@ -33501,7 +33767,7 @@ var EditorToolbar = ({
33501
33767
  )
33502
33768
  ] });
33503
33769
  }
33504
- const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? import_lucide_react53.AlignCenterVertical : currentCellVerticalAlign === "bottom" ? import_lucide_react53.AlignEndVertical : import_lucide_react53.AlignStartVertical;
33770
+ const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? import_lucide_react52.AlignCenterVertical : currentCellVerticalAlign === "bottom" ? import_lucide_react52.AlignEndVertical : import_lucide_react52.AlignStartVertical;
33505
33771
  return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border/35 bg-linear-to-r from-muted/25 to-transparent p-1.5", children: [
33506
33772
  isFull && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33507
33773
  DropdownMenu,
@@ -33509,7 +33775,7 @@ var EditorToolbar = ({
33509
33775
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33510
33776
  }, title: t("toolbar.fontFamily"), className: "min-w-0 max-w-40 px-1.5 w-auto gap-1", children: [
33511
33777
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "max-w-28 truncate text-xs font-medium", style: { fontFamily: displayedFontFamilyValue || void 0 }, children: displayedFontFamilyLabel }),
33512
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
33778
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
33513
33779
  ] }),
33514
33780
  contentClassName: "max-h-80 overflow-y-auto min-w-56 p-2",
33515
33781
  children: availableFontFamilies.map((option) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -33530,10 +33796,10 @@ var EditorToolbar = ({
33530
33796
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33531
33797
  }, title: t("toolbar.fontSize"), className: "px-1.5 w-auto gap-1", children: [
33532
33798
  /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center gap-0.5", children: [
33533
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronsUpDown, { className: "h-3 w-3 text-muted-foreground", strokeWidth: 2.5 }),
33799
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronsUpDown, { className: "h-3 w-3 text-muted-foreground", strokeWidth: 2.5 }),
33534
33800
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "min-w-4 text-center text-xs font-semibold leading-none", children: displayedFontSizeLabel })
33535
33801
  ] }),
33536
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
33802
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
33537
33803
  ] }),
33538
33804
  contentClassName: "max-h-80 overflow-y-auto min-w-32 p-2",
33539
33805
  children: availableFontSizes.map((option) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -33553,14 +33819,14 @@ var EditorToolbar = ({
33553
33819
  contentClassName: "p-1",
33554
33820
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33555
33821
  }, title: t("toolbar.textStyle"), className: "px-1.5 w-auto gap-0.5", children: [
33556
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Type, { className: "w-4 h-4" }),
33557
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
33822
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Type, { className: "w-4 h-4" }),
33823
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
33558
33824
  ] }),
33559
33825
  children: [
33560
33826
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33561
33827
  DropdownMenuItem,
33562
33828
  {
33563
- icon: import_lucide_react53.Type,
33829
+ icon: import_lucide_react52.Type,
33564
33830
  label: t("toolbar.normal"),
33565
33831
  onClick: () => editor.chain().focus().setParagraph().run(),
33566
33832
  active: editor.isActive("paragraph")
@@ -33569,7 +33835,7 @@ var EditorToolbar = ({
33569
33835
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33570
33836
  DropdownMenuItem,
33571
33837
  {
33572
- icon: import_lucide_react53.Heading1,
33838
+ icon: import_lucide_react52.Heading1,
33573
33839
  label: t("toolbar.heading1"),
33574
33840
  onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
33575
33841
  active: editor.isActive("heading", { level: 1 }),
@@ -33579,7 +33845,7 @@ var EditorToolbar = ({
33579
33845
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33580
33846
  DropdownMenuItem,
33581
33847
  {
33582
- icon: import_lucide_react53.Heading2,
33848
+ icon: import_lucide_react52.Heading2,
33583
33849
  label: t("toolbar.heading2"),
33584
33850
  onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
33585
33851
  active: editor.isActive("heading", { level: 2 }),
@@ -33589,7 +33855,7 @@ var EditorToolbar = ({
33589
33855
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33590
33856
  DropdownMenuItem,
33591
33857
  {
33592
- icon: import_lucide_react53.Heading3,
33858
+ icon: import_lucide_react52.Heading3,
33593
33859
  label: t("toolbar.heading3"),
33594
33860
  onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
33595
33861
  active: editor.isActive("heading", { level: 3 }),
@@ -33605,15 +33871,15 @@ var EditorToolbar = ({
33605
33871
  {
33606
33872
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33607
33873
  }, title: t("toolbar.lineHeight"), className: "gap-0.5", children: [
33608
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowUp, { className: "w-3 h-3" }),
33609
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowDown, { className: "w-3 h-3" })
33874
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowUp, { className: "w-3 h-3" }),
33875
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowDown, { className: "w-3 h-3" })
33610
33876
  ] }),
33611
33877
  contentClassName: "max-h-72 overflow-y-auto p-1",
33612
33878
  children: [
33613
33879
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33614
33880
  DropdownMenuItem,
33615
33881
  {
33616
- icon: import_lucide_react53.Type,
33882
+ icon: import_lucide_react52.Type,
33617
33883
  label: t("toolbar.lineHeightDefault"),
33618
33884
  onClick: () => editor.chain().focus().unsetLineHeight().run(),
33619
33885
  active: !currentLineHeight
@@ -33636,15 +33902,15 @@ var EditorToolbar = ({
33636
33902
  {
33637
33903
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33638
33904
  }, title: t("toolbar.letterSpacing"), className: "gap-0.5", children: [
33639
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowLeft, { className: "w-3 h-3" }),
33640
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowRight, { className: "w-3 h-3" })
33905
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowLeft, { className: "w-3 h-3" }),
33906
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowRight, { className: "w-3 h-3" })
33641
33907
  ] }),
33642
33908
  contentClassName: "max-h-72 overflow-y-auto p-1",
33643
33909
  children: [
33644
33910
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33645
33911
  DropdownMenuItem,
33646
33912
  {
33647
- icon: import_lucide_react53.Type,
33913
+ icon: import_lucide_react52.Type,
33648
33914
  label: t("toolbar.letterSpacingDefault"),
33649
33915
  onClick: () => editor.chain().focus().unsetLetterSpacing().run(),
33650
33916
  active: !currentLetterSpacing
@@ -33664,19 +33930,19 @@ var EditorToolbar = ({
33664
33930
  )
33665
33931
  ] }),
33666
33932
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarDivider, {}),
33667
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Bold, { className: "w-4 h-4" }) }),
33668
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Italic, { className: "w-4 h-4" }) }),
33933
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Bold, { className: "w-4 h-4" }) }),
33934
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Italic, { className: "w-4 h-4" }) }),
33669
33935
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33670
33936
  ToolbarButton,
33671
33937
  {
33672
33938
  onClick: () => editor.chain().focus().toggleUnderline().run(),
33673
33939
  active: editor.isActive("underline"),
33674
33940
  title: t("toolbar.underline"),
33675
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Underline, { className: "w-4 h-4" })
33941
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Underline, { className: "w-4 h-4" })
33676
33942
  }
33677
33943
  ),
33678
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Strikethrough, { className: "w-4 h-4" }) }),
33679
- (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Code, { className: "w-4 h-4" }) }),
33944
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Strikethrough, { className: "w-4 h-4" }) }),
33945
+ (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Code, { className: "w-4 h-4" }) }),
33680
33946
  isFull && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
33681
33947
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33682
33948
  ToolbarButton,
@@ -33684,7 +33950,7 @@ var EditorToolbar = ({
33684
33950
  onClick: () => editor.chain().focus().toggleSubscript().run(),
33685
33951
  active: editor.isActive("subscript"),
33686
33952
  title: t("toolbar.subscript"),
33687
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Subscript, { className: "w-4 h-4" })
33953
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Subscript, { className: "w-4 h-4" })
33688
33954
  }
33689
33955
  ),
33690
33956
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -33693,7 +33959,7 @@ var EditorToolbar = ({
33693
33959
  onClick: () => editor.chain().focus().toggleSuperscript().run(),
33694
33960
  active: editor.isActive("superscript"),
33695
33961
  title: t("toolbar.superscript"),
33696
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Superscript, { className: "w-4 h-4" })
33962
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Superscript, { className: "w-4 h-4" })
33697
33963
  }
33698
33964
  )
33699
33965
  ] }),
@@ -33701,7 +33967,7 @@ var EditorToolbar = ({
33701
33967
  DropdownMenu,
33702
33968
  {
33703
33969
  contentClassName: "min-w-72",
33704
- trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Link, { className: "w-4 h-4" }) }),
33970
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Link, { className: "w-4 h-4" }) }),
33705
33971
  children: showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33706
33972
  LinkInput,
33707
33973
  {
@@ -33716,7 +33982,7 @@ var EditorToolbar = ({
33716
33982
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33717
33983
  DropdownMenuItem,
33718
33984
  {
33719
- icon: import_lucide_react53.Link,
33985
+ icon: import_lucide_react52.Link,
33720
33986
  label: t("toolbar.link"),
33721
33987
  onClick: () => setShowLinkInput(true),
33722
33988
  active: editor.isActive("link"),
@@ -33726,7 +33992,7 @@ var EditorToolbar = ({
33726
33992
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33727
33993
  DropdownMenuItem,
33728
33994
  {
33729
- icon: import_lucide_react53.Trash2,
33995
+ icon: import_lucide_react52.Trash2,
33730
33996
  label: t("toolbar.removeLink"),
33731
33997
  onClick: () => editor.chain().focus().extendMarkRange("link").unsetLink().run(),
33732
33998
  disabled: !editor.isActive("link"),
@@ -33743,7 +34009,7 @@ var EditorToolbar = ({
33743
34009
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33744
34010
  }, title: t("colors.textColor"), children: [
33745
34011
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TextColorIcon, { color: currentTextColor }),
33746
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34012
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33747
34013
  ] }),
33748
34014
  children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33749
34015
  EditorColorPalette,
@@ -33768,7 +34034,7 @@ var EditorToolbar = ({
33768
34034
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33769
34035
  }, active: editor.isActive("highlight"), title: t("colors.highlight"), children: [
33770
34036
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(HighlightColorIcon, { color: currentHighlightColor }),
33771
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34037
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33772
34038
  ] }),
33773
34039
  children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33774
34040
  EditorColorPalette,
@@ -33794,7 +34060,7 @@ var EditorToolbar = ({
33794
34060
  {
33795
34061
  contentClassName: "p-0 overflow-hidden",
33796
34062
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => {
33797
- }, title: t("toolbar.emoji"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Smile, { className: "w-4 h-4" }) }),
34063
+ }, title: t("toolbar.emoji"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Smile, { className: "w-4 h-4" }) }),
33798
34064
  children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33799
34065
  EmojiPicker2,
33800
34066
  {
@@ -33813,14 +34079,14 @@ var EditorToolbar = ({
33813
34079
  {
33814
34080
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33815
34081
  }, title: t("toolbar.alignment"), children: [
33816
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.AlignLeft, { className: "w-4 h-4" }),
33817
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34082
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.AlignLeft, { className: "w-4 h-4" }),
34083
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33818
34084
  ] }),
33819
34085
  children: [
33820
34086
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33821
34087
  DropdownMenuItem,
33822
34088
  {
33823
- icon: import_lucide_react53.AlignLeft,
34089
+ icon: import_lucide_react52.AlignLeft,
33824
34090
  label: t("toolbar.alignLeft"),
33825
34091
  onClick: () => editor.chain().focus().setTextAlign("left").run(),
33826
34092
  active: editor.isActive({ textAlign: "left" })
@@ -33829,7 +34095,7 @@ var EditorToolbar = ({
33829
34095
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33830
34096
  DropdownMenuItem,
33831
34097
  {
33832
- icon: import_lucide_react53.AlignCenter,
34098
+ icon: import_lucide_react52.AlignCenter,
33833
34099
  label: t("toolbar.alignCenter"),
33834
34100
  onClick: () => editor.chain().focus().setTextAlign("center").run(),
33835
34101
  active: editor.isActive({ textAlign: "center" })
@@ -33838,7 +34104,7 @@ var EditorToolbar = ({
33838
34104
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33839
34105
  DropdownMenuItem,
33840
34106
  {
33841
- icon: import_lucide_react53.AlignRight,
34107
+ icon: import_lucide_react52.AlignRight,
33842
34108
  label: t("toolbar.alignRight"),
33843
34109
  onClick: () => editor.chain().focus().setTextAlign("right").run(),
33844
34110
  active: editor.isActive({ textAlign: "right" })
@@ -33847,7 +34113,7 @@ var EditorToolbar = ({
33847
34113
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33848
34114
  DropdownMenuItem,
33849
34115
  {
33850
- icon: import_lucide_react53.AlignJustify,
34116
+ icon: import_lucide_react52.AlignJustify,
33851
34117
  label: t("toolbar.justify"),
33852
34118
  onClick: () => editor.chain().focus().setTextAlign("justify").run(),
33853
34119
  active: editor.isActive({ textAlign: "justify" })
@@ -33858,7 +34124,7 @@ var EditorToolbar = ({
33858
34124
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33859
34125
  DropdownMenuItem,
33860
34126
  {
33861
- icon: import_lucide_react53.AlignStartVertical,
34127
+ icon: import_lucide_react52.AlignStartVertical,
33862
34128
  label: t("tableMenu.alignVerticalTop") || "Align top",
33863
34129
  onClick: () => applyTableCellAttribute(editor, "verticalAlign", "top"),
33864
34130
  active: currentCellVerticalAlign === "top"
@@ -33867,7 +34133,7 @@ var EditorToolbar = ({
33867
34133
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33868
34134
  DropdownMenuItem,
33869
34135
  {
33870
- icon: import_lucide_react53.AlignCenterVertical,
34136
+ icon: import_lucide_react52.AlignCenterVertical,
33871
34137
  label: t("tableMenu.alignVerticalMiddle") || "Align middle",
33872
34138
  onClick: () => applyTableCellAttribute(editor, "verticalAlign", "middle"),
33873
34139
  active: currentCellVerticalAlign === "middle"
@@ -33876,7 +34142,7 @@ var EditorToolbar = ({
33876
34142
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33877
34143
  DropdownMenuItem,
33878
34144
  {
33879
- icon: import_lucide_react53.AlignEndVertical,
34145
+ icon: import_lucide_react52.AlignEndVertical,
33880
34146
  label: t("tableMenu.alignVerticalBottom") || "Align bottom",
33881
34147
  onClick: () => applyTableCellAttribute(editor, "verticalAlign", "bottom"),
33882
34148
  active: currentCellVerticalAlign === "bottom"
@@ -33891,14 +34157,14 @@ var EditorToolbar = ({
33891
34157
  {
33892
34158
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33893
34159
  }, title: t("tableMenu.textDirection"), children: [
33894
- currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" }),
33895
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34160
+ currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowRight, { className: "w-4 h-4" }),
34161
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33896
34162
  ] }),
33897
34163
  children: [
33898
34164
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33899
34165
  DropdownMenuItem,
33900
34166
  {
33901
- icon: import_lucide_react53.ArrowRight,
34167
+ icon: import_lucide_react52.ArrowRight,
33902
34168
  label: t("tableMenu.horizontalText"),
33903
34169
  onClick: () => applyTableCellAttribute(editor, "textDirection", null),
33904
34170
  active: currentCellTextDirection === "horizontal"
@@ -33907,7 +34173,7 @@ var EditorToolbar = ({
33907
34173
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33908
34174
  DropdownMenuItem,
33909
34175
  {
33910
- icon: import_lucide_react53.ArrowDown,
34176
+ icon: import_lucide_react52.ArrowDown,
33911
34177
  label: t("tableMenu.verticalText"),
33912
34178
  onClick: () => applyTableCellAttribute(editor, "textDirection", "vertical"),
33913
34179
  active: currentCellTextDirection === "vertical"
@@ -33923,14 +34189,14 @@ var EditorToolbar = ({
33923
34189
  {
33924
34190
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33925
34191
  }, title: t("toolbar.bulletList"), children: [
33926
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.List, { className: "w-4 h-4" }),
33927
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34192
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.List, { className: "w-4 h-4" }),
34193
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33928
34194
  ] }),
33929
34195
  children: [
33930
34196
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33931
34197
  DropdownMenuItem,
33932
34198
  {
33933
- icon: import_lucide_react53.List,
34199
+ icon: import_lucide_react52.List,
33934
34200
  label: t("toolbar.bulletList"),
33935
34201
  onClick: () => editor.chain().focus().toggleBulletList().run(),
33936
34202
  active: editor.isActive("bulletList"),
@@ -33940,7 +34206,7 @@ var EditorToolbar = ({
33940
34206
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33941
34207
  DropdownMenuItem,
33942
34208
  {
33943
- icon: import_lucide_react53.ListOrdered,
34209
+ icon: import_lucide_react52.ListOrdered,
33944
34210
  label: t("toolbar.orderedList"),
33945
34211
  onClick: () => editor.chain().focus().toggleOrderedList().run(),
33946
34212
  active: editor.isActive("orderedList"),
@@ -33950,7 +34216,7 @@ var EditorToolbar = ({
33950
34216
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33951
34217
  DropdownMenuItem,
33952
34218
  {
33953
- icon: import_lucide_react53.ListTodo,
34219
+ icon: import_lucide_react52.ListTodo,
33954
34220
  label: t("toolbar.taskList"),
33955
34221
  onClick: () => editor.chain().focus().toggleTaskList().run(),
33956
34222
  active: editor.isActive("taskList"),
@@ -33965,14 +34231,14 @@ var EditorToolbar = ({
33965
34231
  {
33966
34232
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33967
34233
  }, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: [
33968
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }),
33969
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34234
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.SquareCheckBig, { className: "w-4 h-4" }),
34235
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33970
34236
  ] }),
33971
34237
  children: [
33972
34238
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33973
34239
  DropdownMenuItem,
33974
34240
  {
33975
- icon: import_lucide_react53.SquareCheckBig,
34241
+ icon: import_lucide_react52.SquareCheckBig,
33976
34242
  label: t("slashCommand.formCheckbox"),
33977
34243
  onClick: () => editor.chain().focus().setFormCheckbox().run()
33978
34244
  }
@@ -33980,7 +34246,7 @@ var EditorToolbar = ({
33980
34246
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
33981
34247
  DropdownMenuItem,
33982
34248
  {
33983
- icon: import_lucide_react53.CircleCheckBig,
34249
+ icon: import_lucide_react52.CircleCheckBig,
33984
34250
  label: t("slashCommand.roundCheckbox"),
33985
34251
  onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
33986
34252
  }
@@ -33988,20 +34254,20 @@ var EditorToolbar = ({
33988
34254
  ]
33989
34255
  }
33990
34256
  ),
33991
- isMediumFull && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBlockquote().run(), active: editor.isActive("blockquote"), title: t("toolbar.quote"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Quote, { className: "w-4 h-4" }) }),
34257
+ isMediumFull && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBlockquote().run(), active: editor.isActive("blockquote"), title: t("toolbar.quote"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Quote, { className: "w-4 h-4" }) }),
33992
34258
  isFull && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
33993
34259
  DropdownMenu,
33994
34260
  {
33995
34261
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
33996
34262
  }, title: t("toolbar.quote"), children: [
33997
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Quote, { className: "w-4 h-4" }),
33998
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34263
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Quote, { className: "w-4 h-4" }),
34264
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
33999
34265
  ] }),
34000
34266
  children: [
34001
34267
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34002
34268
  DropdownMenuItem,
34003
34269
  {
34004
- icon: import_lucide_react53.Quote,
34270
+ icon: import_lucide_react52.Quote,
34005
34271
  label: t("toolbar.quote"),
34006
34272
  onClick: () => editor.chain().focus().toggleBlockquote().run(),
34007
34273
  active: editor.isActive("blockquote"),
@@ -34011,7 +34277,7 @@ var EditorToolbar = ({
34011
34277
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34012
34278
  DropdownMenuItem,
34013
34279
  {
34014
- icon: import_lucide_react53.FileCode,
34280
+ icon: import_lucide_react52.FileCode,
34015
34281
  label: t("toolbar.codeBlock"),
34016
34282
  onClick: () => editor.chain().focus().toggleCodeBlock().run(),
34017
34283
  active: editor.isActive("codeBlock"),
@@ -34026,8 +34292,8 @@ var EditorToolbar = ({
34026
34292
  {
34027
34293
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
34028
34294
  }, title: t("toolbar.image"), children: [
34029
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Image, { className: "w-4 h-4" }),
34030
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34295
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Image, { className: "w-4 h-4" }),
34296
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
34031
34297
  ] }),
34032
34298
  children: showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34033
34299
  ImageInput,
@@ -34039,11 +34305,11 @@ var EditorToolbar = ({
34039
34305
  onCancel: () => setShowImageInput(false)
34040
34306
  }
34041
34307
  ) : /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
34042
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DropdownMenuItem, { icon: import_lucide_react53.Link, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true), closeOnSelect: false }),
34308
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DropdownMenuItem, { icon: import_lucide_react52.Link, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true), closeOnSelect: false }),
34043
34309
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34044
34310
  DropdownMenuItem,
34045
34311
  {
34046
- icon: import_lucide_react53.Upload,
34312
+ icon: import_lucide_react52.Upload,
34047
34313
  label: isUploadingImage ? t("imageInput.uploading") : t("imageInput.uploadTab"),
34048
34314
  disabled: isUploadingImage,
34049
34315
  onClick: () => fileInputRef.current?.click(),
@@ -34070,7 +34336,7 @@ var EditorToolbar = ({
34070
34336
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34071
34337
  DropdownMenuItem,
34072
34338
  {
34073
- icon: import_lucide_react53.AlignCenter,
34339
+ icon: import_lucide_react52.AlignCenter,
34074
34340
  label: t("toolbar.imageLayoutBlock"),
34075
34341
  onClick: () => applyImageLayout(editor, "block"),
34076
34342
  active: isImageSelected && imageLayout === "block",
@@ -34080,7 +34346,7 @@ var EditorToolbar = ({
34080
34346
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34081
34347
  DropdownMenuItem,
34082
34348
  {
34083
- icon: import_lucide_react53.AlignLeft,
34349
+ icon: import_lucide_react52.AlignLeft,
34084
34350
  label: t("toolbar.imageLayoutLeft"),
34085
34351
  onClick: () => applyImageLayout(editor, "left"),
34086
34352
  active: isImageSelected && imageLayout === "left",
@@ -34090,7 +34356,7 @@ var EditorToolbar = ({
34090
34356
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34091
34357
  DropdownMenuItem,
34092
34358
  {
34093
- icon: import_lucide_react53.AlignRight,
34359
+ icon: import_lucide_react52.AlignRight,
34094
34360
  label: t("toolbar.imageLayoutRight"),
34095
34361
  onClick: () => applyImageLayout(editor, "right"),
34096
34362
  active: isImageSelected && imageLayout === "right",
@@ -34129,7 +34395,7 @@ var EditorToolbar = ({
34129
34395
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34130
34396
  DropdownMenuItem,
34131
34397
  {
34132
- icon: import_lucide_react53.RotateCcw,
34398
+ icon: import_lucide_react52.RotateCcw,
34133
34399
  label: t("toolbar.imageResetSize"),
34134
34400
  onClick: () => resetImageSize(editor),
34135
34401
  disabled: !isImageSelected
@@ -34138,7 +34404,7 @@ var EditorToolbar = ({
34138
34404
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34139
34405
  DropdownMenuItem,
34140
34406
  {
34141
- icon: import_lucide_react53.Trash2,
34407
+ icon: import_lucide_react52.Trash2,
34142
34408
  label: t("toolbar.imageDelete"),
34143
34409
  onClick: () => deleteSelectedImage(editor),
34144
34410
  disabled: !isImageSelected,
@@ -34158,8 +34424,8 @@ var EditorToolbar = ({
34158
34424
  },
34159
34425
  trigger: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToolbarButton, { onClick: () => {
34160
34426
  }, title: t("toolbar.table"), children: [
34161
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Table, { className: "w-4 h-4" }),
34162
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
34427
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Table, { className: "w-4 h-4" }),
34428
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ChevronDown, { className: "w-3 h-3" })
34163
34429
  ] }),
34164
34430
  contentClassName: "p-2 min-w-56",
34165
34431
  children: [
@@ -34179,7 +34445,7 @@ var EditorToolbar = ({
34179
34445
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34180
34446
  DropdownMenuItem,
34181
34447
  {
34182
- icon: import_lucide_react53.AlignLeft,
34448
+ icon: import_lucide_react52.AlignLeft,
34183
34449
  label: t("tableMenu.alignLeft"),
34184
34450
  onClick: () => applyTableAlignment(editor, "left", tableCommandAnchorPos),
34185
34451
  active: hasTableContext && currentTableAlign === "left",
@@ -34189,7 +34455,7 @@ var EditorToolbar = ({
34189
34455
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34190
34456
  DropdownMenuItem,
34191
34457
  {
34192
- icon: import_lucide_react53.AlignCenter,
34458
+ icon: import_lucide_react52.AlignCenter,
34193
34459
  label: t("tableMenu.alignCenter"),
34194
34460
  onClick: () => applyTableAlignment(editor, "center", tableCommandAnchorPos),
34195
34461
  active: hasTableContext && currentTableAlign === "center",
@@ -34199,7 +34465,7 @@ var EditorToolbar = ({
34199
34465
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34200
34466
  DropdownMenuItem,
34201
34467
  {
34202
- icon: import_lucide_react53.AlignRight,
34468
+ icon: import_lucide_react52.AlignRight,
34203
34469
  label: t("tableMenu.alignRight"),
34204
34470
  onClick: () => applyTableAlignment(editor, "right", tableCommandAnchorPos),
34205
34471
  active: hasTableContext && currentTableAlign === "right",
@@ -34210,7 +34476,7 @@ var EditorToolbar = ({
34210
34476
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34211
34477
  DropdownMenuItem,
34212
34478
  {
34213
- icon: import_lucide_react53.ArrowLeft,
34479
+ icon: import_lucide_react52.ArrowLeft,
34214
34480
  label: t("tableMenu.addColumnBefore"),
34215
34481
  onClick: () => editor.chain().focus().addColumnBefore().run(),
34216
34482
  disabled: !hasTableContext || !editor.can().addColumnBefore()
@@ -34219,7 +34485,7 @@ var EditorToolbar = ({
34219
34485
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34220
34486
  DropdownMenuItem,
34221
34487
  {
34222
- icon: import_lucide_react53.ArrowDown,
34488
+ icon: import_lucide_react52.ArrowDown,
34223
34489
  label: t("tableMenu.addColumnAfter"),
34224
34490
  onClick: () => editor.chain().focus().addColumnAfter().run(),
34225
34491
  disabled: !hasTableContext || !editor.can().addColumnAfter()
@@ -34228,7 +34494,7 @@ var EditorToolbar = ({
34228
34494
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34229
34495
  DropdownMenuItem,
34230
34496
  {
34231
- icon: import_lucide_react53.ArrowUp,
34497
+ icon: import_lucide_react52.ArrowUp,
34232
34498
  label: t("tableMenu.addRowBefore"),
34233
34499
  onClick: () => editor.chain().focus().addRowBefore().run(),
34234
34500
  disabled: !hasTableContext || !editor.can().addRowBefore()
@@ -34237,7 +34503,7 @@ var EditorToolbar = ({
34237
34503
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34238
34504
  DropdownMenuItem,
34239
34505
  {
34240
- icon: import_lucide_react53.ArrowRight,
34506
+ icon: import_lucide_react52.ArrowRight,
34241
34507
  label: t("tableMenu.addRowAfter"),
34242
34508
  onClick: () => editor.chain().focus().addRowAfter().run(),
34243
34509
  disabled: !hasTableContext || !editor.can().addRowAfter()
@@ -34247,7 +34513,7 @@ var EditorToolbar = ({
34247
34513
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34248
34514
  DropdownMenuItem,
34249
34515
  {
34250
- icon: import_lucide_react53.Table,
34516
+ icon: import_lucide_react52.Table,
34251
34517
  label: t("tableMenu.toggleHeaderRow"),
34252
34518
  onClick: () => editor.chain().focus().toggleHeaderRow().run(),
34253
34519
  disabled: !hasTableContext || !editor.can().toggleHeaderRow()
@@ -34256,7 +34522,7 @@ var EditorToolbar = ({
34256
34522
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34257
34523
  DropdownMenuItem,
34258
34524
  {
34259
- icon: import_lucide_react53.Table,
34525
+ icon: import_lucide_react52.Table,
34260
34526
  label: t("tableMenu.toggleHeaderColumn"),
34261
34527
  onClick: () => editor.chain().focus().toggleHeaderColumn().run(),
34262
34528
  disabled: !hasTableContext || !editor.can().toggleHeaderColumn()
@@ -34266,7 +34532,7 @@ var EditorToolbar = ({
34266
34532
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34267
34533
  DropdownMenuItem,
34268
34534
  {
34269
- icon: import_lucide_react53.Trash2,
34535
+ icon: import_lucide_react52.Trash2,
34270
34536
  label: t("tableMenu.deleteColumn"),
34271
34537
  onClick: () => editor.chain().focus().deleteColumn().run(),
34272
34538
  disabled: !hasTableContext || !editor.can().deleteColumn()
@@ -34275,7 +34541,7 @@ var EditorToolbar = ({
34275
34541
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34276
34542
  DropdownMenuItem,
34277
34543
  {
34278
- icon: import_lucide_react53.Trash2,
34544
+ icon: import_lucide_react52.Trash2,
34279
34545
  label: t("tableMenu.deleteRow"),
34280
34546
  onClick: () => editor.chain().focus().deleteRow().run(),
34281
34547
  disabled: !hasTableContext || !editor.can().deleteRow()
@@ -34284,7 +34550,7 @@ var EditorToolbar = ({
34284
34550
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
34285
34551
  DropdownMenuItem,
34286
34552
  {
34287
- icon: import_lucide_react53.Trash2,
34553
+ icon: import_lucide_react52.Trash2,
34288
34554
  label: t("tableMenu.deleteTable"),
34289
34555
  onClick: () => editor.chain().focus().deleteTable().run(),
34290
34556
  disabled: !hasTableContext || !editor.can().deleteTable()
@@ -34294,8 +34560,8 @@ var EditorToolbar = ({
34294
34560
  }
34295
34561
  ),
34296
34562
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarDivider, {}),
34297
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Undo, { className: "w-4 h-4" }) }),
34298
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.Redo, { className: "w-4 h-4" }) }),
34563
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Undo, { className: "w-4 h-4" }) }),
34564
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.Redo, { className: "w-4 h-4" }) }),
34299
34565
  hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
34300
34566
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ToolbarDivider, {}),
34301
34567
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -34304,7 +34570,7 @@ var EditorToolbar = ({
34304
34570
  onClick: () => editor.chain().focus().addColumnBefore().run(),
34305
34571
  disabled: !editor.can().addColumnBefore(),
34306
34572
  title: t("tableMenu.addColumnBefore"),
34307
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowLeft, { className: "w-4 h-4" })
34573
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowLeft, { className: "w-4 h-4" })
34308
34574
  }
34309
34575
  ),
34310
34576
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -34313,7 +34579,7 @@ var EditorToolbar = ({
34313
34579
  onClick: () => editor.chain().focus().addColumnAfter().run(),
34314
34580
  disabled: !editor.can().addColumnAfter(),
34315
34581
  title: t("tableMenu.addColumnAfter"),
34316
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" })
34582
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowRight, { className: "w-4 h-4" })
34317
34583
  }
34318
34584
  ),
34319
34585
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -34322,7 +34588,7 @@ var EditorToolbar = ({
34322
34588
  onClick: () => editor.chain().focus().addRowBefore().run(),
34323
34589
  disabled: !editor.can().addRowBefore(),
34324
34590
  title: t("tableMenu.addRowBefore"),
34325
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowUp, { className: "w-4 h-4" })
34591
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowUp, { className: "w-4 h-4" })
34326
34592
  }
34327
34593
  ),
34328
34594
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -34331,7 +34597,7 @@ var EditorToolbar = ({
34331
34597
  onClick: () => editor.chain().focus().addRowAfter().run(),
34332
34598
  disabled: !editor.can().addRowAfter(),
34333
34599
  title: t("tableMenu.addRowAfter"),
34334
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" })
34600
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.ArrowDown, { className: "w-4 h-4" })
34335
34601
  }
34336
34602
  ),
34337
34603
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
@@ -34347,7 +34613,7 @@ var EditorToolbar = ({
34347
34613
  active: canSplitCell,
34348
34614
  disabled: !canMergeCells && !canSplitCell,
34349
34615
  title: canSplitCell ? t("tableMenu.splitCell") : t("tableMenu.mergeCells"),
34350
- children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react53.TableCellsMerge, { className: "w-4 h-4" })
34616
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react52.TableCellsMerge, { className: "w-4 h-4" })
34351
34617
  }
34352
34618
  )
34353
34619
  ] })
@@ -34355,11 +34621,11 @@ var EditorToolbar = ({
34355
34621
  };
34356
34622
 
34357
34623
  // src/components/UEditor/menus.tsx
34358
- var import_react72 = require("react");
34359
- var import_react73 = require("@tiptap/react");
34624
+ var import_react73 = require("react");
34625
+ var import_react74 = require("@tiptap/react");
34360
34626
  var import_tables7 = require("@tiptap/pm/tables");
34361
34627
  var import_react_dom8 = require("react-dom");
34362
- var import_lucide_react54 = require("lucide-react");
34628
+ var import_lucide_react53 = require("lucide-react");
34363
34629
 
34364
34630
  // src/components/UEditor/table-border-commands.ts
34365
34631
  var import_tables5 = require("@tiptap/pm/tables");
@@ -35434,10 +35700,10 @@ function recalculateAllTableFormulas(editor) {
35434
35700
  var import_jsx_runtime93 = require("react/jsx-runtime");
35435
35701
  var FloatingSlashCommandMenu = ({ editor, onClose }) => {
35436
35702
  const t = useSmartTranslations("UEditor");
35437
- const messages = (0, import_react72.useMemo)(() => buildSlashCommandMessages(t), [t]);
35438
- const items = (0, import_react72.useMemo)(() => buildSlashCommandItems({ query: "", messages }), [messages]);
35439
- const listRef = (0, import_react72.useRef)(null);
35440
- (0, import_react72.useEffect)(() => {
35703
+ const messages = (0, import_react73.useMemo)(() => buildSlashCommandMessages(t), [t]);
35704
+ const items = (0, import_react73.useMemo)(() => buildSlashCommandItems({ query: "", messages }), [messages]);
35705
+ const listRef = (0, import_react73.useRef)(null);
35706
+ (0, import_react73.useEffect)(() => {
35441
35707
  const handleKeyDown2 = (event) => {
35442
35708
  if (event.key === "Escape") {
35443
35709
  event.preventDefault();
@@ -35467,7 +35733,7 @@ var FloatingSlashCommandMenu = ({ editor, onClose }) => {
35467
35733
  };
35468
35734
  var FloatingMenuContent = ({ editor }) => {
35469
35735
  const t = useSmartTranslations("UEditor");
35470
- const [showCommands, setShowCommands] = (0, import_react72.useState)(false);
35736
+ const [showCommands, setShowCommands] = (0, import_react73.useState)(false);
35471
35737
  if (showCommands) {
35472
35738
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FloatingSlashCommandMenu, { editor, onClose: () => setShowCommands(false) });
35473
35739
  }
@@ -35478,7 +35744,7 @@ var FloatingMenuContent = ({ editor }) => {
35478
35744
  onClick: () => setShowCommands(true),
35479
35745
  className: "flex items-center gap-1 px-2 py-1.5 rounded-lg hover:bg-accent transition-all group",
35480
35746
  children: [
35481
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Plus, { className: "w-4 h-4 text-muted-foreground group-hover:text-foreground" }),
35747
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Plus, { className: "w-4 h-4 text-muted-foreground group-hover:text-foreground" }),
35482
35748
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-sm text-muted-foreground group-hover:text-foreground", children: t("floatingMenu.addBlock") })
35483
35749
  ]
35484
35750
  }
@@ -35561,26 +35827,26 @@ var BubbleMenuContent = ({
35561
35827
  cellBorderOpenRequest = 0
35562
35828
  }) => {
35563
35829
  const t = useSmartTranslations("UEditor");
35564
- (0, import_react73.useEditorState)({
35830
+ (0, import_react74.useEditorState)({
35565
35831
  editor,
35566
35832
  selector: ({ transactionNumber }) => transactionNumber
35567
35833
  });
35568
35834
  const { textColors, highlightColors } = useEditorColors();
35569
- const [showLinkInput, setShowLinkInput] = (0, import_react72.useState)(initialShowLinkInput);
35570
- const [activeColorPalette, setActiveColorPalette] = (0, import_react72.useState)(null);
35571
- (0, import_react72.useEffect)(() => {
35835
+ const [showLinkInput, setShowLinkInput] = (0, import_react73.useState)(initialShowLinkInput);
35836
+ const [activeColorPalette, setActiveColorPalette] = (0, import_react73.useState)(null);
35837
+ (0, import_react73.useEffect)(() => {
35572
35838
  setShowLinkInput(initialShowLinkInput);
35573
35839
  }, [initialShowLinkInput]);
35574
- (0, import_react72.useEffect)(() => {
35840
+ (0, import_react73.useEffect)(() => {
35575
35841
  if (!cellBorderOpenRequest) return;
35576
35842
  setActiveColorPalette("cell-border");
35577
35843
  onKeepOpenChange?.(true);
35578
35844
  }, [cellBorderOpenRequest, onKeepOpenChange]);
35579
- const [showTypographyPanel, setShowTypographyPanel] = (0, import_react72.useState)(false);
35580
- const [showFormulaPanel, setShowFormulaPanel] = (0, import_react72.useState)(false);
35581
- const [formulaDraft, setFormulaDraft] = (0, import_react72.useState)("");
35582
- const [showFontSizeOptions, setShowFontSizeOptions] = (0, import_react72.useState)(false);
35583
- const [fontSizeDraft, setFontSizeDraft] = (0, import_react72.useState)("");
35845
+ const [showTypographyPanel, setShowTypographyPanel] = (0, import_react73.useState)(false);
35846
+ const [showFormulaPanel, setShowFormulaPanel] = (0, import_react73.useState)(false);
35847
+ const [formulaDraft, setFormulaDraft] = (0, import_react73.useState)("");
35848
+ const [showFontSizeOptions, setShowFontSizeOptions] = (0, import_react73.useState)(false);
35849
+ const [fontSizeDraft, setFontSizeDraft] = (0, import_react73.useState)("");
35584
35850
  const isImageSelected = editor.isActive("image");
35585
35851
  const imageAttrs = editor.getAttributes("image");
35586
35852
  const imageLayout = imageAttrs.imageLayout === "left" || imageAttrs.imageLayout === "right" ? imageAttrs.imageLayout : "block";
@@ -35594,13 +35860,13 @@ var BubbleMenuContent = ({
35594
35860
  const currentCellBorderStyle = editor.getAttributes("tableCell").borderStyle || editor.getAttributes("tableHeader").borderStyle || "solid";
35595
35861
  const currentCellBorderWidth = editor.getAttributes("tableCell").borderWidth || editor.getAttributes("tableHeader").borderWidth || "1px";
35596
35862
  const currentCellBorderColor = normalizeStyleValue(editor.getAttributes("tableCell").borderColor || editor.getAttributes("tableHeader").borderColor) || "#000000";
35597
- const [borderStyleDraft, setBorderStyleDraft] = (0, import_react72.useState)(
35863
+ const [borderStyleDraft, setBorderStyleDraft] = (0, import_react73.useState)(
35598
35864
  ["solid", "dashed", "dotted", "double"].includes(currentCellBorderStyle) ? currentCellBorderStyle : "solid"
35599
35865
  );
35600
- const [borderWidthDraft, setBorderWidthDraft] = (0, import_react72.useState)(currentCellBorderWidth);
35601
- const [borderColorDraft, setBorderColorDraft] = (0, import_react72.useState)(currentCellBorderColor);
35602
- const [borderEditMode, setBorderEditMode] = (0, import_react72.useState)("draw");
35603
- const [activeBorderPosition, setActiveBorderPosition] = (0, import_react72.useState)("all");
35866
+ const [borderWidthDraft, setBorderWidthDraft] = (0, import_react73.useState)(currentCellBorderWidth);
35867
+ const [borderColorDraft, setBorderColorDraft] = (0, import_react73.useState)(currentCellBorderColor);
35868
+ const [borderEditMode, setBorderEditMode] = (0, import_react73.useState)("draw");
35869
+ const [activeBorderPosition, setActiveBorderPosition] = (0, import_react73.useState)("all");
35604
35870
  const currentCellVerticalAlign = normalizeStyleValue(editor.getAttributes("tableCell").verticalAlign || editor.getAttributes("tableHeader").verticalAlign) || "";
35605
35871
  const currentCellTextDirection = normalizeStyleValue(editor.getAttributes("tableCell").textDirection || editor.getAttributes("tableHeader").textDirection) || "horizontal";
35606
35872
  const isInTable2 = (0, import_tables7.isInTable)(editor.state);
@@ -35608,15 +35874,15 @@ var BubbleMenuContent = ({
35608
35874
  const canSplitCell = isInTable2 && editor.can().splitCell();
35609
35875
  const currentFontSize = normalizeStyleValue(textStyleAttrs.fontSize);
35610
35876
  const currentLineHeight = normalizeStyleValue(textStyleAttrs.lineHeight);
35611
- const quickFontSizes = (0, import_react72.useMemo)(
35877
+ const quickFontSizes = (0, import_react73.useMemo)(
35612
35878
  () => (fontSizes ?? getDefaultFontSizes()).filter((option) => ["14px", "16px", "24px"].includes(option.value)),
35613
35879
  [fontSizes]
35614
35880
  );
35615
- const quickLineHeights = (0, import_react72.useMemo)(
35881
+ const quickLineHeights = (0, import_react73.useMemo)(
35616
35882
  () => (lineHeights ?? getDefaultLineHeights()).filter((option) => ["1.2", "1.5", "1.75"].includes(option.value)),
35617
35883
  [lineHeights]
35618
35884
  );
35619
- const borderColors = (0, import_react72.useMemo)(
35885
+ const borderColors = (0, import_react73.useMemo)(
35620
35886
  () => [
35621
35887
  highlightColors[0] ?? { name: t("colors.default"), color: "" },
35622
35888
  { name: "Black", color: "#000000" },
@@ -35625,10 +35891,10 @@ var BubbleMenuContent = ({
35625
35891
  ],
35626
35892
  [highlightColors, t]
35627
35893
  );
35628
- (0, import_react72.useEffect)(() => {
35894
+ (0, import_react73.useEffect)(() => {
35629
35895
  setFontSizeDraft(currentFontSize.replace(/px$/i, ""));
35630
35896
  }, [currentFontSize]);
35631
- (0, import_react72.useEffect)(() => {
35897
+ (0, import_react73.useEffect)(() => {
35632
35898
  setFormulaDraft(currentCellFormula);
35633
35899
  }, [currentCellFormula]);
35634
35900
  const applyFontSizeDraft = () => {
@@ -35643,21 +35909,21 @@ var BubbleMenuContent = ({
35643
35909
  editor.chain().focus().setFontSize(`${clamped}px`).run();
35644
35910
  setFontSizeDraft(String(clamped));
35645
35911
  };
35646
- (0, import_react72.useEffect)(() => {
35912
+ (0, import_react73.useEffect)(() => {
35647
35913
  onKeepOpenChange?.(showLinkInput);
35648
35914
  onLinkInputOpenChange?.(showLinkInput);
35649
35915
  }, [onKeepOpenChange, onLinkInputOpenChange, showLinkInput]);
35650
- (0, import_react72.useEffect)(() => {
35916
+ (0, import_react73.useEffect)(() => {
35651
35917
  onKeepOpenChange?.(Boolean(activeColorPalette));
35652
35918
  }, [activeColorPalette, onKeepOpenChange]);
35653
- const closeTransientPanels = (0, import_react72.useCallback)(() => {
35919
+ const closeTransientPanels = (0, import_react73.useCallback)(() => {
35654
35920
  setActiveColorPalette(null);
35655
35921
  setShowLinkInput(false);
35656
35922
  onKeepOpenChange?.(false);
35657
35923
  onLinkInputOpenChange?.(false);
35658
35924
  onRequestClose?.();
35659
35925
  }, [onKeepOpenChange, onLinkInputOpenChange, onRequestClose]);
35660
- const selectTableCellBorderColor = (0, import_react72.useCallback)((color) => {
35926
+ const selectTableCellBorderColor = (0, import_react73.useCallback)((color) => {
35661
35927
  const value = color || "currentColor";
35662
35928
  setBorderColorDraft(value);
35663
35929
  setBorderEditMode("draw");
@@ -35670,7 +35936,7 @@ var BubbleMenuContent = ({
35670
35936
  setActiveColorPalette("cell-border");
35671
35937
  onKeepOpenChange?.(true);
35672
35938
  }, [borderStyleDraft, borderWidthDraft, editor, onKeepOpenChange]);
35673
- const applyTableCellBorderPosition = (0, import_react72.useCallback)((position) => {
35939
+ const applyTableCellBorderPosition = (0, import_react73.useCallback)((position) => {
35674
35940
  setActiveBorderPosition(position);
35675
35941
  applyTableCellBorders(editor, position, {
35676
35942
  color: borderColorDraft,
@@ -35679,7 +35945,7 @@ var BubbleMenuContent = ({
35679
35945
  }, { focus: false });
35680
35946
  onKeepOpenChange?.(true);
35681
35947
  }, [borderColorDraft, borderEditMode, borderStyleDraft, borderWidthDraft, editor, onKeepOpenChange]);
35682
- const applyTableCellBorderStyle = (0, import_react72.useCallback)((style) => {
35948
+ const applyTableCellBorderStyle = (0, import_react73.useCallback)((style) => {
35683
35949
  setBorderStyleDraft(style);
35684
35950
  setBorderEditMode("draw");
35685
35951
  setActiveBorderPosition("all");
@@ -35690,7 +35956,7 @@ var BubbleMenuContent = ({
35690
35956
  }, { focus: false });
35691
35957
  onKeepOpenChange?.(true);
35692
35958
  }, [borderColorDraft, borderWidthDraft, editor, onKeepOpenChange]);
35693
- const applyTableCellBorderWidth = (0, import_react72.useCallback)((width) => {
35959
+ const applyTableCellBorderWidth = (0, import_react73.useCallback)((width) => {
35694
35960
  setBorderWidthDraft(width);
35695
35961
  setBorderEditMode("draw");
35696
35962
  setActiveBorderPosition("all");
@@ -35701,7 +35967,7 @@ var BubbleMenuContent = ({
35701
35967
  }, { focus: false });
35702
35968
  onKeepOpenChange?.(true);
35703
35969
  }, [borderColorDraft, borderStyleDraft, editor, onKeepOpenChange]);
35704
- const clearTableCellBorders = (0, import_react72.useCallback)(() => {
35970
+ const clearTableCellBorders = (0, import_react73.useCallback)(() => {
35705
35971
  setActiveBorderPosition("all");
35706
35972
  setBorderEditMode("erase");
35707
35973
  applyTableCellBorders(editor, "all", {
@@ -35711,11 +35977,11 @@ var BubbleMenuContent = ({
35711
35977
  }, { focus: false });
35712
35978
  onKeepOpenChange?.(true);
35713
35979
  }, [borderColorDraft, borderWidthDraft, editor, onKeepOpenChange]);
35714
- const closeColorPalette = (0, import_react72.useCallback)(() => {
35980
+ const closeColorPalette = (0, import_react73.useCallback)(() => {
35715
35981
  setActiveColorPalette(null);
35716
35982
  onKeepOpenChange?.(false);
35717
35983
  }, [onKeepOpenChange]);
35718
- const applyInlineColorAndClose = (0, import_react72.useCallback)((color) => {
35984
+ const applyInlineColorAndClose = (0, import_react73.useCallback)((color) => {
35719
35985
  if (activeColorPalette === "text") {
35720
35986
  if (color === "inherit") {
35721
35987
  editor.chain().focus().unsetColor().run();
@@ -35733,7 +35999,7 @@ var BubbleMenuContent = ({
35733
35999
  }
35734
36000
  closeColorPalette();
35735
36001
  }, [activeColorPalette, closeColorPalette, editor]);
35736
- (0, import_react72.useEffect)(() => {
36002
+ (0, import_react73.useEffect)(() => {
35737
36003
  if (!showLinkInput) return;
35738
36004
  const close2 = () => setShowLinkInput(false);
35739
36005
  editor.on("selectionUpdate", close2);
@@ -35826,7 +36092,7 @@ var BubbleMenuContent = ({
35826
36092
  "inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:bg-muted",
35827
36093
  borderEditMode === "draw" ? "bg-primary/10 text-primary" : "text-muted-foreground"
35828
36094
  ),
35829
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Edit2, { className: "h-4 w-4" })
36095
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Edit2, { className: "h-4 w-4" })
35830
36096
  }
35831
36097
  ),
35832
36098
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
@@ -35841,7 +36107,7 @@ var BubbleMenuContent = ({
35841
36107
  "inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:bg-muted",
35842
36108
  borderEditMode === "erase" ? "bg-destructive/10 text-destructive" : "text-muted-foreground"
35843
36109
  ),
35844
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Eraser, { className: "h-4 w-4" })
36110
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Eraser, { className: "h-4 w-4" })
35845
36111
  }
35846
36112
  )
35847
36113
  ] })
@@ -35933,22 +36199,22 @@ var BubbleMenuContent = ({
35933
36199
  }
35934
36200
  if (isImageSelected) {
35935
36201
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
35936
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "block"), active: imageLayout === "block", title: t("toolbar.imageLayoutBlock"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.AlignCenter, { className: "w-4 h-4" }) }),
35937
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "left"), active: imageLayout === "left", title: t("toolbar.imageLayoutLeft"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.AlignLeft, { className: "w-4 h-4" }) }),
35938
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "right"), active: imageLayout === "right", title: t("toolbar.imageLayoutRight"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.AlignRight, { className: "w-4 h-4" }) }),
36202
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "block"), active: imageLayout === "block", title: t("toolbar.imageLayoutBlock"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.AlignCenter, { className: "w-4 h-4" }) }),
36203
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "left"), active: imageLayout === "left", title: t("toolbar.imageLayoutLeft"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.AlignLeft, { className: "w-4 h-4" }) }),
36204
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "right"), active: imageLayout === "right", title: t("toolbar.imageLayoutRight"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.AlignRight, { className: "w-4 h-4" }) }),
35939
36205
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
35940
36206
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "sm"), active: imageWidthPreset === "sm", title: t("toolbar.imageWidthSm"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-[10px] font-semibold", children: "S" }) }),
35941
36207
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "md"), active: imageWidthPreset === "md", title: t("toolbar.imageWidthMd"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-[10px] font-semibold", children: "M" }) }),
35942
36208
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "lg"), active: imageWidthPreset === "lg", title: t("toolbar.imageWidthLg"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-[10px] font-semibold", children: "L" }) }),
35943
36209
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
35944
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => resetImageSize(editor), title: t("toolbar.imageResetSize"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.RotateCcw, { className: "w-4 h-4" }) }),
36210
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => resetImageSize(editor), title: t("toolbar.imageResetSize"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.RotateCcw, { className: "w-4 h-4" }) }),
35945
36211
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
35946
36212
  ToolbarButton,
35947
36213
  {
35948
36214
  onClick: () => deleteSelectedImage(editor),
35949
36215
  title: t("toolbar.imageDelete"),
35950
36216
  className: "text-destructive hover:text-destructive",
35951
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Trash2, { className: "w-4 h-4" })
36217
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Trash2, { className: "w-4 h-4" })
35952
36218
  }
35953
36219
  )
35954
36220
  ] });
@@ -36104,7 +36370,7 @@ var BubbleMenuContent = ({
36104
36370
  "flex h-full w-9 items-center justify-center border-l border-border/50 transition-colors hover:bg-muted",
36105
36371
  showFontSizeOptions && "bg-primary/10 text-primary"
36106
36372
  ),
36107
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.ChevronDown, { className: "h-4 w-4" })
36373
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.ChevronDown, { className: "h-4 w-4" })
36108
36374
  }
36109
36375
  )
36110
36376
  ] }),
@@ -36183,7 +36449,7 @@ var BubbleMenuContent = ({
36183
36449
  editor.isActive("subscript") ? "bg-primary/10 text-primary" : "bg-muted/40 text-foreground"
36184
36450
  ),
36185
36451
  children: [
36186
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Subscript, { className: "h-4 w-4" }),
36452
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Subscript, { className: "h-4 w-4" }),
36187
36453
  t("toolbar.subscript")
36188
36454
  ]
36189
36455
  }
@@ -36198,7 +36464,7 @@ var BubbleMenuContent = ({
36198
36464
  editor.isActive("superscript") ? "bg-primary/10 text-primary" : "bg-muted/40 text-foreground"
36199
36465
  ),
36200
36466
  children: [
36201
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Superscript, { className: "h-4 w-4" }),
36467
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Superscript, { className: "h-4 w-4" }),
36202
36468
  t("toolbar.superscript")
36203
36469
  ]
36204
36470
  }
@@ -36207,21 +36473,21 @@ var BubbleMenuContent = ({
36207
36473
  ] })
36208
36474
  ] });
36209
36475
  }
36210
- const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? import_lucide_react54.AlignCenterVertical : currentCellVerticalAlign === "bottom" ? import_lucide_react54.AlignEndVertical : import_lucide_react54.AlignStartVertical;
36476
+ const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? import_lucide_react53.AlignCenterVertical : currentCellVerticalAlign === "bottom" ? import_lucide_react53.AlignEndVertical : import_lucide_react53.AlignStartVertical;
36211
36477
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
36212
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Bold, { className: "w-4 h-4" }) }),
36213
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Italic, { className: "w-4 h-4" }) }),
36478
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Bold, { className: "w-4 h-4" }) }),
36479
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Italic, { className: "w-4 h-4" }) }),
36214
36480
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36215
36481
  ToolbarButton,
36216
36482
  {
36217
36483
  onClick: () => editor.chain().focus().toggleUnderline().run(),
36218
36484
  active: editor.isActive("underline"),
36219
36485
  title: t("toolbar.underline"),
36220
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Underline, { className: "w-4 h-4" })
36486
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Underline, { className: "w-4 h-4" })
36221
36487
  }
36222
36488
  ),
36223
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Strikethrough, { className: "w-4 h-4" }) }),
36224
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Code, { className: "w-4 h-4" }) }),
36489
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Strikethrough, { className: "w-4 h-4" }) }),
36490
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Code, { className: "w-4 h-4" }) }),
36225
36491
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
36226
36492
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36227
36493
  ToolbarButton,
@@ -36234,7 +36500,7 @@ var BubbleMenuContent = ({
36234
36500
  },
36235
36501
  active: editor.isActive("link"),
36236
36502
  title: t("toolbar.link"),
36237
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Link, { className: "w-4 h-4" })
36503
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Link, { className: "w-4 h-4" })
36238
36504
  }
36239
36505
  ),
36240
36506
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: () => setActiveColorPalette("text"), title: t("colors.textColor"), children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TextColorIcon, { color: currentTextColor }) }),
@@ -36280,7 +36546,7 @@ var BubbleMenuContent = ({
36280
36546
  },
36281
36547
  active: Boolean(currentCellFormula),
36282
36548
  title: t("tableMenu.formula") || "Formula",
36283
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Sigma, { className: "w-4 h-4" })
36549
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Sigma, { className: "w-4 h-4" })
36284
36550
  }
36285
36551
  ),
36286
36552
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
@@ -36296,7 +36562,7 @@ var BubbleMenuContent = ({
36296
36562
  active: canSplitCell,
36297
36563
  disabled: !canMergeCells && !canSplitCell,
36298
36564
  title: canSplitCell ? t("tableMenu.splitCell") || "Split cell" : t("tableMenu.mergeCells") || "Merge cells",
36299
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.TableCellsMerge, { className: "w-4 h-4" })
36565
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.TableCellsMerge, { className: "w-4 h-4" })
36300
36566
  }
36301
36567
  ),
36302
36568
  /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
@@ -36316,7 +36582,7 @@ var BubbleMenuContent = ({
36316
36582
  title: t("tableMenu.alignVertical") || "Vertical alignment",
36317
36583
  children: [
36318
36584
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(VerticalAlignActiveIcon, { className: "w-4 h-4" }),
36319
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
36585
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
36320
36586
  ]
36321
36587
  }
36322
36588
  ),
@@ -36324,7 +36590,7 @@ var BubbleMenuContent = ({
36324
36590
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36325
36591
  DropdownMenuItem,
36326
36592
  {
36327
- icon: import_lucide_react54.AlignStartVertical,
36593
+ icon: import_lucide_react53.AlignStartVertical,
36328
36594
  label: t("tableMenu.alignVerticalTop") || "Align top",
36329
36595
  onClick: () => applyTableCellAttribute2(editor, "verticalAlign", "top", { focus: false }),
36330
36596
  active: currentCellVerticalAlign === "top"
@@ -36333,7 +36599,7 @@ var BubbleMenuContent = ({
36333
36599
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36334
36600
  DropdownMenuItem,
36335
36601
  {
36336
- icon: import_lucide_react54.AlignCenterVertical,
36602
+ icon: import_lucide_react53.AlignCenterVertical,
36337
36603
  label: t("tableMenu.alignVerticalMiddle") || "Align middle",
36338
36604
  onClick: () => applyTableCellAttribute2(editor, "verticalAlign", "middle", { focus: false }),
36339
36605
  active: currentCellVerticalAlign === "middle"
@@ -36342,7 +36608,7 @@ var BubbleMenuContent = ({
36342
36608
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36343
36609
  DropdownMenuItem,
36344
36610
  {
36345
- icon: import_lucide_react54.AlignEndVertical,
36611
+ icon: import_lucide_react53.AlignEndVertical,
36346
36612
  label: t("tableMenu.alignVerticalBottom") || "Align bottom",
36347
36613
  onClick: () => applyTableCellAttribute2(editor, "verticalAlign", "bottom", { focus: false }),
36348
36614
  active: currentCellVerticalAlign === "bottom"
@@ -36367,8 +36633,8 @@ var BubbleMenuContent = ({
36367
36633
  },
36368
36634
  title: t("tableMenu.textDirection"),
36369
36635
  children: [
36370
- currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.ArrowRight, { className: "w-4 h-4" }),
36371
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
36636
+ currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" }),
36637
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.ChevronDown, { className: "w-3 h-3" })
36372
36638
  ]
36373
36639
  }
36374
36640
  ),
@@ -36376,7 +36642,7 @@ var BubbleMenuContent = ({
36376
36642
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36377
36643
  DropdownMenuItem,
36378
36644
  {
36379
- icon: import_lucide_react54.ArrowRight,
36645
+ icon: import_lucide_react53.ArrowRight,
36380
36646
  label: t("tableMenu.horizontalText"),
36381
36647
  onClick: () => applyTableCellAttribute2(editor, "textDirection", null, { focus: false }),
36382
36648
  active: currentCellTextDirection === "horizontal"
@@ -36385,7 +36651,7 @@ var BubbleMenuContent = ({
36385
36651
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36386
36652
  DropdownMenuItem,
36387
36653
  {
36388
- icon: import_lucide_react54.ArrowDown,
36654
+ icon: import_lucide_react53.ArrowDown,
36389
36655
  label: t("tableMenu.verticalText"),
36390
36656
  onClick: () => applyTableCellAttribute2(editor, "textDirection", "vertical", { focus: false }),
36391
36657
  active: currentCellTextDirection === "vertical"
@@ -36401,7 +36667,7 @@ var BubbleMenuContent = ({
36401
36667
  onClick: () => setShowTypographyPanel(true),
36402
36668
  active: Boolean(currentFontSize || currentLineHeight || editor.isActive("subscript") || editor.isActive("superscript")),
36403
36669
  title: t("toolbar.textStyle"),
36404
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Type, { className: "w-4 h-4" })
36670
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Type, { className: "w-4 h-4" })
36405
36671
  }
36406
36672
  )
36407
36673
  ] });
@@ -36419,9 +36685,9 @@ var LinkPreviewContent = ({ editor, onEdit }) => {
36419
36685
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-1 p-1 max-w-sm", children: [
36420
36686
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-xs text-muted-foreground font-mono px-2 truncate max-w-45", children: url }),
36421
36687
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
36422
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: handleOpen, title: t("linkPreview.open") || "Open link", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.ExternalLink, { className: "w-4 h-4" }) }),
36423
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: onEdit, title: t("linkPreview.edit") || "Edit link", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Edit2, { className: "w-4 h-4" }) }),
36424
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: handleUnlink, title: t("linkPreview.unlink") || "Remove link", className: "text-destructive hover:text-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react54.Unlink, { className: "w-4 h-4" }) })
36688
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: handleOpen, title: t("linkPreview.open") || "Open link", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.ExternalLink, { className: "w-4 h-4" }) }),
36689
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: onEdit, title: t("linkPreview.edit") || "Edit link", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Edit2, { className: "w-4 h-4" }) }),
36690
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ToolbarButton, { onClick: handleUnlink, title: t("linkPreview.unlink") || "Remove link", className: "text-destructive hover:text-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.Unlink, { className: "w-4 h-4" }) })
36425
36691
  ] });
36426
36692
  };
36427
36693
  var CustomBubbleMenu = ({
@@ -36432,26 +36698,26 @@ var CustomBubbleMenu = ({
36432
36698
  const SHOW_DELAY_MS = 180;
36433
36699
  const BUBBLE_MENU_OFFSET = 16;
36434
36700
  const BUBBLE_MENU_ESTIMATED_HEIGHT = 44;
36435
- const [isVisible, setIsVisible] = (0, import_react72.useState)(false);
36436
- const [linkInputOpen, setLinkInputOpen] = (0, import_react72.useState)(false);
36437
- const [cellBorderOpenRequest, setCellBorderOpenRequest] = (0, import_react72.useState)(0);
36438
- const [position, setPosition2] = (0, import_react72.useState)({
36701
+ const [isVisible, setIsVisible] = (0, import_react73.useState)(false);
36702
+ const [linkInputOpen, setLinkInputOpen] = (0, import_react73.useState)(false);
36703
+ const [cellBorderOpenRequest, setCellBorderOpenRequest] = (0, import_react73.useState)(0);
36704
+ const [position, setPosition2] = (0, import_react73.useState)({
36439
36705
  top: 0,
36440
36706
  left: 0,
36441
36707
  placement: "top"
36442
36708
  });
36443
- const menuRef = (0, import_react72.useRef)(null);
36444
- const keepOpenRef = (0, import_react72.useRef)(false);
36445
- const [keepOpen, setKeepOpenState] = (0, import_react72.useState)(false);
36446
- const showTimeoutRef = (0, import_react72.useRef)(null);
36447
- const suppressShowUntilRef = (0, import_react72.useRef)(0);
36448
- const setKeepOpen = (0, import_react72.useCallback)((next) => {
36709
+ const menuRef = (0, import_react73.useRef)(null);
36710
+ const keepOpenRef = (0, import_react73.useRef)(false);
36711
+ const [keepOpen, setKeepOpenState] = (0, import_react73.useState)(false);
36712
+ const showTimeoutRef = (0, import_react73.useRef)(null);
36713
+ const suppressShowUntilRef = (0, import_react73.useRef)(0);
36714
+ const setKeepOpen = (0, import_react73.useCallback)((next) => {
36449
36715
  keepOpenRef.current = next;
36450
36716
  setKeepOpenState(next);
36451
36717
  if (!next) setLinkInputOpen(false);
36452
36718
  if (next) setIsVisible(true);
36453
36719
  }, []);
36454
- const closeBubbleMenu = (0, import_react72.useCallback)((suppressShow = true) => {
36720
+ const closeBubbleMenu = (0, import_react73.useCallback)((suppressShow = true) => {
36455
36721
  suppressShowUntilRef.current = suppressShow ? Date.now() + 1e3 : 0;
36456
36722
  keepOpenRef.current = false;
36457
36723
  setKeepOpenState(false);
@@ -36462,7 +36728,7 @@ var CustomBubbleMenu = ({
36462
36728
  showTimeoutRef.current = null;
36463
36729
  }
36464
36730
  }, []);
36465
- (0, import_react72.useEffect)(() => {
36731
+ (0, import_react73.useEffect)(() => {
36466
36732
  const clearShowTimeout = () => {
36467
36733
  if (showTimeoutRef.current) {
36468
36734
  clearTimeout(showTimeoutRef.current);
@@ -36544,7 +36810,7 @@ var CustomBubbleMenu = ({
36544
36810
  editor.off("update", updatePosition);
36545
36811
  };
36546
36812
  }, [editor]);
36547
- (0, import_react72.useEffect)(() => {
36813
+ (0, import_react73.useEffect)(() => {
36548
36814
  if (!isVisible) return;
36549
36815
  const handlePointerDown = (event) => {
36550
36816
  const target = event.target;
@@ -36563,7 +36829,7 @@ var CustomBubbleMenu = ({
36563
36829
  document.removeEventListener("keydown", handleKeyDown2);
36564
36830
  };
36565
36831
  }, [closeBubbleMenu, editor, isVisible]);
36566
- (0, import_react72.useEffect)(() => {
36832
+ (0, import_react73.useEffect)(() => {
36567
36833
  const handleTableDoubleClick = (event) => {
36568
36834
  const target = event.target;
36569
36835
  const cell = target?.closest("td,th");
@@ -36630,9 +36896,9 @@ var CustomBubbleMenu = ({
36630
36896
  };
36631
36897
  var CustomFloatingMenu = ({ editor }) => {
36632
36898
  const FLOATING_MENU_OFFSET = 16;
36633
- const [isVisible, setIsVisible] = (0, import_react72.useState)(false);
36634
- const [position, setPosition2] = (0, import_react72.useState)({ top: 0, left: 0 });
36635
- (0, import_react72.useEffect)(() => {
36899
+ const [isVisible, setIsVisible] = (0, import_react73.useState)(false);
36900
+ const [position, setPosition2] = (0, import_react73.useState)({ top: 0, left: 0 });
36901
+ (0, import_react73.useEffect)(() => {
36636
36902
  const updatePosition = () => {
36637
36903
  const { state, view } = editor;
36638
36904
  const { $from, empty } = state.selection;
@@ -37117,7 +37383,7 @@ async function prepareUEditorContentForSave({
37117
37383
  }
37118
37384
 
37119
37385
  // src/components/UEditor/table-controls.tsx
37120
- var import_react74 = __toESM(require("react"), 1);
37386
+ var import_react75 = __toESM(require("react"), 1);
37121
37387
 
37122
37388
  // node_modules/prosemirror-model/dist/index.js
37123
37389
  function findDiffStart(a, b, pos) {
@@ -41278,7 +41544,7 @@ function atEndOfCell(view, axis, dir) {
41278
41544
  var columnResizingPluginKey2 = new PluginKey5("tableColumnResizing");
41279
41545
 
41280
41546
  // src/components/UEditor/table-controls.tsx
41281
- var import_lucide_react57 = require("lucide-react");
41547
+ var import_lucide_react56 = require("lucide-react");
41282
41548
 
41283
41549
  // src/components/UEditor/table-layout-model.ts
41284
41550
  var FALLBACK_TABLE_ROW_HEIGHT = DEFAULT_TABLE_ROW_HEIGHT;
@@ -41788,7 +42054,7 @@ function TableAddRails({
41788
42054
  }
41789
42055
 
41790
42056
  // src/components/UEditor/table-control-menu.tsx
41791
- var import_lucide_react55 = require("lucide-react");
42057
+ var import_lucide_react54 = require("lucide-react");
41792
42058
  var import_jsx_runtime97 = require("react/jsx-runtime");
41793
42059
  function TableControlMenu({
41794
42060
  controlsVisible,
@@ -41840,7 +42106,7 @@ function TableControlMenu({
41840
42106
  transform: shown ? "scale(1)" : "scale(0.82)",
41841
42107
  pointerEvents: shown ? "auto" : "none"
41842
42108
  },
41843
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react55.MoreHorizontal, { className: "h-4 w-4" })
42109
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.MoreHorizontal, { className: "h-4 w-4" })
41844
42110
  }
41845
42111
  )
41846
42112
  }
@@ -41852,7 +42118,7 @@ function TableControlMenu({
41852
42118
  }
41853
42119
 
41854
42120
  // src/components/UEditor/table-axis-handles.tsx
41855
- var import_lucide_react56 = require("lucide-react");
42121
+ var import_lucide_react55 = require("lucide-react");
41856
42122
  var import_jsx_runtime98 = require("react/jsx-runtime");
41857
42123
  var IDLE_HANDLE_SCALE = "0.78";
41858
42124
  function TableRowHandles({
@@ -41914,7 +42180,7 @@ function TableRowHandles({
41914
42180
  transform: isShown ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`,
41915
42181
  pointerEvents: isShown ? "auto" : "none"
41916
42182
  },
41917
- children: visible ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react56.GripVertical, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "h-3 w-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
42183
+ children: visible ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react55.GripVertical, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "h-3 w-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
41918
42184
  }
41919
42185
  )
41920
42186
  }
@@ -41985,7 +42251,7 @@ function TableColumnHandles({
41985
42251
  transform: isShown ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`,
41986
42252
  pointerEvents: isShown ? "auto" : "none"
41987
42253
  },
41988
- children: visible ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react56.GripHorizontal, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "h-1 w-3 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
42254
+ children: visible ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react55.GripHorizontal, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "h-1 w-3 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
41989
42255
  }
41990
42256
  )
41991
42257
  }
@@ -42025,17 +42291,17 @@ function getSelectedCell(editor) {
42025
42291
  }
42026
42292
  function TableControls({ editor, containerRef }) {
42027
42293
  const t = useSmartTranslations("UEditor");
42028
- const [layout, setLayout] = import_react74.default.useState(null);
42029
- const [dragPreview, setDragPreview] = import_react74.default.useState(null);
42030
- const [hoverState, setHoverState] = import_react74.default.useState(DEFAULT_TABLE_HOVER_STATE);
42031
- const [openMenuKey, setOpenMenuKey] = import_react74.default.useState(null);
42032
- const layoutRef = import_react74.default.useRef(null);
42033
- const dragStateRef = import_react74.default.useRef(null);
42034
- const syncFrameRef = import_react74.default.useRef(null);
42035
- import_react74.default.useEffect(() => {
42294
+ const [layout, setLayout] = import_react75.default.useState(null);
42295
+ const [dragPreview, setDragPreview] = import_react75.default.useState(null);
42296
+ const [hoverState, setHoverState] = import_react75.default.useState(DEFAULT_TABLE_HOVER_STATE);
42297
+ const [openMenuKey, setOpenMenuKey] = import_react75.default.useState(null);
42298
+ const layoutRef = import_react75.default.useRef(null);
42299
+ const dragStateRef = import_react75.default.useRef(null);
42300
+ const syncFrameRef = import_react75.default.useRef(null);
42301
+ import_react75.default.useEffect(() => {
42036
42302
  layoutRef.current = layout;
42037
42303
  }, [layout]);
42038
- const syncFromCell = import_react74.default.useCallback((cell) => {
42304
+ const syncFromCell = import_react75.default.useCallback((cell) => {
42039
42305
  const surface = containerRef.current;
42040
42306
  if (!surface || !cell) {
42041
42307
  setLayout(null);
@@ -42043,23 +42309,23 @@ function TableControls({ editor, containerRef }) {
42043
42309
  }
42044
42310
  setLayout(buildTableControlLayout(editor, surface, cell));
42045
42311
  }, [containerRef, editor]);
42046
- const syncFromSelection = import_react74.default.useCallback(() => {
42312
+ const syncFromSelection = import_react75.default.useCallback(() => {
42047
42313
  syncFromCell(getSelectedCell(editor));
42048
42314
  }, [editor, syncFromCell]);
42049
- const scheduleSyncFromSelection = import_react74.default.useCallback(() => {
42315
+ const scheduleSyncFromSelection = import_react75.default.useCallback(() => {
42050
42316
  if (syncFrameRef.current !== null) return;
42051
42317
  syncFrameRef.current = window.requestAnimationFrame(() => {
42052
42318
  syncFrameRef.current = null;
42053
42319
  syncFromSelection();
42054
42320
  });
42055
42321
  }, [syncFromSelection]);
42056
- import_react74.default.useEffect(() => () => {
42322
+ import_react75.default.useEffect(() => () => {
42057
42323
  if (syncFrameRef.current !== null) {
42058
42324
  window.cancelAnimationFrame(syncFrameRef.current);
42059
42325
  syncFrameRef.current = null;
42060
42326
  }
42061
42327
  }, []);
42062
- const refreshCurrentLayout = import_react74.default.useCallback(() => {
42328
+ const refreshCurrentLayout = import_react75.default.useCallback(() => {
42063
42329
  setLayout((prev) => {
42064
42330
  if (!prev) return prev;
42065
42331
  const surface = containerRef.current;
@@ -42069,12 +42335,12 @@ function TableControls({ editor, containerRef }) {
42069
42335
  return cell ? buildTableControlLayout(editor, surface, cell) : null;
42070
42336
  });
42071
42337
  }, [containerRef, editor]);
42072
- const clearDrag = import_react74.default.useCallback(() => {
42338
+ const clearDrag = import_react75.default.useCallback(() => {
42073
42339
  dragStateRef.current = null;
42074
42340
  setDragPreview(null);
42075
42341
  document.body.style.cursor = "";
42076
42342
  }, []);
42077
- const updateHoverState = import_react74.default.useCallback((event) => {
42343
+ const updateHoverState = import_react75.default.useCallback((event) => {
42078
42344
  const activeLayout = layoutRef.current;
42079
42345
  const surface = containerRef.current;
42080
42346
  if (!activeLayout || !surface || dragStateRef.current) {
@@ -42090,7 +42356,7 @@ function TableControls({ editor, containerRef }) {
42090
42356
  return areTableHoverStatesEqual(prev, nextState) ? prev : nextState;
42091
42357
  });
42092
42358
  }, [containerRef]);
42093
- import_react74.default.useEffect(() => {
42359
+ import_react75.default.useEffect(() => {
42094
42360
  const proseMirror = editor.view.dom;
42095
42361
  const surface = containerRef.current;
42096
42362
  if (!surface) return void 0;
@@ -42141,37 +42407,37 @@ function TableControls({ editor, containerRef }) {
42141
42407
  editor.off("update", refreshCurrentLayout);
42142
42408
  };
42143
42409
  }, [clearDrag, containerRef, editor, refreshCurrentLayout, syncFromCell, syncFromSelection, updateHoverState]);
42144
- const runAtCellPos = import_react74.default.useCallback((cellPos, command, options) => {
42410
+ const runAtCellPos = import_react75.default.useCallback((cellPos, command, options) => {
42145
42411
  const result = runTableCommandAtCellPos(editor, cellPos, command);
42146
42412
  if (options?.sync !== false) {
42147
42413
  scheduleSyncFromSelection();
42148
42414
  }
42149
42415
  return result;
42150
42416
  }, [editor, scheduleSyncFromSelection]);
42151
- const runAtActiveCell = import_react74.default.useCallback((command, options) => {
42417
+ const runAtActiveCell = import_react75.default.useCallback((command, options) => {
42152
42418
  return runAtCellPos(layoutRef.current?.cellPos ?? null, command, options);
42153
42419
  }, [runAtCellPos]);
42154
- const duplicateRowAt = import_react74.default.useCallback((rowIndex, cellPos) => {
42420
+ const duplicateRowAt = import_react75.default.useCallback((rowIndex, cellPos) => {
42155
42421
  const result = duplicateTableRowAt(editor, rowIndex, cellPos);
42156
42422
  scheduleSyncFromSelection();
42157
42423
  return result;
42158
42424
  }, [editor, scheduleSyncFromSelection]);
42159
- const clearRowAt = import_react74.default.useCallback((rowIndex, cellPos) => {
42425
+ const clearRowAt = import_react75.default.useCallback((rowIndex, cellPos) => {
42160
42426
  const result = clearTableRowAt(editor, rowIndex, cellPos);
42161
42427
  scheduleSyncFromSelection();
42162
42428
  return result;
42163
42429
  }, [editor, scheduleSyncFromSelection]);
42164
- const duplicateColumnAt = import_react74.default.useCallback((columnIndex, cellPos) => {
42430
+ const duplicateColumnAt = import_react75.default.useCallback((columnIndex, cellPos) => {
42165
42431
  const result = duplicateTableColumnAt(editor, columnIndex, cellPos);
42166
42432
  scheduleSyncFromSelection();
42167
42433
  return result;
42168
42434
  }, [editor, scheduleSyncFromSelection]);
42169
- const clearColumnAt = import_react74.default.useCallback((columnIndex, cellPos) => {
42435
+ const clearColumnAt = import_react75.default.useCallback((columnIndex, cellPos) => {
42170
42436
  const result = clearTableColumnAt(editor, columnIndex, cellPos);
42171
42437
  scheduleSyncFromSelection();
42172
42438
  return result;
42173
42439
  }, [editor, scheduleSyncFromSelection]);
42174
- const expandTableBy = import_react74.default.useCallback((rows, cols) => {
42440
+ const expandTableBy = import_react75.default.useCallback((rows, cols) => {
42175
42441
  const activeCellPos = layoutRef.current?.cellPos ?? editor.state.selection.from;
42176
42442
  const result = expandTableFromCell(editor, activeCellPos, rows, cols);
42177
42443
  scheduleSyncFromSelection();
@@ -42180,19 +42446,19 @@ function TableControls({ editor, containerRef }) {
42180
42446
  const canExpandTable = Boolean(layout);
42181
42447
  const controlsVisible = dragPreview !== null;
42182
42448
  const tableMenuOpen = openMenuKey === "table";
42183
- const startAddColumnDrag = import_react74.default.useCallback(() => {
42449
+ const startAddColumnDrag = import_react75.default.useCallback(() => {
42184
42450
  setOpenMenuKey(null);
42185
42451
  dragStateRef.current = { kind: "add-column", previewCols: 1 };
42186
42452
  setDragPreview({ kind: "add-column", previewCols: 1 });
42187
42453
  document.body.style.cursor = "ew-resize";
42188
42454
  }, []);
42189
- const startAddRowDrag = import_react74.default.useCallback(() => {
42455
+ const startAddRowDrag = import_react75.default.useCallback(() => {
42190
42456
  setOpenMenuKey(null);
42191
42457
  dragStateRef.current = { kind: "add-row", previewRows: 1 };
42192
42458
  setDragPreview({ kind: "add-row", previewRows: 1 });
42193
42459
  document.body.style.cursor = "ns-resize";
42194
42460
  }, []);
42195
- const startRowDrag = import_react74.default.useCallback((rowHandle) => {
42461
+ const startRowDrag = import_react75.default.useCallback((rowHandle) => {
42196
42462
  setOpenMenuKey(null);
42197
42463
  dragStateRef.current = {
42198
42464
  kind: "row",
@@ -42209,7 +42475,7 @@ function TableControls({ editor, containerRef }) {
42209
42475
  });
42210
42476
  document.body.style.cursor = "grabbing";
42211
42477
  }, []);
42212
- const startColumnDrag = import_react74.default.useCallback((columnHandle) => {
42478
+ const startColumnDrag = import_react75.default.useCallback((columnHandle) => {
42213
42479
  setOpenMenuKey(null);
42214
42480
  dragStateRef.current = {
42215
42481
  kind: "column",
@@ -42226,7 +42492,7 @@ function TableControls({ editor, containerRef }) {
42226
42492
  });
42227
42493
  document.body.style.cursor = "grabbing";
42228
42494
  }, []);
42229
- import_react74.default.useEffect(() => {
42495
+ import_react75.default.useEffect(() => {
42230
42496
  const handleMouseMove2 = (event) => {
42231
42497
  const dragState = dragStateRef.current;
42232
42498
  const activeLayout = layoutRef.current;
@@ -42315,126 +42581,126 @@ function TableControls({ editor, containerRef }) {
42315
42581
  window.removeEventListener("blur", clearDrag);
42316
42582
  };
42317
42583
  }, [clearDrag, containerRef, editor, expandTableBy, scheduleSyncFromSelection]);
42318
- const menuItems = import_react74.default.useMemo(() => {
42584
+ const menuItems = import_react75.default.useMemo(() => {
42319
42585
  if (!layout) return [];
42320
42586
  return [
42321
42587
  {
42322
42588
  label: t("tableMenu.alignLeft"),
42323
- icon: import_lucide_react57.AlignLeft,
42589
+ icon: import_lucide_react56.AlignLeft,
42324
42590
  onClick: () => applyTableAlignment(editor, "left", layout.cellPos)
42325
42591
  },
42326
42592
  {
42327
42593
  label: t("tableMenu.alignCenter"),
42328
- icon: import_lucide_react57.AlignCenter,
42594
+ icon: import_lucide_react56.AlignCenter,
42329
42595
  onClick: () => applyTableAlignment(editor, "center", layout.cellPos)
42330
42596
  },
42331
42597
  {
42332
42598
  label: t("tableMenu.alignRight"),
42333
- icon: import_lucide_react57.AlignRight,
42599
+ icon: import_lucide_react56.AlignRight,
42334
42600
  onClick: () => applyTableAlignment(editor, "right", layout.cellPos)
42335
42601
  },
42336
42602
  {
42337
42603
  label: t("tableMenu.addColumnBefore"),
42338
- icon: import_lucide_react57.ArrowLeft,
42604
+ icon: import_lucide_react56.ArrowLeft,
42339
42605
  onClick: () => runAtActiveCell((chain) => chain.addColumnBefore())
42340
42606
  },
42341
42607
  {
42342
42608
  label: t("tableMenu.addColumnAfter"),
42343
- icon: import_lucide_react57.ArrowRight,
42609
+ icon: import_lucide_react56.ArrowRight,
42344
42610
  onClick: () => runAtActiveCell((chain) => chain.addColumnAfter())
42345
42611
  },
42346
42612
  {
42347
42613
  label: t("tableMenu.addRowBefore"),
42348
- icon: import_lucide_react57.ArrowUp,
42614
+ icon: import_lucide_react56.ArrowUp,
42349
42615
  onClick: () => runAtActiveCell((chain) => chain.addRowBefore())
42350
42616
  },
42351
42617
  {
42352
42618
  label: t("tableMenu.addRowAfter"),
42353
- icon: import_lucide_react57.ArrowDown,
42619
+ icon: import_lucide_react56.ArrowDown,
42354
42620
  onClick: () => runAtActiveCell((chain) => chain.addRowAfter())
42355
42621
  },
42356
42622
  {
42357
42623
  label: t("tableMenu.toggleHeaderRow"),
42358
- icon: import_lucide_react57.Table,
42624
+ icon: import_lucide_react56.Table,
42359
42625
  onClick: () => runAtActiveCell((chain) => chain.toggleHeaderRow())
42360
42626
  },
42361
42627
  {
42362
42628
  label: t("tableMenu.toggleHeaderColumn"),
42363
- icon: import_lucide_react57.Table,
42629
+ icon: import_lucide_react56.Table,
42364
42630
  onClick: () => runAtActiveCell((chain) => chain.toggleHeaderColumn())
42365
42631
  },
42366
42632
  {
42367
42633
  label: t("tableMenu.deleteColumn"),
42368
- icon: import_lucide_react57.Trash2,
42634
+ icon: import_lucide_react56.Trash2,
42369
42635
  onClick: () => runAtActiveCell((chain) => chain.deleteColumn()),
42370
42636
  destructive: true
42371
42637
  },
42372
42638
  {
42373
42639
  label: t("tableMenu.deleteRow"),
42374
- icon: import_lucide_react57.Trash2,
42640
+ icon: import_lucide_react56.Trash2,
42375
42641
  onClick: () => runAtActiveCell((chain) => chain.deleteRow()),
42376
42642
  destructive: true
42377
42643
  },
42378
42644
  {
42379
42645
  label: t("tableMenu.deleteTable"),
42380
- icon: import_lucide_react57.Trash2,
42646
+ icon: import_lucide_react56.Trash2,
42381
42647
  onClick: () => runAtActiveCell((chain) => chain.deleteTable()),
42382
42648
  destructive: true
42383
42649
  }
42384
42650
  ];
42385
42651
  }, [editor, layout, runAtActiveCell, t]);
42386
- const getRowHandleMenuItems = import_react74.default.useCallback((rowHandle) => [
42652
+ const getRowHandleMenuItems = import_react75.default.useCallback((rowHandle) => [
42387
42653
  {
42388
42654
  label: t("tableMenu.addRowBefore"),
42389
- icon: import_lucide_react57.ArrowUp,
42655
+ icon: import_lucide_react56.ArrowUp,
42390
42656
  onClick: () => runAtCellPos(rowHandle.cellPos, (chain) => chain.addRowBefore())
42391
42657
  },
42392
42658
  {
42393
42659
  label: t("tableMenu.addRowAfter"),
42394
- icon: import_lucide_react57.ArrowDown,
42660
+ icon: import_lucide_react56.ArrowDown,
42395
42661
  onClick: () => runAtCellPos(rowHandle.cellPos, (chain) => chain.addRowAfter())
42396
42662
  },
42397
42663
  {
42398
42664
  label: t("tableMenu.duplicateRow"),
42399
- icon: import_lucide_react57.Copy,
42665
+ icon: import_lucide_react56.Copy,
42400
42666
  onClick: () => duplicateRowAt(rowHandle.index, rowHandle.cellPos)
42401
42667
  },
42402
42668
  {
42403
42669
  label: t("tableMenu.clearRowContents"),
42404
- icon: import_lucide_react57.Table,
42670
+ icon: import_lucide_react56.Table,
42405
42671
  onClick: () => clearRowAt(rowHandle.index, rowHandle.cellPos)
42406
42672
  },
42407
42673
  {
42408
42674
  label: t("tableMenu.deleteRow"),
42409
- icon: import_lucide_react57.Trash2,
42675
+ icon: import_lucide_react56.Trash2,
42410
42676
  onClick: () => runAtCellPos(rowHandle.cellPos, (chain) => chain.deleteRow()),
42411
42677
  destructive: true
42412
42678
  }
42413
42679
  ], [clearRowAt, duplicateRowAt, runAtCellPos, t]);
42414
- const getColumnHandleMenuItems = import_react74.default.useCallback((columnHandle) => [
42680
+ const getColumnHandleMenuItems = import_react75.default.useCallback((columnHandle) => [
42415
42681
  {
42416
42682
  label: t("tableMenu.addColumnBefore"),
42417
- icon: import_lucide_react57.ArrowLeft,
42683
+ icon: import_lucide_react56.ArrowLeft,
42418
42684
  onClick: () => runAtCellPos(columnHandle.cellPos, (chain) => chain.addColumnBefore())
42419
42685
  },
42420
42686
  {
42421
42687
  label: t("tableMenu.addColumnAfter"),
42422
- icon: import_lucide_react57.ArrowRight,
42688
+ icon: import_lucide_react56.ArrowRight,
42423
42689
  onClick: () => runAtCellPos(columnHandle.cellPos, (chain) => chain.addColumnAfter())
42424
42690
  },
42425
42691
  {
42426
42692
  label: t("tableMenu.duplicateColumn"),
42427
- icon: import_lucide_react57.Copy,
42693
+ icon: import_lucide_react56.Copy,
42428
42694
  onClick: () => duplicateColumnAt(columnHandle.index, columnHandle.cellPos)
42429
42695
  },
42430
42696
  {
42431
42697
  label: t("tableMenu.clearColumnContents"),
42432
- icon: import_lucide_react57.Table,
42698
+ icon: import_lucide_react56.Table,
42433
42699
  onClick: () => clearColumnAt(columnHandle.index, columnHandle.cellPos)
42434
42700
  },
42435
42701
  {
42436
42702
  label: t("tableMenu.deleteColumn"),
42437
- icon: import_lucide_react57.Trash2,
42703
+ icon: import_lucide_react56.Trash2,
42438
42704
  onClick: () => runAtCellPos(columnHandle.cellPos, (chain) => chain.deleteColumn()),
42439
42705
  destructive: true
42440
42706
  }
@@ -42728,10 +42994,10 @@ var UEDITOR_PROSEMIRROR_CLASS_NAME = cn(
42728
42994
  );
42729
42995
 
42730
42996
  // src/components/UEditor/use-table-interactions.ts
42731
- var import_react76 = __toESM(require("react"), 1);
42997
+ var import_react77 = __toESM(require("react"), 1);
42732
42998
 
42733
42999
  // src/components/UEditor/use-table-row-resize.ts
42734
- var import_react75 = __toESM(require("react"), 1);
43000
+ var import_react76 = __toESM(require("react"), 1);
42735
43001
  function useTableRowResize({
42736
43002
  editor,
42737
43003
  setHoveredTableCell,
@@ -42740,16 +43006,16 @@ function useTableRowResize({
42740
43006
  clearAllTableResizeHover,
42741
43007
  scheduleTableLayoutSync
42742
43008
  }) {
42743
- const stateRef = (0, import_react75.useRef)(null);
42744
- const syncActiveGuide = import_react75.default.useCallback(() => {
43009
+ const stateRef = (0, import_react76.useRef)(null);
43010
+ const syncActiveGuide = import_react76.default.useCallback(() => {
42745
43011
  const state = stateRef.current;
42746
43012
  if (!state) return false;
42747
43013
  setHoveredTableCell(state.cellElement);
42748
43014
  showRowGuide(state.tableElement, state.rowElement, state.cellElement, state.pendingHeight);
42749
43015
  return true;
42750
43016
  }, [setHoveredTableCell, showRowGuide]);
42751
- const isResizing = import_react75.default.useCallback(() => stateRef.current !== null, []);
42752
- const beginResize = import_react75.default.useCallback((event, table, row, cell) => {
43017
+ const isResizing = import_react76.default.useCallback(() => stateRef.current !== null, []);
43018
+ const beginResize = import_react76.default.useCallback((event, table, row, cell) => {
42753
43019
  if (!editor || !isRowResizeHotspot(cell, event.clientX, event.clientY)) {
42754
43020
  return false;
42755
43021
  }
@@ -42775,7 +43041,7 @@ function useTableRowResize({
42775
43041
  event.stopPropagation();
42776
43042
  return true;
42777
43043
  }, [editor, setHoveredTableCell, showRowGuide]);
42778
- const handlePointerMove = import_react75.default.useCallback((event) => {
43044
+ const handlePointerMove = import_react76.default.useCallback((event) => {
42779
43045
  const state = stateRef.current;
42780
43046
  if (!state) return;
42781
43047
  const nextHeight = Math.max(
@@ -42792,7 +43058,7 @@ function useTableRowResize({
42792
43058
  document.body.style.cursor = "row-resize";
42793
43059
  showRowGuide(state.tableElement, state.rowElement, state.cellElement, nextHeight);
42794
43060
  }, [showRowGuide]);
42795
- const handlePointerUp = import_react75.default.useCallback((event) => {
43061
+ const handlePointerUp = import_react76.default.useCallback((event) => {
42796
43062
  if (!editor) return;
42797
43063
  const state = stateRef.current;
42798
43064
  if (!state) return;
@@ -42816,7 +43082,7 @@ function useTableRowResize({
42816
43082
  clearAllTableResizeHover();
42817
43083
  scheduleTableLayoutSync();
42818
43084
  }, [clearAllTableResizeHover, clearHoveredTableCell, editor, scheduleTableLayoutSync]);
42819
- const cancelResize = import_react75.default.useCallback(() => {
43085
+ const cancelResize = import_react76.default.useCallback(() => {
42820
43086
  if (!stateRef.current) return;
42821
43087
  stateRef.current = null;
42822
43088
  document.body.style.cursor = "";
@@ -42824,7 +43090,7 @@ function useTableRowResize({
42824
43090
  clearAllTableResizeHover();
42825
43091
  scheduleTableLayoutSync();
42826
43092
  }, [clearAllTableResizeHover, clearHoveredTableCell, scheduleTableLayoutSync]);
42827
- const cleanup = import_react75.default.useCallback(() => {
43093
+ const cleanup = import_react76.default.useCallback(() => {
42828
43094
  stateRef.current = null;
42829
43095
  document.body.style.cursor = "";
42830
43096
  }, []);
@@ -42841,24 +43107,24 @@ function useTableRowResize({
42841
43107
 
42842
43108
  // src/components/UEditor/use-table-interactions.ts
42843
43109
  function useUEditorTableInteractions(editor, editable = true) {
42844
- const editorContentRef = (0, import_react76.useRef)(null);
42845
- const tableColumnGuideRef = (0, import_react76.useRef)(null);
42846
- const tableRowGuideRef = (0, import_react76.useRef)(null);
42847
- const activeTableCellHighlightRef = (0, import_react76.useRef)(null);
42848
- const hoveredTableCellRef = (0, import_react76.useRef)(null);
42849
- const activeTableCellRef = (0, import_react76.useRef)(null);
42850
- const suppressActiveCellHighlightRef = (0, import_react76.useRef)(false);
42851
- const tableLayoutSyncFrameRef = (0, import_react76.useRef)(null);
42852
- const getProseMirrorElement = import_react76.default.useCallback(() => {
43110
+ const editorContentRef = (0, import_react77.useRef)(null);
43111
+ const tableColumnGuideRef = (0, import_react77.useRef)(null);
43112
+ const tableRowGuideRef = (0, import_react77.useRef)(null);
43113
+ const activeTableCellHighlightRef = (0, import_react77.useRef)(null);
43114
+ const hoveredTableCellRef = (0, import_react77.useRef)(null);
43115
+ const activeTableCellRef = (0, import_react77.useRef)(null);
43116
+ const suppressActiveCellHighlightRef = (0, import_react77.useRef)(false);
43117
+ const tableLayoutSyncFrameRef = (0, import_react77.useRef)(null);
43118
+ const getProseMirrorElement = import_react77.default.useCallback(() => {
42853
43119
  return editorContentRef.current?.querySelector(".ProseMirror");
42854
43120
  }, []);
42855
- const setEditorResizeCursor = import_react76.default.useCallback((cursor) => {
43121
+ const setEditorResizeCursor = import_react77.default.useCallback((cursor) => {
42856
43122
  const proseMirror = getProseMirrorElement();
42857
43123
  if (proseMirror) {
42858
43124
  proseMirror.style.cursor = cursor;
42859
43125
  }
42860
43126
  }, [getProseMirrorElement]);
42861
- const hideColumnGuide = import_react76.default.useCallback(() => {
43127
+ const hideColumnGuide = import_react77.default.useCallback(() => {
42862
43128
  editorContentRef.current?.classList.remove("resize-cursor");
42863
43129
  getProseMirrorElement()?.classList.remove("resize-cursor");
42864
43130
  const guide = tableColumnGuideRef.current;
@@ -42866,7 +43132,7 @@ function useUEditorTableInteractions(editor, editable = true) {
42866
43132
  guide.style.opacity = "0";
42867
43133
  }
42868
43134
  }, [getProseMirrorElement]);
42869
- const hideRowGuide = import_react76.default.useCallback(() => {
43135
+ const hideRowGuide = import_react77.default.useCallback(() => {
42870
43136
  editorContentRef.current?.classList.remove("resize-row-cursor");
42871
43137
  getProseMirrorElement()?.classList.remove("resize-row-cursor");
42872
43138
  const guide = tableRowGuideRef.current;
@@ -42874,12 +43140,12 @@ function useUEditorTableInteractions(editor, editable = true) {
42874
43140
  guide.style.opacity = "0";
42875
43141
  }
42876
43142
  }, [getProseMirrorElement]);
42877
- const clearAllTableResizeHover = import_react76.default.useCallback(() => {
43143
+ const clearAllTableResizeHover = import_react77.default.useCallback(() => {
42878
43144
  setEditorResizeCursor("");
42879
43145
  hideColumnGuide();
42880
43146
  hideRowGuide();
42881
43147
  }, [hideColumnGuide, hideRowGuide, setEditorResizeCursor]);
42882
- const updateActiveCellHighlight = import_react76.default.useCallback((cell) => {
43148
+ const updateActiveCellHighlight = import_react77.default.useCallback((cell) => {
42883
43149
  const surface = editorContentRef.current;
42884
43150
  const highlight = activeTableCellHighlightRef.current;
42885
43151
  if (!highlight) return;
@@ -42894,7 +43160,7 @@ function useUEditorTableInteractions(editor, editable = true) {
42894
43160
  highlight.style.width = `${metrics.width}px`;
42895
43161
  highlight.style.height = `${metrics.height}px`;
42896
43162
  }, []);
42897
- const scheduleTableLayoutSync = import_react76.default.useCallback(() => {
43163
+ const scheduleTableLayoutSync = import_react77.default.useCallback(() => {
42898
43164
  if (tableLayoutSyncFrameRef.current !== null) return;
42899
43165
  tableLayoutSyncFrameRef.current = window.requestAnimationFrame(() => {
42900
43166
  tableLayoutSyncFrameRef.current = null;
@@ -42902,7 +43168,7 @@ function useUEditorTableInteractions(editor, editable = true) {
42902
43168
  editorContentRef.current?.dispatchEvent(new CustomEvent(UEDITOR_TABLE_LAYOUT_CHANGE_EVENT));
42903
43169
  });
42904
43170
  }, [updateActiveCellHighlight]);
42905
- const setActiveTableCell = import_react76.default.useCallback((cell) => {
43171
+ const setActiveTableCell = import_react77.default.useCallback((cell) => {
42906
43172
  if (activeTableCellRef.current === cell) {
42907
43173
  updateActiveCellHighlight(cell);
42908
43174
  return;
@@ -42910,17 +43176,17 @@ function useUEditorTableInteractions(editor, editable = true) {
42910
43176
  activeTableCellRef.current = cell;
42911
43177
  updateActiveCellHighlight(activeTableCellRef.current);
42912
43178
  }, [updateActiveCellHighlight]);
42913
- const clearActiveTableCell = import_react76.default.useCallback(() => {
43179
+ const clearActiveTableCell = import_react77.default.useCallback(() => {
42914
43180
  activeTableCellRef.current = null;
42915
43181
  updateActiveCellHighlight(null);
42916
43182
  }, [updateActiveCellHighlight]);
42917
- const setHoveredTableCell = import_react76.default.useCallback((cell) => {
43183
+ const setHoveredTableCell = import_react77.default.useCallback((cell) => {
42918
43184
  hoveredTableCellRef.current = cell;
42919
43185
  }, []);
42920
- const clearHoveredTableCell = import_react76.default.useCallback(() => {
43186
+ const clearHoveredTableCell = import_react77.default.useCallback(() => {
42921
43187
  hoveredTableCellRef.current = null;
42922
43188
  }, []);
42923
- const showColumnGuide = import_react76.default.useCallback((table, row, cell) => {
43189
+ const showColumnGuide = import_react77.default.useCallback((table, row, cell) => {
42924
43190
  const surface = editorContentRef.current;
42925
43191
  const guide = tableColumnGuideRef.current;
42926
43192
  if (!surface || !guide) return;
@@ -42934,7 +43200,7 @@ function useUEditorTableInteractions(editor, editable = true) {
42934
43200
  getProseMirrorElement()?.classList.add("resize-cursor");
42935
43201
  setEditorResizeCursor("col-resize");
42936
43202
  }, [getProseMirrorElement, setEditorResizeCursor]);
42937
- const showRowGuide = import_react76.default.useCallback((table, row, cell, previewHeight) => {
43203
+ const showRowGuide = import_react77.default.useCallback((table, row, cell, previewHeight) => {
42938
43204
  const surface = editorContentRef.current;
42939
43205
  const guide = tableRowGuideRef.current;
42940
43206
  if (!surface || !guide) return;
@@ -42966,7 +43232,7 @@ function useUEditorTableInteractions(editor, editable = true) {
42966
43232
  clearAllTableResizeHover,
42967
43233
  scheduleTableLayoutSync
42968
43234
  });
42969
- const syncActiveTableCellFromSelection = import_react76.default.useCallback(() => {
43235
+ const syncActiveTableCellFromSelection = import_react77.default.useCallback(() => {
42970
43236
  if (!editor) return;
42971
43237
  if (!editor.isFocused) {
42972
43238
  clearActiveTableCell();
@@ -42974,7 +43240,7 @@ function useUEditorTableInteractions(editor, editable = true) {
42974
43240
  }
42975
43241
  setActiveTableCell(getSelectionTableCell(editor.view));
42976
43242
  }, [clearActiveTableCell, editor, setActiveTableCell]);
42977
- (0, import_react76.useEffect)(() => {
43243
+ (0, import_react77.useEffect)(() => {
42978
43244
  if (!editor || !editable) return void 0;
42979
43245
  const proseMirror = editor.view.dom;
42980
43246
  const surface = editorContentRef.current;
@@ -43149,7 +43415,7 @@ function useUEditorTableInteractions(editor, editable = true) {
43149
43415
  }
43150
43416
 
43151
43417
  // src/components/UEditor/use-formula-coordinate-overlay.ts
43152
- var import_react77 = require("react");
43418
+ var import_react78 = require("react");
43153
43419
  var import_tables9 = require("@tiptap/pm/tables");
43154
43420
 
43155
43421
  // src/components/UEditor/table-formula-range-picker.ts
@@ -43419,8 +43685,8 @@ function createBlockedReferenceHighlight(label) {
43419
43685
  return element;
43420
43686
  }
43421
43687
  function useFormulaCoordinateOverlay(editor, containerRef, labels) {
43422
- const overlayRef = (0, import_react77.useRef)(null);
43423
- (0, import_react77.useEffect)(() => {
43688
+ const overlayRef = (0, import_react78.useRef)(null);
43689
+ (0, import_react78.useEffect)(() => {
43424
43690
  if (!editor) return void 0;
43425
43691
  const overlay = overlayRef.current;
43426
43692
  const container = containerRef.current;
@@ -43627,9 +43893,9 @@ function useFormulaCoordinateOverlay(editor, containerRef, labels) {
43627
43893
  }
43628
43894
 
43629
43895
  // src/components/UEditor/menu-bar.tsx
43630
- var import_react78 = __toESM(require("react"), 1);
43631
- var import_react79 = require("@tiptap/react");
43632
- var import_lucide_react58 = require("lucide-react");
43896
+ var import_react79 = __toESM(require("react"), 1);
43897
+ var import_react80 = require("@tiptap/react");
43898
+ var import_lucide_react57 = require("lucide-react");
43633
43899
 
43634
43900
  // src/components/UEditor/preview-html.ts
43635
43901
  var DEFAULT_TABLE_COLUMN_WIDTH2 = 100;
@@ -43809,7 +44075,7 @@ function renderMenuItems(items) {
43809
44075
  case "sub":
43810
44076
  return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DropdownMenuSub, { label: item.label, icon: item.icon, disabled: item.disabled, children: renderMenuItems(item.items) }, i);
43811
44077
  case "custom":
43812
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react78.default.Fragment, { children: item.render() }, item.key);
44078
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react79.default.Fragment, { children: item.render() }, item.key);
43813
44079
  }
43814
44080
  });
43815
44081
  }
@@ -43847,7 +44113,7 @@ function buildEditMenuItems(t, editor) {
43847
44113
  {
43848
44114
  type: "action",
43849
44115
  label: t("menubar.undo"),
43850
- icon: import_lucide_react58.Undo,
44116
+ icon: import_lucide_react57.Undo,
43851
44117
  shortcut: t("menubar.undoShortcut"),
43852
44118
  onClick: () => editor.chain().focus().undo().run(),
43853
44119
  disabled: !editor.can().undo()
@@ -43855,7 +44121,7 @@ function buildEditMenuItems(t, editor) {
43855
44121
  {
43856
44122
  type: "action",
43857
44123
  label: t("menubar.redo"),
43858
- icon: import_lucide_react58.Redo,
44124
+ icon: import_lucide_react57.Redo,
43859
44125
  shortcut: t("menubar.redoShortcut"),
43860
44126
  onClick: () => editor.chain().focus().redo().run(),
43861
44127
  disabled: !editor.can().redo()
@@ -43864,7 +44130,7 @@ function buildEditMenuItems(t, editor) {
43864
44130
  {
43865
44131
  type: "action",
43866
44132
  label: t("menubar.cut"),
43867
- icon: import_lucide_react58.Scissors,
44133
+ icon: import_lucide_react57.Scissors,
43868
44134
  shortcut: t("menubar.cutShortcut"),
43869
44135
  onClick: () => document.execCommand("cut")
43870
44136
  },
@@ -43912,7 +44178,7 @@ function buildViewMenuItems(t, {
43912
44178
  {
43913
44179
  type: "action",
43914
44180
  label: t("menubar.sourceCode"),
43915
- icon: import_lucide_react58.FileCode,
44181
+ icon: import_lucide_react57.FileCode,
43916
44182
  onClick: () => onSourceCode ? onSourceCode() : openSourceDialog()
43917
44183
  },
43918
44184
  {
@@ -43924,7 +44190,7 @@ function buildViewMenuItems(t, {
43924
44190
  {
43925
44191
  type: "action",
43926
44192
  label: t("menubar.fullscreen"),
43927
- icon: import_lucide_react58.Maximize2,
44193
+ icon: import_lucide_react57.Maximize2,
43928
44194
  shortcut: t("menubar.fullscreenShortcut"),
43929
44195
  onClick: () => {
43930
44196
  const el = containerRef.current;
@@ -43943,7 +44209,7 @@ function buildFormatMenuItems(t, editor) {
43943
44209
  {
43944
44210
  type: "action",
43945
44211
  label: t("menubar.bold"),
43946
- icon: import_lucide_react58.Bold,
44212
+ icon: import_lucide_react57.Bold,
43947
44213
  shortcut: t("menubar.boldShortcut"),
43948
44214
  active: editor.isActive("bold"),
43949
44215
  onClick: () => editor.chain().focus().toggleBold().run()
@@ -43951,7 +44217,7 @@ function buildFormatMenuItems(t, editor) {
43951
44217
  {
43952
44218
  type: "action",
43953
44219
  label: t("menubar.italic"),
43954
- icon: import_lucide_react58.Italic,
44220
+ icon: import_lucide_react57.Italic,
43955
44221
  shortcut: t("menubar.italicShortcut"),
43956
44222
  active: editor.isActive("italic"),
43957
44223
  onClick: () => editor.chain().focus().toggleItalic().run()
@@ -43959,7 +44225,7 @@ function buildFormatMenuItems(t, editor) {
43959
44225
  {
43960
44226
  type: "action",
43961
44227
  label: t("menubar.underline"),
43962
- icon: import_lucide_react58.Underline,
44228
+ icon: import_lucide_react57.Underline,
43963
44229
  shortcut: t("menubar.underlineShortcut"),
43964
44230
  active: editor.isActive("underline"),
43965
44231
  onClick: () => editor.chain().focus().toggleUnderline().run()
@@ -43967,28 +44233,28 @@ function buildFormatMenuItems(t, editor) {
43967
44233
  {
43968
44234
  type: "action",
43969
44235
  label: t("menubar.strike"),
43970
- icon: import_lucide_react58.Strikethrough,
44236
+ icon: import_lucide_react57.Strikethrough,
43971
44237
  active: editor.isActive("strike"),
43972
44238
  onClick: () => editor.chain().focus().toggleStrike().run()
43973
44239
  },
43974
44240
  {
43975
44241
  type: "action",
43976
44242
  label: t("menubar.superscript"),
43977
- icon: import_lucide_react58.Superscript,
44243
+ icon: import_lucide_react57.Superscript,
43978
44244
  active: editor.isActive("superscript"),
43979
44245
  onClick: () => editor.chain().focus().toggleSuperscript().run()
43980
44246
  },
43981
44247
  {
43982
44248
  type: "action",
43983
44249
  label: t("menubar.subscript"),
43984
- icon: import_lucide_react58.Subscript,
44250
+ icon: import_lucide_react57.Subscript,
43985
44251
  active: editor.isActive("subscript"),
43986
44252
  onClick: () => editor.chain().focus().toggleSubscript().run()
43987
44253
  },
43988
44254
  {
43989
44255
  type: "action",
43990
44256
  label: t("menubar.code"),
43991
- icon: import_lucide_react58.Code,
44257
+ icon: import_lucide_react57.Code,
43992
44258
  active: editor.isActive("code"),
43993
44259
  onClick: () => editor.chain().focus().toggleCode().run()
43994
44260
  },
@@ -44006,21 +44272,21 @@ function buildFormatMenuItems(t, editor) {
44006
44272
  {
44007
44273
  type: "action",
44008
44274
  label: t("menubar.heading1"),
44009
- icon: import_lucide_react58.Heading1,
44275
+ icon: import_lucide_react57.Heading1,
44010
44276
  active: editor.isActive("heading", { level: 1 }),
44011
44277
  onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run()
44012
44278
  },
44013
44279
  {
44014
44280
  type: "action",
44015
44281
  label: t("menubar.heading2"),
44016
- icon: import_lucide_react58.Heading2,
44282
+ icon: import_lucide_react57.Heading2,
44017
44283
  active: editor.isActive("heading", { level: 2 }),
44018
44284
  onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run()
44019
44285
  },
44020
44286
  {
44021
44287
  type: "action",
44022
44288
  label: t("menubar.heading3"),
44023
- icon: import_lucide_react58.Heading3,
44289
+ icon: import_lucide_react57.Heading3,
44024
44290
  active: editor.isActive("heading", { level: 3 }),
44025
44291
  onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run()
44026
44292
  },
@@ -44028,21 +44294,21 @@ function buildFormatMenuItems(t, editor) {
44028
44294
  {
44029
44295
  type: "action",
44030
44296
  label: t("menubar.blockquote"),
44031
- icon: import_lucide_react58.Quote,
44297
+ icon: import_lucide_react57.Quote,
44032
44298
  active: editor.isActive("blockquote"),
44033
44299
  onClick: () => editor.chain().focus().toggleBlockquote().run()
44034
44300
  },
44035
44301
  {
44036
44302
  type: "action",
44037
44303
  label: t("menubar.codeBlock"),
44038
- icon: import_lucide_react58.FileCode,
44304
+ icon: import_lucide_react57.FileCode,
44039
44305
  active: editor.isActive("codeBlock"),
44040
44306
  onClick: () => editor.chain().focus().toggleCodeBlock().run()
44041
44307
  },
44042
44308
  {
44043
44309
  type: "action",
44044
44310
  label: t("menubar.taskList"),
44045
- icon: import_lucide_react58.ListTodo,
44311
+ icon: import_lucide_react57.ListTodo,
44046
44312
  active: editor.isActive("taskList"),
44047
44313
  onClick: () => editor.chain().focus().toggleTaskList().run()
44048
44314
  }
@@ -44055,28 +44321,28 @@ function buildFormatMenuItems(t, editor) {
44055
44321
  {
44056
44322
  type: "action",
44057
44323
  label: t("menubar.alignLeft"),
44058
- icon: import_lucide_react58.AlignLeft,
44324
+ icon: import_lucide_react57.AlignLeft,
44059
44325
  active: editor.isActive({ textAlign: "left" }),
44060
44326
  onClick: () => editor.chain().focus().setTextAlign("left").run()
44061
44327
  },
44062
44328
  {
44063
44329
  type: "action",
44064
44330
  label: t("menubar.alignCenter"),
44065
- icon: import_lucide_react58.AlignCenter,
44331
+ icon: import_lucide_react57.AlignCenter,
44066
44332
  active: editor.isActive({ textAlign: "center" }),
44067
44333
  onClick: () => editor.chain().focus().setTextAlign("center").run()
44068
44334
  },
44069
44335
  {
44070
44336
  type: "action",
44071
44337
  label: t("menubar.alignRight"),
44072
- icon: import_lucide_react58.AlignRight,
44338
+ icon: import_lucide_react57.AlignRight,
44073
44339
  active: editor.isActive({ textAlign: "right" }),
44074
44340
  onClick: () => editor.chain().focus().setTextAlign("right").run()
44075
44341
  },
44076
44342
  {
44077
44343
  type: "action",
44078
44344
  label: t("menubar.alignJustify"),
44079
- icon: import_lucide_react58.AlignJustify,
44345
+ icon: import_lucide_react57.AlignJustify,
44080
44346
  active: editor.isActive({ textAlign: "justify" }),
44081
44347
  onClick: () => editor.chain().focus().setTextAlign("justify").run()
44082
44348
  }
@@ -44095,7 +44361,7 @@ function buildToolsMenuItems(t, { onSourceCode, openSourceDialog }) {
44095
44361
  {
44096
44362
  type: "action",
44097
44363
  label: t("menubar.sourceCode"),
44098
- icon: import_lucide_react58.FileCode,
44364
+ icon: import_lucide_react57.FileCode,
44099
44365
  onClick: () => onSourceCode ? onSourceCode() : openSourceDialog()
44100
44366
  }
44101
44367
  ];
@@ -44106,7 +44372,7 @@ function buildTableMenuItems(t, editor, onInsertTable) {
44106
44372
  {
44107
44373
  type: "sub",
44108
44374
  label: t("menubar.insertTable"),
44109
- icon: import_lucide_react58.Table,
44375
+ icon: import_lucide_react57.Table,
44110
44376
  items: [
44111
44377
  {
44112
44378
  type: "custom",
@@ -44132,7 +44398,7 @@ function buildTableMenuItems(t, editor, onInsertTable) {
44132
44398
  {
44133
44399
  type: "action",
44134
44400
  label: t("menubar.deleteTable"),
44135
- icon: import_lucide_react58.Trash2,
44401
+ icon: import_lucide_react57.Trash2,
44136
44402
  destructive: true,
44137
44403
  disabled: !inTable,
44138
44404
  onClick: () => editor.chain().focus().deleteTable().run()
@@ -44185,7 +44451,7 @@ function buildTableMenuItems(t, editor, onInsertTable) {
44185
44451
  }
44186
44452
  ];
44187
44453
  }
44188
- var MenuBarTrigger = import_react78.default.forwardRef(
44454
+ var MenuBarTrigger = import_react79.default.forwardRef(
44189
44455
  ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
44190
44456
  "button",
44191
44457
  {
@@ -44217,18 +44483,18 @@ var MenuBar = ({
44217
44483
  onPreview
44218
44484
  }) => {
44219
44485
  const t = useSmartTranslations("UEditor");
44220
- (0, import_react79.useEditorState)({
44486
+ (0, import_react80.useEditorState)({
44221
44487
  editor,
44222
44488
  selector: ({ transactionNumber }) => transactionNumber
44223
44489
  });
44224
- const fileInputRef = (0, import_react78.useRef)(null);
44225
- const [showImageInput, setShowImageInput] = (0, import_react78.useState)(false);
44226
- const [showLinkInput, setShowLinkInput] = (0, import_react78.useState)(false);
44227
- const [isInsertMenuOpen, setIsInsertMenuOpen] = (0, import_react78.useState)(false);
44228
- const [showSourceDialog, setShowSourceDialog] = (0, import_react78.useState)(false);
44229
- const [sourceHtml, setSourceHtml] = (0, import_react78.useState)("");
44230
- const [showPreviewDialog, setShowPreviewDialog] = (0, import_react78.useState)(false);
44231
- const previewHtml = (0, import_react78.useMemo)(
44490
+ const fileInputRef = (0, import_react79.useRef)(null);
44491
+ const [showImageInput, setShowImageInput] = (0, import_react79.useState)(false);
44492
+ const [showLinkInput, setShowLinkInput] = (0, import_react79.useState)(false);
44493
+ const [isInsertMenuOpen, setIsInsertMenuOpen] = (0, import_react79.useState)(false);
44494
+ const [showSourceDialog, setShowSourceDialog] = (0, import_react79.useState)(false);
44495
+ const [sourceHtml, setSourceHtml] = (0, import_react79.useState)("");
44496
+ const [showPreviewDialog, setShowPreviewDialog] = (0, import_react79.useState)(false);
44497
+ const previewHtml = (0, import_react79.useMemo)(
44232
44498
  () => showPreviewDialog ? prepareUEditorPreviewHtml(editor.getHTML()) : "",
44233
44499
  [editor, showPreviewDialog]
44234
44500
  );
@@ -44290,12 +44556,12 @@ var MenuBar = ({
44290
44556
  type: "custom",
44291
44557
  key: "image",
44292
44558
  render: () => showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
44293
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DropdownMenuItem, { label: t("menubar.image"), icon: import_lucide_react58.Image, onClick: () => setShowImageInput(true), closeOnSelect: false }),
44559
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DropdownMenuItem, { label: t("menubar.image"), icon: import_lucide_react57.Image, onClick: () => setShowImageInput(true), closeOnSelect: false }),
44294
44560
  /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
44295
44561
  DropdownMenuItem,
44296
44562
  {
44297
44563
  label: t("menubar.imageUpload"),
44298
- icon: import_lucide_react58.Upload,
44564
+ icon: import_lucide_react57.Upload,
44299
44565
  onClick: () => fileInputRef.current?.click(),
44300
44566
  closeOnSelect: false
44301
44567
  }
@@ -44310,7 +44576,7 @@ var MenuBar = ({
44310
44576
  DropdownMenuItem,
44311
44577
  {
44312
44578
  label: t("menubar.link"),
44313
- icon: import_lucide_react58.Link,
44579
+ icon: import_lucide_react57.Link,
44314
44580
  shortcut: t("menubar.linkShortcut"),
44315
44581
  onClick: () => setShowLinkInput(true),
44316
44582
  closeOnSelect: false
@@ -44321,7 +44587,7 @@ var MenuBar = ({
44321
44587
  {
44322
44588
  type: "sub",
44323
44589
  label: t("menubar.insertTable"),
44324
- icon: import_lucide_react58.Table,
44590
+ icon: import_lucide_react57.Table,
44325
44591
  items: [
44326
44592
  {
44327
44593
  type: "custom",
@@ -44341,24 +44607,24 @@ var MenuBar = ({
44341
44607
  {
44342
44608
  type: "sub",
44343
44609
  label: t("menubar.formFields") || "Form Fields",
44344
- icon: import_lucide_react58.ListTodo,
44610
+ icon: import_lucide_react57.ListTodo,
44345
44611
  items: [
44346
44612
  {
44347
44613
  type: "action",
44348
44614
  label: t("menubar.formCheckbox") || "Form Checkbox",
44349
- icon: import_lucide_react58.Square,
44615
+ icon: import_lucide_react57.Square,
44350
44616
  onClick: () => editor.chain().focus().setFormCheckbox().run()
44351
44617
  },
44352
44618
  {
44353
44619
  type: "action",
44354
44620
  label: t("slashCommand.roundCheckbox") || "Round Checkbox",
44355
- icon: import_lucide_react58.CircleCheckBig,
44621
+ icon: import_lucide_react57.CircleCheckBig,
44356
44622
  onClick: () => editor.chain().focus().setFormCheckbox({ variant: "circle" }).run()
44357
44623
  },
44358
44624
  {
44359
44625
  type: "action",
44360
44626
  label: t("menubar.formRadio") || "Form Radio Button",
44361
- icon: import_lucide_react58.CircleDot,
44627
+ icon: import_lucide_react57.CircleDot,
44362
44628
  onClick: () => editor.chain().focus().setFormRadio().run()
44363
44629
  }
44364
44630
  ]
@@ -44440,7 +44706,7 @@ var MenuBar = ({
44440
44706
  "ml-auto inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors",
44441
44707
  "hover:bg-accent hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1"
44442
44708
  ),
44443
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react58.Eye, { className: "h-4 w-4", "aria-hidden": "true" })
44709
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react57.Eye, { className: "h-4 w-4", "aria-hidden": "true" })
44444
44710
  }
44445
44711
  )
44446
44712
  ] }),
@@ -44517,20 +44783,20 @@ var MenuBar = ({
44517
44783
  };
44518
44784
 
44519
44785
  // src/components/UEditor/table-formula-bar.tsx
44520
- var import_react80 = require("react");
44521
- var import_react81 = require("@tiptap/react");
44522
- var import_lucide_react59 = require("lucide-react");
44786
+ var import_react81 = require("react");
44787
+ var import_react82 = require("@tiptap/react");
44788
+ var import_lucide_react58 = require("lucide-react");
44523
44789
  var import_jsx_runtime101 = require("react/jsx-runtime");
44524
44790
  function TableFormulaBar({ editor }) {
44525
44791
  const t = useSmartTranslations("UEditor");
44526
- const inputRef = (0, import_react80.useRef)(null);
44527
- const [draftState, setDraftState] = (0, import_react80.useState)(null);
44528
- (0, import_react81.useEditorState)({
44792
+ const inputRef = (0, import_react81.useRef)(null);
44793
+ const [draftState, setDraftState] = (0, import_react81.useState)(null);
44794
+ (0, import_react82.useEditorState)({
44529
44795
  editor,
44530
44796
  selector: ({ transactionNumber }) => transactionNumber
44531
44797
  });
44532
44798
  const selectedCell = getSelectedTableFormulaCell(editor);
44533
- (0, import_react80.useEffect)(() => {
44799
+ (0, import_react81.useEffect)(() => {
44534
44800
  const focusFormulaInput = () => {
44535
44801
  inputRef.current?.focus();
44536
44802
  };
@@ -44586,7 +44852,7 @@ function TableFormulaBar({ editor }) {
44586
44852
  children: selectedCell.label
44587
44853
  }
44588
44854
  ),
44589
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react59.Sigma, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-primary" }),
44855
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react58.Sigma, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-primary" }),
44590
44856
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
44591
44857
  "input",
44592
44858
  {
@@ -44614,7 +44880,7 @@ function TableFormulaBar({ editor }) {
44614
44880
  role: "status",
44615
44881
  className: "hidden shrink-0 items-center gap-1 text-xs font-medium text-destructive sm:inline-flex",
44616
44882
  children: [
44617
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react59.AlertCircle, { "aria-hidden": "true", className: "h-3.5 w-3.5" }),
44883
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react58.AlertCircle, { "aria-hidden": "true", className: "h-3.5 w-3.5" }),
44618
44884
  t("tableMenu.formulaError")
44619
44885
  ]
44620
44886
  }
@@ -44627,7 +44893,7 @@ function TableFormulaBar({ editor }) {
44627
44893
  "aria-label": t("tableMenu.apply"),
44628
44894
  title: t("tableMenu.apply"),
44629
44895
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground transition-colors hover:bg-primary/90",
44630
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react59.Check, { "aria-hidden": "true", className: "h-4 w-4" })
44896
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react58.Check, { "aria-hidden": "true", className: "h-4 w-4" })
44631
44897
  }
44632
44898
  ),
44633
44899
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
@@ -44641,7 +44907,7 @@ function TableFormulaBar({ editor }) {
44641
44907
  "aria-label": t("tableMenu.convertToValue"),
44642
44908
  title: t("tableMenu.convertToValue"),
44643
44909
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border/60 bg-background text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
44644
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react59.Hash, { "aria-hidden": "true", className: "h-4 w-4" })
44910
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react58.Hash, { "aria-hidden": "true", className: "h-4 w-4" })
44645
44911
  }
44646
44912
  ),
44647
44913
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
@@ -44655,7 +44921,7 @@ function TableFormulaBar({ editor }) {
44655
44921
  "aria-label": t("tableMenu.clearCell"),
44656
44922
  title: t("tableMenu.clearCell"),
44657
44923
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-destructive/30 bg-background text-destructive transition-colors hover:bg-destructive/10",
44658
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react59.Trash2, { "aria-hidden": "true", className: "h-4 w-4" })
44924
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react58.Trash2, { "aria-hidden": "true", className: "h-4 w-4" })
44659
44925
  }
44660
44926
  )
44661
44927
  ]
@@ -44665,7 +44931,7 @@ function TableFormulaBar({ editor }) {
44665
44931
 
44666
44932
  // src/components/UEditor/UEditor.tsx
44667
44933
  var import_jsx_runtime102 = require("react/jsx-runtime");
44668
- var UEditor = import_react82.default.forwardRef(({
44934
+ var UEditor = import_react83.default.forwardRef(({
44669
44935
  content = "",
44670
44936
  onChange,
44671
44937
  onHtmlChange,
@@ -44707,14 +44973,14 @@ var UEditor = import_react82.default.forwardRef(({
44707
44973
  }, ref) => {
44708
44974
  const t = useSmartTranslations("UEditor");
44709
44975
  const effectivePlaceholder = placeholder ?? t("placeholder");
44710
- const inFlightPrepareRef = (0, import_react82.useRef)(null);
44711
- const lastAppliedContentRef = (0, import_react82.useRef)(content ?? "");
44712
- const scheduledFormulaRecalculateRef = (0, import_react82.useRef)(false);
44713
- const editorInstanceRef = (0, import_react82.useRef)(null);
44714
- const formulaRangePickRef = (0, import_react82.useRef)(null);
44715
- const formulaRangeSurfaceRef = (0, import_react82.useRef)(null);
44716
- const [formulaRangeHighlight, setFormulaRangeHighlight] = import_react82.default.useState(null);
44717
- const scheduleFormulaRecalculate = import_react82.default.useCallback((editor2, options) => {
44976
+ const inFlightPrepareRef = (0, import_react83.useRef)(null);
44977
+ const lastAppliedContentRef = (0, import_react83.useRef)(content ?? "");
44978
+ const scheduledFormulaRecalculateRef = (0, import_react83.useRef)(false);
44979
+ const editorInstanceRef = (0, import_react83.useRef)(null);
44980
+ const formulaRangePickRef = (0, import_react83.useRef)(null);
44981
+ const formulaRangeSurfaceRef = (0, import_react83.useRef)(null);
44982
+ const [formulaRangeHighlight, setFormulaRangeHighlight] = import_react83.default.useState(null);
44983
+ const scheduleFormulaRecalculate = import_react83.default.useCallback((editor2, options) => {
44718
44984
  if (editor2.isDestroyed || scheduledFormulaRecalculateRef.current) return;
44719
44985
  if (!options?.force && isEditingTableFormulaText(editor2)) return;
44720
44986
  scheduledFormulaRecalculateRef.current = true;
@@ -44725,7 +44991,7 @@ var UEditor = import_react82.default.forwardRef(({
44725
44991
  }
44726
44992
  });
44727
44993
  }, []);
44728
- const resolvedUploadFile = (0, import_react82.useMemo)(() => {
44994
+ const resolvedUploadFile = (0, import_react83.useMemo)(() => {
44729
44995
  if (uploadFile) return uploadFile;
44730
44996
  if (uploadFileForSave) {
44731
44997
  return async (file) => {
@@ -44735,7 +45001,7 @@ var UEditor = import_react82.default.forwardRef(({
44735
45001
  }
44736
45002
  return uploadImage;
44737
45003
  }, [uploadFile, uploadFileForSave, uploadImage]);
44738
- const extensions = (0, import_react82.useMemo)(
45004
+ const extensions = (0, import_react83.useMemo)(
44739
45005
  () => [
44740
45006
  ...buildUEditorExtensions({
44741
45007
  placeholder: effectivePlaceholder,
@@ -44754,11 +45020,11 @@ var UEditor = import_react82.default.forwardRef(({
44754
45020
  ],
44755
45021
  [effectivePlaceholder, t, maxCharacters, uploadImage, resolvedUploadFile, imageInsertMode, maxImageFileSize, allowedImageMimeTypes, fallbackToDataUrl, editable, fetchMetadata, extraExtensions]
44756
45022
  );
44757
- const syncFormulaRangeHighlight = import_react82.default.useCallback((pickState) => {
45023
+ const syncFormulaRangeHighlight = import_react83.default.useCallback((pickState) => {
44758
45024
  const container = formulaRangeSurfaceRef.current;
44759
45025
  setFormulaRangeHighlight(container && pickState ? getFormulaRangePickHighlight(container, pickState) : null);
44760
45026
  }, []);
44761
- const editor = (0, import_react83.useEditor)({
45027
+ const editor = (0, import_react84.useEditor)({
44762
45028
  immediatelyRender: false,
44763
45029
  extensions,
44764
45030
  content,
@@ -44864,7 +45130,7 @@ var UEditor = import_react82.default.forwardRef(({
44864
45130
  scheduleFormulaRecalculate(editor2, { force: true });
44865
45131
  }
44866
45132
  });
44867
- (0, import_react82.useEffect)(() => {
45133
+ (0, import_react83.useEffect)(() => {
44868
45134
  editorInstanceRef.current = editor;
44869
45135
  return () => {
44870
45136
  if (editorInstanceRef.current === editor) editorInstanceRef.current = null;
@@ -44880,7 +45146,7 @@ var UEditor = import_react82.default.forwardRef(({
44880
45146
  apply: t("tableMenu.apply"),
44881
45147
  cancel: t("imageInput.cancelBtn")
44882
45148
  });
44883
- (0, import_react82.useImperativeHandle)(
45149
+ (0, import_react83.useImperativeHandle)(
44884
45150
  ref,
44885
45151
  () => ({
44886
45152
  editor,
@@ -44905,7 +45171,7 @@ var UEditor = import_react82.default.forwardRef(({
44905
45171
  }),
44906
45172
  [content, editor, uploadImageForSave, uploadFileForSave, uploadImageConcurrency]
44907
45173
  );
44908
- (0, import_react82.useEffect)(() => {
45174
+ (0, import_react83.useEffect)(() => {
44909
45175
  if (!editor) return;
44910
45176
  queueMicrotask(() => {
44911
45177
  if (!editor.isDestroyed) {
@@ -44913,7 +45179,7 @@ var UEditor = import_react82.default.forwardRef(({
44913
45179
  }
44914
45180
  });
44915
45181
  }, [editor]);
44916
- (0, import_react82.useEffect)(() => {
45182
+ (0, import_react83.useEffect)(() => {
44917
45183
  if (!editor) return;
44918
45184
  const nextContent = content ?? "";
44919
45185
  if (lastAppliedContentRef.current === nextContent) return;
@@ -45063,7 +45329,7 @@ var UEditor = import_react82.default.forwardRef(({
45063
45329
  ),
45064
45330
  editable && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TableControls, { editor, containerRef: editorContentRef }),
45065
45331
  /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
45066
- import_react83.EditorContent,
45332
+ import_react84.EditorContent,
45067
45333
  {
45068
45334
  editor,
45069
45335
  className: "min-h-full"