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