@windrun-huaiin/third-ui 5.10.3 → 5.11.0

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.
@@ -68,8 +68,8 @@ interface GradientButtonProps {
68
68
  }
69
69
  declare function GradientButton({ title, icon, align, disabled, className, href, openInNewTab, onClick, loadingText, preventDoubleClick, }: GradientButtonProps): react_jsx_runtime.JSX.Element;
70
70
 
71
- declare function FumaBannerSuit({ showText }: {
72
- showText: boolean;
71
+ declare function FumaBannerSuit({ showBanner }: {
72
+ showBanner: boolean;
73
73
  }): react_jsx_runtime.JSX.Element;
74
74
 
75
75
  interface FumaGithubInfoProps {
@@ -68,8 +68,8 @@ interface GradientButtonProps {
68
68
  }
69
69
  declare function GradientButton({ title, icon, align, disabled, className, href, openInNewTab, onClick, loadingText, preventDoubleClick, }: GradientButtonProps): react_jsx_runtime.JSX.Element;
70
70
 
71
- declare function FumaBannerSuit({ showText }: {
72
- showText: boolean;
71
+ declare function FumaBannerSuit({ showBanner }: {
72
+ showBanner: boolean;
73
73
  }): react_jsx_runtime.JSX.Element;
74
74
 
75
75
  interface FumaGithubInfoProps {
@@ -3096,46 +3096,10 @@ function getElementRef(element) {
3096
3096
  return element.props.ref || element.ref;
3097
3097
  }
3098
3098
 
3099
- // ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
3100
- var import_clsx2 = require("clsx");
3101
- var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
3102
- var cx = import_clsx2.clsx;
3103
- var cva = (base, config) => (props) => {
3104
- var _config_compoundVariants;
3105
- if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
3106
- const { variants, defaultVariants } = config;
3107
- const getVariantClassNames = Object.keys(variants).map((variant) => {
3108
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
3109
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
3110
- if (variantProp === null) return null;
3111
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
3112
- return variants[variant][variantKey];
3113
- });
3114
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
3115
- let [key, value] = param;
3116
- if (value === void 0) {
3117
- return acc;
3118
- }
3119
- acc[key] = value;
3120
- return acc;
3121
- }, {});
3122
- const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
3123
- let _a = param, { class: cvClass, className: cvClassName } = _a, compoundVariantOptions = __objRest(_a, ["class", "className"]);
3124
- return Object.entries(compoundVariantOptions).every((param2) => {
3125
- let [key, value] = param2;
3126
- return Array.isArray(value) ? value.includes(__spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key]) : __spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key] === value;
3127
- }) ? [
3128
- ...acc,
3129
- cvClass,
3130
- cvClassName
3131
- ] : acc;
3132
- }, []);
3133
- return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
3134
- };
3135
-
3136
3099
  // ../base-ui/src/ui/button.tsx
3100
+ var import_class_variance_authority = require("class-variance-authority");
3137
3101
  var import_jsx_runtime39 = require("react/jsx-runtime");
