@underverse-ui/underverse 2.0.13 → 2.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -3787,6 +3787,8 @@ declare const underverseMessages: {
3787
3787
  imageWidthLg: string;
3788
3788
  imageResetSize: string;
3789
3789
  imageDelete: string;
3790
+ hideMenuBar: string;
3791
+ showMenuBar: string;
3790
3792
  };
3791
3793
  slashCommand: {
3792
3794
  basicBlocks: string;
@@ -4238,6 +4240,8 @@ declare const underverseMessages: {
4238
4240
  imageWidthLg: string;
4239
4241
  imageResetSize: string;
4240
4242
  imageDelete: string;
4243
+ hideMenuBar: string;
4244
+ showMenuBar: string;
4241
4245
  };
4242
4246
  slashCommand: {
4243
4247
  basicBlocks: string;
@@ -4689,6 +4693,8 @@ declare const underverseMessages: {
4689
4693
  imageWidthLg: string;
4690
4694
  imageResetSize: string;
4691
4695
  imageDelete: string;
4696
+ hideMenuBar: string;
4697
+ showMenuBar: string;
4692
4698
  };
4693
4699
  slashCommand: {
4694
4700
  basicBlocks: string;
@@ -5140,6 +5146,8 @@ declare const underverseMessages: {
5140
5146
  imageWidthLg: string;
5141
5147
  imageResetSize: string;
5142
5148
  imageDelete: string;
5149
+ hideMenuBar: string;
5150
+ showMenuBar: string;
5143
5151
  };
5144
5152
  slashCommand: {
5145
5153
  basicBlocks: string;
@@ -5594,6 +5602,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5594
5602
  imageWidthLg: string;
5595
5603
  imageResetSize: string;
5596
5604
  imageDelete: string;
5605
+ hideMenuBar: string;
5606
+ showMenuBar: string;
5597
5607
  };
5598
5608
  slashCommand: {
5599
5609
  basicBlocks: string;
@@ -6044,6 +6054,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6044
6054
  imageWidthLg: string;
6045
6055
  imageResetSize: string;
6046
6056
  imageDelete: string;
6057
+ hideMenuBar: string;
6058
+ showMenuBar: string;
6047
6059
  };
6048
6060
  slashCommand: {
6049
6061
  basicBlocks: string;
@@ -6494,6 +6506,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6494
6506
  imageWidthLg: string;
6495
6507
  imageResetSize: string;
6496
6508
  imageDelete: string;
6509
+ hideMenuBar: string;
6510
+ showMenuBar: string;
6497
6511
  };
6498
6512
  slashCommand: {
6499
6513
  basicBlocks: string;
@@ -6944,6 +6958,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6944
6958
  imageWidthLg: string;
6945
6959
  imageResetSize: string;
6946
6960
  imageDelete: string;
6961
+ hideMenuBar: string;
6962
+ showMenuBar: string;
6947
6963
  };
6948
6964
  slashCommand: {
6949
6965
  basicBlocks: string;
package/dist/index.d.ts CHANGED
@@ -3787,6 +3787,8 @@ declare const underverseMessages: {
3787
3787
  imageWidthLg: string;
3788
3788
  imageResetSize: string;
3789
3789
  imageDelete: string;
3790
+ hideMenuBar: string;
3791
+ showMenuBar: string;
3790
3792
  };
3791
3793
  slashCommand: {
3792
3794
  basicBlocks: string;
@@ -4238,6 +4240,8 @@ declare const underverseMessages: {
4238
4240
  imageWidthLg: string;
4239
4241
  imageResetSize: string;
4240
4242
  imageDelete: string;
4243
+ hideMenuBar: string;
4244
+ showMenuBar: string;
4241
4245
  };
4242
4246
  slashCommand: {
4243
4247
  basicBlocks: string;
@@ -4689,6 +4693,8 @@ declare const underverseMessages: {
4689
4693
  imageWidthLg: string;
4690
4694
  imageResetSize: string;
4691
4695
  imageDelete: string;
4696
+ hideMenuBar: string;
4697
+ showMenuBar: string;
4692
4698
  };
4693
4699
  slashCommand: {
4694
4700
  basicBlocks: string;
@@ -5140,6 +5146,8 @@ declare const underverseMessages: {
5140
5146
  imageWidthLg: string;
5141
5147
  imageResetSize: string;
5142
5148
  imageDelete: string;
5149
+ hideMenuBar: string;
5150
+ showMenuBar: string;
5143
5151
  };
5144
5152
  slashCommand: {
5145
5153
  basicBlocks: string;
@@ -5594,6 +5602,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5594
5602
  imageWidthLg: string;
5595
5603
  imageResetSize: string;
5596
5604
  imageDelete: string;
5605
+ hideMenuBar: string;
5606
+ showMenuBar: string;
5597
5607
  };
5598
5608
  slashCommand: {
5599
5609
  basicBlocks: string;
@@ -6044,6 +6054,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6044
6054
  imageWidthLg: string;
6045
6055
  imageResetSize: string;
6046
6056
  imageDelete: string;
6057
+ hideMenuBar: string;
6058
+ showMenuBar: string;
6047
6059
  };
6048
6060
  slashCommand: {
6049
6061
  basicBlocks: string;
@@ -6494,6 +6506,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6494
6506
  imageWidthLg: string;
6495
6507
  imageResetSize: string;
6496
6508
  imageDelete: string;
6509
+ hideMenuBar: string;
6510
+ showMenuBar: string;
6497
6511
  };
6498
6512
  slashCommand: {
6499
6513
  basicBlocks: string;
@@ -6944,6 +6958,8 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6944
6958
  imageWidthLg: string;
6945
6959
  imageResetSize: string;
6946
6960
  imageDelete: string;
6961
+ hideMenuBar: string;
6962
+ showMenuBar: string;
6947
6963
  };
6948
6964
  slashCommand: {
6949
6965
  basicBlocks: string;
package/dist/index.js CHANGED
@@ -4,19 +4,19 @@ import {
4
4
  extractImageSrcsFromHtml,
5
5
  normalizeImageUrl,
6
6
  prepareUEditorContentForSave
7
- } from "./chunk-WDY3QWOW.js";
7
+ } from "./chunk-PDYEK7HL.js";
8
8
  import {
9
9
  EmojiPicker_default
10
- } from "./chunk-HEYNAGQD.js";
10
+ } from "./chunk-N2S6RI4Y.js";
11
11
  import {
12
12
  getEmojiImageUrl,
13
13
  getEmojiUnifiedCode,
14
14
  setEmojiBaseUrl
15
- } from "./chunk-VNSCI3OK.js";
15
+ } from "./chunk-DXLSCUYA.js";
16
16
  import "./chunk-4TYW5K4J.js";
17
17
  import {
18
18
  Modal_default
19
- } from "./chunk-R7ZKNCWR.js";
19
+ } from "./chunk-DCFQGH3K.js";
20
20
  import {
21
21
  DropdownMenuItem,
22
22
  DropdownMenuSeparator,
@@ -31,7 +31,7 @@ import {
31
31
  shadcnAnimationStyles,
32
32
  useShadCNAnimations,
33
33
  useUnderverseUIConfig
34
- } from "./chunk-MMMCBJ2L.js";
34
+ } from "./chunk-3Q5EE2ZA.js";
35
35
  import {
36
36
  ForceInternalTranslationsProvider,
37
37
  NextIntlAdapter,
@@ -57,7 +57,7 @@ import {
57
57
  useUnderverseLocale,
58
58
  useUnderverseTranslations,
59
59
  vi_default
60
- } from "./chunk-PYC5EY5W.js";
60
+ } from "./chunk-PV2G2XME.js";
61
61
  import {
62
62
  __export,
63
63
  __require
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Modal_default
4
- } from "./chunk-R7ZKNCWR.js";
4
+ } from "./chunk-DCFQGH3K.js";
5
5
  import {
6
6
  DEFAULT_TABLE_ROW_HEIGHT,
7
7
  DEFAULT_UEDITOR_IMAGE_MAX_FILE_SIZE,
@@ -21,11 +21,11 @@ import {
21
21
  sanitizeUEditorUrl,
22
22
  useDropdownMenuClose,
23
23
  useSharedEditorUiRenderState
24
- } from "./chunk-MMMCBJ2L.js";
24
+ } from "./chunk-3Q5EE2ZA.js";
25
25
  import {
26
26
  cn,
27
27
  useSmartTranslations
28
- } from "./chunk-PYC5EY5W.js";
28
+ } from "./chunk-PV2G2XME.js";
29
29
  import "./chunk-NSBPE2FW.js";
30
30
 
31
31
  // src/components/UEditor/menu-bar.tsx
@@ -945,4 +945,4 @@ var MenuBar = ({
945
945
  export {
946
946
  MenuBar
947
947
  };
948
- //# sourceMappingURL=menu-bar-SVX36W4S.js.map
948
+ //# sourceMappingURL=menu-bar-55SAOAX6.js.map
package/dist/ueditor.cjs CHANGED
@@ -223,7 +223,9 @@ var init_en = __esm({
223
223
  imageWidthMd: "Image Width Medium",
224
224
  imageWidthLg: "Image Width Large",
225
225
  imageResetSize: "Reset Image Size",
226
- imageDelete: "Delete Image"
226
+ imageDelete: "Delete Image",
227
+ hideMenuBar: "Hide menu bar",
228
+ showMenuBar: "Show menu bar"
227
229
  },
228
230
  slashCommand: {
229
231
  basicBlocks: "Basic Blocks",
@@ -681,7 +683,9 @@ var init_vi = __esm({
681
683
  imageWidthMd: "\u1EA2nh V\u1EEBa",
682
684
  imageWidthLg: "\u1EA2nh L\u1EDBn",
683
685
  imageResetSize: "\u0110\u1EB7t L\u1EA1i K\xEDch Th\u01B0\u1EDBc \u1EA2nh",
684
- imageDelete: "X\xF3a \u1EA2nh"
686
+ imageDelete: "X\xF3a \u1EA2nh",
687
+ hideMenuBar: "\u1EA8n thanh menu",
688
+ showMenuBar: "Hi\u1EC7n thanh menu"
685
689
  },
686
690
  slashCommand: {
687
691
  basicBlocks: "Kh\u1ED1i c\u01A1 b\u1EA3n",
@@ -1139,7 +1143,9 @@ var init_ko = __esm({
1139
1143
  imageWidthMd: "\uC911\uAC04 \uC774\uBBF8\uC9C0",
1140
1144
  imageWidthLg: "\uD070 \uC774\uBBF8\uC9C0",
1141
1145
  imageResetSize: "\uC774\uBBF8\uC9C0 \uD06C\uAE30 \uCD08\uAE30\uD654",
1142
- imageDelete: "\uC774\uBBF8\uC9C0 \uC0AD\uC81C"
1146
+ imageDelete: "\uC774\uBBF8\uC9C0 \uC0AD\uC81C",
1147
+ hideMenuBar: "\uBA54\uB274 \uBAA8\uC74C \uC228\uAE30\uAE30",
1148
+ showMenuBar: "\uBA54\uB274 \uBAA8\uC74C \uD45C\uC2DC"
1143
1149
  },
1144
1150
  slashCommand: {
1145
1151
  basicBlocks: "\uAE30\uBCF8 \uBE14\uB85D",
@@ -1597,7 +1603,9 @@ var init_ja = __esm({
1597
1603
  imageWidthMd: "\u753B\u50CF\uFF08\u4E2D\uFF09",
1598
1604
  imageWidthLg: "\u753B\u50CF\uFF08\u5927\uFF09",
1599
1605
  imageResetSize: "\u753B\u50CF\u30B5\u30A4\u30BA\u3092\u30EA\u30BB\u30C3\u30C8",
1600
- imageDelete: "\u753B\u50CF\u3092\u524A\u9664"
1606
+ imageDelete: "\u753B\u50CF\u3092\u524A\u9664",
1607
+ hideMenuBar: "\u30E1\u30CB\u30E5\u30FC\u30D0\u30FC\u3092\u975E\u8868\u793A",
1608
+ showMenuBar: "\u30E1\u30CB\u30E5\u30FC\u30D0\u30FC\u3092\u8868\u793A"
1601
1609
  },
1602
1610
  slashCommand: {
1603
1611
  basicBlocks: "\u57FA\u672C\u30D6\u30ED\u30C3\u30AF",
@@ -6967,6 +6975,8 @@ var init_toolbar = __esm({
6967
6975
  EditorToolbar = ({
6968
6976
  editor,
6969
6977
  variant,
6978
+ isMenuBarVisible,
6979
+ onToggleMenuBar,
6970
6980
  uploadImage,
6971
6981
  imageInsertMode = "base64",
6972
6982
  maxImageFileSize = DEFAULT_UEDITOR_IMAGE_MAX_FILE_SIZE,
@@ -7141,6 +7151,15 @@ var init_toolbar = __esm({
7141
7151
  )
7142
7152
  ] })
7143
7153
  }
7154
+ ),
7155
+ onToggleMenuBar && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7156
+ ToolbarButton,
7157
+ {
7158
+ onClick: onToggleMenuBar,
7159
+ active: isMenuBarVisible,
7160
+ title: t(isMenuBarVisible ? "toolbar.hideMenuBar" : "toolbar.showMenuBar"),
7161
+ children: isMenuBarVisible ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.PanelTopOpen, { className: "h-4 w-4" })
7162
+ }
7144
7163
  )
7145
7164
  ] });
7146
7165
  }
@@ -7149,7 +7168,7 @@ var init_toolbar = __esm({
7149
7168
  "div",
7150
7169
  {
7151
7170
  role: "toolbar",
7152
- className: "flex min-h-9 flex-nowrap items-center gap-0.5 overflow-x-auto border-b border-[rgba(196,197,213,0.6)] bg-[#F4F4F4] px-1.5 py-1 dark:bg-muted/60",
7171
+ 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",
7153
7172
  children: [
7154
7173
  isFull && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7155
7174
  DropdownMenu,
@@ -7864,7 +7883,16 @@ var init_toolbar = __esm({
7864
7883
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.TableCellsMerge, { className: "w-4 h-4" })
7865
7884
  }
7866
7885
  )
7867
- ] })
7886
+ ] }),
7887
+ onToggleMenuBar && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
7888
+ ToolbarButton,
7889
+ {
7890
+ onClick: onToggleMenuBar,
7891
+ active: isMenuBarVisible,
7892
+ title: t(isMenuBarVisible ? "toolbar.hideMenuBar" : "toolbar.showMenuBar"),
7893
+ children: isMenuBarVisible ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.PanelTopClose, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.PanelTopOpen, { className: "h-4 w-4" })
7894
+ }
7895
+ )
7868
7896
  ]
