fumadocs-ui 16.10.1 → 16.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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-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-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: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 useDocsLayout useDocsPage useFooterItems useIsScrollTop useProvider useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] will xl:hidden 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-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-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: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 useDocsLayout useDocsPage useFooterItems useIsScrollTop useProvider useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:hidden xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 z-10 z-20 z-30");
@@ -1 +1 @@
1
- @source inline("!footer !isSelected !showItem *:col-start-1 *:max-w-[1285px] *:max-w-[900px] *:my-auto *:pointer-events-auto *: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 -me-1.5 -ms-1.5 -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 auto-cols-auto auto-rows-auto 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-fd-primary breadcrumb breadcrumbEnabled circleProps circumference clerk click collapseTrigger 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-[collapsed=false]:hidden 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-header-body data-header-tabs data-hovered data-sidebar-collapsed data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots delaySetOpen desktop duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList freezeUntil fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-toc-popover-height) h-10 h-14 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-2))] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-3))] has-data-[active=true]:text-fd-primary has-data-[collapsed=true]:md:flex hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none hoverDelay iconLinks including information inset-e-0 inset-y-2 instant isCollapseChanged isLayoutTabActive isNavTransparent isSelected isTop items-end justify-end layout-level layout:[--fd-header-height:--spacing(14)] lg:hidden lg:layout:[--fd-header-height:--spacing(24)] linkItems max max-h-[50vh] max-lg:flex max-lg:hidden max-md:flex max-md:hidden max-w-[240px] max-w-[380px] max-w-sm max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] maxTouchPoints mb-1.5 mb-3 mb-8 mb-auto md:gap-2 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mt-px mx-0.5 navEnabled navMode navTransparentMode navbar nd-notebook-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside ontouchstart overflow-x-clip pageCol pagination pb-1.5 pe-4 pointer-events-none popover previousCollapsed progress progressbar provided ps-2.5 pt-0.5 pt-12 pt-2 px-6 py-6 radius resolvedTabs restSvgProps rotate-180 rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate setPreviousCollapsed showItem showLayoutTabs sidebarCollapsible sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover text-[1.75em] text-end text-fd-foreground timeoutRef timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-(--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 useDocsPage useFooterItems useIsScrollTop useNotebookLayout useProvider w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] will xl:hidden xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 z-10 z-20");
1
+ @source inline("!footer !isSelected !showItem *:col-start-1 *:max-w-[1285px] *:max-w-[900px] *:my-auto *:pointer-events-auto *: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 -me-1.5 -ms-1.5 -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 auto-cols-auto auto-rows-auto 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-fd-primary breadcrumb breadcrumbEnabled circleProps circumference clerk click collapseTrigger 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-[collapsed=false]:hidden 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-header-body data-header-tabs data-hovered data-sidebar-collapsed data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots delaySetOpen desktop duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList freezeUntil fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-toc-popover-height) h-10 h-14 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-2))] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-3))] has-data-[active=true]:text-fd-primary has-data-[collapsed=true]:md:flex hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none hoverDelay iconLinks including information inset-e-0 inset-y-2 instant isCollapseChanged isLayoutTabActive isNavTransparent isSelected isTop items-end justify-end layout-level layout:[--fd-header-height:--spacing(14)] lg:hidden lg:layout:[--fd-header-height:--spacing(24)] linkItems max max-h-[50vh] max-lg:flex max-lg:hidden max-md:flex max-md:hidden max-w-[240px] max-w-[380px] max-w-sm max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] maxTouchPoints mb-1.5 mb-3 mb-8 mb-auto md:gap-2 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mt-px mx-0.5 navEnabled navMode navTransparentMode navbar nd-notebook-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside ontouchstart overflow-x-clip pageCol pagination pb-1.5 pe-4 pointer-events-none popover previousCollapsed progress progressbar provided ps-2.5 pt-0.5 pt-12 pt-2 px-6 py-6 radius resolvedTabs restSvgProps rotate-180 rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate setPreviousCollapsed showItem showLayoutTabs sidebarCollapsible sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover text-[1.75em] text-end text-fd-foreground timeoutRef timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-(--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 useDocsPage useFooterItems useIsScrollTop useNotebookLayout useProvider w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:hidden xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 z-10 z-20");
@@ -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 algolia align alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allowedMode alphabet always an anchor and animate-pulse animation another application/json areaRef aria-describedby 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 baseProps baseSlots baseUrl based behaviour 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-fd-foreground/10 border-l border-none border-s border-t border-transparent borderBottom bottom bottom-0 bottom-1.5 boundary buffer button buttonVariants by cache cached can 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 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 defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay 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 duration-100 duration-200 duration-300 duration-400 element else empty empty:hidden enabled encoded end-2 endIdx endpoint 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 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 first:pt-0 fixed flex flex-1 flex-col flex-row flex-wrap flexDirection 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 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 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 guides h h-(--fd-animated-height) h-(--radix-navigation-menu-viewport-height) h-1.5 h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 handle has-focus-visible:bg-fd-accent hash hast have header headers heading height hidden highlight highlighter hints horizontal hover:bg-fd-accent hover:bg-fd-accent/80 hover:bg-fd-primary/80 hover:text-fd-accent-foreground hovered href html i i18n i18nProvider icon icon-sm icon-xs iconClass id idea idx if if-needed 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 instanceof instead integration interface intersect invisible is isActive isFirst isLast isLoading isTabActive isUp it item itemLineLengths itemVariants items items-center js justify-between justify-center keepBackground key keydown keys l l0 l1 l2 label lang language languageSelect languages last:pb-0 last:rounded-b-xl layer layout leading-none leaving left-0 left-1/2 length let 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 namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new next next-themes next/og node nodes none 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 onCompute onCopy onKey onOpenChange onOpenChangeCallback onPointerEnter onPointerLeave onPointerMove onPrint onSearchChange onSearchChangeCallback onSelect onSelectCallback onTagChange onTagChangeCallback onValueChange only opacity-(--opacity,0) opacity-0 open option optional options or orama-cloud order orientation origin-(--radix-popover-content-transform-origin) origin-[top_center] origin-center original out outline outline-none output overflow-auto overflow-hidden overflow-x-auto overflow-y-auto override overscroll-contain own owner p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 performing persist persistent placeholder placeholder:text-fd-muted-foreground please pointerType positions possible powered pre pre-rendering prefetch present prev previous previousRef primary primaryColor primaryTextColor promise promises prop props prose prose-no-margin provide provider ps-1 ps-2 ps-3 ps-4 ps-6 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 react react-hooks/rules-of-hooks react-medium-image-zoom 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 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 setComputed setHover setLoading setMounted setOpen setOpenSearch setSvg setTag setValue shadow-2xl shadow-black/50 shadow-lg shadow-md shadow-sm shiki shikiOptions shortcuts 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 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 the their theme themeAriaLabels themeSwitch themeSwitchEnabled themes 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 updateAnchor updates upperX url urls usage use useCopyButton useDocsSearch useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange usePathname useProps useRef useRouter useSearchContext useSidebar useState useTOCItems useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visit 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 when where while white whitespace-nowrap whitespaces width window with 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 [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 alphabet always an anchor and animate-pulse animation another application/json areaRef aria-describedby 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 baseProps baseSlots baseUrl based behaviour 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 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 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 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 duration-100 duration-200 duration-300 duration-400 element else empty empty:hidden enabled encoded end-2 endIdx endpoint 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 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 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 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 guides h h-(--fd-animated-height) h-(--radix-navigation-menu-viewport-height) h-1.5 h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 handle has-focus-visible:bg-fd-accent hash hast have header headers heading height hidden highlight highlighter hints horizontal hover:bg-fd-accent hover:bg-fd-accent/80 hover:bg-fd-primary/80 hover:text-fd-accent-foreground hovered href html i i18n i18nProvider icon icon-sm icon-xs iconClass id idea idx if if-needed 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 instanceof instead integration interface intersect invisible is isActive isFirst isLast isLoading isTabActive isUp it item itemLineLengths itemVariants items items-center js justify-between justify-center keepBackground key keydown keys l l0 l1 l2 label lang language languageSelect languages last:rounded-b-xl layer layout leading-none leaving left-0 left-1/2 length let 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 namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new next next-themes next/og node nodes none 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 only opacity-(--opacity,0) opacity-0 open option optional options or oramaCloudClient order orientation 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 p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 performing persist persistent placeholder placeholder:text-fd-muted-foreground please pointerType positions possible powered pre pre-rendering prefetch present prev previous previousRef primary primaryColor primaryTextColor promise promises 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-hooks/rules-of-hooks react-medium-image-zoom 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 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 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 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 the their theme themeAriaLabels themeSwitch themeSwitchEnabled themes 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 usage use useCopyButton useDocsSearch useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange usePathname useProps useRef useRouter useSearchContext useSidebar useState useTOCItems useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visit 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 when where while white whitespace-nowrap whitespaces width will window with 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");
@@ -5,16 +5,16 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useMemo, useState } from "react";
6
6
  import { useOnChange } from "fumadocs-core/utils/use-on-change";
