@windrun-huaiin/third-ui 5.7.0 → 5.8.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.
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ImageProps } from 'fumadocs-core/framework';
3
3
  import React, { ImgHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
4
4
  import { UncontrolledProps } from 'react-medium-image-zoom';
5
+ export { E as EditOnGitHub, a as LLMCopyButton, L as LLMCopyButtonProps, b as LastUpdatedDate } from '../../toc-base-BC7kXpDU.mjs';
5
6
 
6
7
  interface MermaidProps {
7
8
  chart: string;
@@ -53,21 +54,12 @@ type ZiaCardProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
53
54
  };
54
55
  declare function ZiaCard({ icon, title, description, ...props }: ZiaCardProps): react_jsx_runtime.JSX.Element;
55
56
 
56
- declare function GradientButton({ title, icon, href, align, }: {
57
+ declare function GradientButton({ title, icon, href, align, openInNewTab, }: {
57
58
  title: React.ReactNode;
58
59
  icon?: React.ReactNode;
59
60
  href: string;
60
61
  align?: 'left' | 'center' | 'right';
61
- }): react_jsx_runtime.JSX.Element;
62
-
63
- declare function LLMCopyButton({ llmApiUrl }?: {
64
- llmApiUrl?: string;
65
- }): react_jsx_runtime.JSX.Element;
66
- declare function EditOnGitHub({ url }: {
67
- url: string;
68
- }): react_jsx_runtime.JSX.Element;
69
- declare function LastUpdatedDate({ date }: {
70
- date: string | undefined;
62
+ openInNewTab?: boolean;
71
63
  }): react_jsx_runtime.JSX.Element;
72
64
 
73
65
  declare function FumaBannerSuit({ showText }: {
@@ -122,4 +114,4 @@ interface TocFooterProps {
122
114
  }
123
115
  declare function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }: TocFooterProps): react_jsx_runtime.JSX.Element;
124
116
 
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 };
117
+ export { FumaBannerSuit, FumaGithubInfo, GradientButton, ImageGrid, ImageZoom, type ImageZoomProps, Mermaid, SiteX, type SiteXProps, TocFooterWrapper, TrophyCard, ZiaCard, type ZiaCardProps, ZiaFile, type ZiaFileProps, ZiaFolder, type ZiaFolderProps };
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ImageProps } from 'fumadocs-core/framework';
3
3
  import React, { ImgHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
4
4
  import { UncontrolledProps } from 'react-medium-image-zoom';
5
+ export { E as EditOnGitHub, a as LLMCopyButton, L as LLMCopyButtonProps, b as LastUpdatedDate } from '../../toc-base-BC7kXpDU.js';
5
6
 
6
7
  interface MermaidProps {
7
8
  chart: string;
@@ -53,21 +54,12 @@ type ZiaCardProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
53
54
  };
54
55
  declare function ZiaCard({ icon, title, description, ...props }: ZiaCardProps): react_jsx_runtime.JSX.Element;
55
56
 
56
- declare function GradientButton({ title, icon, href, align, }: {
57
+ declare function GradientButton({ title, icon, href, align, openInNewTab, }: {
57
58
  title: React.ReactNode;
58
59
  icon?: React.ReactNode;
59
60
  href: string;
60
61
  align?: 'left' | 'center' | 'right';
61
- }): react_jsx_runtime.JSX.Element;
62
-
63
- declare function LLMCopyButton({ llmApiUrl }?: {
64
- llmApiUrl?: string;
65
- }): react_jsx_runtime.JSX.Element;
66
- declare function EditOnGitHub({ url }: {
67
- url: string;
68
- }): react_jsx_runtime.JSX.Element;
69
- declare function LastUpdatedDate({ date }: {
70
- date: string | undefined;
62
+ openInNewTab?: boolean;
71
63
  }): react_jsx_runtime.JSX.Element;
72
64
 
73
65
  declare function FumaBannerSuit({ showText }: {
@@ -122,4 +114,4 @@ interface TocFooterProps {
122
114
  }
123
115
  declare function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }: TocFooterProps): react_jsx_runtime.JSX.Element;
124
116
 
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 };
117
+ export { FumaBannerSuit, FumaGithubInfo, GradientButton, ImageGrid, ImageZoom, type ImageZoomProps, Mermaid, SiteX, type SiteXProps, TocFooterWrapper, TrophyCard, ZiaCard, type ZiaCardProps, ZiaFile, type ZiaFileProps, ZiaFolder, type ZiaFolderProps };
@@ -3075,14 +3075,15 @@ var Button = React35.forwardRef(
3075
3075
  Button.displayName = "Button";
3076
3076
 
3077
3077
  // src/fuma/mdx/gradient-button.tsx
3078
- var import_link3 = __toESM(require("fumadocs-core/link"));
3078
+ var import_link3 = __toESM(require("next/link"));
3079
3079
  var import_react37 = __toESM(require("react"));
3080
3080
  var import_jsx_runtime40 = require("react/jsx-runtime");
3081
3081
  function GradientButton({
3082
3082
  title,
3083
3083
  icon,
3084
3084
  href,
3085
- align = "left"
3085
+ align = "left",
3086
+ openInNewTab = true
3086
3087
  }) {
3087
3088
  const getAlignmentClass = () => {
3088
3089
  switch (align) {
@@ -3100,12 +3101,20 @@ function GradientButton({
3100
3101
  asChild: true,
3101
3102
  size: "lg",
3102
3103
  className: "\n bg-gradient-to-r \n from-purple-400 to-pink-500 \n hover:from-purple-500 hover:to-pink-600\n dark:from-purple-500 dark:to-pink-600 \n dark:hover:from-purple-600 dark:hover:to-pink-700\n text-white text-base font-bold shadow-lg hover:shadow-xl\n transition-all duration-300\n rounded-full\n ",
3103
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_link3.default, { href, target: "_blank", rel: "noopener noreferrer", className: "no-underline hover:no-underline", children: [
3104
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: title }),
3105
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "ml-1", children: icon ? import_react37.default.cloneElement(icon, {
3106
- className: "h-4 w-4 text-white"
3107
- }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" }) })
3108
- ] })
3104
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3105
+ import_link3.default,
3106
+ __spreadProps(__spreadValues({
3107
+ href,
3108
+ className: "no-underline hover:no-underline"
3109
+ }, openInNewTab ? { target: "_blank", rel: "noopener noreferrer" } : {}), {
3110
+ children: [
3111
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: title }),
3112
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "ml-1", children: icon ? import_react37.default.cloneElement(icon, {
3113
+ className: "h-4 w-4 text-white"
3114
+ }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" }) })
3115
+ ]
3116
+ })
3117
+ )
3109
3118
  }
3110
3119
  ) });
3111
3120
  }
