@underverse-ui/underverse 2.0.36 → 2.0.37

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
@@ -10068,6 +10068,30 @@ var init_link_commands = __esm({
10068
10068
  }
10069
10069
  });
10070
10070
 
10071
+ // src/components/UEditor/table-vertical-align-icons.tsx
10072
+ function TableVerticalAlignIcon({ align, ...props }) {
10073
+ const [shortLine, longLine] = linePositions[align];
10074
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.35", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [
10075
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("rect", { x: "2", y: "1.5", width: "12", height: "13", rx: "1", opacity: "0.55" }),
10076
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { d: `M5 ${shortLine}h6M4 ${longLine}h8` })
10077
+ ] });
10078
+ }
10079
+ var import_jsx_runtime95, linePositions, TableVerticalAlignTopIcon, TableVerticalAlignMiddleIcon, TableVerticalAlignBottomIcon;
10080
+ var init_table_vertical_align_icons = __esm({
10081
+ "src/components/UEditor/table-vertical-align-icons.tsx"() {
10082
+ "use strict";
10083
+ import_jsx_runtime95 = require("react/jsx-runtime");
10084
+ linePositions = {
10085
+ top: [4.5, 7],
10086
+ middle: [7, 9.5],
10087
+ bottom: [10, 12.5]
10088
+ };
10089
+ TableVerticalAlignTopIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TableVerticalAlignIcon, { align: "top", ...props });
10090
+ TableVerticalAlignMiddleIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TableVerticalAlignIcon, { align: "middle", ...props });
10091
+ TableVerticalAlignBottomIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TableVerticalAlignIcon, { align: "bottom", ...props });
10092
+ }
10093
+ });
10094
+
10071
10095
  // src/components/UEditor/typography-options.ts
10072
10096
  function normalizeStyleValue(value) {
10073
10097
  return typeof value === "string" ? value.trim().replace(/^['"]|['"]$/g, "") : "";
@@ -10244,7 +10268,7 @@ function EditorUiRenderStateProvider({
10244
10268
  editor,
10245
10269
  selector: ({ editor: currentEditor }) => getEditorUiRenderState(currentEditor)
10246
10270
  });
10247
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(EditorUiRenderStateContext.Provider, { value: { editor, value }, children });
10271
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(EditorUiRenderStateContext.Provider, { value: { editor, value }, children });
10248
10272
  }
10249
10273
  function useSharedEditorUiRenderState(editor) {
10250
10274
  const context = import_react77.default.useContext(EditorUiRenderStateContext);
@@ -10265,7 +10289,7 @@ function applyTableCellAttribute(editor, name, value) {
10265
10289
  }
10266
10290
  editor.chain().focus().setCellAttribute(name, value).run();
10267
10291
  }
10268
- var import_react77, import_react78, import_lucide_react53, import_tables6, import_jsx_runtime95, EDITOR_UI_ACTIVE_MARKS, editorUiRenderStateCache, EditorUiRenderStateContext, ToolbarButton, ToolbarDivider, TableInsertGrid, EditorToolbar;
10292
+ var import_react77, import_react78, import_lucide_react53, import_tables6, import_jsx_runtime96, EDITOR_UI_ACTIVE_MARKS, editorUiRenderStateCache, EditorUiRenderStateContext, ToolbarButton, ToolbarDivider, TableInsertGrid, EditorToolbar;
10269
10293
  var init_toolbar = __esm({
10270
10294
  "src/components/UEditor/toolbar.tsx"() {
10271
10295
  "use strict";
@@ -10288,9 +10312,10 @@ var init_toolbar = __esm({
10288
10312
  init_table_align_utils();
10289
10313
  init_table_dom_utils();
10290
10314
  init_table_cell_commands();
10315
+ init_table_vertical_align_icons();
10291
10316
  init_figma_toolbar_icons();
10292
10317
  init_typography_options();
10293
- import_jsx_runtime95 = require("react/jsx-runtime");
10318
+ import_jsx_runtime96 = require("react/jsx-runtime");
10294
10319
  EDITOR_UI_ACTIVE_MARKS = [
10295
10320
  "blockquote",
10296
10321
  "bold",
@@ -10313,7 +10338,7 @@ var init_toolbar = __esm({
10313
10338
  editorUiRenderStateCache = /* @__PURE__ */ new WeakMap();
10314
10339
  EditorUiRenderStateContext = import_react77.default.createContext(null);
10315
10340
  ToolbarButton = import_react77.default.forwardRef(({ onClick, onMouseDown, active, disabled, children, title, className }, ref) => {
10316
- const button = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10341
+ const button = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10317
10342
  "button",
10318
10343
  {
10319
10344
  ref,
@@ -10338,12 +10363,12 @@ var init_toolbar = __esm({
10338
10363
  }
10339
10364
  );
10340
10365
  if (title) {
10341
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Tooltip, { content: title, placement: "top", delay: { open: 200, close: 0 }, children: button });
10366
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Tooltip, { content: title, placement: "top", delay: { open: 200, close: 0 }, children: button });
10342
10367
  }
10343
10368
  return button;
10344
10369
  });
10345
10370
  ToolbarButton.displayName = "ToolbarButton";
10346
- ToolbarDivider = () => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { "aria-hidden": "true", className: "mx-1 h-5 w-px shrink-0 bg-[rgba(123,129,132,0.24)]" });
10371
+ ToolbarDivider = () => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { "aria-hidden": "true", className: "mx-1 h-5 w-px shrink-0 bg-[rgba(123,129,132,0.24)]" });
10347
10372
  TableInsertGrid = ({
10348
10373
  insertLabel,
10349
10374
  previewTemplate,
@@ -10352,14 +10377,14 @@ var init_toolbar = __esm({
10352
10377
  const [selection, setSelection] = import_react77.default.useState({ rows: 3, cols: 3 });
10353
10378
  const maxRows = 8;
10354
10379
  const maxCols = 8;
10355
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "mb-2 rounded-xl border border-border/60 bg-muted/20 p-2", children: [
10356
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mb-2 text-sm font-medium text-foreground", children: formatTableInsertLabel(previewTemplate, selection.rows, selection.cols) }),
10357
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "grid grid-cols-8 gap-1", role: "grid", "aria-label": insertLabel, children: Array.from({ length: maxRows }).map(
10380
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "mb-2 rounded-xl border border-border/60 bg-muted/20 p-2", children: [
10381
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "mb-2 text-sm font-medium text-foreground", children: formatTableInsertLabel(previewTemplate, selection.rows, selection.cols) }),
10382
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "grid grid-cols-8 gap-1", role: "grid", "aria-label": insertLabel, children: Array.from({ length: maxRows }).map(
10358
10383
  (_, rowIndex) => Array.from({ length: maxCols }).map((__, colIndex) => {
10359
10384
  const rows = rowIndex + 1;
10360
10385
  const cols = colIndex + 1;
10361
10386
  const active = rows <= selection.rows && cols <= selection.cols;
10362
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10387
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10363
10388
  "button",
10364
10389
  {
10365
10390
  type: "button",
@@ -10389,7 +10414,7 @@ var init_toolbar = __esm({
10389
10414
  );
10390
10415
  })
10391
10416
  ) }),
10392
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mt-2 text-xs text-muted-foreground", children: insertLabel })
10417
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "mt-2 text-xs text-muted-foreground", children: insertLabel })
10393
10418
  ] });
10394
10419
  };
10395
10420
  EditorToolbar = ({
@@ -10493,46 +10518,46 @@ var init_toolbar = __esm({
10493
10518
  }
10494
10519
  };
10495
10520
  if (variant === "minimal") {
10496
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border/35 bg-muted/30 p-1.5", children: [
10497
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaUndoIcon, { className: "h-4 w-4" }) }),
10498
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaRedoIcon, { className: "h-4 w-4" }) }),
10499
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarDivider, {}),
10500
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaBoldIcon, { className: "h-4 w-4" }) }),
10501
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaItalicIcon, { className: "h-4 w-4" }) }),
10502
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10521
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border/35 bg-muted/30 p-1.5", children: [
10522
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaUndoIcon, { className: "h-4 w-4" }) }),
10523
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaRedoIcon, { className: "h-4 w-4" }) }),
10524
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarDivider, {}),
10525
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaBoldIcon, { className: "h-4 w-4" }) }),
10526
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaItalicIcon, { className: "h-4 w-4" }) }),
10527
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10503
10528
  ToolbarButton,
10504
10529
  {
10505
10530
  onClick: () => editor.chain().focus().toggleBulletList().run(),
10506
10531
  active: editor.isActive("bulletList"),
10507
10532
  title: t("toolbar.bulletList"),
10508
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaListIcon, { className: "h-4 w-4" })
10533
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaListIcon, { className: "h-4 w-4" })
10509
10534
  }
10510
10535
  ),
10511
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10536
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10512
10537
  ToolbarButton,
10513
10538
  {
10514
10539
  onClick: () => editor.chain().focus().decreaseIndent().run(),
10515
10540
  disabled: !editorUiState.can.decreaseIndent,
10516
10541
  title: t("toolbar.decreaseIndent"),
10517
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.IndentDecrease, { className: "h-4 w-4" })
10542
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.IndentDecrease, { className: "h-4 w-4" })
10518
10543
  }
10519
10544
  ),
10520
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10545
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10521
10546
  ToolbarButton,
10522
10547
  {
10523
10548
  onClick: () => editor.chain().focus().increaseIndent().run(),
10524
10549
  disabled: !editorUiState.can.increaseIndent,
10525
10550
  title: t("toolbar.increaseIndent"),
10526
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.IndentIncrease, { className: "h-4 w-4" })
10551
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.IndentIncrease, { className: "h-4 w-4" })
10527
10552
  }
10528
10553
  ),
10529
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
10554
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
10530
10555
  DropdownMenu,
10531
10556
  {
10532
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10533
- }, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }) }),
10557
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10558
+ }, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }) }),
10534
10559
  children: [
10535
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10560
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10536
10561
  DropdownMenuItem,
10537
10562
  {
10538
10563
  icon: import_lucide_react53.SquareCheckBig,
@@ -10540,7 +10565,7 @@ var init_toolbar = __esm({
10540
10565
  onClick: () => editor.chain().focus().setFormCheckbox().run()
10541
10566
  }
10542
10567
  ),
10543
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10568
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10544
10569
  DropdownMenuItem,
10545
10570
  {
10546
10571
  icon: import_lucide_react53.CircleCheckBig,
@@ -10551,12 +10576,12 @@ var init_toolbar = __esm({
10551
10576
  ]
10552
10577
  }
10553
10578
  ),
10554
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10579
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10555
10580
  DropdownMenu,
10556
10581
  {
10557
10582
  contentClassName: "min-w-72",
10558
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaLinkIcon, { className: "h-4 w-4" }) }),
10559
- children: showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10583
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaLinkIcon, { className: "h-4 w-4" }) }),
10584
+ children: showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10560
10585
  LinkInput,
10561
10586
  {
10562
10587
  initialUrl: String(editor.getAttributes("link").href ?? ""),
@@ -10566,8 +10591,8 @@ var init_toolbar = __esm({
10566
10591
  },
10567
10592
  onCancel: () => setShowLinkInput(false)
10568
10593
  }
10569
- ) : /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
10570
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10594
+ ) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
10595
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10571
10596
  DropdownMenuItem,
10572
10597
  {
10573
10598
  icon: import_lucide_react53.Link,
@@ -10577,7 +10602,7 @@ var init_toolbar = __esm({
10577
10602
  closeOnSelect: false
10578
10603
  }
10579
10604
  ),
10580
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10605
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10581
10606
  DropdownMenuItem,
10582
10607
  {
10583
10608
  icon: import_lucide_react53.Trash2,
@@ -10590,28 +10615,28 @@ var init_toolbar = __esm({
10590
10615
  ] })
10591
10616
  }
10592
10617
  ),
10593
- onToggleMenuBar && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10618
+ onToggleMenuBar && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10594
10619
  ToolbarButton,
10595
10620
  {
10596
10621
  onClick: onToggleMenuBar,
10597
10622
  active: isMenuBarVisible,
10598
10623
  title: t(isMenuBarVisible ? "toolbar.hideMenuBar" : "toolbar.showMenuBar"),
10599
- children: isMenuBarVisible ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.PanelTopOpen, { className: "h-4 w-4" })
10624
+ children: isMenuBarVisible ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.PanelTopOpen, { className: "h-4 w-4" })
10600
10625
  }
10601
10626
  )
10602
10627
  ] });
10603
10628
  }
10604
- const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? import_lucide_react53.AlignCenterVertical : currentCellVerticalAlign === "bottom" ? import_lucide_react53.AlignEndVertical : import_lucide_react53.AlignStartVertical;
10605
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
10629
+ const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? TableVerticalAlignMiddleIcon : currentCellVerticalAlign === "bottom" ? TableVerticalAlignBottomIcon : TableVerticalAlignTopIcon;
10630
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
10606
10631
  "div",
10607
10632
  {
10608
10633
  role: "toolbar",
10609
10634
  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",
10610
10635
  children: [
10611
- isFull && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10636
+ isFull && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10612
10637
  DropdownMenu,
10613
10638
  {
10614
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
10639
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
10615
10640
  ToolbarButton,
10616
10641
  {
10617
10642
  onClick: () => {
@@ -10619,13 +10644,13 @@ var init_toolbar = __esm({
10619
10644
  title: t("toolbar.fontFamily"),
10620
10645
  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",
10621
10646
  children: [
10622
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "min-w-0 flex-1 truncate text-left text-xs font-normal", style: { fontFamily: displayedFontFamilyValue || void 0 }, children: displayedFontFamilyLabel }),
10623
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaChevronDownIcon, { className: "h-3 w-3 shrink-0 text-[#7B8184]" })
10647
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "min-w-0 flex-1 truncate text-left text-xs font-normal", style: { fontFamily: displayedFontFamilyValue || void 0 }, children: displayedFontFamilyLabel }),
10648
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaChevronDownIcon, { className: "h-3 w-3 shrink-0 text-[#7B8184]" })
10624
10649
  ]
10625
10650
  }
10626
10651
  ),
10627
10652
  contentClassName: "max-h-80 overflow-y-auto min-w-56 p-2",
10628
- children: availableFontFamilies.map((option) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10653
+ children: availableFontFamilies.map((option) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10629
10654
  DropdownMenuItem,
10630
10655
  {
10631
10656
  label: option.label,
@@ -10637,11 +10662,11 @@ var init_toolbar = __esm({
10637
10662
  ))
10638
10663
  }
10639
10664
  ),
10640
- (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10665
+ (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10641
10666
  DropdownMenu,
10642
10667
  {
10643
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex h-7 w-14 items-center rounded-md border border-[rgba(196,197,213,0.6)] bg-white text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] dark:bg-background dark:text-foreground", children: [
10644
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10668
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex h-7 w-14 items-center rounded-md border border-[rgba(196,197,213,0.6)] bg-white text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] dark:bg-background dark:text-foreground", children: [
10669
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10645
10670
  "input",
10646
10671
  {
10647
10672
  type: "number",
@@ -10672,10 +10697,10 @@ var init_toolbar = __esm({
10672
10697
  className: "min-w-0 flex-1 bg-transparent px-2 text-xs font-normal leading-none outline-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
10673
10698
  }
10674
10699
  ),
10675
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { type: "button", "aria-label": t("toolbar.fontSize"), title: t("toolbar.fontSize"), className: "px-1 text-[#7B8184]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaChevronDownIcon, { className: "h-3 w-3" }) })
10700
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("button", { type: "button", "aria-label": t("toolbar.fontSize"), title: t("toolbar.fontSize"), className: "px-1 text-[#7B8184]", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaChevronDownIcon, { className: "h-3 w-3" }) })
10676
10701
  ] }),
