@windrun-huaiin/third-ui 5.6.0 → 5.7.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.
@@ -60,27 +60,6 @@ declare function GradientButton({ title, icon, href, align, }: {
60
60
  align?: 'left' | 'center' | 'right';
61
61
  }): react_jsx_runtime.JSX.Element;
62
62
 
63
- interface TocFooterProps {
64
- /**
65
- * The last modified date of the page.
66
- */
67
- lastModified: string | undefined;
68
- /**
69
- * The path to the file for the \"Edit on GitHub\" link.
70
- * This should be the relative path from the repository root, e.g., 'src/mdx/docs/your-page.mdx'.
71
- */
72
- editPath?: string | undefined;
73
- /**
74
- * Whether to show the copy button.
75
- */
76
- showCopy?: boolean | undefined;
77
- /**
78
- * GitHub base URL for edit links
79
- */
80
- githubBaseUrl?: string;
81
- }
82
- declare function TocFooter({ lastModified, showCopy, editPath, githubBaseUrl }: TocFooterProps): react_jsx_runtime.JSX.Element;
83
-
84
63
  declare function LLMCopyButton({ llmApiUrl }?: {
85
64
  llmApiUrl?: string;
86
65
  }): react_jsx_runtime.JSX.Element;
@@ -135,4 +114,12 @@ interface ZiaFolderProps extends HTMLAttributes<HTMLDivElement> {
135
114
  declare function ZiaFile({ name, icon, className, anotion, href, ...rest }: ZiaFileProps): React.ReactElement;
136
115
  declare function ZiaFolder({ name, anotion, defaultOpen, className, children, ...props }: ZiaFolderProps): React.ReactElement;
137
116
 
138
- export { EditOnGitHub, FumaBannerSuit, FumaGithubInfo, GradientButton, ImageGrid, ImageZoom, type ImageZoomProps, LLMCopyButton, LastUpdatedDate, Mermaid, SiteX, type SiteXProps, TocFooter, TrophyCard, ZiaCard, type ZiaCardProps, ZiaFile, type ZiaFileProps, ZiaFolder, type ZiaFolderProps };
117
+ interface TocFooterProps {
118
+ lastModified: string | undefined;
119
+ editPath?: string;
120
+ githubBaseUrl?: string;
121
+ copyButtonComponent?: React.ReactNode;
122
+ }
123
+ declare function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }: TocFooterProps): react_jsx_runtime.JSX.Element;
124
+
125
+ export { EditOnGitHub, FumaBannerSuit, FumaGithubInfo, GradientButton, ImageGrid, ImageZoom, type ImageZoomProps, LLMCopyButton, LastUpdatedDate, Mermaid, SiteX, type SiteXProps, TocFooterWrapper, TrophyCard, ZiaCard, type ZiaCardProps, ZiaFile, type ZiaFileProps, ZiaFolder, type ZiaFolderProps };
@@ -60,27 +60,6 @@ declare function GradientButton({ title, icon, href, align, }: {
60
60
  align?: 'left' | 'center' | 'right';
61
61
  }): react_jsx_runtime.JSX.Element;
62
62
 
63
- interface TocFooterProps {
64
- /**
65
- * The last modified date of the page.
66
- */
67
- lastModified: string | undefined;
68
- /**
69
- * The path to the file for the \"Edit on GitHub\" link.
70
- * This should be the relative path from the repository root, e.g., 'src/mdx/docs/your-page.mdx'.
71
- */
72
- editPath?: string | undefined;
73
- /**
74
- * Whether to show the copy button.
75
- */
76
- showCopy?: boolean | undefined;
77
- /**
78
- * GitHub base URL for edit links
79
- */
80
- githubBaseUrl?: string;
81
- }
82
- declare function TocFooter({ lastModified, showCopy, editPath, githubBaseUrl }: TocFooterProps): react_jsx_runtime.JSX.Element;
83
-
84
63
  declare function LLMCopyButton({ llmApiUrl }?: {
85
64
  llmApiUrl?: string;
86
65
  }): react_jsx_runtime.JSX.Element;
