fumadocs-ui 16.10.1 → 16.10.2

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("!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 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 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 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 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 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");
@@ -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]) => ({
@@ -4,10 +4,6 @@ import { ReactNode } from "react";
4
4
  //#region src/components/dialog/search-default.d.ts
5
5
  interface DefaultSearchDialogProps extends SharedProps {
6
6
  links?: SearchLink[];
7
- /**
8
- * @defaultValue 'fetch'
9
- */
10
- type?: 'fetch' | 'static';
11
7
  defaultTag?: string;
12
8
  tags?: TagItem[];
13
9
  /**
@@ -31,7 +27,6 @@ declare function DefaultSearchDialog({
31
27
  tags,
32
28
  api,
33
29
  delayMs,
34
- type,
35
30
  allowClear,
36
31
  links,
37
32
  footer,
@@ -5,21 +5,17 @@ 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 { 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
+ function DefaultSearchDialog({ defaultTag, tags = [], api, delayMs, allowClear = false, links = [], footer, ...props }) {
10
11
  const { locale } = useI18n();
11
12
  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",
20
- from: api,
21
- locale,
22
- tag,
13
+ const { search, setSearch, query } = useDocsSearch({
14
+ client: fetchClient({
15
+ api,
16
+ locale,
17
+ tag
18
+ }),
23
19
  delayMs
24
20
  });
25
21
  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
  });
@@ -37,9 +37,9 @@ interface SearchProviderProps {
37
37
  /**
38
38
  * Replace default search dialog, allowing you to use other solutions such as Algolia Search
39
39
  *
40
- * It receives the `open` and `onOpenChange` prop, can be lazy loaded with `next/dynamic`
40
+ * It receives the `open` and `onOpenChange` prop, can be lazy loaded with `React.lazy()`
41
41
  */
42
- SearchDialog: ComponentType<SharedProps>;
42
+ SearchDialog?: ComponentType<SharedProps>;
43
43
  /**
44
44
  * Additional props to the dialog
45
45
  */
@@ -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 };
@@ -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
@@ -293,9 +293,6 @@
293
293
  .relative {
294
294
  position: relative;
295
295
  }
296
- .static {
297
- position: static;
298
- }
299
296
  .sticky {
300
297
  position: sticky;
301
298
  }
@@ -1413,12 +1410,6 @@
1413
1410
  --tw-border-style: none;
1414
1411
  border-style: none;
1415
1412
  }
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
1413
  .border-fd-primary {
1423
1414
  border-color: var(--color-fd-primary);
1424
1415
  }
@@ -1638,15 +1629,9 @@
1638
1629
  .ps-2\.5 {
1639
1630
  padding-inline-start: calc(var(--spacing) * 2.5);
1640
1631
  }
1641
- .ps-3 {
1642
- padding-inline-start: calc(var(--spacing) * 3);
1643
- }
1644
1632
  .ps-4 {
1645
1633
  padding-inline-start: calc(var(--spacing) * 4);
1646
1634
  }
1647
- .ps-6 {
1648
- padding-inline-start: calc(var(--spacing) * 6);
1649
- }
1650
1635
  .ps-8 {
1651
1636
  padding-inline-start: calc(var(--spacing) * 8);
1652
1637
  }
@@ -2181,11 +2166,6 @@
2181
2166
  margin-top: calc(var(--spacing) * 0);
2182
2167
  }
2183
2168
  }
2184
- .first\:pt-0 {
2185
- &:first-child {
2186
- padding-top: calc(var(--spacing) * 0);
2187
- }
2188
- }
2189
2169
  .last\:me-0 {
2190
2170
  &:last-child {
2191
2171
  margin-inline-end: calc(var(--spacing) * 0);
@@ -2197,11 +2177,6 @@
2197
2177
  border-bottom-left-radius: var(--radius-xl);
2198
2178
  }
2199
2179
  }
2200
- .last\:pb-0 {
2201
- &:last-child {
2202
- padding-bottom: calc(var(--spacing) * 0);
2203
- }
2204
- }
2205
2180
  .\*\:last\:border-b-0 {
2206
2181
  :is(& > *) {
2207
2182
  &: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.2",
4
4
  "description": "The Radix UI version of Fumadocs UI",
5
5
  "keywords": [
6
6
  "Docs",
@@ -120,7 +120,7 @@
120
120
  "access": "public"
121
121
  },
122
122
  "dependencies": {
123
- "@fuma-translate/react": "^1.0.1",
123
+ "@fuma-translate/react": "^1.0.2",
124
124
  "@radix-ui/react-accordion": "^1.2.13",
125
125
  "@radix-ui/react-collapsible": "^1.1.13",
126
126
  "@radix-ui/react-dialog": "^1.1.16",
@@ -158,7 +158,7 @@
158
158
  "tsdown": "0.22.2",
159
159
  "unified": "^11.0.5",
160
160
  "@fumadocs/cli": "1.3.10",
161
- "fumadocs-core": "16.10.1",
161
+ "fumadocs-core": "16.10.2",
162
162
  "tsconfig": "0.0.0"
163
163
  },
164
164
  "peerDependencies": {
@@ -168,7 +168,7 @@
168
168
  "next": "16.x.x",
169
169
  "react": "^19.2.0",
170
170
  "react-dom": "^19.2.0",
171
- "fumadocs-core": "16.10.1"
171
+ "fumadocs-core": "16.10.2"
172
172
  },
173
173
  "peerDependenciesMeta": {
174
174
  "next": {