10677
10702
  contentClassName: "max-h-80 overflow-y-auto min-w-32 p-2",
10678
- children: availableFontSizes.map((option) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10703
+ children: availableFontSizes.map((option) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10679
10704
  DropdownMenuItem,
10680
10705
  {
10681
10706
  label: option.label,
@@ -10689,14 +10714,14 @@ var init_toolbar = __esm({
10689
10714
  ))
10690
10715
  }
10691
10716
  ),
10692
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
10717
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
10693
10718
  DropdownMenu,
10694
10719
  {
10695
10720
  contentClassName: "p-1",
10696
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10697
- }, title: t("toolbar.textStyle"), className: "px-1.5 w-auto gap-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaTextStyleIcon, { className: "h-4 w-4" }) }),
10721
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10722
+ }, title: t("toolbar.textStyle"), className: "px-1.5 w-auto gap-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaTextStyleIcon, { className: "h-4 w-4" }) }),
10698
10723
  children: [
10699
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10724
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10700
10725
  DropdownMenuItem,
10701
10726
  {
10702
10727
  icon: import_lucide_react53.Type,
@@ -10705,7 +10730,7 @@ var init_toolbar = __esm({
10705
10730
  active: editor.isActive("paragraph")
10706
10731
  }
10707
10732
  ),
10708
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10733
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10709
10734
  DropdownMenuItem,
10710
10735
  {
10711
10736
  icon: import_lucide_react53.Heading1,
@@ -10715,7 +10740,7 @@ var init_toolbar = __esm({
10715
10740
  shortcut: "Ctrl+Alt+1"
10716
10741
  }
10717
10742
  ),
10718
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10743
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10719
10744
  DropdownMenuItem,
10720
10745
  {
10721
10746
  icon: import_lucide_react53.Heading2,
@@ -10725,7 +10750,7 @@ var init_toolbar = __esm({
10725
10750
  shortcut: "Ctrl+Alt+2"
10726
10751
  }
10727
10752
  ),
10728
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10753
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10729
10754
  DropdownMenuItem,
10730
10755
  {
10731
10756
  icon: import_lucide_react53.Heading3,
@@ -10738,15 +10763,15 @@ var init_toolbar = __esm({
10738
10763
  ]
10739
10764
  }
10740
10765
  ),
10741
- isFull && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
10742
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
10766
+ isFull && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
10767
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
10743
10768
  DropdownMenu,
10744
10769
  {
10745
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10746
- }, title: t("toolbar.lineHeight"), className: "gap-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaLineHeightIcon, { className: "h-4 w-4" }) }),
10770
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10771
+ }, title: t("toolbar.lineHeight"), className: "gap-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaLineHeightIcon, { className: "h-4 w-4" }) }),
10747
10772
  contentClassName: "max-h-72 overflow-y-auto p-1",
10748
10773
  children: [
10749
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10774
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10750
10775
  DropdownMenuItem,
10751
10776
  {
10752
10777
  icon: import_lucide_react53.Type,
@@ -10755,7 +10780,7 @@ var init_toolbar = __esm({
10755
10780
  active: !currentLineHeight
10756
10781
  }
10757
10782
  ),
10758
- availableLineHeights.map((option) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10783
+ availableLineHeights.map((option) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10759
10784
  DropdownMenuItem,
10760
10785
  {
10761
10786
  label: option.label,
@@ -10767,14 +10792,14 @@ var init_toolbar = __esm({
10767
10792
  ]
10768
10793
  }
10769
10794
  ),
10770
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
10795
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
10771
10796
  DropdownMenu,
10772
10797
  {
10773
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10774
- }, title: t("toolbar.letterSpacing"), className: "gap-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaLetterSpacingIcon, { className: "h-4 w-4" }) }),
10798
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10799
+ }, title: t("toolbar.letterSpacing"), className: "gap-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaLetterSpacingIcon, { className: "h-4 w-4" }) }),
10775
10800
  contentClassName: "max-h-72 overflow-y-auto p-1",
10776
10801
  children: [
10777
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10802
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10778
10803
  DropdownMenuItem,
10779
10804
  {
10780
10805
  icon: import_lucide_react53.Type,
@@ -10783,7 +10808,7 @@ var init_toolbar = __esm({
10783
10808
  active: !currentLetterSpacing
10784
10809
  }
10785
10810
  ),
10786
- availableLetterSpacings.map((option) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10811
+ availableLetterSpacings.map((option) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10787
10812
  DropdownMenuItem,
10788
10813
  {
10789
10814
  label: option.label,
@@ -10796,16 +10821,16 @@ var init_toolbar = __esm({
10796
10821
  }
10797
10822
  )
10798
10823
  ] }),
10799
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarDivider, {}),
10800
- (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10824
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarDivider, {}),
10825
+ (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10801
10826
  DropdownMenu,
10802
10827
  {
10803
10828
  isOpen: isTableMenuOpen,
10804
10829
  onOpenChange: setIsTableMenuOpen,
10805
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10806
- }, title: t("toolbar.table"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaTableIcon, { className: "h-4 w-4" }) }),
10830
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10831
+ }, title: t("toolbar.table"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaTableIcon, { className: "h-4 w-4" }) }),
10807
10832
  contentClassName: "p-2 min-w-56",
10808
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10833
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10809
10834
  TableInsertGrid,
10810
10835
  {
10811
10836
  insertLabel: t("tableMenu.insertTable"),
@@ -10818,45 +10843,45 @@ var init_toolbar = __esm({
10818
10843
  )
10819
10844
  }
10820
10845
  ),
10821
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaBoldIcon, { className: "h-4 w-4" }) }),
10822
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaItalicIcon, { className: "h-4 w-4" }) }),
10823
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10846
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaBoldIcon, { className: "h-4 w-4" }) }),
10847
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaItalicIcon, { className: "h-4 w-4" }) }),
10848
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10824
10849
  ToolbarButton,
10825
10850
  {
10826
10851
  onClick: () => editor.chain().focus().toggleUnderline().run(),
10827
10852
  active: editor.isActive("underline"),
10828
10853
  title: t("toolbar.underline"),
10829
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaUnderlineIcon, { className: "h-4 w-4" })
10854
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaUnderlineIcon, { className: "h-4 w-4" })
10830
10855
  }
10831
10856
  ),
10832
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaStrikeIcon, { className: "h-4 w-4" }) }),
10833
- (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaCodeIcon, { className: "h-4 w-4" }) }),
10834
- isFull && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
10835
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10857
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaStrikeIcon, { className: "h-4 w-4" }) }),
10858
+ (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaCodeIcon, { className: "h-4 w-4" }) }),
10859
+ isFull && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
10860
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10836
10861
  ToolbarButton,
10837
10862
  {
10838
10863
  onClick: () => editor.chain().focus().toggleSubscript().run(),
10839
10864
  active: editor.isActive("subscript"),
10840
10865
  title: t("toolbar.subscript"),
10841
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaSubscriptIcon, { className: "h-4 w-4" })
10866
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaSubscriptIcon, { className: "h-4 w-4" })
10842
10867
  }
10843
10868
  ),
10844
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10869
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10845
10870
  ToolbarButton,
10846
10871
  {
10847
10872
  onClick: () => editor.chain().focus().toggleSuperscript().run(),
10848
10873
  active: editor.isActive("superscript"),
10849
10874
  title: t("toolbar.superscript"),
10850
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaSuperscriptIcon, { className: "h-4 w-4" })
10875
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaSuperscriptIcon, { className: "h-4 w-4" })
10851
10876
  }
10852
10877
  )
10853
10878
  ] }),
10854
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10879
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10855
10880
  DropdownMenu,
10856
10881
  {
10857
10882
  contentClassName: "min-w-72",
10858
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaLinkIcon, { className: "h-4 w-4" }) }),
10859
- children: showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10883
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaLinkIcon, { className: "h-4 w-4" }) }),
10884
+ children: showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10860
10885
  LinkInput,
10861
10886
  {
10862
10887
  initialUrl: String(editor.getAttributes("link").href ?? ""),
@@ -10866,8 +10891,8 @@ var init_toolbar = __esm({
10866
10891
  },
10867
10892
  onCancel: () => setShowLinkInput(false)
10868
10893
  }
10869
- ) : /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
10870
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10894
+ ) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
10895
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10871
10896
  DropdownMenuItem,
10872
10897
  {
10873
10898
  icon: import_lucide_react53.Link,
@@ -10877,7 +10902,7 @@ var init_toolbar = __esm({
10877
10902
  closeOnSelect: false
10878
10903
  }
10879
10904
  ),
10880
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10905
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10881
10906
  DropdownMenuItem,
10882
10907
  {
10883
10908
  icon: import_lucide_react53.Trash2,
@@ -10890,13 +10915,13 @@ var init_toolbar = __esm({
10890
10915
  ] })
10891
10916
  }
10892
10917
  ),
10893
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarDivider, {}),
10894
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10918
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarDivider, {}),
10919
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10895
10920
  DropdownMenu,
10896
10921
  {
10897
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10898
- }, title: t("colors.textColor"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(TextColorIcon, { color: currentTextColor }) }),
10899
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10922
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10923
+ }, title: t("colors.textColor"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TextColorIcon, { color: currentTextColor }) }),
10924
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10900
10925
  EditorColorPalette,
10901
10926
  {
10902
10927
  colors: textColors,
@@ -10913,12 +10938,12 @@ var init_toolbar = __esm({
10913
10938
  )
10914
10939
  }
10915
10940
  ),
10916
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10941
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10917
10942
  DropdownMenu,
10918
10943
  {
10919
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10920
- }, active: editor.isActive("highlight"), title: t("colors.highlight"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(HighlightColorIcon, { color: currentHighlightColor }) }),
10921
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10944
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10945
+ }, active: editor.isActive("highlight"), title: t("colors.highlight"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HighlightColorIcon, { color: currentHighlightColor }) }),
10946
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10922
10947
  EditorColorPalette,
10923
10948
  {
10924
10949
  colors: highlightColors,
@@ -10935,15 +10960,15 @@ var init_toolbar = __esm({
10935
10960
  )
10936
10961
  }
10937
10962
  ),
10938
- (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
10939
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarDivider, {}),
10940
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
10963
+ (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
10964
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarDivider, {}),
10965
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
10941
10966
  DropdownMenu,
10942
10967
  {
10943
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
10944
- }, title: t("toolbar.alignment"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaAlignLeftIcon, { className: "h-4 w-4" }) }),
10968
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
10969
+ }, title: t("toolbar.alignment"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaAlignLeftIcon, { className: "h-4 w-4" }) }),
10945
10970
  children: [
10946
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10971
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10947
10972
  DropdownMenuItem,
10948
10973
  {
10949
10974
  icon: import_lucide_react53.AlignLeft,
@@ -10952,7 +10977,7 @@ var init_toolbar = __esm({
10952
10977
  active: editor.isActive({ textAlign: "left" })
10953
10978
  }
10954
10979
  ),
10955
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10980
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10956
10981
  DropdownMenuItem,
10957
10982
  {
10958
10983
  icon: import_lucide_react53.AlignCenter,
@@ -10961,7 +10986,7 @@ var init_toolbar = __esm({
10961
10986
  active: editor.isActive({ textAlign: "center" })
10962
10987
  }
10963
10988
  ),
10964
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10989
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10965
10990
  DropdownMenuItem,
10966
10991
  {
10967
10992
  icon: import_lucide_react53.AlignRight,
@@ -10970,7 +10995,7 @@ var init_toolbar = __esm({
10970
10995
  active: editor.isActive({ textAlign: "right" })
10971
10996
  }
10972
10997
  ),
10973
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
10998
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10974
10999
  DropdownMenuItem,
10975
11000
  {
10976
11001
  icon: import_lucide_react53.AlignJustify,
@@ -10979,30 +11004,30 @@ var init_toolbar = __esm({
10979
11004
  active: editor.isActive({ textAlign: "justify" })
10980
11005
  }
10981
11006
  ),
10982
- hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
10983
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "my-1 border-t" }),
10984
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11007
+ hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
11008
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "my-1 border-t" }),
11009
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10985
11010
  DropdownMenuItem,
10986
11011
  {
10987
- icon: import_lucide_react53.AlignStartVertical,
11012
+ icon: TableVerticalAlignTopIcon,
10988
11013
  label: t("tableMenu.alignVerticalTop") || "Align top",
10989
11014
  onClick: () => applyTableCellAttribute(editor, "verticalAlign", "top"),
10990
11015
  active: currentCellVerticalAlign === "top"
10991
11016
  }
10992
11017
  ),
10993
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11018
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10994
11019
  DropdownMenuItem,
10995
11020
  {
10996
- icon: import_lucide_react53.AlignCenterVertical,
11021
+ icon: TableVerticalAlignMiddleIcon,
10997
11022
  label: t("tableMenu.alignVerticalMiddle") || "Align middle",
10998
11023
  onClick: () => applyTableCellAttribute(editor, "verticalAlign", "middle"),
10999
11024
  active: currentCellVerticalAlign === "middle"
11000
11025
  }
11001
11026
  ),
11002
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11027
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11003
11028
  DropdownMenuItem,
11004
11029
  {
11005
- icon: import_lucide_react53.AlignEndVertical,
11030
+ icon: TableVerticalAlignBottomIcon,
11006
11031
  label: t("tableMenu.alignVerticalBottom") || "Align bottom",
11007
11032
  onClick: () => applyTableCellAttribute(editor, "verticalAlign", "bottom"),
11008
11033
  active: currentCellVerticalAlign === "bottom"
@@ -11012,14 +11037,14 @@ var init_toolbar = __esm({
11012
11037
  ]
11013
11038
  }
11014
11039
  ),
11015
- hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
11016
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
11040
+ hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
11041
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
11017
11042
  DropdownMenu,
11018
11043
  {
11019
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
11020
- }, title: t("tableMenu.textDirection"), children: currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" }) }),
11044
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
11045
+ }, title: t("tableMenu.textDirection"), children: currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" }) }),
11021
11046
  children: [
11022
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11047
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11023
11048
  DropdownMenuItem,
11024
11049
  {
11025
11050
  icon: import_lucide_react53.ArrowRight,
@@ -11028,7 +11053,7 @@ var init_toolbar = __esm({
11028
11053
  active: currentCellTextDirection === "horizontal"
11029
11054
  }
11030
11055
  ),
11031
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11056
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11032
11057
  DropdownMenuItem,
11033
11058
  {
11034
11059
  icon: import_lucide_react53.ArrowDown,
@@ -11040,25 +11065,25 @@ var init_toolbar = __esm({
11040
11065
  ]
11041
11066
  }
11042
11067
  ),
11043
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11068
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11044
11069
  ToolbarButton,
11045
11070
  {
11046
11071
  onClick: () => applyTableCellAttribute(editor, "textWrap", currentCellTextWrap === "nowrap" ? "wrap" : "nowrap"),
11047
11072
  active: currentCellTextWrap !== "nowrap",
11048
11073
  title: currentCellTextWrap === "nowrap" ? t("tableMenu.wrapText") : t("tableMenu.noWrapText"),
11049
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.WrapText, { className: "h-4 w-4" })
11074
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.WrapText, { className: "h-4 w-4" })
11050
11075
  }
11051
11076
  )
11052
11077
  ] })
11053
11078
  ] }),
11054
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarDivider, {}),
11055
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
11079
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarDivider, {}),
11080
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
11056
11081
  DropdownMenu,