@@ -135,4 +114,12 @@ interface ZiaFolderProps extends HTMLAttributes<HTMLDivElement> {
135
114
  declare function ZiaFile({ name, icon, className, anotion, href, ...rest }: ZiaFileProps): React.ReactElement;
136
115
  declare function ZiaFolder({ name, anotion, defaultOpen, className, children, ...props }: ZiaFolderProps): React.ReactElement;
137
116
 
138
- export { EditOnGitHub, FumaBannerSuit, FumaGithubInfo, GradientButton, ImageGrid, ImageZoom, type ImageZoomProps, LLMCopyButton, LastUpdatedDate, Mermaid, SiteX, type SiteXProps, TocFooter, TrophyCard, ZiaCard, type ZiaCardProps, ZiaFile, type ZiaFileProps, ZiaFolder, type ZiaFolderProps };
117
+ interface TocFooterProps {
118
+ lastModified: string | undefined;
119
+ editPath?: string;
120
+ githubBaseUrl?: string;
121
+ copyButtonComponent?: React.ReactNode;
122
+ }
123
+ declare function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }: TocFooterProps): react_jsx_runtime.JSX.Element;
124
+
125
+ export { EditOnGitHub, FumaBannerSuit, FumaGithubInfo, GradientButton, ImageGrid, ImageZoom, type ImageZoomProps, LLMCopyButton, LastUpdatedDate, Mermaid, SiteX, type SiteXProps, TocFooterWrapper, TrophyCard, ZiaCard, type ZiaCardProps, ZiaFile, type ZiaFileProps, ZiaFolder, type ZiaFolderProps };
@@ -90,7 +90,7 @@ __export(mdx_exports, {
90
90
  LastUpdatedDate: () => LastUpdatedDate,
91
91
  Mermaid: () => Mermaid,
92
92
  SiteX: () => SiteX,
93
- TocFooter: () => TocFooter,
93
+ TocFooterWrapper: () => TocFooterWrapper,
94
94
  TrophyCard: () => TrophyCard,
95
95
  ZiaCard: () => ZiaCard,
96
96
  ZiaFile: () => ZiaFile,
@@ -3123,22 +3123,28 @@ function LLMCopyButton({ llmApiUrl } = {}) {
3123
3123
  const locale = params.locale;
3124
3124
  const slug = params.slug;
3125
3125
  const [checked, onClick] = (0, import_use_copy_button.useCopyButton)(() => __async(null, null, function* () {
3126
- var _a;
3127
3126
  setLoading(true);
3128
3127
  const path = slug && Array.isArray(slug) ? slug.join("/") : "";
3129
3128
  const apiPrefix = llmApiUrl || "/api/llm-content";
3130
3129
  const apiUrl = `${apiPrefix}?locale=${encodeURIComponent(locale)}&path=${encodeURIComponent(path)}`;
3131
3130
  console.log("Fetching LLM content from:", apiUrl);
3131
+ let content;
3132
3132
  try {
3133
- const content = (_a = cache.get(apiUrl)) != null ? _a : yield fetch(apiUrl).then((res) => {
3133
+ if (cache.has(apiUrl)) {
3134
+ content = cache.get(apiUrl);
3135
+ } else {
3136
+ const res = yield fetch(apiUrl);
3134
3137
  if (!res.ok) {
3135
- throw new Error(`Failed to fetch LLM content: ${res.status} ${res.statusText}`);
3138
+ content = `Error: Failed to fetch LLM content: ${res.status} ${res.statusText}`;
3139
+ } else {
3140
+ content = yield res.text();
3141
+ cache.set(apiUrl, content);
3136
3142
  }
3137
- return res.text();
3138
- });
3139
- cache.set(apiUrl, content);
3143
+ }
3140
3144
  yield navigator.clipboard.writeText(content);
3141
3145
  } catch (error) {
3146
+ const errMsg = `Error: ${error instanceof Error ? error.message : String(error)}`;
3147
+ yield navigator.clipboard.writeText(errMsg);
3142
3148
  console.error("Error fetching or copying LLM content:", error);
3143
3149
  } finally {
3144
3150
  setLoading(false);
@@ -3183,40 +3189,29 @@ function LastUpdatedDate({ date }) {
3183
3189
  ] });
3184
3190
  }
3185
3191
 
3186
- // src/fuma/mdx/toc.tsx
3187
- var import_jsx_runtime42 = require("react/jsx-runtime");
3188
- function TocFooter({ lastModified, showCopy, editPath, githubBaseUrl }) {
3189
- const showEdit = githubBaseUrl && editPath;
3190
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
3191
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LastUpdatedDate, { date: lastModified }),
3192
- showCopy && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LLMCopyButton, {}),
3193
- showEdit && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
3194
- ] });
3195
- }
3196
-
3197
3192
  // src/fuma/mdx/fuma-banner-suit.tsx
3198
3193
  var import_banner = require("fumadocs-ui/components/banner");
3199
3194
  var import_next_intl = require("next-intl");
