@windrun-huaiin/third-ui 5.14.1 → 6.0.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 -21
- package/dist/clerk/index.d.ts +2 -21
- package/dist/clerk/index.js +5 -2884
- package/dist/clerk/index.js.map +1 -1
- package/dist/clerk/index.mjs +3 -2872
- package/dist/clerk/index.mjs.map +1 -1
- package/dist/clerk/server.d.mts +28 -0
- package/dist/clerk/server.d.ts +28 -0
- package/dist/clerk/server.js +3025 -0
- package/dist/clerk/server.js.map +1 -0
- package/dist/clerk/server.mjs +2991 -0
- package/dist/clerk/server.mjs.map +1 -0
- package/dist/fuma/mdx/index.d.mts +1 -12
- package/dist/fuma/mdx/index.d.ts +1 -12
- package/dist/fuma/mdx/index.js +49 -263
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +50 -262
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.d.mts +15 -2
- package/dist/fuma/server.d.ts +15 -2
- package/dist/fuma/server.js +234 -49
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +231 -48
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/lib/server.d.mts +509 -465
- package/dist/lib/server.d.ts +509 -465
- package/dist/main/index.d.mts +5 -56
- package/dist/main/index.d.ts +5 -56
- package/dist/main/index.js +646 -1322
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +675 -1342
- package/dist/main/index.mjs.map +1 -1
- package/dist/main/server.d.mts +64 -0
- package/dist/main/server.d.ts +64 -0
- package/dist/main/server.js +4166 -0
- package/dist/main/server.js.map +1 -0
- package/dist/main/server.mjs +4128 -0
- package/dist/main/server.mjs.map +1 -0
- package/package.json +12 -2
- package/src/clerk/clerk-organization-client.tsx +50 -0
- package/src/clerk/clerk-organization.tsx +21 -38
- package/src/clerk/clerk-page-generator.tsx +0 -2
- package/src/clerk/clerk-provider-client.tsx +1 -1
- package/src/clerk/clerk-user-client.tsx +64 -0
- package/src/clerk/clerk-user.tsx +29 -58
- package/src/clerk/index.ts +1 -4
- package/src/clerk/server.ts +3 -0
- package/src/fuma/{mdx/fuma-banner-suit.tsx → fuma-banner-suit.tsx} +3 -6
- package/src/fuma/mdx/banner.tsx +0 -1
- package/src/fuma/mdx/index.ts +0 -2
- package/src/fuma/mdx/mermaid.tsx +3 -1
- package/src/fuma/mdx/toc-footer-wrapper.tsx +1 -0
- package/src/fuma/mdx/zia-file.tsx +0 -1
- package/src/fuma/server.ts +3 -1
- package/src/fuma/{mdx/site-x.tsx → site-x.tsx} +4 -5
- package/src/main/cta.tsx +33 -10
- package/src/main/faq-interactive.tsx +68 -0
- package/src/main/faq.tsx +62 -38
- package/src/main/features.tsx +40 -11
- package/src/main/footer.tsx +27 -16
- package/src/main/gallery-interactive.tsx +171 -0
- package/src/main/gallery.tsx +54 -101
- package/src/main/index.ts +1 -10
- package/src/main/language-detector.tsx +175 -0
- package/src/main/price-plan-interactive.tsx +273 -0
- package/src/main/price-plan.tsx +112 -129
- package/src/main/seo-content.tsx +46 -13
- package/src/main/server.ts +10 -0
- package/src/main/tips.tsx +48 -22
- package/src/main/usage.tsx +43 -11
package/dist/fuma/mdx/index.mjs
CHANGED
|
@@ -2757,8 +2757,9 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
|
|
|
2757
2757
|
const delta = e.deltaY > 0 ? -0.1 : 0.1;
|
|
2758
2758
|
setScale((prev) => clamp(prev + delta, 0.25, 10));
|
|
2759
2759
|
} else {
|
|
2760
|
+
e.preventDefault();
|
|
2760
2761
|
e.stopPropagation();
|
|
2761
|
-
setTranslate((prev) => ({ x: prev.x, y: prev.y - e.deltaY }));
|
|
2762
|
+
setTranslate((prev) => ({ x: prev.x - e.deltaX, y: prev.y - e.deltaY }));
|
|
2762
2763
|
}
|
|
2763
2764
|
}, []);
|
|
2764
2765
|
const onPointerDown = useCallback((e) => {
|
|
@@ -3563,188 +3564,20 @@ function LastUpdatedDate({ date }) {
|
|
|
3563
3564
|
] });
|
|
3564
3565
|
}
|
|
3565
3566
|
|
|
3566
|
-
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
3567
|
-
import { useTranslations } from "next-intl";
|
|
3568
|
-
|
|
3569
|
-
// src/fuma/mdx/banner.tsx
|
|
3570
|
-
import { cva as cva2 } from "class-variance-authority";
|
|
3571
|
-
import { useEffect as useEffect2, useState as useState5 } from "react";
|
|
3572
|
-
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3573
|
-
var buttonVariants2 = cva2(
|
|
3574
|
-
"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",
|
|
3575
|
-
{
|
|
3576
|
-
variants: {
|
|
3577
|
-
color: {
|
|
3578
|
-
primary: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
3579
|
-
outline: "border hover:bg-accent hover:text-accent-foreground",
|
|
3580
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
3581
|
-
secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
|
|
3582
|
-
},
|
|
3583
|
-
size: {
|
|
3584
|
-
sm: "gap-1 px-2 py-1.5 text-xs",
|
|
3585
|
-
icon: "p-1.5 [&_svg]:size-5",
|
|
3586
|
-
"icon-sm": "p-1.5 [&_svg]:size-4.5"
|
|
3587
|
-
}
|
|
3588
|
-
}
|
|
3589
|
-
}
|
|
3590
|
-
);
|
|
3591
|
-
function Banner(_a) {
|
|
3592
|
-
var _b = _a, {
|
|
3593
|
-
id,
|
|
3594
|
-
variant = "rainbow",
|
|
3595
|
-
changeLayout = true,
|
|
3596
|
-
height = 3
|
|
3597
|
-
} = _b, props = __objRest(_b, [
|
|
3598
|
-
"id",
|
|
3599
|
-
"variant",
|
|
3600
|
-
"changeLayout",
|
|
3601
|
-
"height"
|
|
3602
|
-
]);
|
|
3603
|
-
const [open, setOpen] = useState5(true);
|
|
3604
|
-
const globalKey = id ? `nd-banner-${id}` : null;
|
|
3605
|
-
const bannerHeight = `${height}rem`;
|
|
3606
|
-
const headerStartHeight = `${height + 5.5}rem`;
|
|
3607
|
-
useEffect2(() => {
|
|
3608
|
-
if (globalKey) setOpen(localStorage.getItem(globalKey) !== "true");
|
|
3609
|
-
}, [globalKey]);
|
|
3610
|
-
if (!open) return null;
|
|
3611
|
-
return /* @__PURE__ */ jsxs16(
|
|
3612
|
-
"div",
|
|
3613
|
-
__spreadProps(__spreadValues({
|
|
3614
|
-
id
|
|
3615
|
-
}, props), {
|
|
3616
|
-
className: cn(
|
|
3617
|
-
"flex flex-row items-center justify-center px-4 text-center text-sm font-medium",
|
|
3618
|
-
"bg-neutral-100 dark:bg-neutral-900",
|
|
3619
|
-
!open && "hidden",
|
|
3620
|
-
props.className
|
|
3621
|
-
),
|
|
3622
|
-
style: {
|
|
3623
|
-
// 将 fuma.css 中的 .sticky.top-0.z-40 样式完全移到这里
|
|
3624
|
-
position: "fixed",
|
|
3625
|
-
top: 0,
|
|
3626
|
-
left: 0,
|
|
3627
|
-
width: "100vw",
|
|
3628
|
-
zIndex: 1001,
|
|
3629
|
-
height: bannerHeight,
|
|
3630
|
-
minHeight: bannerHeight,
|
|
3631
|
-
maxHeight: bannerHeight,
|
|
3632
|
-
margin: 0,
|
|
3633
|
-
borderRadius: 0
|
|
3634
|
-
},
|
|
3635
|
-
children: [
|
|
3636
|
-
globalKey ? /* @__PURE__ */ jsx42("style", { children: `.${globalKey} #${id} { display: none; }` }) : null,
|
|
3637
|
-
globalKey ? /* @__PURE__ */ jsx42(
|
|
3638
|
-
"script",
|
|
3639
|
-
{
|
|
3640
|
-
dangerouslySetInnerHTML: {
|
|
3641
|
-
__html: `if (localStorage.getItem('${globalKey}') === 'true') document.documentElement.classList.add('${globalKey}');`
|
|
3642
|
-
}
|
|
3643
|
-
}
|
|
3644
|
-
) : null,
|
|
3645
|
-
variant === "rainbow" ? rainbowLayer : null,
|
|
3646
|
-
props.children,
|
|
3647
|
-
id ? /* @__PURE__ */ jsx42(
|
|
3648
|
-
"button",
|
|
3649
|
-
{
|
|
3650
|
-
type: "button",
|
|
3651
|
-
"aria-label": "Close Banner",
|
|
3652
|
-
onClick: () => {
|
|
3653
|
-
setOpen(false);
|
|
3654
|
-
if (globalKey) localStorage.setItem(globalKey, "true");
|
|
3655
|
-
},
|
|
3656
|
-
className: cn(
|
|
3657
|
-
buttonVariants2({
|
|
3658
|
-
color: "ghost",
|
|
3659
|
-
className: "absolute end-2 top-1/2 -translate-y-1/2 text-neutral-600 dark:text-neutral-400",
|
|
3660
|
-
size: "icon"
|
|
3661
|
-
})
|
|
3662
|
-
),
|
|
3663
|
-
children: /* @__PURE__ */ jsx42(globalLucideIcons.X, {})
|
|
3664
|
-
}
|
|
3665
|
-
) : null
|
|
3666
|
-
]
|
|
3667
|
-
})
|
|
3668
|
-
);
|
|
3669
|
-
}
|
|
3670
|
-
var maskImage = "linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)";
|
|
3671
|
-
var rainbowLayer = /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
3672
|
-
/* @__PURE__ */ jsx42(
|
|
3673
|
-
"div",
|
|
3674
|
-
{
|
|
3675
|
-
className: "absolute inset-0 z-[-1]",
|
|
3676
|
-
style: {
|
|
3677
|
-
maskImage,
|
|
3678
|
-
maskComposite: "intersect",
|
|
3679
|
-
animation: "fd-moving-banner 16s linear infinite",
|
|
3680
|
-
"--start": "rgba(0,87,255,0.5)",
|
|
3681
|
-
"--mid": "rgba(255,0,166,0.77)",
|
|
3682
|
-
"--end": "rgba(255,77,0,0.4)",
|
|
3683
|
-
"--via": "rgba(164,255,68,0.4)",
|
|
3684
|
-
animationDirection: "reverse",
|
|
3685
|
-
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))",
|
|
3686
|
-
backgroundSize: "200% 100%",
|
|
3687
|
-
mixBlendMode: "difference"
|
|
3688
|
-
}
|
|
3689
|
-
}
|
|
3690
|
-
),
|
|
3691
|
-
/* @__PURE__ */ jsx42(
|
|
3692
|
-
"div",
|
|
3693
|
-
{
|
|
3694
|
-
className: "absolute inset-0 z-[-1]",
|
|
3695
|
-
style: {
|
|
3696
|
-
maskImage,
|
|
3697
|
-
maskComposite: "intersect",
|
|
3698
|
-
animation: "fd-moving-banner 20s linear infinite",
|
|
3699
|
-
"--start": "rgba(255,120,120,0.5)",
|
|
3700
|
-
"--mid": "rgba(36,188,255,0.4)",
|
|
3701
|
-
"--end": "rgba(64,0,255,0.51)",
|
|
3702
|
-
"--via": "rgba(255,89,0,0.56)",
|
|
3703
|
-
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))",
|
|
3704
|
-
backgroundSize: "200% 100%",
|
|
3705
|
-
mixBlendMode: "color-dodge"
|
|
3706
|
-
}
|
|
3707
|
-
}
|
|
3708
|
-
),
|
|
3709
|
-
/* @__PURE__ */ jsx42("style", { children: `@keyframes fd-moving-banner {
|
|
3710
|
-
from { background-position: 0% 0; }
|
|
3711
|
-
to { background-position: 100% 0; }
|
|
3712
|
-
}` })
|
|
3713
|
-
] });
|
|
3714
|
-
|
|
3715
|
-
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
3716
|
-
import { Fragment as Fragment6, jsx as jsx43 } from "react/jsx-runtime";
|
|
3717
|
-
function FumaBannerSuit({ showBanner }) {
|
|
3718
|
-
const t = useTranslations("home");
|
|
3719
|
-
const heightValue = showBanner ? 3 : 0.5;
|
|
3720
|
-
const height = `${heightValue}rem`;
|
|
3721
|
-
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(
|
|
3722
|
-
"div",
|
|
3723
|
-
{
|
|
3724
|
-
className: "fixed top-0 left-0 w-screen z-[1001] m-0 rounded-none bg-neutral-100 dark:bg-neutral-900",
|
|
3725
|
-
style: {
|
|
3726
|
-
height,
|
|
3727
|
-
minHeight: height,
|
|
3728
|
-
maxHeight: height
|
|
3729
|
-
}
|
|
3730
|
-
}
|
|
3731
|
-
) });
|
|
3732
|
-
}
|
|
3733
|
-
|
|
3734
3567
|
// src/fuma/mdx/fuma-github-info.tsx
|
|
3735
|
-
import { useEffect as
|
|
3736
|
-
import { jsx as
|
|
3568
|
+
import { useEffect as useEffect2, useState as useState5 } from "react";
|
|
3569
|
+
import { jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3737
3570
|
function GitHubInfoSkeleton({ owner, repo, className }) {
|
|
3738
|
-
return /* @__PURE__ */
|
|
3739
|
-
/* @__PURE__ */
|
|
3740
|
-
/* @__PURE__ */
|
|
3741
|
-
/* @__PURE__ */
|
|
3571
|
+
return /* @__PURE__ */ jsxs16("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: [
|
|
3572
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
3573
|
+
/* @__PURE__ */ jsx42("div", { className: "size-3.5 bg-fd-muted rounded" }),
|
|
3574
|
+
/* @__PURE__ */ jsx42("div", { className: "h-4 bg-fd-muted rounded w-20" })
|
|
3742
3575
|
] }),
|
|
3743
|
-
/* @__PURE__ */
|
|
3576
|
+
/* @__PURE__ */ jsx42("div", { className: "h-3 bg-fd-muted rounded w-8" })
|
|
3744
3577
|
] });
|
|
3745
3578
|
}
|
|
3746
3579
|
function GitHubInfoFallback({ owner, repo, className }) {
|
|
3747
|
-
return /* @__PURE__ */
|
|
3580
|
+
return /* @__PURE__ */ jsxs16(
|
|
3748
3581
|
"a",
|
|
3749
3582
|
{
|
|
3750
3583
|
href: `https://github.com/${owner}/${repo}`,
|
|
@@ -3752,17 +3585,17 @@ function GitHubInfoFallback({ owner, repo, className }) {
|
|
|
3752
3585
|
target: "_blank",
|
|
3753
3586
|
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}`,
|
|
3754
3587
|
children: [
|
|
3755
|
-
/* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
3757
|
-
/* @__PURE__ */
|
|
3758
|
-
/* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ jsxs16("p", { className: "flex items-center gap-2 truncate", children: [
|
|
3589
|
+
/* @__PURE__ */ jsxs16("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
|
|
3590
|
+
/* @__PURE__ */ jsx42("title", { children: "GitHub" }),
|
|
3591
|
+
/* @__PURE__ */ jsx42("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" })
|
|
3759
3592
|
] }),
|
|
3760
3593
|
owner,
|
|
3761
3594
|
"/",
|
|
3762
3595
|
repo
|
|
3763
3596
|
] }),
|
|
3764
|
-
/* @__PURE__ */
|
|
3765
|
-
/* @__PURE__ */
|
|
3597
|
+
/* @__PURE__ */ jsxs16("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
|
|
3598
|
+
/* @__PURE__ */ jsx42(globalLucideIcons.ExternalLink, { className: "size-3" }),
|
|
3766
3599
|
"GitHub"
|
|
3767
3600
|
] })
|
|
3768
3601
|
]
|
|
@@ -3776,7 +3609,7 @@ function GitHubInfoSuccess({
|
|
|
3776
3609
|
className
|
|
3777
3610
|
}) {
|
|
3778
3611
|
const humanizedStars = humanizeNumber(stars);
|
|
3779
|
-
return /* @__PURE__ */
|
|
3612
|
+
return /* @__PURE__ */ jsxs16(
|
|
3780
3613
|
"a",
|
|
3781
3614
|
{
|
|
3782
3615
|
href: `https://github.com/${owner}/${repo}`,
|
|
@@ -3784,17 +3617,17 @@ function GitHubInfoSuccess({
|
|
|
3784
3617
|
target: "_blank",
|
|
3785
3618
|
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}`,
|
|
3786
3619
|
children: [
|
|
3787
|
-
/* @__PURE__ */
|
|
3788
|
-
/* @__PURE__ */
|
|
3789
|
-
/* @__PURE__ */
|
|
3790
|
-
/* @__PURE__ */
|
|
3620
|
+
/* @__PURE__ */ jsxs16("p", { className: "flex items-center gap-2 truncate", children: [
|
|
3621
|
+
/* @__PURE__ */ jsxs16("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
|
|
3622
|
+
/* @__PURE__ */ jsx42("title", { children: "GitHub" }),
|
|
3623
|
+
/* @__PURE__ */ jsx42("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" })
|
|
3791
3624
|
] }),
|
|
3792
3625
|
owner,
|
|
3793
3626
|
"/",
|
|
3794
3627
|
repo
|
|
3795
3628
|
] }),
|
|
3796
|
-
/* @__PURE__ */
|
|
3797
|
-
/* @__PURE__ */
|
|
3629
|
+
/* @__PURE__ */ jsxs16("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
|
|
3630
|
+
/* @__PURE__ */ jsx42(globalLucideIcons.Star, { className: "size-3" }),
|
|
3798
3631
|
humanizedStars
|
|
3799
3632
|
] })
|
|
3800
3633
|
]
|
|
@@ -3816,10 +3649,10 @@ function humanizeNumber(num) {
|
|
|
3816
3649
|
return num.toString();
|
|
3817
3650
|
}
|
|
3818
3651
|
function FumaGithubInfo({ owner, repo, token, className }) {
|
|
3819
|
-
const [data, setData] =
|
|
3820
|
-
const [loading, setLoading] =
|
|
3821
|
-
const [error, setError] =
|
|
3822
|
-
|
|
3652
|
+
const [data, setData] = useState5(null);
|
|
3653
|
+
const [loading, setLoading] = useState5(true);
|
|
3654
|
+
const [error, setError] = useState5(null);
|
|
3655
|
+
useEffect2(() => {
|
|
3823
3656
|
const fetchRepoData = () => __async(null, null, function* () {
|
|
3824
3657
|
try {
|
|
3825
3658
|
setLoading(true);
|
|
@@ -3863,12 +3696,12 @@ function FumaGithubInfo({ owner, repo, token, className }) {
|
|
|
3863
3696
|
fetchRepoData();
|
|
3864
3697
|
}, [owner, repo, token]);
|
|
3865
3698
|
if (loading) {
|
|
3866
|
-
return /* @__PURE__ */
|
|
3699
|
+
return /* @__PURE__ */ jsx42(GitHubInfoSkeleton, { owner, repo, className });
|
|
3867
3700
|
}
|
|
3868
3701
|
if (error || !data) {
|
|
3869
|
-
return /* @__PURE__ */
|
|
3702
|
+
return /* @__PURE__ */ jsx42(GitHubInfoFallback, { owner, repo, className });
|
|
3870
3703
|
}
|
|
3871
|
-
return /* @__PURE__ */
|
|
3704
|
+
return /* @__PURE__ */ jsx42(
|
|
3872
3705
|
GitHubInfoSuccess,
|
|
3873
3706
|
{
|
|
3874
3707
|
owner,
|
|
@@ -3879,64 +3712,21 @@ function FumaGithubInfo({ owner, repo, token, className }) {
|
|
|
3879
3712
|
);
|
|
3880
3713
|
}
|
|
3881
3714
|
|
|
3882
|
-
// src/fuma/mdx/site-x.tsx
|
|
3883
|
-
import { useTranslations as useTranslations2 } from "next-intl";
|
|
3884
|
-
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3885
|
-
function SiteX(_a) {
|
|
3886
|
-
var _b = _a, { type, namespace, tKey, className } = _b, props = __objRest(_b, ["type", "namespace", "tKey", "className"]);
|
|
3887
|
-
let ns = namespace;
|
|
3888
|
-
let key = tKey;
|
|
3889
|
-
if (!ns) {
|
|
3890
|
-
ns = type === "site" ? "home" : "footer";
|
|
3891
|
-
}
|
|
3892
|
-
if (!key) {
|
|
3893
|
-
key = type === "site" ? "title" : "email";
|
|
3894
|
-
}
|
|
3895
|
-
const t = useTranslations2(ns);
|
|
3896
|
-
const text = t(key, { defaultValue: type === "site" ? "Site----" : "----@example.com" });
|
|
3897
|
-
if (type === "site") {
|
|
3898
|
-
return /* @__PURE__ */ jsx45(
|
|
3899
|
-
"strong",
|
|
3900
|
-
__spreadProps(__spreadValues({}, props), {
|
|
3901
|
-
className: cn(
|
|
3902
|
-
"font-extrabold text-sm",
|
|
3903
|
-
className
|
|
3904
|
-
),
|
|
3905
|
-
children: text
|
|
3906
|
-
})
|
|
3907
|
-
);
|
|
3908
|
-
}
|
|
3909
|
-
if (type === "email") {
|
|
3910
|
-
return /* @__PURE__ */ jsx45(
|
|
3911
|
-
"a",
|
|
3912
|
-
__spreadProps(__spreadValues({}, props), {
|
|
3913
|
-
href: `mailto:${text}`,
|
|
3914
|
-
className: cn(
|
|
3915
|
-
"font-mono underline text-sm",
|
|
3916
|
-
className
|
|
3917
|
-
),
|
|
3918
|
-
children: text
|
|
3919
|
-
})
|
|
3920
|
-
);
|
|
3921
|
-
}
|
|
3922
|
-
return null;
|
|
3923
|
-
}
|
|
3924
|
-
|
|
3925
3715
|
// src/fuma/mdx/zia-file.tsx
|
|
3926
|
-
import { useState as
|
|
3716
|
+
import { useState as useState6 } from "react";
|
|
3927
3717
|
import {
|
|
3928
3718
|
Collapsible,
|
|
3929
3719
|
CollapsibleContent,
|
|
3930
3720
|
CollapsibleTrigger
|
|
3931
3721
|
} from "fumadocs-ui/components/ui/collapsible";
|
|
3932
3722
|
import Link5 from "next/link";
|
|
3933
|
-
import { jsx as
|
|
3723
|
+
import { jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3934
3724
|
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";
|
|
3935
3725
|
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";
|
|
3936
3726
|
function ZiaFile(_a) {
|
|
3937
3727
|
var _b = _a, {
|
|
3938
3728
|
name,
|
|
3939
|
-
icon = /* @__PURE__ */
|
|
3729
|
+
icon = /* @__PURE__ */ jsx43(globalLucideIcons.File, {}),
|
|
3940
3730
|
className,
|
|
3941
3731
|
anotion,
|
|
3942
3732
|
href
|
|
@@ -3950,16 +3740,16 @@ function ZiaFile(_a) {
|
|
|
3950
3740
|
const validHref = typeof href === "string" && href.trim() !== "";
|
|
3951
3741
|
const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
|
|
3952
3742
|
if (validHref) {
|
|
3953
|
-
return /* @__PURE__ */
|
|
3743
|
+
return /* @__PURE__ */ jsxs17(Link5, { href, className: cn(itemVariants, className), children: [
|
|
3954
3744
|
icon,
|
|
3955
|
-
/* @__PURE__ */
|
|
3956
|
-
validAnotion && /* @__PURE__ */
|
|
3745
|
+
/* @__PURE__ */ jsx43("span", { children: name }),
|
|
3746
|
+
validAnotion && /* @__PURE__ */ jsx43("span", { className: anotionClass, children: anotion })
|
|
3957
3747
|
] });
|
|
3958
3748
|
}
|
|
3959
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ jsxs17("div", __spreadProps(__spreadValues({ className: cn(itemVariants, className) }, rest), { children: [
|
|
3960
3750
|
icon,
|
|
3961
|
-
/* @__PURE__ */
|
|
3962
|
-
validAnotion && /* @__PURE__ */
|
|
3751
|
+
/* @__PURE__ */ jsx43("span", { children: name }),
|
|
3752
|
+
validAnotion && /* @__PURE__ */ jsx43("span", { className: anotionClass, children: anotion })
|
|
3963
3753
|
] }));
|
|
3964
3754
|
}
|
|
3965
3755
|
function ZiaFolder(_a) {
|
|
@@ -3976,31 +3766,30 @@ function ZiaFolder(_a) {
|
|
|
3976
3766
|
"className",
|
|
3977
3767
|
"children"
|
|
3978
3768
|
]);
|
|
3979
|
-
const [open, setOpen] =
|
|
3769
|
+
const [open, setOpen] = useState6(defaultOpen);
|
|
3980
3770
|
const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
|
|
3981
|
-
return /* @__PURE__ */
|
|
3982
|
-
/* @__PURE__ */
|
|
3983
|
-
open ? /* @__PURE__ */
|
|
3984
|
-
/* @__PURE__ */
|
|
3985
|
-
validAnotion && /* @__PURE__ */
|
|
3771
|
+
return /* @__PURE__ */ jsxs17(Collapsible, __spreadProps(__spreadValues({ open, onOpenChange: setOpen }, props), { children: [
|
|
3772
|
+
/* @__PURE__ */ jsxs17(CollapsibleTrigger, { className: cn(itemVariants, className, "w-full"), children: [
|
|
3773
|
+
open ? /* @__PURE__ */ jsx43(globalLucideIcons.FolderOpen, {}) : /* @__PURE__ */ jsx43(globalLucideIcons.Folder, {}),
|
|
3774
|
+
/* @__PURE__ */ jsx43("span", { children: name }),
|
|
3775
|
+
validAnotion && /* @__PURE__ */ jsx43("span", { className: anotionClass, children: anotion })
|
|
3986
3776
|
] }),
|
|
3987
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ jsx43(CollapsibleContent, { children: /* @__PURE__ */ jsx43("div", { className: "ms-2 flex flex-col border-l ps-2", children }) })
|
|
3988
3778
|
] }));
|
|
3989
3779
|
}
|
|
3990
3780
|
|
|
3991
3781
|
// src/fuma/mdx/toc-footer-wrapper.tsx
|
|
3992
|
-
import { jsx as
|
|
3782
|
+
import { jsx as jsx44, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3993
3783
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
3994
3784
|
const showEdit = githubBaseUrl && editPath;
|
|
3995
|
-
return /* @__PURE__ */
|
|
3996
|
-
/* @__PURE__ */
|
|
3785
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
|
|
3786
|
+
/* @__PURE__ */ jsx44(LastUpdatedDate, { date: lastModified }),
|
|
3997
3787
|
copyButtonComponent,
|
|
3998
|
-
showEdit && /* @__PURE__ */
|
|
3788
|
+
showEdit && /* @__PURE__ */ jsx44(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
|
|
3999
3789
|
] });
|
|
4000
3790
|
}
|
|
4001
3791
|
export {
|
|
4002
3792
|
EditOnGitHub,
|
|
4003
|
-
FumaBannerSuit,
|
|
4004
3793
|
FumaGithubInfo,
|
|
4005
3794
|
GradientButton,
|
|
4006
3795
|
ImageGrid,
|
|
@@ -4008,7 +3797,6 @@ export {
|
|
|
4008
3797
|
LLMCopyButton,
|
|
4009
3798
|
LastUpdatedDate,
|
|
4010
3799
|
Mermaid,
|
|
4011
|
-
SiteX,
|
|
4012
3800
|
TocFooterWrapper,
|
|
4013
3801
|
TrophyCard,
|
|
4014
3802
|
ZiaCard,
|