11057
11082
  {
11058
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
11059
- }, title: t("toolbar.bulletList"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaListIcon, { className: "h-4 w-4" }) }),
11083
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
11084
+ }, title: t("toolbar.bulletList"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaListIcon, { className: "h-4 w-4" }) }),
11060
11085
  children: [
11061
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11086
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11062
11087
  DropdownMenuItem,
11063
11088
  {
11064
11089
  icon: import_lucide_react53.List,
@@ -11068,7 +11093,7 @@ var init_toolbar = __esm({
11068
11093
  shortcut: "Ctrl+Shift+8"
11069
11094
  }
11070
11095
  ),
11071
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11096
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11072
11097
  DropdownMenuItem,
11073
11098
  {
11074
11099
  icon: import_lucide_react53.ListOrdered,
@@ -11078,7 +11103,7 @@ var init_toolbar = __esm({
11078
11103
  shortcut: "Ctrl+Shift+7"
11079
11104
  }
11080
11105
  ),
11081
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11106
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11082
11107
  DropdownMenuItem,
11083
11108
  {
11084
11109
  icon: import_lucide_react53.ListTodo,
@@ -11091,31 +11116,31 @@ var init_toolbar = __esm({
11091
11116
  ]
11092
11117
  }
11093
11118
  ),
11094
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11119
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11095
11120
  ToolbarButton,
11096
11121
  {
11097
11122
  onClick: () => editor.chain().focus().decreaseIndent().run(),
11098
11123
  disabled: !editorUiState.can.decreaseIndent,
11099
11124
  title: t("toolbar.decreaseIndent"),
11100
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.IndentDecrease, { className: "h-4 w-4" })
11125
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.IndentDecrease, { className: "h-4 w-4" })
11101
11126
  }
11102
11127
  ),
11103
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11128
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11104
11129
  ToolbarButton,
11105
11130
  {
11106
11131
  onClick: () => editor.chain().focus().increaseIndent().run(),
11107
11132
  disabled: !editorUiState.can.increaseIndent,
11108
11133
  title: t("toolbar.increaseIndent"),
11109
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.IndentIncrease, { className: "h-4 w-4" })
11134
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.IndentIncrease, { className: "h-4 w-4" })
11110
11135
  }
11111
11136
  ),
11112
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
11137
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
11113
11138
  DropdownMenu,
11114
11139
  {
11115
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
11116
- }, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }) }),
11140
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
11141
+ }, active: editor.isActive("formCheckbox"), title: t("slashCommand.formCheckbox"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.SquareCheckBig, { className: "w-4 h-4" }) }),
11117
11142
  children: [
11118
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11143
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11119
11144
  DropdownMenuItem,
11120
11145
  {
11121
11146
  icon: import_lucide_react53.SquareCheckBig,
@@ -11123,7 +11148,7 @@ var init_toolbar = __esm({
11123
11148
  onClick: () => editor.chain().focus().setFormCheckbox().run()
11124
11149
  }
11125
11150
  ),
11126
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11151
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11127
11152
  DropdownMenuItem,
11128
11153
  {
11129
11154
  icon: import_lucide_react53.CircleCheckBig,
@@ -11134,14 +11159,14 @@ var init_toolbar = __esm({
11134
11159
  ]
11135
11160
  }
11136
11161
  ),
11137
- isMediumFull && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBlockquote().run(), active: editor.isActive("blockquote"), title: t("toolbar.quote"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaQuoteIcon, { className: "h-4 w-4" }) }),
11138
- isFull && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
11162
+ isMediumFull && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBlockquote().run(), active: editor.isActive("blockquote"), title: t("toolbar.quote"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaQuoteIcon, { className: "h-4 w-4" }) }),
11163
+ isFull && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
11139
11164
  DropdownMenu,
11140
11165
  {
11141
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
11142
- }, title: t("toolbar.quote"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaQuoteIcon, { className: "h-4 w-4" }) }),
11166
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
11167
+ }, title: t("toolbar.quote"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaQuoteIcon, { className: "h-4 w-4" }) }),
11143
11168
  children: [
11144
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11169
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11145
11170
  DropdownMenuItem,
11146
11171
  {
11147
11172
  icon: import_lucide_react53.Quote,
@@ -11151,7 +11176,7 @@ var init_toolbar = __esm({
11151
11176
  shortcut: "Ctrl+Shift+B"
11152
11177
  }
11153
11178
  ),
11154
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11179
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11155
11180
  DropdownMenuItem,
11156
11181
  {
11157
11182
  icon: import_lucide_react53.FileCode,
@@ -11164,12 +11189,12 @@ var init_toolbar = __esm({
11164
11189
  ]
11165
11190
  }
11166
11191
  ),
11167
- (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11192
+ (isMediumFull || isFull) && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11168
11193
  DropdownMenu,
11169
11194
  {
11170
- trigger: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => {
11171
- }, title: t("toolbar.image"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaImageIcon, { className: "h-4 w-4" }) }),
11172
- children: showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11195
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => {
11196
+ }, title: t("toolbar.image"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaImageIcon, { className: "h-4 w-4" }) }),
11197
+ children: showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11173
11198
  ImageInput,
11174
11199
  {
11175
11200
  onSubmit: (url, alt) => {
@@ -11178,9 +11203,9 @@ var init_toolbar = __esm({
11178
11203
  },
11179
11204
  onCancel: () => setShowImageInput(false)
11180
11205
  }
11181
- ) : /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
11182
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(DropdownMenuItem, { icon: import_lucide_react53.Link, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true), closeOnSelect: false }),
11183
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11206
+ ) : /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
11207
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DropdownMenuItem, { icon: import_lucide_react53.Link, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true), closeOnSelect: false }),
11208
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11184
11209
  DropdownMenuItem,
11185
11210
  {
11186
11211
  icon: import_lucide_react53.Upload,
@@ -11190,8 +11215,8 @@ var init_toolbar = __esm({
11190
11215
  closeOnSelect: false
11191
11216
  }
11192
11217
  ),
11193
- imageUploadError && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(DropdownMenuItem, { label: imageUploadError, disabled: true, destructive: true }),
11194
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11218
+ imageUploadError && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DropdownMenuItem, { label: imageUploadError, disabled: true, destructive: true }),
11219
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11195
11220
  "input",
11196
11221
  {
11197
11222
  ref: fileInputRef,
@@ -11206,8 +11231,8 @@ var init_toolbar = __esm({
11206
11231
  }
11207
11232
  }
11208
11233
  ),
11209
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "my-1 border-t" }),
11210
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11234
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "my-1 border-t" }),
11235
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11211
11236
  DropdownMenuItem,
11212
11237
  {
11213
11238
  icon: import_lucide_react53.AlignCenter,
@@ -11217,7 +11242,7 @@ var init_toolbar = __esm({
11217
11242
  disabled: !isImageSelected
11218
11243
  }
11219
11244
  ),
11220
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11245
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11221
11246
  DropdownMenuItem,
11222
11247
  {
11223
11248
  icon: import_lucide_react53.AlignLeft,
@@ -11227,7 +11252,7 @@ var init_toolbar = __esm({
11227
11252
  disabled: !isImageSelected
11228
11253
  }
11229
11254
  ),
11230
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11255
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11231
11256
  DropdownMenuItem,
11232
11257
  {
11233
11258
  icon: import_lucide_react53.AlignRight,
@@ -11237,8 +11262,8 @@ var init_toolbar = __esm({
11237
11262
  disabled: !isImageSelected
11238
11263
  }
11239
11264
  ),
11240
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "my-1 border-t" }),
11241
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11265
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "my-1 border-t" }),
11266
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11242
11267
  DropdownMenuItem,
11243
11268
  {
11244
11269
  label: t("toolbar.imageWidthSm"),
@@ -11247,7 +11272,7 @@ var init_toolbar = __esm({
11247
11272
  disabled: !isImageSelected
11248
11273
  }
11249
11274
  ),
11250
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11275
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11251
11276
  DropdownMenuItem,
11252
11277
  {
11253
11278
  label: t("toolbar.imageWidthMd"),
@@ -11256,7 +11281,7 @@ var init_toolbar = __esm({
11256
11281
  disabled: !isImageSelected
11257
11282
  }
11258
11283
  ),
11259
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11284
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11260
11285
  DropdownMenuItem,
11261
11286
  {
11262
11287
  label: t("toolbar.imageWidthLg"),
@@ -11265,8 +11290,8 @@ var init_toolbar = __esm({
11265
11290
  disabled: !isImageSelected
11266
11291
  }
11267
11292
  ),
11268
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "my-1 border-t" }),
11269
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11293
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "my-1 border-t" }),
11294
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11270
11295
  DropdownMenuItem,
11271
11296
  {
11272
11297
  icon: import_lucide_react53.RotateCcw,
@@ -11275,7 +11300,7 @@ var init_toolbar = __esm({
11275
11300
  disabled: !isImageSelected
11276
11301
  }
11277
11302
  ),
11278
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11303
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11279
11304
  DropdownMenuItem,
11280
11305
  {
11281
11306
  icon: import_lucide_react53.Trash2,
@@ -11288,48 +11313,48 @@ var init_toolbar = __esm({
11288
11313
  ] })
11289
11314
  }
11290
11315
  ),
11291
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarDivider, {}),
11292
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaUndoIcon, { className: "h-4 w-4" }) }),
11293
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FigmaRedoIcon, { className: "h-4 w-4" }) }),
11294
- hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
11295
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ToolbarDivider, {}),
11296
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11316
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarDivider, {}),
11317
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaUndoIcon, { className: "h-4 w-4" }) }),
11318
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FigmaRedoIcon, { className: "h-4 w-4" }) }),
11319
+ hasTableContext && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
11320
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarDivider, {}),
11321
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11297
11322
  ToolbarButton,
11298
11323
  {
11299
11324
  onClick: () => editor.chain().focus().addColumnBefore().run(),
11300
11325
  disabled: !editor.can().addColumnBefore(),
11301
11326
  title: t("tableMenu.addColumnBefore"),
11302
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.ArrowLeft, { className: "w-4 h-4" })
11327
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.ArrowLeft, { className: "w-4 h-4" })
11303
11328
  }
11304
11329
  ),
11305
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11330
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11306
11331
  ToolbarButton,
11307
11332
  {
11308
11333
  onClick: () => editor.chain().focus().addColumnAfter().run(),
11309
11334
  disabled: !editor.can().addColumnAfter(),
11310
11335
  title: t("tableMenu.addColumnAfter"),
11311
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" })
11336
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.ArrowRight, { className: "w-4 h-4" })
11312
11337
  }
11313
11338
  ),
11314
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11339
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11315
11340
  ToolbarButton,
11316
11341
  {
11317
11342
  onClick: () => editor.chain().focus().addRowBefore().run(),
11318
11343
  disabled: !editor.can().addRowBefore(),
11319
11344
  title: t("tableMenu.addRowBefore"),
11320
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.ArrowUp, { className: "w-4 h-4" })
11345
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.ArrowUp, { className: "w-4 h-4" })
11321
11346
  }
11322
11347
  ),
11323
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11348
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11324
11349
  ToolbarButton,
11325
11350
  {
11326
11351
  onClick: () => editor.chain().focus().addRowAfter().run(),
11327
11352
  disabled: !editor.can().addRowAfter(),
11328
11353
  title: t("tableMenu.addRowAfter"),
11329
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" })
11354
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.ArrowDown, { className: "w-4 h-4" })
11330
11355
  }
11331
11356
  ),
11332
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11357
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11333
11358
  ToolbarButton,
11334
11359
  {
11335
11360
  onClick: () => {
@@ -11342,17 +11367,17 @@ var init_toolbar = __esm({
11342
11367
  active: canSplitCell,
11343
11368
  disabled: !canMergeCells && !canSplitCell,
11344
11369
  title: canSplitCell ? t("tableMenu.splitCell") : t("tableMenu.mergeCells"),
11345
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.TableCellsMerge, { className: "w-4 h-4" })
11370
+ children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.TableCellsMerge, { className: "w-4 h-4" })
11346
11371
  }
11347
11372
  )
11348
11373
  ] }),
11349
- onToggleMenuBar && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
11374
+ onToggleMenuBar && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
11350
11375
  ToolbarButton,
11351
11376
  {
11352
11377
  onClick: onToggleMenuBar,
11353
11378
  active: isMenuBarVisible,
11354
11379
  title: t(isMenuBarVisible ? "toolbar.hideMenuBar" : "toolbar.showMenuBar"),
11355
- children: isMenuBarVisible ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react53.PanelTopOpen, { className: "h-4 w-4" })
11380
+ children: isMenuBarVisible ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react53.PanelTopOpen, { className: "h-4 w-4" })
11356
11381
  }
11357
11382
  )
11358
11383
  ]
@@ -11815,7 +11840,7 @@ function MenuTableInsertGrid({
11815
11840
  onInsert
11816
11841
  }) {
11817
11842
  const closeMenu = useDropdownMenuClose();
11818
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
11843
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
11819
11844
  TableInsertGrid,
11820
11845
  {
11821
11846
  insertLabel,
@@ -11831,9 +11856,9 @@ function renderMenuItems(items) {
11831
11856
  return items.map((item, i) => {
11832
11857
  switch (item.type) {
11833
11858
  case "separator":
11834
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(DropdownMenuSeparator, {}, i);
11859
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DropdownMenuSeparator, {}, i);
11835
11860
  case "action":
11836
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
11861
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
11837
11862
  DropdownMenuItem,
11838
11863
  {
11839
11864
  label: item.label,
@@ -11847,9 +11872,9 @@ function renderMenuItems(items) {
11847
11872
  i
11848
11873
  );
11849
11874
  case "sub":
11850
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(DropdownMenuSub, { label: item.label, icon: item.icon, disabled: item.disabled, children: renderMenuItems(item.items) }, i);
11875
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DropdownMenuSub, { label: item.label, icon: item.icon, disabled: item.disabled, children: renderMenuItems(item.items) }, i);
11851
11876
  case "custom":
11852
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react87.default.Fragment, { children: item.render() }, item.key);
11877
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react87.default.Fragment, { children: item.render() }, item.key);
11853
11878
  }
11854
11879
  });
11855
11880
  }
