@underverse-ui/underverse 2.0.32 → 2.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EmojiGridButton,
3
3
  formatEmojiCountLabel
4
- } from "./chunk-5W63IHIN.js";
4
+ } from "./chunk-W3QTP2DM.js";
5
5
  import {
6
6
  COLUMN_RESIZE_LINE_THICKNESS,
7
7
  CellBgColorIcon,
@@ -94,7 +94,7 @@ import {
94
94
  sanitizeUEditorUrl,
95
95
  useEditorColors,
96
96
  useSharedEditorUiRenderState
97
- } from "./chunk-4TXHZS3S.js";
97
+ } from "./chunk-OTPC2OTQ.js";
98
98
  import {
99
99
  Tooltip,
100
100
  UEditorPortalProvider,
@@ -104,7 +104,7 @@ import {
104
104
  resolveUEditorPortalContainer,
105
105
  useSmartTranslations,
106
106
  useUEditorPortalContainerGetter
107
- } from "./chunk-ZP7F4ZD7.js";
107
+ } from "./chunk-6FAHXNDQ.js";
108
108
 
109
109
  // src/components/UEditor/prepare-content-for-save.ts
110
110
  var MIME_EXTENSION_MAP = {
@@ -557,7 +557,7 @@ import { NodeViewWrapper, NodeViewContent } from "@tiptap/react";
557
557
  import React from "react";
558
558
  import { jsx } from "react/jsx-runtime";
559
559
  var LazyBaseEmojiPicker = React.lazy(async () => {
560
- const { EmojiPicker: EmojiPicker2 } = await import("./EmojiPicker-ISJ6RXYG.js");
560
+ const { EmojiPicker: EmojiPicker2 } = await import("./EmojiPicker-6H52Q4YE.js");
561
561
  return { default: EmojiPicker2 };
562
562
  });
563
563
  var EmojiPicker = ({ onSelect }) => {
@@ -11545,6 +11545,7 @@ import {
11545
11545
  ArrowRight as ArrowRight2,
11546
11546
  ArrowUp,
11547
11547
  Copy as Copy2,
11548
+ Minimize2,
11548
11549
  Paintbrush,
11549
11550
  Table as TableIcon,
11550
11551
  Trash2 as Trash22
@@ -13024,8 +13025,8 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
13024
13025
  updateTableResizePreview(pendingDimensions);
13025
13026
  setDocumentCursor(editorDocument, edge === "both" ? "nwse-resize" : "ew-resize");
13026
13027
  }, [editor, editorDocument, updateTableResizePreview]);
13027
- const fitTableToEditorWidth = React11.useCallback((event) => {
13028
- if (event.button !== 0 || dragStateRef.current) return;
13028
+ const fitTableToEditorWidth = React11.useCallback(() => {
13029
+ if (dragStateRef.current) return;
13029
13030
  const activeLayout = layoutRef.current;
13030
13031
  if (!activeLayout) return;
13031
13032
  const snapshot = createTableSizeSnapshot(
@@ -13036,8 +13037,6 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
13036
13037
  activeLayout.viewportWidth
13037
13038
  );
13038
13039
  if (!snapshot) return;
13039
- event.preventDefault();
13040
- event.stopPropagation();
13041
13040
  const didResize = applyTableSize(editor, snapshot, {
13042
13041
  width: Math.round(activeLayout.viewportWidth),
13043
13042
  height: snapshot.startHeight,
@@ -13425,6 +13424,11 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
13425
13424
  icon: Paintbrush,
13426
13425
  onClick: openCellInspector
13427
13426
  }] : [],
13427
+ {
13428
+ label: t("tableMenu.fitToEditorWidth"),
13429
+ icon: Minimize2,
13430
+ onClick: fitTableToEditorWidth
13431
+ },
13428
13432
  {
13429
13433
  label: t("tableMenu.alignLeft"),
13430
13434
  icon: AlignLeft2,
@@ -13489,7 +13493,7 @@ function TableControls({ editor, containerRef, showCellInspector = true }) {
13489
13493
  destructive: true
13490
13494
  }
13491
13495
  ];
13492
- }, [editor, layout, openCellInspector, runAtActiveCell, showCellInspector, t]);
13496
+ }, [editor, fitTableToEditorWidth, layout, openCellInspector, runAtActiveCell, showCellInspector, t]);
13493
13497
  const getRowHandleMenuItems = React11.useCallback((rowHandle) => [
13494
13498
  {
13495
13499
  label: t("tableMenu.addRowBefore"),
@@ -14949,7 +14953,7 @@ function useWideTableLayout(editor, enabled, widthBoundaryRef, editorShellRef, e
14949
14953
  // src/components/UEditor/UEditor.tsx
14950
14954
  import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
14951
14955
  var LazyMenuBar = React17.lazy(async () => {
14952
- const { MenuBar } = await import("./menu-bar-GDDGHNNJ.js");
14956
+ const { MenuBar } = await import("./menu-bar-HZBBRX42.js");
14953
14957
  return { default: MenuBar };
14954
14958
  });
14955
14959
  var UEditor = React17.forwardRef(({
@@ -15444,4 +15448,4 @@ export {
15444
15448
  prepareUEditorContentForSave,
15445
15449
  UEditor_default
15446
15450
  };
15447
- //# sourceMappingURL=chunk-C4KZOMP3.js.map
15451
+ //# sourceMappingURL=chunk-FQVWYDKP.js.map