7
7
  import { useDocsSearch } from "fumadocs-core/search/client";
8
+ import { algoliaClient } from "fumadocs-core/search/client/algolia";
8
9
  //#region src/components/dialog/search-algolia.tsx
9
10
  function AlgoliaSearchDialog({ searchOptions, tags = [], defaultTag, showAlgolia = false, allowClear = false, links = [], footer, ...props }) {
10
11
  const [tag, setTag] = useState(defaultTag);
11
12
  const { locale } = useI18n();
12
- const { search, setSearch, query } = useDocsSearch({
13
- type: "algolia",
13
+ const { search, setSearch, query } = useDocsSearch({ client: algoliaClient({
14
14
  tag,
15
15
  locale,
16
16
  ...searchOptions
17
- });
17
+ }) });
18
18
  const defaultItems = useMemo(() => {
19
19
  if (links.length === 0) return null;
20
20
  return links.map(([name, link]) => ({
@@ -3,11 +3,9 @@ import { ReactNode } from "react";
3
3
 
4
4
  //#region src/components/dialog/search-default.d.ts
5
5
  interface DefaultSearchDialogProps extends SharedProps {
6
+ /** @deprecated re-create the dialog instead for other clients, see https://fumadocs.dev/docs/search/orama */
7
+ type?: 'static';
6
8
  links?: SearchLink[];
7
- /**
8
- * @defaultValue 'fetch'
9
- */
10
- type?: 'fetch' | 'static';
11
9
  defaultTag?: string;
12
10
  tags?: TagItem[];
13
11
  /**
@@ -27,11 +25,11 @@ interface DefaultSearchDialogProps extends SharedProps {
27
25
  allowClear?: boolean;
28
26
  }
29
27
  declare function DefaultSearchDialog({
28
+ type,
30
29
  defaultTag,
31
30
  tags,
32
31
  api,
33
32
  delayMs,
34
- type,
35
33
  allowClear,
36
34
  links,
37
35
  footer,
@@ -2,24 +2,28 @@
2
2
  import { useI18n } from "../../contexts/i18n.js";
3
3
  import { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogOverlay, TagsList, TagsListItem } from "./search.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { useMemo, useState } from "react";
5
+ import { use, useMemo, useState } from "react";
6
6
  import { useOnChange } from "fumadocs-core/utils/use-on-change";
7
7
  import { useDocsSearch } from "fumadocs-core/search/client";
8
+ import { fetchClient } from "fumadocs-core/search/client/fetch";
8
9
  //#region src/components/dialog/search-default.tsx
9
- function DefaultSearchDialog({ defaultTag, tags = [], api, delayMs, type = "fetch", allowClear = false, links = [], footer, ...props }) {
10
+ let STATIC;
11
+ function DefaultSearchDialog({ type, defaultTag, tags = [], api, delayMs, allowClear = false, links = [], footer, ...props }) {
10
12
  const { locale } = useI18n();
11
13
  const [tag, setTag] = useState(defaultTag);
12
- const { search, setSearch, query } = useDocsSearch(type === "fetch" ? {
13
- type: "fetch",
14
- api,
15
- locale,
16
- tag,
17
- delayMs
18
- } : {
19
- type: "static",
14
+ let client;
15
+ if (type === "static") client = use(STATIC ??= import("fumadocs-core/search/client/orama-static")).oramaStaticClient({
20
16
  from: api,
21
17
  locale,
22
- tag,
18
+ tag
19
+ });
20
+ else client = fetchClient({
21
+ api,
22
+ locale,
23
+ tag
24
+ });
25
+ const { search, setSearch, query } = useDocsSearch({
26
+ client,
23
27
  delayMs
24
28
  });
25
29
  const defaultItems = useMemo(() => {
@@ -5,6 +5,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useMemo, useState } from "react";
6
6
  import { useOnChange } from "fumadocs-core/utils/use-on-change";
7
7
  import { useDocsSearch } from "fumadocs-core/search/client";
8
+ import { oramaCloudClient } from "fumadocs-core/search/client/orama-cloud";
8
9
  //#region src/components/dialog/search-orama.tsx
9
10
  /**
10
11
  * Orama Cloud integration
@@ -12,14 +13,13 @@ import { useDocsSearch } from "fumadocs-core/search/client";
12
13
  function OramaSearchDialog({ client, searchOptions, tags = [], defaultTag, showOrama = true, allowClear = false, index, footer, links = [], ...props }) {
13
14
  const { locale } = useI18n();
14
15
  const [tag, setTag] = useState(defaultTag);
15
- const { search, setSearch, query } = useDocsSearch({
16
- type: "orama-cloud",
16
+ const { search, setSearch, query } = useDocsSearch({ client: oramaCloudClient({
17
17
  client,
18
18
  index,
19
19
  params: searchOptions,
20
20
  locale,
21
21
  tag
22
- });
22
+ }) });
23
23
  const defaultItems = useMemo(() => {
24
24
  if (links.length === 0) return null;
25
25
  return links.map(([name, link]) => ({
@@ -6,7 +6,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { ChevronRight, Hash, SearchIcon } from "lucide-react";
7
7
  import { cva } from "class-variance-authority";
8
8
  import { Fragment as Fragment$1, createContext, use, useCallback, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
9
- import { useTranslations } from "@fuma-translate/react";
9
+ import { T, useTranslations } from "@fuma-translate/react";
10
10
  import { useOnChange } from "fumadocs-core/utils/use-on-change";
11
11
  import scrollIntoView from "scroll-into-view-if-needed";
12
12
  import { Dialog, DialogContent, DialogOverlay, DialogTitle } from "@radix-ui/react-dialog";
@@ -189,13 +189,13 @@ function SearchDialogContent({ children, ...props }) {
189
189
  }), children]
190
190
  });
191
191
  }
192
- function SearchDialogListEmpty() {
193
- return /* @__PURE__ */ jsx("div", {
194
- className: "py-12 text-center text-sm text-fd-muted-foreground",
195
- children: useTranslations({ note: "search dialog" })("No results found")
196
- });
197
- }
198
- function SearchDialogList({ items = null, Empty = SearchDialogListEmpty, Item = (props) => /* @__PURE__ */ jsx(SearchDialogListItem, { ...props }), ...props }) {
192
+ function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div", {
193
+ className: "py-12 text-center text-sm text-fd-muted-foreground",
194
+ children: /* @__PURE__ */ jsx(T, {
195
+ text: "No results found",
196
+ note: "search dialog"
197
+ })
198
+ }), Item = (props) => /* @__PURE__ */ jsx(SearchDialogListItem, { ...props }), ...props }) {
199
199
  const ref = useRef(null);
200
200
  const { onSelect } = useSearch();
201
201
  const [active, setActive] = useState(() => items && items.length > 0 ? items[0].id : null);
@@ -2,13 +2,10 @@ import { ComponentProps } from "react";
2
2
  import * as Primitive from "fumadocs-core/toc";
3
3
 
4
4
  //#region src/components/toc/clerk.d.ts
5
- interface TOCItemsProps extends ComponentProps<'div'> {
6
- thumbBox?: boolean;
7
- }
5
+ type TOCItemsProps = ComponentProps<'div'>;
8
6
  declare function TOCItems({
9
7
  ref,
10
8
  className,
11
- thumbBox,
12
9
  children,
13
10
  ...props
14
11
  }: TOCItemsProps): import("react").JSX.Element;
@@ -13,7 +13,7 @@ var clerk_exports = /* @__PURE__ */ __exportAll({
13
13
  TOCItem: () => TOCItem,
14
14
  TOCItems: () => TOCItems
15
15
  });
16
- function TOCItems({ ref, className, thumbBox = true, children, ...props }) {
16
+ function TOCItems({ ref, className, children, ...props }) {
17
17
  const containerRef = useRef(null);
18
18
  const items = useTOCItems();
19
19
  const [svg, setSvg] = useState(null);
@@ -46,7 +46,7 @@ function TOCItems({ ref, className, thumbBox = true, children, ...props }) {
46
46
  0,
47
47
  0
48
48
  ];
49
- d += ` C ${upperX} ${top - 4} ${x} ${upperBottom + 4} ${x} ${top} L${x} ${bottom}`;
49
+ d += ` L ${upperX} ${upperBottom} ${x} ${top} L${x} ${bottom}`;
50
50
  }
51
51
  if (item._step !== void 0) output.push(/* @__PURE__ */ jsxs("g", {
52
52
  transform: `translate(${x}, ${(top + bottom) / 2})`,
@@ -77,27 +77,15 @@ function TOCItems({ ref, className, thumbBox = true, children, ...props }) {
77
77
  strokeWidth: "1",
78
78
  fill: "none"
79
79
  }, "path"));
80
- const itemLineLengths = [];
81
- if (thumbBox) {
82
- const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
83
- path.setAttribute("d", d);
84
- const n = path.getTotalLength();
85
- for (let i = 0; i < positions.length; i++) {
86
- const [top, bottom] = positions[i];
87
- let l = i > 0 ? itemLineLengths[i - 1][1] + (top - positions[i - 1][1]) : top;
88
- while (l < n && path.getPointAtLength(l).y < top) l++;
89
- itemLineLengths.push([l, l + bottom - top]);
90
- }
91
- }
92
80
  setSvg({
93
81
  content: output,
94
82
  width: w,
95
83
  height: h,
96
84
  d,
97
- itemLineLengths,
85
+ itemLineLengths: [],
98
86
  positions
99
87
  });
100
- }, [items, thumbBox]);
88
+ }, [items]);
101
89
  useEffect(() => {
102
90
  const container = containerRef.current;
103
91
  if (!container) return;
@@ -112,10 +100,7 @@ function TOCItems({ ref, className, thumbBox = true, children, ...props }) {
112
100
  ref: mergeRefs(containerRef, ref),
113
101
  className: cn("relative flex flex-col", className),
114
102
  ...props,
115
- children: [svg && /* @__PURE__ */ jsx(ThumbTrack, {
116
- computed: svg,
117
- thumbBox
118
- }), children]
103
+ children: [svg && /* @__PURE__ */ jsx(ThumbTrack, { computed: svg }), children]
119
104
  });
120
105
  }
121
106
  function TOCEmpty() {
@@ -124,9 +109,8 @@ function TOCEmpty() {
124
109
  children: useTranslations({ note: "table of contents" })("No Headings")
125
110
  });
126
111
  }
127
- function ThumbTrack({ computed, thumbBox }) {
112
+ function ThumbTrack({ computed }) {
128
113
  const ref = useRef(null);
129
- const previousRef = useRef(null);
130
114
  const tocInfo = Primitive.useTOC();
131
115
  function calculate(items) {
132
116
  const out = {};
@@ -135,20 +119,6 @@ function ThumbTrack({ computed, thumbBox }) {
135
119
  const endIdx = items.findLastIndex((item) => item.active);
136
120
  out["--track-top"] = `${computed.positions[startIdx][0]}px`;
137
121
  out["--track-bottom"] = `${computed.positions[endIdx][1]}px`;
138
- if (thumbBox) {
139
- let isUp = false;
140
- if (previousRef.current) {
141
- const prev = previousRef.current;
142
- isUp = prev.startIdx > startIdx || prev.endIdx > endIdx || prev.startIdx === startIdx && prev.endIdx === endIdx && prev.isUp;
143
- }
144
- previousRef.current = {
145
- startIdx,
146
- endIdx,
147
- isUp
148
- };
149
- out["--offset-distance"] = isUp ? `${computed.itemLineLengths[startIdx][0]}px` : `${computed.itemLineLengths[endIdx][1]}px`;
150
- out["--opacity"] = items[isUp ? startIdx : endIdx].original._step !== void 0 ? "0" : "1";
151
- }
152
122
  return out;
153
123
  }
154
124
  Primitive.useTOCListener((items) => {
@@ -156,7 +126,7 @@ function ThumbTrack({ computed, thumbBox }) {
156
126
  if (!element) return;
157
127
  for (const [k, v] of Object.entries(calculate(items))) element.style.setProperty(k, v);
158
128
  });
159
- return /* @__PURE__ */ jsxs("div", {
129
+ return /* @__PURE__ */ jsx("div", {
160
130
  ref,
161
131
  className: "absolute top-0 inset-s-0 origin-center rtl:-scale-x-100",
162
132
  style: {
@@ -164,7 +134,7 @@ function ThumbTrack({ computed, thumbBox }) {
164
134
  height: computed.height,
165
135
  ...calculate(tocInfo.get())
166
136
  },
167
- children: [/* @__PURE__ */ jsx("svg", {
137
+ children: /* @__PURE__ */ jsx("svg", {
168
138
  xmlns: "http://www.w3.org/2000/svg",
169
139
  viewBox: `0 0 ${computed.width} ${computed.height}`,
170
140
  className: "absolute transition-[clip-path]",
@@ -174,22 +144,19 @@ function ThumbTrack({ computed, thumbBox }) {
174
144
  clipPath: `polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))`
175
145
  },
176
146
  children: computed.content
177
- }), thumbBox && /* @__PURE__ */ jsx("div", {
178
- className: "absolute left-0 size-1 bg-fd-primary rounded-full [offset-distance:var(--offset-distance,0)] opacity-(--opacity,0) transition-[opacity,offset-distance]",
179
- style: { offsetPath: `path("${computed.d}")` }
180
- })]
147
+ })
181
148
  });
182
149
  }
183
- const a = 8;
150
+ const BASE = 8;
184
151
  function getItemOffset(depth) {
185
152
  if (depth <= 2) return 20;
186
153
  if (depth === 3) return 32;
187
154
  return 44;
188
155
  }
189
156
  function getLineOffset(depth) {
190
- if (depth <= 2) return a;
191
- if (depth === 3) return 16;
192
- return 24;
157
+ if (depth <= 2) return BASE;
158
+ if (depth === 3) return 20;
159
+ return 32;
193
160
  }
194
161
  function TOCItem({ item, ...props }) {
195
162
  const items = useTOCItems();
@@ -209,7 +176,7 @@ function TOCItem({ item, ...props }) {
209
176
  style: { width: Math.max(l0, l1) + 9 },
210
177
  children: [
211
178
  l0 !== l1 && /* @__PURE__ */ jsx("path", {
212
- d: `M ${l0 + .5} 0 C ${l0 + .5} 8 ${l1 + .5} 4 ${l1 + .5} 12`,
179
+ d: `M ${l0 + .5} 0 L ${l0 + .5} 0 ${l1 + .5} 12`,
213
180
  stroke: "black",
214
181
  strokeWidth: "1",
215
182
  fill: "none",
@@ -2,10 +2,14 @@ import { ComponentProps } from "react";
2
2
  import * as Primitive from "fumadocs-core/toc";
3
3
 
4
4
  //#region src/components/toc/default.d.ts
5
- type TOCItemsProps = ComponentProps<'div'>;
5
+ interface TOCItemsProps extends ComponentProps<'div'> {
6
+ thumbBox?: boolean;
7
+ }
6
8
  declare function TOCItems({
7
9
  ref,
8
10
  className,
11
+ thumbBox,
12
+ children,
9
13
  ...props
10
14
  }: TOCItemsProps): import("react").JSX.Element;
11
15
  declare function TOCEmpty(): import("react").JSX.Element;
@@ -4,7 +4,7 @@ import { cn } from "../../utils/cn.js";
4
4
  import { mergeRefs } from "../../utils/merge-refs.js";
5
5
  import { useTOCItems } from "./index.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { useCallback, useEffect, useRef, useState } from "react";
7
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
8
8
  import { useTranslations } from "@fuma-translate/react";
9
9
  import * as Primitive from "fumadocs-core/toc";
10
10
  //#region src/components/toc/default.tsx
@@ -13,47 +13,120 @@ var default_exports = /* @__PURE__ */ __exportAll({
13
13
  TOCItem: () => TOCItem,
14
14
  TOCItems: () => TOCItems
15
15
  });
16
- function TOCItems({ ref, className, ...props }) {
16
+ function TOCItems({ ref, className, thumbBox = true, children, ...props }) {
17
17
  const containerRef = useRef(null);
18
18
  const items = useTOCItems();
19
- const [computed, setComputed] = useState(null);
20
- const onCompute = useCallback(() => {
19
+ const [svg, setSvg] = useState(null);
20
+ const onPrint = useCallback(() => {
21
21
  const container = containerRef.current;
22
- if (!container) return;
22
+ if (!container || container.clientHeight === 0) return;
23
23
  if (items.length === 0) {
24
- setComputed(null);
24
+ setSvg(null);
25
25
  return;
26
26
  }
27
+ let w = 0;
28
+ let h = 0;
29
+ let d = "";
27
30
  const positions = [];
28
- for (const item of items) {
31
+ const output = [];
32
+ for (let i = 0; i < items.length; i++) {
33
+ const item = items[i];
29
34
  const element = container.querySelector(`a[href="${item.url}"]`);
30
35
  if (!element) continue;
31
36
  const styles = getComputedStyle(element);
32
- positions.push([element.offsetTop + parseFloat(styles.paddingTop), element.offsetTop + element.clientHeight - parseFloat(styles.paddingBottom)]);
37
+ const x = getLineOffset(item.depth) + .5;
38
+ const top = element.offsetTop + parseFloat(styles.paddingTop);
39
+ const bottom = element.offsetTop + element.clientHeight - parseFloat(styles.paddingBottom);
40
+ w = Math.max(x + 8, w);
41
+ h = Math.max(h, bottom);
42
+ if (i === 0) d += ` M${x} ${top} L${x} ${bottom}`;
43
+ else {
44
+ const [, upperBottom, upperX] = i > 0 ? positions[i - 1] : [
45
+ 0,
46
+ 0,
47
+ 0
48
+ ];
49
+ d += ` C ${upperX} ${top - 4} ${x} ${upperBottom + 4} ${x} ${top} L${x} ${bottom}`;
50
+ }
51
+ if (item._step !== void 0) output.push(/* @__PURE__ */ jsxs("g", {
52
+ transform: `translate(${x}, ${(top + bottom) / 2})`,
53
+ children: [/* @__PURE__ */ jsx("circle", {
54
+ cx: "0",
55
+ cy: "0",
56
+ r: "8",
57
+ className: "fill-fd-primary"
58
+ }), /* @__PURE__ */ jsx("text", {
59
+ cx: "0",
60
+ cy: "0",
61
+ textAnchor: "middle",
62
+ alignmentBaseline: "central",
63
+ dominantBaseline: "middle",
64
+ className: "fill-fd-primary-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",
65
+ children: item._step
66
+ })]
67
+ }, i));
68
+ positions.push([
69
+ top,
70
+ bottom,
71
+ x
72
+ ]);
73
+ }
74
+ output.unshift(/* @__PURE__ */ jsx("path", {
75
+ d,
76
+ className: "stroke-fd-primary",
77
+ strokeWidth: "1",
78
+ fill: "none"
79
+ }, "path"));
80
+ const itemLineLengths = [];
81
+ if (thumbBox) {
82
+ const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
83
+ path.setAttribute("d", d);
84
+ const n = path.getTotalLength();
85
+ for (let i = 0; i < positions.length; i++) {
86
+ const [top, bottom] = positions[i];
87
+ let l = i > 0 ? itemLineLengths[i - 1][1] + (top - positions[i - 1][1]) : top;
88
+ while (l < n && path.getPointAtLength(l).y < top) l++;
89
+ itemLineLengths.push([l, l + bottom - top]);
90
+ }
33
91
  }
34
- setComputed({ positions });
35
- }, [items]);
92
+ setSvg({
93
+ content: output,
94
+ width: w,
95
+ height: h,
96
+ d,
97
+ itemLineLengths,
98
+ positions
99
+ });
100
+ }, [items, thumbBox]);
36
101
  useEffect(() => {
37
102
  const container = containerRef.current;
38
103
  if (!container) return;
39
- const observer = new ResizeObserver(onCompute);
104
+ const observer = new ResizeObserver(onPrint);
40
105
  observer.observe(container);
41
- onCompute();
106
+ onPrint();
42
107
  return () => {
43
- observer.disconnect();
108
+ observer.unobserve(container);
44
109
  };
45
- }, [onCompute]);
110
+ }, [onPrint]);
46
111
  return /* @__PURE__ */ jsxs("div", {
47
- className: "relative",
48
- children: [computed && /* @__PURE__ */ jsx(TocThumb, { computed }), /* @__PURE__ */ jsx("div", {
49
- ref: mergeRefs(ref, containerRef),
50
- className: cn("flex flex-col border-s border-fd-foreground/10", className),
51
- ...props
52
- })]
112
+ ref: mergeRefs(containerRef, ref),
113
+ className: cn("relative flex flex-col", className),
114
+ ...props,
115
+ children: [svg && /* @__PURE__ */ jsx(ThumbTrack, {
116
+ computed: svg,
117
+ thumbBox
118
+ }), children]
119
+ });
120
+ }
121
+ function TOCEmpty() {
122
+ return /* @__PURE__ */ jsx("div", {
123
+ className: "rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",
124
+ children: useTranslations({ note: "table of contents" })("No Headings")
53
125
  });
54
126
  }
55
- function TocThumb({ computed }) {
127
+ function ThumbTrack({ computed, thumbBox }) {
56
128
  const ref = useRef(null);
129
+ const previousRef = useRef(null);
57
130
  const tocInfo = Primitive.useTOC();
58
131
  function calculate(items) {
59
132
  const out = {};
@@ -62,6 +135,20 @@ function TocThumb({ computed }) {
62
135
  const endIdx = items.findLastIndex((item) => item.active);
63
136
  out["--track-top"] = `${computed.positions[startIdx][0]}px`;
64
137
  out["--track-bottom"] = `${computed.positions[endIdx][1]}px`;
138
+ if (thumbBox) {
139
+ let isUp = false;
140
+ if (previousRef.current) {
141
+ const prev = previousRef.current;
142
+ isUp = prev.startIdx > startIdx || prev.endIdx > endIdx || prev.startIdx === startIdx && prev.endIdx === endIdx && prev.isUp;
143
+ }
144
+ previousRef.current = {
145
+ startIdx,
146
+ endIdx,
147
+ isUp
148
+ };
149
+ out["--offset-distance"] = isUp ? `${computed.itemLineLengths[startIdx][0]}px` : `${computed.itemLineLengths[endIdx][1]}px`;
150
+ out["--opacity"] = items[isUp ? startIdx : endIdx].original._step !== void 0 ? "0" : "1";
151
+ }
65
152
  return out;
66
153
  }
67
154
  Primitive.useTOCListener((items) => {
@@ -69,27 +156,103 @@ function TocThumb({ computed }) {
69
156
  if (!element) return;
70
157
  for (const [k, v] of Object.entries(calculate(items))) element.style.setProperty(k, v);
71
158
  });
72
- return /* @__PURE__ */ jsx("div", {
159
+ return /* @__PURE__ */ jsxs("div", {
73
160
  ref,
74
- className: "absolute inset-y-0 inset-s-0 bg-fd-primary w-px transition-[clip-path]",
161
+ className: "absolute top-0 inset-s-0 origin-center rtl:-scale-x-100",
75
162
  style: {
76
- clipPath: `polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))`,
163
+ width: computed.width,
164
+ height: computed.height,
77
165
  ...calculate(tocInfo.get())
78
- }
166
+ },
167
+ children: [/* @__PURE__ */ jsx("svg", {
168
+ xmlns: "http://www.w3.org/2000/svg",
169
+ viewBox: `0 0 ${computed.width} ${computed.height}`,
170
+ className: "absolute transition-[clip-path]",
171
+ style: {
172
+ width: computed.width,
173
+ height: computed.height,
174
+ clipPath: `polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))`
175
+ },
176
+ children: computed.content
177
+ }), thumbBox && /* @__PURE__ */ jsx("div", {
178
+ className: "absolute left-0 size-1 bg-fd-primary rounded-full [offset-distance:var(--offset-distance,0)] opacity-(--opacity,0) transition-[opacity,offset-distance]",
179
+ style: { offsetPath: `path("${computed.d}")` }
180
+ })]
79
181
  });
80
182
  }
81
- function TOCEmpty() {
82
- return /* @__PURE__ */ jsx("div", {
83
- className: "rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",
84
- children: useTranslations({ note: "table of contents" })("No Headings")
85
- });
183
+ const BASE = 8;
184
+ function getItemOffset(depth) {
185
+ if (depth <= 2) return 20;
186
+ if (depth === 3) return 32;
187
+ return 44;
188
+ }
189
+ function getLineOffset(depth) {
190
+ if (depth <= 2) return BASE;
191
+ if (depth === 3) return 16;
192
+ return 24;
86
193
  }
87
194
  function TOCItem({ item, ...props }) {
88
- return /* @__PURE__ */ jsx(Primitive.TOCItem, {
195
+ const items = useTOCItems();
196
+ const { isFirst, isLast, svg } = useMemo(() => {
197
+ const index = items.indexOf(item);
198
+ const isFirst = index === 0;
199
+ const isLast = index === items.length - 1;
200
+ const l1 = getLineOffset(item.depth);
201
+ const l0 = isFirst ? l1 : getLineOffset(items[index - 1].depth);
202
+ const l2 = isLast ? l1 : getLineOffset(items[index + 1].depth);
203
+ return {
204
+ isFirst,
205
+ isLast,
206
+ svg: /* @__PURE__ */ jsxs("svg", {
207
+ xmlns: "http://www.w3.org/2000/svg",
208
+ className: cn("absolute -top-1.5 inset-s-0 bottom-0 h-[calc(100%+--spacing(1.5))] -z-1 rtl:-scale-x-100", l1 !== l2 && "h-full bottom-1.5"),
209
+ style: { width: Math.max(l0, l1) + 9 },
210
+ children: [
211
+ l0 !== l1 && /* @__PURE__ */ jsx("path", {
212
+ d: `M ${l0 + .5} 0 C ${l0 + .5} 8 ${l1 + .5} 4 ${l1 + .5} 12`,
213
+ stroke: "black",
214
+ strokeWidth: "1",
215
+ fill: "none",
216
+ className: "stroke-fd-foreground/10"
217
+ }),
218
+ /* @__PURE__ */ jsx("line", {
219
+ x1: l1 + .5,
220
+ y1: l0 === l1 ? "6" : "12",
221
+ x2: l1 + .5,
222
+ y2: "100%",
223
+ strokeWidth: "1",
224
+ className: "stroke-fd-foreground/10"
225
+ }),
226
+ item._step !== void 0 && /* @__PURE__ */ jsxs("g", {
227
+ transform: `translate(${l1 + .5}, ${l1 === l2 ? "3" : "6"})`,
228
+ children: [/* @__PURE__ */ jsx("circle", {
229
+ cx: "0",
230
+ cy: "50%",
231
+ r: "8",
232
+ className: "fill-fd-muted"
233
+ }), /* @__PURE__ */ jsx("text", {
234
+ x: "0",
235
+ y: "50%",
236
+ textAnchor: "middle",
237
+ alignmentBaseline: "central",
238
+ dominantBaseline: "middle",
239
+ className: "fill-fd-muted-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",
240
+ children: item._step
241
+ })]
242
+ })
243
+ ]
244
+ })
245
+ };
246
+ }, [items, item]);
247
+ return /* @__PURE__ */ jsxs(Primitive.TOCItem, {
89
248
  href: item.url,
90
249
  ...props,
91
- className: cn("prose py-1.5 text-sm text-fd-muted-foreground scroll-m-4 transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary hover:text-fd-accent-foreground", item.depth <= 2 && "ps-3", item.depth === 3 && "ps-6", item.depth >= 4 && "ps-8", props.className),
92
- children: item.title
250
+ className: cn("prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere data-[active=true]:text-fd-primary", isFirst && "pt-0", isLast && "pb-0", props.className),
251
+ style: {
252
+ paddingInlineStart: getItemOffset(item.depth),
253
+ ...props.style
254
+ },
255
+ children: [svg, item.title]
93
256
  });
94
257
  }
95
258
  //#endregion
@@ -4,7 +4,7 @@ import { VariantProps } from "class-variance-authority";
4
4
  declare const buttonVariants: (props?: ({
5
5
  variant?: "primary" | "outline" | "ghost" | "secondary" | null | undefined;
6
6
  color?: "primary" | "outline" | "ghost" | "secondary" | null | undefined;
7
- size?: "icon" | "sm" | "icon-sm" | "icon-xs" | null | undefined;
7
+ size?: "sm" | "icon" | "icon-sm" | "icon-xs" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  type ButtonProps = VariantProps<typeof buttonVariants>;
10
10
  //#endregion
@@ -8,7 +8,8 @@ const LocaleContext = createContext({});
8
8
  function useI18n() {
9
9
  return use(LocaleContext);
10
10
  }
11
- function I18nProvider({ locales = [], locale, onLocaleChange, children, translations }) {
11
+ const Empty = {};
12
+ function I18nProvider({ locales = [], locale, onLocaleChange, children, translations = Empty }) {
12
13
  const router = useRouter();
13
14
  const pathname = usePathname();
14
15
  const onChange = (value) => {
@@ -27,7 +28,7 @@ function I18nProvider({ locales = [], locale, onLocaleChange, children, translat
27
28
  onChange: (v) => onChangeRef.current(v)
28
29
  }), [locale, locales]),
29
30
  children: /* @__PURE__ */ jsx(TranslationProvider, {
30
- translations: translations ?? {},
31
+ translations,
31
32
  children
32
33
  })
33
34
  });
@@ -1,3 +1,4 @@
1
+ import { DefaultSearchDialogProps } from "../components/dialog/search-default.js";
1
2
  import { ComponentType, ReactNode } from "react";
2
3
 
3
4
  //#region src/contexts/search.d.ts
@@ -17,7 +18,7 @@ interface TagItem {
17
18
  name: string;
18
19
  value: string;
19
20
  }
20
- interface SearchProviderProps {
21
+ interface SearchProviderProps<DialogProps extends SharedProps = DefaultSearchDialogProps> {
21
22
  /**
22
23
  * Preload search dialog before opening it
23
24
  *
@@ -37,13 +38,13 @@ interface SearchProviderProps {
37
38
  /**
38
39
  * Replace default search dialog, allowing you to use other solutions such as Algolia Search
39
40
  *
40
- * It receives the `open` and `onOpenChange` prop, can be lazy loaded with `next/dynamic`
41
+ * It receives the `open` and `onOpenChange` prop, can be lazy loaded with `React.lazy()`
41
42
  */
42
- SearchDialog: ComponentType<SharedProps>;
43
+ SearchDialog?: ComponentType<DialogProps>;
43
44
  /**
44
45
  * Additional props to the dialog
45
46
  */
46
- options?: Partial<SharedProps & Record<string, unknown>>;
47
+ options?: Partial<DialogProps>;
47
48
  children?: ReactNode;
48
49
  }
49
50
  interface SearchContextType {
@@ -53,14 +54,14 @@ interface SearchContextType {
53
54
  setOpenSearch: (value: boolean) => void;
54
55
  }
55
56
  declare function useSearchContext(): SearchContextType;
56
- declare function SearchProvider({
57
+ declare function SearchProvider<DialogProps extends SharedProps = DefaultSearchDialogProps>({
57
58
  SearchDialog,
58
59
  children,
59
60
  preload,
60
61
  options,
61
62
  hotKey,
62
63
  links
63
- }: SearchProviderProps): import("react").JSX.Element;
64
+ }: SearchProviderProps<DialogProps>): import("react").JSX.Element;
64
65
  /**
65
66
  * Show children only when search is enabled via React Context
66
67
  */
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Suspense, createContext, use, useEffect, useEffectEvent, useMemo, useState } from "react";
3
+ import { Suspense, createContext, lazy, use, useEffect, useEffectEvent, useMemo, useState } from "react";
4
4
  //#region src/contexts/search.tsx
5
5
  const SearchContext = createContext({
6
6
  enabled: false,
@@ -18,13 +18,15 @@ function MetaOrControl() {
18
18
  }, []);
19
19
  return key;
20
20
  }
21
- function SearchProvider({ SearchDialog, children, preload = true, options, hotKey = [{
21
+ const DEFAULT_HOT_KEYS = [{
22
22
  key: (e) => e.metaKey || e.ctrlKey,
23
23
  display: /* @__PURE__ */ jsx(MetaOrControl, {})
24
24
  }, {
25
25
  key: "k",
26
26
  display: "K"
27
- }], links }) {
27
+ }];
28
+ const DefaultSearchDialog = lazy(() => import("../components/dialog/search-default.js"));
29
+ function SearchProvider({ SearchDialog = DefaultSearchDialog, children, preload = true, options, hotKey = DEFAULT_HOT_KEYS, links }) {
28
30
  const [isOpen, setIsOpen] = useState(preload ? false : void 0);
29
31
  const onKeyDown = useEffectEvent((e) => {
30
32
  if (hotKey.every((v) => typeof v.key === "string" ? e.key === v.key : v.key(e))) {
@@ -37,7 +39,7 @@ function SearchProvider({ SearchDialog, children, preload = true, options, hotKe
37
39
  return () => {
38
40
  window.removeEventListener("keydown", onKeyDown);
39
41
  };
40
- }, [hotKey]);
42
+ }, []);
41
43
  return /* @__PURE__ */ jsxs(SearchContext, {
42
44
  value: useMemo(() => ({
43
45
  enabled: true,
@@ -45,9 +47,9 @@ function SearchProvider({ SearchDialog, children, preload = true, options, hotKe
45
47
  hotKey,
46
48
  setOpenSearch: setIsOpen
47
49
  }), [isOpen, hotKey]),
48
- children: [isOpen !== void 0 && /* @__PURE__ */ jsx(Suspense, {
50
+ children: [/* @__PURE__ */ jsx(Suspense, {
49
51
  fallback: null,
50
- children: /* @__PURE__ */ jsx(SearchDialog, {
52
+ children: isOpen !== void 0 && /* @__PURE__ */ jsx(SearchDialog, {
51
53
  open: isOpen,
52
54
  onOpenChange: setIsOpen,
53
55
  links,
package/dist/i18n.js CHANGED
@@ -13,7 +13,7 @@ function i18nProvider(translations, lang) {
13
13
  translations: t.get(locale) ?? t.get(defaultLanguage),
14
14
  locales: languages.map((code) => ({
15
15
  locale: code,
16
- name: t.get(code).displayName ?? code
16
+ name: t.get(code).displayName ?? "English"
17
17
  }))
18
18
  };
19
19
  }
@@ -2,7 +2,7 @@ import { ComponentProps } from "react";
2
2
 
3
3
  //#region src/layouts/home/slots/header.d.ts
4
4
  declare const navItemVariants: (props?: ({
5
- variant?: "icon" | "main" | "button" | null | undefined;
5
+ variant?: "icon" | "button" | "main" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  declare function Header(props: ComponentProps<'header'>): string | number | bigint | true | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
8
8
  //#endregion
@@ -10,6 +10,6 @@ import { LoaderConfig, LoaderOutput, Page } from "fumadocs-core/source";
10
10
  * @param source the source object
11
11
  * @param OverrideLink The component to override from
12
12
  */
13
- declare function createRelativeLink<C extends LoaderConfig>(source: LoaderOutput<C>, page: Page, OverrideLink?: FC<ComponentProps<'a'>>): FC<ComponentProps<'a'>>;
13
+ declare function createRelativeLink<C extends LoaderConfig>(source: LoaderOutput<C>, page: Page | C['page'], OverrideLink?: FC<ComponentProps<'a'>>): FC<ComponentProps<'a'>>;
14
14
  //#endregion
15
15
  export { createRelativeLink, defaultMdxComponents as default };
@@ -1,12 +1,10 @@
1
1
  import { SearchProviderProps } from "../contexts/search.js";
2
- import { DefaultSearchDialogProps } from "../components/dialog/search-default.js";
3
2
  import { I18nProviderProps } from "../contexts/i18n.js";
4
3
  import { ReactNode } from "react";
5
4
  import { ThemeProviderProps, UseThemeProps, useTheme } from "next-themes";
6
5
 
7
6
  //#region src/provider/base.d.ts
8
- interface SearchOptions extends Omit<SearchProviderProps, 'options' | 'children'> {
9
- options?: Partial<DefaultSearchDialogProps>;
7
+ interface SearchOptions extends Omit<SearchProviderProps, 'children'> {
10
8
  /**
11
9
  * Enable search functionality
12
10
  *
@@ -2,15 +2,12 @@
2
2
  import { I18nProvider } from "../contexts/i18n.js";
3
3
  import { SearchProvider } from "../contexts/search.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
- import { lazy } from "react";
6
5
  import { ThemeProvider, useTheme } from "next-themes";
7
6
  import { DirectionProvider } from "@radix-ui/react-direction";
8
7
  //#region src/provider/base.tsx
9
- const DefaultSearchDialog = lazy(() => import("../components/dialog/search-default.js"));
10
8
  function RootProvider({ children, dir = "ltr", theme = {}, search, i18n }) {
11
9
  let body = children;
12
10
  if (search?.enabled !== false) body = /* @__PURE__ */ jsx(SearchProvider, {
13
- SearchDialog: DefaultSearchDialog,
14
11
  ...search,
15
12
  children: body
16
13
  });
package/dist/style.css CHANGED
@@ -1413,12 +1413,6 @@
1413
1413
  --tw-border-style: none;
1414
1414
  border-style: none;
1415
1415
  }
1416
- .border-fd-foreground\/10 {
1417
- border-color: color-mix(in srgb, hsl(0, 0%, 3.9%) 10%, transparent);
1418
- @supports (color: color-mix(in lab, red, red)) {
1419
- border-color: color-mix(in oklab, var(--color-fd-foreground) 10%, transparent);
1420
- }
1421
- }
1422
1416
  .border-fd-primary {
1423
1417
  border-color: var(--color-fd-primary);
1424
1418
  }
@@ -1638,15 +1632,9 @@
1638
1632
  .ps-2\.5 {
1639
1633
  padding-inline-start: calc(var(--spacing) * 2.5);
1640
1634
  }
1641
- .ps-3 {
1642
- padding-inline-start: calc(var(--spacing) * 3);
1643
- }
1644
1635
  .ps-4 {
1645
1636
  padding-inline-start: calc(var(--spacing) * 4);
1646
1637
  }
1647
- .ps-6 {
1648
- padding-inline-start: calc(var(--spacing) * 6);
1649
- }
1650
1638
  .ps-8 {
1651
1639
  padding-inline-start: calc(var(--spacing) * 8);
1652
1640
  }
@@ -2181,11 +2169,6 @@
2181
2169
  margin-top: calc(var(--spacing) * 0);
2182
2170
  }
2183
2171
  }
2184
- .first\:pt-0 {
2185
- &:first-child {
2186
- padding-top: calc(var(--spacing) * 0);
2187
- }
2188
- }
2189
2172
  .last\:me-0 {
2190
2173
  &:last-child {
2191
2174
  margin-inline-end: calc(var(--spacing) * 0);
@@ -2197,11 +2180,6 @@
2197
2180
  border-bottom-left-radius: var(--radius-xl);
2198
2181
  }
2199
2182
  }
2200
- .last\:pb-0 {
2201
- &:last-child {
2202
- padding-bottom: calc(var(--spacing) * 0);
2203
- }
2204
- }
2205
2183
  .\*\:last\:border-b-0 {
2206
2184
  :is(& > *) {
2207
2185
  &:last-child {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-ui",
3
- "version": "16.10.1",
3
+ "version": "16.10.3",
4
4
  "description": "The Radix UI version of Fumadocs UI",
5
5
  "keywords": [
6
6
  "Docs",
@@ -9,7 +9,13 @@
9
9
  "homepage": "https://fumadocs.dev",
10
10
  "license": "MIT",
11
11
  "author": "Fuma Nama",
12
- "repository": "github:fuma-nama/fumadocs",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "github:fuma-nama/fumadocs"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/fuma-nama/fumadocs/issues"
18
+ },
13
19
  "files": [
14
20
  "css",
15
21
  "dist"
@@ -120,7 +126,7 @@
120
126
  "access": "public"
121
127
  },
122
128
  "dependencies": {
123
- "@fuma-translate/react": "^1.0.1",
129
+ "@fuma-translate/react": "^1.0.2",
124
130
  "@radix-ui/react-accordion": "^1.2.13",
125
131
  "@radix-ui/react-collapsible": "^1.1.13",
126
132
  "@radix-ui/react-dialog": "^1.1.16",
@@ -149,7 +155,7 @@
149
155
  "@tsdown/css": "^0.22.2",
150
156
  "@types/hast": "^3.0.4",
151
157
  "@types/mdx": "^2.0.14",
152
- "@types/node": "^25.9.2",
158
+ "@types/node": "^25.9.3",
153
159
  "@types/react": "^19.2.17",
154
160
  "@types/react-dom": "^19.2.3",
155
161
  "fuma-cli": "^0.1.1",
@@ -158,7 +164,7 @@
158
164
  "tsdown": "0.22.2",
159
165
  "unified": "^11.0.5",
160
166
  "@fumadocs/cli": "1.3.10",
161
- "fumadocs-core": "16.10.1",
167
+ "fumadocs-core": "16.10.3",
162
168
  "tsconfig": "0.0.0"
163
169
  },
164
170
  "peerDependencies": {
@@ -168,7 +174,7 @@
168
174
  "next": "16.x.x",
169
175
  "react": "^19.2.0",
170
176
  "react-dom": "^19.2.0",
171
- "fumadocs-core": "16.10.1"
177
+ "fumadocs-core": "16.10.3"
172
178
  },
173
179
  "peerDependenciesMeta": {
174
180
  "next": {