@@ -12158,7 +12183,7 @@ function buildTableMenuItems(t, editor, onInsertTable) {
12158
12183
  {
12159
12184
  type: "custom",
12160
12185
  key: "table-insert-grid",
12161
- render: () => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12186
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12162
12187
  MenuTableInsertGrid,
12163
12188
  {
12164
12189
  insertLabel: t("tableMenu.insertTable"),
@@ -12232,7 +12257,7 @@ function buildTableMenuItems(t, editor, onInsertTable) {
12232
12257
  }
12233
12258
  ];
12234
12259
  }
12235
- var import_react87, import_lucide_react60, import_jsx_runtime105, MenuBarTrigger, MenuBar;
12260
+ var import_react87, import_lucide_react60, import_jsx_runtime106, MenuBarTrigger, MenuBar;
12236
12261
  var init_menu_bar = __esm({
12237
12262
  "src/components/UEditor/menu-bar.tsx"() {
12238
12263
  "use strict";
@@ -12253,9 +12278,9 @@ var init_menu_bar = __esm({
12253
12278
  init_portal_context();
12254
12279
  init_async_insertion_position();
12255
12280
  init_image_file_upload();
12256
- import_jsx_runtime105 = require("react/jsx-runtime");
12281
+ import_jsx_runtime106 = require("react/jsx-runtime");
12257
12282
  MenuBarTrigger = import_react87.default.forwardRef(
12258
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12283
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12259
12284
  "button",
12260
12285
  {
12261
12286
  ref,
@@ -12405,9 +12430,9 @@ var init_menu_bar = __esm({
12405
12430
  {
12406
12431
  type: "custom",
12407
12432
  key: "image",
12408
- render: () => showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
12409
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(DropdownMenuItem, { label: t("menubar.image"), icon: import_lucide_react60.Image, onClick: () => setShowImageInput(true), closeOnSelect: false }),
12410
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12433
+ render: () => showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
12434
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DropdownMenuItem, { label: t("menubar.image"), icon: import_lucide_react60.Image, onClick: () => setShowImageInput(true), closeOnSelect: false }),
12435
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12411
12436
  DropdownMenuItem,
12412
12437
  {
12413
12438
  label: isUploadingImage ? t("imageInput.uploading") : t("menubar.imageUpload"),
@@ -12417,14 +12442,14 @@ var init_menu_bar = __esm({
12417
12442
  disabled: isUploadingImage
12418
12443
  }
12419
12444
  ),
12420
- imageUploadError ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(DropdownMenuItem, { label: imageUploadError, disabled: true, destructive: true }) : null
12445
+ imageUploadError ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DropdownMenuItem, { label: imageUploadError, disabled: true, destructive: true }) : null
12421
12446
  ] })
12422
12447
  },
12423
12448
  { type: "separator" },
12424
12449
  {
12425
12450
  type: "custom",
12426
12451
  key: "link",
12427
- render: () => showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(LinkInput, { onSubmit: handleLinkSubmit, onCancel: () => setShowLinkInput(false), initialUrl: editor.getAttributes("link").href ?? "" }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12452
+ render: () => showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(LinkInput, { onSubmit: handleLinkSubmit, onCancel: () => setShowLinkInput(false), initialUrl: editor.getAttributes("link").href ?? "" }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12428
12453
  DropdownMenuItem,
12429
12454
  {
12430
12455
  label: t("menubar.link"),
@@ -12444,7 +12469,7 @@ var init_menu_bar = __esm({
12444
12469
  {
12445
12470
  type: "custom",
12446
12471
  key: "table-grid",
12447
- render: () => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12472
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12448
12473
  MenuTableInsertGrid,
12449
12474
  {
12450
12475
  insertLabel: t("tableMenu.insertTable"),
@@ -12519,8 +12544,8 @@ var init_menu_bar = __esm({
12519
12544
  },
12520
12545
  { key: "table", label: t("menubar.table"), items: buildTableMenuItems(t, editor, handleInsertTable) }
12521
12546
  ];
12522
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
12523
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12547
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
12548
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12524
12549
  "input",
12525
12550
  {
12526
12551
  ref: fileInputRef,
@@ -12535,11 +12560,11 @@ var init_menu_bar = __esm({
12535
12560
  }
12536
12561
  }
12537
12562
  ),
12538
- /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("nav", { "aria-label": t("toolbar.showMenuBar"), className: "flex items-center gap-0.5 border-b border-border/35 bg-muted/20 px-1.5 py-0.5", children: [
12539
- menus.map(({ key, label, items }) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12563
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("nav", { "aria-label": t("toolbar.showMenuBar"), className: "flex items-center gap-0.5 border-b border-border/35 bg-muted/20 px-1.5 py-0.5", children: [
12564
+ menus.map(({ key, label, items }) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12540
12565
  DropdownMenu,
12541
12566
  {
12542
- trigger: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(MenuBarTrigger, { children: label }),
12567
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(MenuBarTrigger, { children: label }),
12543
12568
  placement: "bottom-start",
12544
12569
  isOpen: openMenuKey === key,
12545
12570
  onOpenChange: (open) => {
@@ -12554,7 +12579,7 @@ var init_menu_bar = __esm({
12554
12579
  },
12555
12580
  key
12556
12581
  )),
12557
- showPreviewButton && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12582
+ showPreviewButton && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12558
12583
  "button",
12559
12584
  {
12560
12585
  type: "button",
@@ -12565,11 +12590,11 @@ var init_menu_bar = __esm({
12565
12590
  "ml-auto inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors",
12566
12591
  "hover:bg-accent hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1"
12567
12592
  ),
12568
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react60.Eye, { className: "h-4 w-4", "aria-hidden": "true" })
12593
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react60.Eye, { className: "h-4 w-4", "aria-hidden": "true" })
12569
12594
  }
12570
12595
  )
12571
12596
  ] }),
12572
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12597
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12573
12598
  Modal_default,
12574
12599
  {
12575
12600
  isOpen: showSourceDialog,
@@ -12577,9 +12602,9 @@ var init_menu_bar = __esm({
12577
12602
  title: t("menubar.sourceCode"),
12578
12603
  size: "lg",
12579
12604
  portalContainer: modalPortalContainer,
12580
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "space-y-3", children: [
12581
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "text-xs text-muted-foreground", children: t("menubar.sourceCodeHint") }),
12582
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12605
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "space-y-3", children: [
12606
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("p", { className: "text-xs text-muted-foreground", children: t("menubar.sourceCodeHint") }),
12607
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12583
12608
  "textarea",
12584
12609
  {
12585
12610
  ref: sourceTextareaRef,
@@ -12597,9 +12622,9 @@ var init_menu_bar = __esm({
12597
12622
  spellCheck: false
12598
12623
  }
12599
12624
  ),
12600
- sourceError ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { id: sourceErrorId, role: "alert", className: "text-xs text-destructive", children: sourceError }) : null,
12601
- /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex gap-2 justify-end", children: [
12602
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12625
+ sourceError ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("p", { id: sourceErrorId, role: "alert", className: "text-xs text-destructive", children: sourceError }) : null,
12626
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex gap-2 justify-end", children: [
12627
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12603
12628
  "button",
12604
12629
  {
12605
12630
  type: "button",
@@ -12608,7 +12633,7 @@ var init_menu_bar = __esm({
12608
12633
  children: t("menubar.applySource")
12609
12634
  }
12610
12635
  ),
12611
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12636
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12612
12637
  "button",
12613
12638
  {
12614
12639
  type: "button",
@@ -12621,7 +12646,7 @@ var init_menu_bar = __esm({
12621
12646
  ] })
12622
12647
  }
12623
12648
  ),
12624
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12649
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12625
12650
  Modal_default,
12626
12651
  {
12627
12652
  isOpen: showPreviewDialog,
@@ -12633,12 +12658,12 @@ var init_menu_bar = __esm({
12633
12658
  height: "min(860px, calc(100vh - 2rem))",
12634
12659
  className: "flex flex-col overflow-hidden rounded-xl md:rounded-2xl",
12635
12660
  contentClassName: "flex min-h-0 flex-1 overflow-hidden p-0",
12636
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12661
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12637
12662
  "div",
12638
12663
  {
12639
12664
  "data-testid": "preview-content",
12640
12665
  className: "min-h-0 flex-1 overflow-y-auto overscroll-contain",
12641
- children: editor.isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "text-muted-foreground text-sm", children: t("menubar.previewEmpty") }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
12666
+ children: editor.isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("p", { className: "text-muted-foreground text-sm", children: t("menubar.previewEmpty") }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12642
12667
  "div",
12643
12668
  {
12644
12669
  className: UEDITOR_PROSEMIRROR_CLASS_NAME,
@@ -40908,7 +40933,8 @@ function subscribeSharedGlobalEvent(target, type, listener, options) {
40908
40933
 
40909
40934
  // src/components/UEditor/menus.tsx
40910
40935
  init_portal_context();
40911
- var import_jsx_runtime96 = require("react/jsx-runtime");
40936
+ init_table_vertical_align_icons();
40937
+ var import_jsx_runtime97 = require("react/jsx-runtime");
40912
40938
  var FloatingSlashCommandMenu = ({ editor, onClose }) => {
40913
40939
  const t = useSmartTranslations("UEditor");
40914
40940
  const messages = (0, import_react79.useMemo)(() => buildSlashCommandMessages(t), [t]);
@@ -40931,7 +40957,7 @@ var FloatingSlashCommandMenu = ({ editor, onClose }) => {
40931
40957
  if (!portalDocument) return;
40932
40958
  return subscribeSharedGlobalEvent(portalDocument, "keydown", handleKeyDown2);
40933
40959
  }, [onClose, portalDocument]);
40934
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
40960
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
40935
40961
  SlashCommandList,
40936
40962
  {
40937
40963
  ref: listRef,
@@ -40948,17 +40974,17 @@ var FloatingMenuContent = ({ editor }) => {
40948
40974
  const t = useSmartTranslations("UEditor");
40949
40975
  const [showCommands, setShowCommands] = (0, import_react79.useState)(false);
40950
40976
  if (showCommands) {
40951
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FloatingSlashCommandMenu, { editor, onClose: () => setShowCommands(false) });
40977
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(FloatingSlashCommandMenu, { editor, onClose: () => setShowCommands(false) });
40952
40978
  }
40953
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
40979
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
40954
40980
  "button",
40955
40981
  {
40956
40982
  type: "button",
40957
40983
  onClick: () => setShowCommands(true),
40958
40984
  className: "group flex items-center gap-1 rounded-lg px-2 py-1.5 transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
40959
40985
  children: [
40960
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Plus, { className: "w-4 h-4 text-muted-foreground group-hover:text-foreground" }),
40961
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-sm text-muted-foreground group-hover:text-foreground", children: t("floatingMenu.addBlock") })
40986
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Plus, { className: "w-4 h-4 text-muted-foreground group-hover:text-foreground" }),
40987
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-sm text-muted-foreground group-hover:text-foreground", children: t("floatingMenu.addBlock") })
40962
40988
  ]
40963
40989
  }
40964
40990
  );
@@ -40990,7 +41016,7 @@ function applyTableCellAttribute2(editor, name, value, options = {}) {
40990
41016
  }
40991
41017
  function BorderStylePreviewIcon({ style }) {
40992
41018
  const isNone = style === "none";
40993
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41019
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
40994
41020
  "span",
40995
41021
  {
40996
41022
  "aria-hidden": "true",
@@ -41002,7 +41028,7 @@ function BorderStylePreviewIcon({ style }) {
41002
41028
  borderStyle: style,
41003
41029
  borderWidth: style === "double" ? 3 : 2
41004
41030
  },
41005
- children: isNone && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "absolute left-1/2 top-0 h-full w-px -translate-x-1/2 rotate-45 bg-muted-foreground/70" })
41031
+ children: isNone && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "absolute left-1/2 top-0 h-full w-px -translate-x-1/2 rotate-45 bg-muted-foreground/70" })
41006
41032
  }
41007
41033
  );
41008
41034
  }
@@ -41013,8 +41039,8 @@ function BorderPositionPreviewIcon({ position }) {
41013
41039
  const showLeft = position === "all" || position === "outer" || position === "left";
41014
41040
  const showHorizontal = position === "all" || position === "inner" || position === "horizontal";
41015
41041
  const showVertical = position === "all" || position === "inner" || position === "vertical";
41016
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-5 w-5 fill-none stroke-current", children: [
41017
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41042
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-5 w-5 fill-none stroke-current", children: [
41043
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41018
41044
  "path",
41019
41045
  {
41020
41046
  d: "M2 2H18V18H2Z M2 10H18 M10 2V18",
@@ -41024,12 +41050,12 @@ function BorderPositionPreviewIcon({ position }) {
41024
41050
  strokeWidth: "1.25"
41025
41051
  }
41026
41052
  ),
41027
- showTop && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { d: "M2 2H18", strokeWidth: "2" }),
41028
- showRight && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { d: "M18 2V18", strokeWidth: "2" }),
41029
- showBottom && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { d: "M2 18H18", strokeWidth: "2" }),
41030
- showLeft && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { d: "M2 2V18", strokeWidth: "2" }),
41031
- showHorizontal && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { d: "M2 10H18", strokeWidth: "2" }),
41032
- showVertical && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { d: "M10 2V18", strokeWidth: "2" })
41053
+ showTop && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M2 2H18", strokeWidth: "2" }),
41054
+ showRight && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M18 2V18", strokeWidth: "2" }),
41055
+ showBottom && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M2 18H18", strokeWidth: "2" }),
41056
+ showLeft && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M2 2V18", strokeWidth: "2" }),
41057
+ showHorizontal && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M2 10H18", strokeWidth: "2" }),
41058
+ showVertical && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M10 2V18", strokeWidth: "2" })
41033
41059
  ] });
41034
41060
  }
41035
41061
  function getBubbleMenuPosition({
@@ -41261,7 +41287,7 @@ var BubbleMenuContent = ({
41261
41287
  };
41262
41288
  }, [editor, showLinkInput]);
41263
41289
  if (showLinkInput) {
41264
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41290
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41265
41291
  LinkInput,
41266
41292
  {
41267
41293
  initialUrl: editor.getAttributes("link").href || "",
@@ -41281,12 +41307,12 @@ var BubbleMenuContent = ({
41281
41307
  const isTextPalette = activeColorPalette === "text";
41282
41308
  const isHighlightPalette = activeColorPalette === "highlight";
41283
41309
  if (activeColorPalette === "cell-border") {
41284
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex w-72 flex-col gap-2 p-2 text-sm", "data-ueditor-keep-open": true, children: [
41285
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "font-semibold text-xs text-muted-foreground uppercase tracking-wider mb-1", children: t("tableMenu.cellBorder") || "Cell Borders" }),
41286
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex gap-2", children: [
41287
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "min-w-0 flex-1", children: [
41288
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("label", { className: "mb-1 block text-xs text-muted-foreground", children: t("tableMenu.borderPosition") || "Border placement" }),
41289
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "grid grid-cols-5 gap-1", role: "group", "aria-label": t("tableMenu.borderPosition") || "Border placement", children: [
41310
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex w-72 flex-col gap-2 p-2 text-sm", "data-ueditor-keep-open": true, children: [
41311
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "font-semibold text-xs text-muted-foreground uppercase tracking-wider mb-1", children: t("tableMenu.cellBorder") || "Cell Borders" }),
41312
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex gap-2", children: [
41313
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "min-w-0 flex-1", children: [
41314
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "mb-1 block text-xs text-muted-foreground", children: t("tableMenu.borderPosition") || "Border placement" }),
41315
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "grid grid-cols-5 gap-1", role: "group", "aria-label": t("tableMenu.borderPosition") || "Border placement", children: [
41290
41316
  [
41291
41317
  ["all", "borderAll"],
41292
41318
  ["outer", "borderOuter"],
@@ -41299,7 +41325,7 @@ var BubbleMenuContent = ({
41299
41325
  ["left", "borderLeft"]
41300
41326
  ].map(([position, labelKey]) => {
41301
41327
  const label = t(`tableMenu.${labelKey}`) || position;
41302
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41328
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41303
41329
  "button",
41304
41330
  {
41305
41331
  type: "button",
@@ -41311,12 +41337,12 @@ var BubbleMenuContent = ({
41311
41337
  "inline-flex h-8 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted hover:text-primary",
41312
41338
  activeBorderPosition === position ? "bg-primary/10 text-primary" : "bg-muted/40"
41313
41339
  ),
41314
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(BorderPositionPreviewIcon, { position })
41340
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(BorderPositionPreviewIcon, { position })
41315
41341
  },
41316
41342
  position
41317
41343
  );
41318
41344
  }),
41319
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41345
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41320
41346
  "button",
41321
41347
  {
41322
41348
  type: "button",
@@ -41325,13 +41351,13 @@ var BubbleMenuContent = ({
41325
41351
  onMouseDown: (event) => event.preventDefault(),
41326
41352
  onClick: clearTableCellBorders,
41327
41353
  className: "inline-flex h-8 items-center justify-center rounded-md bg-muted/40 text-destructive transition-colors hover:bg-destructive/10",
41328
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(BorderStylePreviewIcon, { style: "none" })
41354
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(BorderStylePreviewIcon, { style: "none" })
41329
41355
  }
41330
41356
  )
41331
41357
  ] })
41332
41358
  ] }),
41333
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-1 border-l border-border pl-2 pt-5", role: "group", "aria-label": t("tableMenu.borderMode") || "Border mode", children: [
41334
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41359
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-1 border-l border-border pl-2 pt-5", role: "group", "aria-label": t("tableMenu.borderMode") || "Border mode", children: [
41360
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41335
41361
  "button",
41336
41362
  {
41337
41363
  type: "button",
@@ -41343,10 +41369,10 @@ var BubbleMenuContent = ({
41343
41369
  "inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:bg-muted",
41344
41370
  borderEditMode === "draw" ? "bg-primary/10 text-primary" : "text-muted-foreground"
41345
41371
  ),
41346
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Edit2, { className: "h-4 w-4" })
41372
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Edit2, { className: "h-4 w-4" })
41347
41373
  }
41348
41374
  ),
41349
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41375
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41350
41376
  "button",
41351
41377
  {
41352
41378
  type: "button",
@@ -41358,19 +41384,19 @@ var BubbleMenuContent = ({
41358
41384
  "inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:bg-muted",
41359
41385
  borderEditMode === "erase" ? "bg-destructive/10 text-destructive" : "text-muted-foreground"
41360
41386
  ),
41361
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Eraser, { className: "h-4 w-4" })
41387
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Eraser, { className: "h-4 w-4" })
41362
41388
  }
41363
41389
  )
41364
41390
  ] })
41365
41391
  ] }),
41366
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-1", children: [
41367
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("label", { className: "text-xs text-muted-foreground", children: t("tableMenu.borderStyle") || "Border Style" }),
41368
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "grid grid-cols-4 gap-1.5", role: "group", "aria-label": t("tableMenu.borderStyle") || "Border Style", children: [
41392
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-1", children: [
41393
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "text-xs text-muted-foreground", children: t("tableMenu.borderStyle") || "Border Style" }),
41394
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "grid grid-cols-4 gap-1.5", role: "group", "aria-label": t("tableMenu.borderStyle") || "Border Style", children: [
41369
41395
  ["solid", "Solid"],
41370
41396
  ["dashed", "Dashed"],
41371
41397
  ["dotted", "Dotted"],
41372
41398
  ["double", "Double"]
41373
- ].map(([style, label]) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41399
+ ].map(([style, label]) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41374
41400
  "button",
41375
41401
  {
41376
41402
  type: "button",
@@ -41381,16 +41407,16 @@ var BubbleMenuContent = ({
41381
41407
  borderStyleDraft === style ? "bg-primary/10 text-primary" : "bg-muted/40 text-foreground"
41382
41408
  ),
41383
41409
  children: [
41384
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(BorderStylePreviewIcon, { style }),
41385
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { children: label })
41410
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(BorderStylePreviewIcon, { style }),
41411
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: label })
41386
41412
  ]