7869
7897
  }
7870
7898
  );
@@ -23659,6 +23687,10 @@ var UEditor = import_react44.default.forwardRef(({
23659
23687
  const formulaRangePickRef = (0, import_react44.useRef)(null);
23660
23688
  const formulaRangeSurfaceRef = (0, import_react44.useRef)(null);
23661
23689
  const [formulaRangeHighlight, setFormulaRangeHighlight] = import_react44.default.useState(null);
23690
+ const [isMenuBarVisible, setIsMenuBarVisible] = import_react44.default.useState(showMenuBar);
23691
+ (0, import_react44.useEffect)(() => {
23692
+ setIsMenuBarVisible(showMenuBar);
23693
+ }, [showMenuBar]);
23662
23694
  const { flushOutputUpdates, scheduleOutputUpdate } = useUEditorOutput({
23663
23695
  onChange,
23664
23696
  onHtmlChange,
@@ -23917,7 +23949,7 @@ var UEditor = import_react44.default.forwardRef(({
23917
23949
  ),
23918
23950
  children: [
23919
23951
  editable && (showMenuBar || showToolbar || showBubbleMenu) ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(EditorUiRenderStateProvider, { editor, children: [
23920
- showMenuBar && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react44.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
23952
+ isMenuBarVisible && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react44.default.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
23921
23953
  LazyMenuBar,
23922
23954
  {
23923
23955
  editor,
@@ -23938,6 +23970,8 @@ var UEditor = import_react44.default.forwardRef(({
23938
23970
  {
23939
23971
  editor,
23940
23972
  variant,
23973
+ isMenuBarVisible,
23974
+ onToggleMenuBar: () => setIsMenuBarVisible((visible) => !visible),
23941
23975
  uploadImage,
23942
23976
  imageInsertMode,
23943
23977
  maxImageFileSize,