3138
- var buttonVariants = cva(
3102
+ var buttonVariants = (0, import_class_variance_authority.cva)(
3139
3103
  "inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3140
3104
  {
3141
3105
  variants: {
@@ -3384,29 +3348,186 @@ function LastUpdatedDate({ date }) {
3384
3348
  ] });
3385
3349
  }
3386
3350
 
3351
+ // src/fuma/mdx/banner.tsx
3352
+ var import_class_variance_authority2 = require("class-variance-authority");
3353
+ var import_react39 = require("react");
3354
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3355
+ var buttonVariants2 = (0, import_class_variance_authority2.cva)(
3356
+ "inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50",
3357
+ {
3358
+ variants: {
3359
+ color: {
3360
+ primary: "bg-primary text-primary-foreground hover:bg-primary/80",
3361
+ outline: "border hover:bg-accent hover:text-accent-foreground",
3362
+ ghost: "hover:bg-accent hover:text-accent-foreground",
3363
+ secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
3364
+ },
3365
+ size: {
3366
+ sm: "gap-1 px-2 py-1.5 text-xs",
3367
+ icon: "p-1.5 [&_svg]:size-5",
3368
+ "icon-sm": "p-1.5 [&_svg]:size-4.5"
3369
+ }
3370
+ }
3371
+ }
3372
+ );
3373
+ function Banner(_a) {
3374
+ var _b = _a, {
3375
+ id,
3376
+ variant = "rainbow",
3377
+ changeLayout = true,
3378
+ height = 3
3379
+ } = _b, props = __objRest(_b, [
3380
+ "id",
3381
+ "variant",
3382
+ "changeLayout",
3383
+ "height"
3384
+ ]);
3385
+ const [open, setOpen] = (0, import_react39.useState)(true);
3386
+ const globalKey = id ? `nd-banner-${id}` : null;
3387
+ const bannerHeight = `${height}rem`;
3388
+ const headerStartHeight = `${height + 5.5}rem`;
3389
+ (0, import_react39.useEffect)(() => {
3390
+ if (globalKey) setOpen(localStorage.getItem(globalKey) !== "true");
3391
+ }, [globalKey]);
3392
+ if (!open) return null;
3393
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3394
+ "div",
3395
+ __spreadProps(__spreadValues({
3396
+ id
3397
+ }, props), {
3398
+ className: cn(
3399
+ "flex flex-row items-center justify-center px-4 text-center text-sm font-medium",
3400
+ "bg-neutral-100 dark:bg-neutral-900",
3401
+ !open && "hidden",
3402
+ props.className
3403
+ ),
3404
+ style: {
3405
+ // 将 fuma.css 中的 .sticky.top-0.z-40 样式完全移到这里
3406
+ position: "fixed",
3407
+ top: 0,
3408
+ left: 0,
3409
+ width: "100vw",
3410
+ zIndex: 1001,
3411
+ height: bannerHeight,
3412
+ minHeight: bannerHeight,
3413
+ maxHeight: bannerHeight,
3414
+ margin: 0,
3415
+ borderRadius: 0
3416
+ },
3417
+ children: [
3418
+ globalKey ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("style", { children: `.${globalKey} #${id} { display: none; }` }) : null,
3419
+ globalKey ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3420
+ "script",
3421
+ {
3422
+ dangerouslySetInnerHTML: {
3423
+ __html: `if (localStorage.getItem('${globalKey}') === 'true') document.documentElement.classList.add('${globalKey}');`
3424
+ }
3425
+ }
3426
+ ) : null,
3427
+ variant === "rainbow" ? rainbowLayer : null,
3428
+ props.children,
3429
+ id ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3430
+ "button",
3431
+ {
3432
+ type: "button",
3433
+ "aria-label": "Close Banner",
3434
+ onClick: () => {
3435
+ setOpen(false);
3436
+ if (globalKey) localStorage.setItem(globalKey, "true");
3437
+ },
3438
+ className: cn(
3439
+ buttonVariants2({
3440
+ color: "ghost",
3441
+ className: "absolute end-2 top-1/2 -translate-y-1/2 text-neutral-600 dark:text-neutral-400",
3442
+ size: "icon"
3443
+ })
3444
+ ),
3445
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(globalLucideIcons.X, {})
3446
+ }
3447
+ ) : null
3448
+ ]
3449
+ })
3450
+ );
3451
+ }
3452
+ var maskImage = "linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)";
3453
+ var rainbowLayer = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
3454
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3455
+ "div",
3456
+ {
3457
+ className: "absolute inset-0 z-[-1]",
3458
+ style: {
3459
+ maskImage,
3460
+ maskComposite: "intersect",
3461
+ animation: "fd-moving-banner 16s linear infinite",
3462
+ "--start": "rgba(0,87,255,0.5)",
3463
+ "--mid": "rgba(255,0,166,0.77)",
3464
+ "--end": "rgba(255,77,0,0.4)",
3465
+ "--via": "rgba(164,255,68,0.4)",
3466
+ animationDirection: "reverse",
3467
+ backgroundImage: "repeating-linear-gradient(60deg, var(--end), var(--start) 2%, var(--start) 5%, transparent 8%, transparent 14%, var(--via) 18%, var(--via) 22%, var(--mid) 28%, var(--mid) 30%, var(--via) 34%, var(--via) 36%, transparent, var(--end) calc(50% - 12px))",
3468
+ backgroundSize: "200% 100%",
3469
+ mixBlendMode: "difference"
3470
+ }
3471
+ }
3472
+ ),
3473
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3474
+ "div",
3475
+ {
3476
+ className: "absolute inset-0 z-[-1]",
3477
+ style: {
3478
+ maskImage,
3479
+ maskComposite: "intersect",
3480
+ animation: "fd-moving-banner 20s linear infinite",
3481
+ "--start": "rgba(255,120,120,0.5)",
3482
+ "--mid": "rgba(36,188,255,0.4)",
3483
+ "--end": "rgba(64,0,255,0.51)",
3484
+ "--via": "rgba(255,89,0,0.56)",
3485
+ backgroundImage: "repeating-linear-gradient(45deg, var(--end), var(--start) 4%, var(--start) 8%, transparent 9%, transparent 14%, var(--mid) 16%, var(--mid) 20%, transparent, var(--via) 36%, var(--via) 40%, transparent 42%, var(--end) 46%, var(--end) calc(50% - 16.8px))",
3486
+ backgroundSize: "200% 100%",
3487
+ mixBlendMode: "color-dodge"
3488
+ }
3489
+ }
3490
+ ),
3491
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("style", { children: `@keyframes fd-moving-banner {
3492
+ from { background-position: 0% 0; }
3493
+ to { background-position: 100% 0; }
3494
+ }` })
3495
+ ] });
3496
+
3387
3497
  // src/fuma/mdx/fuma-banner-suit.tsx
