@windrun-huaiin/third-ui 5.10.3 → 5.11.1
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.d.mts +2 -2
- package/dist/fuma/mdx/index.d.ts +2 -2
- package/dist/fuma/mdx/index.js +215 -92
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +215 -92
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.js +45 -57
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +43 -55
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/fuma.css +2 -35
- package/dist/main/index.d.mts +73 -1
- package/dist/main/index.d.ts +73 -1
- package/dist/main/index.js +149 -39
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +147 -38
- package/dist/main/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/fuma/mdx/banner.tsx +175 -0
- package/src/fuma/mdx/fuma-banner-suit.tsx +21 -7
- package/src/main/ai-prompt-textarea.tsx +259 -0
- package/src/main/index.ts +2 -1
- package/src/styles/fuma.css +2 -35
package/dist/fuma/mdx/index.mjs
CHANGED
|
@@ -3053,44 +3053,8 @@ function getElementRef(element) {
|
|
|
3053
3053
|
return element.props.ref || element.ref;
|
|
3054
3054
|
}
|
|
3055
3055
|
|
|
3056
|
-
// ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
3057
|
-
import { clsx as clsx2 } from "clsx";
|
|
3058
|
-
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
3059
|
-
var cx = clsx2;
|
|
3060
|
-
var cva = (base, config) => (props) => {
|
|
3061
|
-
var _config_compoundVariants;
|
|
3062
|
-
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);
|
|
3063
|
-
const { variants, defaultVariants } = config;
|
|
3064
|
-
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
3065
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
3066
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
3067
|
-
if (variantProp === null) return null;
|
|
3068
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
3069
|
-
return variants[variant][variantKey];
|
|
3070
|
-
});
|
|
3071
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
3072
|
-
let [key, value] = param;
|
|
3073
|
-
if (value === void 0) {
|
|
3074
|
-
return acc;
|
|
3075
|
-
}
|
|
3076
|
-
acc[key] = value;
|
|
3077
|
-
return acc;
|
|
3078
|
-
}, {});
|
|
3079
|
-
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) => {
|
|
3080
|
-
let _a = param, { class: cvClass, className: cvClassName } = _a, compoundVariantOptions = __objRest(_a, ["class", "className"]);
|
|
3081
|
-
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
3082
|
-
let [key, value] = param2;
|
|
3083
|
-
return Array.isArray(value) ? value.includes(__spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key]) : __spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key] === value;
|
|
3084
|
-
}) ? [
|
|
3085
|
-
...acc,
|
|
3086
|
-
cvClass,
|
|
3087
|
-
cvClassName
|
|
3088
|
-
] : acc;
|
|
3089
|
-
}, []);
|
|
3090
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
3091
|
-
};
|
|
3092
|
-
|
|
3093
3056
|
// ../base-ui/src/ui/button.tsx
|
|
3057
|
+
import { cva } from "class-variance-authority";
|
|
3094
3058
|
import { jsx as jsx39, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3095
3059
|
var buttonVariants = cva(
|
|
3096
3060
|
"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",
|
|
@@ -3342,28 +3306,187 @@ function LastUpdatedDate({ date }) {
|
|
|
3342
3306
|
}
|
|
3343
3307
|
|
|
3344
3308
|
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
3345
|
-
import { Banner } from "fumadocs-ui/components/banner";
|
|
3346
3309
|
import { useTranslations } from "next-intl";
|
|
3347
|
-
|
|
3348
|
-
|
|
3310
|
+
|
|
3311
|
+
// src/fuma/mdx/banner.tsx
|
|
3312
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
3313
|
+
import { useEffect as useEffect2, useState as useState5 } from "react";
|
|
3314
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3315
|
+
var buttonVariants2 = cva2(
|
|
3316
|
+
"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",
|
|
3317
|
+
{
|
|
3318
|
+
variants: {
|
|
3319
|
+
color: {
|
|
3320
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
3321
|
+
outline: "border hover:bg-accent hover:text-accent-foreground",
|
|
3322
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
3323
|
+
secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
|
|
3324
|
+
},
|
|
3325
|
+
size: {
|
|
3326
|
+
sm: "gap-1 px-2 py-1.5 text-xs",
|
|
3327
|
+
icon: "p-1.5 [&_svg]:size-5",
|
|
3328
|
+
"icon-sm": "p-1.5 [&_svg]:size-4.5"
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
);
|
|
3333
|
+
function Banner(_a) {
|
|
3334
|
+
var _b = _a, {
|
|
3335
|
+
id,
|
|
3336
|
+
variant = "rainbow",
|
|
3337
|
+
changeLayout = true,
|
|
3338
|
+
height = 3
|
|
3339
|
+
} = _b, props = __objRest(_b, [
|
|
3340
|
+
"id",
|
|
3341
|
+
"variant",
|
|
3342
|
+
"changeLayout",
|
|
3343
|
+
"height"
|
|
3344
|
+
]);
|
|
3345
|
+
const [open, setOpen] = useState5(true);
|
|
3346
|
+
const globalKey = id ? `nd-banner-${id}` : null;
|
|
3347
|
+
const bannerHeight = `${height}rem`;
|
|
3348
|
+
const headerStartHeight = `${height + 5.5}rem`;
|
|
3349
|
+
useEffect2(() => {
|
|
3350
|
+
if (globalKey) setOpen(localStorage.getItem(globalKey) !== "true");
|
|
3351
|
+
}, [globalKey]);
|
|
3352
|
+
if (!open) return null;
|
|
3353
|
+
return /* @__PURE__ */ jsxs16(
|
|
3354
|
+
"div",
|
|
3355
|
+
__spreadProps(__spreadValues({
|
|
3356
|
+
id
|
|
3357
|
+
}, props), {
|
|
3358
|
+
className: cn(
|
|
3359
|
+
"flex flex-row items-center justify-center px-4 text-center text-sm font-medium",
|
|
3360
|
+
"bg-neutral-100 dark:bg-neutral-900",
|
|
3361
|
+
!open && "hidden",
|
|
3362
|
+
props.className
|
|
3363
|
+
),
|
|
3364
|
+
style: {
|
|
3365
|
+
// 将 fuma.css 中的 .sticky.top-0.z-40 样式完全移到这里
|
|
3366
|
+
position: "fixed",
|
|
3367
|
+
top: 0,
|
|
3368
|
+
left: 0,
|
|
3369
|
+
width: "100vw",
|
|
3370
|
+
zIndex: 1001,
|
|
3371
|
+
height: bannerHeight,
|
|
3372
|
+
minHeight: bannerHeight,
|
|
3373
|
+
maxHeight: bannerHeight,
|
|
3374
|
+
margin: 0,
|
|
3375
|
+
borderRadius: 0
|
|
3376
|
+
},
|
|
3377
|
+
children: [
|
|
3378
|
+
globalKey ? /* @__PURE__ */ jsx42("style", { children: `.${globalKey} #${id} { display: none; }` }) : null,
|
|
3379
|
+
globalKey ? /* @__PURE__ */ jsx42(
|
|
3380
|
+
"script",
|
|
3381
|
+
{
|
|
3382
|
+
dangerouslySetInnerHTML: {
|
|
3383
|
+
__html: `if (localStorage.getItem('${globalKey}') === 'true') document.documentElement.classList.add('${globalKey}');`
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
) : null,
|
|
3387
|
+
variant === "rainbow" ? rainbowLayer : null,
|
|
3388
|
+
props.children,
|
|
3389
|
+
id ? /* @__PURE__ */ jsx42(
|
|
3390
|
+
"button",
|
|
3391
|
+
{
|
|
3392
|
+
type: "button",
|
|
3393
|
+
"aria-label": "Close Banner",
|
|
3394
|
+
onClick: () => {
|
|
3395
|
+
setOpen(false);
|
|
3396
|
+
if (globalKey) localStorage.setItem(globalKey, "true");
|
|
3397
|
+
},
|
|
3398
|
+
className: cn(
|
|
3399
|
+
buttonVariants2({
|
|
3400
|
+
color: "ghost",
|
|
3401
|
+
className: "absolute end-2 top-1/2 -translate-y-1/2 text-neutral-600 dark:text-neutral-400",
|
|
3402
|
+
size: "icon"
|
|
3403
|
+
})
|
|
3404
|
+
),
|
|
3405
|
+
children: /* @__PURE__ */ jsx42(globalLucideIcons.X, {})
|
|
3406
|
+
}
|
|
3407
|
+
) : null
|
|
3408
|
+
]
|
|
3409
|
+
})
|
|
3410
|
+
);
|
|
3411
|
+
}
|
|
3412
|
+
var maskImage = "linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)";
|
|
3413
|
+
var rainbowLayer = /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
3414
|
+
/* @__PURE__ */ jsx42(
|
|
3415
|
+
"div",
|
|
3416
|
+
{
|
|
3417
|
+
className: "absolute inset-0 z-[-1]",
|
|
3418
|
+
style: {
|
|
3419
|
+
maskImage,
|
|
3420
|
+
maskComposite: "intersect",
|
|
3421
|
+
animation: "fd-moving-banner 16s linear infinite",
|
|
3422
|
+
"--start": "rgba(0,87,255,0.5)",
|
|
3423
|
+
"--mid": "rgba(255,0,166,0.77)",
|
|
3424
|
+
"--end": "rgba(255,77,0,0.4)",
|
|
3425
|
+
"--via": "rgba(164,255,68,0.4)",
|
|
3426
|
+
animationDirection: "reverse",
|
|
3427
|
+
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))",
|
|
3428
|
+
backgroundSize: "200% 100%",
|
|
3429
|
+
mixBlendMode: "difference"
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
),
|
|
3433
|
+
/* @__PURE__ */ jsx42(
|
|
3434
|
+
"div",
|
|
3435
|
+
{
|
|
3436
|
+
className: "absolute inset-0 z-[-1]",
|
|
3437
|
+
style: {
|
|
3438
|
+
maskImage,
|
|
3439
|
+
maskComposite: "intersect",
|
|
3440
|
+
animation: "fd-moving-banner 20s linear infinite",
|
|
3441
|
+
"--start": "rgba(255,120,120,0.5)",
|
|
3442
|
+
"--mid": "rgba(36,188,255,0.4)",
|
|
3443
|
+
"--end": "rgba(64,0,255,0.51)",
|
|
3444
|
+
"--via": "rgba(255,89,0,0.56)",
|
|
3445
|
+
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))",
|
|
3446
|
+
backgroundSize: "200% 100%",
|
|
3447
|
+
mixBlendMode: "color-dodge"
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
),
|
|
3451
|
+
/* @__PURE__ */ jsx42("style", { children: `@keyframes fd-moving-banner {
|
|
3452
|
+
from { background-position: 0% 0; }
|
|
3453
|
+
to { background-position: 100% 0; }
|
|
3454
|
+
}` })
|
|
3455
|
+
] });
|
|
3456
|
+
|
|
3457
|
+
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
3458
|
+
import { Fragment as Fragment6, jsx as jsx43 } from "react/jsx-runtime";
|
|
3459
|
+
function FumaBannerSuit({ showBanner }) {
|
|
3349
3460
|
const t = useTranslations("home");
|
|
3350
|
-
|
|
3461
|
+
const heightValue = showBanner ? 3 : 0.5;
|
|
3462
|
+
const height = `${heightValue}rem`;
|
|
3463
|
+
return /* @__PURE__ */ jsx43(Fragment6, { children: showBanner ? /* @__PURE__ */ jsx43(Banner, { variant: "rainbow", changeLayout: true, height: heightValue, children: /* @__PURE__ */ jsx43("p", { className: "text-xl", children: t("banner") }) }) : /* @__PURE__ */ jsx43(
|
|
3464
|
+
"div",
|
|
3465
|
+
{
|
|
3466
|
+
className: "fixed top-0 left-0 w-screen z-[1001] m-0 rounded-none bg-neutral-100 dark:bg-neutral-900",
|
|
3467
|
+
style: {
|
|
3468
|
+
height,
|
|
3469
|
+
minHeight: height,
|
|
3470
|
+
maxHeight: height
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
) });
|
|
3351
3474
|
}
|
|
3352
3475
|
|
|
3353
3476
|
// src/fuma/mdx/fuma-github-info.tsx
|
|
3354
|
-
import { useEffect as
|
|
3355
|
-
import { jsx as
|
|
3477
|
+
import { useEffect as useEffect3, useState as useState6 } from "react";
|
|
3478
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3356
3479
|
function GitHubInfoSkeleton({ owner, repo, className }) {
|
|
3357
|
-
return /* @__PURE__ */
|
|
3358
|
-
/* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3480
|
+
return /* @__PURE__ */ jsxs17("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: [
|
|
3481
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3482
|
+
/* @__PURE__ */ jsx44("div", { className: "size-3.5 bg-fd-muted rounded" }),
|
|
3483
|
+
/* @__PURE__ */ jsx44("div", { className: "h-4 bg-fd-muted rounded w-20" })
|
|
3361
3484
|
] }),
|
|
3362
|
-
/* @__PURE__ */
|
|
3485
|
+
/* @__PURE__ */ jsx44("div", { className: "h-3 bg-fd-muted rounded w-8" })
|
|
3363
3486
|
] });
|
|
3364
3487
|
}
|
|
3365
3488
|
function GitHubInfoFallback({ owner, repo, className }) {
|
|
3366
|
-
return /* @__PURE__ */
|
|
3489
|
+
return /* @__PURE__ */ jsxs17(
|
|
3367
3490
|
"a",
|
|
3368
3491
|
{
|
|
3369
3492
|
href: `https://github.com/${owner}/${repo}`,
|
|
@@ -3371,17 +3494,17 @@ function GitHubInfoFallback({ owner, repo, className }) {
|
|
|
3371
3494
|
target: "_blank",
|
|
3372
3495
|
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}`,
|
|
3373
3496
|
children: [
|
|
3374
|
-
/* @__PURE__ */
|
|
3375
|
-
/* @__PURE__ */
|
|
3376
|
-
/* @__PURE__ */
|
|
3377
|
-
/* @__PURE__ */
|
|
3497
|
+
/* @__PURE__ */ jsxs17("p", { className: "flex items-center gap-2 truncate", children: [
|
|
3498
|
+
/* @__PURE__ */ jsxs17("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
|
|
3499
|
+
/* @__PURE__ */ jsx44("title", { children: "GitHub" }),
|
|
3500
|
+
/* @__PURE__ */ jsx44("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" })
|
|
3378
3501
|
] }),
|
|
3379
3502
|
owner,
|
|
3380
3503
|
"/",
|
|
3381
3504
|
repo
|
|
3382
3505
|
] }),
|
|
3383
|
-
/* @__PURE__ */
|
|
3384
|
-
/* @__PURE__ */
|
|
3506
|
+
/* @__PURE__ */ jsxs17("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
|
|
3507
|
+
/* @__PURE__ */ jsx44(globalLucideIcons.ExternalLink, { className: "size-3" }),
|
|
3385
3508
|
"GitHub"
|
|
3386
3509
|
] })
|
|
3387
3510
|
]
|
|
@@ -3395,7 +3518,7 @@ function GitHubInfoSuccess({
|
|
|
3395
3518
|
className
|
|
3396
3519
|
}) {
|
|
3397
3520
|
const humanizedStars = humanizeNumber(stars);
|
|
3398
|
-
return /* @__PURE__ */
|
|
3521
|
+
return /* @__PURE__ */ jsxs17(
|
|
3399
3522
|
"a",
|
|
3400
3523
|
{
|
|
3401
3524
|
href: `https://github.com/${owner}/${repo}`,
|
|
@@ -3403,17 +3526,17 @@ function GitHubInfoSuccess({
|
|
|
3403
3526
|
target: "_blank",
|
|
3404
3527
|
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}`,
|
|
3405
3528
|
children: [
|
|
3406
|
-
/* @__PURE__ */
|
|
3407
|
-
/* @__PURE__ */
|
|
3408
|
-
/* @__PURE__ */
|
|
3409
|
-
/* @__PURE__ */
|
|
3529
|
+
/* @__PURE__ */ jsxs17("p", { className: "flex items-center gap-2 truncate", children: [
|
|
3530
|
+
/* @__PURE__ */ jsxs17("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
|
|
3531
|
+
/* @__PURE__ */ jsx44("title", { children: "GitHub" }),
|
|
3532
|
+
/* @__PURE__ */ jsx44("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" })
|
|
3410
3533
|
] }),
|
|
3411
3534
|
owner,
|
|
3412
3535
|
"/",
|
|
3413
3536
|
repo
|
|
3414
3537
|
] }),
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ jsxs17("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
|
|
3539
|
+
/* @__PURE__ */ jsx44(globalLucideIcons.Star, { className: "size-3" }),
|
|
3417
3540
|
humanizedStars
|
|
3418
3541
|
] })
|
|
3419
3542
|
]
|
|
@@ -3435,10 +3558,10 @@ function humanizeNumber(num) {
|
|
|
3435
3558
|
return num.toString();
|
|
3436
3559
|
}
|
|
3437
3560
|
function FumaGithubInfo({ owner, repo, token, className }) {
|
|
3438
|
-
const [data, setData] =
|
|
3439
|
-
const [loading, setLoading] =
|
|
3440
|
-
const [error, setError] =
|
|
3441
|
-
|
|
3561
|
+
const [data, setData] = useState6(null);
|
|
3562
|
+
const [loading, setLoading] = useState6(true);
|
|
3563
|
+
const [error, setError] = useState6(null);
|
|
3564
|
+
useEffect3(() => {
|
|
3442
3565
|
const fetchRepoData = () => __async(null, null, function* () {
|
|
3443
3566
|
try {
|
|
3444
3567
|
setLoading(true);
|
|
@@ -3482,12 +3605,12 @@ function FumaGithubInfo({ owner, repo, token, className }) {
|
|
|
3482
3605
|
fetchRepoData();
|
|
3483
3606
|
}, [owner, repo, token]);
|
|
3484
3607
|
if (loading) {
|
|
3485
|
-
return /* @__PURE__ */
|
|
3608
|
+
return /* @__PURE__ */ jsx44(GitHubInfoSkeleton, { owner, repo, className });
|
|
3486
3609
|
}
|
|
3487
3610
|
if (error || !data) {
|
|
3488
|
-
return /* @__PURE__ */
|
|
3611
|
+
return /* @__PURE__ */ jsx44(GitHubInfoFallback, { owner, repo, className });
|
|
3489
3612
|
}
|
|
3490
|
-
return /* @__PURE__ */
|
|
3613
|
+
return /* @__PURE__ */ jsx44(
|
|
3491
3614
|
GitHubInfoSuccess,
|
|
3492
3615
|
{
|
|
3493
3616
|
owner,
|
|
@@ -3500,7 +3623,7 @@ function FumaGithubInfo({ owner, repo, token, className }) {
|
|
|
3500
3623
|
|
|
3501
3624
|
// src/fuma/mdx/site-x.tsx
|
|
3502
3625
|
import { useTranslations as useTranslations2 } from "next-intl";
|
|
3503
|
-
import { jsx as
|
|
3626
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3504
3627
|
function SiteX(_a) {
|
|
3505
3628
|
var _b = _a, { type, namespace, tKey, className } = _b, props = __objRest(_b, ["type", "namespace", "tKey", "className"]);
|
|
3506
3629
|
let ns = namespace;
|
|
@@ -3514,7 +3637,7 @@ function SiteX(_a) {
|
|
|
3514
3637
|
const t = useTranslations2(ns);
|
|
3515
3638
|
const text = t(key, { defaultValue: type === "site" ? "Site----" : "----@example.com" });
|
|
3516
3639
|
if (type === "site") {
|
|
3517
|
-
return /* @__PURE__ */
|
|
3640
|
+
return /* @__PURE__ */ jsx45(
|
|
3518
3641
|
"strong",
|
|
3519
3642
|
__spreadProps(__spreadValues({}, props), {
|
|
3520
3643
|
className: cn(
|
|
@@ -3526,7 +3649,7 @@ function SiteX(_a) {
|
|
|
3526
3649
|
);
|
|
3527
3650
|
}
|
|
3528
3651
|
if (type === "email") {
|
|
3529
|
-
return /* @__PURE__ */
|
|
3652
|
+
return /* @__PURE__ */ jsx45(
|
|
3530
3653
|
"a",
|
|
3531
3654
|
__spreadProps(__spreadValues({}, props), {
|
|
3532
3655
|
href: `mailto:${text}`,
|
|
@@ -3542,20 +3665,20 @@ function SiteX(_a) {
|
|
|
3542
3665
|
}
|
|
3543
3666
|
|
|
3544
3667
|
// src/fuma/mdx/zia-file.tsx
|
|
3545
|
-
import { useState as
|
|
3668
|
+
import { useState as useState7 } from "react";
|
|
3546
3669
|
import {
|
|
3547
3670
|
Collapsible,
|
|
3548
3671
|
CollapsibleContent,
|
|
3549
3672
|
CollapsibleTrigger
|
|
3550
3673
|
} from "fumadocs-ui/components/ui/collapsible";
|
|
3551
3674
|
import Link5 from "next/link";
|
|
3552
|
-
import { jsx as
|
|
3675
|
+
import { jsx as jsx46, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3553
3676
|
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";
|
|
3554
3677
|
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";
|
|
3555
3678
|
function ZiaFile(_a) {
|
|
3556
3679
|
var _b = _a, {
|
|
3557
3680
|
name,
|
|
3558
|
-
icon = /* @__PURE__ */
|
|
3681
|
+
icon = /* @__PURE__ */ jsx46(globalLucideIcons.File, {}),
|
|
3559
3682
|
className,
|
|
3560
3683
|
anotion,
|
|
3561
3684
|
href
|
|
@@ -3569,16 +3692,16 @@ function ZiaFile(_a) {
|
|
|
3569
3692
|
const validHref = typeof href === "string" && href.trim() !== "";
|
|
3570
3693
|
const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
|
|
3571
3694
|
if (validHref) {
|
|
3572
|
-
return /* @__PURE__ */
|
|
3695
|
+
return /* @__PURE__ */ jsxs18(Link5, { href, className: cn(itemVariants, className), children: [
|
|
3573
3696
|
icon,
|
|
3574
|
-
/* @__PURE__ */
|
|
3575
|
-
validAnotion && /* @__PURE__ */
|
|
3697
|
+
/* @__PURE__ */ jsx46("span", { children: name }),
|
|
3698
|
+
validAnotion && /* @__PURE__ */ jsx46("span", { className: anotionClass, children: anotion })
|
|
3576
3699
|
] });
|
|
3577
3700
|
}
|
|
3578
|
-
return /* @__PURE__ */
|
|
3701
|
+
return /* @__PURE__ */ jsxs18("div", __spreadProps(__spreadValues({ className: cn(itemVariants, className) }, rest), { children: [
|
|
3579
3702
|
icon,
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
validAnotion && /* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ jsx46("span", { children: name }),
|
|
3704
|
+
validAnotion && /* @__PURE__ */ jsx46("span", { className: anotionClass, children: anotion })
|
|
3582
3705
|
] }));
|
|
3583
3706
|
}
|
|
3584
3707
|
function ZiaFolder(_a) {
|
|
@@ -3595,26 +3718,26 @@ function ZiaFolder(_a) {
|
|
|
3595
3718
|
"className",
|
|
3596
3719
|
"children"
|
|
3597
3720
|
]);
|
|
3598
|
-
const [open, setOpen] =
|
|
3721
|
+
const [open, setOpen] = useState7(defaultOpen);
|
|
3599
3722
|
const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
|
|
3600
|
-
return /* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3602
|
-
open ? /* @__PURE__ */
|
|
3603
|
-
/* @__PURE__ */
|
|
3604
|
-
validAnotion && /* @__PURE__ */
|
|
3723
|
+
return /* @__PURE__ */ jsxs18(Collapsible, __spreadProps(__spreadValues({ open, onOpenChange: setOpen }, props), { children: [
|
|
3724
|
+
/* @__PURE__ */ jsxs18(CollapsibleTrigger, { className: cn(itemVariants, className, "w-full"), children: [
|
|
3725
|
+
open ? /* @__PURE__ */ jsx46(globalLucideIcons.FolderOpen, {}) : /* @__PURE__ */ jsx46(globalLucideIcons.Folder, {}),
|
|
3726
|
+
/* @__PURE__ */ jsx46("span", { children: name }),
|
|
3727
|
+
validAnotion && /* @__PURE__ */ jsx46("span", { className: anotionClass, children: anotion })
|
|
3605
3728
|
] }),
|
|
3606
|
-
/* @__PURE__ */
|
|
3729
|
+
/* @__PURE__ */ jsx46(CollapsibleContent, { children: /* @__PURE__ */ jsx46("div", { className: "ms-2 flex flex-col border-l ps-2", children }) })
|
|
3607
3730
|
] }));
|
|
3608
3731
|
}
|
|
3609
3732
|
|
|
3610
3733
|
// src/fuma/mdx/toc-footer-wrapper.tsx
|
|
3611
|
-
import { jsx as
|
|
3734
|
+
import { jsx as jsx47, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3612
3735
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
3613
3736
|
const showEdit = githubBaseUrl && editPath;
|
|
3614
|
-
return /* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3737
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
|
|
3738
|
+
/* @__PURE__ */ jsx47(LastUpdatedDate, { date: lastModified }),
|
|
3616
3739
|
copyButtonComponent,
|
|
3617
|
-
showEdit && /* @__PURE__ */
|
|
3740
|
+
showEdit && /* @__PURE__ */ jsx47(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
|
|
3618
3741
|
] });
|
|
3619
3742
|
}
|
|
3620
3743
|
export {
|