@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.
@@ -2694,10 +2694,6 @@ for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS))
2694
2694
  var wrappedBuiltinIconsPart = tempWrappedBuiltinIcons;
2695
2695
  var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart), wrappedBuiltinIconsPart);
2696
2696
 
2697
- // src/fuma/mdx/mermaid.tsx
2698
- import { useTheme } from "next-themes";
2699
- import { useCallback as useCallback7, useEffect as useEffect15, useId as useId2, useRef as useRef11, useState as useState10 } from "react";
2700
-
2701
2697
  // ../base-ui/src/ui/alert-dialog.tsx
2702
2698
  import * as React57 from "react";
2703
2699
 
@@ -5155,6 +5151,8 @@ var AlertDialogCancel2 = React57.forwardRef((_a, ref) => {
5155
5151
  AlertDialogCancel2.displayName = Cancel.displayName;
5156
5152
 
5157
5153
  // src/fuma/mdx/mermaid.tsx
5154
+ import { useTheme } from "next-themes";
5155
+ import { useCallback as useCallback7, useEffect as useEffect15, useId as useId2, useRef as useRef11, useState as useState10 } from "react";
5158
5156
  import { jsx as jsx43, jsxs as jsxs14 } from "react/jsx-runtime";
5159
5157
  function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview = true }) {
5160
5158
  const id = useId2();
@@ -5241,7 +5239,7 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
5241
5239
  onClick: () => enablePreview && svg && setOpen(true),
5242
5240
  children: [
5243
5241
  /* @__PURE__ */ jsx43("div", { dangerouslySetInnerHTML: { __html: svg } }),
5244
- enablePreview && svg && /* @__PURE__ */ jsx43("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: "Click to preview" })
5242
+ enablePreview && svg && /* @__PURE__ */ jsx43("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" })
5245
5243
  ]
5246
5244
  }
5247
5245
  ),
@@ -5259,52 +5257,51 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
5259
5257
  setOpen(o);
5260
5258
  if (!o) resetTransform();
5261
5259
  }, children: /* @__PURE__ */ jsxs14(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: [
5260
+ /* @__PURE__ */ jsx43(AlertDialogTitle2, { className: "sr-only", children: title != null ? title : "Mermaid Preview" }),
5262
5261
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between px-3 py-2 border-b border-neutral-200 dark:border-neutral-700", children: [
5263
5262
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 text-sm text-neutral-600 dark:text-neutral-300", children: [
5264
5263
  /* @__PURE__ */ jsx43(globalLucideIcons.Mmd, { className: "h-4 w-4" }),
5265
5264
  /* @__PURE__ */ jsx43("span", { className: "truncate max-w-[50vw]", children: title != null ? title : "Mermaid Preview" })
5266
5265
  ] }),
5267
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
5266
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-0.5", children: [
5268
5267
  /* @__PURE__ */ jsx43(
5269
5268
  "button",
5270
5269
  {
5271
- className: "rounded border border-neutral-300 dark:border-neutral-600 px-2 py-1 text-sm",
5270
+ "aria-label": "Zoom out",
5271
+ className: "flex h-6 w-6 items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 text-[13px]",
5272
5272
  onClick: () => zoomBy(-0.2),
5273
5273
  children: "\uFF0D"
5274
5274
  }
5275
5275
  ),
5276
- /* @__PURE__ */ jsxs14("span", { className: "text-xs w-16 text-center select-none", children: [
5276
+ /* @__PURE__ */ jsxs14("span", { className: "mx-0.5 text-[12px] w-12 text-center select-none", children: [
5277
5277
  Math.round(scale * 100),
5278
5278
  "%"
5279
5279
  ] }),
5280
5280
  /* @__PURE__ */ jsx43(
5281
5281
  "button",
5282
5282
  {
5283
- className: "rounded border border-neutral-300 dark:border-neutral-600 px-2 py-1 text-sm",
5283
+ "aria-label": "Zoom in",
5284
+ className: "flex h-6 w-6 items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 text-[13px]",
5284
5285
  onClick: () => zoomBy(0.2),
5285
5286
  children: "\uFF0B"
5286
5287
  }
5287
5288
  ),
5288
- /* @__PURE__ */ jsxs14(
5289
+ /* @__PURE__ */ jsx43(
5289
5290
  "button",
5290
5291
  {
5291
- className: "ml-2 rounded border border-neutral-300 dark:border-neutral-600 px-2 py-1 text-sm flex items-center gap-1",
5292
+ "aria-label": "Reset",
5293
+ className: "ml-1 flex h-6 w-6 items-center justify-center rounded text-purple-500 hover:text-purple-600",
5292
5294
  onClick: resetTransform,
5293
- children: [
5294
- /* @__PURE__ */ jsx43(globalLucideIcons.RefreshCcw, { className: "h-4 w-4" }),
5295
- "Reset"
5296
- ]
5295
+ children: /* @__PURE__ */ jsx43(globalLucideIcons.RefreshCcw, { className: "h-3.5 w-3.5" })
5297
5296
  }
5298
5297
  ),
5299
- /* @__PURE__ */ jsxs14(
5298
+ /* @__PURE__ */ jsx43(
5300
5299
  "button",
5301
5300
  {
5302
- className: "ml-2 rounded border border-neutral-300 dark:border-neutral-600 px-2 py-1 text-sm",
5301
+ "aria-label": "Close",
5302
+ className: "ml-1 flex h-6 w-6 items-center justify-center rounded text-purple-500 hover:text-purple-600",
5303
5303
  onClick: () => setOpen(false),
5304
- children: [
5305
- /* @__PURE__ */ jsx43(globalLucideIcons.X, { className: "h-4 w-4" }),
5306
- "Close"
5307
- ]
5304
+ children: /* @__PURE__ */ jsx43(globalLucideIcons.X, { className: "h-3.5 w-3.5" })
5308
5305
  }
5309
5306
  )
5310
5307
  ] })
@@ -5322,8 +5319,14 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
5322
5319
  "div",
5323
5320
  {
5324
5321
  className: "absolute left-1/2 top-1/2",
5325
- style: { transform: `translate(calc(-50% + ${translate.x}px), calc(-50% + ${translate.y}px)) scale(${scale})`, transformOrigin: "0 0" },
5326
- dangerouslySetInnerHTML: { __html: svg }
5322
+ style: { transform: `translate(-50%, -50%) translate(${translate.x}px, ${translate.y}px)` },
5323
+ children: /* @__PURE__ */ jsx43(
5324
+ "div",
5325
+ {
5326
+ style: { transform: `scale(${scale})`, transformOrigin: "50% 50%" },
5327
+ dangerouslySetInnerHTML: { __html: svg }
5328
+ }
5329
+ )
5327
5330
  }
5328
5331
  ),
5329
5332
  /* @__PURE__ */ jsx43("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" })