@underverse-ui/underverse 2.0.12 → 2.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/api-reference.json +1 -1
  2. package/dist/{EmojiPicker-FFNIUMI3.js → EmojiPicker-CGMUDB4I.js} +4 -4
  3. package/dist/{chunk-EVS5YWTO.js → chunk-3Q5EE2ZA.js} +172 -79
  4. package/dist/chunk-3Q5EE2ZA.js.map +1 -0
  5. package/dist/{chunk-Q6BQUWKB.js → chunk-DCFQGH3K.js} +3 -3
  6. package/dist/{chunk-VNSCI3OK.js → chunk-DXLSCUYA.js} +2 -2
  7. package/dist/{chunk-HEYNAGQD.js → chunk-N2S6RI4Y.js} +3 -3
  8. package/dist/{chunk-P2RLTURA.js → chunk-PDYEK7HL.js} +202 -56
  9. package/dist/chunk-PDYEK7HL.js.map +1 -0
  10. package/dist/{chunk-PYC5EY5W.js → chunk-PV2G2XME.js} +13 -5
  11. package/dist/chunk-PV2G2XME.js.map +1 -0
  12. package/dist/index.cjs +369 -127
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +16 -0
  15. package/dist/index.d.ts +16 -0
  16. package/dist/index.js +6 -6
  17. package/dist/{menu-bar-JSXW6AXW.js → menu-bar-55SAOAX6.js} +4 -4
  18. package/dist/ueditor.cjs +369 -127
  19. package/dist/ueditor.cjs.map +1 -1
  20. package/dist/ueditor.d.cts +3 -0
  21. package/dist/ueditor.d.ts +3 -0
  22. package/dist/ueditor.js +4 -4
  23. package/package.json +1 -1
  24. package/dist/chunk-EVS5YWTO.js.map +0 -1
  25. package/dist/chunk-P2RLTURA.js.map +0 -1
  26. package/dist/chunk-PYC5EY5W.js.map +0 -1
  27. /package/dist/{EmojiPicker-FFNIUMI3.js.map → EmojiPicker-CGMUDB4I.js.map} +0 -0
  28. /package/dist/{chunk-Q6BQUWKB.js.map → chunk-DCFQGH3K.js.map} +0 -0
  29. /package/dist/{chunk-VNSCI3OK.js.map → chunk-DXLSCUYA.js.map} +0 -0
  30. /package/dist/{chunk-HEYNAGQD.js.map → chunk-N2S6RI4Y.js.map} +0 -0
  31. /package/dist/{menu-bar-JSXW6AXW.js.map → menu-bar-55SAOAX6.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 257,
6
6
  "exports": [
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  EmojiPicker,
4
4
  EmojiPicker_default
5
- } from "./chunk-HEYNAGQD.js";
6
- import "./chunk-VNSCI3OK.js";
5
+ } from "./chunk-N2S6RI4Y.js";
6
+ import "./chunk-DXLSCUYA.js";
7
7
  import "./chunk-4TYW5K4J.js";
8
- import "./chunk-PYC5EY5W.js";
8
+ import "./chunk-PV2G2XME.js";
9
9
  import "./chunk-NSBPE2FW.js";
10
10
  export {
11
11
  EmojiPicker,
12
12
  EmojiPicker_default as default
13
13
  };
14
- //# sourceMappingURL=EmojiPicker-FFNIUMI3.js.map
14
+ //# sourceMappingURL=EmojiPicker-CGMUDB4I.js.map
@@ -9,7 +9,7 @@ import {
9
9
  mergeRefs,
10
10
  setRefValue,
11
11
  useSmartTranslations
12
- } from "./chunk-PYC5EY5W.js";
12
+ } from "./chunk-PV2G2XME.js";
13
13
 
14
14
  // src/contexts/UnderverseConfigContext.tsx
15
15
  import * as React from "react";
