fumadocs-ui 15.0.3 → 15.0.4
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/accordion.js +3 -3
- package/dist/components/api.d.ts +3 -3
- package/dist/components/api.js +3 -3
- package/dist/components/banner.js +2 -2
- package/dist/components/callout.js +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/codeblock.d.ts.map +1 -1
- package/dist/components/codeblock.js +5 -5
- package/dist/components/dialog/search-algolia.d.ts +1 -1
- package/dist/components/dialog/search-algolia.js +1 -1
- package/dist/components/dialog/search-default.d.ts +1 -1
- package/dist/components/dialog/search-default.js +2 -2
- package/dist/components/dialog/search-orama.d.ts +1 -1
- package/dist/components/dialog/search-orama.js +1 -1
- package/dist/components/dialog/search.js +4 -4
- package/dist/components/dynamic-codeblock.js +2 -2
- package/dist/components/files.js +2 -2
- package/dist/components/heading.js +1 -1
- package/dist/components/inline-toc.d.ts +1 -1
- package/dist/components/inline-toc.js +2 -2
- package/dist/components/layout/language-toggle.js +4 -4
- package/dist/components/layout/nav.js +2 -2
- package/dist/components/layout/root-toggle.js +4 -4
- package/dist/components/layout/search-toggle.js +4 -4
- package/dist/components/layout/theme-toggle.js +1 -1
- package/dist/components/layout/toc-clerk.js +4 -4
- package/dist/components/layout/toc.js +6 -6
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +2 -2
- package/dist/components/type-table.js +2 -2
- package/dist/components/ui/collapsible.js +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/scroll-area.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/contexts/search.d.ts +1 -1
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.js +1 -1
- package/dist/layouts/docs/shared.d.ts +3 -3
- package/dist/layouts/docs/shared.js +4 -4
- package/dist/layouts/docs/sidebar.d.ts +1 -1
- package/dist/layouts/docs/sidebar.js +7 -7
- package/dist/layouts/docs.client.d.ts +1 -1
- package/dist/layouts/docs.client.js +7 -7
- package/dist/layouts/docs.d.ts +4 -4
- package/dist/layouts/docs.js +16 -16
- package/dist/layouts/home/menu.d.ts +2 -2
- package/dist/layouts/home/menu.js +4 -4
- package/dist/layouts/home/navbar.d.ts +1 -1
- package/dist/layouts/home/navbar.js +5 -5
- package/dist/layouts/home.d.ts +2 -2
- package/dist/layouts/home.js +10 -10
- package/dist/layouts/links.js +1 -1
- package/dist/layouts/notebook.client.js +4 -4
- package/dist/layouts/notebook.d.ts +2 -2
- package/dist/layouts/notebook.js +15 -15
- package/dist/layouts/shared.d.ts +2 -2
- package/dist/mdx.client.d.ts +1 -1
- package/dist/mdx.client.js +1 -1
- package/dist/mdx.d.ts +1 -1
- package/dist/mdx.js +5 -5
- package/dist/page.client.js +7 -7
- package/dist/page.d.ts +3 -3
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +17 -14
- package/dist/provider.d.ts +7 -7
- package/dist/provider.js +8 -8
- package/dist/style.css +5 -0
- package/dist/theme/typography/index.js +1 -1
- package/package.json +12 -12
|
@@ -3,9 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
4
|
import { Check, ChevronRight, LinkIcon } from 'lucide-react';
|
|
5
5
|
import { forwardRef, useState, useEffect, } from 'react';
|
|
6
|
-
import { cn } from '../utils/cn';
|
|
7
|
-
import { useCopyButton } from '../utils/use-copy-button';
|
|
8
|
-
import { buttonVariants } from '../components/ui/button';
|
|
6
|
+
import { cn } from '../utils/cn.js';
|
|
7
|
+
import { useCopyButton } from '../utils/use-copy-button.js';
|
|
8
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
9
9
|
export const Accordions = forwardRef(({ type = 'single', className, defaultValue, ...props }, ref) => {
|
|
10
10
|
const [value, setValue] = useState(type === 'single' ? (defaultValue ?? '') : (defaultValue ?? []));
|
|
11
11
|
useEffect(() => {
|
package/dist/components/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from '../utils/cn';
|
|
2
|
-
export * from '../components/ui/button';
|
|
3
|
-
export { useCopyButton } from '../utils/use-copy-button';
|
|
1
|
+
export * from '../utils/cn.js';
|
|
2
|
+
export * from '../components/ui/button.js';
|
|
3
|
+
export { useCopyButton } from '../utils/use-copy-button.js';
|
|
4
4
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/components/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from '../utils/cn';
|
|
2
|
-
export * from '../components/ui/button';
|
|
3
|
-
export { useCopyButton } from '../utils/use-copy-button';
|
|
1
|
+
export * from '../utils/cn.js';
|
|
2
|
+
export * from '../components/ui/button.js';
|
|
3
|
+
export { useCopyButton } from '../utils/use-copy-button.js';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import { X } from 'lucide-react';
|
|
5
|
-
import { cn } from '../utils/cn';
|
|
6
|
-
import { buttonVariants } from '../components/ui/button';
|
|
5
|
+
import { cn } from '../utils/cn.js';
|
|
6
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
7
7
|
export function Banner({ id, variant = 'normal', changeLayout = true, height = '3rem', ...props }) {
|
|
8
8
|
const [open, setOpen] = useState(true);
|
|
9
9
|
const globalKey = id ? `nd-banner-${id}` : null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { AlertTriangle, CircleX, Info } from 'lucide-react';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import { cn } from '../utils/cn';
|
|
4
|
+
import { cn } from '../utils/cn.js';
|
|
5
5
|
export const Callout = forwardRef(({ className, children, title, type = 'info', icon, ...props }, ref) => {
|
|
6
6
|
return (_jsxs("div", { ref: ref, className: cn('my-6 flex flex-row gap-2 rounded-lg border bg-fd-card p-3 text-sm text-fd-card-foreground shadow-md', className), ...props, children: [icon ??
|
|
7
7
|
{
|
package/dist/components/card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'fumadocs-core/link';
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
3
|
+
import { cn } from '../utils/cn.js';
|
|
4
4
|
export function Cards(props) {
|
|
5
5
|
return (_jsx("div", { ...props, className: cn('grid grid-cols-1 gap-4 sm:grid-cols-2', props.className), children: props.children }));
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,GAAG,2HAYf,CAAC;AAIF,eAAO,MAAM,SAAS;IAxCpB;;;;OAIG;WACI,SAAS;IAEhB;;;;OAIG;gBACS,OAAO;IAEnB;;;;OAIG;qBACc,OAAO;oBAER,uBAAuB;+CAmGxC,CAAC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Check, Copy } from 'lucide-react';
|
|
4
4
|
import { forwardRef, useCallback, useRef, } from 'react';
|
|
5
|
-
import { cn } from '../utils/cn';
|
|
6
|
-
import { ScrollArea, ScrollBar, ScrollViewport, } from '../components/ui/scroll-area';
|
|
7
|
-
import { useCopyButton } from '../utils/use-copy-button';
|
|
8
|
-
import { buttonVariants } from '../components/ui/button';
|
|
5
|
+
import { cn } from '../utils/cn.js';
|
|
6
|
+
import { ScrollArea, ScrollBar, ScrollViewport, } from '../components/ui/scroll-area.js';
|
|
7
|
+
import { useCopyButton } from '../utils/use-copy-button.js';
|
|
8
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
9
9
|
export const Pre = forwardRef(({ className, ...props }, ref) => {
|
|
10
10
|
return (_jsx("pre", { ref: ref, className: cn('p-4 focus-visible:outline-none', className), ...props, children: props.children }));
|
|
11
11
|
});
|
|
@@ -34,5 +34,5 @@ function CopyButton({ className, onCopy, ...props }) {
|
|
|
34
34
|
const [checked, onClick] = useCopyButton(onCopy);
|
|
35
35
|
return (_jsxs("button", { type: "button", className: cn(buttonVariants({
|
|
36
36
|
color: 'ghost',
|
|
37
|
-
}), 'transition-opacity group-hover:opacity-100', !checked && 'opacity-0', className), "aria-label":
|
|
37
|
+
}), 'transition-opacity group-hover:opacity-100 [&_svg]:size-3.5', !checked && '[@media(hover:hover)]:opacity-0', className), "aria-label": checked ? 'Copied Text' : 'Copy Text', onClick: onClick, ...props, children: [_jsx(Check, { className: cn('transition-transform', !checked && 'scale-0') }), _jsx(Copy, { className: cn('absolute transition-transform', checked && 'scale-0') })] }));
|
|
38
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AlgoliaOptions } from 'fumadocs-core/search/client';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
-
import { type SharedProps, type TagItem } from './search';
|
|
3
|
+
import { type SharedProps, type TagItem } from './search.js';
|
|
4
4
|
export interface AlgoliaSearchDialogProps extends SharedProps {
|
|
5
5
|
index: AlgoliaOptions['index'];
|
|
6
6
|
searchOptions?: Omit<AlgoliaOptions, 'index'>;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { useDocsSearch, } from 'fumadocs-core/search/client';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
6
|
-
import { SearchDialog, TagsList, } from './search';
|
|
6
|
+
import { SearchDialog, TagsList, } from './search.js';
|
|
7
7
|
export default function AlgoliaSearchDialog({ index, searchOptions, tags, defaultTag, showAlgolia = false, allowClear = false, ...props }) {
|
|
8
8
|
const [tag, setTag] = useState(defaultTag);
|
|
9
9
|
const { search, setSearch, query } = useDocsSearch({
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { useDocsSearch } from 'fumadocs-core/search/client';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
6
|
-
import { useI18n } from '../../contexts/i18n';
|
|
7
|
-
import { SearchDialog, TagsList, } from './search';
|
|
6
|
+
import { useI18n } from '../../contexts/i18n.js';
|
|
7
|
+
import { SearchDialog, TagsList, } from './search.js';
|
|
8
8
|
export default function DefaultSearchDialog({ defaultTag, tags, api, delayMs, type = 'fetch', allowClear = false, ...props }) {
|
|
9
9
|
const { locale } = useI18n();
|
|
10
10
|
const [tag, setTag] = useState(defaultTag);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type OramaCloudOptions } from 'fumadocs-core/search/client';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
-
import { type SharedProps, type TagItem } from './search';
|
|
3
|
+
import { type SharedProps, type TagItem } from './search.js';
|
|
4
4
|
export interface OramaSearchDialogProps extends SharedProps {
|
|
5
5
|
client: OramaCloudOptions['client'];
|
|
6
6
|
searchOptions?: OramaCloudOptions['params'];
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { useDocsSearch, } from 'fumadocs-core/search/client';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
6
|
-
import { SearchDialog, TagsList, } from './search';
|
|
6
|
+
import { SearchDialog, TagsList, } from './search.js';
|
|
7
7
|
/**
|
|
8
8
|
* Orama Cloud integration
|
|
9
9
|
*/
|
|
@@ -3,10 +3,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { FileText, Hash, Loader2, SearchIcon, Text } from 'lucide-react';
|
|
4
4
|
import { useRouter } from 'next/navigation';
|
|
5
5
|
import { useMemo, useEffect, useState, useRef, useCallback, } from 'react';
|
|
6
|
-
import { useI18n } from '../../contexts/i18n';
|
|
7
|
-
import { cn } from '../../utils/cn';
|
|
8
|
-
import { useSidebar } from '../../contexts/sidebar';
|
|
9
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
6
|
+
import { useI18n } from '../../contexts/i18n.js';
|
|
7
|
+
import { cn } from '../../utils/cn.js';
|
|
8
|
+
import { useSidebar } from '../../contexts/sidebar.js';
|
|
9
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
10
10
|
import { Dialog, DialogContent, DialogOverlay, DialogTitle, } from '@radix-ui/react-dialog';
|
|
11
11
|
import { cva } from 'class-variance-authority';
|
|
12
12
|
export function SearchDialog({ open, onOpenChange, footer, links = [], search, onSearchChange, isLoading, ...props }) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { CodeBlock, Pre } from '../components/codeblock';
|
|
3
|
+
import { CodeBlock, Pre } from '../components/codeblock.js';
|
|
4
4
|
import { PrerenderScript, useShiki } from 'fumadocs-core/utils/use-shiki';
|
|
5
5
|
import { useId } from 'react';
|
|
6
|
-
import { cn } from '../utils/cn';
|
|
6
|
+
import { cn } from '../utils/cn.js';
|
|
7
7
|
const components = {
|
|
8
8
|
pre(props) {
|
|
9
9
|
return (_jsx(CodeBlock, { ...props, className: cn('my-0', props.className), children: _jsx(Pre, { children: props.children }) }));
|
package/dist/components/files.js
CHANGED
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { FileIcon, FolderIcon, FolderOpen } from 'lucide-react';
|
|
5
5
|
import { useState } from 'react';
|
|
6
|
-
import { cn } from '../utils/cn';
|
|
7
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './ui/collapsible';
|
|
6
|
+
import { cn } from '../utils/cn.js';
|
|
7
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './ui/collapsible.js';
|
|
8
8
|
const itemVariants = cva('flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4');
|
|
9
9
|
export function Files({ className, ...props }) {
|
|
10
10
|
return (_jsx("div", { className: cn('not-prose rounded-md border bg-fd-card p-2', className), ...props, children: props.children }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Link } from 'lucide-react';
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
3
|
+
import { cn } from '../utils/cn.js';
|
|
4
4
|
export function Heading({ as, className, ...props }) {
|
|
5
5
|
const As = as ?? 'h1';
|
|
6
6
|
if (!props.id)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOCItemType } from 'fumadocs-core/server';
|
|
2
|
-
import { Collapsible } from './ui/collapsible';
|
|
2
|
+
import { Collapsible } from './ui/collapsible.js';
|
|
3
3
|
import { ComponentProps } from 'react';
|
|
4
4
|
export interface InlineTocProps extends ComponentProps<typeof Collapsible> {
|
|
5
5
|
items: TOCItemType[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronDown } from 'lucide-react';
|
|
4
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './ui/collapsible';
|
|
5
|
-
import { cn } from '../utils/cn';
|
|
4
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './ui/collapsible.js';
|
|
5
|
+
import { cn } from '../utils/cn.js';
|
|
6
6
|
export function InlineTOC({ items, ...props }) {
|
|
7
7
|
return (_jsxs(Collapsible, { ...props, className: cn('not-prose rounded-lg border bg-fd-card text-fd-card-foreground', props.className), children: [_jsxs(CollapsibleTrigger, { className: "group inline-flex w-full items-center justify-between px-4 py-2.5 font-medium", children: [props.children ?? 'Table of Contents', _jsx(ChevronDown, { className: "size-4 transition-transform duration-200 group-data-[state=open]:rotate-180" })] }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "flex flex-col p-4 pt-0 text-sm text-fd-muted-foreground", children: items.map((item) => (_jsx("a", { href: item.url, className: "border-s py-1.5 hover:text-fd-accent-foreground", style: {
|
|
8
8
|
paddingInlineStart: 12 * Math.max(item.depth - 1, 0),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useI18n } from '../../contexts/i18n';
|
|
4
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../../components/ui/popover';
|
|
5
|
-
import { cn } from '../../utils/cn';
|
|
6
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
3
|
+
import { useI18n } from '../../contexts/i18n.js';
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../../components/ui/popover.js';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
7
7
|
export function LanguageToggle(props) {
|
|
8
8
|
const context = useI18n();
|
|
9
9
|
if (!context.locales)
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import Link from 'fumadocs-core/link';
|
|
4
4
|
import { createContext, useContext, useEffect, useState, } from 'react';
|
|
5
|
-
import { cn } from '../../utils/cn';
|
|
6
|
-
import { useI18n } from '../../contexts/i18n';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
|
+
import { useI18n } from '../../contexts/i18n.js';
|
|
7
7
|
const NavContext = createContext({
|
|
8
8
|
isTransparent: false,
|
|
9
9
|
});
|
|
@@ -4,10 +4,10 @@ import { ChevronDown } from 'lucide-react';
|
|
|
4
4
|
import { useMemo, useState } from 'react';
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { usePathname } from 'next/navigation';
|
|
7
|
-
import { cn } from '../../utils/cn';
|
|
8
|
-
import { isActive } from '../../utils/is-active';
|
|
9
|
-
import { useSidebar } from '../../contexts/sidebar';
|
|
10
|
-
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
|
|
7
|
+
import { cn } from '../../utils/cn.js';
|
|
8
|
+
import { isActive } from '../../utils/is-active.js';
|
|
9
|
+
import { useSidebar } from '../../contexts/sidebar.js';
|
|
10
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover.js';
|
|
11
11
|
export function RootToggle({ options, placeholder, ...props }) {
|
|
12
12
|
const [open, setOpen] = useState(false);
|
|
13
13
|
const { closeOnRedirect } = useSidebar();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { SearchIcon } from 'lucide-react';
|
|
4
|
-
import { useSearchContext } from '../../contexts/search';
|
|
5
|
-
import { useI18n } from '../../contexts/i18n';
|
|
6
|
-
import { cn } from '../../utils/cn';
|
|
7
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
4
|
+
import { useSearchContext } from '../../contexts/search.js';
|
|
5
|
+
import { useI18n } from '../../contexts/i18n.js';
|
|
6
|
+
import { cn } from '../../utils/cn.js';
|
|
7
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
8
8
|
export function SearchToggle({ hideIfDisabled, ...props }) {
|
|
9
9
|
const { setOpenSearch, enabled } = useSearchContext();
|
|
10
10
|
if (hideIfDisabled && !enabled)
|
|
@@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
import { Moon, Sun, Airplay } from 'lucide-react';
|
|
5
5
|
import { useTheme } from 'next-themes';
|
|
6
6
|
import { useLayoutEffect, useState } from 'react';
|
|
7
|
-
import { cn } from '../../utils/cn';
|
|
7
|
+
import { cn } from '../../utils/cn.js';
|
|
8
8
|
const itemVariants = cva('size-7 rounded-full p-1.5 text-fd-muted-foreground', {
|
|
9
9
|
variants: {
|
|
10
10
|
active: {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as Primitive from 'fumadocs-core/toc';
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { cn } from '../../utils/cn';
|
|
6
|
-
import { TocThumb } from '../../components/layout/toc-thumb';
|
|
7
|
-
import { ScrollArea, ScrollViewport } from '../ui/scroll-area';
|
|
8
|
-
import { TocItemsEmpty } from '../../components/layout/toc';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
|
+
import { TocThumb } from '../../components/layout/toc-thumb.js';
|
|
7
|
+
import { ScrollArea, ScrollViewport } from '../ui/scroll-area.js';
|
|
8
|
+
import { TocItemsEmpty } from '../../components/layout/toc.js';
|
|
9
9
|
export default function ClerkTOCItems({ items, isMenu = false, }) {
|
|
10
10
|
const viewRef = useRef(null);
|
|
11
11
|
const containerRef = useRef(null);
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as Primitive from 'fumadocs-core/toc';
|
|
4
4
|
import { useMemo, useRef } from 'react';
|
|
5
|
-
import { cn } from '../../utils/cn';
|
|
6
|
-
import { useI18n } from '../../contexts/i18n';
|
|
7
|
-
import { TocThumb } from '../../components/layout/toc-thumb';
|
|
8
|
-
import { ScrollArea, ScrollViewport } from '../ui/scroll-area';
|
|
9
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../../components/ui/popover';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
|
+
import { useI18n } from '../../contexts/i18n.js';
|
|
7
|
+
import { TocThumb } from '../../components/layout/toc-thumb.js';
|
|
8
|
+
import { ScrollArea, ScrollViewport } from '../ui/scroll-area.js';
|
|
9
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../../components/ui/popover.js';
|
|
10
10
|
import { ChevronRight, Text } from 'lucide-react';
|
|
11
|
-
import { usePageStyles } from '../../contexts/layout';
|
|
11
|
+
import { usePageStyles } from '../../contexts/layout.js';
|
|
12
12
|
export function Toc(props) {
|
|
13
13
|
const { toc } = usePageStyles();
|
|
14
14
|
return (_jsx("div", { id: "nd-toc", ...props, className: cn('sticky top-[calc(var(--fd-banner-height)+var(--fd-nav-height))] h-[var(--fd-toc-height)] pb-2 pt-12', toc, props.className), style: {
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo, useState, createContext, useContext, useRef, useLayoutEffect, useId, useEffect, } from 'react';
|
|
4
|
-
import { cn } from '../utils/cn';
|
|
5
|
-
import * as Primitive from './ui/tabs';
|
|
4
|
+
import { cn } from '../utils/cn.js';
|
|
5
|
+
import * as Primitive from './ui/tabs.js';
|
|
6
6
|
export { Primitive };
|
|
7
7
|
const listeners = new Map();
|
|
8
8
|
function addChangeListener(id, listener) {
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { InfoIcon } from 'lucide-react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { cn } from '../utils/cn';
|
|
7
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover';
|
|
6
|
+
import { cn } from '../utils/cn.js';
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
|
8
8
|
export function Info({ children }) {
|
|
9
9
|
return (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { children: _jsx(InfoIcon, { className: "size-4" }) }), _jsx(PopoverContent, { className: "prose max-h-[400px] min-w-[220px] max-w-[400px] overflow-auto text-sm prose-no-margin", children: children })] }));
|
|
10
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import { cn } from '../../utils/cn';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
5
|
const Collapsible = CollapsiblePrimitive.Root;
|
|
6
6
|
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
7
7
|
const CollapsibleContent = forwardRef(({ children, ...props }, ref) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as Primitive from '@radix-ui/react-navigation-menu';
|
|
5
|
-
import { cn } from '../../utils/cn';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
6
|
const NavigationMenu = Primitive.Root;
|
|
7
7
|
const NavigationMenuList = Primitive.List;
|
|
8
8
|
const NavigationMenuItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(Primitive.NavigationMenuItem, { ref: ref, className: cn('list-none', className), ...props, children: children })));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../utils/cn';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
6
|
const Popover = PopoverPrimitive.Root;
|
|
7
7
|
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
8
8
|
const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, side: "bottom", className: cn('z-50 min-w-[220px] max-w-[98vw] rounded-lg border bg-fd-popover p-2 text-sm text-fd-popover-foreground shadow-lg focus-visible:outline-none data-[state=closed]:animate-fd-popover-out data-[state=open]:animate-fd-popover-in', className), ...props }) })));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { cn } from '../../utils/cn';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
5
|
const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, className: cn('overflow-hidden', className), ...props, children: [children, _jsx(ScrollAreaPrimitive.Corner, {}), _jsx(ScrollBar, { orientation: "vertical" })] })));
|
|
6
6
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
7
7
|
const ScrollViewport = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(ScrollAreaPrimitive.Viewport, { ref: ref, className: cn('size-full rounded-[inherit]', className), ...props, children: children })));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../utils/cn';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
6
|
const Tabs = React.forwardRef((props, ref) => {
|
|
7
7
|
return (_jsx(TabsPrimitive.Root, { ref: ref, ...props, className: cn('flex flex-col overflow-hidden rounded-xl border bg-fd-card', props.className) }));
|
|
8
8
|
});
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type Translations, defaultTranslations, type LocaleItem } from './contexts/i18n';
|
|
2
|
+
import { type Translations, defaultTranslations, type LocaleItem } from './contexts/i18n.js';
|
|
3
3
|
interface I18nProviderProps {
|
|
4
4
|
/**
|
|
5
5
|
* Current locale
|
package/dist/i18n.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useRef } from 'react';
|
|
4
4
|
import { useRouter, usePathname } from 'next/navigation';
|
|
5
|
-
import { useI18n, I18nContext, defaultTranslations, } from './contexts/i18n';
|
|
5
|
+
import { useI18n, I18nContext, defaultTranslations, } from './contexts/i18n.js';
|
|
6
6
|
export function I18nProvider({ locales = [], locale, ...props }) {
|
|
7
7
|
const context = useI18n();
|
|
8
8
|
const router = useRouter();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type LinkItemType } from '../../layouts/links';
|
|
2
|
-
import { type SidebarProps } from '../../layouts/docs/sidebar';
|
|
1
|
+
import { type LinkItemType } from '../../layouts/links.js';
|
|
2
|
+
import { type SidebarProps } from '../../layouts/docs/sidebar.js';
|
|
3
3
|
import type { PageTree } from 'fumadocs-core/server';
|
|
4
4
|
import type { FC, ReactNode } from 'react';
|
|
5
|
-
import type { Option } from '../../components/layout/root-toggle';
|
|
5
|
+
import type { Option } from '../../components/layout/root-toggle.js';
|
|
6
6
|
export declare const layoutVariables: {
|
|
7
7
|
'--fd-layout-offset': string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { BaseLinkItem } from '../../layouts/links';
|
|
3
|
-
import { SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, } from '../../layouts/docs/sidebar';
|
|
4
|
-
import { cn } from '../../utils/cn';
|
|
5
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
2
|
+
import { BaseLinkItem } from '../../layouts/links.js';
|
|
3
|
+
import { SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, } from '../../layouts/docs/sidebar.js';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
6
6
|
import { notFound } from 'next/navigation';
|
|
7
7
|
export const layoutVariables = {
|
|
8
8
|
'--fd-layout-offset': 'max(calc(50vw - var(--fd-layout-width) / 2), 0px)',
|
|
@@ -2,7 +2,7 @@ import { type ButtonHTMLAttributes, type HTMLAttributes, type ReactNode } from '
|
|
|
2
2
|
import { type LinkProps } from 'fumadocs-core/link';
|
|
3
3
|
import { type ScrollAreaProps } from '@radix-ui/react-scroll-area';
|
|
4
4
|
import type { CollapsibleContentProps, CollapsibleTriggerProps } from '@radix-ui/react-collapsible';
|
|
5
|
-
import type { SidebarComponents } from '../../layouts/docs/shared';
|
|
5
|
+
import type { SidebarComponents } from '../../layouts/docs/shared.js';
|
|
6
6
|
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
7
7
|
/**
|
|
8
8
|
* Open folders by default if their level is lower or equal to a specific level
|
|
@@ -6,14 +6,14 @@ import { usePathname } from 'next/navigation';
|
|
|
6
6
|
import { createContext, useCallback, useContext, useMemo, useRef, useState, } from 'react';
|
|
7
7
|
import Link from 'fumadocs-core/link';
|
|
8
8
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
9
|
-
import { cn } from '../../utils/cn';
|
|
10
|
-
import { ScrollArea, ScrollViewport } from '../../components/ui/scroll-area';
|
|
11
|
-
import { isActive } from '../../utils/is-active';
|
|
12
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../../components/ui/collapsible';
|
|
13
|
-
import { useSidebar } from '../../contexts/sidebar';
|
|
14
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
9
|
+
import { cn } from '../../utils/cn.js';
|
|
10
|
+
import { ScrollArea, ScrollViewport } from '../../components/ui/scroll-area.js';
|
|
11
|
+
import { isActive } from '../../utils/is-active.js';
|
|
12
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../../components/ui/collapsible.js';
|
|
13
|
+
import { useSidebar } from '../../contexts/sidebar.js';
|
|
14
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
15
15
|
import { cva } from 'class-variance-authority';
|
|
16
|
-
import { useTreeContext, useTreePath } from '../../contexts/tree';
|
|
16
|
+
import { useTreeContext, useTreePath } from '../../contexts/tree.js';
|
|
17
17
|
const itemVariants = cva('relative flex flex-row items-center gap-2 rounded-md p-2 text-start text-fd-muted-foreground [overflow-wrap:anywhere] md:py-1.5 [&_svg]:size-4 [&_svg]:shrink-0', {
|
|
18
18
|
variants: {
|
|
19
19
|
active: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type HTMLAttributes } from 'react';
|
|
2
|
-
import { type LinkItemType } from '../layouts/links';
|
|
2
|
+
import { type LinkItemType } from '../layouts/links.js';
|
|
3
3
|
interface LinksMenuProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
items: LinkItemType[];
|
|
5
5
|
}
|
|
@@ -4,14 +4,14 @@ import { ChevronDown, Menu, X } from 'lucide-react';
|
|
|
4
4
|
import { useState, } from 'react';
|
|
5
5
|
import { usePathname } from 'next/navigation';
|
|
6
6
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
7
|
-
import { cn } from '../utils/cn';
|
|
8
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover';
|
|
9
|
-
import { BaseLinkItem } from '../layouts/links';
|
|
10
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../components/ui/collapsible';
|
|
7
|
+
import { cn } from '../utils/cn.js';
|
|
8
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
|
9
|
+
import { BaseLinkItem } from '../layouts/links.js';
|
|
10
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../components/ui/collapsible.js';
|
|
11
11
|
import { cva } from 'class-variance-authority';
|
|
12
|
-
import { buttonVariants } from '../components/ui/button';
|
|
13
|
-
import { useSidebar } from '../contexts/sidebar';
|
|
14
|
-
import { useNav } from '../components/layout/nav';
|
|
12
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
13
|
+
import { useSidebar } from '../contexts/sidebar.js';
|
|
14
|
+
import { useNav } from '../components/layout/nav.js';
|
|
15
15
|
import { SidebarTrigger } from 'fumadocs-core/sidebar';
|
|
16
16
|
const itemVariants = cva('flex flex-row items-center gap-2 rounded-md px-3 py-2.5 text-fd-muted-foreground transition-colors duration-100 [overflow-wrap:anywhere] hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none md:px-2 md:py-1.5 [&_svg]:size-4');
|
|
17
17
|
export function LinksMenu({ items, ...props }) {
|
package/dist/layouts/docs.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { PageTree } from 'fumadocs-core/server';
|
|
2
2
|
import { type ReactNode, type HTMLAttributes } from 'react';
|
|
3
|
-
import { type LinkItemType } from '../layouts/links';
|
|
4
|
-
import { type BaseLayoutProps } from './shared';
|
|
5
|
-
import { type SidebarOptions } from '../layouts/docs/shared';
|
|
3
|
+
import { type LinkItemType } from '../layouts/links.js';
|
|
4
|
+
import { type BaseLayoutProps } from './shared.js';
|
|
5
|
+
import { type SidebarOptions } from '../layouts/docs/shared.js';
|
|
6
6
|
export interface DocsLayoutProps extends BaseLayoutProps {
|
|
7
7
|
tree: PageTree.Root;
|
|
8
8
|
sidebar?: Partial<SidebarOptions>;
|
|
9
9
|
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
10
10
|
}
|
|
11
11
|
export declare function DocsLayout({ nav: { enabled: navEnabled, component: navReplace, transparentMode, ...nav }, sidebar: { enabled: sidebarEnabled, collapsible, component: sidebarReplace, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, hideSearch: sidebarHideSearch, ...sidebar }, i18n, ...props }: DocsLayoutProps): ReactNode;
|
|
12
|
-
export { getSidebarTabsFromOptions, type TabOptions } from './docs/shared';
|
|
12
|
+
export { getSidebarTabsFromOptions, type TabOptions } from './docs/shared.js';
|
|
13
13
|
export { type LinkItemType };
|
|
14
14
|
//# sourceMappingURL=docs.d.ts.map
|
package/dist/layouts/docs.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'next/link';
|
|
3
3
|
import { Languages, MoreHorizontal } from 'lucide-react';
|
|
4
|
-
import { cn } from '../utils/cn';
|
|
5
|
-
import { buttonVariants } from '../components/ui/button';
|
|
6
|
-
import { CollapsibleSidebar, Sidebar, SidebarFooter, SidebarHeader, SidebarCollapseTrigger, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar';
|
|
7
|
-
import { replaceOrDefault } from '../layouts/shared';
|
|
8
|
-
import { BaseLinkItem, } from '../layouts/links';
|
|
9
|
-
import { RootToggle } from '../components/layout/root-toggle';
|
|
10
|
-
import { getLinks } from './shared';
|
|
11
|
-
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle';
|
|
12
|
-
import { LinksMenu, Navbar, NavbarSidebarTrigger } from '../layouts/docs.client';
|
|
13
|
-
import { TreeContextProvider } from '../contexts/tree';
|
|
14
|
-
import { NavProvider, Title } from '../components/layout/nav';
|
|
15
|
-
import { ThemeToggle } from '../components/layout/theme-toggle';
|
|
16
|
-
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle';
|
|
17
|
-
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared';
|
|
18
|
-
import { StylesProvider } from '../contexts/layout';
|
|
4
|
+
import { cn } from '../utils/cn.js';
|
|
5
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
6
|
+
import { CollapsibleSidebar, Sidebar, SidebarFooter, SidebarHeader, SidebarCollapseTrigger, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar.js';
|
|
7
|
+
import { replaceOrDefault } from '../layouts/shared.js';
|
|
8
|
+
import { BaseLinkItem, } from '../layouts/links.js';
|
|
9
|
+
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
10
|
+
import { getLinks } from './shared.js';
|
|
11
|
+
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle.js';
|
|
12
|
+
import { LinksMenu, Navbar, NavbarSidebarTrigger } from '../layouts/docs.client.js';
|
|
13
|
+
import { TreeContextProvider } from '../contexts/tree.js';
|
|
14
|
+
import { NavProvider, Title } from '../components/layout/nav.js';
|
|
15
|
+
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
16
|
+
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
17
|
+
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
18
|
+
import { StylesProvider } from '../contexts/layout.js';
|
|
19
19
|
export function DocsLayout({ nav: { enabled: navEnabled = true, component: navReplace, transparentMode, ...nav } = {}, sidebar: { enabled: sidebarEnabled = true, collapsible = true, component: sidebarReplace, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, hideSearch: sidebarHideSearch, ...sidebar } = {}, i18n = false, ...props }) {
|
|
20
20
|
checkPageTree(props.tree);
|
|
21
21
|
const links = getLinks(props.links ?? [], props.githubUrl);
|
|
@@ -58,4 +58,4 @@ function SidebarFooterItems({ iconItems, i18n, sidebarCollapsible, disableThemeS
|
|
|
58
58
|
return null;
|
|
59
59
|
return (_jsxs("div", { className: "flex flex-row items-center", children: [iconItems.map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon', color: 'ghost' }), 'text-fd-muted-foreground md:hidden'), "aria-label": item.label, children: item.icon }, i))), _jsx("div", { role: "separator", className: "flex-1" }), i18n ? (_jsxs(LanguageToggle, { className: "me-1.5", children: [_jsx(Languages, { className: "size-5" }), _jsx(LanguageToggleText, { className: "md:hidden" })] })) : null, !disableThemeSwitch ? (_jsx(ThemeToggle, { className: "p-0 md:order-first" })) : null, sidebarCollapsible ? (_jsx(SidebarCollapseTrigger, { className: "-me-1.5 max-md:hidden" })) : null] }));
|
|
60
60
|
}
|
|
61
|
-
export { getSidebarTabsFromOptions } from './docs/shared';
|
|
61
|
+
export { getSidebarTabsFromOptions } from './docs/shared.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type LinkItemType } from '../../layouts/links';
|
|
2
|
-
import { NavigationMenuContent, NavigationMenuTrigger } from '../../components/ui/navigation-menu';
|
|
1
|
+
import { type LinkItemType } from '../../layouts/links.js';
|
|
2
|
+
import { NavigationMenuContent, NavigationMenuTrigger } from '../../components/ui/navigation-menu.js';
|
|
3
3
|
import type { ComponentPropsWithoutRef } from 'react';
|
|
4
4
|
export declare function MenuLinkItem({ item, ...props }: {
|
|
5
5
|
item: LinkItemType;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { BaseLinkItem } from '../../layouts/links';
|
|
4
|
-
import { cn } from '../../utils/cn';
|
|
5
|
-
import { NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, } from '../../components/ui/navigation-menu';
|
|
3
|
+
import { BaseLinkItem } from '../../layouts/links.js';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
import { NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, } from '../../components/ui/navigation-menu.js';
|
|
6
6
|
import Link from 'fumadocs-core/link';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
8
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
9
9
|
const menuItemVariants = cva('', {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps, type HTMLAttributes } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { type LinkProps } from 'fumadocs-core/link';
|
|
4
|
-
import { BaseLinkItem } from '../../layouts/links';
|
|
4
|
+
import { BaseLinkItem } from '../../layouts/links.js';
|
|
5
5
|
import type { NavigationMenuContentProps, NavigationMenuTriggerProps } from '@radix-ui/react-navigation-menu';
|
|
6
6
|
export declare function Navbar(props: HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const NavbarMenu: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-navigation-menu").NavigationMenuItemProps & import("react").RefAttributes<HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
@@ -3,11 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import Link from 'fumadocs-core/link';
|
|
6
|
-
import { cn } from '../../utils/cn';
|
|
7
|
-
import { BaseLinkItem } from '../../layouts/links';
|
|
8
|
-
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, NavigationMenuViewport, } from '../../components/ui/navigation-menu';
|
|
9
|
-
import { useNav } from '../../components/layout/nav';
|
|
10
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
6
|
+
import { cn } from '../../utils/cn.js';
|
|
7
|
+
import { BaseLinkItem } from '../../layouts/links.js';
|
|
8
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, NavigationMenuViewport, } from '../../components/ui/navigation-menu.js';
|
|
9
|
+
import { useNav } from '../../components/layout/nav.js';
|
|
10
|
+
import { buttonVariants } from '../../components/ui/button.js';
|
|
11
11
|
const navItemVariants = cva('inline-flex items-center gap-1 p-2 text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground data-[active=true]:text-fd-primary [&_svg]:size-4');
|
|
12
12
|
export function Navbar(props) {
|
|
13
13
|
const [value, setValue] = useState('');
|
package/dist/layouts/home.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import { type NavOptions } from '../layouts/shared';
|
|
3
|
-
import { type BaseLayoutProps } from './shared';
|
|
2
|
+
import { type NavOptions } from '../layouts/shared.js';
|
|
3
|
+
import { type BaseLayoutProps } from './shared.js';
|
|
4
4
|
export interface HomeLayoutProps extends BaseLayoutProps, HTMLAttributes<HTMLElement> {
|
|
5
5
|
nav?: Partial<NavOptions & {
|
|
6
6
|
/**
|
package/dist/layouts/home.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { replaceOrDefault } from '../layouts/shared';
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
4
|
-
import { getLinks } from './shared';
|
|
5
|
-
import { NavProvider, Title } from '../components/layout/nav';
|
|
6
|
-
import { NavigationMenuList } from '../components/ui/navigation-menu';
|
|
7
|
-
import { Navbar, NavbarLink, NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger, } from '../layouts/home/navbar';
|
|
8
|
-
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle';
|
|
9
|
-
import { ThemeToggle } from '../components/layout/theme-toggle';
|
|
10
|
-
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle';
|
|
2
|
+
import { replaceOrDefault } from '../layouts/shared.js';
|
|
3
|
+
import { cn } from '../utils/cn.js';
|
|
4
|
+
import { getLinks } from './shared.js';
|
|
5
|
+
import { NavProvider, Title } from '../components/layout/nav.js';
|
|
6
|
+
import { NavigationMenuList } from '../components/ui/navigation-menu.js';
|
|
7
|
+
import { Navbar, NavbarLink, NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger, } from '../layouts/home/navbar.js';
|
|
8
|
+
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
9
|
+
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
10
|
+
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle.js';
|
|
11
11
|
import { ChevronDown, Languages } from 'lucide-react';
|
|
12
12
|
import Link from 'fumadocs-core/link';
|
|
13
|
-
import { Menu, MenuContent, MenuLinkItem, MenuTrigger, } from '../layouts/home/menu';
|
|
13
|
+
import { Menu, MenuContent, MenuLinkItem, MenuTrigger, } from '../layouts/home/menu.js';
|
|
14
14
|
export function HomeLayout(props) {
|
|
15
15
|
const { nav, links, githubUrl, i18n: _i18n, disableThemeSwitch: _disableThemeSwitch, ...rest } = props;
|
|
16
16
|
const finalLinks = getLinks(links, githubUrl);
|
package/dist/layouts/links.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import Link from 'fumadocs-core/link';
|
|
4
4
|
import { usePathname } from 'next/navigation';
|
|
5
5
|
import { forwardRef, } from 'react';
|
|
6
|
-
import { isActive } from '../utils/is-active';
|
|
6
|
+
import { isActive } from '../utils/is-active.js';
|
|
7
7
|
export const BaseLinkItem = forwardRef(({ item, ...props }, ref) => {
|
|
8
8
|
const pathname = usePathname();
|
|
9
9
|
const activeType = item.active ?? 'url';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../utils/cn';
|
|
4
|
-
import { useSidebar } from '../contexts/sidebar';
|
|
5
|
-
import { useNav } from '../components/layout/nav';
|
|
3
|
+
import { cn } from '../utils/cn.js';
|
|
4
|
+
import { useSidebar } from '../contexts/sidebar.js';
|
|
5
|
+
import { useNav } from '../components/layout/nav.js';
|
|
6
6
|
import { SidebarTrigger } from 'fumadocs-core/sidebar';
|
|
7
|
-
import { buttonVariants } from '../components/ui/button';
|
|
7
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
8
8
|
import { Menu, X } from 'lucide-react';
|
|
9
9
|
export function Navbar(props) {
|
|
10
10
|
const { open, collapsed } = useSidebar();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
-
import { type BaseLayoutProps } from '../layouts/shared';
|
|
3
|
-
import { type SidebarOptions } from '../layouts/docs/shared';
|
|
2
|
+
import { type BaseLayoutProps } from '../layouts/shared.js';
|
|
3
|
+
import { type SidebarOptions } from '../layouts/docs/shared.js';
|
|
4
4
|
import type { PageTree } from 'fumadocs-core/server';
|
|
5
5
|
export interface DocsLayoutProps extends BaseLayoutProps {
|
|
6
6
|
tree: PageTree.Root;
|
package/dist/layouts/notebook.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
|
-
import { getLinks, } from '../layouts/shared';
|
|
4
|
-
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar';
|
|
5
|
-
import { RootToggle } from '../components/layout/root-toggle';
|
|
6
|
-
import { TreeContextProvider } from '../contexts/tree';
|
|
7
|
-
import { NavProvider, Title } from '../components/layout/nav';
|
|
8
|
-
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle';
|
|
9
|
-
import { cn } from '../utils/cn';
|
|
3
|
+
import { getLinks, } from '../layouts/shared.js';
|
|
4
|
+
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader, SidebarViewport, SidebarPageTree, } from '../layouts/docs/sidebar.js';
|
|
5
|
+
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
6
|
+
import { TreeContextProvider } from '../contexts/tree.js';
|
|
7
|
+
import { NavProvider, Title } from '../components/layout/nav.js';
|
|
8
|
+
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
9
|
+
import { cn } from '../utils/cn.js';
|
|
10
10
|
import Link from 'next/link';
|
|
11
|
-
import { buttonVariants } from '../components/ui/button';
|
|
11
|
+
import { buttonVariants } from '../components/ui/button.js';
|
|
12
12
|
import { ChevronDown, Languages } from 'lucide-react';
|
|
13
|
-
import { BaseLinkItem } from '../layouts/links';
|
|
14
|
-
import { LanguageToggle } from '../components/layout/language-toggle';
|
|
15
|
-
import { ThemeToggle } from '../components/layout/theme-toggle';
|
|
16
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover';
|
|
17
|
-
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared';
|
|
18
|
-
import { Navbar, NavbarSidebarTrigger } from './notebook.client';
|
|
19
|
-
import { StylesProvider } from '../contexts/layout';
|
|
13
|
+
import { BaseLinkItem } from '../layouts/links.js';
|
|
14
|
+
import { LanguageToggle } from '../components/layout/language-toggle.js';
|
|
15
|
+
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
16
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
|
17
|
+
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
18
|
+
import { Navbar, NavbarSidebarTrigger } from './notebook.client.js';
|
|
19
|
+
import { StylesProvider } from '../contexts/layout.js';
|
|
20
20
|
export function DocsLayout({ nav: { transparentMode, ...nav } = {}, sidebar: { collapsible: sidebarCollapsible = true, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, ...sidebar } = {}, i18n = false, ...props }) {
|
|
21
21
|
checkPageTree(props.tree);
|
|
22
22
|
const links = getLinks(props.links ?? [], props.githubUrl);
|
package/dist/layouts/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { LinkItemType } from '../layouts/links';
|
|
3
|
-
import type { NavProviderProps, TitleProps } from '../components/layout/nav';
|
|
2
|
+
import type { LinkItemType } from '../layouts/links.js';
|
|
3
|
+
import type { NavProviderProps, TitleProps } from '../components/layout/nav.js';
|
|
4
4
|
export interface NavOptions extends SharedNavProps {
|
|
5
5
|
enabled: boolean;
|
|
6
6
|
component: ReactNode;
|
package/dist/mdx.client.d.ts
CHANGED
package/dist/mdx.client.js
CHANGED
package/dist/mdx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, FC, HTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
2
|
-
import { Card, Cards } from './components/card';
|
|
2
|
+
import { Card, Cards } from './components/card.js';
|
|
3
3
|
declare function Image(props: ImgHTMLAttributes<HTMLImageElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function Table(props: TableHTMLAttributes<HTMLTableElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const defaultMdxComponents: {
|
package/dist/mdx.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'fumadocs-core/link';
|
|
3
3
|
import NextImage from 'next/image';
|
|
4
|
-
import { Card, Cards } from './components/card';
|
|
5
|
-
import { Callout } from './components/callout';
|
|
6
|
-
import { Heading } from './components/heading';
|
|
7
|
-
import { cn } from './utils/cn';
|
|
8
|
-
import { Pre } from './mdx.client';
|
|
4
|
+
import { Card, Cards } from './components/card.js';
|
|
5
|
+
import { Callout } from './components/callout.js';
|
|
6
|
+
import { Heading } from './components/heading.js';
|
|
7
|
+
import { cn } from './utils/cn.js';
|
|
8
|
+
import { Pre } from './mdx.client.js';
|
|
9
9
|
function Image(props) {
|
|
10
10
|
return (_jsx(NextImage, { sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px", ...props, className: cn('rounded-lg', props.className) }));
|
|
11
11
|
}
|
package/dist/page.client.js
CHANGED
|
@@ -4,15 +4,15 @@ import { Fragment, useEffect, useMemo, useState, } from 'react';
|
|
|
4
4
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
import { cn } from './utils/cn';
|
|
8
|
-
import { useI18n } from './contexts/i18n';
|
|
9
|
-
import { useTreeContext, useTreePath } from './contexts/tree';
|
|
10
|
-
import { useSidebar } from './contexts/sidebar';
|
|
7
|
+
import { cn } from './utils/cn.js';
|
|
8
|
+
import { useI18n } from './contexts/i18n.js';
|
|
9
|
+
import { useTreeContext, useTreePath } from './contexts/tree.js';
|
|
10
|
+
import { useSidebar } from './contexts/sidebar.js';
|
|
11
11
|
import { usePathname } from 'next/navigation';
|
|
12
|
-
import { useNav } from './components/layout/nav';
|
|
12
|
+
import { useNav } from './components/layout/nav.js';
|
|
13
13
|
import { getBreadcrumbItemsFromPath, } from 'fumadocs-core/breadcrumb';
|
|
14
|
-
import { usePageStyles } from './contexts/layout';
|
|
15
|
-
import { isActive } from './utils/is-active';
|
|
14
|
+
import { usePageStyles } from './contexts/layout.js';
|
|
15
|
+
import { isActive } from './utils/is-active.js';
|
|
16
16
|
export function TocNav(props) {
|
|
17
17
|
const { open } = useSidebar();
|
|
18
18
|
const { tocNav } = usePageStyles();
|
package/dist/page.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { type PageTree, type TableOfContents } from 'fumadocs-core/server';
|
|
|
2
2
|
import { type AnchorHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';
|
|
3
3
|
import type { LoaderConfig, LoaderOutput, Page } from 'fumadocs-core/source';
|
|
4
4
|
import { type AnchorProviderProps } from 'fumadocs-core/toc';
|
|
5
|
-
import { type FooterProps, type BreadcrumbProps } from './page.client';
|
|
6
|
-
import { type TOCProps } from './components/layout/toc';
|
|
5
|
+
import { type FooterProps, type BreadcrumbProps } from './page.client.js';
|
|
6
|
+
import { type TOCProps } from './components/layout/toc.js';
|
|
7
7
|
type TableOfContentOptions = Omit<TOCProps, 'items' | 'children'> & Pick<AnchorProviderProps, 'single'> & {
|
|
8
8
|
enabled: boolean;
|
|
9
9
|
component: ReactNode;
|
|
@@ -66,7 +66,7 @@ export interface DocsPageProps {
|
|
|
66
66
|
article?: HTMLAttributes<HTMLElement>;
|
|
67
67
|
children: ReactNode;
|
|
68
68
|
}
|
|
69
|
-
export declare function DocsPage({ toc, full, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopoverReplace, ...tocPopoverOptions }, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions }, ...props }: DocsPageProps):
|
|
69
|
+
export declare function DocsPage({ toc, full, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopoverReplace, ...tocPopoverOptions }, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions }, ...props }: DocsPageProps): import("react/jsx-runtime").JSX.Element;
|
|
70
70
|
/**
|
|
71
71
|
* Add typography styles
|
|
72
72
|
*/
|
package/dist/page.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../src/page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,KAAK,mBAAmB,EAAkB,MAAM,mBAAmB,CAAC;AAI7E,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,eAAe,EAGrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,yBAAyB,CAAC;AAMjC,KAAK,qBAAqB,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,UAAU,CAAC,GAC/D,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC5B,CAAC;AAEJ,KAAK,4BAA4B,GAAG,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;AAE1E,UAAU,mBACR,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iBAAkB,SAAQ,eAAe;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,UAAU,aAAc,SAAQ,WAAW;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,eAAe,CAAC;IAEtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,cAAc,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAChD,qBAAqB,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAE9D;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAExC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAEhC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAEpC,SAAS,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EACvB,GAAQ,EACR,IAAY,EACZ,qBAAqB,EAAE,EACrB,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,iBAAiB,EAC5B,GAAG,iBAAiB,EAChB,EACN,cAAc,EAAE,EACd,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,UAAU,EACrB,GAAG,UAAU,EACT,EACN,GAAG,KAAK,EACT,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../src/page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,KAAK,mBAAmB,EAAkB,MAAM,mBAAmB,CAAC;AAI7E,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,eAAe,EAGrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,yBAAyB,CAAC;AAMjC,KAAK,qBAAqB,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,UAAU,CAAC,GAC/D,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC5B,CAAC;AAEJ,KAAK,4BAA4B,GAAG,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;AAE1E,UAAU,mBACR,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iBAAkB,SAAQ,eAAe;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,UAAU,aAAc,SAAQ,WAAW;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,eAAe,CAAC;IAEtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,cAAc,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAChD,qBAAqB,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAE9D;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAExC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAEhC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAEpC,SAAS,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EACvB,GAAQ,EACR,IAAY,EACZ,qBAAqB,EAAE,EACrB,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,iBAAiB,EAC5B,GAAG,iBAAiB,EAChB,EACN,cAAc,EAAE,EACd,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,UAAU,EACrB,GAAG,UAAU,EACT,EACN,GAAG,KAAK,EACT,EAAE,aAAa,2CAmGf;AA+BD;;GAEG;AACH,eAAO,MAAM,QAAQ,2HAOnB,CAAC;AAIH,eAAO,MAAM,eAAe,uIAgB1B,CAAC;AAIH,eAAO,MAAM,SAAS,mIAapB,CAAC;AAIH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,IAAI,EACJ,IAAI,EAAE,UAAU,EAChB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;CACtB,kDAmEA;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAM5E"}
|
package/dist/page.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, } from 'react';
|
|
3
3
|
import { AnchorProvider } from 'fumadocs-core/toc';
|
|
4
|
-
import { Card, Cards } from './components/card';
|
|
5
|
-
import { replaceOrDefault } from './layouts/shared';
|
|
6
|
-
import { cn } from './utils/cn';
|
|
7
|
-
import { Footer, LastUpdate, TocNav, Breadcrumb, PageBody, PageArticle, } from './page.client';
|
|
8
|
-
import { Toc, TOCItems, TocPopoverTrigger, TocPopover, TocPopoverContent, } from './components/layout/toc';
|
|
9
|
-
import { buttonVariants } from './components/ui/button';
|
|
4
|
+
import { Card, Cards } from './components/card.js';
|
|
5
|
+
import { replaceOrDefault } from './layouts/shared.js';
|
|
6
|
+
import { cn } from './utils/cn.js';
|
|
7
|
+
import { Footer, LastUpdate, TocNav, Breadcrumb, PageBody, PageArticle, } from './page.client.js';
|
|
8
|
+
import { Toc, TOCItems, TocPopoverTrigger, TocPopover, TocPopoverContent, } from './components/layout/toc.js';
|
|
9
|
+
import { buttonVariants } from './components/ui/button.js';
|
|
10
10
|
import { Edit, Text } from 'lucide-react';
|
|
11
|
-
import { I18nLabel } from './contexts/i18n';
|
|
12
|
-
import ClerkTOCItems from './components/layout/toc-clerk';
|
|
11
|
+
import { I18nLabel } from './contexts/i18n.js';
|
|
12
|
+
import ClerkTOCItems from './components/layout/toc-clerk.js';
|
|
13
13
|
export function DocsPage({ toc = [], full = false, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopoverReplace, ...tocPopoverOptions } = {}, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {}, ...props }) {
|
|
14
14
|
const isTocRequired = toc.length > 0 ||
|
|
15
15
|
tocOptions.footer !== undefined ||
|
|
@@ -54,11 +54,15 @@ export const DocsTitle = forwardRef((props, ref) => {
|
|
|
54
54
|
});
|
|
55
55
|
DocsTitle.displayName = 'DocsTitle';
|
|
56
56
|
export function DocsCategory({ page, from, tree: forcedTree, ...props }) {
|
|
57
|
-
let tree
|
|
58
|
-
if (
|
|
59
|
-
tree =
|
|
57
|
+
let tree;
|
|
58
|
+
if (forcedTree) {
|
|
59
|
+
tree = forcedTree;
|
|
60
60
|
}
|
|
61
|
-
else if (
|
|
61
|
+
else if (from._i18n) {
|
|
62
|
+
const locale = page.locale ?? from._i18n.defaultLanguage;
|
|
63
|
+
tree = from.pageTree[locale];
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
62
66
|
tree = from.pageTree;
|
|
63
67
|
}
|
|
64
68
|
function findParentFromTree(node, page) {
|
|
@@ -92,8 +96,7 @@ export function DocsCategory({ page, from, tree: forcedTree, ...props }) {
|
|
|
92
96
|
}
|
|
93
97
|
if (items.length === 0)
|
|
94
98
|
return null;
|
|
95
|
-
return (_jsx(Cards, { ...props, children: items.map((item) => (_jsx(Card, { title: item.data.title, description: item.data.description
|
|
96
|
-
'No Description', href: item.url }, item.url))) }));
|
|
99
|
+
return (_jsx(Cards, { ...props, children: items.map((item) => (_jsx(Card, { title: item.data.title, description: item.data.description, href: item.url }, item.url))) }));
|
|
97
100
|
}
|
|
98
101
|
/**
|
|
99
102
|
* For separate MDX page
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeProvider } from 'next-themes';
|
|
2
2
|
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
-
import type { DefaultSearchDialogProps } from './components/dialog/search-default';
|
|
4
|
-
import { type SearchProviderProps } from './contexts/search';
|
|
3
|
+
import type { DefaultSearchDialogProps } from './components/dialog/search-default.js';
|
|
4
|
+
import { type SearchProviderProps } from './contexts/search.js';
|
|
5
5
|
interface SearchOptions extends Omit<SearchProviderProps, 'options' | 'children'> {
|
|
6
6
|
options?: Partial<DefaultSearchDialogProps> | SearchProviderProps['options'];
|
|
7
7
|
/**
|
|
@@ -34,9 +34,9 @@ export interface RootProviderProps {
|
|
|
34
34
|
children: ReactNode;
|
|
35
35
|
}
|
|
36
36
|
export declare function RootProvider({ children, dir, theme: { enabled, ...theme }, search, }: RootProviderProps): React.ReactElement;
|
|
37
|
-
export { useI18n, I18nLabel } from './contexts/i18n';
|
|
38
|
-
export { SearchProvider, SearchOnly, useSearchContext, type SearchProviderProps, } from './contexts/search';
|
|
39
|
-
export { SidebarProvider, useSidebar } from './contexts/sidebar';
|
|
40
|
-
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree';
|
|
41
|
-
export { StylesProvider, usePageStyles, type PageStyles, } from './contexts/layout';
|
|
37
|
+
export { useI18n, I18nLabel } from './contexts/i18n.js';
|
|
38
|
+
export { SearchProvider, SearchOnly, useSearchContext, type SearchProviderProps, } from './contexts/search.js';
|
|
39
|
+
export { SidebarProvider, useSidebar } from './contexts/sidebar.js';
|
|
40
|
+
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree.js';
|
|
41
|
+
export { StylesProvider, usePageStyles, type PageStyles, } from './contexts/layout.js';
|
|
42
42
|
//# sourceMappingURL=provider.d.ts.map
|
package/dist/provider.js
CHANGED
|
@@ -3,9 +3,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { ThemeProvider } from 'next-themes';
|
|
4
4
|
import dynamic from 'next/dynamic';
|
|
5
5
|
import { DirectionProvider } from '@radix-ui/react-direction';
|
|
6
|
-
import { SidebarProvider } from './contexts/sidebar';
|
|
7
|
-
import { SearchProvider } from './contexts/search';
|
|
8
|
-
const DefaultSearchDialog = dynamic(() => import('./components/dialog/search-default'), { ssr: false });
|
|
6
|
+
import { SidebarProvider } from './contexts/sidebar.js';
|
|
7
|
+
import { SearchProvider } from './contexts/search.js';
|
|
8
|
+
const DefaultSearchDialog = dynamic(() => import('./components/dialog/search-default.js'), { ssr: false });
|
|
9
9
|
export function RootProvider({ children, dir, theme: { enabled = true, ...theme } = {}, search, }) {
|
|
10
10
|
let body = children;
|
|
11
11
|
if (search?.enabled !== false)
|
|
@@ -14,8 +14,8 @@ export function RootProvider({ children, dir, theme: { enabled = true, ...theme
|
|
|
14
14
|
body = (_jsx(ThemeProvider, { attribute: "class", defaultTheme: "system", enableSystem: true, disableTransitionOnChange: true, ...theme, children: body }));
|
|
15
15
|
return (_jsx(DirectionProvider, { dir: dir ?? 'ltr', children: _jsx(SidebarProvider, { children: body }) }));
|
|
16
16
|
}
|
|
17
|
-
export { useI18n, I18nLabel } from './contexts/i18n';
|
|
18
|
-
export { SearchProvider, SearchOnly, useSearchContext, } from './contexts/search';
|
|
19
|
-
export { SidebarProvider, useSidebar } from './contexts/sidebar';
|
|
20
|
-
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree';
|
|
21
|
-
export { StylesProvider, usePageStyles, } from './contexts/layout';
|
|
17
|
+
export { useI18n, I18nLabel } from './contexts/i18n.js';
|
|
18
|
+
export { SearchProvider, SearchOnly, useSearchContext, } from './contexts/search.js';
|
|
19
|
+
export { SidebarProvider, useSidebar } from './contexts/sidebar.js';
|
|
20
|
+
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree.js';
|
|
21
|
+
export { StylesProvider, usePageStyles, } from './contexts/layout.js';
|
package/dist/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.4",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -53,15 +53,15 @@
|
|
|
53
53
|
"css/*"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
57
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
58
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
56
|
+
"@radix-ui/react-accordion": "^1.2.3",
|
|
57
|
+
"@radix-ui/react-collapsible": "^1.1.3",
|
|
58
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
59
59
|
"@radix-ui/react-direction": "^1.1.0",
|
|
60
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
61
|
-
"@radix-ui/react-popover": "^1.1.
|
|
62
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
63
|
-
"@radix-ui/react-slot": "^1.1.
|
|
64
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
60
|
+
"@radix-ui/react-navigation-menu": "^1.2.5",
|
|
61
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
62
|
+
"@radix-ui/react-scroll-area": "^1.2.3",
|
|
63
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
64
|
+
"@radix-ui/react-tabs": "^1.1.3",
|
|
65
65
|
"class-variance-authority": "^0.7.1",
|
|
66
66
|
"lodash.merge": "^4.6.2",
|
|
67
67
|
"lucide-react": "^0.474.0",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"next": "15.1.6",
|
|
80
80
|
"tailwindcss": "^4.0.3",
|
|
81
81
|
"tsc-alias": "^1.8.10",
|
|
82
|
-
"@fumadocs/cli": "0.0.
|
|
82
|
+
"@fumadocs/cli": "0.0.8",
|
|
83
83
|
"eslint-config-custom": "0.0.0",
|
|
84
|
-
"fumadocs-core": "15.0.
|
|
84
|
+
"fumadocs-core": "15.0.4",
|
|
85
85
|
"tsconfig": "0.0.0"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"react": "18.x.x || 19.x.x",
|
|
90
90
|
"react-dom": "18.x.x || 19.x.x",
|
|
91
91
|
"tailwindcss": "^3.4.14 || ^4.0.0",
|
|
92
|
-
"fumadocs-core": "15.0.
|
|
92
|
+
"fumadocs-core": "15.0.4"
|
|
93
93
|
},
|
|
94
94
|
"peerDependenciesMeta": {
|
|
95
95
|
"tailwindcss": {
|