@windrun-huaiin/third-ui 5.13.5 → 5.13.6
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/fuma/mdx/index.js +26 -23
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +26 -23
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.js +2 -4
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +2 -4
- package/dist/fuma/server.mjs.map +1 -1
- package/package.json +2 -2
package/dist/fuma/mdx/index.js
CHANGED
|
@@ -2737,10 +2737,6 @@ for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS))
|
|
|
2737
2737
|
var wrappedBuiltinIconsPart = tempWrappedBuiltinIcons;
|
|
2738
2738
|
var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart), wrappedBuiltinIconsPart);
|
|
2739
2739
|
|
|
2740
|
-
// src/fuma/mdx/mermaid.tsx
|
|
2741
|
-
var import_next_themes = require("next-themes");
|
|
2742
|
-
var import_react36 = require("react");
|
|
2743
|
-
|
|
2744
2740
|
// ../base-ui/src/ui/alert-dialog.tsx
|
|
2745
2741
|
var React57 = __toESM(require("react"), 1);
|
|
2746
2742
|
|
|
@@ -5198,6 +5194,8 @@ var AlertDialogCancel2 = React57.forwardRef((_a, ref) => {
|
|
|
5198
5194
|
AlertDialogCancel2.displayName = Cancel.displayName;
|
|
5199
5195
|
|
|
5200
5196
|
// src/fuma/mdx/mermaid.tsx
|
|
5197
|
+
var import_next_themes = require("next-themes");
|
|
5198
|
+
var import_react36 = require("react");
|
|
5201
5199
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5202
5200
|
function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview = true }) {
|
|
5203
5201
|
const id = (0, import_react36.useId)();
|
|
@@ -5284,7 +5282,7 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
|
|
|
5284
5282
|
onClick: () => enablePreview && svg && setOpen(true),
|
|
5285
5283
|
children: [
|
|
5286
5284
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { dangerouslySetInnerHTML: { __html: svg } }),
|
|
5287
|
-
enablePreview && svg && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pointer-events-none absolute right-2 top-2 hidden rounded bg-black/50 px-2 py-0.5 text-[12px] text-white group-hover:block", children: "
|
|
5285
|
+
enablePreview && svg && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pointer-events-none absolute right-2 top-2 hidden rounded bg-black/50 px-2 py-0.5 text-[12px] text-white group-hover:block", children: "Preview Chart" })
|
|
5288
5286
|
]
|
|
5289
5287
|
}
|
|
5290
5288
|
),
|
|
@@ -5302,52 +5300,51 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
|
|
|
5302
5300
|
setOpen(o);
|
|
5303
5301
|
if (!o) resetTransform();
|
|
5304
5302
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(AlertDialogContent2, { className: "z-50 max-w-[95vw] w-[95vw] h-[88vh] p-0 bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700", children: [
|
|
5303
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AlertDialogTitle2, { className: "sr-only", children: title != null ? title : "Mermaid Preview" }),
|
|
5305
5304
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between px-3 py-2 border-b border-neutral-200 dark:border-neutral-700", children: [
|
|
5306
5305
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2 text-sm text-neutral-600 dark:text-neutral-300", children: [
|
|
5307
5306
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.Mmd, { className: "h-4 w-4" }),
|
|
5308
5307
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "truncate max-w-[50vw]", children: title != null ? title : "Mermaid Preview" })
|
|
5309
5308
|
] }),
|
|
5310
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-
|
|
5309
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
5311
5310
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5312
5311
|
"button",
|
|
5313
5312
|
{
|
|
5314
|
-
|
|
5313
|
+
"aria-label": "Zoom out",
|
|
5314
|
+
className: "flex h-6 w-6 items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 text-[13px]",
|
|
5315
5315
|
onClick: () => zoomBy(-0.2),
|
|
5316
5316
|
children: "\uFF0D"
|
|
5317
5317
|
}
|
|
5318
5318
|
),
|
|
5319
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "text-
|
|
5319
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "mx-0.5 text-[12px] w-12 text-center select-none", children: [
|
|
5320
5320
|
Math.round(scale * 100),
|
|
5321
5321
|
"%"
|
|
5322
5322
|
] }),
|
|
5323
5323
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5324
5324
|
"button",
|
|
5325
5325
|
{
|
|
5326
|
-
|
|
5326
|
+
"aria-label": "Zoom in",
|
|
5327
|
+
className: "flex h-6 w-6 items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 text-[13px]",
|
|
5327
5328
|
onClick: () => zoomBy(0.2),
|
|
5328
5329
|
children: "\uFF0B"
|
|
5329
5330
|
}
|
|
5330
5331
|
),
|
|
5331
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.
|
|
5332
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5332
5333
|
"button",
|
|
5333
5334
|
{
|
|
5334
|
-
|
|
5335
|
+
"aria-label": "Reset",
|
|
5336
|
+
className: "ml-1 flex h-6 w-6 items-center justify-center rounded text-purple-500 hover:text-purple-600",
|
|
5335
5337
|
onClick: resetTransform,
|
|
5336
|
-
children:
|
|
5337
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.RefreshCcw, { className: "h-4 w-4" }),
|
|
5338
|
-
"Reset"
|
|
5339
|
-
]
|
|
5338
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.RefreshCcw, { className: "h-3.5 w-3.5" })
|
|
5340
5339
|
}
|
|
5341
5340
|
),
|
|
5342
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.
|
|
5341
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5343
5342
|
"button",
|
|
5344
5343
|
{
|
|
5345
|
-
|
|
5344
|
+
"aria-label": "Close",
|
|
5345
|
+
className: "ml-1 flex h-6 w-6 items-center justify-center rounded text-purple-500 hover:text-purple-600",
|
|
5346
5346
|
onClick: () => setOpen(false),
|
|
5347
|
-
children:
|
|
5348
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.X, { className: "h-4 w-4" }),
|
|
5349
|
-
"Close"
|
|
5350
|
-
]
|
|
5347
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.X, { className: "h-3.5 w-3.5" })
|
|
5351
5348
|
}
|
|
5352
5349
|
)
|
|
5353
5350
|
] })
|
|
@@ -5365,8 +5362,14 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
|
|
|
5365
5362
|
"div",
|
|
5366
5363
|
{
|
|
5367
5364
|
className: "absolute left-1/2 top-1/2",
|
|
5368
|
-
style: { transform: `translate(
|
|
5369
|
-
|
|
5365
|
+
style: { transform: `translate(-50%, -50%) translate(${translate.x}px, ${translate.y}px)` },
|
|
5366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5367
|
+
"div",
|
|
5368
|
+
{
|
|
5369
|
+
style: { transform: `scale(${scale})`, transformOrigin: "50% 50%" },
|
|
5370
|
+
dangerouslySetInnerHTML: { __html: svg }
|
|
5371
|
+
}
|
|
5372
|
+
)
|
|
5370
5373
|
}
|
|
5371
5374
|
),
|
|
5372
5375
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pointer-events-none absolute bottom-2 right-3 rounded bg-black/40 px-2 py-1 text-xs text-white", children: "Drag to pan, hold Cmd/Ctrl + scroll to zoom" })
|