3388
- var import_banner = require("fumadocs-ui/components/banner");
3389
3498
  var import_next_intl = require("next-intl");
3390
- var import_jsx_runtime42 = require("react/jsx-runtime");
3391
- function FumaBannerSuit({ showText }) {
3499
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3500
+ function FumaBannerSuit({ showBanner }) {
3392
3501
  const t = (0, import_next_intl.useTranslations)("home");
3393
- return showText ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_banner.Banner, { variant: "rainbow", changeLayout: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xl", children: t("banner") }) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_banner.Banner, { variant: "normal", changeLayout: true, className: "bg-white dark:bg-[rgb(10,10,10)]" });
3502
+ const heightValue = showBanner ? 3 : 0.5;
3503
+ const height = `${heightValue}rem`;
3504
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: showBanner ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Banner, { variant: "rainbow", changeLayout: true, height: heightValue, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xl", children: t("banner") }) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3505
+ "div",
3506
+ {
3507
+ className: "fixed top-0 left-0 w-screen z-[1001] m-0 rounded-none bg-neutral-100 dark:bg-neutral-900",
3508
+ style: {
3509
+ height,
3510
+ minHeight: height,
3511
+ maxHeight: height
3512
+ }
3513
+ }
3514
+ ) });
3394
3515
  }
3395
3516
 
3396
3517
  // src/fuma/mdx/fuma-github-info.tsx
3397
- var import_react39 = require("react");
3398
- var import_jsx_runtime43 = require("react/jsx-runtime");
3518
+ var import_react40 = require("react");
3519
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3399
3520
  function GitHubInfoSkeleton({ owner, repo, className }) {
3400
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: `flex flex-col gap-1.5 p-2 rounded-lg text-sm text-fd-foreground/80 lg:flex-row lg:items-center animate-pulse ${className}`, children: [
3401
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
3402
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "size-3.5 bg-fd-muted rounded" }),
3403
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "h-4 bg-fd-muted rounded w-20" })
3521
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: `flex flex-col gap-1.5 p-2 rounded-lg text-sm text-fd-foreground/80 lg:flex-row lg:items-center animate-pulse ${className}`, children: [
3522
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
3523
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "size-3.5 bg-fd-muted rounded" }),
3524
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-4 bg-fd-muted rounded w-20" })
3404
3525
  ] }),
3405
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "h-3 bg-fd-muted rounded w-8" })
3526
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-3 bg-fd-muted rounded w-8" })
3406
3527
  ] });
3407
3528
  }
3408
3529
  function GitHubInfoFallback({ owner, repo, className }) {
3409
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3530
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3410
3531
  "a",
3411
3532
  {
3412
3533
  href: `https://github.com/${owner}/${repo}`,
@@ -3414,17 +3535,17 @@ function GitHubInfoFallback({ owner, repo, className }) {
3414
3535
  target: "_blank",
3415
3536
  className: `flex flex-col gap-1.5 p-2 rounded-lg text-sm text-fd-foreground/80 transition-colors lg:flex-row lg:items-center hover:text-fd-accent-foreground hover:bg-fd-accent ${className}`,
3416
3537
  children: [
3417
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3418
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3419
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("title", { children: "GitHub" }),
3420
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
3538
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3539
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3540
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("title", { children: "GitHub" }),
3541
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
3421
3542
  ] }),
3422
3543
  owner,
3423
3544
  "/",
3424
3545
  repo
3425
3546
  ] }),
