@windrun-huaiin/third-ui 5.5.0 → 5.6.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/clerk/index.js +217 -183
- package/dist/clerk/index.js.map +1 -1
- package/dist/clerk/index.mjs +217 -183
- package/dist/clerk/index.mjs.map +1 -1
- package/dist/fuma/mdx/index.d.mts +9 -22
- package/dist/fuma/mdx/index.d.ts +9 -22
- package/dist/fuma/mdx/index.js +271 -237
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +270 -236
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.js +310 -231
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +314 -231
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/main/index.js +250 -209
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +250 -209
- package/dist/main/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/clerk/clerk-user.tsx +2 -1
- package/src/fuma/fuma-page-genarator.tsx +3 -3
- package/src/fuma/mdx/index.ts +2 -2
- package/src/fuma/mdx/toc-footer-wrapper.tsx +20 -0
- package/src/main/cta.tsx +1 -1
- package/src/main/features.tsx +24 -14
- package/src/main/gallery.tsx +1 -1
- package/src/main/seo-content.tsx +23 -14
- package/src/main/tips.tsx +2 -2
- package/src/fuma/mdx/toc.tsx +0 -35
package/package.json
CHANGED
package/src/clerk/clerk-user.tsx
CHANGED
|
@@ -7,12 +7,13 @@ import { type JSX } from 'react';
|
|
|
7
7
|
|
|
8
8
|
interface ClerkUserProps {
|
|
9
9
|
locale: string;
|
|
10
|
+
// default as true, ‘cause Clerk direct is not well, so just use model for sign-in/sign-up
|
|
10
11
|
clerkAuthInModal?: boolean;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export function ClerkUser({
|
|
14
15
|
locale,
|
|
15
|
-
clerkAuthInModal =
|
|
16
|
+
clerkAuthInModal = true
|
|
16
17
|
}: ClerkUserProps): JSX.Element {
|
|
17
18
|
const t = useTranslations('clerk');
|
|
18
19
|
const t2 = useTranslations('footer');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TocFooter } from '@third-ui/fuma/mdx/toc';
|
|
2
1
|
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page';
|
|
3
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { TocFooterWrapper } from '@third-ui/fuma/mdx';
|
|
4
4
|
|
|
5
|
-
interface FumaPageParams {
|
|
5
|
+
interface FumaPageParams {
|
|
6
6
|
/*
|
|
7
7
|
* The source of the mdx content
|
|
8
8
|
*/
|
|
@@ -51,7 +51,7 @@ export function createFumaPage({
|
|
|
51
51
|
|
|
52
52
|
const path = githubBaseUrl ? `${mdxSourceDir}/${page.file.path}` : undefined;
|
|
53
53
|
const tocFooterElement = (
|
|
54
|
-
<
|
|
54
|
+
<TocFooterWrapper
|
|
55
55
|
lastModified={page.data.date}
|
|
56
56
|
showCopy={showCopy}
|
|
57
57
|
editPath={path}
|
package/src/fuma/mdx/index.ts
CHANGED
|
@@ -6,9 +6,9 @@ export * from './trophy-card';
|
|
|
6
6
|
export * from './image-grid';
|
|
7
7
|
export * from './zia-card';
|
|
8
8
|
export * from './gradient-button';
|
|
9
|
-
export * from './toc';
|
|
10
9
|
export * from './toc-base';
|
|
11
10
|
export * from './fuma-banner-suit';
|
|
12
11
|
export * from './fuma-github-info';
|
|
13
12
|
export * from './site-x';
|
|
14
|
-
export * from './zia-file';
|
|
13
|
+
export * from './zia-file';
|
|
14
|
+
export * from './toc-footer-wrapper';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { EditOnGitHub, LastUpdatedDate, LLMCopyButton } from '@third-ui/fuma/mdx/toc-base';
|
|
3
|
+
|
|
4
|
+
interface TocFooterProps {
|
|
5
|
+
lastModified: string | undefined;
|
|
6
|
+
editPath?: string;
|
|
7
|
+
githubBaseUrl?: string;
|
|
8
|
+
showCopy?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, showCopy }: TocFooterProps) {
|
|
12
|
+
const showEdit = githubBaseUrl && editPath;
|
|
13
|
+
return (
|
|
14
|
+
<div className="flex flex-col gap-y-2 items-start m-4">
|
|
15
|
+
<LastUpdatedDate date={lastModified} />
|
|
16
|
+
{showCopy && <LLMCopyButton />}
|
|
17
|
+
{showEdit && <EditOnGitHub url={`${githubBaseUrl}${editPath}`} />}
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
package/src/main/cta.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { useTranslations } from 'next-intl';
|
|
|
6
6
|
export function CTA() {
|
|
7
7
|
const t = useTranslations('cta');
|
|
8
8
|
return (
|
|
9
|
-
<section id="cta" className="
|
|
9
|
+
<section id="cta" className="px-16 py-20 mx-16 md:mx-32">
|
|
10
10
|
<div className="
|
|
11
11
|
bg-gradient-to-r from-[#f7f8fa] via-[#e0c3fc] to-[#b2fefa]
|
|
12
12
|
dark:bg-gradient-to-r dark:from-[#2d0b4e] dark:via-[#6a3fa0] dark:to-[#3a185a]
|
package/src/main/features.tsx
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import { getGlobalIcon } from '@base-ui/components/global-icon';
|
|
3
4
|
import { useTranslations } from 'next-intl'
|
|
5
|
+
import { globalLucideIcons as icons } from '@base-ui/components/global-icon';
|
|
4
6
|
|
|
5
7
|
export function Features() {
|
|
6
8
|
const t = useTranslations('features');
|
|
@@ -9,25 +11,33 @@ export function Features() {
|
|
|
9
11
|
const featureItems = t.raw('items') as Array<{
|
|
10
12
|
title: string;
|
|
11
13
|
description: string;
|
|
12
|
-
|
|
14
|
+
iconKey: keyof typeof icons;
|
|
13
15
|
}>;
|
|
14
16
|
|
|
15
17
|
return (
|
|
16
|
-
<section id="features" className="
|
|
17
|
-
<h2 className="text-3xl md:text-4xl font-bold text-center mb-
|
|
18
|
+
<section id="features" className="px-16 py-10 mx-16 md:mx-32">
|
|
19
|
+
<h2 className="text-3xl md:text-4xl font-bold text-center mb-4">
|
|
18
20
|
{t('title')} <span className="text-purple-500">{t('eyesOn')}</span>
|
|
19
21
|
</h2>
|
|
20
|
-
<
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
<p className="text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap">
|
|
23
|
+
{t('description')}
|
|
24
|
+
</p>
|
|
25
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12">
|
|
26
|
+
{featureItems.map((feature, index) => {
|
|
27
|
+
const Icon = getGlobalIcon(feature.iconKey);
|
|
28
|
+
return (
|
|
29
|
+
<div
|
|
30
|
+
key={index}
|
|
31
|
+
className="bg-white dark:bg-gray-800/60 p-8 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none"
|
|
32
|
+
>
|
|
33
|
+
<div className="text-4xl mb-4 flex items-center justify-start">
|
|
34
|
+
<Icon className="w-8 h-8" />
|
|
35
|
+
</div>
|
|
36
|
+
<h3 className="text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100">{feature.title}</h3>
|
|
37
|
+
<p className="text-gray-700 dark:text-gray-300">{feature.description}</p>
|
|
38
|
+
</div>
|
|
39
|
+
)
|
|
40
|
+
})}
|
|
31
41
|
</div>
|
|
32
42
|
</section>
|
|
33
43
|
)
|
package/src/main/gallery.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export function Gallery() {
|
|
|
35
35
|
{t('description')}
|
|
36
36
|
</p>
|
|
37
37
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
38
|
-
{galleryItems.map((
|
|
38
|
+
{galleryItems.map((_prompt, index) => (
|
|
39
39
|
<div key={index} className="group relative overflow-hidden rounded-xl">
|
|
40
40
|
<Image
|
|
41
41
|
src={`/${index + 1}.webp`}
|
package/src/main/seo-content.tsx
CHANGED
|
@@ -12,21 +12,30 @@ export function SeoContent() {
|
|
|
12
12
|
const t = useTranslations('seoContent');
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<section id="seo" className="
|
|
16
|
-
<
|
|
15
|
+
<section id="seo" className="px-16 py-10 mx-16 md:mx-32">
|
|
16
|
+
<h1 className="text-3xl md:text-4xl font-bold text-center mb-8">
|
|
17
17
|
{t('title')} <span className="text-purple-500">{t('eyesOn')}</span>
|
|
18
|
-
</
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
</h1>
|
|
19
|
+
<h3 className="text-center text-gray-600 dark:text-gray-400 mb-12 text-lg">
|
|
20
|
+
{t('description')}
|
|
21
|
+
</h3>
|
|
22
|
+
<div className="bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none">
|
|
23
|
+
<div className="space-y-10">
|
|
24
|
+
<p className="text-gray-600 dark:text-gray-400 text-lg">
|
|
25
|
+
{t('intro')}
|
|
26
|
+
</p>
|
|
27
|
+
{t.raw('sections').map((section: Section, index: number) => (
|
|
28
|
+
<div key={index}>
|
|
29
|
+
<h2 className="text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center">
|
|
30
|
+
{section.title}
|
|
31
|
+
</h2>
|
|
32
|
+
<p className="text-gray-700 dark:text-gray-300">{section.content}</p>
|
|
33
|
+
</div>
|
|
34
|
+
))}
|
|
35
|
+
</div>
|
|
36
|
+
<p className="mt-10 text-gray-600 dark:text-gray-400 text-lg">
|
|
37
|
+
{t('conclusion')}
|
|
38
|
+
</p>
|
|
30
39
|
</div>
|
|
31
40
|
</section>
|
|
32
41
|
)
|
package/src/main/tips.tsx
CHANGED
|
@@ -16,11 +16,11 @@ export function Tips() {
|
|
|
16
16
|
const rightColumn = sections.slice(midPoint);
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<section id="tips" className="
|
|
19
|
+
<section id="tips" className="px-16 py-10 mx-16 md:mx-32">
|
|
20
20
|
<h2 className="text-3xl md:text-4xl font-bold text-center mb-16">
|
|
21
21
|
{t('title')} <span className="text-purple-500">{t('eyesOn')}</span>
|
|
22
22
|
</h2>
|
|
23
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-12">
|
|
23
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-12 bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none">
|
|
24
24
|
{[leftColumn, rightColumn].map((column: Tip[], colIndex) => (
|
|
25
25
|
<div key={colIndex} className="space-y-8">
|
|
26
26
|
{column.map((tip: Tip, tipIndex) => (
|
package/src/fuma/mdx/toc.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { EditOnGitHub, LastUpdatedDate, LLMCopyButton } from '@third-ui/fuma/mdx/toc-base';
|
|
4
|
-
|
|
5
|
-
interface TocFooterProps {
|
|
6
|
-
/**
|
|
7
|
-
* The last modified date of the page.
|
|
8
|
-
*/
|
|
9
|
-
lastModified: string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* The path to the file for the \"Edit on GitHub\" link.
|
|
12
|
-
* This should be the relative path from the repository root, e.g., 'src/mdx/docs/your-page.mdx'.
|
|
13
|
-
*/
|
|
14
|
-
editPath?: string | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Whether to show the copy button.
|
|
17
|
-
*/
|
|
18
|
-
showCopy?: boolean | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* GitHub base URL for edit links
|
|
21
|
-
*/
|
|
22
|
-
githubBaseUrl?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function TocFooter({ lastModified, showCopy, editPath, githubBaseUrl }: TocFooterProps) {
|
|
26
|
-
const showEdit = githubBaseUrl && editPath;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div className="flex flex-col gap-y-2 items-start m-4">
|
|
30
|
-
<LastUpdatedDate date={lastModified} />
|
|
31
|
-
{showCopy && <LLMCopyButton />}
|
|
32
|
-
{showEdit && <EditOnGitHub url={`${githubBaseUrl}${editPath}`} />}
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
}
|