@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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "1.0.148",
3
+ "version": "1.0.149",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 232,
6
6
  "exports": [
package/dist/index.cjs CHANGED
@@ -36832,14 +36832,6 @@ var MenuBar = ({
36832
36832
  }
36833
36833
  openPreviewDialog();
36834
36834
  };
36835
- import_react67.default.useEffect(() => {
36836
- if (!showPreviewDialog) return void 0;
36837
- const previousOverflow = document.body.style.overflow;
36838
- document.body.style.overflow = "hidden";
36839
- return () => {
36840
- document.body.style.overflow = previousOverflow;
36841
- };
36842
- }, [showPreviewDialog]);
36843
36835
  const applySourceHtml = () => {
36844
36836
  editor.chain().focus().setContent(sourceHtml).run();
36845
36837
  setShowSourceDialog(false);
@@ -37057,38 +37049,33 @@ var MenuBar = ({
37057
37049
  ] })
37058
37050
  }
37059
37051
  ),
37060
- showPreviewDialog && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "fixed inset-0 z-9999 flex flex-col bg-background text-foreground", children: [
37061
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex shrink-0 items-center justify-between border-b border-border bg-card px-4 py-3", children: [
37062
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("h2", { className: "text-base font-semibold", children: t("menubar.preview") }),
37063
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
37064
- "button",
37052
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
37053
+ Modal_default,
37054
+ {
37055
+ isOpen: showPreviewDialog,
37056
+ onClose: () => setShowPreviewDialog(false),
37057
+ title: t("menubar.preview"),
37058
+ size: "full",
37059
+ width: "min(1180px, calc(100vw - 2rem))",
37060
+ height: "min(860px, calc(100vh - 2rem))",
37061
+ className: "flex flex-col overflow-hidden rounded-xl md:rounded-2xl",
37062
+ contentClassName: "flex min-h-0 flex-1 overflow-hidden p-0",
37063
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
37064
+ "div",
37065
37065
  {
37066
- type: "button",
37067
- onClick: () => setShowPreviewDialog(false),
37068
- "aria-label": t("menubar.closeDialog"),
37069
- className: cn(
37070
- "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors",
37071
- "hover:bg-accent hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1"
37072
- ),
37073
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react53.X, { className: "h-4 w-4", "aria-hidden": "true" })
37066
+ "data-testid": "preview-content",
37067
+ className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-4 md:px-8",
37068
+ children: editor.isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-muted-foreground text-sm", children: t("menubar.previewEmpty") }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
37069
+ "div",
37070
+ {
37071
+ className: UEDITOR_PROSEMIRROR_CLASS_NAME,
37072
+ dangerouslySetInnerHTML: { __html: editor.getHTML() }
37073
+ }
37074
+ )
37074
37075
  }
37075
37076
  )
37076
- ] }),
37077
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
37078
- "div",
37079
- {
37080
- "data-testid": "preview-content",
37081
- className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-4 md:px-8",
37082
- children: editor.isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-muted-foreground text-sm", children: t("menubar.previewEmpty") }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
37083
- "div",
37084
- {
37085
- className: UEDITOR_PROSEMIRROR_CLASS_NAME,
37086
- dangerouslySetInnerHTML: { __html: editor.getHTML() }
37087
- }
37088
- )
37089
- }
37090
- )
37091
- ] })
37077
+ }
37078
+ )
37092
37079
  ] });
37093
37080
  };
37094
37081