@underverse-ui/underverse 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 257,
6
6
  "exports": [
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  EmojiPicker,
4
4
  EmojiPicker_default
5
- } from "./chunk-K5PVUTXH.js";
6
- import "./chunk-KKASHK7A.js";
5
+ } from "./chunk-HEYNAGQD.js";
6
+ import "./chunk-VNSCI3OK.js";
7
7
  import "./chunk-4TYW5K4J.js";
8
- import "./chunk-CKG2QLQL.js";
8
+ import "./chunk-PYC5EY5W.js";
9
9
  import "./chunk-NSBPE2FW.js";
10
10
  export {
11
11
  EmojiPicker,
12
12
  EmojiPicker_default as default
13
13
  };
14
- //# sourceMappingURL=EmojiPicker-RPB24XXJ.js.map
14
+ //# sourceMappingURL=EmojiPicker-FFNIUMI3.js.map
@@ -9,7 +9,7 @@ import {
9
9
  mergeRefs,
10
10
  setRefValue,
11
11
  useSmartTranslations
12
- } from "./chunk-CKG2QLQL.js";
12
+ } from "./chunk-PYC5EY5W.js";
13
13
 
14
14
  // src/contexts/UnderverseConfigContext.tsx
15
15
  import * as React from "react";
@@ -4515,4 +4515,4 @@ export {
4515
4515
  EditorToolbar,
4516
4516
  UEDITOR_PROSEMIRROR_CLASS_NAME
4517
4517
  };
4518
- //# sourceMappingURL=chunk-VDIAFUIE.js.map
4518
+ //# sourceMappingURL=chunk-EVS5YWTO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EmojiGridButton
3
- } from "./chunk-KKASHK7A.js";
3
+ } from "./chunk-VNSCI3OK.js";
4
4
  import {
5
5
  EMOJI_LIST
6
6
  } from "./chunk-4TYW5K4J.js";
@@ -9,7 +9,7 @@ import {
9
9
  cn,
10
10
  formControlOutlineClass,
11
11
  useSmartTranslations
12
- } from "./chunk-CKG2QLQL.js";
12
+ } from "./chunk-PYC5EY5W.js";
13
13
 
14
14
  // src/components/EmojiPicker.tsx
15
15
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -205,4 +205,4 @@ export {
205
205
  EmojiPicker,
206
206
  EmojiPicker_default
207
207
  };
208
- //# sourceMappingURL=chunk-K5PVUTXH.js.map
208
+ //# sourceMappingURL=chunk-HEYNAGQD.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EmojiGridButton,
3
3
  formatEmojiCountLabel
4
- } from "./chunk-KKASHK7A.js";
4
+ } from "./chunk-VNSCI3OK.js";
5
5
  import {
6
6
  COLUMN_RESIZE_LINE_THICKNESS,
7
7
  CellBgColorIcon,
@@ -53,14 +53,14 @@ import {
53
53
  sanitizeUEditorUrl,
54
54
  useEditorColors,
55
55
  useSharedEditorUiRenderState
56
- } from "./chunk-VDIAFUIE.js";
56
+ } from "./chunk-EVS5YWTO.js";
57
57
  import {
58
58
  Tooltip,
59
59
  cn,
60
60
  formControlGroupOutlineClass,
61
61
  formControlOutlineClass,
62
62
  useSmartTranslations
63
- } from "./chunk-CKG2QLQL.js";
63
+ } from "./chunk-PYC5EY5W.js";
64
64
 
65
65
  // src/components/UEditor/prepare-content-for-save.ts
66
66
  var MIME_EXTENSION_MAP = {
@@ -510,7 +510,7 @@ import { NodeViewWrapper, NodeViewContent } from "@tiptap/react";
510
510
  import React from "react";
511
511
  import { jsx } from "react/jsx-runtime";
512
512
  var LazyBaseEmojiPicker = React.lazy(async () => {
513
- const { EmojiPicker: EmojiPicker2 } = await import("./EmojiPicker-RPB24XXJ.js");
513
+ const { EmojiPicker: EmojiPicker2 } = await import("./EmojiPicker-FFNIUMI3.js");
514
514
  return { default: EmojiPicker2 };
515
515
  });
516
516
  var EmojiPicker = ({ onSelect }) => {
@@ -5648,8 +5648,11 @@ function buildUEditorExtensions({
5648
5648
  placeholder,
5649
5649
  emptyEditorClass: "is-editor-empty",
5650
5650
  emptyNodeClass: "is-empty",
5651
- shouldShow: ({ node, hasTable }) => {
5651
+ shouldShow: ({ editor, node, hasTable, isEmptyDoc }) => {
5652
5652
  const nodeName = node.type.name;
5653
+ if (!isEmptyDoc || editor.state.doc.childCount !== 1) {
5654
+ return false;
5655
+ }
5653
5656
  if (nodeName === "table" || nodeName === "tableCell" || nodeName === "tableHeader") {
5654
5657
  return false;
5655
5658
  }
@@ -14305,7 +14308,7 @@ function useUEditorOutput({
14305
14308
  // src/components/UEditor/UEditor.tsx
14306
14309
  import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
14307
14310
  var LazyMenuBar = React15.lazy(async () => {
14308
- const { MenuBar } = await import("./menu-bar-R5ZFI2ST.js");
14311
+ const { MenuBar } = await import("./menu-bar-JSXW6AXW.js");
14309
14312
  return { default: MenuBar };
14310
14313
  });
14311
14314
  var UEditor = React15.forwardRef(({
@@ -14344,6 +14347,7 @@ var UEditor = React15.forwardRef(({
14344
14347
  uploadFileForSave,
14345
14348
  extraExtensions,
14346
14349
  showMenuBar = false,
14350
+ showPreviewButton = true,
14347
14351
  onSave,
14348
14352
  onExport,
14349
14353
  onSourceCode,
@@ -14629,7 +14633,8 @@ var UEditor = React15.forwardRef(({
14629
14633
  onSave,
14630
14634
  onExport,
14631
14635
  onSourceCode,
14632
- onPreview
14636
+ onPreview,
14637
+ showPreviewButton
14633
14638
  }
14634
14639
  ) }),
14635
14640
  showToolbar && /* @__PURE__ */ jsx20(
@@ -14755,4 +14760,4 @@ export {
14755
14760
  prepareUEditorContentForSave,
14756
14761
  UEditor_default
14757
14762
  };
14758
- //# sourceMappingURL=chunk-WNVGXH5Y.js.map
14763
+ //# sourceMappingURL=chunk-P2RLTURA.js.map