@@ -2033,6 +2033,8 @@ import {
2033
2033
  List as ListIcon,
2034
2034
  ListOrdered as ListOrderedIcon,
2035
2035
  ListTodo,
2036
+ PanelTopClose,
2037
+ PanelTopOpen,
2036
2038
  Quote as QuoteIcon,
2037
2039
  RotateCcw,
2038
2040
  SquareCheckBig,
@@ -2371,6 +2373,18 @@ var EditorColorPalette = ({
2371
2373
  const automaticColor = colors[0]?.color ?? "";
2372
2374
  const paletteColors = colors.slice(1);
2373
2375
  const customColorSelect = onCustomColorSelect ?? onSelect;
2376
+ const [hexInput, setHexInput] = React6.useState(currentColor.startsWith("#") ? currentColor : "");
2377
+ React6.useEffect(() => {
2378
+ setHexInput(currentColor.startsWith("#") ? currentColor : "");
2379
+ }, [currentColor]);
2380
+ const commitHex = (val) => {
2381
+ let formatted = val.trim();
2382
+ if (!formatted) return;
2383
+ if (!formatted.startsWith("#")) formatted = `#${formatted}`;
2384
+ if (/^#([0-9A-F]{3}){1,2}$/i.test(formatted)) {
2385
+ customColorSelect(formatted);
2386
+ }
2387
+ };
2374
2388
  React6.useEffect(() => {
2375
2389
  const input = colorInputRef.current;
2376
2390
  if (!input) return;
@@ -2382,7 +2396,7 @@ var EditorColorPalette = ({
2382
2396
  const input = colorInputRef.current;
2383
2397
  if (input) input.value = currentColor.startsWith("#") ? currentColor : "#000000";
2384
2398
  }, [currentColor]);
2385
- return /* @__PURE__ */ jsxs4("div", { className: "w-56 p-2", children: [
2399
+ return /* @__PURE__ */ jsxs4("div", { className: "w-56 p-2", "data-ueditor-keep-open": true, children: [
2386
2400
  /* @__PURE__ */ jsx6("span", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
2387
2401
  /* @__PURE__ */ jsxs4(
2388
2402
  "button",
@@ -2416,29 +2430,48 @@ var EditorColorPalette = ({
2416
2430
  children: currentColor === c.color && /* @__PURE__ */ jsx6("span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx6(Check2, { className: cn("h-3.5 w-3.5", getSwatchCheckClass(c.color)) }) })
2417
2431
  }
2418
2432
  ) }, `${c.name}-${c.color}`)) }),
2419
- /* @__PURE__ */ jsxs4(
2420
- "button",
2421
- {
2422
- type: "button",
2423
- onMouseDown: (e) => e.preventDefault(),
2424
- onClick: () => colorInputRef.current?.click(),
2425
- className: "mt-3 flex h-9 w-full items-center gap-3 rounded-md px-2 text-sm text-foreground transition-colors hover:bg-muted",
2426
- children: [
2427
- /* @__PURE__ */ jsx6(
2428
- "span",
2429
- {
2430
- "aria-hidden": "true",
2431
- className: "h-5 w-5 rounded border border-border",
2432
- style: {
2433
- background: "linear-gradient(135deg, #ff004c 0%, #fffb00 22%, #00ff66 42%, #00d5ff 62%, #2446ff 78%, #ff00d4 100%)"
2433
+ /* @__PURE__ */ jsxs4("div", { className: "mt-3 flex items-center gap-2", children: [
2434
+ /* @__PURE__ */ jsxs4("div", { className: "flex h-8 flex-1 items-center gap-1.5 rounded-md border border-input bg-muted/30 px-2", children: [
2435
+ /* @__PURE__ */ jsx6(
2436
+ "span",
2437
+ {
2438
+ className: "h-4 w-4 shrink-0 rounded-[2px] border border-border",
2439
+ style: { backgroundColor: hexInput.startsWith("#") ? hexInput : currentColor.startsWith("#") ? currentColor : "transparent" }
2440
+ }
2441
+ ),
2442
+ /* @__PURE__ */ jsx6(
2443
+ "input",
2444
+ {
2445
+ type: "text",
2446
+ value: hexInput,
2447
+ onChange: (e) => setHexInput(e.target.value),
2448
+ onBlur: () => commitHex(hexInput),
2449
+ onMouseDown: (e) => e.stopPropagation(),
2450
+ onClick: (e) => e.stopPropagation(),
2451
+ onKeyDown: (e) => {
2452
+ e.stopPropagation();
2453
+ if (e.key === "Enter") {
2454
+ e.preventDefault();
2455
+ commitHex(hexInput);
2434
2456
  }
2435
- }
2436
- ),
2437
- /* @__PURE__ */ jsx6("span", { className: "flex-1 text-center", children: t("colors.moreColors") }),
2438
- /* @__PURE__ */ jsx6(Palette, { className: "h-4 w-4 text-muted-foreground" })
2439
- ]
2440
- }
2441
- ),
2457
+ },
2458
+ placeholder: "#HEX",
2459
+ className: "h-full w-full bg-transparent text-xs font-mono text-foreground outline-none placeholder:text-muted-foreground"
2460
+ }
2461
+ )
2462
+ ] }),
2463
+ /* @__PURE__ */ jsx6(
2464
+ "button",
2465
+ {
2466
+ type: "button",
2467
+ onMouseDown: (e) => e.stopPropagation(),
2468
+ onClick: () => colorInputRef.current?.click(),
2469
+ title: t("colors.moreColors"),
2470
+ className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-input bg-muted/30 text-foreground transition-colors hover:bg-muted",
2471
+ children: /* @__PURE__ */ jsx6(Palette, { className: "h-4 w-4 text-muted-foreground" })
2472
+ }
2473
+ )
2474
+ ] }),
2442
2475
  /* @__PURE__ */ jsx6(
2443
2476
  "input",
2444
2477
  {
@@ -2584,8 +2617,9 @@ var DEFAULT_TABLE_ROW_HEIGHT = 25;
2584
2617
  var MIN_TABLE_ROW_HEIGHT = DEFAULT_TABLE_ROW_HEIGHT;
2585
2618
  var COLUMN_RESIZE_LINE_THICKNESS = 2;
2586
2619
  var ROW_RESIZE_LINE_THICKNESS = 2;
2587
- var UEDITOR_TABLE_LAYOUT_CHANGE_EVENT = "ueditor-table-layout-change";
2588
- var TABLE_RESIZE_HIT_ZONE = 10;
2620
+ var UEDITOR_TABLE_LAYOUT_CHANGE_EVENT = "ueditor:table-layout-change";
2621
+ var isRowResizingGlobal = { active: false };
2622
+ var TABLE_RESIZE_HIT_ZONE = 5;
2589
2623
  function findTableRowNodeInfo(view, rowElement) {
2590
2624
  const firstCell = rowElement.querySelector("th,td");
2591
2625
  if (!firstCell) return null;
@@ -2639,17 +2673,60 @@ function getSelectionTableCell(view) {
2639
2673
  const cell = element?.closest?.("th,td");
2640
2674
  return cell instanceof HTMLElement ? cell : null;
2641
2675
  }
2642
- function isRowResizeHotspot(cell, clientX, clientY) {
2676
+ function resolveRowResizeTarget(cell, clientX, clientY) {
2643
2677
  const rect = cell.getBoundingClientRect();
2644
- const nearBottom = rect.bottom - clientY <= TABLE_RESIZE_HIT_ZONE;
2645
- const nearRight = rect.right - clientX <= TABLE_RESIZE_HIT_ZONE;
2646
- return nearBottom && !nearRight;
2678
+ const row = cell.closest("tr");
2679
+ if (!(row instanceof HTMLTableRowElement) || !(cell instanceof HTMLTableCellElement)) {
2680
+ return null;
2681
+ }
2682
+ const distToBottom = Math.abs(clientY - rect.bottom);
2683
+ const distToTop = Math.abs(clientY - rect.top);
2684
+ const distToRight = Math.abs(clientX - rect.right);
2685
+ const distToLeft = Math.abs(clientX - rect.left);
2686
+ if (distToRight <= 3 || distToLeft <= 3) {
2687
+ return null;
2688
+ }
2689
+ if (distToBottom <= TABLE_RESIZE_HIT_ZONE) {
2690
+ return { row, cell };
2691
+ }
2692
+ if (distToTop <= TABLE_RESIZE_HIT_ZONE) {
2693
+ const prevRow = row.previousElementSibling;
2694
+ if (prevRow instanceof HTMLTableRowElement) {
2695
+ const cellIndex = cell.cellIndex;
2696
+ const prevCell = prevRow.children[cellIndex] ?? prevRow.firstElementChild;
2697
+ if (prevCell instanceof HTMLTableCellElement) {
2698
+ return { row: prevRow, cell: prevCell };
2699
+ }
2700
+ }
2701
+ }
2702
+ return null;
2647
2703
  }
2648
- function isColumnResizeHotspot(cell, clientX, clientY) {
2704
+ function resolveColumnResizeTarget(cell, clientX, clientY) {
2649
2705
  const rect = cell.getBoundingClientRect();
2650
- const nearRight = rect.right - clientX <= TABLE_RESIZE_HIT_ZONE;
2651
- const nearBottom = rect.bottom - clientY <= TABLE_RESIZE_HIT_ZONE;
2652
- return nearRight && !nearBottom;
2706
+ const row = cell.closest("tr");
2707
+ if (!(row instanceof HTMLTableRowElement) || !(cell instanceof HTMLTableCellElement)) {
2708
+ return null;
2709
+ }
2710
+ const distToRight = Math.abs(clientX - rect.right);
2711
+ const distToLeft = Math.abs(clientX - rect.left);
2712
+ const distToBottom = Math.abs(clientY - rect.bottom);
2713
+ const distToTop = Math.abs(clientY - rect.top);
2714
+ if (distToBottom <= 3 || distToTop <= 3) {
2715
+ return null;
2716
+ }
2717
+ if (distToRight <= TABLE_RESIZE_HIT_ZONE) {
2718
+ return { row, cell };
2719
+ }
2720
+ if (distToLeft <= TABLE_RESIZE_HIT_ZONE) {
2721
+ const prevCell = cell.previousElementSibling;
2722
+ if (prevCell instanceof HTMLTableCellElement) {
2723
+ return { row, cell: prevCell };
2724
+ }
2725
+ }
2726
+ return null;
2727
+ }
2728
+ function isRowResizeHotspot(cell, clientX, clientY) {
2729
+ return resolveRowResizeTarget(cell, clientX, clientY) !== null;
2653
2730
  }
2654
2731
  function getRelativeBoundaryMetrics(surface, table, row, cell) {
2655
2732
  const surfaceRect = surface.getBoundingClientRect();
@@ -3280,7 +3357,7 @@ var ToolbarButton = React7.forwardRef(({ onClick, onMouseDown, active, disabled,
3280
3357
  return button;
3281
3358
  });
3282
3359
  ToolbarButton.displayName = "ToolbarButton";
3283
- var ToolbarDivider = () => /* @__PURE__ */ jsx7("div", { "aria-hidden": "true", className: "mx-1.5 h-7 w-px shrink-0 bg-[rgba(123,129,132,0.24)]" });
3360
+ var ToolbarDivider = () => /* @__PURE__ */ jsx7("div", { "aria-hidden": "true", className: "mx-1 h-5 w-px shrink-0 bg-[rgba(123,129,132,0.24)]" });
3284
3361
  var TableInsertGrid = ({
3285
3362
  insertLabel,
3286
3363
  previewTemplate,
@@ -3329,11 +3406,14 @@ function applyTableCellAttribute(editor, name, value) {
3329
3406
  var EditorToolbar = ({
3330
3407
  editor,
3331
3408
  variant,
3409
+ isMenuBarVisible,
3410
+ onToggleMenuBar,
3332
3411
  uploadImage,
3333
3412
  imageInsertMode = "base64",
3334
3413
  maxImageFileSize = DEFAULT_UEDITOR_IMAGE_MAX_FILE_SIZE,
3335
3414
  allowedImageMimeTypes = DEFAULT_UEDITOR_IMAGE_MIME_TYPES,
3336
3415
  fontFamilies,
3416
+ defaultFontFamily = "Inter",
3337
3417
  fontSizes,
3338
3418
  lineHeights,
3339
3419
  letterSpacings
@@ -3376,9 +3456,9 @@ var EditorToolbar = ({
3376
3456
  const currentFontSizeLabel = availableFontSizes.find((option) => normalizeStyleValue(option.value) === currentFontSize)?.label ?? "13";
3377
3457
  const currentLineHeightLabel = availableLineHeights.find((option) => normalizeStyleValue(option.value) === currentLineHeight)?.label ?? t("toolbar.lineHeightDefault");
3378
3458
  const currentLetterSpacingLabel = availableLetterSpacings.find((option) => normalizeStyleValue(option.value) === currentLetterSpacing)?.label ?? t("toolbar.letterSpacingDefault");
3379
- const defaultFontFamily = availableFontFamilies[0];
3380
- const defaultFontFamilyValue = defaultFontFamily?.value ?? "";
3381
- const displayedFontFamilyLabel = currentFontFamily ? currentFontFamilyLabel : defaultFontFamily?.label ?? t("toolbar.fontDefault");
3459
+ const defaultFontFamilyOption = availableFontFamilies.find((opt) => normalizeStyleValue(opt.value) === normalizeStyleValue(defaultFontFamily)) ?? availableFontFamilies[0];
3460
+ const defaultFontFamilyValue = defaultFontFamilyOption?.value ?? defaultFontFamily ?? "Inter";
3461
+ const displayedFontFamilyLabel = currentFontFamily ? currentFontFamilyLabel : defaultFontFamilyOption?.label ?? defaultFontFamily ?? t("toolbar.fontDefault");
3382
3462
  const displayedFontFamilyValue = currentFontFamily || defaultFontFamilyValue;
3383
3463
  const displayedFontSizeLabel = currentFontSize ? currentFontSizeLabel : "13";
3384
3464
  const activeFontSize = currentFontSize || "13px";
@@ -3502,6 +3582,15 @@ var EditorToolbar = ({
3502
3582
  )
3503
3583
  ] })
3504
3584
  }
3585
+ ),
3586
+ onToggleMenuBar && /* @__PURE__ */ jsx7(
3587
+ ToolbarButton,
3588
+ {
3589
+ onClick: onToggleMenuBar,
3590
+ active: isMenuBarVisible,
3591
+ title: t(isMenuBarVisible ? "toolbar.hideMenuBar" : "toolbar.showMenuBar"),
3592
+ children: isMenuBarVisible ? /* @__PURE__ */ jsx7(PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx7(PanelTopOpen, { className: "h-4 w-4" })
3593
+ }
3505
3594
  )
3506
3595
  ] });
3507
3596
  }
@@ -3510,7 +3599,7 @@ var EditorToolbar = ({
3510
3599
  "div",
3511
3600
  {
3512
3601
  role: "toolbar",
3513
- className: "flex min-h-12 flex-nowrap items-center gap-0.5 overflow-x-auto border-b border-[rgba(196,197,213,0.6)] bg-[#F4F4F4] px-2 py-2 dark:bg-muted/60",
3602
+ className: "flex min-h-9 flex-wrap items-center gap-0.5 border-b border-[rgba(196,197,213,0.6)] bg-[#F4F4F4] px-1.5 py-1 dark:bg-muted/60",
3514
3603
  children: [
3515
3604
  isFull && /* @__PURE__ */ jsx7(
3516
3605
  DropdownMenu,
@@ -3521,9 +3610,9 @@ var EditorToolbar = ({
3521
3610
  onClick: () => {
3522
3611
  },
3523
3612
  title: t("toolbar.fontFamily"),
3524
- className: "h-8 w-44 max-w-44 justify-between gap-2 border border-[rgba(196,197,213,0.6)] bg-white px-2.5 text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] hover:bg-white hover:text-[#404040] dark:bg-background dark:text-foreground",
3613
+ className: "h-7 w-40 max-w-40 justify-between gap-1.5 border border-[rgba(196,197,213,0.6)] bg-white px-2 text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] hover:bg-white hover:text-[#404040] dark:bg-background dark:text-foreground",
3525
3614
  children: [
3526
- /* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 truncate text-left text-sm font-normal", style: { fontFamily: displayedFontFamilyValue || void 0 }, children: displayedFontFamilyLabel }),
3615
+ /* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 truncate text-left text-xs font-normal", style: { fontFamily: displayedFontFamilyValue || void 0 }, children: displayedFontFamilyLabel }),
3527
3616
  /* @__PURE__ */ jsx7(FigmaChevronDownIcon, { className: "h-3 w-3 shrink-0 text-[#7B8184]" })
3528
3617
  ]
3529
3618
  }
@@ -3550,9 +3639,9 @@ var EditorToolbar = ({
3550
3639
  onClick: () => {
3551
3640
  },
3552
3641
  title: t("toolbar.fontSize"),
3553
- className: "h-8 w-16 justify-between gap-2 border border-[rgba(196,197,213,0.6)] bg-white px-2.5 text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] hover:bg-white hover:text-[#404040] dark:bg-background dark:text-foreground",
3642
+ className: "h-7 w-14 justify-between gap-1 border border-[rgba(196,197,213,0.6)] bg-white px-2 text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] hover:bg-white hover:text-[#404040] dark:bg-background dark:text-foreground",
3554
3643
  children: [
3555
- /* @__PURE__ */ jsx7("span", { className: "text-sm font-normal leading-none", children: displayedFontSizeLabel }),
3644
+ /* @__PURE__ */ jsx7("span", { className: "text-xs font-normal leading-none", children: displayedFontSizeLabel }),
3556
3645
  /* @__PURE__ */ jsx7(FigmaChevronDownIcon, { className: "h-3 w-3 shrink-0 text-[#7B8184]" })
3557
3646
  ]
3558
3647
  }
@@ -3677,6 +3766,27 @@ var EditorToolbar = ({
3677
3766
  )
3678
3767
  ] }),
3679
3768
  /* @__PURE__ */ jsx7(ToolbarDivider, {}),
3769
+ (isMediumFull || isFull) && /* @__PURE__ */ jsx7(
3770
+ DropdownMenu,
3771
+ {
3772
+ isOpen: isTableMenuOpen,
3773
+ onOpenChange: setIsTableMenuOpen,
3774
+ trigger: /* @__PURE__ */ jsx7(ToolbarButton, { onClick: () => {
3775
+ }, title: t("toolbar.table"), children: /* @__PURE__ */ jsx7(FigmaTableIcon, { className: "h-4 w-4" }) }),
3776
+ contentClassName: "p-2 min-w-56",
3777
+ children: /* @__PURE__ */ jsx7(
3778
+ TableInsertGrid,
3779
+ {
3780
+ insertLabel: t("tableMenu.insertTable"),
3781
+ previewTemplate: t("tableMenu.gridPreview"),
3782
+ onInsert: (rows, cols) => {
3783
+ editor.chain().focus().insertTable({ rows, cols, withHeaderRow: true }).run();
3784
+ setIsTableMenuOpen(false);
3785
+ }
3786
+ }
3787
+ )
3788
+ }
3789
+ ),
3680
3790
  /* @__PURE__ */ jsx7(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ jsx7(FigmaBoldIcon, { className: "h-4 w-4" }) }),
3681
3791
  /* @__PURE__ */ jsx7(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ jsx7(FigmaItalicIcon, { className: "h-4 w-4" }) }),
3682
3792
  /* @__PURE__ */ jsx7(
@@ -4147,27 +4257,6 @@ var EditorToolbar = ({
4147
4257
  ] })
4148
4258
  }
4149
4259
  ),
4150
- (isMediumFull || isFull) && /* @__PURE__ */ jsx7(
4151
- DropdownMenu,
4152
- {
4153
- isOpen: isTableMenuOpen,
4154
- onOpenChange: setIsTableMenuOpen,
4155
- trigger: /* @__PURE__ */ jsx7(ToolbarButton, { onClick: () => {
4156
- }, title: t("toolbar.table"), children: /* @__PURE__ */ jsx7(FigmaTableIcon, { className: "h-4 w-4" }) }),
4157
- contentClassName: "p-2 min-w-56",
4158
- children: /* @__PURE__ */ jsx7(
4159
- TableInsertGrid,
4160
- {
4161
- insertLabel: t("tableMenu.insertTable"),
4162
- previewTemplate: t("tableMenu.gridPreview"),
4163
- onInsert: (rows, cols) => {
4164
- editor.chain().focus().insertTable({ rows, cols, withHeaderRow: true }).run();
4165
- setIsTableMenuOpen(false);
4166
- }
4167
- }
4168
- )
4169
- }
4170
- ),
4171
4260
  /* @__PURE__ */ jsx7(ToolbarDivider, {}),
4172
4261
  /* @__PURE__ */ jsx7(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ jsx7(FigmaUndoIcon, { className: "h-4 w-4" }) }),
4173
4262
  /* @__PURE__ */ jsx7(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ jsx7(FigmaRedoIcon, { className: "h-4 w-4" }) }),
@@ -4225,7 +4314,16 @@ var EditorToolbar = ({
4225
4314
  children: /* @__PURE__ */ jsx7(TableCellsMerge, { className: "w-4 h-4" })
4226
4315
  }
4227
4316
  )
4228
- ] })
4317
+ ] }),
4318
+ onToggleMenuBar && /* @__PURE__ */ jsx7(
4319
+ ToolbarButton,
4320
+ {
4321
+ onClick: onToggleMenuBar,
4322
+ active: isMenuBarVisible,
4323
+ title: t(isMenuBarVisible ? "toolbar.hideMenuBar" : "toolbar.showMenuBar"),
4324
+ children: isMenuBarVisible ? /* @__PURE__ */ jsx7(PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx7(PanelTopOpen, { className: "h-4 w-4" })
4325
+ }
4326
+ )
4229
4327
  ]
4230
4328
  }
4231
4329
  );
@@ -4359,7 +4457,7 @@ var UEDITOR_PROSEMIRROR_CLASS_NAME = cn(
4359
4457
  "[&_.selectedCell]:after:absolute",
4360
4458
  "[&_.selectedCell]:after:inset-0",
4361
4459
  "[&_.selectedCell]:after:z-[2]",
4362
- "[&_.selectedCell]:after:bg-primary/15",
4460
+ "[&_.selectedCell]:after:bg-primary/8",
4363
4461
  "[&_.selectedCell]:after:pointer-events-none",
4364
4462
  "[&_.column-resize-handle]:pointer-events-auto",
4365
4463
  "[&_.column-resize-handle]:cursor-col-resize",
@@ -4373,17 +4471,10 @@ var UEDITOR_PROSEMIRROR_CLASS_NAME = cn(
4373
4471
  "[&_.column-resize-handle]:rounded-none",
4374
4472
  "[&_.column-resize-handle]:opacity-0",
4375
4473
  "[&_.column-resize-handle]:transition-opacity",
4376
- "[&_.column-resize-handle]:after:absolute",
4377
- "[&_.column-resize-handle]:after:top-0",
4378
- "[&_.column-resize-handle]:after:bottom-0",
4379
- "[&_.column-resize-handle]:after:left-1/2",
4380
- "[&_.column-resize-handle]:after:w-0.5",
4381
- "[&_.column-resize-handle]:after:-translate-x-1/2",
4382
- "[&_.column-resize-handle]:after:rounded-full",
4383
- "[&_.column-resize-handle]:after:bg-primary/75",
4384
- "[&_.column-resize-handle]:after:content-['']",
4385
- "[&.resize-cursor_.column-resize-handle]:opacity-100",
4386
- "[&.resize-cursor_.column-resize-handle]:after:bg-primary",
4474
+ "[&_.column-resize-handle]:duration-200",
4475
+ "[&_.column-resize-handle]:delay-100",
4476
+ "[&_.column-resize-handle]:ease-out",
4477
+ "[&_.column-resize-handle]:after:hidden",
4387
4478
  "[&_.column-resize-dragging]:min-w-0",
4388
4479
  "[&.resize-cursor]:cursor-col-resize",
4389
4480
  "[&.resize-row-cursor]:cursor-row-resize",
@@ -4471,12 +4562,14 @@ export {
4471
4562
  COLUMN_RESIZE_LINE_THICKNESS,
4472
4563
  ROW_RESIZE_LINE_THICKNESS,
4473
4564
  UEDITOR_TABLE_LAYOUT_CHANGE_EVENT,
4565
+ isRowResizingGlobal,
4474
4566
  findTableRowNodeInfo,
4475
4567
  resolveEventElement,
4476
4568
  isPointOverRenderedText,
4477
4569
  getSelectionTableCell,
4570
+ resolveRowResizeTarget,
4571
+ resolveColumnResizeTarget,
4478
4572
  isRowResizeHotspot,
4479
- isColumnResizeHotspot,
4480
4573
  getRelativeBoundaryMetrics,
4481
4574
  getRelativeCellMetrics,
4482
4575
  getRelativeSelectedCellsMetrics,
@@ -4515,4 +4608,4 @@ export {
4515
4608
  EditorToolbar,
4516
4609
  UEDITOR_PROSEMIRROR_CLASS_NAME
4517
4610
  };
4518
- //# sourceMappingURL=chunk-EVS5YWTO.js.map
4611
+ //# sourceMappingURL=chunk-3Q5EE2ZA.js.map