@underverse-ui/underverse 1.0.126 → 1.0.128

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.js CHANGED
@@ -7218,7 +7218,7 @@ var DropdownMenuItem = ({
7218
7218
  disabled,
7219
7219
  onMouseDown: (e) => e.preventDefault(),
7220
7220
  className: cn(
7221
- "flex w-full items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors group",
7221
+ "flex w-full items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors group cursor-pointer",
7222
7222
  "hover:bg-accent hover:text-accent-foreground",
7223
7223
  "focus:bg-accent focus:text-accent-foreground focus:outline-none",
7224
7224
  "disabled:opacity-50 disabled:cursor-not-allowed",
@@ -25298,7 +25298,6 @@ function buildUEditorExtensions({
25298
25298
 
25299
25299
  // src/components/UEditor/toolbar.tsx
25300
25300
  import React73, { useRef as useRef31, useState as useState44 } from "react";
25301
- import { createPortal as createPortal8 } from "react-dom";
25302
25301
  import { useEditorState } from "@tiptap/react";
25303
25302
  import {
25304
25303
  AlignCenter,
@@ -25309,8 +25308,10 @@ import {
25309
25308
  ArrowLeft,
25310
25309
  ArrowRight,
25311
25310
  ArrowUp,
25311
+ Baseline,
25312
25312
  Bold as BoldIcon,
25313
25313
  ChevronDown as ChevronDown7,
25314
+ ChevronsUpDown,
25314
25315
  Code as CodeIcon,
25315
25316
  FileCode as FileCode3,
25316
25317
  Heading1 as Heading1Icon,
@@ -25828,7 +25829,7 @@ var ToolbarButton = React73.forwardRef(({ onClick, onMouseDown, active, disabled
25828
25829
  onClick,
25829
25830
  disabled,
25830
25831
  className: cn(
25831
- "flex items-center justify-center w-8 h-8 rounded-md transition-colors duration-150",
25832
+ "flex items-center justify-center w-7 h-7 rounded-md transition-colors duration-150 cursor-pointer",
25832
25833
  "gap-0.5 [&_svg+svg]:-ml-1",
25833
25834
  "hover:bg-accent",
25834
25835
  "focus:outline-none focus:ring-2 focus:ring-primary/20",
@@ -25907,11 +25908,6 @@ var EditorToolbar = ({
25907
25908
  const fileInputRef = useRef31(null);
25908
25909
  const [isUploadingImage, setIsUploadingImage] = useState44(false);
25909
25910
  const [imageUploadError, setImageUploadError] = useState44(null);
25910
- const [fontSizeDraft, setFontSizeDraft] = useState44("");
25911
- const [isFontSizeMenuOpen, setIsFontSizeMenuOpen] = useState44(false);
25912
- const [fontSizeMenuPosition, setFontSizeMenuPosition] = useState44({ top: 0, left: 0 });
25913
- const fontSizeControlRef = useRef31(null);
25914
- const fontSizeMenuRef = useRef31(null);
25915
25911
  const isImageSelected = editor.isActive("image");
25916
25912
  const imageAttrs = editor.getAttributes("image");
25917
25913
  const tableAttrs = editor.getAttributes("table");
@@ -25937,53 +25933,6 @@ var EditorToolbar = ({
25937
25933
  const currentLineHeightLabel = availableLineHeights.find((option) => normalizeStyleValue(option.value) === currentLineHeight)?.label ?? t("toolbar.lineHeightDefault");
25938
25934
  const currentLetterSpacingLabel = availableLetterSpacings.find((option) => normalizeStyleValue(option.value) === currentLetterSpacing)?.label ?? t("toolbar.letterSpacingDefault");
25939
25935
  const displayedFontFamilyLabel = currentFontFamily ? currentFontFamilyLabel : availableFontFamilies[0]?.label ?? t("toolbar.fontDefault");
25940
- React73.useEffect(() => {
25941
- if (document.activeElement === fontSizeControlRef.current?.querySelector("input")) return;
25942
- setFontSizeDraft(currentFontSize.replace(/px$/i, "") || "16");
25943
- }, [currentFontSize]);
25944
- const applyFontSizeDraft = () => {
25945
- const normalized = fontSizeDraft.trim();
25946
- if (!normalized) {
25947
- editor.chain().focus().unsetFontSize().run();
25948
- return;
25949
- }
25950
- const parsed = Number.parseFloat(normalized);
25951
- if (!Number.isFinite(parsed) || parsed <= 0) return;
25952
- const clamped = Math.min(96, Math.max(8, parsed));
25953
- editor.chain().focus().setFontSize(`${clamped}px`).run();
25954
- setFontSizeDraft(String(clamped));
25955
- };
25956
- const updateFontSizeMenuPosition = React73.useCallback(() => {
25957
- const rect = fontSizeControlRef.current?.getBoundingClientRect();
25958
- if (!rect) return;
25959
- setFontSizeMenuPosition({
25960
- top: Math.round(rect.bottom + 4),
25961
- left: Math.round(rect.left)
25962
- });
25963
- }, []);
25964
- const toggleFontSizeMenu = () => {
25965
- updateFontSizeMenuPosition();
25966
- setIsFontSizeMenuOpen((open) => !open);
25967
- };
25968
- React73.useEffect(() => {
25969
- if (!isFontSizeMenuOpen) return;
25970
- updateFontSizeMenuPosition();
25971
- const handlePointerDown = (event) => {
25972
- const target = event.target;
25973
- if (fontSizeControlRef.current?.contains(target)) return;
25974
- if (fontSizeMenuRef.current?.contains(target)) return;
25975
- setIsFontSizeMenuOpen(false);
25976
- };
25977
- const handleLayoutChange = () => updateFontSizeMenuPosition();
25978
- document.addEventListener("mousedown", handlePointerDown);
25979
- window.addEventListener("resize", handleLayoutChange);
25980
- window.addEventListener("scroll", handleLayoutChange, true);
25981
- return () => {
25982
- document.removeEventListener("mousedown", handlePointerDown);
25983
- window.removeEventListener("resize", handleLayoutChange);
25984
- window.removeEventListener("scroll", handleLayoutChange, true);
25985
- };
25986
- }, [isFontSizeMenuOpen, updateFontSizeMenuPosition]);
25987
25936
  const insertImageFiles = async (files) => {
25988
25937
  if (files.length === 0) return;
25989
25938
  setIsUploadingImage(true);
@@ -26023,21 +25972,11 @@ var EditorToolbar = ({
26023
25972
  /* @__PURE__ */ jsxs67(
26024
25973
  DropdownMenu,
26025
25974
  {
26026
- trigger: /* @__PURE__ */ jsxs67(
26027
- "button",
26028
- {
26029
- type: "button",
26030
- "aria-label": t("toolbar.fontFamily"),
26031
- className: cn(
26032
- "flex h-8 min-w-34 max-w-42 items-center justify-between gap-2 rounded-full border border-border/60 bg-muted/30 px-2.5 text-xs text-foreground",
26033
- "transition-colors hover:bg-accent focus:outline-none focus:ring-2 focus:ring-primary/20"
26034
- ),
26035
- children: [
26036
- /* @__PURE__ */ jsx81("span", { className: "truncate", children: displayedFontFamilyLabel }),
26037
- /* @__PURE__ */ jsx81(ChevronDown7, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
26038
- ]
26039
- }
26040
- ),
25975
+ trigger: /* @__PURE__ */ jsxs67(ToolbarButton, { onClick: () => {
25976
+ }, title: t("toolbar.fontFamily"), className: "px-1.5 w-auto gap-0.5", children: [
25977
+ /* @__PURE__ */ jsx81(Baseline, { className: "w-4 h-4" }),
25978
+ /* @__PURE__ */ jsx81(ChevronDown7, { className: "h-3 w-3 text-muted-foreground" })
25979
+ ] }),
26041
25980
  contentClassName: "max-h-80 overflow-y-auto min-w-56 p-2",
26042
25981
  children: [
26043
25982
  /* @__PURE__ */ jsx81(
@@ -26055,102 +25994,55 @@ var EditorToolbar = ({
26055
25994
  label: option.label,
26056
25995
  onClick: () => editor.chain().focus().setFontFamily(option.value).run(),
26057
25996
  active: normalizeStyleValue(option.value) === currentFontFamily,
26058
- className: "font-medium "
25997
+ className: "font-medium"
26059
25998
  },
26060
25999
  option.value
26061
26000
  ))
26062
26001
  ]
26063
26002
  }
26064
26003
  ),
26065
- /* @__PURE__ */ jsxs67(Fragment27, { children: [
26066
- /* @__PURE__ */ jsxs67(
26067
- "div",
26068
- {
26069
- ref: fontSizeControlRef,
26070
- "aria-label": t("toolbar.fontSize"),
26071
- className: cn(
26072
- "flex h-8 min-w-16 items-center overflow-hidden rounded-full border border-border/60 bg-muted/30 text-xs font-semibold text-foreground",
26073
- "transition-colors focus-within:ring-2 focus-within:ring-primary/20"
26004
+ /* @__PURE__ */ jsxs67(
26005
+ DropdownMenu,
26006
+ {
26007
+ trigger: /* @__PURE__ */ jsxs67(ToolbarButton, { onClick: () => {
26008
+ }, title: t("toolbar.fontSize"), className: "px-1.5 w-auto gap-0.5", children: [
26009
+ /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-0.5", children: [
26010
+ /* @__PURE__ */ jsx81(ChevronsUpDown, { className: "h-3 w-3 text-muted-foreground", strokeWidth: 2.5 }),
26011
+ /* @__PURE__ */ jsx81("span", { className: "text-xs font-bold leading-none", children: "A" })
26012
+ ] }),
26013
+ /* @__PURE__ */ jsx81(ChevronDown7, { className: "h-3 w-3 text-muted-foreground" })
26014
+ ] }),
26015
+ contentClassName: "max-h-80 overflow-y-auto min-w-32 p-2",
26016
+ children: [
26017
+ /* @__PURE__ */ jsx81(
26018
+ DropdownMenuItem,
26019
+ {
26020
+ icon: Type2,
26021
+ label: t("toolbar.sizeDefault"),
26022
+ onClick: () => editor.chain().focus().unsetFontSize().run(),
26023
+ active: !currentFontSize
26024
+ }
26074
26025
  ),
26075
- children: [
26076
- /* @__PURE__ */ jsx81(
26077
- "input",
26078
- {
26079
- type: "number",
26080
- min: 8,
26081
- max: 96,
26082
- step: 1,
26083
- value: fontSizeDraft,
26084
- onChange: (e) => setFontSizeDraft(e.target.value),
26085
- onBlur: applyFontSizeDraft,
26086
- onMouseDown: (e) => e.stopPropagation(),
26087
- onClick: (e) => e.stopPropagation(),
26088
- onKeyDown: (e) => {
26089
- e.stopPropagation();
26090
- if (e.key === "Enter") {
26091
- e.preventDefault();
26092
- applyFontSizeDraft();
26093
- }
26094
- },
26095
- "aria-label": t("toolbar.fontSize"),
26096
- className: "h-full w-10 bg-transparent px-1 text-center text-xs font-semibold outline-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
26097
- }
26098
- ),
26099
- /* @__PURE__ */ jsx81(
26100
- "button",
26101
- {
26102
- type: "button",
26103
- "aria-label": t("toolbar.fontSize"),
26104
- "aria-expanded": isFontSizeMenuOpen,
26105
- onClick: toggleFontSizeMenu,
26106
- className: "flex h-full w-7 items-center justify-center border-l border-border/50 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
26107
- children: /* @__PURE__ */ jsx81(ChevronDown7, { className: "h-3.5 w-3.5" })
26108
- }
26109
- )
26110
- ]
26111
- }
26112
- ),
26113
- isFontSizeMenuOpen && typeof document !== "undefined" && createPortal8(
26114
- /* @__PURE__ */ jsx81(
26115
- "div",
26116
- {
26117
- ref: fontSizeMenuRef,
26118
- className: "fixed z-[10000] max-h-64 w-12 overflow-y-auto rounded-md border border-border/70 bg-popover p-0.5 text-popover-foreground shadow-md",
26119
- style: { top: fontSizeMenuPosition.top, left: fontSizeMenuPosition.left },
26120
- children: availableFontSizes.map((option) => {
26121
- const active = normalizeStyleValue(option.value) === currentFontSize;
26122
- return /* @__PURE__ */ jsx81(
26123
- "button",
26124
- {
26125
- type: "button",
26126
- onMouseDown: (e) => e.preventDefault(),
26127
- onClick: () => {
26128
- editor.chain().focus().setFontSize(option.value).run();
26129
- setFontSizeDraft(option.label);
26130
- setIsFontSizeMenuOpen(false);
26131
- },
26132
- className: cn(
26133
- "flex h-6 w-full items-center justify-center rounded text-xs leading-none transition-colors",
26134
- active ? "bg-primary/15 text-primary" : "text-foreground hover:bg-accent hover:text-accent-foreground"
26135
- ),
26136
- children: option.label
26137
- },
26138
- option.value
26139
- );
26140
- })
26141
- }
26142
- ),
26143
- document.body
26144
- )
26145
- ] }),
26026
+ availableFontSizes.map((option) => /* @__PURE__ */ jsx81(
26027
+ DropdownMenuItem,
26028
+ {
26029
+ label: option.label,
26030
+ onClick: () => editor.chain().focus().setFontSize(option.value).run(),
26031
+ active: normalizeStyleValue(option.value) === currentFontSize
26032
+ },
26033
+ option.value
26034
+ ))
26035
+ ]
26036
+ }
26037
+ ),
26146
26038
  /* @__PURE__ */ jsxs67(
26147
26039
  DropdownMenu,
26148
26040
  {
26149
- contentClassName: "p-2",
26041
+ contentClassName: "p-1",
26150
26042
  trigger: /* @__PURE__ */ jsxs67(ToolbarButton, { onClick: () => {
26151
- }, title: t("toolbar.textStyle"), className: "px-2 w-auto gap-1", children: [
26043
+ }, title: t("toolbar.textStyle"), className: "px-1.5 w-auto gap-0.5", children: [
26152
26044
  /* @__PURE__ */ jsx81(Type2, { className: "w-4 h-4" }),
26153
- /* @__PURE__ */ jsx81(ChevronDown7, { className: "w-3 h-3" })
26045
+ /* @__PURE__ */ jsx81(ChevronDown7, { className: "h-3 w-3 text-muted-foreground" })
26154
26046
  ] }),
26155
26047
  children: [
26156
26048
  /* @__PURE__ */ jsx81(
@@ -26203,7 +26095,7 @@ var EditorToolbar = ({
26203
26095
  /* @__PURE__ */ jsx81(ArrowUp, { className: "w-3 h-3" }),
26204
26096
  /* @__PURE__ */ jsx81(ArrowDown, { className: "w-3 h-3" })
26205
26097
  ] }),
26206
- contentClassName: "max-h-72 overflow-y-auto p-2",
26098
+ contentClassName: "max-h-72 overflow-y-auto p-1",
26207
26099
  children: [
26208
26100
  /* @__PURE__ */ jsx81(
26209
26101
  DropdownMenuItem,
@@ -26234,7 +26126,7 @@ var EditorToolbar = ({
26234
26126
  /* @__PURE__ */ jsx81(ArrowLeft, { className: "w-3 h-3" }),
26235
26127
  /* @__PURE__ */ jsx81(ArrowRight, { className: "w-3 h-3" })
26236
26128
  ] }),
26237
- contentClassName: "max-h-72 overflow-y-auto p-2",
26129
+ contentClassName: "max-h-72 overflow-y-auto p-1",
26238
26130
  children: [
26239
26131
  /* @__PURE__ */ jsx81(
26240
26132
  DropdownMenuItem,
@@ -26790,7 +26682,7 @@ var EditorToolbar = ({
26790
26682
  // src/components/UEditor/menus.tsx
26791
26683
  import { useCallback as useCallback22, useEffect as useEffect34, useMemo as useMemo23, useRef as useRef32, useState as useState45 } from "react";
26792
26684
  import { useEditorState as useEditorState2 } from "@tiptap/react";
26793
- import { createPortal as createPortal9 } from "react-dom";
26685
+ import { createPortal as createPortal8 } from "react-dom";
26794
26686
  import {
26795
26687
  AlignCenter as AlignCenter2,
26796
26688
  AlignLeft as AlignLeft2,
@@ -27255,7 +27147,7 @@ var CustomBubbleMenu = ({
27255
27147
  };
27256
27148
  }, [editor]);
27257
27149
  if (!isVisible) return null;
27258
- return createPortal9(
27150
+ return createPortal8(
27259
27151
  /* @__PURE__ */ jsx82(
27260
27152
  "div",
27261
27153
  {
@@ -27311,7 +27203,7 @@ var CustomFloatingMenu = ({ editor }) => {
27311
27203
  };
27312
27204
  }, [editor]);
27313
27205
  if (!isVisible) return null;
27314
- return createPortal9(
27206
+ return createPortal8(
27315
27207
  /* @__PURE__ */ jsx82(
27316
27208
  "div",
27317
27209
  {
@@ -31907,15 +31799,12 @@ var FALLBACK_TABLE_COLUMN_WIDTH = 160;
31907
31799
  var MENU_HOVER_PADDING = 18;
31908
31800
  var ROW_HANDLE_HOVER_WIDTH = 28;
31909
31801
  var COLUMN_HANDLE_HOVER_HEIGHT = 28;
31910
- var ROW_HANDLE_GUTTER = 20;
31911
31802
  var TABLE_MENU_TOP_OFFSET = 10;
31912
- var COLUMN_HANDLE_TOP_OFFSET = 8;
31913
31803
  var ADD_COLUMN_RAIL_GAP = 4;
31914
31804
  var ADD_ROW_RAIL_GAP = 4;
31915
31805
  var ADD_COLUMN_HOVER_WIDTH = 24;
31916
31806
  var ADD_ROW_HOVER_HEIGHT = 24;
31917
31807
  var HANDLE_HOVER_RADIUS = 14;
31918
- var IDLE_HANDLE_OPACITY = "0.4";
31919
31808
  var IDLE_HANDLE_SCALE = "0.78";
31920
31809
  var DEFAULT_HOVER_STATE = {
31921
31810
  menuVisible: false,
@@ -32527,8 +32416,8 @@ function TableControls({ editor, containerRef }) {
32527
32416
  }
32528
32417
  const menuTop = Math.max(8, layout.tableTop - TABLE_MENU_TOP_OFFSET);
32529
32418
  const menuLeft = Math.max(8, layout.tableLeft);
32530
- const rowHandleLeft = Math.max(8, layout.tableLeft - ROW_HANDLE_GUTTER);
32531
- const columnHandleTop = Math.max(8, layout.tableTop - COLUMN_HANDLE_TOP_OFFSET);
32419
+ const rowHandleLeft = layout.tableLeft - 12;
32420
+ const columnHandleTop = layout.tableTop - 12;
32532
32421
  const visibleTableWidth = Math.min(layout.tableWidth, layout.viewportWidth);
32533
32422
  const visibleTableHeight = Math.min(layout.tableHeight, layout.viewportHeight);
32534
32423
  const columnRailTop = layout.tableTop;
@@ -32541,7 +32430,9 @@ function TableControls({ editor, containerRef }) {
32541
32430
  return /* @__PURE__ */ jsxs70(Fragment29, { children: [
32542
32431
  layout.rowHandles.map((rowHandle) => {
32543
32432
  const menuKey = getRowMenuKey(rowHandle.index);
32433
+ const isActive = rowHandle.index === layout.activeRowIndex;
32544
32434
  const visible = controlsVisible || hoverState.rowHandleIndex === rowHandle.index || openMenuKey === menuKey;
32435
+ const isShown = visible || isActive;
32545
32436
  return /* @__PURE__ */ jsx83(
32546
32437
  "div",
32547
32438
  {
@@ -32555,7 +32446,7 @@ function TableControls({ editor, containerRef }) {
32555
32446
  Tooltip,
32556
32447
  {
32557
32448
  placement: "right",
32558
- disabled: openMenuKey === menuKey,
32449
+ disabled: openMenuKey === menuKey || !visible && isActive,
32559
32450
  content: /* @__PURE__ */ jsx83("span", { className: "text-xs font-medium", children: `${t("tableMenu.dragRow")} ${rowHandle.index + 1}` }),
32560
32451
  children: /* @__PURE__ */ jsx83("span", { className: "inline-flex", children: /* @__PURE__ */ jsx83(
32561
32452
  DropdownMenu,
@@ -32592,16 +32483,15 @@ function TableControls({ editor, containerRef }) {
32592
32483
  document.body.style.cursor = "grabbing";
32593
32484
  },
32594
32485
  className: cn(
32595
- "inline-flex h-6 w-6 items-center justify-center rounded-full",
32596
- "border border-border/70 bg-background/95 text-muted-foreground shadow-sm backdrop-blur",
32597
- "cursor-grab active:cursor-grabbing",
32598
- "transition-[opacity,transform,colors] duration-150 hover:bg-accent hover:text-foreground"
32486
+ "inline-flex h-6 w-6 items-center justify-center rounded-full transition-[opacity,transform,colors,border,background-color] duration-150",
32487
+ visible ? "border border-border/70 bg-background/95 text-muted-foreground shadow-sm backdrop-blur hover:bg-accent hover:text-foreground cursor-grab active:cursor-grabbing" : "border-transparent bg-transparent cursor-pointer"
32599
32488
  ),
32600
32489
  style: {
32601
- opacity: visible ? 1 : Number(IDLE_HANDLE_OPACITY),
32602
- transform: visible ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`
32490
+ opacity: isShown ? 1 : 0,
32491
+ transform: isShown ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`,
32492
+ pointerEvents: isShown ? "auto" : "none"
32603
32493
  },
32604
- children: /* @__PURE__ */ jsx83(GripVertical3, { className: "h-3.5 w-3.5" })
32494
+ children: visible ? /* @__PURE__ */ jsx83(GripVertical3, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx83("div", { className: "h-3 w-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
32605
32495
  }
32606
32496
  )
32607
32497
  }
@@ -32614,7 +32504,9 @@ function TableControls({ editor, containerRef }) {
32614
32504
  }),
32615
32505
  layout.columnHandles.map((columnHandle) => {
32616
32506
  const menuKey = getColumnMenuKey(columnHandle.index);
32507
+ const isActive = columnHandle.index === layout.activeColumnIndex;
32617
32508
  const visible = controlsVisible || hoverState.columnHandleIndex === columnHandle.index || openMenuKey === menuKey;
32509
+ const isShown = visible || isActive;
32618
32510
  return /* @__PURE__ */ jsx83(
32619
32511
  "div",
32620
32512
  {
@@ -32628,7 +32520,7 @@ function TableControls({ editor, containerRef }) {
32628
32520
  Tooltip,
32629
32521
  {
32630
32522
  placement: "top",
32631
- disabled: openMenuKey === menuKey,
32523
+ disabled: openMenuKey === menuKey || !visible && isActive,
32632
32524
  content: /* @__PURE__ */ jsx83("span", { className: "text-xs font-medium", children: `${t("tableMenu.dragColumn")} ${columnHandle.index + 1}` }),
32633
32525
  children: /* @__PURE__ */ jsx83("span", { className: "inline-flex", children: /* @__PURE__ */ jsx83(
32634
32526
  DropdownMenu,
@@ -32665,16 +32557,15 @@ function TableControls({ editor, containerRef }) {
32665
32557
  document.body.style.cursor = "grabbing";
32666
32558
  },
32667
32559
  className: cn(
32668
- "inline-flex h-6 w-6 items-center justify-center rounded-full",
32669
- "border border-border/70 bg-background/95 text-muted-foreground shadow-sm backdrop-blur",
32670
- "cursor-grab active:cursor-grabbing",
32671
- "transition-[opacity,transform,colors] duration-150 hover:bg-accent hover:text-foreground"
32560
+ "inline-flex h-6 w-6 items-center justify-center rounded-full transition-[opacity,transform,colors,border,background-color] duration-150",
32561
+ visible ? "border border-border/70 bg-background/95 text-muted-foreground shadow-sm backdrop-blur hover:bg-accent hover:text-foreground cursor-grab active:cursor-grabbing" : "border-transparent bg-transparent cursor-pointer"
32672
32562
  ),
32673
32563
  style: {
32674
- opacity: visible ? 1 : Number(IDLE_HANDLE_OPACITY),
32675
- transform: visible ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`
32564
+ opacity: isShown ? 1 : 0,
32565
+ transform: isShown ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`,
32566
+ pointerEvents: isShown ? "auto" : "none"
32676
32567
  },
32677
- children: /* @__PURE__ */ jsx83(GripHorizontal, { className: "h-3.5 w-3.5" })
32568
+ children: visible ? /* @__PURE__ */ jsx83(GripHorizontal, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx83("div", { className: "h-1 w-3 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
32678
32569
  }
32679
32570
  )
32680
32571
  }
@@ -32722,8 +32613,9 @@ function TableControls({ editor, containerRef }) {
32722
32613
  "transition-[opacity,transform,colors] duration-150 hover:bg-accent hover:text-foreground"
32723
32614
  ),
32724
32615
  style: {
32725
- opacity: controlsVisible || hoverState.menuVisible || tableMenuOpen ? 1 : 0.5,
32726
- transform: controlsVisible || hoverState.menuVisible || tableMenuOpen ? "scale(1)" : "scale(0.82)"
32616
+ opacity: controlsVisible || hoverState.menuVisible || tableMenuOpen ? 1 : 0,
32617
+ transform: controlsVisible || hoverState.menuVisible || tableMenuOpen ? "scale(1)" : "scale(0.82)",
32618
+ pointerEvents: controlsVisible || hoverState.menuVisible || tableMenuOpen ? "auto" : "none"
32727
32619
  },
32728
32620
  children: /* @__PURE__ */ jsx83(MoreHorizontal2, { className: "h-4 w-4" })
32729
32621
  }
@@ -32765,8 +32657,9 @@ function TableControls({ editor, containerRef }) {
32765
32657
  left: columnRailLeft,
32766
32658
  width: controlsVisible || hoverState.addColumnVisible ? 18 : 12,
32767
32659
  height: controlsVisible || hoverState.addColumnVisible ? visibleTableHeight : 48,
32768
- opacity: controlsVisible || hoverState.addColumnVisible ? 1 : 0.45,
32769
- transform: controlsVisible || hoverState.addColumnVisible ? "scale(1)" : "scale(0.92)"
32660
+ opacity: controlsVisible || hoverState.addColumnVisible ? 1 : 0,
32661
+ transform: controlsVisible || hoverState.addColumnVisible ? "scale(1)" : "scale(0.92)",
32662
+ pointerEvents: controlsVisible || hoverState.addColumnVisible ? "auto" : "none"
32770
32663
  },
32771
32664
  children: /* @__PURE__ */ jsx83("span", { className: "text-sm font-medium leading-none", children: "+" })
32772
32665
  }
@@ -32804,8 +32697,9 @@ function TableControls({ editor, containerRef }) {
32804
32697
  left: controlsVisible || hoverState.addRowVisible ? rowRailLeft : rowRailLeft + Math.max(0, visibleTableWidth / 2 - 24),
32805
32698
  width: controlsVisible || hoverState.addRowVisible ? visibleTableWidth : 48,
32806
32699
  height: controlsVisible || hoverState.addRowVisible ? 16 : 12,
32807
- opacity: controlsVisible || hoverState.addRowVisible ? 1 : 0.45,
32808
- transform: controlsVisible || hoverState.addRowVisible ? "scale(1)" : "scale(0.92)"
32700
+ opacity: controlsVisible || hoverState.addRowVisible ? 1 : 0,
32701
+ transform: controlsVisible || hoverState.addRowVisible ? "scale(1)" : "scale(0.92)",
32702
+ pointerEvents: controlsVisible || hoverState.addRowVisible ? "auto" : "none"
32809
32703
  },
32810
32704
  children: /* @__PURE__ */ jsx83("span", { className: "text-sm font-medium leading-none", children: "+" })
32811
32705
  }