@windrun-huaiin/third-ui 26.0.0 → 28.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/ai/ai-prompt-textarea.d.ts +72 -0
- package/dist/ai/ai-prompt-textarea.js +114 -0
- package/dist/ai/ai-prompt-textarea.mjs +112 -0
- package/dist/ai/index.d.ts +1 -0
- package/dist/ai/index.js +2 -0
- package/dist/ai/index.mjs +1 -0
- package/dist/clerk/clerk-provider-client.js +0 -1
- package/dist/clerk/clerk-provider-client.mjs +0 -1
- package/dist/clerk/fingerprint/fingerprint-client.js +0 -4
- package/dist/clerk/fingerprint/fingerprint-client.mjs +0 -4
- package/dist/clerk/fingerprint/use-fingerprint.js +0 -6
- package/dist/clerk/fingerprint/use-fingerprint.mjs +0 -6
- package/dist/clerk/signin-with-fingerprint-client.js +0 -9
- package/dist/clerk/signin-with-fingerprint-client.mjs +0 -9
- package/dist/clerk/signup-button-with-fingerprint-client.js +0 -16
- package/dist/clerk/signup-button-with-fingerprint-client.mjs +0 -16
- package/dist/clerk/signup-with-fingerprint-client.js +0 -9
- package/dist/clerk/signup-with-fingerprint-client.mjs +0 -9
- package/dist/fuma/base/custom-header.js +10 -8
- package/dist/fuma/base/custom-header.mjs +10 -8
- package/dist/fuma/base/custom-home-layout.d.ts +0 -4
- package/dist/fuma/base/docs-root-provider.d.ts +19 -0
- package/dist/fuma/base/docs-root-provider.js +17 -0
- package/dist/fuma/base/docs-root-provider.mjs +15 -0
- package/dist/fuma/base/index.d.ts +5 -0
- package/dist/fuma/base/index.js +16 -7
- package/dist/fuma/base/index.mjs +5 -1
- package/dist/fuma/base/nav-config.d.ts +10 -0
- package/dist/fuma/base/nav-config.js +32 -0
- package/dist/fuma/base/nav-config.mjs +28 -0
- package/dist/fuma/base/site-docs-layout.d.ts +11 -0
- package/dist/fuma/base/site-docs-layout.js +15 -0
- package/dist/fuma/base/site-docs-layout.mjs +13 -0
- package/dist/fuma/base/site-home-layout.d.ts +24 -0
- package/dist/fuma/base/site-home-layout.js +16 -0
- package/dist/fuma/base/site-home-layout.mjs +14 -0
- package/dist/fuma/base/site-layout-shared.d.ts +89 -0
- package/dist/fuma/base/site-layout-shared.js +48 -0
- package/dist/fuma/base/site-layout-shared.mjs +42 -0
- package/dist/fuma/base/site-layout.d.ts +4 -116
- package/dist/fuma/base/site-layout.js +2 -2
- package/dist/fuma/base/site-layout.mjs +2 -2
- package/dist/fuma/fuma-page-genarator.d.ts +1 -1
- package/dist/fuma/fuma-page-genarator.js +65 -10
- package/dist/fuma/fuma-page-genarator.mjs +61 -6
- package/dist/fuma/llm-copy-handler.js +0 -9
- package/dist/fuma/llm-copy-handler.mjs +0 -9
- package/dist/fuma/mdx/index.d.ts +0 -1
- package/dist/fuma/mdx/index.js +0 -2
- package/dist/fuma/mdx/index.mjs +0 -1
- package/dist/fuma/mdx/suno-embed.js +3 -1
- package/dist/fuma/mdx/suno-embed.mjs +3 -1
- package/dist/fuma/mdx/toc-base.js +0 -1
- package/dist/fuma/mdx/toc-base.mjs +0 -1
- package/dist/fuma/server/features/widgets.js +5 -1
- package/dist/fuma/server/features/widgets.mjs +5 -1
- package/dist/fuma/server/llm-copy-handler.d.ts +2 -0
- package/dist/fuma/server/llm-copy-handler.js +7 -0
- package/dist/fuma/server/llm-copy-handler.mjs +1 -0
- package/dist/fuma/server/page-generator.d.ts +2 -0
- package/dist/fuma/server/page-generator.js +7 -0
- package/dist/fuma/server/page-generator.mjs +1 -0
- package/dist/lib/seo-metadata.js +3 -3
- package/dist/lib/seo-metadata.mjs +1 -1
- package/dist/lib/seo-util.js +4 -4
- package/dist/lib/seo-util.mjs +1 -1
- package/dist/lib/site-docs-helper.d.ts +51 -0
- package/dist/lib/site-docs-helper.js +68 -0
- package/dist/lib/site-docs-helper.mjs +66 -0
- package/dist/main/alert-dialog/index.js +14 -0
- package/dist/main/alert-dialog/index.mjs +5 -0
- package/dist/main/buttons/gradient-button.d.ts +20 -0
- package/dist/main/buttons/gradient-button.js +88 -0
- package/dist/main/buttons/gradient-button.mjs +86 -0
- package/dist/main/buttons/index.d.ts +3 -0
- package/dist/main/buttons/index.js +12 -0
- package/dist/main/buttons/index.mjs +4 -0
- package/dist/main/buttons/x-button.d.ts +39 -0
- package/dist/main/buttons/x-button.js +92 -0
- package/dist/main/buttons/x-button.mjs +90 -0
- package/dist/main/buttons/x-toggle-button.d.ts +32 -0
- package/dist/main/buttons/x-toggle-button.js +95 -0
- package/dist/main/buttons/x-toggle-button.mjs +74 -0
- package/dist/main/credit/credit-nav-button.js +25 -1
- package/dist/main/credit/credit-nav-button.mjs +25 -1
- package/dist/main/credit/credit-overview-client.js +3 -2
- package/dist/main/credit/credit-overview-client.mjs +3 -2
- package/dist/main/credit/index.d.ts +4 -0
- package/dist/main/credit/index.js +10 -0
- package/dist/main/credit/index.mjs +3 -0
- package/dist/main/credit/server.d.ts +2 -0
- package/dist/main/credit/server.js +7 -0
- package/dist/main/credit/server.mjs +1 -0
- package/dist/main/cta.js +4 -2
- package/dist/main/cta.mjs +4 -2
- package/dist/main/footer.js +3 -3
- package/dist/main/footer.mjs +1 -1
- package/dist/main/hero/index.d.ts +2 -0
- package/dist/main/hero/index.js +10 -0
- package/dist/main/hero/index.mjs +3 -0
- package/dist/main/home/server.d.ts +7 -0
- package/dist/main/home/server.js +19 -0
- package/dist/main/home/server.mjs +7 -0
- package/dist/main/index.d.ts +0 -15
- package/dist/main/index.js +0 -43
- package/dist/main/index.mjs +0 -21
- package/dist/main/loading/index.d.ts +1 -0
- package/dist/main/loading/index.js +9 -0
- package/dist/main/loading/index.mjs +2 -0
- package/dist/main/loading-frame/index.d.ts +1 -0
- package/dist/main/loading-frame/index.js +9 -0
- package/dist/main/loading-frame/index.mjs +2 -0
- package/dist/main/money-price/index.d.ts +4 -0
- package/dist/main/money-price/index.js +15 -0
- package/dist/main/money-price/index.mjs +4 -0
- package/dist/main/money-price/money-price-button.d.ts +1 -1
- package/dist/main/money-price/money-price-button.js +12 -9
- package/dist/main/money-price/money-price-button.mjs +12 -9
- package/dist/main/money-price/money-price-interactive.d.ts +1 -1
- package/dist/main/money-price/money-price-interactive.js +22 -25
- package/dist/main/money-price/money-price-interactive.mjs +22 -25
- package/dist/main/money-price/money-price-types.d.ts +2 -0
- package/dist/main/money-price/server.d.ts +5 -0
- package/dist/main/money-price/server.js +18 -0
- package/dist/main/money-price/server.mjs +4 -0
- package/package.json +94 -4
- package/src/ai/index.ts +1 -0
- package/src/clerk/clerk-provider-client.tsx +1 -3
- package/src/clerk/fingerprint/fingerprint-client.ts +0 -4
- package/src/clerk/fingerprint/use-fingerprint.ts +0 -6
- package/src/clerk/signin-with-fingerprint-client.tsx +0 -10
- package/src/clerk/signup-button-with-fingerprint-client.tsx +0 -17
- package/src/clerk/signup-with-fingerprint-client.tsx +0 -10
- package/src/fuma/base/custom-header.tsx +12 -8
- package/src/fuma/base/custom-home-layout.tsx +3 -6
- package/src/fuma/base/docs-root-provider.tsx +58 -0
- package/src/fuma/base/index.ts +5 -0
- package/src/fuma/base/nav-config.ts +81 -0
- package/src/fuma/base/site-docs-layout.tsx +35 -0
- package/src/fuma/base/site-home-layout.tsx +78 -0
- package/src/fuma/base/site-layout-shared.tsx +190 -0
- package/src/fuma/base/site-layout.tsx +4 -289
- package/src/fuma/fuma-banner-suit.tsx +1 -1
- package/src/fuma/fuma-page-genarator.tsx +61 -8
- package/src/fuma/llm-copy-handler.ts +0 -11
- package/src/fuma/mdx/index.ts +0 -1
- package/src/fuma/mdx/suno-embed.tsx +1 -1
- package/src/fuma/mdx/toc-base.tsx +0 -1
- package/src/fuma/mdx/toc-footer-wrapper.tsx +2 -2
- package/src/fuma/server/features/widgets.tsx +1 -1
- package/src/fuma/server/llm-copy-handler.ts +2 -0
- package/src/fuma/server/page-generator.ts +2 -0
- package/src/lib/seo-metadata.ts +1 -1
- package/src/lib/seo-util.ts +2 -2
- package/src/lib/server.ts +1 -1
- package/src/{fuma/mdx → main/buttons}/gradient-button.tsx +10 -21
- package/src/main/buttons/index.ts +5 -0
- package/src/main/{x-button.tsx → buttons/x-button.tsx} +28 -42
- package/src/main/credit/credit-nav-button.tsx +36 -3
- package/src/main/credit/credit-overview-client.tsx +1 -1
- package/src/main/credit/index.ts +11 -0
- package/src/main/credit/server.ts +7 -0
- package/src/main/cta.tsx +1 -1
- package/src/main/footer.tsx +1 -2
- package/src/main/hero/index.ts +4 -0
- package/src/main/home/server.ts +7 -0
- package/src/main/index.ts +1 -20
- package/src/main/language-detector.tsx +0 -1
- package/src/main/loading/index.ts +3 -0
- package/src/main/loading-frame/index.ts +3 -0
- package/src/main/money-price/index.ts +18 -0
- package/src/main/money-price/money-price-button.tsx +17 -9
- package/src/main/money-price/money-price-interactive.tsx +30 -25
- package/src/main/money-price/money-price-types.ts +2 -0
- package/src/main/money-price/server.ts +22 -0
- package/dist/fuma/mdx/features.d.ts +0 -8
- package/dist/fuma/mdx/features.js +0 -92
- package/dist/fuma/mdx/features.mjs +0 -85
- package/dist/fuma/mdx/image-grid.d.ts +0 -6
- package/dist/fuma/mdx/image-grid.js +0 -17
- package/dist/fuma/mdx/image-grid.mjs +0 -15
- package/dist/fuma/mdx/image-zoom.d.ts +0 -22
- package/dist/fuma/mdx/image-zoom.js +0 -39
- package/dist/fuma/mdx/image-zoom.mjs +0 -37
- package/dist/fuma/mdx/markdown-component-map.d.ts +0 -3
- package/dist/fuma/mdx/markdown-component-map.js +0 -79
- package/dist/fuma/mdx/markdown-component-map.mjs +0 -77
- package/dist/fuma/mdx/math.d.ts +0 -17
- package/dist/fuma/mdx/math.js +0 -60
- package/dist/fuma/mdx/math.mjs +0 -57
- package/dist/fuma/mdx/mermaid.d.ts +0 -13
- package/dist/fuma/mdx/mermaid.js +0 -360
- package/dist/fuma/mdx/mermaid.mjs +0 -358
- package/dist/fuma/mdx/site-mdx-components.d.ts +0 -13
- package/dist/fuma/mdx/site-mdx-components.js +0 -19
- package/dist/fuma/mdx/site-mdx-components.mjs +0 -17
- package/dist/fuma/mdx/site-mdx-presets.d.ts +0 -13
- package/dist/fuma/mdx/site-mdx-presets.js +0 -49
- package/dist/fuma/mdx/site-mdx-presets.mjs +0 -45
- package/dist/fuma/server/optional-features.d.ts +0 -6
- package/dist/fuma/server/optional-features.js +0 -17
- package/dist/fuma/server/optional-features.mjs +0 -6
- package/dist/fuma/server/site-mdx-components.d.ts +0 -13
- package/dist/fuma/server/site-mdx-components.js +0 -18
- package/dist/fuma/server/site-mdx-components.mjs +0 -16
- package/dist/fuma/server/site-mdx-presets.d.ts +0 -195
- package/dist/fuma/server/site-mdx-presets.js +0 -55
- package/dist/fuma/server/site-mdx-presets.mjs +0 -52
- /package/src/{main → ai}/ai-prompt-textarea.tsx +0 -0
- /package/src/main/{x-toggle-button.tsx → buttons/x-toggle-button.tsx} +0 -0
|
@@ -1,116 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { type HeaderActionOrders } from './custom-home-layout';
|
|
6
|
-
type RootProviderI18n = NonNullable<ComponentProps<typeof RootProvider>['i18n']>;
|
|
7
|
-
export interface DocsRootProviderProps {
|
|
8
|
-
i18n: RootProviderI18n;
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
type SiteMenuConfig = HTMLAttributes<HTMLElement> & {
|
|
12
|
-
banner?: ReactNode;
|
|
13
|
-
};
|
|
14
|
-
interface SiteNavSharedFields {
|
|
15
|
-
secondary?: boolean;
|
|
16
|
-
mobilePinned?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface SiteNavLinkItemConfig extends SiteNavSharedFields {
|
|
19
|
-
type?: 'main' | 'icon' | 'button';
|
|
20
|
-
text: ReactNode;
|
|
21
|
-
url: string;
|
|
22
|
-
external?: boolean;
|
|
23
|
-
icon?: ReactNode;
|
|
24
|
-
description?: ReactNode;
|
|
25
|
-
menu?: SiteMenuConfig;
|
|
26
|
-
on?: 'nav' | 'menu' | 'all';
|
|
27
|
-
label?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface SiteNavMenuItemConfig extends SiteNavSharedFields {
|
|
30
|
-
type: 'menu';
|
|
31
|
-
text: ReactNode;
|
|
32
|
-
url?: string;
|
|
33
|
-
external?: boolean;
|
|
34
|
-
icon?: ReactNode;
|
|
35
|
-
description?: ReactNode;
|
|
36
|
-
items: SiteNavItemConfig[];
|
|
37
|
-
menu?: SiteMenuConfig;
|
|
38
|
-
on?: 'nav' | 'menu' | 'all';
|
|
39
|
-
}
|
|
40
|
-
export interface SiteNavCustomItemConfig extends SiteNavSharedFields {
|
|
41
|
-
type: 'custom';
|
|
42
|
-
children: ReactNode;
|
|
43
|
-
}
|
|
44
|
-
export type SiteNavItemConfig = SiteNavLinkItemConfig | SiteNavMenuItemConfig | SiteNavCustomItemConfig;
|
|
45
|
-
export interface SiteBaseLayoutConfig {
|
|
46
|
-
nav?: HomeLayoutProps['nav'];
|
|
47
|
-
i18n?: HomeLayoutProps['i18n'];
|
|
48
|
-
githubUrl?: string;
|
|
49
|
-
links?: SiteNavItemConfig[];
|
|
50
|
-
searchToggle?: HomeLayoutProps['searchToggle'];
|
|
51
|
-
themeSwitch?: HomeLayoutProps['themeSwitch'];
|
|
52
|
-
}
|
|
53
|
-
export interface SiteHomeLayoutConfig extends SiteBaseLayoutConfig {
|
|
54
|
-
showBanner?: boolean;
|
|
55
|
-
bannerHeight?: number;
|
|
56
|
-
headerHeight?: number;
|
|
57
|
-
headerPaddingTop?: number;
|
|
58
|
-
navbarClassName?: string;
|
|
59
|
-
floatingNav?: boolean;
|
|
60
|
-
banner?: ReactNode;
|
|
61
|
-
footer?: ReactNode;
|
|
62
|
-
goToTop?: ReactNode;
|
|
63
|
-
showFooter?: boolean;
|
|
64
|
-
showGoToTop?: boolean;
|
|
65
|
-
actionOrders?: HeaderActionOrders;
|
|
66
|
-
localePrefixAsNeeded?: boolean;
|
|
67
|
-
defaultLocale?: string;
|
|
68
|
-
}
|
|
69
|
-
export interface SiteDocsLayoutConfig extends SiteBaseLayoutConfig {
|
|
70
|
-
tree: DocsLayoutProps['tree'];
|
|
71
|
-
sidebar?: DocsLayoutProps['sidebar'];
|
|
72
|
-
}
|
|
73
|
-
export interface SiteMenuLeafConfig {
|
|
74
|
-
text: ReactNode;
|
|
75
|
-
path: string;
|
|
76
|
-
description?: ReactNode;
|
|
77
|
-
icon?: ReactNode;
|
|
78
|
-
className?: string;
|
|
79
|
-
external?: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface SiteMenuGroupConfig {
|
|
82
|
-
text: ReactNode;
|
|
83
|
-
path?: string;
|
|
84
|
-
landing?: SiteMenuLeafConfig;
|
|
85
|
-
items: SiteMenuLeafConfig[];
|
|
86
|
-
}
|
|
87
|
-
export interface CreateSiteNavItemContext {
|
|
88
|
-
resolveUrl: (path: string) => string;
|
|
89
|
-
}
|
|
90
|
-
export interface CreateSiteNavGroupOptions {
|
|
91
|
-
featuredClassName?: string;
|
|
92
|
-
featuredBanner?: ReactNode;
|
|
93
|
-
}
|
|
94
|
-
export interface CreateSiteBaseLayoutOptions {
|
|
95
|
-
homeUrl: string;
|
|
96
|
-
title: ReactNode;
|
|
97
|
-
i18n?: HomeLayoutProps['i18n'];
|
|
98
|
-
githubUrl?: string;
|
|
99
|
-
transparentMode?: HomeLayoutProps['nav'] extends infer T ? T extends {
|
|
100
|
-
transparentMode?: infer U;
|
|
101
|
-
} ? U : never : never;
|
|
102
|
-
}
|
|
103
|
-
export declare function createSiteNavLink(item: SiteMenuLeafConfig, context: CreateSiteNavItemContext): SiteNavLinkItemConfig;
|
|
104
|
-
export declare function createSiteNavGroup(item: SiteMenuGroupConfig, context: CreateSiteNavItemContext, options?: CreateSiteNavGroupOptions): SiteNavMenuItemConfig;
|
|
105
|
-
export declare function createSiteBaseLayoutConfig(options: CreateSiteBaseLayoutOptions): SiteBaseLayoutConfig;
|
|
106
|
-
export declare function DocsRootProvider({ i18n, children }: DocsRootProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
107
|
-
export declare function SiteHomeLayout({ locale, config, children, }: {
|
|
108
|
-
locale: string;
|
|
109
|
-
config: SiteHomeLayoutConfig;
|
|
110
|
-
children: ReactNode;
|
|
111
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
112
|
-
export declare function SiteDocsLayout({ config, children, }: {
|
|
113
|
-
config: SiteDocsLayoutConfig;
|
|
114
|
-
children: ReactNode;
|
|
115
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
116
|
-
export {};
|
|
1
|
+
export * from './docs-root-provider';
|
|
2
|
+
export * from './site-docs-layout';
|
|
3
|
+
export * from './site-home-layout';
|
|
4
|
+
export * from './site-layout-shared';
|
|
@@ -18,7 +18,7 @@ function normalizeNavItems(items) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function createSiteNavLink(item, context) {
|
|
21
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({ type: 'main', text: item.text }, (item.description ? { description: item.description } : {})), { url: context.resolveUrl(item.path) }), (item.external ? { external: item.external } : {})), (item.icon || item.className
|
|
21
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ type: 'main', text: item.text }, (item.description ? { description: item.description } : {})), { url: context.resolveUrl(item.path) }), (item.external ? { external: item.external } : {})), (item.prefetch !== undefined ? { prefetch: item.prefetch } : {})), (item.icon || item.className
|
|
22
22
|
? {
|
|
23
23
|
menu: Object.assign(Object.assign({}, (item.icon ? { banner: item.icon } : {})), (item.className ? { className: item.className } : {})),
|
|
24
24
|
}
|
|
@@ -26,7 +26,7 @@ function createSiteNavLink(item, context) {
|
|
|
26
26
|
}
|
|
27
27
|
function createSiteNavGroup(item, context, options) {
|
|
28
28
|
var _a;
|
|
29
|
-
return Object.assign(Object.assign({ type: 'menu', text: item.text }, (item.path ? { url: context.resolveUrl(item.path) } : {})), { items: [
|
|
29
|
+
return Object.assign(Object.assign(Object.assign({ type: 'menu', text: item.text }, (item.path ? { url: context.resolveUrl(item.path) } : {})), (item.prefetch !== undefined ? { prefetch: item.prefetch } : {})), { items: [
|
|
30
30
|
...(item.landing
|
|
31
31
|
? [
|
|
32
32
|
Object.assign(Object.assign({}, createSiteNavLink(item.landing, context)), { menu: Object.assign(Object.assign({}, ((options === null || options === void 0 ? void 0 : options.featuredBanner) ? { banner: options.featuredBanner } : {})), { className: (_a = options === null || options === void 0 ? void 0 : options.featuredClassName) !== null && _a !== void 0 ? _a : 'md:row-span-2' }) }),
|
|
@@ -16,7 +16,7 @@ function normalizeNavItems(items) {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
function createSiteNavLink(item, context) {
|
|
19
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({ type: 'main', text: item.text }, (item.description ? { description: item.description } : {})), { url: context.resolveUrl(item.path) }), (item.external ? { external: item.external } : {})), (item.icon || item.className
|
|
19
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ type: 'main', text: item.text }, (item.description ? { description: item.description } : {})), { url: context.resolveUrl(item.path) }), (item.external ? { external: item.external } : {})), (item.prefetch !== undefined ? { prefetch: item.prefetch } : {})), (item.icon || item.className
|
|
20
20
|
? {
|
|
21
21
|
menu: Object.assign(Object.assign({}, (item.icon ? { banner: item.icon } : {})), (item.className ? { className: item.className } : {})),
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ function createSiteNavLink(item, context) {
|
|
|
24
24
|
}
|
|
25
25
|
function createSiteNavGroup(item, context, options) {
|
|
26
26
|
var _a;
|
|
27
|
-
return Object.assign(Object.assign({ type: 'menu', text: item.text }, (item.path ? { url: context.resolveUrl(item.path) } : {})), { items: [
|
|
27
|
+
return Object.assign(Object.assign(Object.assign({ type: 'menu', text: item.text }, (item.path ? { url: context.resolveUrl(item.path) } : {})), (item.prefetch !== undefined ? { prefetch: item.prefetch } : {})), { items: [
|
|
28
28
|
...(item.landing
|
|
29
29
|
? [
|
|
30
30
|
Object.assign(Object.assign({}, createSiteNavLink(item.landing, context)), { menu: Object.assign(Object.assign({}, ((options === null || options === void 0 ? void 0 : options.featuredBanner) ? { banner: options.featuredBanner } : {})), { className: (_a = options === null || options === void 0 ? void 0 : options.featuredClassName) !== null && _a !== void 0 ? _a : 'md:row-span-2' }) }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, ReactElement } from 'react';
|
|
2
|
-
import type { LLMCopyButtonProps, LLMCopyButton } from '
|
|
2
|
+
import type { LLMCopyButtonProps, LLMCopyButton } from './mdx/toc-base';
|
|
3
3
|
export type FumaPageTocRenderMode = 'portable-clerk' | 'fumadocs-clerk' | 'fumadocs-normal';
|
|
4
4
|
interface FumaPageParams {
|
|
5
5
|
sourceKey: string;
|
|
@@ -5,11 +5,20 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var page = require('fumadocs-ui/page');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var tocFooterWrapper = require('./mdx/toc-footer-wrapper.js');
|
|
8
|
-
var
|
|
8
|
+
var utils = require('@windrun-huaiin/lib/utils');
|
|
9
9
|
var tocClerkPortable = require('./mdx/toc-clerk-portable.js');
|
|
10
|
-
var lib
|
|
10
|
+
var lib = require('@windrun-huaiin/base-ui/lib');
|
|
11
11
|
|
|
12
12
|
function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSourceDir, githubBaseUrl, copyButtonComponent, siteIcon, FallbackPage, supportedLocales = ['en'], showBreadcrumb = true, showTableOfContent = true, tocRenderMode = 'portable-clerk', showTableOfContentPopover = false, localePrefixAsNeeded = true, defaultLocale = 'en', }) {
|
|
13
|
+
var _a;
|
|
14
|
+
const isLocalMdDebugEnabled = ((_a = process.env.LOCAL_MD_DEBUG) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'true';
|
|
15
|
+
const now = () => (typeof performance !== 'undefined' ? performance.now() : Date.now());
|
|
16
|
+
const durationMs = (startedAt) => Number((now() - startedAt).toFixed(1));
|
|
17
|
+
const logFumaPageDebug = (message, details) => {
|
|
18
|
+
if (!isLocalMdDebugEnabled)
|
|
19
|
+
return;
|
|
20
|
+
console.log(`[fuma-page] ${message}`, details !== null && details !== void 0 ? details : {});
|
|
21
|
+
};
|
|
13
22
|
const getSource = () => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
14
23
|
if (typeof mdxContentSource === 'function') {
|
|
15
24
|
return yield mdxContentSource();
|
|
@@ -18,12 +27,28 @@ function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSour
|
|
|
18
27
|
});
|
|
19
28
|
const Page = function Page(_a) {
|
|
20
29
|
return tslib.__awaiter(this, arguments, void 0, function* ({ params }) {
|
|
21
|
-
var _b
|
|
30
|
+
var _b;
|
|
31
|
+
const pageStartedAt = now();
|
|
22
32
|
const { slug, locale } = yield params;
|
|
33
|
+
const sourceStartedAt = now();
|
|
23
34
|
const source = yield getSource();
|
|
35
|
+
logFumaPageDebug('page:source-ready', {
|
|
36
|
+
sourceKey,
|
|
37
|
+
locale,
|
|
38
|
+
slug,
|
|
39
|
+
durationMs: durationMs(sourceStartedAt),
|
|
40
|
+
});
|
|
41
|
+
const getPageStartedAt = now();
|
|
24
42
|
const page$1 = source.getPage(slug, locale);
|
|
43
|
+
logFumaPageDebug('page:get-page', {
|
|
44
|
+
sourceKey,
|
|
45
|
+
locale,
|
|
46
|
+
slug,
|
|
47
|
+
found: Boolean(page$1),
|
|
48
|
+
durationMs: durationMs(getPageStartedAt),
|
|
49
|
+
totalElapsedMs: durationMs(pageStartedAt),
|
|
50
|
+
});
|
|
25
51
|
if (!page$1) {
|
|
26
|
-
console.log('[FumaPage] missing page', { slug, locale, available: (_d = (_c = (_b = source.pageTree) === null || _b === void 0 ? void 0 : _b[locale]) === null || _c === void 0 ? void 0 : _c.children) === null || _d === void 0 ? void 0 : _d.map((c) => c.url) });
|
|
27
52
|
return (jsxRuntime.jsx(page.DocsPage, { full: true, breadcrumb: { enabled: false }, footer: { enabled: false }, tableOfContent: { enabled: false }, tableOfContentPopover: { enabled: false }, className: "max-w-none px-0 py-0", children: jsxRuntime.jsx(FallbackPage, { siteIcon: siteIcon }) }));
|
|
28
53
|
}
|
|
29
54
|
const path = githubBaseUrl ? `${mdxSourceDir}/${page$1.path}` : undefined;
|
|
@@ -31,10 +56,22 @@ function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSour
|
|
|
31
56
|
? React.cloneElement(copyButtonComponent, { sourceKey })
|
|
32
57
|
: undefined, editPath: path, githubBaseUrl: githubBaseUrl }));
|
|
33
58
|
const content = typeof page$1.data.load === 'function'
|
|
34
|
-
? yield
|
|
59
|
+
? yield (() => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const loadStartedAt = now();
|
|
61
|
+
const result = yield page$1.data.load(getMDXComponents());
|
|
62
|
+
logFumaPageDebug('page:load', {
|
|
63
|
+
sourceKey,
|
|
64
|
+
locale,
|
|
65
|
+
slug,
|
|
66
|
+
pagePath: page$1.path,
|
|
67
|
+
durationMs: durationMs(loadStartedAt),
|
|
68
|
+
totalElapsedMs: durationMs(pageStartedAt),
|
|
69
|
+
});
|
|
70
|
+
return result;
|
|
71
|
+
}))()
|
|
35
72
|
: {
|
|
36
73
|
body: yield page$1.data.body({ components: getMDXComponents() }),
|
|
37
|
-
toc: (
|
|
74
|
+
toc: (_b = page$1.data.toc) !== null && _b !== void 0 ? _b : [],
|
|
38
75
|
};
|
|
39
76
|
return (jsxRuntime.jsxs(page.DocsPage, { breadcrumb: { enabled: showBreadcrumb }, tableOfContent: resolveTableOfContentOptions({
|
|
40
77
|
enabled: showTableOfContent,
|
|
@@ -48,13 +85,31 @@ function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSour
|
|
|
48
85
|
});
|
|
49
86
|
};
|
|
50
87
|
function generateStaticParams() {
|
|
51
|
-
return
|
|
88
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
const startedAt = now();
|
|
90
|
+
const source = yield getSource();
|
|
91
|
+
const params = source.generateParams('slug', 'locale');
|
|
92
|
+
logFumaPageDebug('generateStaticParams', {
|
|
93
|
+
sourceKey,
|
|
94
|
+
count: Array.isArray(params) ? params.length : undefined,
|
|
95
|
+
durationMs: durationMs(startedAt),
|
|
96
|
+
});
|
|
97
|
+
return params;
|
|
98
|
+
});
|
|
52
99
|
}
|
|
53
100
|
function generateMetadata(props) {
|
|
54
101
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const startedAt = now();
|
|
55
103
|
const { slug, locale } = yield props.params;
|
|
56
104
|
const source = yield getSource();
|
|
57
105
|
const page = source.getPage(slug, locale);
|
|
106
|
+
logFumaPageDebug('generateMetadata:get-page', {
|
|
107
|
+
sourceKey,
|
|
108
|
+
locale,
|
|
109
|
+
slug,
|
|
110
|
+
found: Boolean(page),
|
|
111
|
+
durationMs: durationMs(startedAt),
|
|
112
|
+
});
|
|
58
113
|
if (!page) {
|
|
59
114
|
return {
|
|
60
115
|
title: '404 - Page Not Found',
|
|
@@ -65,12 +120,12 @@ function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSour
|
|
|
65
120
|
const baseRoute = mdxSourceDir.replace('src/mdx/', '');
|
|
66
121
|
// build the current page path
|
|
67
122
|
const currentPath = slug ? slug.join('/') : '';
|
|
68
|
-
const localizedPath =
|
|
123
|
+
const localizedPath = utils.getAsNeededLocalizedUrl(locale || defaultLocale, `/${baseRoute}${currentPath ? `/${currentPath}` : ''}`, localePrefixAsNeeded, defaultLocale);
|
|
69
124
|
const currentUrl = `${baseUrl}${localizedPath}`;
|
|
70
125
|
// generate the seo language map
|
|
71
126
|
const seoLanguageMap = {};
|
|
72
127
|
supportedLocales.forEach(loc => {
|
|
73
|
-
const seoPath =
|
|
128
|
+
const seoPath = utils.getAsNeededLocalizedUrl(loc, `/${baseRoute}${currentPath ? `/${currentPath}` : ''}`, localePrefixAsNeeded, defaultLocale);
|
|
74
129
|
seoLanguageMap[loc] = `${baseUrl}${seoPath}`;
|
|
75
130
|
});
|
|
76
131
|
return {
|
|
@@ -102,7 +157,7 @@ function resolveTableOfContentOptions({ enabled, tocRenderMode, toc, footer, })
|
|
|
102
157
|
container: {
|
|
103
158
|
className: '[--color-fd-primary:var(--third-ui-toc-primary)] [--color-fd-primary-foreground:var(--third-ui-toc-primary-foreground)] [&_#toc-title]:hidden',
|
|
104
159
|
style: {
|
|
105
|
-
'--third-ui-toc-primary': lib
|
|
160
|
+
'--third-ui-toc-primary': lib.themeSvgIconColor,
|
|
106
161
|
'--third-ui-toc-primary-foreground': '#ffffff',
|
|
107
162
|
},
|
|
108
163
|
},
|
|
@@ -3,11 +3,20 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { DocsPage, DocsTitle, DocsDescription, DocsBody } from 'fumadocs-ui/page';
|
|
4
4
|
import { cloneElement } from 'react';
|
|
5
5
|
import { TocFooterWrapper } from './mdx/toc-footer-wrapper.mjs';
|
|
6
|
-
import { getAsNeededLocalizedUrl } from '@windrun-huaiin/lib';
|
|
6
|
+
import { getAsNeededLocalizedUrl } from '@windrun-huaiin/lib/utils';
|
|
7
7
|
import { PortableClerkTOC, PortableClerkTOCTitle } from './mdx/toc-clerk-portable.mjs';
|
|
8
8
|
import { themeSvgIconColor } from '@windrun-huaiin/base-ui/lib';
|
|
9
9
|
|
|
10
10
|
function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSourceDir, githubBaseUrl, copyButtonComponent, siteIcon, FallbackPage, supportedLocales = ['en'], showBreadcrumb = true, showTableOfContent = true, tocRenderMode = 'portable-clerk', showTableOfContentPopover = false, localePrefixAsNeeded = true, defaultLocale = 'en', }) {
|
|
11
|
+
var _a;
|
|
12
|
+
const isLocalMdDebugEnabled = ((_a = process.env.LOCAL_MD_DEBUG) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'true';
|
|
13
|
+
const now = () => (typeof performance !== 'undefined' ? performance.now() : Date.now());
|
|
14
|
+
const durationMs = (startedAt) => Number((now() - startedAt).toFixed(1));
|
|
15
|
+
const logFumaPageDebug = (message, details) => {
|
|
16
|
+
if (!isLocalMdDebugEnabled)
|
|
17
|
+
return;
|
|
18
|
+
console.log(`[fuma-page] ${message}`, details !== null && details !== void 0 ? details : {});
|
|
19
|
+
};
|
|
11
20
|
const getSource = () => __awaiter(this, void 0, void 0, function* () {
|
|
12
21
|
if (typeof mdxContentSource === 'function') {
|
|
13
22
|
return yield mdxContentSource();
|
|
@@ -16,12 +25,28 @@ function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSour
|
|
|
16
25
|
});
|
|
17
26
|
const Page = function Page(_a) {
|
|
18
27
|
return __awaiter(this, arguments, void 0, function* ({ params }) {
|
|
19
|
-
var _b
|
|
28
|
+
var _b;
|
|
29
|
+
const pageStartedAt = now();
|
|
20
30
|
const { slug, locale } = yield params;
|
|
31
|
+
const sourceStartedAt = now();
|
|
21
32
|
const source = yield getSource();
|
|
33
|
+
logFumaPageDebug('page:source-ready', {
|
|
34
|
+
sourceKey,
|
|
35
|
+
locale,
|
|
36
|
+
slug,
|
|
37
|
+
durationMs: durationMs(sourceStartedAt),
|
|
38
|
+
});
|
|
39
|
+
const getPageStartedAt = now();
|
|
22
40
|
const page = source.getPage(slug, locale);
|
|
41
|
+
logFumaPageDebug('page:get-page', {
|
|
42
|
+
sourceKey,
|
|
43
|
+
locale,
|
|
44
|
+
slug,
|
|
45
|
+
found: Boolean(page),
|
|
46
|
+
durationMs: durationMs(getPageStartedAt),
|
|
47
|
+
totalElapsedMs: durationMs(pageStartedAt),
|
|
48
|
+
});
|
|
23
49
|
if (!page) {
|
|
24
|
-
console.log('[FumaPage] missing page', { slug, locale, available: (_d = (_c = (_b = source.pageTree) === null || _b === void 0 ? void 0 : _b[locale]) === null || _c === void 0 ? void 0 : _c.children) === null || _d === void 0 ? void 0 : _d.map((c) => c.url) });
|
|
25
50
|
return (jsx(DocsPage, { full: true, breadcrumb: { enabled: false }, footer: { enabled: false }, tableOfContent: { enabled: false }, tableOfContentPopover: { enabled: false }, className: "max-w-none px-0 py-0", children: jsx(FallbackPage, { siteIcon: siteIcon }) }));
|
|
26
51
|
}
|
|
27
52
|
const path = githubBaseUrl ? `${mdxSourceDir}/${page.path}` : undefined;
|
|
@@ -29,10 +54,22 @@ function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSour
|
|
|
29
54
|
? cloneElement(copyButtonComponent, { sourceKey })
|
|
30
55
|
: undefined, editPath: path, githubBaseUrl: githubBaseUrl }));
|
|
31
56
|
const content = typeof page.data.load === 'function'
|
|
32
|
-
? yield
|
|
57
|
+
? yield (() => __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const loadStartedAt = now();
|
|
59
|
+
const result = yield page.data.load(getMDXComponents());
|
|
60
|
+
logFumaPageDebug('page:load', {
|
|
61
|
+
sourceKey,
|
|
62
|
+
locale,
|
|
63
|
+
slug,
|
|
64
|
+
pagePath: page.path,
|
|
65
|
+
durationMs: durationMs(loadStartedAt),
|
|
66
|
+
totalElapsedMs: durationMs(pageStartedAt),
|
|
67
|
+
});
|
|
68
|
+
return result;
|
|
69
|
+
}))()
|
|
33
70
|
: {
|
|
34
71
|
body: yield page.data.body({ components: getMDXComponents() }),
|
|
35
|
-
toc: (
|
|
72
|
+
toc: (_b = page.data.toc) !== null && _b !== void 0 ? _b : [],
|
|
36
73
|
};
|
|
37
74
|
return (jsxs(DocsPage, { breadcrumb: { enabled: showBreadcrumb }, tableOfContent: resolveTableOfContentOptions({
|
|
38
75
|
enabled: showTableOfContent,
|
|
@@ -46,13 +83,31 @@ function createFumaPage({ sourceKey, mdxContentSource, getMDXComponents, mdxSour
|
|
|
46
83
|
});
|
|
47
84
|
};
|
|
48
85
|
function generateStaticParams() {
|
|
49
|
-
return
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
const startedAt = now();
|
|
88
|
+
const source = yield getSource();
|
|
89
|
+
const params = source.generateParams('slug', 'locale');
|
|
90
|
+
logFumaPageDebug('generateStaticParams', {
|
|
91
|
+
sourceKey,
|
|
92
|
+
count: Array.isArray(params) ? params.length : undefined,
|
|
93
|
+
durationMs: durationMs(startedAt),
|
|
94
|
+
});
|
|
95
|
+
return params;
|
|
96
|
+
});
|
|
50
97
|
}
|
|
51
98
|
function generateMetadata(props) {
|
|
52
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const startedAt = now();
|
|
53
101
|
const { slug, locale } = yield props.params;
|
|
54
102
|
const source = yield getSource();
|
|
55
103
|
const page = source.getPage(slug, locale);
|
|
104
|
+
logFumaPageDebug('generateMetadata:get-page', {
|
|
105
|
+
sourceKey,
|
|
106
|
+
locale,
|
|
107
|
+
slug,
|
|
108
|
+
found: Boolean(page),
|
|
109
|
+
durationMs: durationMs(startedAt),
|
|
110
|
+
});
|
|
56
111
|
if (!page) {
|
|
57
112
|
return {
|
|
58
113
|
title: '404 - Page Not Found',
|
|
@@ -13,14 +13,9 @@ function LLMCopyHandler(options) {
|
|
|
13
13
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
var _a, _b, _c, _d;
|
|
15
15
|
const { sourceDir, dataSource, requestedPath, locale } = options;
|
|
16
|
-
// log received parameters
|
|
17
|
-
console.log(`[LLMCopy] Received, locale=${locale}, path=${requestedPath}`);
|
|
18
16
|
const slug = (requestedPath === null || requestedPath === void 0 ? void 0 : requestedPath.split('/')) || [];
|
|
19
17
|
try {
|
|
20
|
-
console.log('[LLMCopy] Attempting to call getPage()');
|
|
21
18
|
const page = dataSource.getPage(slug, locale);
|
|
22
|
-
// console.log(page);
|
|
23
|
-
console.log('[LLMCopy] Call to getPage() completed.');
|
|
24
19
|
if (!page) {
|
|
25
20
|
console.error(`[LLMCopy] Page or page data not found for locale=${locale}, path=${requestedPath}`);
|
|
26
21
|
return { error: 'Page data not found', status: 404 };
|
|
@@ -33,19 +28,15 @@ function LLMCopyHandler(options) {
|
|
|
33
28
|
const description = (_d = (_c = page.data) === null || _c === void 0 ? void 0 : _c.description) !== null && _d !== void 0 ? _d : page.description;
|
|
34
29
|
const relativeMdxFilePath = page.path;
|
|
35
30
|
const absoluteFilePath = nodePath.join(process.cwd(), sourceDir, relativeMdxFilePath);
|
|
36
|
-
console.log(`[LLMCopy] Attempting to read MDX content from: ${absoluteFilePath}`);
|
|
37
31
|
let mdxContent;
|
|
38
32
|
try {
|
|
39
33
|
mdxContent = fs.readFileSync(absoluteFilePath, 'utf-8');
|
|
40
|
-
console.log(`[LLMCopy] Successfully read MDX content from: ${absoluteFilePath}`);
|
|
41
34
|
}
|
|
42
35
|
catch (readError) {
|
|
43
36
|
console.error(`[LLMCopy] Failed to read file at: ${absoluteFilePath}. Error: ${readError.message}`);
|
|
44
37
|
console.error('[LLMCopy] Read Error object details:', JSON.stringify(readError, Object.getOwnPropertyNames(readError), 2));
|
|
45
38
|
// directory traversal debug logs
|
|
46
39
|
try {
|
|
47
|
-
console.log(`[LLMCopy] Current CWD: ${process.cwd()}`);
|
|
48
|
-
console.log(`[LLMCopy] CWD contents: ${fs.readdirSync(process.cwd()).join(', ')}`);
|
|
49
40
|
const srcPath = nodePath.join(process.cwd(), 'src');
|
|
50
41
|
if (fs.existsSync(srcPath)) {
|
|
51
42
|
console.log(`[LLMCopy] src dir contents: ${fs.readdirSync(srcPath).join(', ')}`);
|
|
@@ -11,14 +11,9 @@ function LLMCopyHandler(options) {
|
|
|
11
11
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12
12
|
var _a, _b, _c, _d;
|
|
13
13
|
const { sourceDir, dataSource, requestedPath, locale } = options;
|
|
14
|
-
// log received parameters
|
|
15
|
-
console.log(`[LLMCopy] Received, locale=${locale}, path=${requestedPath}`);
|
|
16
14
|
const slug = (requestedPath === null || requestedPath === void 0 ? void 0 : requestedPath.split('/')) || [];
|
|
17
15
|
try {
|
|
18
|
-
console.log('[LLMCopy] Attempting to call getPage()');
|
|
19
16
|
const page = dataSource.getPage(slug, locale);
|
|
20
|
-
// console.log(page);
|
|
21
|
-
console.log('[LLMCopy] Call to getPage() completed.');
|
|
22
17
|
if (!page) {
|
|
23
18
|
console.error(`[LLMCopy] Page or page data not found for locale=${locale}, path=${requestedPath}`);
|
|
24
19
|
return { error: 'Page data not found', status: 404 };
|
|
@@ -31,19 +26,15 @@ function LLMCopyHandler(options) {
|
|
|
31
26
|
const description = (_d = (_c = page.data) === null || _c === void 0 ? void 0 : _c.description) !== null && _d !== void 0 ? _d : page.description;
|
|
32
27
|
const relativeMdxFilePath = page.path;
|
|
33
28
|
const absoluteFilePath = nodePath.join(process.cwd(), sourceDir, relativeMdxFilePath);
|
|
34
|
-
console.log(`[LLMCopy] Attempting to read MDX content from: ${absoluteFilePath}`);
|
|
35
29
|
let mdxContent;
|
|
36
30
|
try {
|
|
37
31
|
mdxContent = fs.readFileSync(absoluteFilePath, 'utf-8');
|
|
38
|
-
console.log(`[LLMCopy] Successfully read MDX content from: ${absoluteFilePath}`);
|
|
39
32
|
}
|
|
40
33
|
catch (readError) {
|
|
41
34
|
console.error(`[LLMCopy] Failed to read file at: ${absoluteFilePath}. Error: ${readError.message}`);
|
|
42
35
|
console.error('[LLMCopy] Read Error object details:', JSON.stringify(readError, Object.getOwnPropertyNames(readError), 2));
|
|
43
36
|
// directory traversal debug logs
|
|
44
37
|
try {
|
|
45
|
-
console.log(`[LLMCopy] Current CWD: ${process.cwd()}`);
|
|
46
|
-
console.log(`[LLMCopy] CWD contents: ${fs.readdirSync(process.cwd()).join(', ')}`);
|
|
47
38
|
const srcPath = nodePath.join(process.cwd(), 'src');
|
|
48
39
|
if (fs.existsSync(srcPath)) {
|
|
49
40
|
console.log(`[LLMCopy] src dir contents: ${fs.readdirSync(srcPath).join(', ')}`);
|
package/dist/fuma/mdx/index.d.ts
CHANGED
package/dist/fuma/mdx/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
var trophyCard = require('./trophy-card.js');
|
|
5
5
|
var ziaCard = require('./zia-card.js');
|
|
6
|
-
var gradientButton = require('./gradient-button.js');
|
|
7
6
|
var tocBase = require('./toc-base.js');
|
|
8
7
|
var fumaGithubInfo = require('./fuma-github-info.js');
|
|
9
8
|
var ziaFile = require('./zia-file.js');
|
|
@@ -16,7 +15,6 @@ var sunoEmbed = require('./suno-embed.js');
|
|
|
16
15
|
|
|
17
16
|
exports.TrophyCard = trophyCard.TrophyCard;
|
|
18
17
|
exports.ZiaCard = ziaCard.ZiaCard;
|
|
19
|
-
exports.GradientButton = gradientButton.GradientButton;
|
|
20
18
|
exports.EditOnGitHub = tocBase.EditOnGitHub;
|
|
21
19
|
exports.LLMCopyButton = tocBase.LLMCopyButton;
|
|
22
20
|
exports.LastUpdatedDate = tocBase.LastUpdatedDate;
|
package/dist/fuma/mdx/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
export { TrophyCard } from './trophy-card.mjs';
|
|
3
3
|
export { ZiaCard } from './zia-card.mjs';
|
|
4
|
-
export { GradientButton } from './gradient-button.mjs';
|
|
5
4
|
export { EditOnGitHub, LLMCopyButton, LastUpdatedDate } from './toc-base.mjs';
|
|
6
5
|
export { FumaGithubInfo } from './fuma-github-info.mjs';
|
|
7
6
|
export { ZiaFile, ZiaFolder } from './zia-file.mjs';
|
|
@@ -6,7 +6,9 @@ var React = require('react');
|
|
|
6
6
|
var utils = require('@windrun-huaiin/lib/utils');
|
|
7
7
|
var lib = require('@windrun-huaiin/base-ui/lib');
|
|
8
8
|
var snakeLoadingFrame = require('../../main/snake-loading-frame.js');
|
|
9
|
-
var gradientButton = require('
|
|
9
|
+
var gradientButton = require('../../main/buttons/gradient-button.js');
|
|
10
|
+
require('tslib');
|
|
11
|
+
require('@windrun-huaiin/base-ui/icons');
|
|
10
12
|
|
|
11
13
|
var _a;
|
|
12
14
|
const rawTimeoutSeconds = (_a = process.env.NEXT_PUBLIC_SUNO_EMBED_TIMEOUT_SECONDS) !== null && _a !== void 0 ? _a : '30';
|
|
@@ -4,7 +4,9 @@ import { useState, useRef, useEffect } from 'react';
|
|
|
4
4
|
import { cn } from '@windrun-huaiin/lib/utils';
|
|
5
5
|
import { themeSvgIconColor, themeBgColor } from '@windrun-huaiin/base-ui/lib';
|
|
6
6
|
import { SnakeLoadingFrame } from '../../main/snake-loading-frame.mjs';
|
|
7
|
-
import { GradientButton } from '
|
|
7
|
+
import { GradientButton } from '../../main/buttons/gradient-button.mjs';
|
|
8
|
+
import 'tslib';
|
|
9
|
+
import '@windrun-huaiin/base-ui/icons';
|
|
8
10
|
|
|
9
11
|
var _a;
|
|
10
12
|
const rawTimeoutSeconds = (_a = process.env.NEXT_PUBLIC_SUNO_EMBED_TIMEOUT_SECONDS) !== null && _a !== void 0 ? _a : '30';
|
|
@@ -4,7 +4,11 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var trophyCard = require('../../mdx/trophy-card.js');
|
|
6
6
|
var ziaCard = require('../../mdx/zia-card.js');
|
|
7
|
-
var gradientButton = require('
|
|
7
|
+
var gradientButton = require('../../../main/buttons/gradient-button.js');
|
|
8
|
+
require('tslib');
|
|
9
|
+
require('@windrun-huaiin/base-ui/icons');
|
|
10
|
+
require('@windrun-huaiin/base-ui/lib');
|
|
11
|
+
require('@windrun-huaiin/lib/utils');
|
|
8
12
|
var ziaFile = require('../../mdx/zia-file.js');
|
|
9
13
|
var sunoEmbed = require('../../mdx/suno-embed.js');
|
|
10
14
|
|
|
@@ -2,7 +2,11 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { lazy } from 'react';
|
|
3
3
|
import { TrophyCard } from '../../mdx/trophy-card.mjs';
|
|
4
4
|
import { ZiaCard } from '../../mdx/zia-card.mjs';
|
|
5
|
-
import { GradientButton } from '
|
|
5
|
+
import { GradientButton } from '../../../main/buttons/gradient-button.mjs';
|
|
6
|
+
import 'tslib';
|
|
7
|
+
import '@windrun-huaiin/base-ui/icons';
|
|
8
|
+
import '@windrun-huaiin/base-ui/lib';
|
|
9
|
+
import '@windrun-huaiin/lib/utils';
|
|
6
10
|
import { ZiaFolder, ZiaFile } from '../../mdx/zia-file.mjs';
|
|
7
11
|
import { SunoEmbed } from '../../mdx/suno-embed.mjs';
|
|
8
12
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LLMCopyHandler } from '../llm-copy-handler.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createFumaPage } from '../fuma-page-genarator.mjs';
|
package/dist/lib/seo-metadata.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var server = require('next-intl/server');
|
|
5
|
-
var
|
|
5
|
+
var utils = require('@windrun-huaiin/lib/utils');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_SITE_ICONS = [
|
|
8
8
|
{ rel: 'icon', type: 'image/png', sizes: '16x16', url: '/favicon-16x16.png' },
|
|
@@ -20,10 +20,10 @@ function createLocalizedSiteMetadata(options) {
|
|
|
20
20
|
description: t('webDescription'),
|
|
21
21
|
keywords: t('keywords'),
|
|
22
22
|
alternates: {
|
|
23
|
-
canonical: `${baseUrl}${
|
|
23
|
+
canonical: `${baseUrl}${utils.getAsNeededLocalizedUrl(locale, '/', localePrefixAsNeeded, defaultLocale)}`,
|
|
24
24
|
languages: Object.fromEntries(locales.map((siteLocale) => [
|
|
25
25
|
siteLocale,
|
|
26
|
-
`${baseUrl}${
|
|
26
|
+
`${baseUrl}${utils.getAsNeededLocalizedUrl(siteLocale, '/', localePrefixAsNeeded, defaultLocale)}`,
|
|
27
27
|
])),
|
|
28
28
|
},
|
|
29
29
|
icons: DEFAULT_SITE_ICONS,
|