@underverse-ui/underverse 1.0.148 → 1.0.149

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.js CHANGED
@@ -36277,8 +36277,7 @@ import {
36277
36277
  Trash2 as Trash25,
36278
36278
  Underline as UnderlineIcon3,
36279
36279
  Undo as UndoIcon2,
36280
- Upload as Upload4,
36281
- X as X19
36280
+ Upload as Upload4
36282
36281
  } from "lucide-react";
36283
36282
  import { Fragment as Fragment35, jsx as jsx92, jsxs as jsxs77 } from "react/jsx-runtime";
36284
36283
  function MenuTableInsertGrid({
@@ -36776,14 +36775,6 @@ var MenuBar = ({
36776
36775
  }
36777
36776
  openPreviewDialog();
36778
36777
  };
36779
- React81.useEffect(() => {
36780
- if (!showPreviewDialog) return void 0;
36781
- const previousOverflow = document.body.style.overflow;
36782
- document.body.style.overflow = "hidden";
36783
- return () => {
36784
- document.body.style.overflow = previousOverflow;
36785
- };
36786
- }, [showPreviewDialog]);
36787
36778
  const applySourceHtml = () => {
36788
36779
  editor.chain().focus().setContent(sourceHtml).run();
36789
36780
  setShowSourceDialog(false);
@@ -37001,38 +36992,33 @@ var MenuBar = ({
37001
36992
  ] })
37002
36993
  }
37003
36994
  ),
37004
- showPreviewDialog && /* @__PURE__ */ jsxs77("div", { className: "fixed inset-0 z-9999 flex flex-col bg-background text-foreground", children: [
37005
- /* @__PURE__ */ jsxs77("div", { className: "flex shrink-0 items-center justify-between border-b border-border bg-card px-4 py-3", children: [
37006
- /* @__PURE__ */ jsx92("h2", { className: "text-base font-semibold", children: t("menubar.preview") }),
37007
- /* @__PURE__ */ jsx92(
37008
- "button",
36995
+ /* @__PURE__ */ jsx92(
36996
+ Modal_default,
36997
+ {
36998
+ isOpen: showPreviewDialog,
36999
+ onClose: () => setShowPreviewDialog(false),
37000
+ title: t("menubar.preview"),
37001
+ size: "full",
37002
+ width: "min(1180px, calc(100vw - 2rem))",
37003
+ height: "min(860px, calc(100vh - 2rem))",
37004
+ className: "flex flex-col overflow-hidden rounded-xl md:rounded-2xl",
37005
+ contentClassName: "flex min-h-0 flex-1 overflow-hidden p-0",
37006
+ children: /* @__PURE__ */ jsx92(
37007
+ "div",
37009
37008
  {
37010
- type: "button",
37011
- onClick: () => setShowPreviewDialog(false),
37012
- "aria-label": t("menubar.closeDialog"),
37013
- className: cn(
37014
- "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",
37015
- "hover:bg-accent hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1"
37016
- ),
37017
- children: /* @__PURE__ */ jsx92(X19, { className: "h-4 w-4", "aria-hidden": "true" })
37009
+ "data-testid": "preview-content",
37010
+ className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-4 md:px-8",
37011
+ children: editor.isEmpty ? /* @__PURE__ */ jsx92("p", { className: "text-muted-foreground text-sm", children: t("menubar.previewEmpty") }) : /* @__PURE__ */ jsx92(
37012
+ "div",
37013
+ {
37014
+ className: UEDITOR_PROSEMIRROR_CLASS_NAME,
37015
+ dangerouslySetInnerHTML: { __html: editor.getHTML() }
37016
+ }
37017
+ )
37018
37018
  }
37019
37019
  )
37020
- ] }),
37021
- /* @__PURE__ */ jsx92(
37022
- "div",
37023
- {
37024
- "data-testid": "preview-content",
37025
- className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-4 md:px-8",
37026
- children: editor.isEmpty ? /* @__PURE__ */ jsx92("p", { className: "text-muted-foreground text-sm", children: t("menubar.previewEmpty") }) : /* @__PURE__ */ jsx92(
37027
- "div",
37028
- {
37029
- className: UEDITOR_PROSEMIRROR_CLASS_NAME,
37030
- dangerouslySetInnerHTML: { __html: editor.getHTML() }
37031
- }
37032
- )
37033
- }
37034
- )
37035
- ] })
37020
+ }
37021
+ )
37036
37022
  ] });
37037
37023
  };
37038
37024