@@ -3117,7 +3126,7 @@ var import_use_copy_button = require("fumadocs-ui/utils/use-copy-button");
3117
3126
  var import_link4 = __toESM(require("fumadocs-core/link"));
3118
3127
  var import_jsx_runtime41 = require("react/jsx-runtime");
3119
3128
  var cache = /* @__PURE__ */ new Map();
3120
- function LLMCopyButton({ llmApiUrl } = {}) {
3129
+ function LLMCopyButton({ llmApiUrl, sourceKey } = {}) {
3121
3130
  const [isLoading, setLoading] = (0, import_react38.useState)(false);
3122
3131
  const params = (0, import_navigation.useParams)();
3123
3132
  const locale = params.locale;
@@ -3126,7 +3135,10 @@ function LLMCopyButton({ llmApiUrl } = {}) {
3126
3135
  setLoading(true);
3127
3136
  const path = slug && Array.isArray(slug) ? slug.join("/") : "";
3128
3137
  const apiPrefix = llmApiUrl || "/api/llm-content";
3129
- const apiUrl = `${apiPrefix}?locale=${encodeURIComponent(locale)}&path=${encodeURIComponent(path)}`;
3138
+ let apiUrl = `${apiPrefix}?locale=${encodeURIComponent(locale)}&path=${encodeURIComponent(path)}`;
3139
+ if (sourceKey) {
3140
+ apiUrl += `&sourceKey=${encodeURIComponent(sourceKey)}`;
3141
+ }
3130
3142
  console.log("Fetching LLM content from:", apiUrl);
3131
3143
  let content;
3132
3144
  try {