3200
- var import_jsx_runtime43 = require("react/jsx-runtime");
3195
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3201
3196
  function FumaBannerSuit({ showText }) {
3202
3197
  const t = (0, import_next_intl.useTranslations)("home");
3203
- return showText ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_banner.Banner, { variant: "rainbow", changeLayout: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xl", children: t("banner") }) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_banner.Banner, { variant: "normal", changeLayout: true, className: "bg-white dark:bg-[rgb(10,10,10)]" });
3198
+ 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)]" });
3204
3199
  }
3205
3200
 
3206
3201
  // src/fuma/mdx/fuma-github-info.tsx
3207
3202
  var import_react39 = require("react");
3208
- var import_jsx_runtime44 = require("react/jsx-runtime");
3203
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3209
3204
  function GitHubInfoSkeleton({ owner, repo, className }) {
3210
- 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: [
3211
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
3212
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "size-3.5 bg-fd-muted rounded" }),
3213
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-4 bg-fd-muted rounded w-20" })
3205
+ 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: [
3206
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
3207
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "size-3.5 bg-fd-muted rounded" }),
3208
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "h-4 bg-fd-muted rounded w-20" })
3214
3209
  ] }),
3215
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-3 bg-fd-muted rounded w-8" })
3210
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "h-3 bg-fd-muted rounded w-8" })
3216
3211
  ] });
3217
3212
  }
