@windrun-huaiin/third-ui 11.0.8 → 11.0.10
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/fuma/base/custom-home-layout.d.ts +8 -0
- package/dist/fuma/base/custom-home-layout.js +4 -0
- package/dist/fuma/base/custom-home-layout.mjs +4 -1
- package/dist/fuma/base/index.js +1 -0
- package/dist/fuma/base/index.mjs +1 -1
- package/dist/main/footer.js +1 -1
- package/dist/main/footer.mjs +1 -1
- package/package.json +1 -1
- package/src/fuma/base/custom-home-layout.tsx +19 -0
- package/src/main/footer.tsx +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { type HomeLayoutProps } from 'fumadocs-ui/layouts/home';
|
|
3
|
+
import { type LinkItemType } from 'fumadocs-ui/layouts/docs';
|
|
3
4
|
import { type DesktopAction, type MobileBarAction, type MobileMenuAction } from './custom-header';
|
|
5
|
+
export type ExtendedLinkItem = LinkItemType & {
|
|
6
|
+
mobilePinned?: boolean;
|
|
7
|
+
};
|
|
4
8
|
export interface CustomHomeLayoutProps {
|
|
5
9
|
locale: string;
|
|
6
10
|
options: HomeLayoutProps;
|
|
@@ -76,3 +80,7 @@ export interface HeaderActionOrders {
|
|
|
76
80
|
mobileMenu?: MobileMenuAction[];
|
|
77
81
|
}
|
|
78
82
|
export declare function CustomHomeLayout({ locale, options, children, showBanner, bannerHeight, headerHeight, headerPaddingTop, navbarClassName, banner, footer, goToTop, showFooter, showGoToTop, style, floatingNav, actionOrders, }: CustomHomeLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
export declare function HomeTitle({ children, className, }: {
|
|
84
|
+
children: ReactNode;
|
|
85
|
+
className?: string;
|
|
86
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,5 +19,9 @@ function CustomHomeLayout({ locale, options, children, showBanner = false, banne
|
|
|
19
19
|
const header = (jsxRuntime.jsx(customHeader.CustomHomeHeader, Object.assign({}, homeLayoutProps, { nav: navOptions, bannerHeight: resolvedBannerHeight, headerHeight: headerHeight, navbarClassName: navbarClassName, floating: floatingNav, desktopActionsOrder: actionOrders === null || actionOrders === void 0 ? void 0 : actionOrders.desktop, mobileBarActionsOrder: actionOrders === null || actionOrders === void 0 ? void 0 : actionOrders.mobileBar, mobileMenuActionsOrder: actionOrders === null || actionOrders === void 0 ? void 0 : actionOrders.mobileMenu })));
|
|
20
20
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [banner !== null && banner !== void 0 ? banner : (jsxRuntime.jsx(fumaBannerSuit.FumaBannerSuit, { locale: locale, showBanner: showBanner, floating: floatingNav })), jsxRuntime.jsxs(home.HomeLayout, Object.assign({}, homeLayoutProps, { nav: Object.assign(Object.assign({}, navOptions), { component: header }), className: 'bg-neutral-100 dark:bg-neutral-900', style: layoutStyle, children: [children, showFooter ? footer$1 !== null && footer$1 !== void 0 ? footer$1 : jsxRuntime.jsx(footer.Footer, { locale: locale }) : null, showGoToTop ? goToTop$1 !== null && goToTop$1 !== void 0 ? goToTop$1 : jsxRuntime.jsx(goToTop.GoToTop, {}) : null] }))] }));
|
|
21
21
|
}
|
|
22
|
+
function HomeTitle({ children, className, }) {
|
|
23
|
+
return (jsxRuntime.jsx("span", { className: `font-medium in-[.uwu]:hidden in-[header]:text-[clamp(8px,3vw,15px)]! ${className !== null && className !== void 0 ? className : ''}`, children: children }));
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
exports.CustomHomeLayout = CustomHomeLayout;
|
|
27
|
+
exports.HomeTitle = HomeTitle;
|
|
@@ -17,5 +17,8 @@ function CustomHomeLayout({ locale, options, children, showBanner = false, banne
|
|
|
17
17
|
const header = (jsx(CustomHomeHeader, Object.assign({}, homeLayoutProps, { nav: navOptions, bannerHeight: resolvedBannerHeight, headerHeight: headerHeight, navbarClassName: navbarClassName, floating: floatingNav, desktopActionsOrder: actionOrders === null || actionOrders === void 0 ? void 0 : actionOrders.desktop, mobileBarActionsOrder: actionOrders === null || actionOrders === void 0 ? void 0 : actionOrders.mobileBar, mobileMenuActionsOrder: actionOrders === null || actionOrders === void 0 ? void 0 : actionOrders.mobileMenu })));
|
|
18
18
|
return (jsxs(Fragment, { children: [banner !== null && banner !== void 0 ? banner : (jsx(FumaBannerSuit, { locale: locale, showBanner: showBanner, floating: floatingNav })), jsxs(HomeLayout, Object.assign({}, homeLayoutProps, { nav: Object.assign(Object.assign({}, navOptions), { component: header }), className: 'bg-neutral-100 dark:bg-neutral-900', style: layoutStyle, children: [children, showFooter ? footer !== null && footer !== void 0 ? footer : jsx(Footer, { locale: locale }) : null, showGoToTop ? goToTop !== null && goToTop !== void 0 ? goToTop : jsx(GoToTop, {}) : null] }))] }));
|
|
19
19
|
}
|
|
20
|
+
function HomeTitle({ children, className, }) {
|
|
21
|
+
return (jsx("span", { className: `font-medium in-[.uwu]:hidden in-[header]:text-[clamp(8px,3vw,15px)]! ${className !== null && className !== void 0 ? className : ''}`, children: children }));
|
|
22
|
+
}
|
|
20
23
|
|
|
21
|
-
export { CustomHomeLayout };
|
|
24
|
+
export { CustomHomeLayout, HomeTitle };
|
package/dist/fuma/base/index.js
CHANGED
package/dist/fuma/base/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { CustomHomeHeader } from './custom-header.mjs';
|
|
2
|
-
export { CustomHomeLayout } from './custom-home-layout.mjs';
|
|
2
|
+
export { CustomHomeLayout, HomeTitle } from './custom-home-layout.mjs';
|
package/dist/main/footer.js
CHANGED
|
@@ -17,7 +17,7 @@ function Footer(_a) {
|
|
|
17
17
|
company: tFooter('company'),
|
|
18
18
|
copyright: tFooter('copyright', { year: new Date().getFullYear(), name: tFooter('company') })
|
|
19
19
|
};
|
|
20
|
-
return (jsxRuntime.jsx("div", { className: "mb-10 w-full mx-auto border-t-purple-700/80 border-t", children: jsxRuntime.jsx("footer", { children: jsxRuntime.jsxs("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-center
|
|
20
|
+
return (jsxRuntime.jsx("div", { className: "mb-10 w-full mx-auto border-t-purple-700/80 border-t", children: jsxRuntime.jsx("footer", { children: jsxRuntime.jsxs("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-x-2 gap-y-2 text-xs sm:gap-x-6", children: [jsxRuntime.jsxs(Link, { href: `/${locale}/legal/terms`, className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(server$1.globalLucideIcons.ReceiptText, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.terms })] }), jsxRuntime.jsxs(Link, { href: `/${locale}/legal/privacy`, className: "flex items-center space-x-1 hover:underline", children: [jsxRuntime.jsx(server$1.globalLucideIcons.ShieldUser, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.privacy })] }), jsxRuntime.jsxs("div", { className: "relative group", children: [jsxRuntime.jsx("div", { className: "absolute left-2/3 -translate-x-1/4 bottom-full mb-1 hidden group-hover:block bg-zinc-600 text-white text-xs rounded px-3 py-1 whitespace-nowrap z-10 shadow-lg", children: data.email }), jsxRuntime.jsxs("a", { href: `mailto:${data.email}`, className: "flex items-center space-x-1 underline cursor-pointer px-2", children: [jsxRuntime.jsx(server$1.globalLucideIcons.Mail, { className: "h-3.5 w-3.5" }), jsxRuntime.jsx("span", { children: data.contactUs })] })] })] }), jsxRuntime.jsx("div", { className: "text-xs text-center", children: jsxRuntime.jsx("span", { children: data.copyright }) })] }) }) }));
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
|
package/dist/main/footer.mjs
CHANGED
|
@@ -15,7 +15,7 @@ function Footer(_a) {
|
|
|
15
15
|
company: tFooter('company'),
|
|
16
16
|
copyright: tFooter('copyright', { year: new Date().getFullYear(), name: tFooter('company') })
|
|
17
17
|
};
|
|
18
|
-
return (jsx("div", { className: "mb-10 w-full mx-auto border-t-purple-700/80 border-t", children: jsx("footer", { children: jsxs("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [jsxs("div", { className: "flex items-center justify-center
|
|
18
|
+
return (jsx("div", { className: "mb-10 w-full mx-auto border-t-purple-700/80 border-t", children: jsx("footer", { children: jsxs("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [jsxs("div", { className: "flex flex-wrap items-center justify-center gap-x-2 gap-y-2 text-xs sm:gap-x-6", children: [jsxs(Link, { href: `/${locale}/legal/terms`, className: "flex items-center space-x-1 hover:underline", children: [jsx(globalLucideIcons.ReceiptText, { className: "h-3.5 w-3.5" }), jsx("span", { children: data.terms })] }), jsxs(Link, { href: `/${locale}/legal/privacy`, className: "flex items-center space-x-1 hover:underline", children: [jsx(globalLucideIcons.ShieldUser, { className: "h-3.5 w-3.5" }), jsx("span", { children: data.privacy })] }), jsxs("div", { className: "relative group", children: [jsx("div", { className: "absolute left-2/3 -translate-x-1/4 bottom-full mb-1 hidden group-hover:block bg-zinc-600 text-white text-xs rounded px-3 py-1 whitespace-nowrap z-10 shadow-lg", children: data.email }), jsxs("a", { href: `mailto:${data.email}`, className: "flex items-center space-x-1 underline cursor-pointer px-2", children: [jsx(globalLucideIcons.Mail, { className: "h-3.5 w-3.5" }), jsx("span", { children: data.contactUs })] })] })] }), jsx("div", { className: "text-xs text-center", children: jsx("span", { children: data.copyright }) })] }) }) }));
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { HomeLayout, type HomeLayoutProps } from 'fumadocs-ui/layouts/home';
|
|
3
|
+
import { type LinkItemType } from 'fumadocs-ui/layouts/docs';
|
|
3
4
|
import { FumaBannerSuit } from '@third-ui/fuma/fuma-banner-suit';
|
|
4
5
|
import { Footer } from '@third-ui/main/footer';
|
|
5
6
|
import { GoToTop } from '@third-ui/main/go-to-top';
|
|
@@ -11,6 +12,8 @@ import {
|
|
|
11
12
|
type MobileMenuAction,
|
|
12
13
|
} from './custom-header';
|
|
13
14
|
|
|
15
|
+
export type ExtendedLinkItem = LinkItemType & { mobilePinned?: boolean };
|
|
16
|
+
|
|
14
17
|
// - bannerHeight/headerHeight 换成你项目期望的 rem 值即可(如果没有 Banner 就把 bannerHeight 设成 0)。
|
|
15
18
|
// - layoutStyle 同时把变量传给 HomeLayout 的 main 元素,这样内容整体会往下错开,不需要 has-banner/no-banner class。
|
|
16
19
|
// - CustomHomeHeader 直接接受 HomeLayout 的各类 props(links、nav、searchToggle、themeSwitch、i18n 等),内部会复用 Fumadocs 原本的导航功能。
|
|
@@ -164,3 +167,19 @@ export function CustomHomeLayout({
|
|
|
164
167
|
</>
|
|
165
168
|
);
|
|
166
169
|
}
|
|
170
|
+
|
|
171
|
+
export function HomeTitle({
|
|
172
|
+
children,
|
|
173
|
+
className,
|
|
174
|
+
}: {
|
|
175
|
+
children: ReactNode;
|
|
176
|
+
className?: string;
|
|
177
|
+
}) {
|
|
178
|
+
return (
|
|
179
|
+
<span
|
|
180
|
+
className={`font-medium in-[.uwu]:hidden in-[header]:text-[clamp(8px,3vw,15px)]! ${className ?? ''}`}
|
|
181
|
+
>
|
|
182
|
+
{children}
|
|
183
|
+
</span>
|
|
184
|
+
);
|
|
185
|
+
}
|
package/src/main/footer.tsx
CHANGED
|
@@ -27,7 +27,7 @@ export async function Footer({ locale }: { locale: string }) {
|
|
|
27
27
|
<div className="mb-10 w-full mx-auto border-t-purple-700/80 border-t">
|
|
28
28
|
<footer>
|
|
29
29
|
<div className="w-full flex flex-col items-center justify-center px-4 py-8 space-y-3">
|
|
30
|
-
<div className="flex items-center justify-center
|
|
30
|
+
<div className="flex flex-wrap items-center justify-center gap-x-2 gap-y-2 text-xs sm:gap-x-6">
|
|
31
31
|
<Link href={`/${locale}/legal/terms`} className="flex items-center space-x-1 hover:underline">
|
|
32
32
|
<icons.ReceiptText className="h-3.5 w-3.5"/>
|
|
33
33
|
<span>{data.terms}</span>
|