fumadocs-ui 15.2.1 → 15.2.3
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/components/callout.d.ts +1 -1
- package/dist/components/layout/sidebar.js +2 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/contexts/i18n.d.ts +1 -33
- package/dist/contexts/i18n.d.ts.map +1 -1
- package/dist/contexts/i18n.js +3 -34
- package/dist/i18n.d.ts +12 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +39 -1
- package/dist/mdx.d.ts +1 -1
- package/dist/provider/base.d.ts +22 -1
- package/dist/provider/base.d.ts.map +1 -1
- package/dist/provider/base.js +36 -2
- package/dist/style.css +254 -36
- package/package.json +11 -11
- package/dist/components/registry.d.ts +0 -3
- package/dist/components/registry.d.ts.map +0 -1
- package/dist/components/registry.js +0 -92
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
-
export declare const Callout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "
|
|
2
|
+
export declare const Callout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "icon" | "type" | "title"> & {
|
|
3
3
|
title?: ReactNode;
|
|
4
4
|
/**
|
|
5
5
|
* @defaultValue info
|
|
@@ -63,7 +63,8 @@ export function Sidebar({ defaultOpenLevel = 0, prefetch = true, inner, ...props
|
|
|
63
63
|
level: 1,
|
|
64
64
|
};
|
|
65
65
|
}, [defaultOpenLevel, prefetch]);
|
|
66
|
-
return (_jsx(Context.Provider, { value: context, children: _jsx(Base.SidebarList, { id: "nd-sidebar",
|
|
66
|
+
return (_jsx(Context.Provider, { value: context, children: _jsx(Base.SidebarList, { id: "nd-sidebar", removeScrollOn: "(min-width: 768px)" // md
|
|
67
|
+
, ...props, className: cn('fixed top-[calc(var(--fd-banner-height)+var(--fd-nav-height))] z-20 bg-fd-card text-sm md:sticky md:h-(--fd-sidebar-height)', 'max-md:inset-x-0 max-md:bottom-0 max-md:bg-fd-background/80 max-md:text-[15px] max-md:backdrop-blur-lg max-md:data-[open=false]:invisible', props.className), style: {
|
|
67
68
|
...props.style,
|
|
68
69
|
'--fd-sidebar-height': 'calc(100dvh - var(--fd-banner-height) - var(--fd-nav-height))',
|
|
69
70
|
}, children: _jsx("div", { ...inner, className: cn('flex size-full max-w-full flex-col pt-2 md:ms-auto md:w-(--fd-sidebar-width) md:border-e md:pt-4', inner?.className), children: props.children }) }) }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const buttonVariants: (props?: ({
|
|
3
3
|
color?: "primary" | "outline" | "ghost" | "secondary" | null | undefined;
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "sm" | "icon" | "icon-sm" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export type ButtonProps = VariantProps<typeof buttonVariants>;
|
|
7
7
|
//# sourceMappingURL=button.d.ts.map
|
package/dist/contexts/i18n.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
1
|
export interface Translations {
|
|
3
2
|
search: string;
|
|
4
3
|
searchNoResult: string;
|
|
@@ -22,41 +21,10 @@ interface I18nContextType {
|
|
|
22
21
|
locales?: LocaleItem[];
|
|
23
22
|
}
|
|
24
23
|
export declare const defaultTranslations: Translations;
|
|
25
|
-
export declare const I18nContext:
|
|
26
|
-
Provider: (props: {
|
|
27
|
-
value: I18nContextType;
|
|
28
|
-
children: ReactNode;
|
|
29
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
use: (errorMessage?: string) => I18nContextType;
|
|
31
|
-
};
|
|
24
|
+
export declare const I18nContext: import("react").Context<I18nContextType>;
|
|
32
25
|
export declare function I18nLabel(props: {
|
|
33
26
|
label: keyof Translations;
|
|
34
27
|
}): string;
|
|
35
28
|
export declare function useI18n(): I18nContextType;
|
|
36
|
-
export interface I18nProviderProps {
|
|
37
|
-
/**
|
|
38
|
-
* Current locale
|
|
39
|
-
*/
|
|
40
|
-
locale: string;
|
|
41
|
-
/**
|
|
42
|
-
* Handle changes to the locale, redirect user when not specified.
|
|
43
|
-
*/
|
|
44
|
-
onLocaleChange?: (v: string) => void;
|
|
45
|
-
/**
|
|
46
|
-
* Translations of current locale
|
|
47
|
-
*/
|
|
48
|
-
translations?: Partial<Translations>;
|
|
49
|
-
/**
|
|
50
|
-
* Available languages
|
|
51
|
-
*/
|
|
52
|
-
locales?: LocaleItem[];
|
|
53
|
-
children?: ReactNode;
|
|
54
|
-
}
|
|
55
|
-
export declare function I18nProvider({ locales, locale, onChange: _onChange, onLocaleChange, ...props }: I18nProviderProps & {
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated use `onLocaleChange` instead
|
|
58
|
-
*/
|
|
59
|
-
onChange?: I18nProviderProps['onLocaleChange'];
|
|
60
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
61
29
|
export {};
|
|
62
30
|
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/contexts/i18n.tsx"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/contexts/i18n.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IAEvB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IAEtB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,EAAE,YAWjC,CAAC;AAEF,eAAO,MAAM,WAAW,0CAEtB,CAAC;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,YAAY,CAAA;CAAE,GAAG,MAAM,CAItE;AAED,wBAAgB,OAAO,IAAI,eAAe,CAEzC"}
|
package/dist/contexts/i18n.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { createContext, usePathname, useRouter } from 'fumadocs-core/framework';
|
|
4
|
-
import { useEffectEvent } from 'fumadocs-core/utils/use-effect-event';
|
|
5
|
-
import { useMemo } from 'react';
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
6
3
|
export const defaultTranslations = {
|
|
7
4
|
search: 'Search',
|
|
8
5
|
searchNoResult: 'No results found',
|
|
@@ -15,7 +12,7 @@ export const defaultTranslations = {
|
|
|
15
12
|
chooseTheme: 'Theme',
|
|
16
13
|
editOnGithub: 'Edit on GitHub',
|
|
17
14
|
};
|
|
18
|
-
export const I18nContext = createContext(
|
|
15
|
+
export const I18nContext = createContext({
|
|
19
16
|
text: defaultTranslations,
|
|
20
17
|
});
|
|
21
18
|
export function I18nLabel(props) {
|
|
@@ -23,33 +20,5 @@ export function I18nLabel(props) {
|
|
|
23
20
|
return text[props.label];
|
|
24
21
|
}
|
|
25
22
|
export function useI18n() {
|
|
26
|
-
return I18nContext
|
|
27
|
-
}
|
|
28
|
-
export function I18nProvider({ locales = [], locale, onChange: _onChange, onLocaleChange = _onChange, ...props }) {
|
|
29
|
-
const router = useRouter();
|
|
30
|
-
const pathname = usePathname();
|
|
31
|
-
const onChange = useEffectEvent((value) => {
|
|
32
|
-
if (onLocaleChange) {
|
|
33
|
-
return onLocaleChange(value);
|
|
34
|
-
}
|
|
35
|
-
const segments = pathname.split('/').filter((v) => v.length > 0);
|
|
36
|
-
// If locale prefix hidden
|
|
37
|
-
if (segments[0] !== locale) {
|
|
38
|
-
segments.unshift(value);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
segments[0] = value;
|
|
42
|
-
}
|
|
43
|
-
router.push(`/${segments.join('/')}`);
|
|
44
|
-
router.refresh();
|
|
45
|
-
});
|
|
46
|
-
return (_jsx(I18nContext.Provider, { value: useMemo(() => ({
|
|
47
|
-
locale,
|
|
48
|
-
locales,
|
|
49
|
-
text: {
|
|
50
|
-
...defaultTranslations,
|
|
51
|
-
...props.translations,
|
|
52
|
-
},
|
|
53
|
-
onChange,
|
|
54
|
-
}), [locale, locales, onChange, props.translations]), children: props.children }));
|
|
23
|
+
return useContext(I18nContext);
|
|
55
24
|
}
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import type { I18nProviderProps } from './provider/base.js';
|
|
2
|
+
export type { I18nProviderProps };
|
|
3
|
+
export { defaultTranslations, type Translations } from './contexts/i18n.js';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated legacy I18n Provider, use `<RootProvider i18n={...} />` instead
|
|
6
|
+
*/
|
|
7
|
+
export declare function I18nProvider({ locales, locale, onChange: _onChange, onLocaleChange, ...props }: I18nProviderProps & {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated use `onLocaleChange` instead
|
|
10
|
+
*/
|
|
11
|
+
onChange?: I18nProviderProps['onLocaleChange'];
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
2
13
|
//# sourceMappingURL=i18n.d.ts.map
|
package/dist/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGzE;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAY,EACZ,MAAM,EACN,QAAQ,EAAE,SAAS,EACnB,cAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CAChD,2CAsCA"}
|
package/dist/i18n.js
CHANGED
|
@@ -1 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
4
|
+
import { useEffectEvent } from 'fumadocs-core/utils/use-effect-event';
|
|
5
|
+
import { useMemo } from 'react';
|
|
6
|
+
import { defaultTranslations, I18nContext } from './contexts/i18n.js';
|
|
7
|
+
export { defaultTranslations } from './contexts/i18n.js';
|
|
8
|
+
// TODO: remove next major
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated legacy I18n Provider, use `<RootProvider i18n={...} />` instead
|
|
11
|
+
*/
|
|
12
|
+
export function I18nProvider({ locales = [], locale, onChange: _onChange, onLocaleChange = _onChange, ...props }) {
|
|
13
|
+
const router = useRouter();
|
|
14
|
+
const pathname = usePathname();
|
|
15
|
+
const onChange = useEffectEvent((value) => {
|
|
16
|
+
if (onLocaleChange) {
|
|
17
|
+
return onLocaleChange(value);
|
|
18
|
+
}
|
|
19
|
+
const segments = pathname.split('/').filter((v) => v.length > 0);
|
|
20
|
+
// If locale prefix hidden
|
|
21
|
+
if (segments[0] !== locale) {
|
|
22
|
+
segments.unshift(value);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
segments[0] = value;
|
|
26
|
+
}
|
|
27
|
+
router.push(`/${segments.join('/')}`);
|
|
28
|
+
router.refresh();
|
|
29
|
+
});
|
|
30
|
+
return (_jsx(I18nContext.Provider, { value: useMemo(() => ({
|
|
31
|
+
locale,
|
|
32
|
+
locales,
|
|
33
|
+
text: {
|
|
34
|
+
...defaultTranslations,
|
|
35
|
+
...props.translations,
|
|
36
|
+
},
|
|
37
|
+
onChange,
|
|
38
|
+
}), [locale, locales, onChange, props.translations]), children: props.children }));
|
|
39
|
+
}
|
package/dist/mdx.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare const defaultMdxComponents: {
|
|
|
17
17
|
h5: (props: HTMLAttributes<HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
h6: (props: HTMLAttributes<HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
table: typeof Table;
|
|
20
|
-
Callout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "
|
|
20
|
+
Callout: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "icon" | "type" | "title"> & {
|
|
21
21
|
title?: import("react").ReactNode;
|
|
22
22
|
type?: "info" | "warn" | "error";
|
|
23
23
|
icon?: import("react").ReactNode;
|
package/dist/provider/base.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ThemeProvider } from 'next-themes';
|
|
|
2
2
|
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
3
|
import type { DefaultSearchDialogProps } from '../components/dialog/search-default.js';
|
|
4
4
|
import { type SearchProviderProps } from '../contexts/search.js';
|
|
5
|
+
import { type LocaleItem, type Translations } from '../contexts/i18n.js';
|
|
5
6
|
interface SearchOptions extends Omit<SearchProviderProps, 'options' | 'children'> {
|
|
6
7
|
options?: Partial<DefaultSearchDialogProps> | SearchProviderProps['options'];
|
|
7
8
|
/**
|
|
@@ -31,8 +32,28 @@ export interface RootProviderProps {
|
|
|
31
32
|
*/
|
|
32
33
|
enabled?: boolean;
|
|
33
34
|
};
|
|
35
|
+
i18n?: Omit<I18nProviderProps, 'children'>;
|
|
34
36
|
children?: ReactNode;
|
|
35
37
|
}
|
|
36
|
-
export
|
|
38
|
+
export interface I18nProviderProps {
|
|
39
|
+
/**
|
|
40
|
+
* Current locale
|
|
41
|
+
*/
|
|
42
|
+
locale: string;
|
|
43
|
+
/**
|
|
44
|
+
* Handle changes to the locale, redirect user when not specified.
|
|
45
|
+
*/
|
|
46
|
+
onLocaleChange?: (v: string) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Translations of current locale
|
|
49
|
+
*/
|
|
50
|
+
translations?: Partial<Translations>;
|
|
51
|
+
/**
|
|
52
|
+
* Available languages
|
|
53
|
+
*/
|
|
54
|
+
locales?: LocaleItem[];
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
export declare function RootProvider({ children, dir, theme, search, i18n, }: RootProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
37
58
|
export {};
|
|
38
59
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/provider/base.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/provider/base.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,aACR,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7E;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAEhC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,CAAC,GAAG;QAChE;;;;WAIG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IAEF,IAAI,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;IAE3C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAErC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IAEvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,GAAW,EACX,KAAU,EACV,MAAM,EACN,IAAI,GACL,EAAE,iBAAiB,2CAgCnB"}
|
package/dist/provider/base.js
CHANGED
|
@@ -1,16 +1,50 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ThemeProvider } from 'next-themes';
|
|
4
|
-
import { lazy } from 'react';
|
|
4
|
+
import { lazy, useMemo, } from 'react';
|
|
5
5
|
import { DirectionProvider } from '@radix-ui/react-direction';
|
|
6
6
|
import { SidebarProvider } from '../contexts/sidebar.js';
|
|
7
7
|
import { SearchProvider } from '../contexts/search.js';
|
|
8
|
+
import { useEffectEvent } from 'fumadocs-core/utils/use-effect-event';
|
|
9
|
+
import { defaultTranslations, I18nContext, } from '../contexts/i18n.js';
|
|
10
|
+
import { usePathname, useRouter } from 'fumadocs-core/framework';
|
|
8
11
|
const DefaultSearchDialog = lazy(() => import('../components/dialog/search-default.js'));
|
|
9
|
-
export function RootProvider({ children, dir = 'ltr', theme = {}, search, }) {
|
|
12
|
+
export function RootProvider({ children, dir = 'ltr', theme = {}, search, i18n, }) {
|
|
10
13
|
let body = children;
|
|
14
|
+
if (i18n) {
|
|
15
|
+
body = _jsx(I18nProvider, { ...i18n, children: body });
|
|
16
|
+
}
|
|
11
17
|
if (search?.enabled !== false)
|
|
12
18
|
body = (_jsx(SearchProvider, { SearchDialog: DefaultSearchDialog, ...search, children: body }));
|
|
13
19
|
if (theme?.enabled !== false)
|
|
14
20
|
body = (_jsx(ThemeProvider, { attribute: "class", defaultTheme: "system", enableSystem: true, disableTransitionOnChange: true, ...theme, children: body }));
|
|
15
21
|
return (_jsx(DirectionProvider, { dir: dir, children: _jsx(SidebarProvider, { children: body }) }));
|
|
16
22
|
}
|
|
23
|
+
function I18nProvider({ locales = [], locale, onLocaleChange, ...props }) {
|
|
24
|
+
const router = useRouter();
|
|
25
|
+
const pathname = usePathname();
|
|
26
|
+
const onChange = useEffectEvent((value) => {
|
|
27
|
+
if (onLocaleChange) {
|
|
28
|
+
return onLocaleChange(value);
|
|
29
|
+
}
|
|
30
|
+
const segments = pathname.split('/').filter((v) => v.length > 0);
|
|
31
|
+
// If locale prefix hidden
|
|
32
|
+
if (segments[0] !== locale) {
|
|
33
|
+
segments.unshift(value);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
segments[0] = value;
|
|
37
|
+
}
|
|
38
|
+
router.push(`/${segments.join('/')}`);
|
|
39
|
+
router.refresh();
|
|
40
|
+
});
|
|
41
|
+
return (_jsx(I18nContext.Provider, { value: useMemo(() => ({
|
|
42
|
+
locale,
|
|
43
|
+
locales,
|
|
44
|
+
text: {
|
|
45
|
+
...defaultTranslations,
|
|
46
|
+
...props.translations,
|
|
47
|
+
},
|
|
48
|
+
onChange,
|
|
49
|
+
}), [locale, locales, onChange, props.translations]), children: props.children }));
|
|
50
|
+
}
|
package/dist/style.css
CHANGED
|
@@ -1,10 +1,73 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.1.1 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer theme, base, components, utilities;
|
|
3
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
4
|
+
@layer base {
|
|
5
|
+
*, ::before, ::after, ::backdrop {
|
|
6
|
+
--tw-translate-x: 0;
|
|
7
|
+
--tw-translate-y: 0;
|
|
8
|
+
--tw-translate-z: 0;
|
|
9
|
+
--tw-scale-x: 1;
|
|
10
|
+
--tw-scale-y: 1;
|
|
11
|
+
--tw-scale-z: 1;
|
|
12
|
+
--tw-rotate-x: rotateX(0);
|
|
13
|
+
--tw-rotate-y: rotateY(0);
|
|
14
|
+
--tw-rotate-z: rotateZ(0);
|
|
15
|
+
--tw-skew-x: skewX(0);
|
|
16
|
+
--tw-skew-y: skewY(0);
|
|
17
|
+
--tw-divide-y-reverse: 0;
|
|
18
|
+
--tw-border-style: solid;
|
|
19
|
+
--tw-font-weight: initial;
|
|
20
|
+
--tw-shadow: 0 0 #0000;
|
|
21
|
+
--tw-shadow-color: initial;
|
|
22
|
+
--tw-shadow-alpha: 100%;
|
|
23
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
24
|
+
--tw-inset-shadow-color: initial;
|
|
25
|
+
--tw-inset-shadow-alpha: 100%;
|
|
26
|
+
--tw-ring-color: initial;
|
|
27
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
28
|
+
--tw-inset-ring-color: initial;
|
|
29
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
30
|
+
--tw-ring-inset: initial;
|
|
31
|
+
--tw-ring-offset-width: 0px;
|
|
32
|
+
--tw-ring-offset-color: #fff;
|
|
33
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
34
|
+
--tw-outline-style: solid;
|
|
35
|
+
--tw-blur: initial;
|
|
36
|
+
--tw-brightness: initial;
|
|
37
|
+
--tw-contrast: initial;
|
|
38
|
+
--tw-grayscale: initial;
|
|
39
|
+
--tw-hue-rotate: initial;
|
|
40
|
+
--tw-invert: initial;
|
|
41
|
+
--tw-opacity: initial;
|
|
42
|
+
--tw-saturate: initial;
|
|
43
|
+
--tw-sepia: initial;
|
|
44
|
+
--tw-drop-shadow: initial;
|
|
45
|
+
--tw-drop-shadow-color: initial;
|
|
46
|
+
--tw-drop-shadow-alpha: 100%;
|
|
47
|
+
--tw-drop-shadow-size: initial;
|
|
48
|
+
--tw-backdrop-blur: initial;
|
|
49
|
+
--tw-backdrop-brightness: initial;
|
|
50
|
+
--tw-backdrop-contrast: initial;
|
|
51
|
+
--tw-backdrop-grayscale: initial;
|
|
52
|
+
--tw-backdrop-hue-rotate: initial;
|
|
53
|
+
--tw-backdrop-invert: initial;
|
|
54
|
+
--tw-backdrop-opacity: initial;
|
|
55
|
+
--tw-backdrop-saturate: initial;
|
|
56
|
+
--tw-backdrop-sepia: initial;
|
|
57
|
+
--tw-duration: initial;
|
|
58
|
+
--radix-collapsible-content-height: 0px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
3
62
|
@layer theme {
|
|
4
63
|
:root, :host {
|
|
5
|
-
--
|
|
6
|
-
|
|
7
|
-
--
|
|
64
|
+
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
65
|
+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
66
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
67
|
+
"Courier New", monospace;
|
|
68
|
+
--color-red-500: oklch(63.7% 0.237 25.331);
|
|
69
|
+
--color-orange-500: oklch(70.5% 0.213 47.604);
|
|
70
|
+
--color-blue-500: oklch(62.3% 0.214 259.815);
|
|
8
71
|
--color-black: #000;
|
|
9
72
|
--spacing: 0.25rem;
|
|
10
73
|
--breakpoint-sm: 40rem;
|
|
@@ -31,6 +94,8 @@
|
|
|
31
94
|
--blur-lg: 16px;
|
|
32
95
|
--default-transition-duration: 150ms;
|
|
33
96
|
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
97
|
+
--default-font-family: var(--font-sans);
|
|
98
|
+
--default-mono-font-family: var(--font-mono);
|
|
34
99
|
--color-fd-background: hsl(0, 0%, 96%);
|
|
35
100
|
--color-fd-foreground: hsl(0, 0%, 3.9%);
|
|
36
101
|
--color-fd-muted: hsl(0, 0%, 96.1%);
|
|
@@ -86,10 +151,9 @@
|
|
|
86
151
|
line-height: 1.5;
|
|
87
152
|
-webkit-text-size-adjust: 100%;
|
|
88
153
|
tab-size: 4;
|
|
89
|
-
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
90
|
-
|
|
91
|
-
font-
|
|
92
|
-
font-variation-settings: initial;
|
|
154
|
+
font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
155
|
+
font-feature-settings: var(--default-font-feature-settings, normal);
|
|
156
|
+
font-variation-settings: var(--default-font-variation-settings, normal);
|
|
93
157
|
-webkit-tap-highlight-color: transparent;
|
|
94
158
|
}
|
|
95
159
|
hr {
|
|
@@ -114,10 +178,9 @@
|
|
|
114
178
|
font-weight: bolder;
|
|
115
179
|
}
|
|
116
180
|
code, kbd, samp, pre {
|
|
117
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
118
|
-
|
|
119
|
-
font-
|
|
120
|
-
font-variation-settings: initial;
|
|
181
|
+
font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
|
|
182
|
+
font-feature-settings: var(--default-mono-font-feature-settings, normal);
|
|
183
|
+
font-variation-settings: var(--default-mono-font-variation-settings, normal);
|
|
121
184
|
font-size: 1em;
|
|
122
185
|
}
|
|
123
186
|
small {
|
|
@@ -293,6 +356,9 @@
|
|
|
293
356
|
.top-\(--fd-banner-height\) {
|
|
294
357
|
top: var(--fd-banner-height);
|
|
295
358
|
}
|
|
359
|
+
.top-\(--fd-nav-height\) {
|
|
360
|
+
top: var(--fd-nav-height);
|
|
361
|
+
}
|
|
296
362
|
.top-0 {
|
|
297
363
|
top: calc(var(--spacing) * 0);
|
|
298
364
|
}
|
|
@@ -308,6 +374,9 @@
|
|
|
308
374
|
.top-12 {
|
|
309
375
|
top: calc(var(--spacing) * 12);
|
|
310
376
|
}
|
|
377
|
+
.top-14 {
|
|
378
|
+
top: calc(var(--spacing) * 14);
|
|
379
|
+
}
|
|
311
380
|
.top-\[10vh\] {
|
|
312
381
|
top: 10vh;
|
|
313
382
|
}
|
|
@@ -729,7 +798,10 @@
|
|
|
729
798
|
:where(a:not([data-card]):hover):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
730
799
|
opacity: 80%;
|
|
731
800
|
}
|
|
732
|
-
--tw-prose-body: color-mix(in
|
|
801
|
+
--tw-prose-body: color-mix(in srgb, hsl(0, 0%, 3.9%) 90%, transparent);
|
|
802
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
803
|
+
--tw-prose-body: color-mix(in oklab, var(--color-fd-foreground) 90%, transparent);
|
|
804
|
+
}
|
|
733
805
|
--tw-prose-headings: var(--color-fd-foreground);
|
|
734
806
|
--tw-prose-lead: var(--color-fd-foreground);
|
|
735
807
|
--tw-prose-links: var(--color-fd-foreground);
|
|
@@ -744,7 +816,10 @@
|
|
|
744
816
|
--tw-prose-th-borders: var(--color-fd-border);
|
|
745
817
|
--tw-prose-td-borders: var(--color-fd-border);
|
|
746
818
|
--tw-prose-kbd: var(--color-fd-foreground);
|
|
747
|
-
--tw-prose-kbd-shadows: color-mix(in
|
|
819
|
+
--tw-prose-kbd-shadows: color-mix(in srgb, hsl(0, 0%, 9%) 50%, transparent);
|
|
820
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
821
|
+
--tw-prose-kbd-shadows: color-mix(in oklab, var(--color-fd-primary) 50%, transparent);
|
|
822
|
+
}
|
|
748
823
|
:where(.prose > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
749
824
|
margin-top: 0;
|
|
750
825
|
}
|
|
@@ -797,12 +872,18 @@
|
|
|
797
872
|
.mt-2 {
|
|
798
873
|
margin-top: calc(var(--spacing) * 2);
|
|
799
874
|
}
|
|
875
|
+
.mt-6 {
|
|
876
|
+
margin-top: calc(var(--spacing) * 6);
|
|
877
|
+
}
|
|
800
878
|
.mt-8 {
|
|
801
879
|
margin-top: calc(var(--spacing) * 8);
|
|
802
880
|
}
|
|
803
881
|
.mt-auto {
|
|
804
882
|
margin-top: auto;
|
|
805
883
|
}
|
|
884
|
+
.mr-auto {
|
|
885
|
+
margin-right: auto;
|
|
886
|
+
}
|
|
806
887
|
.-mb-1 {
|
|
807
888
|
margin-bottom: calc(var(--spacing) * -1);
|
|
808
889
|
}
|
|
@@ -891,6 +972,9 @@
|
|
|
891
972
|
.h-14 {
|
|
892
973
|
height: calc(var(--spacing) * 14);
|
|
893
974
|
}
|
|
975
|
+
.h-\[calc\(100dvh-var\(--fd-nav-height\)\)\] {
|
|
976
|
+
height: calc(100dvh - var(--fd-nav-height));
|
|
977
|
+
}
|
|
894
978
|
.h-full {
|
|
895
979
|
height: 100%;
|
|
896
980
|
}
|
|
@@ -936,6 +1020,9 @@
|
|
|
936
1020
|
.w-\[98vw\] {
|
|
937
1021
|
width: 98vw;
|
|
938
1022
|
}
|
|
1023
|
+
.w-\[286px\] {
|
|
1024
|
+
width: 286px;
|
|
1025
|
+
}
|
|
939
1026
|
.w-fit {
|
|
940
1027
|
width: fit-content;
|
|
941
1028
|
}
|
|
@@ -1159,7 +1246,10 @@
|
|
|
1159
1246
|
border-left-width: 1px;
|
|
1160
1247
|
}
|
|
1161
1248
|
.border-fd-foreground\/10 {
|
|
1162
|
-
border-color: color-mix(in
|
|
1249
|
+
border-color: color-mix(in srgb, hsl(0, 0%, 3.9%) 10%, transparent);
|
|
1250
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1251
|
+
border-color: color-mix(in oklab, var(--color-fd-foreground) 10%, transparent);
|
|
1252
|
+
}
|
|
1163
1253
|
}
|
|
1164
1254
|
.border-fd-primary {
|
|
1165
1255
|
border-color: var(--color-fd-primary);
|
|
@@ -1168,19 +1258,31 @@
|
|
|
1168
1258
|
border-color: transparent;
|
|
1169
1259
|
}
|
|
1170
1260
|
.border-s-blue-500\/50 {
|
|
1171
|
-
border-inline-start-color: color-mix(in
|
|
1261
|
+
border-inline-start-color: color-mix(in srgb, oklch(62.3% 0.214 259.815) 50%, transparent);
|
|
1262
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1263
|
+
border-inline-start-color: color-mix(in oklab, var(--color-blue-500) 50%, transparent);
|
|
1264
|
+
}
|
|
1172
1265
|
}
|
|
1173
1266
|
.border-s-orange-500\/50 {
|
|
1174
|
-
border-inline-start-color: color-mix(in
|
|
1267
|
+
border-inline-start-color: color-mix(in srgb, oklch(70.5% 0.213 47.604) 50%, transparent);
|
|
1268
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1269
|
+
border-inline-start-color: color-mix(in oklab, var(--color-orange-500) 50%, transparent);
|
|
1270
|
+
}
|
|
1175
1271
|
}
|
|
1176
1272
|
.border-s-red-500\/50 {
|
|
1177
|
-
border-inline-start-color: color-mix(in
|
|
1273
|
+
border-inline-start-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 50%, transparent);
|
|
1274
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1275
|
+
border-inline-start-color: color-mix(in oklab, var(--color-red-500) 50%, transparent);
|
|
1276
|
+
}
|
|
1178
1277
|
}
|
|
1179
1278
|
.bg-\(--shiki-light-bg\) {
|
|
1180
1279
|
background-color: var(--shiki-light-bg);
|
|
1181
1280
|
}
|
|
1182
1281
|
.bg-black\/30 {
|
|
1183
|
-
background-color: color-mix(in
|
|
1282
|
+
background-color: color-mix(in srgb, #000 30%, transparent);
|
|
1283
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1284
|
+
background-color: color-mix(in oklab, var(--color-black) 30%, transparent);
|
|
1285
|
+
}
|
|
1184
1286
|
}
|
|
1185
1287
|
.bg-fd-accent {
|
|
1186
1288
|
background-color: var(--color-fd-accent);
|
|
@@ -1189,7 +1291,10 @@
|
|
|
1189
1291
|
background-color: var(--color-fd-background);
|
|
1190
1292
|
}
|
|
1191
1293
|
.bg-fd-background\/80 {
|
|
1192
|
-
background-color: color-mix(in
|
|
1294
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 96%) 80%, transparent);
|
|
1295
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1296
|
+
background-color: color-mix(in oklab, var(--color-fd-background) 80%, transparent);
|
|
1297
|
+
}
|
|
1193
1298
|
}
|
|
1194
1299
|
.bg-fd-border {
|
|
1195
1300
|
background-color: var(--color-fd-border);
|
|
@@ -1198,7 +1303,10 @@
|
|
|
1198
1303
|
background-color: var(--color-fd-card);
|
|
1199
1304
|
}
|
|
1200
1305
|
.bg-fd-foreground\/10 {
|
|
1201
|
-
background-color: color-mix(in
|
|
1306
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 3.9%) 10%, transparent);
|
|
1307
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1308
|
+
background-color: color-mix(in oklab, var(--color-fd-foreground) 10%, transparent);
|
|
1309
|
+
}
|
|
1202
1310
|
}
|
|
1203
1311
|
.bg-fd-muted {
|
|
1204
1312
|
background-color: var(--color-fd-muted);
|
|
@@ -1210,13 +1318,19 @@
|
|
|
1210
1318
|
background-color: var(--color-fd-primary);
|
|
1211
1319
|
}
|
|
1212
1320
|
.bg-fd-primary\/10 {
|
|
1213
|
-
background-color: color-mix(in
|
|
1321
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 9%) 10%, transparent);
|
|
1322
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1323
|
+
background-color: color-mix(in oklab, var(--color-fd-primary) 10%, transparent);
|
|
1324
|
+
}
|
|
1214
1325
|
}
|
|
1215
1326
|
.bg-fd-secondary {
|
|
1216
1327
|
background-color: var(--color-fd-secondary);
|
|
1217
1328
|
}
|
|
1218
1329
|
.bg-fd-secondary\/50 {
|
|
1219
|
-
background-color: color-mix(in
|
|
1330
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 93.1%) 50%, transparent);
|
|
1331
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1332
|
+
background-color: color-mix(in oklab, var(--color-fd-secondary) 50%, transparent);
|
|
1333
|
+
}
|
|
1220
1334
|
}
|
|
1221
1335
|
.bg-transparent {
|
|
1222
1336
|
background-color: transparent;
|
|
@@ -1231,7 +1345,10 @@
|
|
|
1231
1345
|
fill: var(--color-red-500);
|
|
1232
1346
|
}
|
|
1233
1347
|
.stroke-fd-foreground\/10 {
|
|
1234
|
-
stroke: color-mix(in
|
|
1348
|
+
stroke: color-mix(in srgb, hsl(0, 0%, 3.9%) 10%, transparent);
|
|
1349
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1350
|
+
stroke: color-mix(in oklab, var(--color-fd-foreground) 10%, transparent);
|
|
1351
|
+
}
|
|
1235
1352
|
}
|
|
1236
1353
|
.p-0 {
|
|
1237
1354
|
padding: calc(var(--spacing) * 0);
|
|
@@ -1275,6 +1392,9 @@
|
|
|
1275
1392
|
.py-0\.5 {
|
|
1276
1393
|
padding-block: calc(var(--spacing) * 0.5);
|
|
1277
1394
|
}
|
|
1395
|
+
.py-1 {
|
|
1396
|
+
padding-block: calc(var(--spacing) * 1);
|
|
1397
|
+
}
|
|
1278
1398
|
.py-1\.5 {
|
|
1279
1399
|
padding-block: calc(var(--spacing) * 1.5);
|
|
1280
1400
|
}
|
|
@@ -1287,6 +1407,9 @@
|
|
|
1287
1407
|
.py-3 {
|
|
1288
1408
|
padding-block: calc(var(--spacing) * 3);
|
|
1289
1409
|
}
|
|
1410
|
+
.py-8 {
|
|
1411
|
+
padding-block: calc(var(--spacing) * 8);
|
|
1412
|
+
}
|
|
1290
1413
|
.py-12 {
|
|
1291
1414
|
padding-block: calc(var(--spacing) * 12);
|
|
1292
1415
|
}
|
|
@@ -1341,6 +1464,9 @@
|
|
|
1341
1464
|
.pb-6 {
|
|
1342
1465
|
padding-bottom: calc(var(--spacing) * 6);
|
|
1343
1466
|
}
|
|
1467
|
+
.pl-4 {
|
|
1468
|
+
padding-left: calc(var(--spacing) * 4);
|
|
1469
|
+
}
|
|
1344
1470
|
.text-center {
|
|
1345
1471
|
text-align: center;
|
|
1346
1472
|
}
|
|
@@ -1406,10 +1532,16 @@
|
|
|
1406
1532
|
color: var(--color-fd-foreground);
|
|
1407
1533
|
}
|
|
1408
1534
|
.text-fd-foreground\/30 {
|
|
1409
|
-
color: color-mix(in
|
|
1535
|
+
color: color-mix(in srgb, hsl(0, 0%, 3.9%) 30%, transparent);
|
|
1536
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1537
|
+
color: color-mix(in oklab, var(--color-fd-foreground) 30%, transparent);
|
|
1538
|
+
}
|
|
1410
1539
|
}
|
|
1411
1540
|
.text-fd-foreground\/80 {
|
|
1412
|
-
color: color-mix(in
|
|
1541
|
+
color: color-mix(in srgb, hsl(0, 0%, 3.9%) 80%, transparent);
|
|
1542
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1543
|
+
color: color-mix(in oklab, var(--color-fd-foreground) 80%, transparent);
|
|
1544
|
+
}
|
|
1413
1545
|
}
|
|
1414
1546
|
.text-fd-muted-foreground {
|
|
1415
1547
|
color: var(--color-fd-muted-foreground);
|
|
@@ -1515,6 +1647,9 @@
|
|
|
1515
1647
|
-webkit-user-select: none;
|
|
1516
1648
|
user-select: none;
|
|
1517
1649
|
}
|
|
1650
|
+
.\[--fd-nav-height\:56px\] {
|
|
1651
|
+
--fd-nav-height: 56px;
|
|
1652
|
+
}
|
|
1518
1653
|
.\[--fd-nav-height\:calc\(var\(--spacing\)\*14\)\] {
|
|
1519
1654
|
--fd-nav-height: calc(var(--spacing) * 14);
|
|
1520
1655
|
}
|
|
@@ -1550,6 +1685,11 @@
|
|
|
1550
1685
|
color: var(--color-fd-muted-foreground);
|
|
1551
1686
|
}
|
|
1552
1687
|
}
|
|
1688
|
+
.first\:mt-0 {
|
|
1689
|
+
&:first-child {
|
|
1690
|
+
margin-top: calc(var(--spacing) * 0);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1553
1693
|
.first\:pt-0 {
|
|
1554
1694
|
&:first-child {
|
|
1555
1695
|
padding-top: calc(var(--spacing) * 0);
|
|
@@ -1575,21 +1715,30 @@
|
|
|
1575
1715
|
.hover\:bg-fd-accent\/50 {
|
|
1576
1716
|
&:hover {
|
|
1577
1717
|
@media (hover: hover) {
|
|
1578
|
-
background-color: color-mix(in
|
|
1718
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 90.1%) 50%, transparent);
|
|
1719
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1720
|
+
background-color: color-mix(in oklab, var(--color-fd-accent) 50%, transparent);
|
|
1721
|
+
}
|
|
1579
1722
|
}
|
|
1580
1723
|
}
|
|
1581
1724
|
}
|
|
1582
1725
|
.hover\:bg-fd-accent\/80 {
|
|
1583
1726
|
&:hover {
|
|
1584
1727
|
@media (hover: hover) {
|
|
1585
|
-
background-color: color-mix(in
|
|
1728
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 90.1%) 80%, transparent);
|
|
1729
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1730
|
+
background-color: color-mix(in oklab, var(--color-fd-accent) 80%, transparent);
|
|
1731
|
+
}
|
|
1586
1732
|
}
|
|
1587
1733
|
}
|
|
1588
1734
|
}
|
|
1589
1735
|
.hover\:bg-fd-primary\/80 {
|
|
1590
1736
|
&:hover {
|
|
1591
1737
|
@media (hover: hover) {
|
|
1592
|
-
background-color: color-mix(in
|
|
1738
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 9%) 80%, transparent);
|
|
1739
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1740
|
+
background-color: color-mix(in oklab, var(--color-fd-primary) 80%, transparent);
|
|
1741
|
+
}
|
|
1593
1742
|
}
|
|
1594
1743
|
}
|
|
1595
1744
|
}
|
|
@@ -1603,14 +1752,20 @@
|
|
|
1603
1752
|
.hover\:text-fd-accent-foreground\/80 {
|
|
1604
1753
|
&:hover {
|
|
1605
1754
|
@media (hover: hover) {
|
|
1606
|
-
color: color-mix(in
|
|
1755
|
+
color: color-mix(in srgb, hsl(0, 0%, 9%) 80%, transparent);
|
|
1756
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1757
|
+
color: color-mix(in oklab, var(--color-fd-accent-foreground) 80%, transparent);
|
|
1758
|
+
}
|
|
1607
1759
|
}
|
|
1608
1760
|
}
|
|
1609
1761
|
}
|
|
1610
1762
|
.hover\:text-fd-popover-foreground\/50 {
|
|
1611
1763
|
&:hover {
|
|
1612
1764
|
@media (hover: hover) {
|
|
1613
|
-
color: color-mix(in
|
|
1765
|
+
color: color-mix(in srgb, hsl(0, 0%, 15.1%) 50%, transparent);
|
|
1766
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1767
|
+
color: color-mix(in oklab, var(--color-fd-popover-foreground) 50%, transparent);
|
|
1768
|
+
}
|
|
1614
1769
|
}
|
|
1615
1770
|
}
|
|
1616
1771
|
}
|
|
@@ -1762,7 +1917,10 @@
|
|
|
1762
1917
|
}
|
|
1763
1918
|
.data-\[state\=open\]\:bg-fd-accent\/50 {
|
|
1764
1919
|
&[data-state="open"] {
|
|
1765
|
-
background-color: color-mix(in
|
|
1920
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 90.1%) 50%, transparent);
|
|
1921
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1922
|
+
background-color: color-mix(in oklab, var(--color-fd-accent) 50%, transparent);
|
|
1923
|
+
}
|
|
1766
1924
|
}
|
|
1767
1925
|
}
|
|
1768
1926
|
.max-xl\:end-4 {
|
|
@@ -1780,6 +1938,11 @@
|
|
|
1780
1938
|
display: none;
|
|
1781
1939
|
}
|
|
1782
1940
|
}
|
|
1941
|
+
.max-md\:invisible {
|
|
1942
|
+
@media (width < 48rem) {
|
|
1943
|
+
visibility: hidden;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1783
1946
|
.max-md\:inset-x-0 {
|
|
1784
1947
|
@media (width < 48rem) {
|
|
1785
1948
|
inset-inline: calc(var(--spacing) * 0);
|
|
@@ -1795,9 +1958,17 @@
|
|
|
1795
1958
|
display: none;
|
|
1796
1959
|
}
|
|
1797
1960
|
}
|
|
1961
|
+
.max-md\:bg-fd-background {
|
|
1962
|
+
@media (width < 48rem) {
|
|
1963
|
+
background-color: var(--color-fd-background);
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1798
1966
|
.max-md\:bg-fd-background\/80 {
|
|
1799
1967
|
@media (width < 48rem) {
|
|
1800
|
-
background-color: color-mix(in
|
|
1968
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 96%) 80%, transparent);
|
|
1969
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1970
|
+
background-color: color-mix(in oklab, var(--color-fd-background) 80%, transparent);
|
|
1971
|
+
}
|
|
1801
1972
|
}
|
|
1802
1973
|
}
|
|
1803
1974
|
.max-md\:text-\[15px\] {
|
|
@@ -1859,6 +2030,11 @@
|
|
|
1859
2030
|
margin-inline: calc(var(--spacing) * 6);
|
|
1860
2031
|
}
|
|
1861
2032
|
}
|
|
2033
|
+
.md\:mx-auto {
|
|
2034
|
+
@media (width >= 48rem) {
|
|
2035
|
+
margin-inline: auto;
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
1862
2038
|
.md\:ms-auto {
|
|
1863
2039
|
@media (width >= 48rem) {
|
|
1864
2040
|
margin-inline-start: auto;
|
|
@@ -1879,11 +2055,21 @@
|
|
|
1879
2055
|
height: var(--fd-sidebar-height);
|
|
1880
2056
|
}
|
|
1881
2057
|
}
|
|
2058
|
+
.md\:h-\[calc\(100dvh-56px\)\] {
|
|
2059
|
+
@media (width >= 48rem) {
|
|
2060
|
+
height: calc(100dvh - 56px);
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
1882
2063
|
.md\:w-\(--fd-sidebar-width\) {
|
|
1883
2064
|
@media (width >= 48rem) {
|
|
1884
2065
|
width: var(--fd-sidebar-width);
|
|
1885
2066
|
}
|
|
1886
2067
|
}
|
|
2068
|
+
.md\:w-\[300px\] {
|
|
2069
|
+
@media (width >= 48rem) {
|
|
2070
|
+
width: 300px;
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
1887
2073
|
.md\:-translate-x-\(--fd-sidebar-offset\) {
|
|
1888
2074
|
@media (width >= 48rem) {
|
|
1889
2075
|
--tw-translate-x: calc(var(--fd-sidebar-offset) * -1);
|
|
@@ -2219,13 +2405,22 @@
|
|
|
2219
2405
|
.fd-codeblock .highlighted {
|
|
2220
2406
|
margin: 0 -16px;
|
|
2221
2407
|
padding: 0 16px;
|
|
2222
|
-
background-color: color-mix( in oklab,
|
|
2408
|
+
background-color: color-mix( in oklab, hsl(0, 0%, 9%) 10%, transparent );
|
|
2409
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2410
|
+
background-color: color-mix( in oklab, var(--color-fd-primary) 10%, transparent );
|
|
2411
|
+
}
|
|
2223
2412
|
}
|
|
2224
2413
|
.fd-codeblock .highlighted-word {
|
|
2225
2414
|
padding: 1px 2px;
|
|
2226
2415
|
margin: -1px -3px;
|
|
2227
|
-
border: 1px solid color-mix(in
|
|
2228
|
-
|
|
2416
|
+
border: 1px solid color-mix(in srgb, hsl(0, 0%, 9%) 50%, transparent);
|
|
2417
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2418
|
+
border: 1px solid color-mix(in oklab, var(--color-fd-primary) 50%, transparent);
|
|
2419
|
+
}
|
|
2420
|
+
background-color: color-mix( in oklab, hsl(0, 0%, 9%) 10%, transparent );
|
|
2421
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2422
|
+
background-color: color-mix( in oklab, var(--color-fd-primary) 10%, transparent );
|
|
2423
|
+
}
|
|
2229
2424
|
border-radius: 2px;
|
|
2230
2425
|
}
|
|
2231
2426
|
@layer base {
|
|
@@ -2333,6 +2528,11 @@
|
|
|
2333
2528
|
syntax: "*";
|
|
2334
2529
|
inherits: false;
|
|
2335
2530
|
}
|
|
2531
|
+
@property --tw-shadow-alpha {
|
|
2532
|
+
syntax: "<percentage>";
|
|
2533
|
+
inherits: false;
|
|
2534
|
+
initial-value: 100%;
|
|
2535
|
+
}
|
|
2336
2536
|
@property --tw-inset-shadow {
|
|
2337
2537
|
syntax: "*";
|
|
2338
2538
|
inherits: false;
|
|
@@ -2342,6 +2542,11 @@
|
|
|
2342
2542
|
syntax: "*";
|
|
2343
2543
|
inherits: false;
|
|
2344
2544
|
}
|
|
2545
|
+
@property --tw-inset-shadow-alpha {
|
|
2546
|
+
syntax: "<percentage>";
|
|
2547
|
+
inherits: false;
|
|
2548
|
+
initial-value: 100%;
|
|
2549
|
+
}
|
|
2345
2550
|
@property --tw-ring-color {
|
|
2346
2551
|
syntax: "*";
|
|
2347
2552
|
inherits: false;
|
|
@@ -2424,6 +2629,19 @@
|
|
|
2424
2629
|
syntax: "*";
|
|
2425
2630
|
inherits: false;
|
|
2426
2631
|
}
|
|
2632
|
+
@property --tw-drop-shadow-color {
|
|
2633
|
+
syntax: "*";
|
|
2634
|
+
inherits: false;
|
|
2635
|
+
}
|
|
2636
|
+
@property --tw-drop-shadow-alpha {
|
|
2637
|
+
syntax: "<percentage>";
|
|
2638
|
+
inherits: false;
|
|
2639
|
+
initial-value: 100%;
|
|
2640
|
+
}
|
|
2641
|
+
@property --tw-drop-shadow-size {
|
|
2642
|
+
syntax: "*";
|
|
2643
|
+
inherits: false;
|
|
2644
|
+
}
|
|
2427
2645
|
@property --tw-backdrop-blur {
|
|
2428
2646
|
syntax: "*";
|
|
2429
2647
|
inherits: false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.3",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -74,25 +74,25 @@
|
|
|
74
74
|
"@radix-ui/react-tabs": "^1.1.3",
|
|
75
75
|
"class-variance-authority": "^0.7.1",
|
|
76
76
|
"lodash.merge": "^4.6.2",
|
|
77
|
-
"lucide-react": "^0.
|
|
77
|
+
"lucide-react": "^0.487.0",
|
|
78
78
|
"next-themes": "^0.4.6",
|
|
79
79
|
"postcss-selector-parser": "^7.1.0",
|
|
80
80
|
"react-medium-image-zoom": "^5.2.14",
|
|
81
|
-
"tailwind-merge": "^3.0
|
|
82
|
-
"fumadocs-core": "15.2.
|
|
81
|
+
"tailwind-merge": "^3.1.0",
|
|
82
|
+
"fumadocs-core": "15.2.3"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@next/eslint-plugin-next": "^15.2.4",
|
|
86
|
-
"@tailwindcss/cli": "^4.
|
|
86
|
+
"@tailwindcss/cli": "^4.1.1",
|
|
87
87
|
"@types/lodash.merge": "^4.6.9",
|
|
88
|
-
"@types/react": "^19.0
|
|
89
|
-
"@types/react-dom": "^19.
|
|
88
|
+
"@types/react": "^19.1.0",
|
|
89
|
+
"@types/react-dom": "^19.1.1",
|
|
90
90
|
"next": "15.2.4",
|
|
91
|
-
"tailwindcss": "^4.
|
|
92
|
-
"tsc-alias": "^1.8.
|
|
93
|
-
"@fumadocs/cli": "0.0
|
|
91
|
+
"tailwindcss": "^4.1.1",
|
|
92
|
+
"tsc-alias": "^1.8.13",
|
|
93
|
+
"@fumadocs/cli": "0.1.0",
|
|
94
94
|
"eslint-config-custom": "0.0.0",
|
|
95
|
-
"fumadocs-core": "15.2.
|
|
95
|
+
"fumadocs-core": "15.2.3",
|
|
96
96
|
"tsconfig": "0.0.0"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/components/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAUpD,eAAO,MAAM,QAAQ,EAAE,QAmFtB,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
const contextsMap = {
|
|
3
|
-
'../contexts/sidebar.tsx': 'fumadocs-ui/contexts/sidebar',
|
|
4
|
-
'../contexts/search.tsx': 'fumadocs-ui/contexts/search',
|
|
5
|
-
'../contexts/tree.tsx': 'fumadocs-ui/contexts/tree',
|
|
6
|
-
'../contexts/i18n.tsx': 'fumadocs-ui/contexts/i18n',
|
|
7
|
-
'../contexts/layout.tsx': 'fumadocs-ui/contexts/layout',
|
|
8
|
-
};
|
|
9
|
-
export const registry = {
|
|
10
|
-
path: fileURLToPath(import.meta.url),
|
|
11
|
-
rootDir: '../../',
|
|
12
|
-
namespaces: {
|
|
13
|
-
'': 'components',
|
|
14
|
-
'../utils': 'lib',
|
|
15
|
-
'../layouts': 'components',
|
|
16
|
-
},
|
|
17
|
-
components: [
|
|
18
|
-
{
|
|
19
|
-
name: 'layout/root-toggle',
|
|
20
|
-
description: 'the UI of Sidebar Tabs',
|
|
21
|
-
files: ['layout/root-toggle.tsx'],
|
|
22
|
-
mapImportPath: contextsMap,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'layout/language-toggle',
|
|
26
|
-
description: 'Language Select',
|
|
27
|
-
files: ['layout/language-toggle.tsx'],
|
|
28
|
-
mapImportPath: contextsMap,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'layouts/docs',
|
|
32
|
-
description: 'Replace Docs Layout',
|
|
33
|
-
files: ['../layouts/docs.tsx'],
|
|
34
|
-
mapImportPath: contextsMap,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'layouts/notebook',
|
|
38
|
-
description: 'Replace Notebook Layout',
|
|
39
|
-
files: ['../layouts/notebook.tsx'],
|
|
40
|
-
mapImportPath: contextsMap,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'layouts/home',
|
|
44
|
-
description: 'Replace Home Layout',
|
|
45
|
-
files: ['../layouts/home.tsx'],
|
|
46
|
-
mapImportPath: contextsMap,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: 'layouts/page',
|
|
50
|
-
description: 'Replace Page Layout',
|
|
51
|
-
files: ['components:../page.tsx'],
|
|
52
|
-
mapImportPath: contextsMap,
|
|
53
|
-
},
|
|
54
|
-
{ name: 'accordion', files: ['accordion.tsx'] },
|
|
55
|
-
{
|
|
56
|
-
name: 'github-info',
|
|
57
|
-
files: ['github-info.tsx'],
|
|
58
|
-
description: 'A card to display GitHub repo info',
|
|
59
|
-
},
|
|
60
|
-
{ name: 'banner', files: ['banner.tsx'] },
|
|
61
|
-
{ name: 'callout', files: ['callout.tsx'] },
|
|
62
|
-
{ name: 'card', files: ['card.tsx'] },
|
|
63
|
-
{ name: 'codeblock', files: ['codeblock.tsx'] },
|
|
64
|
-
{ name: 'files', files: ['files.tsx'] },
|
|
65
|
-
{ name: 'heading', files: ['heading.tsx'] },
|
|
66
|
-
{
|
|
67
|
-
name: 'image-zoom',
|
|
68
|
-
description: 'Zoomable Image',
|
|
69
|
-
files: ['image-zoom.tsx', 'image-zoom.css'],
|
|
70
|
-
},
|
|
71
|
-
{ name: 'inline-toc', files: ['inline-toc.tsx'] },
|
|
72
|
-
{ name: 'steps', files: ['steps.tsx'] },
|
|
73
|
-
{ name: 'tabs', files: ['tabs.tsx'] },
|
|
74
|
-
{ name: 'type-table', files: ['type-table.tsx'] },
|
|
75
|
-
{
|
|
76
|
-
name: 'button',
|
|
77
|
-
unlisted: true,
|
|
78
|
-
files: ['ui/button.tsx'],
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
dependencies: {
|
|
82
|
-
'fumadocs-core': {
|
|
83
|
-
type: 'runtime',
|
|
84
|
-
},
|
|
85
|
-
'fumadocs-ui': {
|
|
86
|
-
type: 'runtime',
|
|
87
|
-
},
|
|
88
|
-
next: {
|
|
89
|
-
type: 'runtime',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
};
|