41387
41413
  },
41388
41414
  style
41389
41415
  )) })
41390
41416
  ] }),
41391
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-1", children: [
41392
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("label", { className: "text-xs text-muted-foreground", children: t("tableMenu.borderWidth") || "Border Width" }),
41393
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "grid grid-cols-4 gap-1", role: "group", "aria-label": t("tableMenu.borderWidth") || "Border Width", children: ["1px", "2px", "3px", "4px"].map((width) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41417
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-1", children: [
41418
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "text-xs text-muted-foreground", children: t("tableMenu.borderWidth") || "Border Width" }),
41419
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "grid grid-cols-4 gap-1", role: "group", "aria-label": t("tableMenu.borderWidth") || "Border Width", children: ["1px", "2px", "3px", "4px"].map((width) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41394
41420
  "button",
41395
41421
  {
41396
41422
  type: "button",
@@ -41405,15 +41431,15 @@ var BubbleMenuContent = ({
41405
41431
  width
41406
41432
  )) })
41407
41433
  ] }),
41408
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41434
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41409
41435
  "button",
41410
41436
  {
41411
41437
  type: "button",
41412
41438
  onClick: () => setActiveColorPalette("cell-border-color"),
41413
41439
  className: "flex items-center justify-between w-full h-8 px-2 rounded-md border border-input hover:bg-accent text-xs",
41414
41440
  children: [
41415
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { children: t("tableMenu.borderColor") || "Border Color" }),
41416
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41441
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: t("tableMenu.borderColor") || "Border Color" }),
41442
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41417
41443
  "span",
41418
41444
  {
41419
41445
  className: "w-4 h-4 rounded-full border border-border",
@@ -41428,7 +41454,7 @@ var BubbleMenuContent = ({
41428
41454
  ] });
41429
41455
  }
41430
41456
  if (activeColorPalette === "cell-border-color") {
41431
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "w-56", "data-ueditor-keep-open": true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41457
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-56", "data-ueditor-keep-open": true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41432
41458
  EditorColorPalette,
41433
41459
  {
41434
41460
  colors: borderColors,
@@ -41438,7 +41464,7 @@ var BubbleMenuContent = ({
41438
41464
  }
41439
41465
  ) });
41440
41466
  }
41441
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "w-56", "data-ueditor-keep-open": true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41467
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-56", "data-ueditor-keep-open": true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41442
41468
  EditorColorPalette,
41443
41469
  {
41444
41470
  colors: isTextPalette ? textColors : highlightColors,
@@ -41450,32 +41476,32 @@ var BubbleMenuContent = ({
41450
41476
  ) });
41451
41477
  }
41452
41478
  if (isImageSelected) {
41453
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
41454
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "block"), active: imageLayout === "block", title: t("toolbar.imageLayoutBlock"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.AlignCenter, { className: "w-4 h-4" }) }),
41455
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "left"), active: imageLayout === "left", title: t("toolbar.imageLayoutLeft"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.AlignLeft, { className: "w-4 h-4" }) }),
41456
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "right"), active: imageLayout === "right", title: t("toolbar.imageLayoutRight"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.AlignRight, { className: "w-4 h-4" }) }),
41457
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41458
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "sm"), active: imageWidthPreset === "sm", title: t("toolbar.imageWidthSm"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-[10px] font-semibold", children: "S" }) }),
41459
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "md"), active: imageWidthPreset === "md", title: t("toolbar.imageWidthMd"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-[10px] font-semibold", children: "M" }) }),
41460
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "lg"), active: imageWidthPreset === "lg", title: t("toolbar.imageWidthLg"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-[10px] font-semibold", children: "L" }) }),
41461
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41462
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => resetImageSize(editor), title: t("toolbar.imageResetSize"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.RotateCcw, { className: "w-4 h-4" }) }),
41463
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41479
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
41480
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "block"), active: imageLayout === "block", title: t("toolbar.imageLayoutBlock"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.AlignCenter, { className: "w-4 h-4" }) }),
41481
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "left"), active: imageLayout === "left", title: t("toolbar.imageLayoutLeft"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.AlignLeft, { className: "w-4 h-4" }) }),
41482
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "right"), active: imageLayout === "right", title: t("toolbar.imageLayoutRight"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.AlignRight, { className: "w-4 h-4" }) }),
41483
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41484
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "sm"), active: imageWidthPreset === "sm", title: t("toolbar.imageWidthSm"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-[10px] font-semibold", children: "S" }) }),
41485
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "md"), active: imageWidthPreset === "md", title: t("toolbar.imageWidthMd"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-[10px] font-semibold", children: "M" }) }),
41486
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "lg"), active: imageWidthPreset === "lg", title: t("toolbar.imageWidthLg"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-[10px] font-semibold", children: "L" }) }),
41487
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41488
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => resetImageSize(editor), title: t("toolbar.imageResetSize"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.RotateCcw, { className: "w-4 h-4" }) }),
41489
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41464
41490
  ToolbarButton,
41465
41491
  {
41466
41492
  onClick: () => deleteSelectedImage(editor),
41467
41493
  title: t("toolbar.imageDelete"),
41468
41494
  className: "text-destructive hover:text-destructive",
41469
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Trash2, { className: "w-4 h-4" })
41495
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Trash2, { className: "w-4 h-4" })
41470
41496
  }
41471
41497
  )
41472
41498
  ] });
41473
41499
  }
41474
41500
  if (showFormulaPanel && isInTable3) {
41475
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "w-72 p-2", children: [
41476
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
41477
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("tableMenu.formula") || "Formula" }),
41478
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41501
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "w-72 p-2", children: [
41502
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
41503
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("tableMenu.formula") || "Formula" }),
41504
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41479
41505
  "button",
41480
41506
  {
41481
41507
  type: "button",
@@ -41488,7 +41514,7 @@ var BubbleMenuContent = ({
41488
41514
  }
41489
41515
  )
41490
41516
  ] }),
41491
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: cn("flex h-9 items-center overflow-hidden rounded-md bg-muted/40", formControlGroupOutlineClass), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41517
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: cn("flex h-9 items-center overflow-hidden rounded-md bg-muted/40", formControlGroupOutlineClass), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41492
41518
  "input",
41493
41519
  {
41494
41520
  value: formulaDraft,
@@ -41509,15 +41535,15 @@ var BubbleMenuContent = ({
41509
41535
  className: "h-full min-w-0 flex-1 bg-transparent px-2 text-sm font-medium text-foreground outline-none"
41510
41536
  }
41511
41537
  ) }),
41512
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "mt-2", children: [
41513
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "mb-1 px-1 text-[11px] font-medium text-muted-foreground", children: t("tableMenu.numberFormat") || "Number format" }),
41514
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "grid grid-cols-5 gap-1", children: [
41538
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "mt-2", children: [
41539
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "mb-1 px-1 text-[11px] font-medium text-muted-foreground", children: t("tableMenu.numberFormat") || "Number format" }),
41540
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "grid grid-cols-5 gap-1", children: [
41515
41541
  ["text", "Text"],
41516
41542
  ["number", "123"],
41517
41543
  ["currency", "$"],
41518
41544
  ["percent", "%"],
41519
41545
  ["date", "Date"]
41520
- ].map(([format, label]) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41546
+ ].map(([format, label]) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41521
41547
  "button",
41522
41548
  {
41523
41549
  type: "button",
@@ -41531,8 +41557,8 @@ var BubbleMenuContent = ({
41531
41557
  format
41532
41558
  )) })
41533
41559
  ] }),
41534
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "mt-2 grid grid-cols-3 gap-1", children: [
41535
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41560
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "mt-2 grid grid-cols-3 gap-1", children: [
41561
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41536
41562
  "button",
41537
41563
  {
41538
41564
  type: "button",
@@ -41545,7 +41571,7 @@ var BubbleMenuContent = ({
41545
41571
  children: t("tableMenu.apply") || "Apply"
41546
41572
  }
41547
41573
  ),
41548
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41574
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41549
41575
  "button",
41550
41576
  {
41551
41577
  type: "button",
@@ -41557,7 +41583,7 @@ var BubbleMenuContent = ({
41557
41583
  children: t("tableMenu.clear") || "Clear"
41558
41584
  }
41559
41585
  ),
41560
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41586
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41561
41587
  "button",
41562
41588
  {
41563
41589
  type: "button",
@@ -41570,10 +41596,10 @@ var BubbleMenuContent = ({
41570
41596
  ] });
41571
41597
  }
41572
41598
  if (showTypographyPanel) {
41573
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "w-72 p-2", children: [
41574
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
41575
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("toolbar.textStyle") }),
41576
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41599
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "w-72 p-2", children: [
41600
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
41601
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: t("toolbar.textStyle") }),
41602
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41577
41603
  "button",
41578
41604
  {
41579
41605
  type: "button",
@@ -41583,11 +41609,11 @@ var BubbleMenuContent = ({
41583
41609
  }
41584
41610
  )
41585
41611
  ] }),
41586
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "space-y-2", children: [
41587
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { children: [
41588
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "mb-1 px-1 text-[11px] font-medium text-muted-foreground", children: t("toolbar.fontSize") }),
41589
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: cn("flex h-9 items-center overflow-hidden rounded-md bg-muted/40", formControlGroupOutlineClass), children: [
41590
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41612
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "space-y-2", children: [
41613
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { children: [
41614
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "mb-1 px-1 text-[11px] font-medium text-muted-foreground", children: t("toolbar.fontSize") }),
41615
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: cn("flex h-9 items-center overflow-hidden rounded-md bg-muted/40", formControlGroupOutlineClass), children: [
41616
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41591
41617
  "input",
41592
41618
  {
41593
41619
  type: "number",
@@ -41611,8 +41637,8 @@ var BubbleMenuContent = ({
41611
41637
  className: "h-full min-w-0 flex-1 bg-transparent px-2 text-center text-sm font-semibold text-foreground outline-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
41612
41638
  }
41613
41639
  ),
41614
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "border-l border-border/50 px-2 text-[11px] text-muted-foreground", children: "px" }),
41615
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41640
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "border-l border-border/50 px-2 text-[11px] text-muted-foreground", children: "px" }),
41641
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41616
41642
  "button",
41617
41643
  {
41618
41644
  type: "button",
@@ -41622,12 +41648,12 @@ var BubbleMenuContent = ({
41622
41648
  "flex h-full w-9 items-center justify-center border-l border-border/50 transition-colors hover:bg-muted",
41623
41649
  showFontSizeOptions && "bg-primary/10 text-primary"
41624
41650
  ),
41625
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.ChevronDown, { className: "h-4 w-4" })
41651
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.ChevronDown, { className: "h-4 w-4" })
41626
41652
  }
41627
41653
  )
41628
41654
  ] }),
41629
- showFontSizeOptions && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "mt-1 grid grid-cols-4 gap-1", children: [
41630
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41655
+ showFontSizeOptions && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "mt-1 grid grid-cols-4 gap-1", children: [
41656
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41631
41657
  "button",
41632
41658
  {
41633
41659
  type: "button",
@@ -41642,7 +41668,7 @@ var BubbleMenuContent = ({
41642
41668
  children: "A"
41643
41669
  }
41644
41670
  ),
41645
- quickFontSizes.map((option) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41671
+ quickFontSizes.map((option) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41646
41672
  "button",
41647
41673
  {
41648
41674
  type: "button",
@@ -41660,10 +41686,10 @@ var BubbleMenuContent = ({
41660
41686
  ))
41661
41687
  ] })
41662
41688
  ] }),
41663
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { children: [
41664
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "mb-1 px-1 text-[11px] font-medium text-muted-foreground", children: t("toolbar.lineHeight") }),
41665
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "grid grid-cols-4 gap-1", children: [
41666
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41689
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { children: [
41690
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "mb-1 px-1 text-[11px] font-medium text-muted-foreground", children: t("toolbar.lineHeight") }),
41691
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "grid grid-cols-4 gap-1", children: [
41692
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41667
41693
  "button",
41668
41694
  {
41669
41695
  type: "button",
@@ -41675,7 +41701,7 @@ var BubbleMenuContent = ({
41675
41701
  children: "LH"
41676
41702
  }
41677
41703
  ),
41678
- quickLineHeights.map((option) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41704
+ quickLineHeights.map((option) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41679
41705
  "button",
41680
41706
  {
41681
41707
  type: "button",
@@ -41690,8 +41716,8 @@ var BubbleMenuContent = ({
41690
41716
  ))
41691
41717
  ] })
41692
41718
  ] }),
