@underverse-ui/underverse 1.0.139 → 1.0.141

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "1.0.139",
3
+ "version": "1.0.141",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 232,
6
6
  "exports": [
package/dist/index.cjs CHANGED
@@ -1153,13 +1153,13 @@ var vi_default = {
1153
1153
  alignRight: "C\u0103n ph\u1EA3i"
1154
1154
  },
1155
1155
  ValidationInput: {
1156
- required: "Tr\u01B0\u1EDDng n\xE0y l\xE0 b\u1EAFt bu\u1ED9c",
1157
- typeMismatch: "\u0110\u1ECBnh d\u1EA1ng kh\xF4ng h\u1EE3p l\u1EC7",
1156
+ required: "Tr\u01B0\u1EDDng n\xE0y l\xE0 b\u1EAFt bu\u1ED9c.",
1157
+ typeMismatch: "\u0110\u1ECBnh d\u1EA1ng kh\xF4ng h\u1EE3p l\u1EC7.",
1158
1158
  pattern: "Sai m\u1EABu",
1159
1159
  tooShort: "Qu\xE1 ng\u1EAFn",
1160
1160
  tooLong: "Qu\xE1 d\xE0i",
1161
- rangeUnderflow: "Nh\u1ECF h\u01A1n gi\xE1 tr\u1ECB t\u1ED1i thi\u1EC3u",
1162
- rangeOverflow: "L\u1EDBn h\u01A1n gi\xE1 tr\u1ECB t\u1ED1i \u0111a",
1161
+ rangeUnderflow: "Gi\xE1 tr\u1ECB nh\u1ECF h\u01A1n m\u1EE9c t\u1ED1i thi\u1EC3u.",
1162
+ rangeOverflow: "Gi\xE1 tr\u1ECB v\u01B0\u1EE3t qu\xE1 m\u1EE9c t\u1ED1i \u0111a.",
1163
1163
  stepMismatch: "Sai b\u01B0\u1EDBc",
1164
1164
  badInput: "Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7",
1165
1165
  invalid: "Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7"
@@ -1194,7 +1194,7 @@ var vi_default = {
1194
1194
  start: "B\u1EAFt \u0111\u1EA7u",
1195
1195
  end: "K\u1EBFt th\xFAc",
1196
1196
  resourcesHeader: "T\xE0i nguy\xEAn",
1197
- expandGroup: "M\u1EDF nh\xF3m",
1197
+ expandGroup: "M\u1EDF r\u1ED9ng nh\xF3m",
1198
1198
  collapseGroup: "Thu g\u1ECDn nh\xF3m",
1199
1199
  more: "+{n} th\xEAm",
1200
1200
  sprints: "{n} sprint",
@@ -1229,9 +1229,9 @@ var vi_default = {
1229
1229
  uploadedFiles: "T\u1EC7p \u0111\xE3 t\u1EA3i l\xEAn",
1230
1230
  clearAll: "X\xF3a t\u1EA5t c\u1EA3",
1231
1231
  fileTooLarge: "v\u01B0\u1EE3t qu\xE1 gi\u1EDBi h\u1EA1n k\xEDch th\u01B0\u1EDBc",
1232
- maxFilesReached: "\u0110\xE3 \u0111\u1EA1t gi\u1EDBi h\u1EA1n s\u1ED1 t\u1EC7p",
1233
- uploadSuccess: "\u0111\xE3 t\u1EA3i l\xEAn th\xE0nh c\xF4ng",
1234
- uploadFailed: "t\u1EA3i l\xEAn th\u1EA5t b\u1EA1i"
1232
+ maxFilesReached: "\u0110\xE3 \u0111\u1EA1t gi\u1EDBi h\u1EA1n s\u1ED1 t\u1EC7p.",
1233
+ uploadSuccess: "\u0110\xE3 t\u1EA3i l\xEAn th\xE0nh c\xF4ng.",
1234
+ uploadFailed: "T\u1EA3i l\xEAn th\u1EA5t b\u1EA1i."
1235
1235
  },
1236
1236
  UEditor: {
1237
1237
  placeholder: "Nh\u1EADp '/' \u0111\u1EC3 m\u1EDF l\u1EC7nh, ho\u1EB7c b\u1EAFt \u0111\u1EA7u vi\u1EBFt...",
@@ -1432,9 +1432,9 @@ var vi_default = {
1432
1432
  table: "B\u1EA3ng",
1433
1433
  save: "L\u01B0u",
1434
1434
  exportHtml: "Xu\u1EA5t HTML",
1435
- undo: "Hu\u1EF7 thao t\xE1c",
1435
+ undo: "Ho\xE0n t\xE1c",
1436
1436
  undoShortcut: "Ctrl+Z",
1437
- redo: "Ho\xE0n t\xE1c",
1437
+ redo: "L\xE0m l\u1EA1i",
1438
1438
  redoShortcut: "Ctrl+Y",
1439
1439
  cut: "C\u1EAFt",
1440
1440
  cutShortcut: "Ctrl+X",
@@ -1464,7 +1464,7 @@ var vi_default = {
1464
1464
  superscript: "Tr\xEAn d\xF2ng",
1465
1465
  subscript: "D\u01B0\u1EDBi d\xF2ng",
1466
1466
  code: "M\xE3",
1467
- wrap: "Bao",
1467
+ wrap: "Ng\u1EAFt d\xF2ng",
1468
1468
  align: "C\u0103n ch\u1EC9nh",
1469
1469
  clearFormatting: "Xo\xE1 \u0111\u1ECBnh d\u1EA1ng",
1470
1470
  paragraph: "\u0110o\u1EA1n v\u0103n",
@@ -1604,10 +1604,10 @@ var ko_default = {
1604
1604
  supportedFormats: "\uBAA8\uB4E0 \uD30C\uC77C \uD615\uC2DD \uC9C0\uC6D0",
1605
1605
  uploadedFiles: "\uC5C5\uB85C\uB4DC\uB41C \uD30C\uC77C",
1606
1606
  clearAll: "\uBAA8\uB450 \uC9C0\uC6B0\uAE30",
1607
- fileTooLarge: "\uD06C\uAE30 \uC81C\uD55C \uCD08\uACFC",
1608
- maxFilesReached: "\uCD5C\uB300 \uD30C\uC77C \uC218 \uB3C4\uB2EC",
1609
- uploadSuccess: "\uC5C5\uB85C\uB4DC \uC131\uACF5",
1610
- uploadFailed: "\uC5C5\uB85C\uB4DC \uC2E4\uD328"
1607
+ fileTooLarge: "\uD30C\uC77C \uD06C\uAE30\uAC00 \uC81C\uD55C\uC744 \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.",
1608
+ maxFilesReached: "\uCD5C\uB300 \uD30C\uC77C \uC218\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4.",
1609
+ uploadSuccess: "\uC5C5\uB85C\uB4DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
1610
+ uploadFailed: "\uC5C5\uB85C\uB4DC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."
1611
1611
  },
1612
1612
  UEditor: {
1613
1613
  placeholder: "\uBA85\uB839\uC5B4\uB294 '/'\uB97C \uC785\uB825\uD558\uAC70\uB098 \uC785\uB825\uC744 \uC2DC\uC791\uD558\uC138\uC694...",
@@ -1795,7 +1795,7 @@ var ko_default = {
1795
1795
  fileCard: {
1796
1796
  unnamed: "\uC774\uB984 \uC5C6\uB294 \uD30C\uC77C",
1797
1797
  uploading: "(\uC5C5\uB85C\uB4DC \uC911...)",
1798
- uploadFailed: "\uC5C5\uB85C\uB4DC \uC2E4\uD328"
1798
+ uploadFailed: "\uC5C5\uB85C\uB4DC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."
1799
1799
  },
1800
1800
  menubar: {
1801
1801
  file: "\uD30C\uC77C",
@@ -1806,7 +1806,7 @@ var ko_default = {
1806
1806
  tools: "\uB3C4\uAD6C",
1807
1807
  table: "\uD45C",
1808
1808
  save: "\uC800\uC7A5",
1809
- exportHtml: "HTML \uB0B4\uBCF4\uB0B4\uAE30",
1809
+ exportHtml: "HTML \uCD94\uCD9C",
1810
1810
  undo: "\uC2E4\uD589 \uCDE8\uC18C",
1811
1811
  undoShortcut: "Ctrl+Z",
1812
1812
  redo: "\uB2E4\uC2DC \uC2E4\uD589",
@@ -1870,7 +1870,7 @@ var ko_default = {
1870
1870
  applySource: "\uC801\uC6A9",
1871
1871
  closeDialog: "\uB2EB\uAE30",
1872
1872
  copyHtml: "HTML \uBCF5\uC0AC",
1873
- exportDefault: "HTML \uB0B4\uBCF4\uB0B4\uAE30",
1873
+ exportDefault: "HTML \uCD94\uCD9C",
1874
1874
  previewEmpty: "\uBBF8\uB9AC\uBCFC \uB0B4\uC6A9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
1875
1875
  sourceCodeHint: "HTML\uC744 \uC9C1\uC811 \uD3B8\uC9D1\uD558\uACE0 \uC801\uC6A9\uC744 \uD074\uB9AD\uD558\uC5EC \uC5D0\uB514\uD130\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC138\uC694."
1876
1876
  }
@@ -1979,10 +1979,10 @@ var ja_default = {
1979
1979
  supportedFormats: "\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u306B\u5BFE\u5FDC",
1980
1980
  uploadedFiles: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB",
1981
1981
  clearAll: "\u3059\u3079\u3066\u30AF\u30EA\u30A2",
1982
- fileTooLarge: "\u30B5\u30A4\u30BA\u5236\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059",
1983
- maxFilesReached: "\u6700\u5927\u30D5\u30A1\u30A4\u30EB\u6570\u306B\u9054\u3057\u307E\u3057\u305F",
1984
- uploadSuccess: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u6210\u529F",
1985
- uploadFailed: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5931\u6557"
1982
+ fileTooLarge: "\u30B5\u30A4\u30BA\u5236\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",
1983
+ maxFilesReached: "\u6700\u5927\u30D5\u30A1\u30A4\u30EB\u6570\u306B\u9054\u3057\u307E\u3057\u305F\u3002",
1984
+ uploadSuccess: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3057\u305F\u3002",
1985
+ uploadFailed: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"
1986
1986
  },
1987
1987
  UEditor: {
1988
1988
  placeholder: "\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F '/' \u3092\u5165\u529B\u3001\u307E\u305F\u306F\u5165\u529B\u3092\u958B\u59CB...",
@@ -2053,9 +2053,9 @@ var ja_default = {
2053
2053
  imageLayoutBlock: "\u753B\u50CF\u30D6\u30ED\u30C3\u30AF",
2054
2054
  imageLayoutLeft: "\u753B\u50CF\u3092\u5DE6\u3001\u6587\u5B57\u3092\u53F3\u306B\u56DE\u308A\u8FBC\u307F",
2055
2055
  imageLayoutRight: "\u753B\u50CF\u3092\u53F3\u3001\u6587\u5B57\u3092\u5DE6\u306B\u56DE\u308A\u8FBC\u307F",
2056
- imageWidthSm: "\u753B\u50CF \u5C0F",
2057
- imageWidthMd: "\u753B\u50CF \u4E2D",
2058
- imageWidthLg: "\u753B\u50CF \u5927",
2056
+ imageWidthSm: "\u753B\u50CF\uFF08\u5C0F\uFF09",
2057
+ imageWidthMd: "\u753B\u50CF\uFF08\u4E2D\uFF09",
2058
+ imageWidthLg: "\u753B\u50CF\uFF08\u5927\uFF09",
2059
2059
  imageResetSize: "\u753B\u50CF\u30B5\u30A4\u30BA\u3092\u30EA\u30BB\u30C3\u30C8",
2060
2060
  imageDelete: "\u753B\u50CF\u3092\u524A\u9664"
2061
2061
  },
@@ -6621,6 +6621,7 @@ var Popover = ({
6621
6621
  if (!triggerEl || !popoverEl) return;
6622
6622
  if (triggerEl.contains(target)) return;
6623
6623
  if (popoverEl.contains(target)) return;
6624
+ if (target instanceof Element && target.closest("[data-popover]")) return;
6624
6625
  setIsOpen(false);
6625
6626
  };
6626
6627
  const handleEscape = (event) => {
@@ -7661,6 +7662,11 @@ var VerticalTabs = ({ sidebarWidth = "w-48", className, ...props }) => {
7661
7662
  var import_react14 = __toESM(require("react"), 1);
7662
7663
  var import_lucide_react13 = require("lucide-react");
7663
7664
  var import_jsx_runtime29 = require("react/jsx-runtime");
7665
+ var DropdownMenuContext = import_react14.default.createContext(null);
7666
+ function useDropdownMenuClose() {
7667
+ return import_react14.default.useContext(DropdownMenuContext)?.closeMenu ?? (() => {
7668
+ });
7669
+ }
7664
7670
  function useResettingIndex(resetToken) {
7665
7671
  const [state, setState] = import_react14.default.useState({ resetToken, index: -1 });
7666
7672
  const activeIndex = Object.is(state.resetToken, resetToken) ? state.index : -1;
@@ -7694,6 +7700,7 @@ var DropdownMenu = ({
7694
7700
  const menuRef = import_react14.default.useRef(null);
7695
7701
  const itemsRef = import_react14.default.useRef([]);
7696
7702
  const [activeIndex, setActiveIndex] = useResettingIndex(open);
7703
+ const parentMenu = import_react14.default.useContext(DropdownMenuContext);
7697
7704
  useShadCNAnimations();
7698
7705
  import_react14.default.useEffect(() => {
7699
7706
  if (!open) return;
@@ -7732,13 +7739,24 @@ var DropdownMenu = ({
7732
7739
  document.removeEventListener("keydown", handleKeyNav);
7733
7740
  };
7734
7741
  }, [open, activeIndex, setActiveIndex]);
7742
+ const closeMenu = import_react14.default.useCallback(() => {
7743
+ setOpen(false);
7744
+ parentMenu?.closeMenu();
7745
+ }, [parentMenu, setOpen]);
7746
+ const menuContext = import_react14.default.useMemo(
7747
+ () => ({
7748
+ closeMenu,
7749
+ closeOnSelect
7750
+ }),
7751
+ [closeMenu, closeOnSelect]
7752
+ );
7735
7753
  const handleItemClick = (itemOnClick) => {
7736
7754
  itemOnClick();
7737
7755
  if (closeOnSelect) {
7738
- setOpen(false);
7756
+ closeMenu();
7739
7757
  }
7740
7758
  };
7741
- const menuBody = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref: menuRef, "data-dropdown-menu": true, "data-state": open ? "open" : "closed", role: "menu", className: cn("min-w-40", className), children: items ? items.map((item, index) => {
7759
+ const menuBody = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropdownMenuContext.Provider, { value: menuContext, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref: menuRef, "data-dropdown-menu": true, "data-state": open ? "open" : "closed", role: "menu", className: cn("min-w-40", className), children: items ? items.map((item, index) => {
7742
7760
  const IconComponent = item.icon;
7743
7761
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
7744
7762
  "button",
@@ -7768,7 +7786,7 @@ var DropdownMenu = ({
7768
7786
  },
7769
7787
  index
7770
7788
  );
7771
- }) : children });
7789
+ }) : children }) });
7772
7790
  const triggerProps = trigger.props;
7773
7791
  const childRef = triggerProps.ref;
7774
7792
  const enhancedTrigger = import_react14.default.cloneElement(trigger, {
@@ -7825,34 +7843,44 @@ var DropdownMenuItem = ({
7825
7843
  destructive,
7826
7844
  active,
7827
7845
  shortcut,
7828
- className
7829
- }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
7830
- "button",
7831
- {
7832
- onClick,
7833
- disabled,
7834
- onMouseDown: (e) => e.preventDefault(),
7835
- className: cn(
7836
- "flex w-full items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors group cursor-pointer",
7837
- "hover:bg-accent hover:text-accent-foreground",
7838
- "focus:bg-accent focus:text-accent-foreground focus:outline-none",
7839
- "disabled:opacity-50 disabled:cursor-not-allowed",
7840
- destructive && "text-destructive hover:bg-destructive/10 focus:bg-destructive/10",
7841
- active && "bg-primary/10 text-primary",
7842
- className
7843
- ),
7844
- children: [
7845
- Icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { className: cn("w-4 h-4 shrink-0", active ? "text-primary" : "opacity-60 group-hover:opacity-100") }),
7846
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex-1 text-left", children: [
7847
- label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("font-medium", description && "leading-tight"), children: label }),
7848
- description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "text-xs text-muted-foreground", children: description }),
7849
- children
7850
- ] }),
7851
- shortcut && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "ml-2 text-xs text-muted-foreground opacity-60", children: shortcut }),
7852
- active && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { className: "w-4 h-4 text-primary shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("polyline", { points: "20 6 9 17 4 12" }) })
7853
- ]
7854
- }
7855
- );
7846
+ className,
7847
+ closeOnSelect
7848
+ }) => {
7849
+ const menu = import_react14.default.useContext(DropdownMenuContext);
7850
+ const shouldCloseOnSelect = closeOnSelect ?? menu?.closeOnSelect ?? false;
7851
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
7852
+ "button",
7853
+ {
7854
+ onClick: () => {
7855
+ onClick?.();
7856
+ if (shouldCloseOnSelect) {
7857
+ menu?.closeMenu();
7858
+ }
7859
+ },
7860
+ disabled,
7861
+ onMouseDown: (e) => e.preventDefault(),
7862
+ className: cn(
7863
+ "flex w-full items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors group cursor-pointer",
7864
+ "hover:bg-accent hover:text-accent-foreground",
7865
+ "focus:bg-accent focus:text-accent-foreground focus:outline-none",
7866
+ "disabled:opacity-50 disabled:cursor-not-allowed",
7867
+ destructive && "text-destructive hover:bg-destructive/10 focus:bg-destructive/10",
7868
+ active && "bg-primary/10 text-primary",
7869
+ className
7870
+ ),
7871
+ children: [
7872
+ Icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { className: cn("w-4 h-4 shrink-0", active ? "text-primary" : "opacity-60 group-hover:opacity-100") }),
7873
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex-1 text-left", children: [
7874
+ label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("font-medium", description && "leading-tight"), children: label }),
7875
+ description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "text-xs text-muted-foreground", children: description }),
7876
+ children
7877
+ ] }),
7878
+ shortcut && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "ml-2 text-xs text-muted-foreground opacity-60", children: shortcut }),
7879
+ active && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { className: "w-4 h-4 text-primary shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("polyline", { points: "20 6 9 17 4 12" }) })
7880
+ ]
7881
+ }
7882
+ );
7883
+ };
7856
7884
  var DropdownMenuSeparator = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("h-px bg-border my-1", className) });