3218
3213
  function GitHubInfoFallback({ owner, repo, className }) {
3219
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3214
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3220
3215
  "a",
3221
3216
  {
3222
3217
  href: `https://github.com/${owner}/${repo}`,
@@ -3224,17 +3219,17 @@ function GitHubInfoFallback({ owner, repo, className }) {
3224
3219
  target: "_blank",
3225
3220
  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}`,
3226
3221
  children: [
3227
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3228
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3229
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("title", { children: "GitHub" }),
3230
- /* @__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" })
3222
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3223
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3224
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("title", { children: "GitHub" }),
3225
+ /* @__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" })
3231
3226
  ] }),
3232
3227
  owner,
3233
3228
  "/",
3234
3229
  repo
3235
3230
  ] }),
3236
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3237
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.ExternalLink, { className: "size-3" }),
3231
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3232
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.ExternalLink, { className: "size-3" }),
3238
3233
  "GitHub"
3239
3234
  ] })
3240
3235
  ]
@@ -3248,7 +3243,7 @@ function GitHubInfoSuccess({
3248
3243
  className
3249
3244
  }) {
3250
3245
  const humanizedStars = humanizeNumber(stars);
3251
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3246
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3252
3247
  "a",
3253
3248
  {
3254
3249
  href: `https://github.com/${owner}/${repo}`,
@@ -3256,17 +3251,17 @@ function GitHubInfoSuccess({
3256
3251
  target: "_blank",
3257
3252
  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}`,
3258
3253
  children: [
3259
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3260
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3261
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("title", { children: "GitHub" }),
3262
- /* @__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" })
3254
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
3255
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
3256
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("title", { children: "GitHub" }),
3257
+ /* @__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" })
3263
3258
  ] }),
3264
3259
  owner,
3265
3260
  "/",
3266
3261
  repo
3267
3262
  ] }),
3268
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3269
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.Star, { className: "size-3" }),
3263
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
3264
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.Star, { className: "size-3" }),
3270
3265
  humanizedStars
3271
3266
  ] })
3272
3267
  ]
@@ -3335,12 +3330,12 @@ function FumaGithubInfo({ owner, repo, token, className }) {
3335
3330
  fetchRepoData();
3336
3331
  }, [owner, repo, token]);
3337
3332
  if (loading) {
3338
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GitHubInfoSkeleton, { owner, repo, className });
3333
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(GitHubInfoSkeleton, { owner, repo, className });
3339
3334
  }
3340
3335
  if (error || !data) {
3341
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GitHubInfoFallback, { owner, repo, className });
3336
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(GitHubInfoFallback, { owner, repo, className });
3342
3337
  }
3343
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3338
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3344
3339
  GitHubInfoSuccess,
3345
3340
  {
3346
3341
  owner,
@@ -3353,7 +3348,7 @@ function FumaGithubInfo({ owner, repo, token, className }) {
3353
3348
 
3354
3349
  // src/fuma/mdx/site-x.tsx
3355
3350
  var import_next_intl2 = require("next-intl");
3356
- var import_jsx_runtime45 = require("react/jsx-runtime");
3351
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3357
3352
  function SiteX(_a) {
3358
3353
  var _b = _a, { type, namespace, tKey, className } = _b, props = __objRest(_b, ["type", "namespace", "tKey", "className"]);
3359
3354
  let ns = namespace;
@@ -3367,7 +3362,7 @@ function SiteX(_a) {
3367
3362
  const t = (0, import_next_intl2.useTranslations)(ns);
3368
3363
  const text = t(key, { defaultValue: type === "site" ? "Site----" : "----@example.com" });
3369
3364
  if (type === "site") {
3370
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3365
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3371
3366
  "strong",
3372
3367
  __spreadProps(__spreadValues({}, props), {
3373
3368
  className: cn(
@@ -3379,7 +3374,7 @@ function SiteX(_a) {
3379
3374
  );
3380
3375
  }
3381
3376
  if (type === "email") {
3382
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3377
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3383
3378
  "a",
3384
3379
  __spreadProps(__spreadValues({}, props), {
3385
3380
  href: `mailto:${text}`,
@@ -3398,13 +3393,13 @@ function SiteX(_a) {
3398
3393
  var import_react40 = require("react");
3399
3394
  var import_collapsible = require("fumadocs-ui/components/ui/collapsible");
3400
3395
  var import_link5 = __toESM(require("next/link"));
3401
- var import_jsx_runtime46 = require("react/jsx-runtime");
3396
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3402
3397
  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";
3403
3398
  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";
3404
3399
  function ZiaFile(_a) {
3405
3400
  var _b = _a, {
3406
3401
  name,
3407
- icon = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.File, {}),
3402
+ icon = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.File, {}),
3408
3403
  className,
3409
3404
  anotion,
3410
3405
  href
@@ -3418,16 +3413,16 @@ function ZiaFile(_a) {
3418
3413
  const validHref = typeof href === "string" && href.trim() !== "";
3419
3414
  const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
3420
3415
  if (validHref) {
3421
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_link5.default, { href, className: cn(itemVariants, className), children: [
3416
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_link5.default, { href, className: cn(itemVariants, className), children: [
3422
3417
  icon,
3423
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
3424
- validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
3418
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: name }),
3419
+ validAnotion && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: anotionClass, children: anotion })
3425
3420
  ] });
3426
3421
  }
3427
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", __spreadProps(__spreadValues({ className: cn(itemVariants, className) }, rest), { children: [
3422
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", __spreadProps(__spreadValues({ className: cn(itemVariants, className) }, rest), { children: [
3428
3423
  icon,
3429
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
3430
- validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
3424
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: name }),
3425
+ validAnotion && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: anotionClass, children: anotion })
3431
3426
  ] }));
3432
3427
  }
3433
3428
  function ZiaFolder(_a) {
@@ -3446,15 +3441,26 @@ function ZiaFolder(_a) {
3446
3441
  ]);
3447
3442
  const [open, setOpen] = (0, import_react40.useState)(defaultOpen);
3448
3443
  const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
3449
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_collapsible.Collapsible, __spreadProps(__spreadValues({ open, onOpenChange: setOpen }, props), { children: [
3450
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_collapsible.CollapsibleTrigger, { className: cn(itemVariants, className, "w-full"), children: [
3451
- open ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.FolderOpen, {}) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.Folder, {}),
3452
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
3453
- validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
3444
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_collapsible.Collapsible, __spreadProps(__spreadValues({ open, onOpenChange: setOpen }, props), { children: [
3445
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_collapsible.CollapsibleTrigger, { className: cn(itemVariants, className, "w-full"), children: [
3446
+ open ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.FolderOpen, {}) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.Folder, {}),
3447
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: name }),
3448
+ validAnotion && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: anotionClass, children: anotion })
3454
3449
  ] }),
3455
- /* @__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 }) })
3450
+ /* @__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 }) })
3456
3451
  ] }));
3457
3452
  }
3453
+
3454
+ // src/fuma/mdx/toc-footer-wrapper.tsx
3455
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3456
+ function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
3457
+ const showEdit = githubBaseUrl && editPath;
3458
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
3459
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LastUpdatedDate, { date: lastModified }),
3460
+ copyButtonComponent,
3461
+ showEdit && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
3462
+ ] });
3463
+ }
3458
3464
  // Annotate the CommonJS export names for ESM import in node:
3459
3465
  0 && (module.exports = {
3460
3466
  EditOnGitHub,
@@ -3467,7 +3473,7 @@ function ZiaFolder(_a) {
3467
3473
  LastUpdatedDate,
3468
3474
  Mermaid,
3469
3475
  SiteX,
3470
- TocFooter,
3476
+ TocFooterWrapper,
3471
3477
  TrophyCard,
3472
3478
  ZiaCard,
3473
3479
  ZiaFile,