41693
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "grid grid-cols-2 gap-1 border-t border-border/40 pt-2", children: [
41694
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41719
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "grid grid-cols-2 gap-1 border-t border-border/40 pt-2", children: [
41720
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41695
41721
  "button",
41696
41722
  {
41697
41723
  type: "button",
@@ -41701,12 +41727,12 @@ var BubbleMenuContent = ({
41701
41727
  editor.isActive("subscript") ? "bg-primary/10 text-primary" : "bg-muted/40 text-foreground"
41702
41728
  ),
41703
41729
  children: [
41704
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Subscript, { className: "h-4 w-4" }),
41730
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Subscript, { className: "h-4 w-4" }),
41705
41731
  t("toolbar.subscript")
41706
41732
  ]
41707
41733
  }
41708
41734
  ),
41709
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41735
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41710
41736
  "button",
41711
41737
  {
41712
41738
  type: "button",
@@ -41716,7 +41742,7 @@ var BubbleMenuContent = ({
41716
41742
  editor.isActive("superscript") ? "bg-primary/10 text-primary" : "bg-muted/40 text-foreground"
41717
41743
  ),
41718
41744
  children: [
41719
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Superscript, { className: "h-4 w-4" }),
41745
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Superscript, { className: "h-4 w-4" }),
41720
41746
  t("toolbar.superscript")
41721
41747
  ]
41722
41748
  }
@@ -41725,20 +41751,20 @@ var BubbleMenuContent = ({
41725
41751
  ] })
41726
41752
  ] });
41727
41753
  }
41728
- const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? import_lucide_react54.AlignCenterVertical : currentCellVerticalAlign === "bottom" ? import_lucide_react54.AlignEndVertical : import_lucide_react54.AlignStartVertical;
41754
+ const VerticalAlignActiveIcon = currentCellVerticalAlign === "middle" ? TableVerticalAlignMiddleIcon : currentCellVerticalAlign === "bottom" ? TableVerticalAlignBottomIcon : TableVerticalAlignTopIcon;
41729
41755
  if (isTableCellSelection) {
41730
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center gap-0.5 p-1", "data-ueditor-cell-inspector": "", children: [
41731
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41756
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-0.5 p-1", "data-ueditor-cell-inspector": "", children: [
41757
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41732
41758
  ToolbarButton,
41733
41759
  {
41734
41760
  onMouseDown: () => onKeepOpenChange?.(true),
41735
41761
  onClick: () => setActiveColorPalette("cell-bg"),
41736
41762
  active: Boolean(currentCellBgColor),
41737
41763
  title: t("tableMenu.cellBackground") || "Cell background",
41738
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CellBgColorIcon, { color: currentCellBgColor })
41764
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(CellBgColorIcon, { color: currentCellBgColor })
41739
41765
  }
41740
41766
  ),
41741
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41767
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41742
41768
  ToolbarButton,
41743
41769
  {
41744
41770
  onMouseDown: () => onKeepOpenChange?.(true),
@@ -41747,7 +41773,7 @@ var BubbleMenuContent = ({
41747
41773
  editor.getAttributes("tableCell").borderColor || editor.getAttributes("tableHeader").borderColor || editor.getAttributes("tableCell").borderStyle || editor.getAttributes("tableHeader").borderStyle || editor.getAttributes("tableCell").borderWidth || editor.getAttributes("tableHeader").borderWidth
41748
41774
  ),
41749
41775
  title: t("tableMenu.cellBorder") || "Cell border",
41750
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41776
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41751
41777
  CellBorderIcon,
41752
41778
  {
41753
41779
  color: editor.getAttributes("tableCell").borderColor || editor.getAttributes("tableHeader").borderColor
@@ -41755,7 +41781,7 @@ var BubbleMenuContent = ({
41755
41781
  )
41756
41782
  }
41757
41783
  ),
41758
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41784
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41759
41785
  ToolbarButton,
41760
41786
  {
41761
41787
  onMouseDown: () => onKeepOpenChange?.(true),
@@ -41765,10 +41791,10 @@ var BubbleMenuContent = ({
41765
41791
  },
41766
41792
  active: Boolean(currentCellFormula),
41767
41793
  title: t("tableMenu.formula") || "Formula",
41768
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Sigma, { className: "w-4 h-4" })
41794
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Sigma, { className: "w-4 h-4" })
41769
41795
  }
41770
41796
  ),
41771
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41797
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41772
41798
  ToolbarButton,
41773
41799
  {
41774
41800
  onClick: () => {
@@ -41781,10 +41807,10 @@ var BubbleMenuContent = ({
41781
41807
  active: canSplitCell,
41782
41808
  disabled: !canMergeCells && !canSplitCell,
41783
41809
  title: canSplitCell ? t("tableMenu.splitCell") || "Split cell" : t("tableMenu.mergeCells") || "Merge cells",
41784
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.TableCellsMerge, { className: "w-4 h-4" })
41810
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.TableCellsMerge, { className: "w-4 h-4" })
41785
41811
  }
41786
41812
  ),
41787
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41813
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41788
41814
  ToolbarButton,
41789
41815
  {
41790
41816
  onClick: () => applyTableCellAttribute2(
@@ -41795,14 +41821,14 @@ var BubbleMenuContent = ({
41795
41821
  ),
41796
41822
  active: currentCellTextWrap !== "nowrap",
41797
41823
  title: currentCellTextWrap === "nowrap" ? t("tableMenu.wrapText") : t("tableMenu.noWrapText"),
41798
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.WrapText, { className: "h-4 w-4" })
41824
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.WrapText, { className: "h-4 w-4" })
41799
41825
  }
41800
41826
  ),
41801
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41827
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41802
41828
  DropdownMenu,
41803
41829
  {
41804
41830
  onOpenChange: onKeepOpenChange,
41805
- trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41831
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41806
41832
  ToolbarButton,
41807
41833
  {
41808
41834
  onMouseDown: () => onKeepOpenChange?.(true),
@@ -41810,34 +41836,34 @@ var BubbleMenuContent = ({
41810
41836
  },
41811
41837
  title: t("tableMenu.alignVertical") || "Vertical alignment",
41812
41838
  children: [
41813
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(VerticalAlignActiveIcon, { className: "w-4 h-4" }),
41814
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
41839
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(VerticalAlignActiveIcon, { className: "w-4 h-4" }),
41840
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
41815
41841
  ]
41816
41842
  }
41817
41843
  ),
41818
41844
  children: [
41819
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41845
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41820
41846
  DropdownMenuItem,
41821
41847
  {
41822
- icon: import_lucide_react54.AlignStartVertical,
41848
+ icon: TableVerticalAlignTopIcon,
41823
41849
  label: t("tableMenu.alignVerticalTop") || "Align top",
41824
41850
  onClick: () => applyTableCellAttribute2(editor, "verticalAlign", "top", { focus: false }),
41825
41851
  active: currentCellVerticalAlign === "top"
41826
41852
  }
41827
41853
  ),
41828
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41854
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41829
41855
  DropdownMenuItem,
41830
41856
  {
41831
- icon: import_lucide_react54.AlignCenterVertical,
41857
+ icon: TableVerticalAlignMiddleIcon,
41832
41858
  label: t("tableMenu.alignVerticalMiddle") || "Align middle",
41833
41859
  onClick: () => applyTableCellAttribute2(editor, "verticalAlign", "middle", { focus: false }),
41834
41860
  active: currentCellVerticalAlign === "middle"
41835
41861
  }
41836
41862
  ),
41837
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41863
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41838
41864
  DropdownMenuItem,
41839
41865
  {
41840
- icon: import_lucide_react54.AlignEndVertical,
41866
+ icon: TableVerticalAlignBottomIcon,
41841
41867
  label: t("tableMenu.alignVerticalBottom") || "Align bottom",
41842
41868
  onClick: () => applyTableCellAttribute2(editor, "verticalAlign", "bottom", { focus: false }),
41843
41869
  active: currentCellVerticalAlign === "bottom"
@@ -41846,11 +41872,11 @@ var BubbleMenuContent = ({
41846
41872
  ]
41847
41873
  }
41848
41874
  ),
41849
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41875
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41850
41876
  DropdownMenu,
41851
41877
  {
41852
41878
  onOpenChange: onKeepOpenChange,
41853
- trigger: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
41879
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
41854
41880
  ToolbarButton,
41855
41881
  {
41856
41882
  onMouseDown: () => onKeepOpenChange?.(true),
@@ -41858,13 +41884,13 @@ var BubbleMenuContent = ({
41858
41884
  },
41859
41885
  title: t("tableMenu.textDirection"),
41860
41886
  children: [
41861
- currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.ArrowRight, { className: "w-4 h-4" }),
41862
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
41887
+ currentCellTextDirection === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.ArrowDown, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.ArrowRight, { className: "w-4 h-4" }),
41888
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.ChevronDown, { className: "w-3 h-3" })
41863
41889
  ]
41864
41890
  }
41865
41891
  ),
41866
41892
  children: [
41867
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41893
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41868
41894
  DropdownMenuItem,
41869
41895
  {
41870
41896
  icon: import_lucide_react54.ArrowRight,
@@ -41873,7 +41899,7 @@ var BubbleMenuContent = ({
41873
41899
  active: currentCellTextDirection === "horizontal"
41874
41900
  }
41875
41901
  ),
41876
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41902
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41877
41903
  DropdownMenuItem,
41878
41904
  {
41879
41905
  icon: import_lucide_react54.ArrowDown,
@@ -41887,22 +41913,22 @@ var BubbleMenuContent = ({
41887
41913
  )
41888
41914
  ] });
41889
41915
  }
41890
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
41891
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Bold, { className: "w-4 h-4" }) }),
41892
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Italic, { className: "w-4 h-4" }) }),
41893
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41916
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
41917
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Bold, { className: "w-4 h-4" }) }),
41918
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Italic, { className: "w-4 h-4" }) }),
41919
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41894
41920
  ToolbarButton,
41895
41921
  {
41896
41922
  onClick: () => editor.chain().focus().toggleUnderline().run(),
41897
41923
  active: editor.isActive("underline"),
41898
41924
  title: t("toolbar.underline"),
41899
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Underline, { className: "w-4 h-4" })
41925
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Underline, { className: "w-4 h-4" })
41900
41926
  }
41901
41927
  ),
41902
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Strikethrough, { className: "w-4 h-4" }) }),
41903
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Code, { className: "w-4 h-4" }) }),
41904
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41905
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41928
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Strikethrough, { className: "w-4 h-4" }) }),
41929
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Code, { className: "w-4 h-4" }) }),
41930
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41931
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41906
41932
  ToolbarButton,
41907
41933
  {
41908
41934
  onMouseDown: () => {
@@ -41913,18 +41939,18 @@ var BubbleMenuContent = ({
41913
41939
  },
41914
41940
  active: editor.isActive("link"),
41915
41941
  title: t("toolbar.link"),
41916
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Link, { className: "w-4 h-4" })
41942
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Link, { className: "w-4 h-4" })
41917
41943
  }
41918
41944
  ),
41919
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => setActiveColorPalette("text"), title: t("colors.textColor"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TextColorIcon, { color: currentTextColor }) }),
41920
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: () => setActiveColorPalette("highlight"), active: editor.isActive("highlight"), title: t("colors.highlight"), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HighlightColorIcon, { color: currentHighlightColor }) }),
41921
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
41945
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => setActiveColorPalette("text"), title: t("colors.textColor"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TextColorIcon, { color: currentTextColor }) }),
41946
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: () => setActiveColorPalette("highlight"), active: editor.isActive("highlight"), title: t("colors.highlight"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(HighlightColorIcon, { color: currentHighlightColor }) }),
41947
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
41922
41948
  ToolbarButton,
41923
41949
  {
41924
41950
  onClick: () => setShowTypographyPanel(true),
41925
41951
  active: Boolean(currentFontSize || currentLineHeight || editor.isActive("subscript") || editor.isActive("superscript")),
41926
41952
  title: t("toolbar.textStyle"),
41927
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Type, { className: "w-4 h-4" })
41953
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Type, { className: "w-4 h-4" })
41928
41954
  }
41929
41955
  )
41930
41956
  ] });
@@ -41939,12 +41965,12 @@ var LinkPreviewContent = ({ editor, onEdit }) => {
41939
41965
  const handleUnlink = () => {
41940
41966
  editor.chain().focus().unsetLink().run();
41941
41967
  };
41942
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center gap-1 p-1 max-w-sm", children: [
41943
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-xs text-muted-foreground font-mono px-2 truncate max-w-45", children: url }),
41944
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41945
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: handleOpen, title: t("linkPreview.open") || "Open link", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.ExternalLink, { className: "w-4 h-4" }) }),
41946
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: onEdit, title: t("linkPreview.edit") || "Edit link", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Edit2, { className: "w-4 h-4" }) }),
41947
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToolbarButton, { onClick: handleUnlink, title: t("linkPreview.unlink") || "Remove link", className: "text-destructive hover:text-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react54.Unlink, { className: "w-4 h-4" }) })
41968
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-1 p-1 max-w-sm", children: [
41969
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-xs text-muted-foreground font-mono px-2 truncate max-w-45", children: url }),
41970
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
41971
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: handleOpen, title: t("linkPreview.open") || "Open link", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.ExternalLink, { className: "w-4 h-4" }) }),
41972
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: onEdit, title: t("linkPreview.edit") || "Edit link", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Edit2, { className: "w-4 h-4" }) }),
41973
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToolbarButton, { onClick: handleUnlink, title: t("linkPreview.unlink") || "Remove link", className: "text-destructive hover:text-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react54.Unlink, { className: "w-4 h-4" }) })
41948
41974
  ] });
41949
41975
  };