7857
7885
  var DropdownMenuSub = ({ label, icon: Icon, disabled, children }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7858
7886
  DropdownMenu,
@@ -28211,7 +28239,16 @@ var EditorToolbar = ({
28211
28239
  onCancel: () => setShowLinkInput(false)
28212
28240
  }
28213
28241
  ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
28214
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { icon: import_lucide_react48.Link, label: t("toolbar.link"), onClick: () => setShowLinkInput(true), active: editor.isActive("link") }),
28242
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
28243
+ DropdownMenuItem,
28244
+ {
28245
+ icon: import_lucide_react48.Link,
28246
+ label: t("toolbar.link"),
28247
+ onClick: () => setShowLinkInput(true),
28248
+ active: editor.isActive("link"),
28249
+ closeOnSelect: false
28250
+ }
28251
+ ),
28215
28252
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
28216
28253
  DropdownMenuItem,
28217
28254
  {
@@ -28435,14 +28472,15 @@ var EditorToolbar = ({
28435
28472
  onCancel: () => setShowImageInput(false)
28436
28473
  }
28437
28474
  ) : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
28438
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { icon: import_lucide_react48.Link, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true) }),
28475
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { icon: import_lucide_react48.Link, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true), closeOnSelect: false }),
28439
28476
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
28440
28477
  DropdownMenuItem,
