fumadocs-ui 16.15.13 → 16.15.15
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/css/generated/docs.css +1 -1
- package/css/generated/glass.css +1 -1
- package/css/generated/home.css +1 -1
- package/css/generated/shared.css +1 -1
- package/dist/.translations/index.d.ts +3 -0
- package/dist/.translations/keys.js +3 -0
- package/dist/components/accordion.js +6 -3
- package/dist/components/codeblock.js +7 -4
- package/dist/components/dialog/search.js +20 -1
- package/dist/components/heading.js +6 -3
- package/dist/components/sidebar/base.js +7 -2
- package/dist/components/toc/block.d.ts +13 -0
- package/dist/components/toc/block.js +84 -0
- package/dist/layouts/docs/page/slots/footer.js +1 -1
- package/dist/layouts/docs/page/slots/toc.d.ts +13 -6
- package/dist/layouts/docs/page/slots/toc.js +8 -2
- package/dist/layouts/docs/slots/sidebar.js +2 -0
- package/dist/layouts/flux/page/slots/toc.d.ts +8 -4
- package/dist/layouts/flux/page/slots/toc.js +7 -1
- package/dist/layouts/notebook/page/slots/toc.d.ts +13 -6
- package/dist/layouts/notebook/page/slots/toc.js +8 -2
- package/dist/layouts/shared/page-actions.js +2 -1
- package/dist/style.css +43 -0
- package/package.json +5 -4
package/css/generated/docs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!header !showItem *:col-start-1 *:my-auto *:pointer-events-auto *:rounded-md *:row-start-1 *:w-(--fd-sidebar-width) --fd-docs-height --fd-docs-row-1 --fd-docs-row-2 --fd-docs-row-3 --fd-header-height --fd-layout-width --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-popover-height:0px] [--fd-toc-width:0px] [grid-area:header] [grid-area:main] [grid-area:sidebar] [grid-area:toc-popover] [grid-area:toc] after aria-valuemax aria-valuemin aria-valuenow article attribute available backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-s-2.5 before:inset-y-1 before:w-px bg-fd-background/80 border-b-2 border-e border-e-0 border-fd-primary border-y-0 breadcrumb breadcrumbEnabled circleProps circumference clerk click collapsing containerProps createLinkItemRenderer data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-s-2.5 data-[active=true]:before:inset-y-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-[column-changed=true]:transition-[grid-template-columns] data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-column-changed data-full data-hovered data-layout-content data-layout-main data-sidebar-collapsed data-sidebar-panel data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots desktop duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including information inset-e-0 inset-s-4 inset-y-2 instant isCollapseChanged isNavTransparent isTop items-end justify-items-center justify-start layout-level layoutTabs linkItems max max-h-[50vh] max-md:hidden max-md:layout:[--fd-header-height:--spacing(14)] max-w-[1168px] max-w-[380px] max-w-[900px] max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] mb-4 mb-8 mb-auto md:in-data-[sidebar-collapsed=true]:pt-16 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside overflow-x-clip p-0 pagination pb-1.5 pe-0 pe-2.5 pe-4 pointer-events-none popover previousCollapsed progress progressbar provided pt-0.5 pt-12 pt-2 pt-3 px-6 py-0 py-6 radius restSvgProps rotate-180 rounded-none rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate setPreviousCollapsed showItem sidebarEnabled sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover text-[1.75em] text-end text-fd-foreground timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-[calc(--spacing(4)+var(--fd-docs-row-3))] transition-[opacity,translate,color] transition-[opacity,translate] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typography under unlisted updated useBaseSlots useDocsLayout useDocsPage useFooterItems useIsScrollTop useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:hidden xl:in-data-[sidebar-collapsed=true]:pt-14 xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 z-10 z-20 z-30");
|
|
1
|
+
@source inline("!header !showItem *:col-start-1 *:my-auto *:pointer-events-auto *:rounded-md *:row-start-1 *:w-(--fd-sidebar-width) --fd-docs-height --fd-docs-row-1 --fd-docs-row-2 --fd-docs-row-3 --fd-header-height --fd-layout-width --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-popover-height:0px] [--fd-toc-width:0px] [grid-area:header] [grid-area:main] [grid-area:sidebar] [grid-area:toc-popover] [grid-area:toc] after aria-valuemax aria-valuemin aria-valuenow article attribute available backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-s-2.5 before:inset-y-1 before:w-px bg-fd-background/80 border-b-2 border-e border-e-0 border-fd-primary border-y-0 breadcrumb breadcrumbEnabled circleProps circumference clerk click collapsing containerProps createLinkItemRenderer data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-s-2.5 data-[active=true]:before:inset-y-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-[column-changed=true]:transition-[grid-template-columns] data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-column-changed data-full data-hovered data-layout-content data-layout-main data-sidebar-collapsed data-sidebar-panel data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots desktop duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including inert information inset-e-0 inset-s-4 inset-y-2 instant isCollapseChanged isNavTransparent isTop items-end justify-items-center justify-start layout-level layoutTabs linkItems max max-h-[50vh] max-md:hidden max-md:layout:[--fd-header-height:--spacing(14)] max-w-[1168px] max-w-[380px] max-w-[900px] max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] mb-4 mb-8 mb-auto md:in-data-[sidebar-collapsed=true]:pt-16 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside overflow-x-clip p-0 pagination pb-1.5 pe-0 pe-2.5 pe-4 pointer-events-none popover previousCollapsed progress progressbar provided pt-0.5 pt-12 pt-2 pt-3 px-6 py-0 py-6 radius restSvgProps rotate-180 rounded-none rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate setPreviousCollapsed showItem sidebarEnabled sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover text-[1.75em] text-end text-fd-foreground timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-[calc(--spacing(4)+var(--fd-docs-row-3))] transition-[opacity,translate,color] transition-[opacity,translate] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typography under unlisted updated useBaseSlots useDocsLayout useDocsPage useFooterItems useIsScrollTop useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:hidden xl:in-data-[sidebar-collapsed=true]:pt-14 xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 z-10 z-20 z-30");
|
package/css/generated/glass.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!footer ---spacing --fd-left-width --fd-main-width --fd-right-width --row --width -me-1.5 -mt-1.5 -mx-1 -translate-x-[280px] @default @sm:max-w-[200px] [--fd-left-width:0px] [--fd-main-width:900px] [--fd-right-width:0px] [--row:calc(3*var(--spacing))] [--row:calc(6*var(--spacing))] [grid-area:left-margin/left-margin/right/right] [grid-area:left] [grid-area:main] [grid-area:right] [mask-image:linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent))] [mask-image:radial-gradient(circle_at_center_right,white,white_200px,transparent_500px)] after aiChat article autoScroll available backdrop-blur-sm base baseVariants before bg-fd-muted-foreground/50 bg-fd-popover/80 chat clientX collapse contentProps data-[active=false]:hover:text-fd-accent-foreground data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-fd-full defaultSlots defaultTabs desktop edit exitTimerRef fd-glass-layout first:mt-0 flex-row-reverse font-semibold footer footerList fumadocs-core/breadcrumb getBreadcrumbItemsFromPath grid-cols-1 gridTemplate gridTemplateRows
|
|
1
|
+
@source inline("!footer ---spacing --fd-left-width --fd-main-width --fd-right-width --row --width -me-1.5 -mt-1.5 -mx-1 -translate-x-[280px] @default @sm:max-w-[200px] [--fd-left-width:0px] [--fd-main-width:900px] [--fd-right-width:0px] [--row:calc(3*var(--spacing))] [--row:calc(6*var(--spacing))] [grid-area:left-margin/left-margin/right/right] [grid-area:left] [grid-area:main] [grid-area:right] [mask-image:linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent))] [mask-image:radial-gradient(circle_at_center_right,white,white_200px,transparent_500px)] after aiChat article autoScroll available backdrop-blur-sm base baseVariants before bg-fd-muted-foreground/50 bg-fd-popover/80 chat clientX collapse contentProps data-[active=false]:hover:text-fd-accent-foreground data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-fd-full defaultSlots defaultTabs desktop edit exitTimerRef fd-glass-layout first:mt-0 flex-row-reverse font-semibold footer footerList fumadocs-core/breadcrumb getBreadcrumbItemsFromPath grid-cols-1 gridTemplate gridTemplateRows h-0 h-6 h-8 h-[calc(100dvh---spacing(4))] handles hover hover:decoration-dashed hover:decoration-fd-muted-foreground hover:opacity-80 hover:underline hover:underline-offset-4 inAnimation including information innerWidth inset-e-0 isLayoutTabActive itemTriggerVariants items-start justify-end layout:[--fd-main-width:1200px] leaves left left-margin leftSpace lg linkItems longer max-md:bg-linear-to-t max-md:bottom-0 max-md:from-fd-background max-md:h-16 max-md:hidden max-md:mt-auto max-md:pb-4 max-md:ps-[calc(--spacing(1.5)-1px)] max-md:w-4 max-w-[calc(100vw-3rem)] max-xl:-translate-y-1/2 max-xl:bg-fd-popover max-xl:border max-xl:end-1 max-xl:fixed max-xl:grid-cols-[calc(240px---spacing(6))] max-xl:mask-none max-xl:max-h-[calc(100dvh---spacing(32))] max-xl:overflow-clip max-xl:p-3 max-xl:ps-[calc(--spacing(2.5)-1px)] max-xl:rounded-xl max-xl:shadow-md max-xl:text-fd-popover-foreground max-xl:top-1/2 max-xl:w-6 max-xl:w-[240px] mb-8 md:bg-linear-to-b md:from-fd-background md:h-12 md:layout:[--fd-left-width:0px] md:layout:[--fd-left-width:280px] md:layout:[--fd-right-width:12px] md:pb-8 md:pt-16 md:pt-2 md:px-2 md:py-1.5 md:top-0 min-h-dvh mobile mt-2 mt-2.5 mt-4 mx-2 my-2 nd-toc nd-toc-title no onPointerDown opacity-100 overflow-x-clip overflow-y-hidden p-0 p-6 pagination pb-16 pb-4 pe-3 pe-3.5 pen pointer pointer-events-none prose-sm provided ps-2.5 ps-3 ps-4.5 pt-2 pt-4 reuse right right-margin rightIcon setDate setInAnimation setMobileOpen shadow-fd-background shouldOpen size-10 size-12 size-3.5! size-4! start text-[1.75em] text-end text-fd-foreground text-fd-primary/80 timeout timezone top-2 transition-[background-color,width,height] transition-[grid-template-rows] transition-[opacity,height] transition-[width,padding] transitionTimerRef typography under unlisted updated useBaseSlots useFooterItems useGlassLayout w-(--width) w-[360px] w-[calc(280px---spacing(2))] we well xl:[@media(hover:none)]:[--row:calc(6*var(--spacing))] xl:[@media(hover:none)]:h-6 xl:[@media(hover:none)]:h-px xl:[@media(hover:none)]:opacity-100 xl:[@media(hover:none)]:pointer-events-auto xl:[@media(hover:none)]:w-(--width) xl:flex-row-reverse xl:h-[calc(100dvh---spacing(10))] xl:hidden xl:items-center xl:items-end xl:layout:[--fd-right-width:240px] xl:pe-4 xl:sticky xl:text-end xl:top-10 z-10 z-20 z-30");
|
package/css/generated/home.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("*:max-w-(--fd-layout-width) *:mx-auto --fd-layout-width -me-1.5 -ms-1.5 -mx-1 [&_svg]:size-5.5 [--fd-layout-width:1400px] are been bg-fd-background/80 data-[active=true]:font-medium defaultVariants enableHoverToOpen first:ms-0 font-bold font-semibold gap-2.5 grid-cols-1 h-14 had hideIfDisabled hover:text-fd-popover-foreground/50 hovering isTop isTransparent
|
|
1
|
+
@source inline("*:max-w-(--fd-layout-width) *:mx-auto --fd-layout-width -me-1.5 -ms-1.5 -mx-1 [&_svg]:size-5.5 [--fd-layout-width:1400px] are been bg-fd-background/80 data-[active=true]:font-medium defaultVariants enableHoverToOpen first:ms-0 font-bold font-semibold gap-2.5 grid-cols-1 h-14 had hideIfDisabled hover:text-fd-popover-foreground/50 hovering isTop isTransparent justify-end last:me-0 lg:grid-cols-3 lg:hidden linkItems looking max-lg:hidden max-lg:rounded-b-2xl max-lg:shadow-lg max-sm:hidden max-sm:mt-2 max-w-[240px] max-w-md mb-4 md:grid-cols-2 might mobile mt-4 navEnabled navItemVariants nd-home-layout nd-nav ps-2.5 px-6 px-8 sm:flex-row sm:hidden sm:items-center sm:justify-end temporarily text-2xl text-6xl text-base transparentMode under useBaseSlots useHomeLayout useIsScrollTop");
|
package/css/generated/shared.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!collapsed !isActive !items !nested !open !title *:border-b *:data-[empty=true]:border-b-0 *:flex *:flex! *:flex-col *:flex-col! *:gap-0.5! *:has-[+:last-child[data-empty=true]]:border-b-0 *:last:border-b-0 *:rounded-full --callout-color --color-fd- --color-fd-muted --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --radix-navigation-menu-viewport-height --radix-popover-content-available-height --radix-popover-content-transform-origin --radix-popover-trigger-width --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top -mb-px -me-0.5 -me-2 -mx-px -rotate-90 -top-1.5 -translate-x-1/2 -translate-y-1/2 -z-1 @container @defaultValue @deprecated @fuma-translate/react @keyframes @max-lg:col-span-full @max-xl:hidden @param @radix-ui/react-accordion @radix-ui/react-collapsible @radix-ui/react-dialog @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-presence @radix-ui/react-scroll-area @radix-ui/react-tabs @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&_svg]:size-3.5 [&_svg]:size-4 [&_svg]:size-4.5 [&_svg]:size-5 [&_svg]:size-full [&_svg]:text-fd-muted-foreground [offset-distance:var(--offset-distance,0)] [scrollbar-width:none] a abcdefghijklmnopqrstuvwxyz234567 about absolute accordion action actions active add advanced algoliaClient align alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allowedMode allows alphabet always an anchor and animate-pulse animation another application/json areaRef aria-controls aria-describedby aria-expanded aria-label aria-selected as aside ask assume assumes async at auto await backdrop-blur-lg backdrop-blur-xs background background-position backgroundColor backgroundImage backgroundSize backward banner basePath baseProps baseSlots baseUrl based behaviour belongs between bg-(--callout-color)/50 bg-(--shiki-light-bg) bg-fd-accent bg-fd-background bg-fd-border bg-fd-card bg-fd-muted bg-fd-overlay bg-fd-popover bg-fd-popover/60 bg-fd-primary bg-fd-primary/10 bg-fd-secondary bg-fd-secondary/50 bg-transparent bind binded bitsLeft black block blocks boolean border border-b border-l border-none border-s border-t border-transparent borderBottom bottom bottom-0 bottom-1.5 boundary buffer bundle button buttonVariants by cache cached can canonical case center central change changeLayout checked child children chooseLanguage class-variance-authority className clear client client-side clientHeight clientWidth clipPath clone close closeOnRedirect closed cn code col-span-full collapsed collapsible collection color colors column com compact compat compatible component components composedRef computed config const container containerRef containing content contents context controlled/uncontrolled copy core counterSet createContext createMarkdownRenderer createRelativeLink css ctx current currentColor custom customize cva cx cy d dangerouslySetInnerHTML dark dark:bg-(--shiki-dark-bg) dashed data data-[active=true]:text-fd-primary data-[motion=from-end]:animate-fd-enterFromRight data-[motion=from-start]:animate-fd-enterFromLeft data-[motion=to-end]:animate-fd-exitToRight data-[motion=to-start]:animate-fd-exitToLeft data-[state=active]:border-fd-primary data-[state=active]:text-fd-primary data-[state=closed]:animate-fd-accordion-up data-[state=closed]:animate-fd-collapsible-up data-[state=closed]:animate-fd-dialog-out data-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-nav-menu-out data-[state=closed]:animate-fd-popover-out data-[state=hidden]:animate-fd-fade-out data-[state=inactive]:hidden data-[state=open]:animate-fd-accordion-down data-[state=open]:animate-fd-collapsible-down data-[state=open]:animate-fd-dialog-in data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-nav-menu-in data-[state=open]:animate-fd-popover-in data-[state=open]:bg-fd-accent data-[state=open]:bg-fd-accent/50 data-[state=open]:text-fd-accent-foreground data-accordion-value data-active data-card data-checked data-checked:text-fd-accent-foreground data-collapsed data-empty data-icon data-line-numbers data-line-numbers-start data-search data-search-full data-state data-theme-toggle date debounced declare default defaultColor defaultFormatter defaultIndex defaultItems defaultLanguage defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay delayMs depends deprecated depth description detect dialog dir disabled disabled:bg-fd-secondary disabled:opacity-50 disabled:pointer-events-none disabled:text-fd-secondary-foreground display displayName displayed distance div divide-fd-border divide-x divide-y documented dominantBaseline don drawer dropdown duration-100 duration-200 duration-300 duration-400 during each element else empty empty:hidden enabled encoded end-2 endIdx endpoint env environment equal error escape eslint-disable-next-line event export extends external extraProps false fd-moving-banner fd-scroll-container fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally fixed flex flex-1 flex-col flex-row flex-wrap flexDirection flushSync focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring focus-visible:ring-inset folder folders font-medium font-mono fontSize fontWeight for forceMount forks formatter formatterOptions found fragment free from full fumadocs-core/framework fumadocs-core/highlight fumadocs-core/i18n fumadocs-core/link fumadocs-core/page-tree fumadocs-core/search fumadocs-core/source fumadocs-core/toc function gap gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-3.5 gap-4 gap-y-4 generated ghost github-dark github-light githubUrl given global globalKey grid grid-cols-2 grid-cols-[1fr_3fr] group group-data-[state=active]:bg-fd-primary group-data-[state=open]:rotate-180 group-data-[state=open]:rotate-90 group-hover/heading:opacity-100 group/heading groupListeners groups guides h h-(--fd-animated-height) h-(--radix-navigation-menu-viewport-height) h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 hand handle handleThemeChange has-focus-visible:bg-fd-accent hash hashchange hast have header headers heading height hidden hideLocale highlight highlighter hints hover:bg-fd-accent hover:bg-fd-accent/80 hover:bg-fd-primary/80 hover:text-fd-accent-foreground hovered href html hydration i i18n i18nProvider icon icon-sm icon-xs iconClass id idea idx if if-needed ignore img import in inPre inTab index infinite info inline inline-flex input inputType inset-0 inset-e-2 inset-s-0 inset-s-3 inset-s-6 inset-x-0 inset-x-2 inset-y-0 inside instanceof instead integration interface intersect invisible is isActive isComposing isFirst isLast isLoading isTabActive isUp it item itemLineLengths itemVariants items items-center js justify-between justify-center keepBackground key keyCode keydown keys l l0 l1 l2 label lang language languageSelect last:rounded-b-xl layer layout leading-none leaving left-0 left-1/2 length let letting level light light-dark light-dark-system line line-through linear link links list list-none listener listeners locale localeTranslations locales lower ltr lucide lucide-book lucide-book-icon lucide-react made main make mapped margin marginTop mark markdownUrl marked mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)] maskComposite maskImage max-h-(--radix-popover-content-available-height) max-h-20 max-h-[460px] max-h-[600px] max-h-[80svh] max-md:bg-fd-secondary max-md:border max-md:p-1.5 max-md:rounded-md max-w-[1400px] max-w-[98vw] max-w-full max-w-screen-sm max-width maximumFractionDigits mb-1 mb-2 md:hidden md:mb-auto md:size-5 md:top-[calc(50%-250px)] mdComponents mdRenderer mdx/types.js me-1 me-2 me-auto menu menuItems mergeRefs message middle min-h-0 min-w-0 min-w-[240px] min-w-fit min-w-full mode module mounted mouse ms-2 ms-auto ms-px mt-1 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name names namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new newTheme next next-themes next/og node nodes none noop noopener noreferrer normal normalize not not-last:mb-2 not-prose notation note now null number numbers object observer of offsetPath offsetTop on onChange onClick onCopy onKey onOpenChange onOpenChangeCallback onPointerEnter onPointerLeave onPointerMove onPrint onSearchChange onSearchChangeCallback onSelect onSelectCallback onTagChange onTagChangeCallback onValueChange once one only opacity-(--opacity,0) opacity-0 open openFromHash option optional options or oramaCloudClient order origin-(--radix-popover-content-transform-origin) origin-[top_center] origin-center original other out outline outline-none output overflow-auto overflow-hidden overflow-x-auto overflow-y-auto override overscroll-contain own owner oxlint-disable-next-line p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl pageUrlProp panel panels parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 per performing persist persistent placeholder placeholder:text-fd-muted-foreground please pointerType points populated positions possible powered pre pre-rendering predate prefetch present prev previous previousRef primary primaryColor primaryTextColor promise promises prompt prompts prop props prose prose-no-margin provide provider ps-1 ps-2 ps-4 ps-8 pt-0 pure px px-0.5 px-1 px-1.5 px-2 px-2.5 px-3 px-4 px-px py-0.5 py-1 py-1.5 py-12 py-2 py-2.5 py-3 py-3.5 q query questions rainbow rainbowColors raw re-create react react-dom react-hooks/exhaustive-deps react-hooks/rules-of-hooks react-medium-image-zoom reader ref referenced region registering rehype-raw rehypeCustomElements rehypePlugins rehypeRaw rel relative remarkRehypeOptions remove render renderHighlights renderMarkdown repo repository required resolve resolved resolvedTheme response rest result results return revalidate right-2 role root rootRef round rounded-2xl rounded-[inherit] rounded-full rounded-lg rounded-md rounded-sm rounded-xl router row rtl:-scale-x-100 rtl:rotate-180 rtl:rotate-90 s same scroll scroll-into-view-if-needed scroll-m-20 scroll-m-24 scroll-m-28 scroll-m-4 scrollIntoView scrollMode search searchOptions searchToggle searchToggleEnabled searchTrigger secondary see select-none selected separate separator server set setActive setCollapsed setHover setLoading setMounted setOpen setOpenSearch setSvg setTag setValue shadow-2xl shadow-black/50 shadow-lg shadow-md shadow-sm shiki shikiOptions shortcuts should show showAlgolia showOrama shrink-0 side sideOffset sidebar signature simple since single site size size-1 size-3 size-3.5 size-4 size-5 size-6.5 size-9 size-full sizes slots sm solid some source space span specific src stars startIdx state static stay sticky still str string stroke stroke-fd-foreground/10 stroke-fd-primary strokeLinecap strokeLinejoin strokeWidth strong style styles success supported supposed sure svg switch switcher system t tab tabIndex table tabs tabsRef tag tagName tags target text text-(--callout-color) text-[0.8125rem] text-[0.9375rem] text-center text-fd-accent-foreground text-fd-card text-fd-card-foreground text-fd-foreground/80 text-fd-muted-foreground text-fd-muted-foreground/50 text-fd-popover-foreground text-fd-popover-foreground/80 text-fd-primary text-fd-primary-foreground text-fd-primary/50 text-fd-secondary-foreground text-lg text-nowrap text-sm text-start text-xs text/plain textAnchor textContent that the their theme themeAriaLabels themeSwitch themeSwitchEnabled themes then this throw thumbBox tier timerRef tip title to toc tocInfo toolbar top top-0 top-1/2 top-2.5 top-3 top-4 touch transform transition-[clip-path] transition-[height] transition-[opacity,offset-distance] transition-[width,height] transition-all transition-colors transition-opacity transition-transform translationKeys translations translations/keys.json transparent tree trigger true truncate try type typeof types unchanged undefined underline underlying understand unified unist-util-visit unknown unnecessarily updateAnchor updates upperX url urls us usage use useCopyButton useDocsSearch useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange usePathname useProps useRef useRouter useSearchContext useSidebar useState useSyncExternalStore useTOCItems useTabsGroups useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visit vite void w w-(--radix-popover-trigger-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces width will window with without work wrap wrap-anywhere wrapElement wrapInSuspense wrapped x x1 x2 xmlns y y1 y2 you your z-2 z-40 z-50 zoom zoomImg zoomMargin");
|
|
1
|
+
@source inline("!collapsed !isActive !items !nested !open !title *:border-b *:data-[empty=true]:border-b-0 *:flex *:flex! *:flex-col *:flex-col! *:gap-0.5! *:has-[+:last-child[data-empty=true]]:border-b-0 *:last:border-b-0 *:rounded-full --callout-color --color-fd- --color-fd-muted --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --radix-navigation-menu-viewport-height --radix-popover-content-available-height --radix-popover-content-transform-origin --radix-popover-trigger-width --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top -mb-px -me-0.5 -me-2 -mx-px -rotate-90 -top-1.5 -translate-x-1/2 -translate-y-1/2 -z-1 @container @defaultValue @deprecated @fuma-translate/react @keyframes @max-lg:col-span-full @max-xl:hidden @param @radix-ui/react-accordion @radix-ui/react-collapsible @radix-ui/react-dialog @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-presence @radix-ui/react-scroll-area @radix-ui/react-tabs @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&_svg]:size-3.5 [&_svg]:size-4 [&_svg]:size-4.5 [&_svg]:size-5 [&_svg]:size-full [&_svg]:text-fd-muted-foreground [clip-path:inset(0_0_100%)] [offset-distance:var(--offset-distance,0)] [scrollbar-width:none] a abcdefghijklmnopqrstuvwxyz234567 about absolute accordion action actions active add advanced algoliaClient align align-text-bottom alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allowedMode allows alphabet always an anchor and animate-pulse animation another application/json areaRef aria-activedescendant aria-autocomplete aria-controls aria-describedby aria-expanded aria-label aria-live aria-selected as aside ask assume assumes async at auto await backdrop-blur-lg backdrop-blur-xs background background-position backgroundColor backgroundImage backgroundSize backward banner basePath baseProps baseSlots baseUrl based became behaviour belongs between bg-(--callout-color)/50 bg-(--shiki-light-bg) bg-fd-accent bg-fd-background bg-fd-border bg-fd-card bg-fd-muted bg-fd-overlay bg-fd-popover bg-fd-popover/60 bg-fd-primary bg-fd-primary/10 bg-fd-secondary bg-fd-secondary/50 bg-transparent bind binded bitsLeft black block blockRef blocks boolean border border-b border-l border-none border-s border-t border-transparent borderBottom bottom bottom-0 bottom-1.5 boundary buffer bundle button buttonVariants by cache cached can canonical case center central change changeLayout changes child children chooseLanguage class-variance-authority className clear client client-side clientHeight clientWidth clipPath clone close closeOnRedirect closed cn code col-span-full collapsed collapsible collection color colors column com combobox compact compat compatible component components composedRef computed config const container containerRef containing content contents context controlled/uncontrolled copy core counterSet createContext createMarkdownRenderer createRelativeLink css ctx current currentColor custom customize cva cx cy d dangerouslySetInnerHTML dark dark:bg-(--shiki-dark-bg) dashed data data-[active=true]:text-fd-primary data-[motion=from-end]:animate-fd-enterFromRight data-[motion=from-start]:animate-fd-enterFromLeft data-[motion=to-end]:animate-fd-exitToRight data-[motion=to-start]:animate-fd-exitToLeft data-[state=active]:border-fd-primary data-[state=active]:text-fd-primary data-[state=closed]:animate-fd-accordion-up data-[state=closed]:animate-fd-collapsible-up data-[state=closed]:animate-fd-dialog-out data-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-nav-menu-out data-[state=closed]:animate-fd-popover-out data-[state=hidden]:animate-fd-fade-out data-[state=inactive]:hidden data-[state=open]:animate-fd-accordion-down data-[state=open]:animate-fd-collapsible-down data-[state=open]:animate-fd-dialog-in data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-nav-menu-in data-[state=open]:animate-fd-popover-in data-[state=open]:bg-fd-accent data-[state=open]:bg-fd-accent/50 data-[state=open]:text-fd-accent-foreground data-accordion-value data-active data-card data-checked data-checked:text-fd-accent-foreground data-collapsed data-empty data-icon data-line-numbers data-line-numbers-start data-search data-search-full data-state data-theme-toggle date debounced declare default defaultColor defaultFormatter defaultIndex defaultItems defaultLanguage defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay delayMs depends deprecated depth description detect dialog dir disabled disabled:bg-fd-secondary disabled:opacity-50 disabled:pointer-events-none disabled:text-fd-secondary-foreground display displayName displayed distance div divide-fd-border divide-x divide-y document documented dominantBaseline don drawer dropdown duration-100 duration-200 duration-300 duration-400 during each ease-out element else empty empty:hidden enabled encoded end-2 endIdx endpoint env environment equal error escape eslint-disable-next-line event export expose extends external extraProps false fd-moving-banner fd-scroll-container fd-search-list fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally fixed flex flex-1 flex-col flex-row flex-wrap flexDirection flushSync focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring focus-visible:ring-inset folder folders font-medium font-mono fontSize fontWeight for forceMount forks formatter formatterOptions found fragment free from full fumadocs-core/framework fumadocs-core/highlight fumadocs-core/i18n fumadocs-core/link fumadocs-core/page-tree fumadocs-core/search fumadocs-core/source fumadocs-core/toc function gap gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-3.5 gap-4 gap-y-4 generated ghost github-dark github-light githubUrl given global globalKey grid grid-cols-2 grid-cols-[1fr_3fr] group group-data-[active=true]:bg-fd-primary group-data-[active=true]:text-fd-primary-foreground group-data-[state=active]:bg-fd-primary group-data-[state=open]:rotate-180 group-data-[state=open]:rotate-90 group-hover/heading:opacity-100 group/heading groupListeners groups guides h h-(--fd-animated-height) h-(--radix-navigation-menu-viewport-height) h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 hand handle handleThemeChange has-focus-visible:bg-fd-accent hash hashchange hast have header headers heading height here hidden hideLocale highlight highlighter hints hover:bg-fd-accent hover:bg-fd-accent/80 hover:bg-fd-primary/80 hover:text-fd-accent-foreground hovered href html hydration i i18n i18nProvider icon icon-sm icon-xs iconClass id idea idx if if-needed ignore img import in inPre inTab index infinite info inline inline-flex input inputType inset-0 inset-e-2 inset-s-0 inset-s-3 inset-s-6 inset-x-0 inset-x-2 inset-y-0 inside instanceof instead integration interface intersect invisible is isActive isComposing isFirst isLast isLoading isTabActive isUp it item itemLineLengths itemVariants items items-center its js justify-between justify-center keepBackground key keyCode keydown keys l l0 l1 l2 label lang language languageSelect last:rounded-b-xl layer layout leading-none leaving left-0 left-1/2 length let letting level light light-dark light-dark-system line line-through linear link links list list-none listbox listener listeners locale localeTranslations locales lower ltr lucide lucide-book lucide-book-icon lucide-react made main make mapped margin marginTop mark markdownUrl marked mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)] maskComposite maskImage max-h-(--radix-popover-content-available-height) max-h-20 max-h-[460px] max-h-[600px] max-h-[80svh] max-md:bg-fd-secondary max-md:border max-md:p-1.5 max-md:rounded-md max-w-[1400px] max-w-[98vw] max-w-full max-w-screen-sm max-width maximumFractionDigits mb-1 mb-2 md:hidden md:mb-auto md:size-5 md:top-[calc(50%-250px)] mdComponents mdRenderer mdx/types.js me-1 me-1.5 me-2 me-auto measured menu menuItems mergeRefs message middle min-h-0 min-w-0 min-w-[240px] min-w-fit min-w-full mode module mounted mouse ms-2 ms-auto ms-px mt-1 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name names namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new newTheme next next-themes next/og node nodes none noop noopener noreferrer normal normalize not not-last:mb-2 not-prose notation note now null number numbers object observer of offsetHeight offsetPath offsetTop on onChange onClick onCopy onKey onOpenChange onOpenChangeCallback onPointerEnter onPointerLeave onPointerMove onPrint onSearchChange onSearchChangeCallback onSelect onSelectCallback onTagChange onTagChangeCallback onValueChange once one only opacity-(--opacity,0) opacity-0 open openFromHash option optional options or oramaCloudClient order origin-(--radix-popover-content-transform-origin) origin-[top_center] origin-center original other out outline outline-none output overflow-auto overflow-hidden overflow-x-auto overflow-y-auto override overscroll-contain own owner oxlint-disable-next-line p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl pageUrlProp panel panels parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 per performing persist persistent placeholder placeholder:text-fd-muted-foreground please pointerType points polite populated pos positions possible powered pre pre-rendering predate prefetch present prev previous previousRef primary primaryColor primaryTextColor promise promises prompt prompts prop props prose prose-no-margin provide provider ps-1 ps-2 ps-4 ps-8 pt-0 pure px px-0.5 px-1 px-1.5 px-2 px-2.5 px-3 px-4 px-px py-0.5 py-1 py-1.5 py-12 py-2 py-2.5 py-3 py-3.5 q query querySelector questions rainbow rainbowColors raw re-create react react-dom react-hooks/exhaustive-deps react-hooks/rules-of-hooks react-medium-image-zoom read reader ref referenced region registering rehype-raw rehypeCustomElements rehypePlugins rehypeRaw rel relative remarkRehypeOptions remove render renderHighlights renderMarkdown repo repository required resize resolve resolved resolvedTheme response rest result results return revalidate right-2 role root rootRef round rounded-2xl rounded-[inherit] rounded-full rounded-lg rounded-md rounded-sm rounded-xl router row rtl:-scale-x-100 rtl:rotate-180 rtl:rotate-90 s same scroll scroll-into-view-if-needed scroll-m-20 scroll-m-24 scroll-m-28 scroll-m-4 scrollIntoView scrollMode search searchOptions searchToggle searchToggleEnabled searchTrigger secondary see select-none selected separate separator server set setActive setCollapsed setHover setLoading setMounted setOpen setOpenSearch setSvg setTag setValue shadow-2xl shadow-black/50 shadow-lg shadow-md shadow-sm shiki shikiOptions shortcuts should show showAlgolia showOrama shrink-0 side sideOffset sidebar signature simple since single site size size-1 size-3 size-3.5 size-4 size-5 size-6.5 size-9 size-full sizes slots sm so solid some source space span specific sr-only src stars startIdx state static status stay sticky still str string stroke stroke-fd-foreground/10 stroke-fd-primary strokeLinecap strokeLinejoin strokeWidth strong style styles success supported supposed sure svg switch switcher sync system t tab tabIndex table tabs tabsRef tag tagName tags target text text-(--callout-color) text-[0.8125rem] text-[0.8125rem]/5 text-[0.9375rem] text-[10px] text-center text-fd-accent-foreground text-fd-card text-fd-card-foreground text-fd-foreground/80 text-fd-muted-foreground text-fd-muted-foreground/50 text-fd-popover-foreground text-fd-popover-foreground/80 text-fd-primary text-fd-primary-foreground text-fd-primary/50 text-fd-secondary-foreground text-lg text-nowrap text-sm text-start text-xs text/plain textAnchor textContent that the their theme themeAriaLabels themeSwitch themeSwitchEnabled themes then this throw thumbBox tier timerRef tip title to toc tocInfo toolbar top top-0 top-1/2 top-2.5 top-3 top-4 touch transform transition-[clip-path] transition-[height] transition-[opacity,offset-distance] transition-[width,height] transition-all transition-colors transition-opacity transition-transform translationKeys translations translations/keys.json transparent tree trigger true truncate try type typeof types unchanged undefined underline underlying understand unified unist-util-visit unknown unnecessarily update updateAnchor updates upperX url urls us usage use useCopyButton useDocsSearch useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange usePathname useProps useRef useRouter useSearchContext useSidebar useState useSyncExternalStore useTOCItems useTabsGroups useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visible visit vite void w w-(--radix-popover-trigger-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces width will window with without work wrap wrap-anywhere wrapElement wrapInSuspense wrapped x x1 x2 xmlns y y1 y2 you your z-2 z-40 z-50 zoom zoomImg zoomMargin");
|
|
@@ -9,6 +9,9 @@ export type Translations = {
|
|
|
9
9
|
"Close Sidebar(aria-label)": string;
|
|
10
10
|
"Close Sidebar(sidebar)(aria-label)": string;
|
|
11
11
|
"Collapse Sidebar(sidebar)(aria-label)": string;
|
|
12
|
+
"Copied Anchor Link(heading anchor)(aria-label)": string;
|
|
13
|
+
"Copied Link(accordion)(aria-label)": string;
|
|
14
|
+
"Copied Markdown(page actions)": string;
|
|
12
15
|
"Copied Text(code block)(aria-label)": string;
|
|
13
16
|
"Copy Anchor Link(heading anchor)(aria-label)": string;
|
|
14
17
|
"Copy Link(accordion)(aria-label)": string;
|
|
@@ -9,6 +9,9 @@ var keys_default = [
|
|
|
9
9
|
"Close Sidebar(aria-label)",
|
|
10
10
|
"Close Sidebar(sidebar)(aria-label)",
|
|
11
11
|
"Collapse Sidebar(sidebar)(aria-label)",
|
|
12
|
+
"Copied Anchor Link(heading anchor)(aria-label)",
|
|
13
|
+
"Copied Link(accordion)(aria-label)",
|
|
14
|
+
"Copied Markdown(page actions)",
|
|
12
15
|
"Copied Text(code block)(aria-label)",
|
|
13
16
|
"Copy Anchor Link(heading anchor)(aria-label)",
|
|
14
17
|
"Copy Link(accordion)(aria-label)",
|
|
@@ -53,15 +53,18 @@ function CopyButton({ id }) {
|
|
|
53
53
|
url.hash = id;
|
|
54
54
|
return navigator.clipboard.writeText(url.toString());
|
|
55
55
|
});
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
57
57
|
type: "button",
|
|
58
|
-
"aria-
|
|
58
|
+
"aria-live": "polite",
|
|
59
59
|
className: cn(buttonVariants({
|
|
60
60
|
variant: "ghost",
|
|
61
61
|
className: "text-fd-muted-foreground me-2"
|
|
62
62
|
})),
|
|
63
63
|
onClick,
|
|
64
|
-
children: checked ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsx(LinkIcon, { className: "size-3.5" })
|
|
64
|
+
children: [checked ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsx(LinkIcon, { className: "size-3.5" }), /* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: "sr-only",
|
|
66
|
+
children: checked ? t("Copied Link", { note: "aria-label" }) : t("Copy Link", { note: "aria-label" })
|
|
67
|
+
})]
|
|
65
68
|
});
|
|
66
69
|
}
|
|
67
70
|
//#endregion
|
|
@@ -74,19 +74,22 @@ function CopyButton({ className, containerRef, ...props }) {
|
|
|
74
74
|
clone.querySelectorAll(".nd-copy-ignore").forEach((node) => {
|
|
75
75
|
node.replaceWith("\n");
|
|
76
76
|
});
|
|
77
|
-
navigator.clipboard.writeText(clone.textContent ?? "");
|
|
77
|
+
return navigator.clipboard.writeText(clone.textContent ?? "");
|
|
78
78
|
});
|
|
79
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
80
80
|
type: "button",
|
|
81
81
|
"data-checked": checked || void 0,
|
|
82
82
|
className: cn(buttonVariants({
|
|
83
83
|
className: "hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground",
|
|
84
84
|
size: "icon-xs"
|
|
85
85
|
}), className),
|
|
86
|
-
"aria-
|
|
86
|
+
"aria-live": "polite",
|
|
87
87
|
onClick,
|
|
88
88
|
...props,
|
|
89
|
-
children: checked ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Clipboard, {})
|
|
89
|
+
children: [checked ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Clipboard, {}), /* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "sr-only",
|
|
91
|
+
children: checked ? t("Copied Text", { note: "aria-label" }) : t("Copy Text", { note: "aria-label" })
|
|
92
|
+
})]
|
|
90
93
|
});
|
|
91
94
|
}
|
|
92
95
|
function CodeBlockTabs({ ref, ...props }) {
|
|
@@ -143,6 +143,10 @@ function SearchDialogInput(props) {
|
|
|
143
143
|
const t = useTranslations({ note: "search dialog" });
|
|
144
144
|
const { search, onSearchChange } = useSearch();
|
|
145
145
|
return /* @__PURE__ */ jsx("input", {
|
|
146
|
+
role: "combobox",
|
|
147
|
+
"aria-label": t("Search"),
|
|
148
|
+
"aria-autocomplete": "list",
|
|
149
|
+
"aria-controls": "fd-search-list",
|
|
146
150
|
...props,
|
|
147
151
|
value: search,
|
|
148
152
|
onChange: (e) => onSearchChange(e.target.value),
|
|
@@ -191,6 +195,7 @@ function SearchDialogContent({ children, ...props }) {
|
|
|
191
195
|
});
|
|
192
196
|
}
|
|
193
197
|
function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div", {
|
|
198
|
+
role: "status",
|
|
194
199
|
className: "py-12 text-center text-sm text-fd-muted-foreground",
|
|
195
200
|
children: /* @__PURE__ */ jsx(T, {
|
|
196
201
|
text: "No results found",
|
|
@@ -198,6 +203,7 @@ function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div
|
|
|
198
203
|
})
|
|
199
204
|
}), Item = (props) => /* @__PURE__ */ jsx(SearchDialogListItem, { ...props }), ...props }) {
|
|
200
205
|
const ref = useRef(null);
|
|
206
|
+
const t = useTranslations({ note: "search dialog" });
|
|
201
207
|
const { onSelect } = useSearch();
|
|
202
208
|
const [active, setActive] = useState(() => items && items.length > 0 ? items[0].id : null);
|
|
203
209
|
const onKey = useEffectEvent((e) => {
|
|
@@ -232,14 +238,24 @@ function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div
|
|
|
232
238
|
};
|
|
233
239
|
}, []);
|
|
234
240
|
useOnChange(items, () => {
|
|
235
|
-
|
|
241
|
+
setActive(items?.[0]?.id ?? null);
|
|
236
242
|
});
|
|
243
|
+
useEffect(() => {
|
|
244
|
+
const input = ref.current?.closest("[role=\"dialog\"]")?.querySelector("[role=\"combobox\"]");
|
|
245
|
+
if (!input) return;
|
|
246
|
+
input.setAttribute("aria-expanded", String(active !== null));
|
|
247
|
+
if (active !== null) input.setAttribute("aria-activedescendant", `fd-search-option-${active}`);
|
|
248
|
+
else input.removeAttribute("aria-activedescendant");
|
|
249
|
+
}, [active]);
|
|
237
250
|
return /* @__PURE__ */ jsx("div", {
|
|
238
251
|
...props,
|
|
239
252
|
ref,
|
|
240
253
|
"data-empty": items === null,
|
|
241
254
|
className: cn("overflow-hidden h-(--fd-animated-height) transition-[height]", props.className),
|
|
242
255
|
children: /* @__PURE__ */ jsx("div", {
|
|
256
|
+
id: "fd-search-list",
|
|
257
|
+
role: items?.length ? "listbox" : void 0,
|
|
258
|
+
"aria-label": items?.length ? t("Search") : void 0,
|
|
243
259
|
className: cn("w-full flex flex-col overflow-y-auto max-h-[460px] p-1", !items && "hidden"),
|
|
244
260
|
children: /* @__PURE__ */ jsxs(ListContext, {
|
|
245
261
|
value: useMemo(() => ({
|
|
@@ -278,6 +294,9 @@ function SearchDialogListItem({ item, className, children, renderMarkdown = (s)
|
|
|
278
294
|
] });
|
|
279
295
|
return /* @__PURE__ */ jsx("button", {
|
|
280
296
|
type: "button",
|
|
297
|
+
id: `fd-search-option-${item.id}`,
|
|
298
|
+
role: "option",
|
|
299
|
+
tabIndex: -1,
|
|
281
300
|
ref: useCallback((element) => {
|
|
282
301
|
if (active && element) scrollIntoView(element, {
|
|
283
302
|
scrollMode: "if-needed",
|
|
@@ -23,14 +23,17 @@ function Heading({ as, ...props }) {
|
|
|
23
23
|
"data-card": "",
|
|
24
24
|
href: `#${props.id}`,
|
|
25
25
|
children: props.children
|
|
26
|
-
}), /* @__PURE__ */
|
|
27
|
-
"aria-
|
|
26
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
27
|
+
"aria-live": "polite",
|
|
28
28
|
className: cn(buttonVariants({
|
|
29
29
|
variant: "ghost",
|
|
30
30
|
size: "icon-xs"
|
|
31
31
|
}), "not-prose shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover/heading:opacity-100"),
|
|
32
32
|
onClick: onCopy,
|
|
33
|
-
children: isChecked ? /* @__PURE__ */ jsx(CopyCheckIcon, {}) : /* @__PURE__ */ jsx(LinkIcon, {})
|
|
33
|
+
children: [isChecked ? /* @__PURE__ */ jsx(CopyCheckIcon, {}) : /* @__PURE__ */ jsx(LinkIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: "sr-only",
|
|
35
|
+
children: isChecked ? t("Copied Anchor Link", { note: "aria-label" }) : t("Copy Anchor Link", { note: "aria-label" })
|
|
36
|
+
})]
|
|
34
37
|
})]
|
|
35
38
|
});
|
|
36
39
|
}
|
|
@@ -8,6 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { ChevronDown, ExternalLink } from "lucide-react";
|
|
9
9
|
import { createContext, use, useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import { useTranslations } from "@fuma-translate/react";
|
|
11
|
+
import { flushSync } from "react-dom";
|
|
11
12
|
import { useOnChange } from "fumadocs-core/utils/use-on-change";
|
|
12
13
|
import { useMediaQuery } from "fumadocs-core/utils/use-media-query";
|
|
13
14
|
import { Presence } from "@radix-ui/react-presence";
|
|
@@ -257,9 +258,13 @@ function SidebarCollapseTrigger(props) {
|
|
|
257
258
|
return /* @__PURE__ */ jsx("button", {
|
|
258
259
|
type: "button",
|
|
259
260
|
"aria-label": t("Collapse Sidebar", { note: "aria-label" }),
|
|
261
|
+
"aria-controls": "nd-sidebar",
|
|
262
|
+
"aria-expanded": !collapsed,
|
|
260
263
|
"data-collapsed": collapsed,
|
|
261
|
-
onClick: () => {
|
|
262
|
-
|
|
264
|
+
onClick: (e) => {
|
|
265
|
+
const button = e.currentTarget;
|
|
266
|
+
flushSync(() => setCollapsed((prev) => !prev));
|
|
267
|
+
if (button.matches("[inert] *")) document.querySelector("[aria-controls=\"nd-sidebar\"]:not([inert] *)")?.focus();
|
|
263
268
|
},
|
|
264
269
|
...props,
|
|
265
270
|
children: props.children
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TOCEmpty } from "./default.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import * as Primitive from "fumadocs-core/toc";
|
|
4
|
+
declare namespace block_d_exports {
|
|
5
|
+
export { TOCEmpty, TOCItem, TOCItems, TOCItemsProps };
|
|
6
|
+
}
|
|
7
|
+
export type TOCItemsProps = ComponentProps<'div'>;
|
|
8
|
+
export declare function TOCItems({ ref, className, children, ...props }: TOCItemsProps): import("react").JSX.Element;
|
|
9
|
+
export declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
|
|
10
|
+
item: Primitive.TOCItemType;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TOCEmpty, block_d_exports };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
import { mergeRefs } from "../../utils/merge-refs.js";
|
|
5
|
+
import { TOCEmpty } from "./default.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { useEffect, useRef } from "react";
|
|
8
|
+
import * as Primitive from "fumadocs-core/toc";
|
|
9
|
+
//#region src/components/toc/block.tsx
|
|
10
|
+
var block_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
+
TOCEmpty: () => TOCEmpty,
|
|
12
|
+
TOCItem: () => TOCItem,
|
|
13
|
+
TOCItems: () => TOCItems
|
|
14
|
+
});
|
|
15
|
+
function TOCItems({ ref, className, children, ...props }) {
|
|
16
|
+
const containerRef = useRef(null);
|
|
17
|
+
const blockRef = useRef(null);
|
|
18
|
+
const tocInfo = Primitive.useTOC();
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const container = containerRef.current;
|
|
21
|
+
const block = blockRef.current;
|
|
22
|
+
if (!container || !block) return;
|
|
23
|
+
const positions = /* @__PURE__ */ new Map();
|
|
24
|
+
let height = 0;
|
|
25
|
+
const update = (items) => {
|
|
26
|
+
let top = -1;
|
|
27
|
+
let bottom = -1;
|
|
28
|
+
for (const item of items) {
|
|
29
|
+
if (!item.active) continue;
|
|
30
|
+
const pos = positions.get(item.original.url);
|
|
31
|
+
if (!pos) continue;
|
|
32
|
+
if (top === -1) top = pos[0];
|
|
33
|
+
bottom = pos[1];
|
|
34
|
+
}
|
|
35
|
+
if (top !== -1) block.style.clipPath = `inset(${top}px 0 ${height - bottom}px round 8px)`;
|
|
36
|
+
};
|
|
37
|
+
const observer = new ResizeObserver(() => {
|
|
38
|
+
positions.clear();
|
|
39
|
+
for (const anchor of container.getElementsByTagName("a")) {
|
|
40
|
+
const href = anchor.getAttribute("href");
|
|
41
|
+
if (href) positions.set(href, [anchor.offsetTop, anchor.offsetTop + anchor.offsetHeight]);
|
|
42
|
+
}
|
|
43
|
+
height = container.clientHeight;
|
|
44
|
+
update(tocInfo.get());
|
|
45
|
+
});
|
|
46
|
+
observer.observe(container);
|
|
47
|
+
tocInfo.listen(update);
|
|
48
|
+
return () => {
|
|
49
|
+
observer.disconnect();
|
|
50
|
+
tocInfo.unlisten(update);
|
|
51
|
+
};
|
|
52
|
+
}, [tocInfo]);
|
|
53
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
54
|
+
ref: mergeRefs(containerRef, ref),
|
|
55
|
+
className: cn("relative flex flex-col", className),
|
|
56
|
+
...props,
|
|
57
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
58
|
+
ref: blockRef,
|
|
59
|
+
className: "absolute inset-0 bg-fd-primary/10 [clip-path:inset(0_0_100%)] transition-[clip-path] duration-300 ease-out"
|
|
60
|
+
}), children]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function getItemOffset(depth) {
|
|
64
|
+
if (depth <= 2) return 8;
|
|
65
|
+
if (depth === 3) return 20;
|
|
66
|
+
return 32;
|
|
67
|
+
}
|
|
68
|
+
function TOCItem({ item, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsxs(Primitive.TOCItem, {
|
|
70
|
+
href: item.url,
|
|
71
|
+
...props,
|
|
72
|
+
className: cn("group prose relative py-1 pe-2 text-[0.8125rem]/5 scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere data-[active=true]:text-fd-primary", props.className),
|
|
73
|
+
style: {
|
|
74
|
+
paddingInlineStart: getItemOffset(item.depth),
|
|
75
|
+
...props.style
|
|
76
|
+
},
|
|
77
|
+
children: [item._step !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
78
|
+
className: "inline-flex size-4 me-1.5 items-center justify-center rounded-full align-text-bottom bg-fd-muted text-fd-muted-foreground font-mono font-medium text-[10px] transition-colors group-data-[active=true]:bg-fd-primary group-data-[active=true]:text-fd-primary-foreground",
|
|
79
|
+
children: item._step
|
|
80
|
+
}), item.title]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { TOCEmpty, TOCItem, TOCItems, block_exports };
|
|
@@ -47,7 +47,7 @@ function FooterItem({ item, index }) {
|
|
|
47
47
|
className: cn("inline-flex items-center gap-1.5 font-medium", index === 1 && "flex-row-reverse"),
|
|
48
48
|
children: [/* @__PURE__ */ jsx(Icon, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }), /* @__PURE__ */ jsx("p", { children: item.name })]
|
|
49
49
|
}), /* @__PURE__ */ jsx("p", {
|
|
50
|
-
className: "text-fd-muted-foreground
|
|
50
|
+
className: "text-fd-muted-foreground",
|
|
51
51
|
children: item.description ?? (index === 0 ? t("Previous Page") : t("Next Page"))
|
|
52
52
|
})]
|
|
53
53
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TOCItemsProps,
|
|
2
|
-
import { TOCItemsProps as TOCItemsProps$1,
|
|
1
|
+
import { TOCItemsProps, default_d_exports } from "../../../../components/toc/default.js";
|
|
2
|
+
import { TOCItemsProps as TOCItemsProps$1, block_d_exports } from "../../../../components/toc/block.js";
|
|
3
|
+
import { TOCItemsProps as TOCItemsProps$2, clerk_d_exports } from "../../../../components/toc/clerk.js";
|
|
3
4
|
import { TOCProviderProps as TOCProviderProps$1, index_d_exports } from "../../../../components/toc/index.js";
|
|
4
5
|
import { ComponentProps, ReactNode } from "react";
|
|
5
6
|
//#region src/layouts/docs/page/slots/toc.d.ts
|
|
@@ -17,10 +18,13 @@ export type TOCProps = {
|
|
|
17
18
|
footer?: ReactNode;
|
|
18
19
|
} & ({
|
|
19
20
|
style?: 'normal';
|
|
20
|
-
list?: TOCItemsProps
|
|
21
|
+
list?: TOCItemsProps;
|
|
21
22
|
} | {
|
|
22
23
|
style: 'clerk';
|
|
23
|
-
list?: TOCItemsProps;
|
|
24
|
+
list?: TOCItemsProps$2;
|
|
25
|
+
} | {
|
|
26
|
+
style: 'block';
|
|
27
|
+
list?: TOCItemsProps$1;
|
|
24
28
|
});
|
|
25
29
|
export declare function TOC({ container, header, footer, style, list }: TOCProps): import("react").JSX.Element;
|
|
26
30
|
export type TOCPopoverProps = {
|
|
@@ -37,10 +41,13 @@ export type TOCPopoverProps = {
|
|
|
37
41
|
footer?: ReactNode;
|
|
38
42
|
} & ({
|
|
39
43
|
style?: 'normal';
|
|
40
|
-
list?: TOCItemsProps
|
|
44
|
+
list?: TOCItemsProps;
|
|
41
45
|
} | {
|
|
42
46
|
style: 'clerk';
|
|
43
|
-
list?: TOCItemsProps;
|
|
47
|
+
list?: TOCItemsProps$2;
|
|
48
|
+
} | {
|
|
49
|
+
style: 'block';
|
|
50
|
+
list?: TOCItemsProps$1;
|
|
44
51
|
});
|
|
45
52
|
export declare function TOCPopover({ container, trigger, content, header, footer, style, list }: TOCPopoverProps): import("react").JSX.Element;
|
|
46
53
|
//#endregion
|
|
@@ -3,6 +3,7 @@ import { cn } from "../../../../utils/cn.js";
|
|
|
3
3
|
import { TOCProvider as TOCProvider$1, TOCScrollArea, useItems, useTOCItems } from "../../../../components/toc/index.js";
|
|
4
4
|
import { default_exports } from "../../../../components/toc/default.js";
|
|
5
5
|
import { clerk_exports } from "../../../../components/toc/clerk.js";
|
|
6
|
+
import { block_exports } from "../../../../components/toc/block.js";
|
|
6
7
|
import { useTreePath } from "../../../../contexts/tree.js";
|
|
7
8
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
|
|
8
9
|
import { useDocsLayout } from "../../client.js";
|
|
@@ -11,13 +12,18 @@ import { ChevronDown, Text } from "lucide-react";
|
|
|
11
12
|
import { createContext, use, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
|
|
12
13
|
import { useTranslations } from "@fuma-translate/react";
|
|
13
14
|
//#region src/layouts/docs/page/slots/toc.tsx
|
|
15
|
+
const variants = {
|
|
16
|
+
normal: default_exports,
|
|
17
|
+
clerk: clerk_exports,
|
|
18
|
+
block: block_exports
|
|
19
|
+
};
|
|
14
20
|
function TOCProvider(props) {
|
|
15
21
|
return /* @__PURE__ */ jsx(TOCProvider$1, { ...props });
|
|
16
22
|
}
|
|
17
23
|
function TOC({ container, header, footer, style = "normal", list }) {
|
|
18
24
|
const items = useTOCItems();
|
|
19
25
|
const t = useTranslations({ note: "table of contents" });
|
|
20
|
-
const { TOCItems, TOCEmpty, TOCItem } = style
|
|
26
|
+
const { TOCItems, TOCEmpty, TOCItem } = variants[style];
|
|
21
27
|
if (items.length === 0 && !header && !footer) return /* @__PURE__ */ jsx("div", {
|
|
22
28
|
id: "nd-toc-placeholder",
|
|
23
29
|
className: "hidden xl:layout:[--fd-toc-width:268px]"
|
|
@@ -47,7 +53,7 @@ function TOCPopover({ container, trigger, content, header, footer, style = "norm
|
|
|
47
53
|
const ref = useRef(null);
|
|
48
54
|
const [open, setOpen] = useState(false);
|
|
49
55
|
const { isNavTransparent } = useDocsLayout();
|
|
50
|
-
const { TOCItems, TOCItem, TOCEmpty } = style
|
|
56
|
+
const { TOCItems, TOCItem, TOCEmpty } = variants[style];
|
|
51
57
|
const onClickOutside = useEffectEvent((e) => {
|
|
52
58
|
if (!open || !(e.target instanceof HTMLElement)) return;
|
|
53
59
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -152,6 +152,7 @@ function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
|
152
152
|
ref: mergeRefs(ref, refProp, asideRef),
|
|
153
153
|
"data-collapsed": collapsed,
|
|
154
154
|
"data-hovered": collapsed && hovered,
|
|
155
|
+
inert: collapsed && !hovered,
|
|
155
156
|
className: cn("absolute flex flex-col w-full inset-s-0 inset-y-0 items-end bg-fd-card text-sm border-e duration-250 *:w-(--fd-sidebar-width)", collapsed && ["inset-y-2 rounded-xl transition-transform border w-(--fd-sidebar-width)", hovered ? "shadow-lg translate-x-2 rtl:-translate-x-2" : "-translate-x-(--fd-sidebar-width) rtl:translate-x-full"], ref.current && ref.current.getAttribute("data-collapsed") === "true" !== collapsed && "transition-[width,inset-block,translate,background-color]", className),
|
|
156
157
|
...props,
|
|
157
158
|
...rest,
|
|
@@ -160,6 +161,7 @@ function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
|
160
161
|
}), /* @__PURE__ */ jsxs("div", {
|
|
161
162
|
"data-sidebar-panel": "",
|
|
162
163
|
className: cn("fixed flex top-[calc(--spacing(4)+var(--fd-docs-row-3))] inset-s-4 shadow-lg transition-opacity rounded-xl p-0.5 border bg-fd-muted text-fd-muted-foreground z-10", (!collapsed || hovered) && "pointer-events-none opacity-0"),
|
|
164
|
+
inert: !collapsed || hovered,
|
|
163
165
|
children: [/* @__PURE__ */ jsx(SidebarCollapseTrigger$1, {
|
|
164
166
|
className: cn(buttonVariants({
|
|
165
167
|
variant: "ghost",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TOCItemsProps,
|
|
2
|
-
import { TOCItemsProps as TOCItemsProps$1,
|
|
1
|
+
import { TOCItemsProps, default_d_exports } from "../../../../components/toc/default.js";
|
|
2
|
+
import { TOCItemsProps as TOCItemsProps$1, block_d_exports } from "../../../../components/toc/block.js";
|
|
3
|
+
import { TOCItemsProps as TOCItemsProps$2, clerk_d_exports } from "../../../../components/toc/clerk.js";
|
|
3
4
|
import { TOCProvider as TOCProvider$1, TOCProviderProps as TOCProviderProps$1, index_d_exports } from "../../../../components/toc/index.js";
|
|
4
5
|
import { ComponentProps, ReactNode } from "react";
|
|
5
6
|
//#region src/layouts/flux/page/slots/toc.d.ts
|
|
@@ -19,10 +20,13 @@ export type TOCProps = {
|
|
|
19
20
|
footer?: ReactNode;
|
|
20
21
|
} & ({
|
|
21
22
|
style?: 'normal';
|
|
22
|
-
list?: TOCItemsProps
|
|
23
|
+
list?: TOCItemsProps;
|
|
23
24
|
} | {
|
|
24
25
|
style: 'clerk';
|
|
25
|
-
list?: TOCItemsProps;
|
|
26
|
+
list?: TOCItemsProps$2;
|
|
27
|
+
} | {
|
|
28
|
+
style: 'block';
|
|
29
|
+
list?: TOCItemsProps$1;
|
|
26
30
|
});
|
|
27
31
|
export declare function TOC({ container, trigger, content, header, footer, style, list }: TOCProps): import("react").JSX.Element | undefined;
|
|
28
32
|
//#endregion
|
|
@@ -3,6 +3,7 @@ import { cn } from "../../../../utils/cn.js";
|
|
|
3
3
|
import { TOCScrollArea, toc_exports, useItems, useTOCItems } from "../../../../components/toc/index.js";
|
|
4
4
|
import { default_exports } from "../../../../components/toc/default.js";
|
|
5
5
|
import { clerk_exports } from "../../../../components/toc/clerk.js";
|
|
6
|
+
import { block_exports } from "../../../../components/toc/block.js";
|
|
6
7
|
import { useTreePath } from "../../../../contexts/tree.js";
|
|
7
8
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -13,10 +14,15 @@ import { createPortal } from "react-dom";
|
|
|
13
14
|
import { AnimatePresence, motion } from "motion/react";
|
|
14
15
|
//#region src/layouts/flux/page/slots/toc.tsx
|
|
15
16
|
const TocPopoverContext = createContext(null);
|
|
17
|
+
const variants = {
|
|
18
|
+
normal: default_exports,
|
|
19
|
+
clerk: clerk_exports,
|
|
20
|
+
block: block_exports
|
|
21
|
+
};
|
|
16
22
|
const { TOCProvider } = toc_exports;
|
|
17
23
|
function TOC({ container, trigger, content, header, footer, style = "normal", list }) {
|
|
18
24
|
const items = useTOCItems();
|
|
19
|
-
const { TOCItems, TOCEmpty, TOCItem } = style
|
|
25
|
+
const { TOCItems, TOCEmpty, TOCItem } = variants[style];
|
|
20
26
|
if (items.length === 0 && !header && !footer) return;
|
|
21
27
|
return /* @__PURE__ */ jsxs(PageTOCPopover, {
|
|
22
28
|
...container,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TOCItemsProps,
|
|
2
|
-
import { TOCItemsProps as TOCItemsProps$1,
|
|
1
|
+
import { TOCItemsProps, default_d_exports } from "../../../../components/toc/default.js";
|
|
2
|
+
import { TOCItemsProps as TOCItemsProps$1, block_d_exports } from "../../../../components/toc/block.js";
|
|
3
|
+
import { TOCItemsProps as TOCItemsProps$2, clerk_d_exports } from "../../../../components/toc/clerk.js";
|
|
3
4
|
import { TOCProviderProps as TOCProviderProps$1, index_d_exports } from "../../../../components/toc/index.js";
|
|
4
5
|
import { ComponentProps, ReactNode } from "react";
|
|
5
6
|
//#region src/layouts/notebook/page/slots/toc.d.ts
|
|
@@ -17,10 +18,13 @@ export type TOCProps = {
|
|
|
17
18
|
footer?: ReactNode;
|
|
18
19
|
} & ({
|
|
19
20
|
style?: 'normal';
|
|
20
|
-
list?: TOCItemsProps
|
|
21
|
+
list?: TOCItemsProps;
|
|
21
22
|
} | {
|
|
22
23
|
style: 'clerk';
|
|
23
|
-
list?: TOCItemsProps;
|
|
24
|
+
list?: TOCItemsProps$2;
|
|
25
|
+
} | {
|
|
26
|
+
style: 'block';
|
|
27
|
+
list?: TOCItemsProps$1;
|
|
24
28
|
});
|
|
25
29
|
export declare function TOC({ container, header, footer, style, list }: TOCProps): import("react").JSX.Element;
|
|
26
30
|
export type TOCPopoverProps = {
|
|
@@ -37,10 +41,13 @@ export type TOCPopoverProps = {
|
|
|
37
41
|
footer?: ReactNode;
|
|
38
42
|
} & ({
|
|
39
43
|
style?: 'normal';
|
|
40
|
-
list?: TOCItemsProps
|
|
44
|
+
list?: TOCItemsProps;
|
|
41
45
|
} | {
|
|
42
46
|
style: 'clerk';
|
|
43
|
-
list?: TOCItemsProps;
|
|
47
|
+
list?: TOCItemsProps$2;
|
|
48
|
+
} | {
|
|
49
|
+
style: 'block';
|
|
50
|
+
list?: TOCItemsProps$1;
|
|
44
51
|
});
|
|
45
52
|
export declare function TOCPopover({ container, trigger, content, header, footer, style, list }: TOCPopoverProps): import("react").JSX.Element;
|
|
46
53
|
//#endregion
|
|
@@ -3,6 +3,7 @@ import { cn } from "../../../../utils/cn.js";
|
|
|
3
3
|
import { TOCProvider as TOCProvider$1, TOCScrollArea, useItems, useTOCItems } from "../../../../components/toc/index.js";
|
|
4
4
|
import { default_exports } from "../../../../components/toc/default.js";
|
|
5
5
|
import { clerk_exports } from "../../../../components/toc/clerk.js";
|
|
6
|
+
import { block_exports } from "../../../../components/toc/block.js";
|
|
6
7
|
import { useTreePath } from "../../../../contexts/tree.js";
|
|
7
8
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
|
|
8
9
|
import { useNotebookLayout } from "../../client.js";
|
|
@@ -11,13 +12,18 @@ import { ChevronDown, Text } from "lucide-react";
|
|
|
11
12
|
import { createContext, use, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
|
|
12
13
|
import { useTranslations } from "@fuma-translate/react";
|
|
13
14
|
//#region src/layouts/notebook/page/slots/toc.tsx
|
|
15
|
+
const variants = {
|
|
16
|
+
normal: default_exports,
|
|
17
|
+
clerk: clerk_exports,
|
|
18
|
+
block: block_exports
|
|
19
|
+
};
|
|
14
20
|
function TOCProvider(props) {
|
|
15
21
|
return /* @__PURE__ */ jsx(TOCProvider$1, { ...props });
|
|
16
22
|
}
|
|
17
23
|
function TOC({ container, header, footer, style = "normal", list }) {
|
|
18
24
|
const items = useTOCItems();
|
|
19
25
|
const t = useTranslations({ note: "table of contents" });
|
|
20
|
-
const { TOCItems, TOCEmpty, TOCItem } = style
|
|
26
|
+
const { TOCItems, TOCEmpty, TOCItem } = variants[style];
|
|
21
27
|
if (items.length === 0 && !footer && !header) return /* @__PURE__ */ jsx("div", {
|
|
22
28
|
id: "nd-toc-placeholder",
|
|
23
29
|
className: "hidden xl:layout:[--fd-toc-width:268px]"
|
|
@@ -47,7 +53,7 @@ function TOCPopover({ container, trigger, content, header, footer, style = "norm
|
|
|
47
53
|
const ref = useRef(null);
|
|
48
54
|
const [open, setOpen] = useState(false);
|
|
49
55
|
const { isNavTransparent } = useNotebookLayout();
|
|
50
|
-
const { TOCItems, TOCItem, TOCEmpty } = style
|
|
56
|
+
const { TOCItems, TOCItem, TOCEmpty } = variants[style];
|
|
51
57
|
const onClickOutside = useEffectEvent((e) => {
|
|
52
58
|
if (!open || !(e.target instanceof HTMLElement)) return;
|
|
53
59
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -31,6 +31,7 @@ function MarkdownCopyButton({ markdownUrl: _markdownUrl, ...props }) {
|
|
|
31
31
|
});
|
|
32
32
|
return /* @__PURE__ */ jsxs("button", {
|
|
33
33
|
disabled: isLoading,
|
|
34
|
+
"aria-live": "polite",
|
|
34
35
|
onClick,
|
|
35
36
|
...props,
|
|
36
37
|
className: cn(buttonVariants({
|
|
@@ -38,7 +39,7 @@ function MarkdownCopyButton({ markdownUrl: _markdownUrl, ...props }) {
|
|
|
38
39
|
size: "sm",
|
|
39
40
|
className: "gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground"
|
|
40
41
|
}), props.className),
|
|
41
|
-
children: [checked ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Copy, {}), props.children ?? t("Copy Markdown")]
|
|
42
|
+
children: [checked ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Copy, {}), props.children ?? (checked ? t("Copied Markdown") : t("Copy Markdown"))]
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
/**
|
package/dist/style.css
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
--radius-lg: 0.5rem;
|
|
35
35
|
--radius-xl: 0.75rem;
|
|
36
36
|
--radius-2xl: 1rem;
|
|
37
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
37
38
|
--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
38
39
|
--blur-xs: 4px;
|
|
39
40
|
--blur-sm: 8px;
|
|
@@ -269,6 +270,17 @@
|
|
|
269
270
|
height: calc(var(--spacing) * 8);
|
|
270
271
|
border-radius: calc(infinity * 1px);
|
|
271
272
|
}
|
|
273
|
+
.sr-only {
|
|
274
|
+
position: absolute;
|
|
275
|
+
width: 1px;
|
|
276
|
+
height: 1px;
|
|
277
|
+
padding: 0;
|
|
278
|
+
margin: -1px;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
clip-path: inset(50%);
|
|
281
|
+
white-space: nowrap;
|
|
282
|
+
border-width: 0;
|
|
283
|
+
}
|
|
272
284
|
.fd-steps {
|
|
273
285
|
counter-reset: step;
|
|
274
286
|
position: relative;
|
|
@@ -490,6 +502,9 @@
|
|
|
490
502
|
.me-1 {
|
|
491
503
|
margin-inline-end: var(--spacing);
|
|
492
504
|
}
|
|
505
|
+
.me-1\.5 {
|
|
506
|
+
margin-inline-end: calc(var(--spacing) * 1.5);
|
|
507
|
+
}
|
|
493
508
|
.me-2 {
|
|
494
509
|
margin-inline-end: calc(var(--spacing) * 2);
|
|
495
510
|
}
|
|
@@ -1262,6 +1277,9 @@
|
|
|
1262
1277
|
.animate-pulse {
|
|
1263
1278
|
animation: var(--animate-pulse);
|
|
1264
1279
|
}
|
|
1280
|
+
.resize {
|
|
1281
|
+
resize: both;
|
|
1282
|
+
}
|
|
1265
1283
|
.scroll-m-4 {
|
|
1266
1284
|
scroll-margin: calc(var(--spacing) * 4);
|
|
1267
1285
|
}
|
|
@@ -1783,6 +1801,9 @@
|
|
|
1783
1801
|
.text-start {
|
|
1784
1802
|
text-align: start;
|
|
1785
1803
|
}
|
|
1804
|
+
.align-text-bottom {
|
|
1805
|
+
vertical-align: text-bottom;
|
|
1806
|
+
}
|
|
1786
1807
|
.font-mono {
|
|
1787
1808
|
font-family: var(--font-mono);
|
|
1788
1809
|
}
|
|
@@ -1794,6 +1815,10 @@
|
|
|
1794
1815
|
font-size: var(--text-6xl);
|
|
1795
1816
|
line-height: var(--tw-leading, var(--text-6xl--line-height));
|
|
1796
1817
|
}
|
|
1818
|
+
.text-\[0\.8125rem\]\/5 {
|
|
1819
|
+
font-size: 0.8125rem;
|
|
1820
|
+
line-height: calc(var(--spacing) * 5);
|
|
1821
|
+
}
|
|
1797
1822
|
.text-base {
|
|
1798
1823
|
font-size: var(--text-base);
|
|
1799
1824
|
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
@@ -1819,6 +1844,9 @@
|
|
|
1819
1844
|
.text-\[1\.75em\] {
|
|
1820
1845
|
font-size: 1.75em;
|
|
1821
1846
|
}
|
|
1847
|
+
.text-\[10px\] {
|
|
1848
|
+
font-size: 10px;
|
|
1849
|
+
}
|
|
1822
1850
|
.leading-none {
|
|
1823
1851
|
--tw-leading: 1;
|
|
1824
1852
|
line-height: 1;
|
|
@@ -2080,6 +2108,10 @@
|
|
|
2080
2108
|
--tw-duration: 400ms;
|
|
2081
2109
|
transition-duration: 400ms;
|
|
2082
2110
|
}
|
|
2111
|
+
.ease-out {
|
|
2112
|
+
--tw-ease: var(--ease-out);
|
|
2113
|
+
transition-timing-function: var(--ease-out);
|
|
2114
|
+
}
|
|
2083
2115
|
.outline-none {
|
|
2084
2116
|
--tw-outline-style: none;
|
|
2085
2117
|
outline-style: none;
|
|
@@ -2121,6 +2153,9 @@
|
|
|
2121
2153
|
.\[--row\:calc\(6\*var\(--spacing\)\)\] {
|
|
2122
2154
|
--row: calc(6 * var(--spacing));
|
|
2123
2155
|
}
|
|
2156
|
+
.\[clip-path\:inset\(0_0_100\%\)\] {
|
|
2157
|
+
clip-path: inset(0 0 100%);
|
|
2158
|
+
}
|
|
2124
2159
|
.\[grid-area\:header\] {
|
|
2125
2160
|
grid-area: header;
|
|
2126
2161
|
}
|
|
@@ -2217,6 +2252,9 @@
|
|
|
2217
2252
|
.group-data-\[active\=true\]\:bg-fd-primary:is(:where(.group)[data-active="true"] *) {
|
|
2218
2253
|
background-color: var(--color-fd-primary);
|
|
2219
2254
|
}
|
|
2255
|
+
.group-data-\[active\=true\]\:text-fd-primary-foreground:is(:where(.group)[data-active="true"] *) {
|
|
2256
|
+
color: var(--color-fd-primary-foreground);
|
|
2257
|
+
}
|
|
2220
2258
|
.group-data-\[state\=active\]\:bg-fd-primary:is(:where(.group)[data-state="active"] *) {
|
|
2221
2259
|
background-color: var(--color-fd-primary);
|
|
2222
2260
|
}
|
|
@@ -3351,6 +3389,10 @@ code.shiki:not(.not-fumadocs-code *) span {
|
|
|
3351
3389
|
syntax: "*";
|
|
3352
3390
|
inherits: false;
|
|
3353
3391
|
}
|
|
3392
|
+
@property --tw-ease {
|
|
3393
|
+
syntax: "*";
|
|
3394
|
+
inherits: false;
|
|
3395
|
+
}
|
|
3354
3396
|
@property --tw-content {
|
|
3355
3397
|
syntax: "*";
|
|
3356
3398
|
initial-value: "";
|
|
@@ -3624,6 +3666,7 @@ code.shiki:not(.not-fumadocs-code *) span {
|
|
|
3624
3666
|
--tw-backdrop-saturate: initial;
|
|
3625
3667
|
--tw-backdrop-sepia: initial;
|
|
3626
3668
|
--tw-duration: initial;
|
|
3669
|
+
--tw-ease: initial;
|
|
3627
3670
|
--tw-content: "";
|
|
3628
3671
|
--tw-gradient-position: initial;
|
|
3629
3672
|
--tw-gradient-from: #0000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "16.15.
|
|
3
|
+
"version": "16.15.15",
|
|
4
4
|
"description": "The Radix UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"./components/steps": "./dist/components/steps.js",
|
|
52
52
|
"./components/tabs": "./dist/components/tabs.js",
|
|
53
53
|
"./components/toc": "./dist/components/toc/index.js",
|
|
54
|
+
"./components/toc/block": "./dist/components/toc/block.js",
|
|
54
55
|
"./components/toc/clerk": "./dist/components/toc/clerk.js",
|
|
55
56
|
"./components/toc/default": "./dist/components/toc/default.js",
|
|
56
57
|
"./components/type-table": "./dist/components/type-table.js",
|
|
@@ -161,7 +162,7 @@
|
|
|
161
162
|
"unist-util-visit": "^5.1.0"
|
|
162
163
|
},
|
|
163
164
|
"devDependencies": {
|
|
164
|
-
"@fumadocs/base-ui": "16.15.
|
|
165
|
+
"@fumadocs/base-ui": "16.15.15",
|
|
165
166
|
"@fumadocs/cli": "1.7.0",
|
|
166
167
|
"@tailwindcss/cli": "^4.3.3",
|
|
167
168
|
"@tailwindcss/oxide": "^4.3.3",
|
|
@@ -172,7 +173,7 @@
|
|
|
172
173
|
"@types/react": "^19.3.0",
|
|
173
174
|
"@types/react-dom": "^19.3.0",
|
|
174
175
|
"fuma-cli": "^0.3.1",
|
|
175
|
-
"fumadocs-core": "16.15.
|
|
176
|
+
"fumadocs-core": "16.15.15",
|
|
176
177
|
"react-medium-image-zoom": "^5.4.9",
|
|
177
178
|
"tailwindcss": "^4.3.3",
|
|
178
179
|
"tsconfig": "0.0.0",
|
|
@@ -182,7 +183,7 @@
|
|
|
182
183
|
"peerDependencies": {
|
|
183
184
|
"@types/mdx": "*",
|
|
184
185
|
"@types/react": "*",
|
|
185
|
-
"fumadocs-core": "16.15.
|
|
186
|
+
"fumadocs-core": "16.15.15",
|
|
186
187
|
"next": "16.x.x",
|
|
187
188
|
"react": "^19.2.0",
|
|
188
189
|
"react-dom": "^19.2.0",
|