41950
41976
  var CustomBubbleMenu = ({
@@ -42139,7 +42165,7 @@ var CustomBubbleMenu = ({
42139
42165
  const context = getBubbleMenuContext(editor);
42140
42166
  if (context === "none") return null;
42141
42167
  return (0, import_react_dom8.createPortal)(
42142
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
42168
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
42143
42169
  "div",
42144
42170
  {
42145
42171
  ref: menuRef,
@@ -42163,7 +42189,7 @@ var CustomBubbleMenu = ({
42163
42189
  }
42164
42190
  e.preventDefault();
42165
42191
  },
42166
- children: context === "link" && !keepOpen && !linkInputOpen ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
42192
+ children: context === "link" && !keepOpen && !linkInputOpen ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
42167
42193
  LinkPreviewContent,
42168
42194
  {
42169
42195
  editor,
@@ -42172,7 +42198,7 @@ var CustomBubbleMenu = ({
42172
42198
  setKeepOpen(true);
42173
42199
  }
42174
42200
  }
42175
- ) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
42201
+ ) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
42176
42202
  BubbleMenuContent,
42177
42203
  {
42178
42204
  editor,
@@ -42237,7 +42263,7 @@ var CustomFloatingMenu = ({ editor }) => {
42237
42263
  }, [editor, editorWindow]);
42238
42264
  if (!isVisible || !portalContainer) return null;
42239
42265
  return (0, import_react_dom8.createPortal)(
42240
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
42266
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
42241
42267
  "div",
42242
42268
  {
42243
42269
  "data-popover": true,
@@ -42248,7 +42274,7 @@ var CustomFloatingMenu = ({ editor }) => {
42248
42274
  transform: "translate(-50%, -100%)"
42249
42275
  },
42250
42276
  onMouseDown: (e) => e.preventDefault(),
42251
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FloatingMenuContent, { editor })
42277
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(FloatingMenuContent, { editor })
42252
42278
  }
42253
42279
  ),
42254
42280
  portalContainer
@@ -42259,7 +42285,7 @@ var CustomFloatingMenu = ({ editor }) => {
42259
42285
  init_useSmartTranslations();
42260
42286
  var import_react80 = require("@tiptap/react");
42261
42287
  init_cn();
42262
- var import_jsx_runtime97 = require("react/jsx-runtime");
42288
+ var import_jsx_runtime98 = require("react/jsx-runtime");
42263
42289
  var CharacterCountDisplay = ({ editor, maxCharacters }) => {
42264
42290
  const t = useSmartTranslations("UEditor");
42265
42291
  const { characterCount, wordCount } = (0, import_react80.useEditorState)({
@@ -42273,18 +42299,18 @@ var CharacterCountDisplay = ({ editor, maxCharacters }) => {
42273
42299
  }
42274
42300
  });
42275
42301
  const percentage = maxCharacters ? Math.round(characterCount / maxCharacters * 100) : 0;
42276
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-3 px-3 py-2 text-xs text-muted-foreground border-t border-border/30 bg-muted/20", children: [
42277
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { children: [
42302
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-3 px-3 py-2 text-xs text-muted-foreground border-t border-border/30 bg-muted/20", children: [
42303
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { children: [
42278
42304
  wordCount,
42279
42305
  " ",
42280
42306
  t("words")
42281
42307
  ] }),
42282
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { children: [
42308
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { children: [
42283
42309
  characterCount,
42284
42310
  " ",
42285
42311
  t("characters")
42286
42312
  ] }),
42287
- maxCharacters && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: cn(percentage > 90 && "text-destructive", percentage > 100 && "font-bold"), children: [
42313
+ maxCharacters && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: cn(percentage > 90 && "text-destructive", percentage > 100 && "font-bold"), children: [
42288
42314
  characterCount,
42289
42315
  "/",
42290
42316
  maxCharacters
@@ -47258,7 +47284,7 @@ function buildTableHoverState({
47258
47284
  }
47259
47285
 
47260
47286
  // src/components/UEditor/table-drag-preview.tsx
47261
- var import_jsx_runtime98 = require("react/jsx-runtime");
47287
+ var import_jsx_runtime99 = require("react/jsx-runtime");
47262
47288
  function TableDragPreview({
47263
47289
  columnDragLabel,
47264
47290
  dragPreview,
@@ -47269,9 +47295,9 @@ function TableDragPreview({
47269
47295
  const expandPreviewWidth = dragPreview.kind === "add-column" ? layout.tableWidth + dragPreview.previewCols * layout.avgColumnWidth : layout.tableWidth;
47270
47296
  const expandPreviewHeight = dragPreview.kind === "add-row" ? layout.tableHeight + dragPreview.previewRows * layout.avgRowHeight : layout.tableHeight;
47271
47297
  const dragStatusText = dragPreview.kind === "row" ? `${rowDragLabel} ${dragPreview.originIndex + 1} -> ${dragPreview.targetIndex + 1}` : dragPreview.kind === "column" ? `${columnDragLabel} ${dragPreview.originIndex + 1} -> ${dragPreview.targetIndex + 1}` : dragPreview.kind === "add-row" ? `+${dragPreview.previewRows}R` : `+${dragPreview.previewCols}C`;
47272
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
47273
- dragPreview.kind === "row" && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
47274
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
47298
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
47299
+ dragPreview.kind === "row" && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
47300
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47275
47301
  "div",
47276
47302
  {
47277
47303
  "aria-hidden": "true",
@@ -47284,7 +47310,7 @@ function TableDragPreview({
47284
47310
  }
47285
47311
  }
47286
47312
  ),
47287
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
47313
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47288
47314
  "div",
47289
47315
  {
47290
47316
  "aria-hidden": "true",
@@ -47298,8 +47324,8 @@ function TableDragPreview({
47298
47324
  }
47299
47325
  )
47300
47326
  ] }),
47301
- dragPreview.kind === "column" && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
47302
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
47327
+ dragPreview.kind === "column" && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
47328
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47303
47329
  "div",
47304
47330
  {
47305
47331
  "aria-hidden": "true",
@@ -47312,7 +47338,7 @@ function TableDragPreview({
47312
47338
  }
47313
47339
  }
47314
47340
  ),
47315
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
47341
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47316
47342
  "div",
47317
47343
  {
47318
47344
  "aria-hidden": "true",
@@ -47326,7 +47352,7 @@ function TableDragPreview({
47326
47352
  }
47327
47353
  )
47328
47354
  ] }),
47329
- (dragPreview.kind === "add-row" || dragPreview.kind === "add-column") && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
47355
+ (dragPreview.kind === "add-row" || dragPreview.kind === "add-column") && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47330
47356
  "div",
47331
47357
  {
47332
47358
  "aria-hidden": "true",
@@ -47339,7 +47365,7 @@ function TableDragPreview({
47339
47365
  }
47340
47366
  }
47341
47367
  ),
47342
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
47368
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47343
47369
  "div",
47344
47370
  {
47345
47371
  role: "status",
@@ -47357,7 +47383,7 @@ function TableDragPreview({
47357
47383
  // src/components/UEditor/table-add-rails.tsx
47358
47384
  init_cn();
47359
47385
  init_Tooltip();
47360
- var import_jsx_runtime99 = require("react/jsx-runtime");
47386
+ var import_jsx_runtime100 = require("react/jsx-runtime");
47361
47387
  var ADD_COLUMN_RAIL_GAP = 4;
47362
47388
  var ADD_ROW_RAIL_GAP = 4;
47363
47389
  var BUTTON_LONG_SIZE = 36;
@@ -47382,13 +47408,13 @@ function TableAddRails({
47382
47408
  const rowRailLeft = visibleBounds.left + Math.max(0, (visibleBounds.width - BUTTON_LONG_SIZE) / 2);
47383
47409
  const showColumnRail = controlsVisible || addColumnVisible;
47384
47410
  const showRowRail = controlsVisible || addRowVisible;
47385
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
47386
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47411
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
47412
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47387
47413
  Tooltip,
47388
47414
  {
47389
47415
  placement: "right",
47390
- content: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-xs font-medium", children: quickAddColumnLabel }),
47391
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47416
+ content: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-xs font-medium", children: quickAddColumnLabel }),
47417
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47392
47418
  "button",
47393
47419
  {
47394
47420
  type: "button",
@@ -47416,17 +47442,17 @@ function TableAddRails({
47416
47442
  transform: showColumnRail ? "scale(1)" : "scale(0.85)",
47417
47443
  pointerEvents: showColumnRail ? "auto" : "none"
47418
47444
  },
47419
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-sm font-medium leading-none", children: "+" })
47445
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-sm font-medium leading-none", children: "+" })
47420
47446
  }
47421
47447
  )
47422
47448
  }
47423
47449
  ),
47424
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47450
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47425
47451
  Tooltip,
47426
47452
  {
47427
47453
  placement: "bottom",
47428
- content: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-xs font-medium", children: quickAddRowLabel }),
47429
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
47454
+ content: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-xs font-medium", children: quickAddRowLabel }),
47455
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47430
47456
  "button",
47431
47457
  {
47432
47458
  type: "button",
@@ -47452,7 +47478,7 @@ function TableAddRails({
47452
47478
  transform: showRowRail ? "scale(1)" : "scale(0.85)",
47453
47479
  pointerEvents: showRowRail ? "auto" : "none"
47454
47480
  },
47455
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-sm font-medium leading-none", children: "+" })
47481
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-sm font-medium leading-none", children: "+" })
47456
47482
  }
47457
47483
  )
47458
47484
  }
@@ -47465,7 +47491,7 @@ var import_lucide_react55 = require("lucide-react");
47465
47491
  init_cn();
47466
47492
  init_DropdownMenu();
47467
47493
  init_Tooltip();
47468
- var import_jsx_runtime100 = require("react/jsx-runtime");
47494
+ var import_jsx_runtime101 = require("react/jsx-runtime");
47469
47495
  function TableControlMenu({
47470
47496
  controlsVisible,
47471
47497
  isOpen,
@@ -47477,7 +47503,7 @@ function TableControlMenu({
47477
47503
  top
47478
47504
  }) {
47479
47505
  const shown = controlsVisible || menuVisible || isOpen;
47480
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47506
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47481
47507
  "div",
47482
47508
  {
47483
47509
  className: "absolute z-30",
@@ -47486,13 +47512,13 @@ function TableControlMenu({
47486
47512
  top,
47487
47513
  left
47488
47514
  },
47489
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47515
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47490
47516
  Tooltip,
47491
47517
  {
47492
47518
  placement: "top",
47493
47519
  disabled: isOpen,
47494
- content: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-xs font-medium", children: label }),
47495
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47520
+ content: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-xs font-medium", children: label }),
47521
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47496
47522
  DropdownMenu,
47497
47523
  {
47498
47524
  placement: "bottom-start",
@@ -47500,7 +47526,7 @@ function TableControlMenu({
47500
47526
  onOpenChange,
47501
47527
  contentClassName: "p-2",
47502
47528
  items,
47503
- trigger: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
47529
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47504
47530
  "button",
47505
47531
  {
47506
47532
  type: "button",
@@ -47516,7 +47542,7 @@ function TableControlMenu({
47516
47542
  transform: shown ? "scale(1)" : "scale(0.82)",
47517
47543
  pointerEvents: shown ? "auto" : "none"
47518
47544
  },
47519
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react55.MoreHorizontal, { "aria-hidden": "true", className: "h-4 w-4" })
47545
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react55.MoreHorizontal, { "aria-hidden": "true", className: "h-4 w-4" })
47520
47546
  }
47521
47547
  )
47522
47548
  }
@@ -47532,7 +47558,7 @@ var import_lucide_react56 = require("lucide-react");
47532
47558
  init_cn();
47533
47559
  init_DropdownMenu();
47534
47560
  init_Tooltip();
47535
- var import_jsx_runtime101 = require("react/jsx-runtime");
47561
+ var import_jsx_runtime102 = require("react/jsx-runtime");
47536
47562
  var IDLE_HANDLE_SCALE = "0.78";
47537
47563
  function TableRowHandles({
47538
47564
  activeRowIndex,
@@ -47547,12 +47573,12 @@ function TableRowHandles({
47547
47573
  rowHandleLeft,
47548
47574
  rowHandles
47549
47575
  }) {
47550
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_jsx_runtime101.Fragment, { children: rowHandles.map((rowHandle) => {
47576
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_jsx_runtime102.Fragment, { children: rowHandles.map((rowHandle) => {
47551
47577
  const menuKey = `row:${rowHandle.index}`;
47552
47578
  const isActive = rowHandle.index === activeRowIndex;
47553
47579
  const visible = controlsVisible || hoverRowHandleIndex === rowHandle.index || openMenuKey === menuKey;
47554
47580
  const isShown = visible || isActive;
47555
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47581
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47556
47582
  "div",
47557
47583
  {
47558
47584
  className: "absolute z-30",
@@ -47562,13 +47588,13 @@ function TableRowHandles({
47562
47588
  left: rowHandleLeft,
47563
47589
  pointerEvents: visible ? "auto" : "none"
47564
47590
  },
47565
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47591
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47566
47592
  Tooltip,
47567
47593
  {
47568
47594
  placement: "right",
47569
47595
  disabled: openMenuKey === menuKey || !visible && isActive,
47570
- content: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-xs font-medium", children: `${rowDragLabel} ${rowHandle.index + 1}` }),
47571
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47596
+ content: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "text-xs font-medium", children: `${rowDragLabel} ${rowHandle.index + 1}` }),
47597
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47572
47598
  DropdownMenu,
47573
47599
  {
47574
47600
  placement: "right",
@@ -47576,7 +47602,7 @@ function TableRowHandles({
47576
47602
  onOpenChange: (open) => onOpenMenuChange(menuKey, open),
47577
47603
  contentClassName: "p-2",
47578
47604
  items: getMenuItems(rowHandle),
47579
- trigger: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47605
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47580
47606
  "button",
47581
47607
  {
47582
47608
  type: "button",
@@ -47601,7 +47627,7 @@ function TableRowHandles({
47601
47627
  // selection near the first character of a table cell.
47602
47628
  pointerEvents: visible ? "auto" : "none"
47603
47629
  },
47604
- children: visible ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react56.GripVertical, { "aria-hidden": "true", className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "h-3 w-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
47630
+ children: visible ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react56.GripVertical, { "aria-hidden": "true", className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "h-3 w-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
47605
47631
  }
47606
47632
  )
47607
47633
  }
@@ -47626,12 +47652,12 @@ function TableColumnHandles({
47626
47652
  onStartDrag,
47627
47653
  openMenuKey
47628
47654
  }) {
47629
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_jsx_runtime101.Fragment, { children: columnHandles.map((columnHandle) => {
47655
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_jsx_runtime102.Fragment, { children: columnHandles.map((columnHandle) => {
47630
47656
  const menuKey = `column:${columnHandle.index}`;
47631
47657
  const isActive = columnHandle.index === activeColumnIndex;
47632
47658
  const visible = controlsVisible || hoverColumnHandleIndex === columnHandle.index || openMenuKey === menuKey;
47633
47659
  const isShown = visible || isActive;
47634
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47660
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47635
47661
  "div",
47636
47662
  {
47637
47663
  className: "absolute z-30",
@@ -47641,13 +47667,13 @@ function TableColumnHandles({
47641
47667
  left: Math.max(8, columnHandle.center - 12),
47642
47668
  pointerEvents: visible ? "auto" : "none"
47643
47669
  },
47644
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47670
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47645
47671
  Tooltip,
47646
47672
  {
47647
47673
  placement: "top",
47648
47674
  disabled: openMenuKey === menuKey || !visible && isActive,
47649
- content: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-xs font-medium", children: `${columnDragLabel} ${columnHandle.index + 1}` }),
47650
- children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47675
+ content: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "text-xs font-medium", children: `${columnDragLabel} ${columnHandle.index + 1}` }),
47676
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47651
47677
  DropdownMenu,
47652
47678
  {
47653
47679
  placement: "bottom-start",
@@ -47655,7 +47681,7 @@ function TableColumnHandles({
47655
47681
  onOpenChange: (open) => onOpenMenuChange(menuKey, open),
47656
47682
  contentClassName: "p-2",
47657
47683
  items: getMenuItems(columnHandle),
47658
- trigger: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
47684
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47659
47685
  "button",
47660
47686
  {
47661
47687
  type: "button",
@@ -47677,7 +47703,7 @@ function TableColumnHandles({
47677
47703
  transform: isShown ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`,
47678
47704
  pointerEvents: visible ? "auto" : "none"
47679
47705
  },
47680
- children: visible ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react56.GripHorizontal, { "aria-hidden": "true", className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "h-1 w-3 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
47706
+ children: visible ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react56.GripHorizontal, { "aria-hidden": "true", className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "h-1 w-3 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
47681
47707
  }
47682
47708
  )
47683
47709
  }
@@ -47694,7 +47720,7 @@ function TableColumnHandles({
47694
47720
  var import_lucide_react57 = require("lucide-react");
47695
47721
  init_cn();
47696
47722
  init_table_width_model();
47697
- var import_jsx_runtime102 = require("react/jsx-runtime");
47723
+ var import_jsx_runtime103 = require("react/jsx-runtime");
47698
47724
  var EDGE_HANDLE_CLASS = cn(
47699
47725
  "pointer-events-auto absolute top-0 z-10 h-full w-2 touch-none cursor-col-resize bg-transparent p-0",
47700
47726
  "border-transparent transition-colors duration-150 hover:border-primary",
@@ -47727,7 +47753,7 @@ function TableResizeHandles({
47727
47753
  onStartResize,
47728
47754
  resizeBothLabel
47729
47755
  }) {
47730
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
47756
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
47731
47757
  "div",
47732
47758
  {
47733
47759
  ref: frameRef,
@@ -47744,8 +47770,8 @@ function TableResizeHandles({
47744
47770
  height: layout.tableHeight
47745
47771
  },
47746
47772
  children: [
47747
- layout.widthMode === "responsive" ? /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
47748
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47773
+ layout.widthMode === "responsive" ? /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_jsx_runtime103.Fragment, { children: [
47774
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
47749
47775
  "button",
47750
47776
  {
47751
47777
  type: "button",
@@ -47760,7 +47786,7 @@ function TableResizeHandles({
47760
47786
  onKeyDown: (event) => onKeyboardResize(event, "left")
47761
47787
  }
47762
47788
  ),
47763
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47789
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
47764
47790
  "button",
47765
47791
  {
47766
47792
  type: "button",
@@ -47776,7 +47802,7 @@ function TableResizeHandles({
47776
47802
  }
47777
47803
  )
47778
47804
  ] }) : null,
47779
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47805
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
47780
47806
  "button",
47781
47807
  {
47782
47808
  type: "button",
@@ -47794,10 +47820,10 @@ function TableResizeHandles({
47794
47820
  },
47795
47821
  onPointerDown: (event) => onStartResize(event, "both"),
47796
47822
  onKeyDown: (event) => onKeyboardResize(event, "both"),
47797
- children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react57.MoveDiagonal2, { "aria-hidden": "true", className: "h-3.5 w-3.5", strokeWidth: 2.25 })
47823
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react57.MoveDiagonal2, { "aria-hidden": "true", className: "h-3.5 w-3.5", strokeWidth: 2.25 })
47798
47824
  }
47799
47825
  ),
47800
- active ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
47826
+ active ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
47801
47827
  "span",
47802
47828
  {
47803
47829
  role: "status",
@@ -48051,7 +48077,7 @@ function applyTableSize(editor, snapshot, dimensions, options = {}) {
48051
48077
  // src/components/UEditor/table-controls.tsx
48052
48078
  init_table_width_model();
48053
48079
  init_table_formula_references();
48054
- var import_jsx_runtime103 = require("react/jsx-runtime");
48080
+ var import_jsx_runtime104 = require("react/jsx-runtime");
48055
48081
  var TABLE_MENU_TOP_OFFSET = 10;
48056
48082
  var AXIS_HANDLE_RADIUS = 12;
48057
48083
  function clamp9(value, min, max) {
@@ -48919,8 +48945,8 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
48919
48945
  const menuLeft = Math.max(8, layout.tableLeft);
48920
48946
  const rowHandleLeft = layout.tableLeft - AXIS_HANDLE_RADIUS;
48921
48947
  const columnHandleTop = layout.tableTop - AXIS_HANDLE_RADIUS;
48922
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_jsx_runtime103.Fragment, { children: [
48923
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
48948
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
48949
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
48924
48950
  TableRowHandles,
48925
48951
  {
48926
48952
  activeRowIndex: layout.activeRowIndex,
@@ -48938,7 +48964,7 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
48938
48964
  rowHandles: layout.rowHandles
48939
48965
  }
48940
48966
  ),
48941
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
48967
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
48942
48968
  TableColumnHandles,
48943
48969
  {
48944
48970
  activeColumnIndex: layout.activeColumnIndex,
@@ -48956,7 +48982,7 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
48956
48982
  openMenuKey
48957
48983
  }
48958
48984
  ),
48959
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
48985
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
48960
48986
  TableControlMenu,
48961
48987
  {
48962
48988
  controlsVisible,
@@ -48971,7 +48997,7 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
48971
48997
  top: menuTop
48972
48998
  }
48973
48999
  ),
48974
- dragPreview === null && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
49000
+ dragPreview === null && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
48975
49001
  TableResizeHandles,
48976
49002
  {
48977
49003
  active: tableResizeActive,
@@ -48984,7 +49010,7 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
48984
49010
  resizeBothLabel: t("tableMenu.resizeBoth")
48985
49011
  }
48986
49012
  ),
48987
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
49013
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
48988
49014
  TableAddRails,
48989
49015
  {
48990
49016
  addColumnVisible: hoverState.addColumnVisible,
@@ -49000,7 +49026,7 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
49000
49026
  quickAddRowLabel: t("tableMenu.quickAddRowAfter")
49001
49027
  }
49002
49028
  ),
49003
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
49029
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
49004
49030
  TableDragPreview,
49005
49031
  {
49006
49032
  columnDragLabel: t("tableMenu.dragColumn"),
@@ -50034,7 +50060,7 @@ var import_lucide_react59 = require("lucide-react");
50034
50060
  init_useSmartTranslations();
50035
50061
  init_table_dom_utils();
50036
50062
  init_form_control_size();
50037
- var import_jsx_runtime104 = require("react/jsx-runtime");
50063
+ var import_jsx_runtime105 = require("react/jsx-runtime");
50038
50064
  function TableFormulaBar({ editor }) {
50039
50065
  const t = useSmartTranslations("UEditor");
50040
50066
  const inputRef = (0, import_react85.useRef)(null);
@@ -50097,7 +50123,7 @@ function TableFormulaBar({ editor }) {
50097
50123
  if (!editor.isDestroyed) editor.commands.focus();
50098
50124
  }, 0);
50099
50125
  };
50100
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
50126
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
50101
50127
  "div",
50102
50128
  {
50103
50129
  "data-ueditor-formula-bar": "",
@@ -50105,7 +50131,7 @@ function TableFormulaBar({ editor }) {
50105
50131
  "aria-label": t("tableMenu.formulaBar"),
50106
50132
  className: "flex min-h-10 items-center gap-2 border-b border-border/60 bg-muted/25 px-2 py-1.5",
50107
50133
  children: [
50108
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
50134
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
50109
50135
  "span",
50110
50136
  {
50111
50137
  "data-ueditor-formula-cell-label": "",
@@ -50113,8 +50139,8 @@ function TableFormulaBar({ editor }) {
50113
50139
  children: selectedCell.label
50114
50140
  }
50115
50141
  ),
50116
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react59.Sigma, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-primary" }),
50117
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
50142
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react59.Sigma, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-primary" }),
50143
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
50118
50144
  "input",
50119
50145
  {
50120
50146
  ref: inputRef,
@@ -50135,18 +50161,18 @@ function TableFormulaBar({ editor }) {
50135
50161
  className: `h-7 min-w-0 flex-1 rounded-md bg-background px-2 font-mono text-sm text-foreground ${formControlOutlineClass}`
50136
50162
  }
50137
50163
  ),
50138
- selectedCell.formulaState === "error" && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
50164
+ selectedCell.formulaState === "error" && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
50139
50165
  "span",
50140
50166
  {
50141
50167
  role: "status",
50142
50168
  className: "hidden shrink-0 items-center gap-1 text-xs font-medium text-destructive sm:inline-flex",
50143
50169
  children: [
50144
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react59.AlertCircle, { "aria-hidden": "true", className: "h-3.5 w-3.5" }),
50170
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react59.AlertCircle, { "aria-hidden": "true", className: "h-3.5 w-3.5" }),
50145
50171
  t("tableMenu.formulaError")
50146
50172
  ]
50147
50173
  }
50148
50174
  ),
50149
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
50175
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
50150
50176
  "button",
50151
50177
  {
50152
50178
  type: "button",
@@ -50154,10 +50180,10 @@ function TableFormulaBar({ editor }) {
50154
50180
  "aria-label": t("tableMenu.apply"),
50155
50181
  title: t("tableMenu.apply"),
50156
50182
  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",
50157
- children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react59.Check, { "aria-hidden": "true", className: "h-4 w-4" })
50183
+ children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react59.Check, { "aria-hidden": "true", className: "h-4 w-4" })
50158
50184
  }
50159
50185
  ),
50160
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
50186
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
50161
50187
  "button",
50162
50188
  {
50163
50189
  type: "button",
@@ -50168,10 +50194,10 @@ function TableFormulaBar({ editor }) {
50168
50194
  "aria-label": t("tableMenu.convertToValue"),
50169
50195
  title: t("tableMenu.convertToValue"),
50170
50196
  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",
50171
- children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react59.Hash, { "aria-hidden": "true", className: "h-4 w-4" })
50197
+ children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react59.Hash, { "aria-hidden": "true", className: "h-4 w-4" })
50172
50198
  }
50173
50199
  ),
50174
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
50200
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
50175
50201
  "button",
50176
50202
  {
50177
50203
  type: "button",
@@ -50182,7 +50208,7 @@ function TableFormulaBar({ editor }) {
50182
50208
  "aria-label": t("tableMenu.clearCell"),
50183
50209
  title: t("tableMenu.clearCell"),
50184
50210
  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",
50185
- children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react59.Trash2, { "aria-hidden": "true", className: "h-4 w-4" })
50211
+ children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react59.Trash2, { "aria-hidden": "true", className: "h-4 w-4" })
50186
50212
  }
50187
50213
  )
50188
50214
  ]
@@ -50266,7 +50292,7 @@ function useUEditorOutput({
50266
50292
 
50267
50293
  // src/components/UEditor/UEditor.tsx
50268
50294
  init_portal_context();
50269
- var import_jsx_runtime106 = require("react/jsx-runtime");
50295
+ var import_jsx_runtime107 = require("react/jsx-runtime");
50270
50296
  var LazyMenuBar = import_react88.default.lazy(async () => {
50271
50297
  const { MenuBar: MenuBar2 } = await Promise.resolve().then(() => (init_menu_bar(), menu_bar_exports));
50272
50298
  return { default: MenuBar2 };
@@ -50582,7 +50608,7 @@ var UEditor = import_react88.default.forwardRef(({
50582
50608
  }
50583
50609
  }, [content, editor]);
50584
50610
  if (!editor) {
50585
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(UEditorPortalProvider, { getPortalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50611
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(UEditorPortalProvider, { getPortalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50586
50612
  "div",
50587
50613
  {
50588
50614
  role: "status",
@@ -50593,7 +50619,7 @@ var UEditor = import_react88.default.forwardRef(({
50593
50619
  }
50594
50620
  ) });
50595
50621
  }
50596
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(UEditorPortalProvider, { getPortalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { "data-ueditor-width-boundary": "", className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
50622
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(UEditorPortalProvider, { getPortalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { "data-ueditor-width-boundary": "", className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
50597
50623
  "div",
50598
50624
  {
50599
50625
  className: cn(
@@ -50609,8 +50635,8 @@ var UEditor = import_react88.default.forwardRef(({
50609
50635
  className
50610
50636
  ),
50611
50637
  children: [
50612
- editable && (showMenuBar || showToolbar || showBubbleMenu) ? /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(EditorUiRenderStateProvider, { editor, children: [
50613
- isMenuBarVisible && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react88.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50638
+ editable && (showMenuBar || showToolbar || showBubbleMenu) ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(EditorUiRenderStateProvider, { editor, children: [
50639
+ isMenuBarVisible && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_react88.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50614
50640
  LazyMenuBar,
50615
50641
  {
50616
50642
  editor,
@@ -50628,7 +50654,7 @@ var UEditor = import_react88.default.forwardRef(({
50628
50654
  showPreviewButton
50629
50655
  }
50630
50656
  ) }),
50631
- showToolbar && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50657
+ showToolbar && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50632
50658
  EditorToolbar,
50633
50659
  {
50634
50660
  editor,
@@ -50648,8 +50674,8 @@ var UEditor = import_react88.default.forwardRef(({
50648
50674
  letterSpacings
50649
50675
  }
50650
50676
  ),
50651
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(TableFormulaBar, { editor }),
50652
- showBubbleMenu && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50677
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TableFormulaBar, { editor }),
50678
+ showBubbleMenu && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50653
50679
  CustomBubbleMenu,
50654
50680
  {
50655
50681
  editor,
@@ -50658,9 +50684,9 @@ var UEditor = import_react88.default.forwardRef(({
50658
50684
  lineHeights
50659
50685
  }
50660
50686
  )
50661
- ] }) : editable ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(TableFormulaBar, { editor }) : null,
50662
- editable && showFloatingMenu && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CustomFloatingMenu, { editor }),
50663
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
50687
+ ] }) : editable ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TableFormulaBar, { editor }) : null,
50688
+ editable && showFloatingMenu && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(CustomFloatingMenu, { editor }),
50689
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
50664
50690
  "div",
50665
50691
  {
50666
50692
  ref: (node) => {
@@ -50678,7 +50704,7 @@ var UEditor = import_react88.default.forwardRef(({
50678
50704
  "--ueditor-table-cell-padding-x": `${resolvedTableCellHorizontalPadding}px`
50679
50705
  },
50680
50706
  children: [
50681
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50707
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50682
50708
  "span",
50683
50709
  {
50684
50710
  ref: tableColumnGuideRef,
@@ -50686,7 +50712,7 @@ var UEditor = import_react88.default.forwardRef(({
50686
50712
  className: "pointer-events-none absolute z-20 bg-primary/50 opacity-0 transition-opacity duration-200 delay-100 ease-out"
50687
50713
  }
50688
50714
  ),
50689
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50715
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50690
50716
  "span",
50691
50717
  {
50692
50718
  ref: tableRowGuideRef,
@@ -50694,7 +50720,7 @@ var UEditor = import_react88.default.forwardRef(({
50694
50720
  className: "pointer-events-none absolute z-20 bg-primary/50 opacity-0 transition-opacity duration-200 delay-100 ease-out"
50695
50721
  }
50696
50722
  ),
50697
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50723
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50698
50724
  "span",
50699
50725
  {
50700
50726
  ref: activeTableCellHighlightRef,
@@ -50703,7 +50729,7 @@ var UEditor = import_react88.default.forwardRef(({
50703
50729
  className: "pointer-events-none hidden absolute z-20 rounded-[2px] border border-primary/50 bg-primary/5"
50704
50730
  }
50705
50731
  ),
50706
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50732
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50707
50733
  "div",
50708
50734
  {
50709
50735
  ref: formulaCoordinateOverlayRef,
@@ -50711,7 +50737,7 @@ var UEditor = import_react88.default.forwardRef(({
50711
50737
  className: "pointer-events-none absolute inset-0 z-[35] hidden overflow-visible"
50712
50738
  }
50713
50739
  ),
50714
- formulaRangeHighlight && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50740
+ formulaRangeHighlight && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50715
50741
  "span",
50716
50742
  {
50717
50743
  "aria-hidden": "true",
@@ -50729,7 +50755,7 @@ var UEditor = import_react88.default.forwardRef(({
50729
50755
  }
50730
50756
  }
50731
50757
  ),
50732
- editable && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50758
+ editable && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50733
50759
  TableControls,
50734
50760
  {
50735
50761
  editor,
@@ -50737,7 +50763,7 @@ var UEditor = import_react88.default.forwardRef(({
50737
50763
  showCellInspector: showBubbleMenu
50738
50764
  }
50739
50765
  ),
50740
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
50766
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
50741
50767
  import_react89.EditorContent,
50742
50768
  {
50743
50769
  editor,
@@ -50747,7 +50773,7 @@ var UEditor = import_react88.default.forwardRef(({
50747
50773
  ]
50748
50774
  }
50749
50775
  ),
50750
- showFooter && showCharacterCount && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CharacterCountDisplay, { editor, maxCharacters })
50776
+ showFooter && showCharacterCount && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(CharacterCountDisplay, { editor, maxCharacters })
50751
50777
  ]
50752
50778
  }
50753
50779
  ) }) });