28441
28478
  {
28442
28479
  icon: import_lucide_react48.Upload,
28443
28480
  label: isUploadingImage ? t("imageInput.uploading") : t("imageInput.uploadTab"),
28444
28481
  disabled: isUploadingImage,
28445
- onClick: () => fileInputRef.current?.click()
28482
+ onClick: () => fileInputRef.current?.click(),
28483
+ closeOnSelect: false
28446
28484
  }
28447
28485
  ),
28448
28486
  imageUploadError && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { label: imageUploadError, disabled: true, destructive: true }),
@@ -36062,6 +36100,24 @@ var import_react67 = __toESM(require("react"), 1);
36062
36100
  var import_react68 = require("@tiptap/react");
36063
36101
  var import_lucide_react53 = require("lucide-react");
36064
36102
  var import_jsx_runtime93 = require("react/jsx-runtime");
36103
+ function MenuTableInsertGrid({
36104
+ insertLabel,
36105
+ previewTemplate,
36106
+ onInsert
36107
+ }) {
36108
+ const closeMenu = useDropdownMenuClose();
36109
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36110
+ TableInsertGrid,
36111
+ {
36112
+ insertLabel,
36113
+ previewTemplate,
36114
+ onInsert: (rows, cols) => {
36115
+ onInsert(rows, cols);
36116
+ closeMenu();
36117
+ }
36118
+ }
36119
+ );
36120
+ }
36065
36121
  function renderMenuItems(items) {
36066
36122
  return items.map((item, i) => {
36067
36123
  switch (item.type) {
@@ -36387,7 +36443,7 @@ function buildTableMenuItems(t, editor, onInsertTable) {
36387
36443
  type: "custom",
36388
36444
  key: "table-insert-grid",
36389
36445
  render: () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36390
- TableInsertGrid,
36446
+ MenuTableInsertGrid,
36391
36447
  {
36392
36448
  insertLabel: t("tableMenu.insertTable"),
36393
36449
  previewTemplate: t("tableMenu.gridPreview"),
@@ -36579,13 +36635,14 @@ var MenuBar = ({
36579
36635
  type: "custom",
36580
36636
  key: "image",
36581
36637
  render: () => showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
36582
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DropdownMenuItem, { label: t("menubar.image"), icon: import_lucide_react53.Image, onClick: () => setShowImageInput(true) }),
36638
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DropdownMenuItem, { label: t("menubar.image"), icon: import_lucide_react53.Image, onClick: () => setShowImageInput(true), closeOnSelect: false }),
36583
36639
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36584
36640
  DropdownMenuItem,
36585
36641
  {
36586
36642
  label: t("menubar.imageUpload"),
36587
36643
  icon: import_lucide_react53.Upload,
36588
- onClick: () => fileInputRef.current?.click()
36644
+ onClick: () => fileInputRef.current?.click(),
36645
+ closeOnSelect: false
36589
36646
  }
36590
36647
  )
36591
36648
  ] })
@@ -36600,7 +36657,8 @@ var MenuBar = ({
36600
36657
  label: t("menubar.link"),
36601
36658
  icon: import_lucide_react53.Link,
36602
36659
  shortcut: t("menubar.linkShortcut"),
36603
- onClick: () => setShowLinkInput(true)
36660
+ onClick: () => setShowLinkInput(true),
36661
+ closeOnSelect: false
36604
36662
  }
36605
36663
  )
36606
36664
  },
@@ -36614,7 +36672,7 @@ var MenuBar = ({
36614
36672
  type: "custom",
36615
36673
  key: "table-grid",
36616
36674
  render: () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
36617
- TableInsertGrid,
36675
+ MenuTableInsertGrid,
36618
36676
  {
36619
36677
  insertLabel: t("tableMenu.insertTable"),
36620
36678
  previewTemplate: t("tableMenu.gridPreview"),
@@ -36914,7 +36972,7 @@ var UEditor = import_react69.default.forwardRef(({
36914
36972
  return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
36915
36973
  "div",
36916
36974
  {
36917
- className: cn("w-full rounded-lg border bg-background flex items-center justify-center text-muted-foreground", className),
36975
+ className: cn("w-full border bg-background flex items-center justify-center text-muted-foreground", className),
36918
36976
  style: { minHeight },
36919
36977
  children: t("loading")
36920
36978
  }
@@ -36926,7 +36984,7 @@ var UEditor = import_react69.default.forwardRef(({
36926
36984
  className: cn(
36927
36985
  "group relative flex flex-col text-card-foreground",
36928
36986
  editable ? [
36929
- "rounded-2xl md:rounded-3xl border border-border/50 bg-card overflow-hidden",
36987
+ "border border-border/50 bg-card overflow-hidden",
36930
36988
  "transition-[transform,box-shadow,border-color,background-color] duration-300 ease-soft",
36931
36989
  "shadow-sm focus-within:shadow-md focus-within:border-primary/15",
36932
36990
  "backdrop-blur-sm",