3426
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3427
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.ExternalLink, { className: "size-3" }),
3547
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3548
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.ExternalLink, { className: "size-3" }),
3428
3549
  "GitHub"
3429
3550
  ] })
3430
3551
  ]
@@ -3438,7 +3559,7 @@ function GitHubInfoSuccess({
3438
3559
  className
3439
3560
  }) {
3440
3561
  const humanizedStars = humanizeNumber(stars);
3441
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3562
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3442
3563
  "a",
3443
3564
  {
3444
3565
  href: `https://github.com/${owner}/${repo}`,
@@ -3446,17 +3567,17 @@ function GitHubInfoSuccess({
3446
3567
  target: "_blank",
3447
3568
  className: `flex flex-col gap-1.5 p-2 rounded-lg text-sm text-fd-foreground/80 transition-colors lg:flex-row lg:items-center hover:text-fd-accent-foreground hover:bg-fd-accent ${className}`,
3448
3569
  children: [
3449
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3450
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3451
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("title", { children: "GitHub" }),
3452
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
3570
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3571
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3572
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("title", { children: "GitHub" }),
3573
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
3453
3574
  ] }),
3454
3575
  owner,
3455
3576
  "/",
3456
3577
  repo
3457
3578
  ] }),
3458
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3459
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.Star, { className: "size-3" }),
3579
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3580
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.Star, { className: "size-3" }),
3460
3581
  humanizedStars
3461
3582
  ] })
3462
3583
  ]
@@ -3478,10 +3599,10 @@ function humanizeNumber(num) {
3478
3599
  return num.toString();
3479
3600
  }
3480
3601
  function FumaGithubInfo({ owner, repo, token, className }) {
3481
- const [data, setData] = (0, import_react39.useState)(null);
3482
- const [loading, setLoading] = (0, import_react39.useState)(true);
3483
- const [error, setError] = (0, import_react39.useState)(null);
3484
- (0, import_react39.useEffect)(() => {
3602
+ const [data, setData] = (0, import_react40.useState)(null);
3603
+ const [loading, setLoading] = (0, import_react40.useState)(true);
3604
+ const [error, setError] = (0, import_react40.useState)(null);
3605
+ (0, import_react40.useEffect)(() => {
3485
3606
  const fetchRepoData = () => __async(null, null, function* () {
3486
3607
  try {
3487
3608
  setLoading(true);
@@ -3525,12 +3646,12 @@ function FumaGithubInfo({ owner, repo, token, className }) {
3525
3646
  fetchRepoData();
3526
3647
  }, [owner, repo, token]);
3527
3648
  if (loading) {
3528
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(GitHubInfoSkeleton, { owner, repo, className });
3649
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GitHubInfoSkeleton, { owner, repo, className });
3529
3650
  }
3530
3651
  if (error || !data) {
3531
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(GitHubInfoFallback, { owner, repo, className });
3652
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GitHubInfoFallback, { owner, repo, className });
3532
3653
  }
3533
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3654
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3534
3655
  GitHubInfoSuccess,
3535
3656
  {
3536
3657
  owner,
@@ -3543,7 +3664,7 @@ function FumaGithubInfo({ owner, repo, token, className }) {
3543
3664
 
3544
3665
  // src/fuma/mdx/site-x.tsx
3545
3666
  var import_next_intl2 = require("next-intl");
3546
- var import_jsx_runtime44 = require("react/jsx-runtime");
3667
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3547
3668
  function SiteX(_a) {
3548
3669
  var _b = _a, { type, namespace, tKey, className } = _b, props = __objRest(_b, ["type", "namespace", "tKey", "className"]);
3549
3670
  let ns = namespace;
@@ -3557,7 +3678,7 @@ function SiteX(_a) {
3557
3678
  const t = (0, import_next_intl2.useTranslations)(ns);
3558
3679
  const text = t(key, { defaultValue: type === "site" ? "Site----" : "----@example.com" });
3559
3680
  if (type === "site") {
3560
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3681
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3561
3682
  "strong",
3562
3683
  __spreadProps(__spreadValues({}, props), {
3563
3684
  className: cn(
@@ -3569,7 +3690,7 @@ function SiteX(_a) {
3569
3690
  );
3570
3691
  }
3571
3692
  if (type === "email") {
3572
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3693
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3573
3694
  "a",
3574
3695
  __spreadProps(__spreadValues({}, props), {
3575
3696
  href: `mailto:${text}`,
@@ -3585,16 +3706,16 @@ function SiteX(_a) {
3585
3706
  }
3586
3707
 
3587
3708
  // src/fuma/mdx/zia-file.tsx
3588
- var import_react40 = require("react");
3709
+ var import_react41 = require("react");
3589
3710
  var import_collapsible = require("fumadocs-ui/components/ui/collapsible");
3590
3711
  var import_link5 = __toESM(require("next/link"));
3591
- var import_jsx_runtime45 = require("react/jsx-runtime");
3712
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3592
3713
  var itemVariants = "flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4";
3593
3714
  var anotionClass = "ms-2 px-2 py-0.5 rounded text-xs font-semibold bg-fd-accent/80 text-fd-accent-foreground dark:bg-white/20 dark:text-white";
3594
3715
  function ZiaFile(_a) {
3595
3716
  var _b = _a, {
3596
3717
  name,
3597
- icon = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.File, {}),
3718
+ icon = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.File, {}),
3598
3719
  className,
3599
3720
  anotion,
3600
3721
  href
@@ -3608,16 +3729,16 @@ function ZiaFile(_a) {
3608
3729
  const validHref = typeof href === "string" && href.trim() !== "";
3609
3730
  const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
3610
3731
  if (validHref) {
3611
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_link5.default, { href, className: cn(itemVariants, className), children: [
3732
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_link5.default, { href, className: cn(itemVariants, className), children: [
3612
3733
  icon,
3613
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: name }),
3614
- validAnotion && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: anotionClass, children: anotion })
3734
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
3735
+ validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
3615
3736
  ] });
3616
3737
  }
3617
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", __spreadProps(__spreadValues({ className: cn(itemVariants, className) }, rest), { children: [
3738
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", __spreadProps(__spreadValues({ className: cn(itemVariants, className) }, rest), { children: [
3618
3739
  icon,
3619
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: name }),
3620
- validAnotion && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: anotionClass, children: anotion })
3740
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
3741
+ validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
3621
3742
  ] }));
3622
3743
  }
3623
3744
  function ZiaFolder(_a) {
@@ -3634,26 +3755,26 @@ function ZiaFolder(_a) {
3634
3755
  "className",
3635
3756
  "children"
3636
3757
  ]);
3637
- const [open, setOpen] = (0, import_react40.useState)(defaultOpen);
3758
+ const [open, setOpen] = (0, import_react41.useState)(defaultOpen);
3638
3759
  const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
3639
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_collapsible.Collapsible, __spreadProps(__spreadValues({ open, onOpenChange: setOpen }, props), { children: [
3640
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_collapsible.CollapsibleTrigger, { className: cn(itemVariants, className, "w-full"), children: [
3641
- open ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.FolderOpen, {}) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.Folder, {}),
3642
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: name }),
3643
- validAnotion && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: anotionClass, children: anotion })
3760
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_collapsible.Collapsible, __spreadProps(__spreadValues({ open, onOpenChange: setOpen }, props), { children: [
3761
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_collapsible.CollapsibleTrigger, { className: cn(itemVariants, className, "w-full"), children: [
3762
+ open ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.FolderOpen, {}) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.Folder, {}),
3763
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
3764
+ validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
3644
3765
  ] }),
3645
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_collapsible.CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "ms-2 flex flex-col border-l ps-2", children }) })
3766
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_collapsible.CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "ms-2 flex flex-col border-l ps-2", children }) })
3646
3767
  ] }));
3647
3768
  }
3648
3769
 
3649
3770
  // src/fuma/mdx/toc-footer-wrapper.tsx
3650
- var import_jsx_runtime46 = require("react/jsx-runtime");
3771
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3651
3772
  function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
3652
3773
  const showEdit = githubBaseUrl && editPath;
3653
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
3654
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LastUpdatedDate, { date: lastModified }),
3774
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
3775
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LastUpdatedDate, { date: lastModified }),
3655
3776
  copyButtonComponent,
3656
- showEdit && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
3777
+ showEdit && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
3657
3778
  ] });
3658
3779
  }
3659
3780
  // Annotate the CommonJS export names for ESM import in node: