@fumadocs/base-ui 16.16.2 → 16.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/generated/docs.css +1 -1
- package/css/generated/glass.css +1 -1
- package/css/generated/home.css +1 -1
- package/css/generated/shared.css +1 -1
- package/css/generated/spacious.css +1 -1
- package/dist/components/callout.js +1 -1
- package/dist/components/codeblock.js +1 -1
- package/dist/components/dialog/search-algolia.js +5 -8
- package/dist/components/dialog/search-default.js +3 -5
- package/dist/components/dialog/search-orama.js +5 -8
- package/dist/components/dialog/search.d.ts +50 -27
- package/dist/components/dialog/search.js +149 -97
- package/dist/contexts/tree.js +4 -4
- package/dist/style.css +67 -7
- package/package.json +8 -11
package/css/generated/docs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!header !showItem *:col-start-1 *:my-auto *:pointer-events-auto *:rounded-md *:row-start-1 *:w-(--fd-sidebar-width) --fd-docs-height --fd-docs-row-1 --fd-docs-row-2 --fd-docs-row-3 --fd-header-height --fd-layout-width --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-popover-height:0px] [--fd-toc-width:0px] [grid-area:header] [grid-area:main] [grid-area:sidebar] [grid-area:toc-popover] [grid-area:toc] aiChat aria-valuemax aria-valuemin aria-valuenow article 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 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-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-full data-hovered data-layout-content data-layout-main data-sidebar-collapsed data-sidebar-panel data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots duration-250 edit flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including inert information inset-e-0 inset-s-4 inset-y-2 isNavTransparent isTop items-end justify-items-center justify-self-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:in-data-[sidebar-collapsed=true]:pt-16 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) ms-px mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside p-0 pagination pb-1.5 pe-0 pe-
|
|
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] aiChat aria-valuemax aria-valuemin aria-valuenow article 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 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-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-full data-hovered data-layout-content data-layout-main data-sidebar-collapsed data-sidebar-panel data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots duration-250 edit flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including inert information inset-e-0 inset-s-4 inset-y-2 isNavTransparent isTop items-end justify-items-center justify-self-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:in-data-[sidebar-collapsed=true]:pt-16 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) ms-px mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside p-0 pagination pb-1.5 pe-0 pe-4 pointer-events-none popover 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 showItem sidebarEnabled sidebarProps single size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover takes 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-[--fd-sidebar-col] transition-[opacity,translate,color] transition-[opacity,translate] transition-[opacity,visibility] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typography under unlisted updated useBaseSlots useDocsLayout useDocsPage useFooterItems useIsScrollTop useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:border-s xl:h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] xl:hidden xl:in-data-[sidebar-collapsed=true]:pt-14 xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 xl:sticky xl:top-(--fd-docs-row-1) z-10 z-20 z-30");
|
package/css/generated/glass.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!footer --bleed --drawer-swipe-movement-x --drawer-swipe-progress --drawer-swipe-strength --fd-header-height --fd-left-width --fd-main-width --fd-right-width --row --viewport-padding --width -me-1.5 -mr-(--bleed) -mt-1.5 -mx-1 -translate-x-[280px] @base-ui/react @default @sm:max-w-[200px] [--bleed:3rem] [--fd-left-width:0px] [--fd-main-width:900px] [--fd-right-width:0px] [--row:calc(3*var(--spacing))] [--row:calc(6*var(--spacing))] [--viewport-padding:0px] [grid-area:left-margin/left-margin/right/right] [grid-area:left] [grid-area:main] [grid-area:right/right-margin/right/right] [grid-area:right] [mask-image:linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent))] [mask-image:radial-gradient(circle_at_center_right,white,white_200px,transparent_500px)] [transform:translateX(var(--drawer-swipe-movement-x))] aiChat article autoScroll available backdrop-blur-sm bar baseVariants be because before behind bg-fd-muted-foreground/50 bg-fd-popover/80 bleed bug but clientX contentProps could data-[active=false]:hover:text-fd-accent-foreground data-ending-style:[transform:translateX(calc(100%-var(--bleed)+var(--viewport-padding)+2px))] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-fd-full data-popup-open:bg-fd-accent data-starting-style:[transform:translateX(calc(100%-var(--bleed)+var(--viewport-padding)+2px))] data-swiping:duration-0 data-swiping:select-none defaultSlots defaultTabs drawerHandle duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] edit exitTimerRef fact fd-glass-layout flex-row-reverse font-semibold footer footerList fumadocs-core/breadcrumb get getBreadcrumbItemsFromPath grid-cols-1 gridTemplate gridTemplateRows h-0 h-6 h-8 h-[calc(100dvh---spacing(4))] hover hover:decoration-dashed hover:decoration-fd-muted-foreground hover:opacity-80 hover:underline hover:underline-offset-4 inAnimation including information innerWidth interrupted isLayoutTabActive itemTriggerVariants items-start items-stretch justify-end justify-self-end layout:[--fd-main-width:1200px] leaves left left-margin leftSpace lg linkItems longer max-md:bg-linear-to-t max-md:bottom-0 max-md:from-fd-background max-md:h-16 max-md:hidden max-md:mt-auto max-md:pb-4 max-md:ps-[calc(--spacing(1.5)-1px)] max-md:w-4 max-w-[calc(100vw-3rem+var(--bleed))] max-xl:-translate-y-1/2 max-xl:bg-fd-popover max-xl:end-1 max-xl:grid-cols-[calc(240px---spacing(6))] max-xl:mask-none max-xl:max-h-[calc(100dvh---spacing(32))] max-xl:overflow-clip max-xl:p-3 max-xl:ps-[calc(--spacing(2.5)-1px)] max-xl:rounded-xl max-xl:shadow-md max-xl:text-fd-popover-foreground max-xl:top-1/2 max-xl:w-6 max-xl:w-[240px] mb-8 md:bg-linear-to-b md:from-fd-background md:h-(--fd-header-height) md:layout:[--fd-header-height:--spacing(12)] md:layout:[--fd-left-width:0px] md:layout:[--fd-left-width:280px] md:layout:[--fd-right-width:12px] md:pb-8 md:pt-16 md:pt-2 md:px-2 md:py-1.5 md:top-0 min-h-dvh min-h-full mt-2 mt-2.5 mt-4 mx-2 my-2 nd-mobile-sidebar nd-toc nd-toc-title no onPointerDown opacity-100 opacity-[calc(1-var(--drawer-swipe-progress))] overflow-y-hidden p-(--viewport-padding) p-0 p-6 pagination pb-16 pb-4 pe-3 pe-3.5 pen pointer pointer-events-none pr-(--bleed)
|
|
1
|
+
@source inline("!footer --bleed --drawer-swipe-movement-x --drawer-swipe-progress --drawer-swipe-strength --fd-header-height --fd-left-width --fd-main-width --fd-right-width --row --viewport-padding --width -me-1.5 -mr-(--bleed) -mt-1.5 -mx-1 -translate-x-[280px] @base-ui/react @default @sm:max-w-[200px] [--bleed:3rem] [--fd-left-width:0px] [--fd-main-width:900px] [--fd-right-width:0px] [--row:calc(3*var(--spacing))] [--row:calc(6*var(--spacing))] [--viewport-padding:0px] [grid-area:left-margin/left-margin/right/right] [grid-area:left] [grid-area:main] [grid-area:right/right-margin/right/right] [grid-area:right] [mask-image:linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent))] [mask-image:radial-gradient(circle_at_center_right,white,white_200px,transparent_500px)] [transform:translateX(var(--drawer-swipe-movement-x))] aiChat article autoScroll available backdrop-blur-sm bar baseVariants be because before behind bg-fd-muted-foreground/50 bg-fd-popover/80 bleed bug but clientX contentProps could data-[active=false]:hover:text-fd-accent-foreground data-ending-style:[transform:translateX(calc(100%-var(--bleed)+var(--viewport-padding)+2px))] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-fd-full data-popup-open:bg-fd-accent data-starting-style:[transform:translateX(calc(100%-var(--bleed)+var(--viewport-padding)+2px))] data-swiping:duration-0 data-swiping:select-none defaultSlots defaultTabs drawerHandle duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] edit exitTimerRef fact fd-glass-layout flex-row-reverse font-semibold footer footerList fumadocs-core/breadcrumb get getBreadcrumbItemsFromPath grid-cols-1 gridTemplate gridTemplateRows h-0 h-6 h-8 h-[calc(100dvh---spacing(4))] hover hover:decoration-dashed hover:decoration-fd-muted-foreground hover:opacity-80 hover:underline hover:underline-offset-4 inAnimation including information innerWidth interrupted isLayoutTabActive itemTriggerVariants items-start items-stretch justify-end justify-self-end layout:[--fd-main-width:1200px] leaves left left-margin leftSpace lg linkItems longer max-md:bg-linear-to-t max-md:bottom-0 max-md:from-fd-background max-md:h-16 max-md:hidden max-md:mt-auto max-md:pb-4 max-md:ps-[calc(--spacing(1.5)-1px)] max-md:w-4 max-w-[calc(100vw-3rem+var(--bleed))] max-xl:-translate-y-1/2 max-xl:bg-fd-popover max-xl:end-1 max-xl:grid-cols-[calc(240px---spacing(6))] max-xl:mask-none max-xl:max-h-[calc(100dvh---spacing(32))] max-xl:overflow-clip max-xl:p-3 max-xl:ps-[calc(--spacing(2.5)-1px)] max-xl:rounded-xl max-xl:shadow-md max-xl:text-fd-popover-foreground max-xl:top-1/2 max-xl:w-6 max-xl:w-[240px] mb-8 md:bg-linear-to-b md:from-fd-background md:h-(--fd-header-height) md:layout:[--fd-header-height:--spacing(12)] md:layout:[--fd-left-width:0px] md:layout:[--fd-left-width:280px] md:layout:[--fd-right-width:12px] md:pb-8 md:pt-16 md:pt-2 md:px-2 md:py-1.5 md:top-0 min-h-dvh min-h-full mt-2 mt-2.5 mt-4 mx-2 my-2 nd-mobile-sidebar nd-toc nd-toc-title no onPointerDown opacity-100 opacity-[calc(1-var(--drawer-swipe-progress))] overflow-y-hidden p-(--viewport-padding) p-0 p-6 pagination pb-16 pb-4 pe-3 pe-3.5 pen pointer pointer-events-none pr-(--bleed) provided ps-2.5 ps-3 ps-4.5 pt-2 pt-4 push reason right right-margin rightIcon scrollbar scrollbar-width scrolling setDate setInAnimation setMobileOpen shadow-fd-background shouldOpen simplest size-10 size-12 size-3.5! size-4! somehow start supports-[-webkit-touch-callout:none]:[--bleed:0px] supports-[-webkit-touch-callout:none]:[--viewport-padding:0.625rem] supports-[-webkit-touch-callout:none]:absolute supports-[-webkit-touch-callout:none]:border supports-[-webkit-touch-callout:none]:rounded-xl swipeDirection text-[1.75em] text-end text-fd-foreground text-fd-primary/80 timeout timezone touch-auto transition-[background-color,width,height] transition-[grid-template-rows] transition-[opacity,height] transition-[width,height] transition-[width,padding] transitionTimerRef typography under unlisted updated useBaseSlots useFooterItems useGlassLayout w-(--width) w-[360px] w-[calc(280px---spacing(2))] workaround xl:[@media(hover:none)]:[--row:calc(6*var(--spacing))] xl:[@media(hover:none)]:h-6 xl:[@media(hover:none)]:h-px xl:[@media(hover:none)]:opacity-100 xl:[@media(hover:none)]:pointer-events-auto xl:[@media(hover:none)]:w-(--width) xl:bg-fd-popover xl:border xl:flex-row-reverse xl:h-[calc(100dvh---spacing(10))] xl:h-[calc(100dvh-var(--fd-header-height)---spacing(4))] xl:hidden xl:items-center xl:items-end xl:layout:[--fd-right-width:240px] xl:me-2 xl:pe-4 xl:rounded-2xl xl:shadow-sm xl:sticky xl:text-end xl:top-10 xl:top-[calc(var(--fd-header-height)+--spacing(2))] z-10 z-20 z-30 zero");
|
package/css/generated/home.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!isNavTransparent --available-width --duration --easing --fd-layout-width --popup-height --positioner-height -me-1.5 -ms-1.5 -mx-1 [--fd-layout-width:1400px] asChild backdrop-blur-md been before:absolute before:content-[''] bg-fd-background/80 bg-fd-popover/80 box-border but click collisionPadding data-[active=true]:font-medium data-[side=bottom]:before:h-2.5 data-[side=bottom]:before:left-0 data-[side=bottom]:before:right-0 data-[side=bottom]:before:top-[-10px] data-[side=left]:before:bottom-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:top-0 data-[side=left]:before:w-2.5 data-[side=right]:before:bottom-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:top-0 data-[side=right]:before:w-2.5 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:h-2.5 data-[side=top]:before:left-0 data-[side=top]:before:right-0 data-ending-style:data-[activation-direction=left]:translate-x-1/2 data-ending-style:data-[activation-direction=right]:-translate-x-1/2 data-ending-style:duration-150 data-instant:transition-none data-starting-style:data-[activation-direction=left]:-translate-x-1/2 data-starting-style:data-[activation-direction=right]:translate-x-1/2 defaultVariants defaults does duration-(--duration) ease-(--easing) enableHoverToOpen first:ms-0 font-bold font-semibold gap-2.5 grid-cols-1 h-(--popup-height) h-(--positioner-height) h-14 had headerRef hideIfDisabled home hover:text-fd-popover-foreground/50 isNavTransparent isTop justify-end last:me-0 lg:grid-cols-3 lg:hidden
|
|
1
|
+
@source inline("!isNavTransparent --available-width --duration --easing --fd-layout-width --popup-height --positioner-height -me-1.5 -ms-1.5 -mx-1 [--fd-layout-width:1400px] asChild backdrop-blur-md been before:absolute before:content-[''] bg-fd-background/80 bg-fd-popover/80 box-border but click collisionPadding data-[active=true]:font-medium data-[side=bottom]:before:h-2.5 data-[side=bottom]:before:left-0 data-[side=bottom]:before:right-0 data-[side=bottom]:before:top-[-10px] data-[side=left]:before:bottom-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:top-0 data-[side=left]:before:w-2.5 data-[side=right]:before:bottom-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:top-0 data-[side=right]:before:w-2.5 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:h-2.5 data-[side=top]:before:left-0 data-[side=top]:before:right-0 data-ending-style:data-[activation-direction=left]:translate-x-1/2 data-ending-style:data-[activation-direction=right]:-translate-x-1/2 data-ending-style:duration-150 data-instant:transition-none data-starting-style:data-[activation-direction=left]:-translate-x-1/2 data-starting-style:data-[activation-direction=right]:translate-x-1/2 defaultVariants defaults does duration-(--duration) ease-(--easing) enableHoverToOpen first:ms-0 font-bold font-semibold gap-2.5 grid-cols-1 h-(--popup-height) h-(--positioner-height) h-14 had headerRef hideIfDisabled home hover:text-fd-popover-foreground/50 isNavTransparent isTop justify-end last:me-0 lg:grid-cols-3 lg:hidden linkItems list-none listRef looking max-lg:hidden max-lg:rounded-b-2xl max-lg:shadow-lg max-sm:hidden max-sm:mt-2 max-w-(--available-width) max-w-(--fd-layout-width) max-w-[240px] max-w-md mb-4 md:grid-cols-2 might mobile mt-4 navEnabled navItemVariants nd-home-layout nd-nav ps-2.5 pt-2 px-6 px-8 rotate-180 sm:flex-row sm:hidden sm:items-center sm:justify-end temporarily text-2xl text-6xl text-base transition-[box-shadow,background-color,border-radius] transition-[opacity,transform,translate] transition-[opacity,width,height] transparentMode under useBaseSlots useHomeLayout useIsScrollTop valid");
|
package/css/generated/shared.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!collapsed !isActive !items !nested !open !title *:border-b *:data-[empty=true]:border-b-0 *:flex *:flex-col *:has-[+:last-child[data-empty=true]]:border-b-0 *:last:border-b-0 *:rounded-full ---spacing --accordion-panel-height --anchor-width --available-height --callout-color --collapsible-panel-height --color-fd- --color-fd-muted --fd-ai-chat-width --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top --transform-origin -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 @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&[hidden]:not([hidden='until-found'])]:hidden [&_svg]:size-3.5 [&_svg]:size-4 [&_svg]:size-4.5 [&_svg]:size-5 [&_svg]:size-full [&_svg]:text-fd-muted-foreground [clip-path:inset(0_0_100%)] [offset-distance:var(--offset-distance,0)] [scrollbar-width:none] a abcdefghijklmnopqrstuvwxyz234567 about absolute accordion action actions active add addEventListener advanced after algoliaClient align align-text-bottom alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allows alphabet altKey always an anchor and animate animate-pulse animation another application/json are areaRef aria-activedescendant aria-autocomplete aria-controls aria-describedby aria-expanded aria-label aria-live aria-selected as aside ask assume assumes async at auto await b backdrop-blur-lg backdrop-blur-xs background background-position backgroundColor backgroundImage backgroundSize backward banner basePath baseProps baseSlots baseUrl based became behaviour belongs beside between bg-(--callout-color)/50 bg-(--shiki-light-bg) bg-fd-accent bg-fd-background bg-fd-border bg-fd-card bg-fd-muted bg-fd-overlay bg-fd-popover bg-fd-popover/60 bg-fd-primary bg-fd-primary/10 bg-fd-secondary bg-fd-secondary/50 bg-linear-to-r bg-transparent bind bitsLeft black block blockRef blocks boolean border border-b border-l border-none border-s border-t border-transparent borderBottom bottom bottom-0 bottom-1.5 bound boundary buffer bundle button buttonVariants by cache cached can canonical case center central change changeLayout changes chat child children chooseLanguage class-variance-authority className clear client client-side clientHeight clientWidth clipPath clone close closeOnRedirect closed closing cn code col-span-full collapsed collapsible collapsing collection color colors column com combobox compact compat compatibility compatible component components composedRef computed config const container containerRef containing content contents context controlled/uncontrolled copy core counterSet createContext createMarkdownRenderer createRelativeLink css ctx current currentColor custom customize cva cx cy d dangerouslySetInnerHTML dark dark:bg-(--shiki-dark-bg) dashed data data-[active=true]:text-fd-primary data-[active]:border-fd-primary data-[active]:text-fd-primary data-[inactive]:hidden data-[popup-open]:bg-fd-accent data-[popup-open]:text-fd-accent-foreground data-accordion-value data-active data-card data-checked data-checked:text-fd-accent-foreground data-closed:animate-fd-dialog-out data-closed:animate-fd-fade-out data-closed:animate-fd-popover-out data-collapsed data-empty data-ending-style:h-0 data-ending-style:opacity-0 data-fd-search-dialog-input data-icon data-line-numbers data-line-numbers-start data-open:animate-fd-dialog-in data-open:animate-fd-fade-in data-open:animate-fd-popover-in data-ready data-ready:transition-[clip-path] data-search data-search-full data-starting-style:h-0 data-starting-style:opacity-0 data-state data-theme-toggle date debounced declare default defaultColor defaultFormatter defaultIndex defaultItems defaultLanguage defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay delayMs depends deprecated depth description desktop detect dialog dialogHandle dir disabled disabled:opacity-50 disabled:pointer-events-none display displayName displayed distance div divide-fd-border divide-x divide-y docked document documented dominantBaseline don drawer dropdown duration-100 duration-200 duration-300 duration-400 during each ease-in-out ease-out element else empty empty:hidden empty:mb-0 enabled encoded endIdx endpoint env environment equal error escape eslint-disable-next-line event export expose extends external extraProps false fd-moving-banner fd-scroll-container fd-search-dialog-content fd-search-list fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally first:mt-0 fixed flex flex-1 flex-col flex-row flex-wrap flexDirection floating flushSync focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring focus-visible:ring-inset folder folders font-medium font-mono fontSize fontWeight for forks formatter formatterOptions found fragment free from from-fd-primary/10 full fumadocs-core/framework fumadocs-core/highlight fumadocs-core/i18n fumadocs-core/link fumadocs-core/page-tree fumadocs-core/search fumadocs-core/source fumadocs-core/toc function gap gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-3.5 gap-4 gap-y-4 generated ghost github-dark github-light githubUrl given global globalKey grid grid-cols-2 grid-cols-[1fr_3fr] group group-data-[active=true]:bg-fd-primary group-data-[active=true]:text-fd-primary-foreground group-data-[open]:rotate-180 group-data-active:bg-fd-primary group-data-open:rotate-180 group-data-panel-open:rotate-90 group-hover/heading:opacity-100 group/heading groupListeners groups guides h h-(--accordion-panel-height) h-(--collapsible-panel-height) h-(--fd-animated-height) h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 hand handle handleThemeChange has-focus-visible:bg-fd-accent hash hashchange hast have header headers heading height here hidden hideLocale highlight highlighter hints hover:bg-fd-accent hover:bg-fd-accent/80 hover:bg-fd-primary/80 hover:text-fd-accent-foreground hovered hovering href html hydration i i18n i18nProvider icon icon-sm icon-xs iconClass id idea idx if if-needed ignore ignoreTyping img import in inPre inTab index infinite info initialFocus inline inline-flex input inputType inset-0 inset-e-2 inset-s-0 inset-s-3 inset-s-6 inset-x-2 inset-y-0 inside instanceof instantly instead integration interface intersect invisible is isActive isComposing isFirst isLast isLoading isUp it item itemLineLengths itemVariants items items-center its js justify-between justify-center keepBackground keepMounted key keyCode keydown keys l l0 l1 l2 label lang language languageSelect last:rounded-b-xl layer layout layout:[--fd-ai-chat-width:min(--spacing(100),100vw---spacing(4))] leading-none leaving left-0 left-1/2 length let letting level light light-dark light-dark-system line line-through linear link links list listbox listener listeners localRef 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-(--available-height) max-h-20 max-h-[460px] max-h-[600px] 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 max-xl:border max-xl:end-2 max-xl:fixed max-xl:inset-y-2 max-xl:rounded-2xl max-xl:shadow-xl max-xl:translate-x-[calc(100%+--spacing(2))] max-xl:w-(--fd-ai-chat-width) maximumFractionDigits mb-1 mb-1.5 mb-2 md:hidden md:mb-auto md:size-5 md:top-[calc(50%-250px)] mdComponents mdRenderer mdx/types.js me-1 me-1.5 me-2 me-auto measured menu menuItems mergeRefs message metaKey middle min-h-0 min-w-0 min-w-[240px] min-w-fit min-w-full mode module motion-reduce:transition-none mount mounted mouse ms-2 ms-auto mt-1 mt-6 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name names namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new newTheme next next-themes next/og node nodes none noop noopener noreferrer normal normalize not not-last:mb-2 not-prose notation note now null number numbers object observer of offsetHeight offsetPath offsetTop on onAnimationEnd onChange onClick onCopy onKey onOpenChange onOpenChangeCallback onPointerEnter onPointerLeave onPointerMove onPrint onSearchChange onSearchChangeCallback onSelect onSelectCallback onTagChange onTagChangeCallback onValueChange once one only opacity-(--opacity,0) opacity-0 open openFromHash opened option optional options or oramaCloudClient order origin-(--transform-origin) origin-center original other out outline outline-none output over overflow-auto overflow-clip overflow-hidden overflow-x-auto overflow-x-clip 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 pageUrlProp panel panels parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 per performing persist persistent place placed placeholder placeholder:text-fd-muted-foreground please pointerType points polite populated pos positions possible powered pre pre-rendering predate prefetch prev preventScroll previous previousRef primary primaryColor primaryTextColor production promises prompt prompts prop props prose prose-no-margin provide provider ps-1 ps-2 ps-4 ps-8 pt-0 pure px px-0.5 px-1 px-1.5 px-2 px-2.5 px-3 px-4 px-px py-0.5 py-1 py-1.5 py-12 py-2 py-2.5 py-3 py-3.5 q query querySelector questions rainbow rainbowColors raw re-create react react-dom react-hooks/rules-of-hooks react-medium-image-zoom read reader ref referenced region registering rehype-raw rehypeCustomElements rehypePlugins rehypeRaw rel relative remarkRehypeOptions remove removeEventListener render renderHighlights renderMarkdown repo repository required resize resizing 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:max-xl:-translate-x-[calc(100%+--spacing(2))] rtl:rotate-180 rtl:rotate-90 s same scroll scroll-into-view-if-needed scroll-m-20 scroll-m-24 scroll-m-28 scroll-m-4 scrollIntoView scrollMode search searchOptions searchToggle searchToggleEnabled searchTrigger secondary see select-none selected separate separator server set setActive setCollapsed setHidden setHover setLoading setMounted setOpen setSvg setTag setValue shadow-2xl shadow-lg shadow-md shadow-sm shiftKey shiki shikiOptions shortcuts should show showAlgolia showOrama shrink-0 side sideOffset sidebar signature simple since site size size-1 size-3 size-3.5 size-4 size-5 size-6.5 size-9 size-full sizes slots sm smaller so solid some source space span specific sr-only src stars startIdx state static status stay sticky still str string stroke stroke-fd-foreground/10 stroke-fd-primary strokeLinecap strokeLinejoin strokeWidth strong style styles success supported supposed sure svg switch switcher sync system t tab tabIndex table tabs tabsRef tag tagName tags take target text text-(--callout-color) text-[0.8125rem] text-[0.8125rem]/5 text-[0.9375rem] text-[10px] text-center text-fd-accent-foreground text-fd-card text-fd-card-foreground text-fd-foreground/80 text-fd-muted-foreground text-fd-muted-foreground/50 text-fd-popover-foreground text-fd-popover-foreground/80 text-fd-primary text-fd-primary-foreground text-fd-primary/50 text-fd-secondary-foreground text-lg text-nowrap text-sm text-start text-xs text/plain textAnchor textContent that the their theme themeAriaLabels themeSwitch themeSwitchEnabled themes then this throw thumbBox tier timerRef tip title to toc tocInfo toolbar top top-0 top-1/2 top-2 top-2.5 top-4 touch transform transition-[clip-path] transition-[height,opacity] transition-[height] transition-[opacity,offset-distance] transition-[width,margin,translate,visibility] transition-[width,margin,translate] transition-all transition-colors transition-opacity transition-transform translationKeys translations translations/keys.json transparent tree trigger triggers true truncate try type typeof types unchanged undefined underline underlying understand unified unist-util-visit unknown unnecessarily update updateAnchor updates upperX url urls us usage use useCopyButton useDocsSearch useHotKey useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange usePathname useProps useRef useRouter useSearchContext useSidebar useState useSyncExternalStore useTOCItems useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visible visit vite void w w-(--anchor-width) w-(--fd-ai-chat-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces wide width will window with without work wrap wrap-anywhere wrapElement wrapInSuspense wrapped x x1 x2 xl:w-(--fd-ai-chat-width) 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 *:first:font-medium *:first:text-fd-primary *:flex *:flex-col *:has-[+:last-child[data-empty=true]]:border-b-0 *:last:border-b-0 *:mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)] *:not-first:text-fd-muted-foreground *:nth-2:text-xs *:rounded-full ---spacing --accordion-panel-height --anchor-width --available-height --callout-color --collapsible-panel-height --color-fd- --color-fd-muted --fd-ai-chat-width --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top --transform-origin -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 @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&[hidden]:not([hidden='until-found'])]:hidden [&_::highlight(fd-search)]:text-fd-primary [&_::highlight(fd-search)]:underline [&_svg]:size-3.5 [&_svg]:size-4 [&_svg]:size-4.5 [&_svg]:size-5 [&_svg]:size-full [&_svg]:text-fd-muted-foreground [clip-path:inset(0_0_100%)] [offset-distance:var(--offset-distance,0)] [scrollbar-width:none] a abcdefghijklmnopqrstuvwxyz234567 about absolute accordion action actions active activeItem add addEventListener advanced after align align-text-bottom alignItems alignmentBaseline all allowClear allowCopy allows alphabet altKey always an anchor and animate animate-pulse animation another application/json are areaRef aria-activedescendant aria-autocomplete aria-controls aria-describedby aria-expanded aria-hidden aria-label aria-labelledby aria-live aria-selected as aside ask assume assumes async at auto await b backdrop-blur-lg backdrop-blur-xs background background-position backgroundColor backgroundImage backgroundSize backward banner basePath baseProps baseSlots baseUrl based became behaviour belongs beside between bg-(--callout-color)/50 bg-(--shiki-light-bg) bg-fd-accent bg-fd-background bg-fd-border bg-fd-card bg-fd-muted bg-fd-overlay bg-fd-popover bg-fd-popover/60 bg-fd-primary bg-fd-primary/10 bg-fd-secondary bg-fd-secondary/50 bg-linear-to-r bg-transparent bind bitsLeft black block blockRef boolean border border-b border-l border-none border-s border-t border-transparent borderBottom bottom bottom-0 bottom-1.5 bound boundary buffer bundle button buttonVariants by cache cached can canonical cards case cells center central change changeLayout changes chat child children chooseLanguage class-variance-authority className clear client client-side clientHeight clientWidth clients clipPath clone close closeOnRedirect closed closing cn code col-span-full collapsed collapsible collapsing collection color colors column columns com combobox compact compat compatibility compatible component components composedRef computed config const container containerRef containing content contents context controlled/uncontrolled copy core counterSet createContext createRelativeLink css ctx current currentColor cursor-default custom customize cva cx cy d dangerouslySetInnerHTML dark dark:bg-(--shiki-dark-bg) dashed data data-[active=true]:text-fd-primary data-[active]:border-fd-primary data-[active]:text-fd-primary data-[inactive]:hidden data-[popup-open]:bg-fd-accent data-[popup-open]:text-fd-accent-foreground data-accordion-value data-active data-card data-checked data-checked:text-fd-accent-foreground data-closed:animate-fd-dialog-out data-closed:animate-fd-fade-out data-closed:animate-fd-popover-out data-collapsed data-empty data-ending-style:h-0 data-ending-style:opacity-0 data-fd-search-dialog-input data-highlight-ignore data-icon data-line-numbers data-line-numbers-start data-open:animate-fd-dialog-in data-open:animate-fd-fade-in data-open:animate-fd-popover-in data-ready data-ready:transition-[clip-path] data-search data-search-full data-starting-style:h-0 data-starting-style:opacity-0 data-state data-theme-toggle date debounced declare default defaultColor defaultFormatter defaultIndex defaultItems defaultLanguage defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay delayMs depends deprecated depth description desktop detect development dialog dialogHandle dir disabled disabled:opacity-50 disabled:pointer-events-none display displayName displayed distance div divide-fd-border divide-x divide-y docked document documented dominantBaseline don drawer dropdown duration-100 duration-200 duration-300 duration-400 during each ease-in-out ease-out element else empty empty:hidden empty:mb-0 enabled encoded endIdx endpoint env environment equal error escape eslint-disable-next-line event export expose extends external extraProps false fd-moving-banner fd-scroll-container fd-search-dialog-content fd-search-list fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally first:mt-0 fixed flex flex-1 flex-col flex-row flex-wrap flexDirection floating flushSync focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring focus-visible:ring-inset folder folders font-medium font-mono fontSize fontWeight for forks formatter formatterOptions found free from from-fd-primary/10 full fumadocs-core/framework fumadocs-core/highlight fumadocs-core/i18n fumadocs-core/link fumadocs-core/page-tree fumadocs-core/search fumadocs-core/source fumadocs-core/toc function gap gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-3.5 gap-4 gap-x-3 gap-y-4 generated getActive ghost github-dark github-light githubUrl given global globalKey grid grid-cols-2 grid-cols-[1fr_3fr] grid-cols-subgrid gridTemplateColumns group group-data-[active=true]:bg-fd-primary group-data-[active=true]:text-fd-primary-foreground group-data-[open]:rotate-180 group-data-active:bg-fd-primary group-data-open:rotate-180 group-data-panel-open:rotate-90 group-hover/heading:opacity-100 group/heading groupListeners groups guides h h-(--accordion-panel-height) h-(--collapsible-panel-height) h-(--fd-animated-height) h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 hand handle handleThemeChange has-focus-visible:bg-fd-accent hash hashchange hast-util-to-jsx-runtime hastContent have header headerId headers heading height hidden hideLocale highlight highlightRef highlighter hints hover:bg-fd-accent hover:bg-fd-accent/80 hover:bg-fd-primary/80 hover:text-fd-accent-foreground hovered hovering href html hydration i i18n i18nProvider icon icon-sm icon-xs iconClass id idea idx if if-needed ignore ignoreTyping img import in inTab index infinite info initialFocus inline inline-flex input inputType inset-0 inset-e-2 inset-s-0 inset-s-3 inset-s-6 inset-x-2 inset-y-0 inside instanceof instantly instead integration interface intersect invisible is isActive isComposing isFirst isLast isLoading isUp it item itemLineLengths itemVariants items items-baseline items-center itemsProp its js justify-between justify-center keepBackground keepMounted key keyCode keydown keys l l0 l1 l2 label lang language languageSelect last last:line-clamp-2 last:rounded-b-xl layer layout layout:[--fd-ai-chat-width:min(--spacing(100),100vw---spacing(4))] lays leading-5 leading-none leaving left-0 left-1/2 length let letting level light light-dark light-dark-system like line line-through linear link links list listbox listener listeners localRef 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)] maskComposite maskImage max-h-(--available-height) max-h-20 max-h-[460px] max-h-[600px] 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 max-xl:border max-xl:end-2 max-xl:fixed max-xl:inset-y-2 max-xl:rounded-2xl max-xl:shadow-xl max-xl:translate-x-[calc(100%+--spacing(2))] max-xl:w-(--fd-ai-chat-width) maximumFractionDigits mb-1 mb-1.5 mb-2 md:hidden md:mb-auto md:size-5 md:top-[calc(50%-250px)] mdComponents mdx/types.js me-1 me-1.5 me-2 me-auto measured menu menuItems mergeRefs message metaKey middle min-h-0 min-w-0 min-w-[240px] min-w-fit min-w-full mode module motion-reduce:transition-none mount mounted mouse ms-2 ms-3 ms-auto mt-1 mt-6 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name names namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new newTheme next next-themes next/og node nodes none noop noopener noreferrer normal normalize not not-first:border-t not-last:mb-2 not-last:truncate not-prose notation note now null number numbers object observer of offsetHeight offsetPath offsetTop on onAnimationEnd onChange onClick onCopy onKey onOpenChange onOpenChangeCallback onPointerEnter onPointerLeave onPointerMove onPrint onSearchChange onSearchChangeCallback onSelect onSelectCallback onTagChange onTagChangeCallback onValueChange once one only opacity-(--opacity,0) opacity-0 open openFromHash opened option optional options or order origin-(--transform-origin) origin-center original other out outline outline-none output over overflow-auto overflow-clip overflow-hidden overflow-x-auto overflow-x-clip 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 pageUrlProp panel panels parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 pe-2.5 per performing persist persistent place placed placeholder placeholder:text-fd-muted-foreground please pointerType points polite populated pos positions possible powered pre pre-rendering predate prefetch prev preventScroll previous previousRef primary primaryColor primaryTextColor production promises prompt prompts prop props prose prose-no-margin prose-sm provide provider ps-1 ps-2 ps-3.25 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 py-0.5 py-1 py-1.5 py-12 py-2 py-2.5 py-3 py-3.5 q query querySelector questions rainbow rainbowColors raw re-create re-render react react-dom react-hooks/rules-of-hooks react-medium-image-zoom react/jsx-runtime read reader ref referenced region registering rel relative remove removeEventListener render renderOptions repo repository required resize resizing 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 rowRenderOptions rows rtl:-scale-x-100 rtl:max-xl:-translate-x-[calc(100%+--spacing(2))] rtl:rotate-180 rtl:rotate-90 s same scroll scroll-into-view-if-needed scroll-m-20 scroll-m-24 scroll-m-28 scroll-m-4 scrollIntoView scrollMode search searchOptions searchToggle searchToggleEnabled searchTrigger secondary see select-none selected separate separator server set setActive setCollapsed setHidden setHover setLoading setMounted setOpen setSvg setTag setValue shadow-2xl shadow-lg shadow-md shadow-sm shiftKey shiki shikiOptions shortcuts should show showAlgolia showOrama shown shows shrink-0 side sideOffset sidebar signature simple since site size size-1 size-3 size-3.5 size-4 size-5 size-6.5 size-9 size-full sizes slots sm smaller so solid some source space span specific sr-only src stars startIdx state static status stay sticky still str string stroke stroke-fd-foreground/10 stroke-fd-primary strokeLinecap strokeLinejoin strokeWidth style styles subscribe subscribeActive success successful supported supposed sure svg switch switcher system t tab tabIndex table tableRenderOptions tables tabs tabsRef tag tagName tags take target tbody td text text-(--callout-color) text-[0.8125rem] text-[0.8125rem]/5 text-[0.9375rem] text-[10px] text-center text-fd-accent-foreground text-fd-card text-fd-card-foreground text-fd-foreground/80 text-fd-muted-foreground text-fd-muted-foreground/50 text-fd-popover-foreground text-fd-popover-foreground/80 text-fd-primary text-fd-primary-foreground text-fd-primary/50 text-fd-secondary-foreground text-inherit text-lg text-nowrap text-sm text-start text-xs text/plain textAnchor textContent th that the thead their them theme themeAriaLabels themeSwitch themeSwitchEnabled themes then they this throw thumbBox tier timerRef tip title to toJsxRuntime toc tocInfo toolbar top top-0 top-1/2 top-2 top-2.5 top-4 touch tr transform transition-[clip-path] transition-[height,opacity] transition-[height] transition-[opacity,offset-distance] transition-[width,margin,translate,visibility] transition-[width,margin,translate] transition-all transition-colors transition-opacity transition-transform translationKeys translations translations/keys.json transparent tree trigger triggers true truncate try type typeof types unchanged undefined underline underlying understand unknown unnecessarily update updateAnchor updates upperX url urls us usage use useAlgoliaSearch useCopyButton useDocsSearch useHotKey useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange useOramaCloudSearch usePathname useProps useRef useRouter useSearchContext useSidebar useState useSyncExternalStore useTOCItems useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visible vite void w w-(--anchor-width) w-(--fd-ai-chat-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces wide width will window with without work wrap wrap-anywhere wrapElement wrapInSuspense wrapped x x1 x2 xl:w-(--fd-ai-chat-width) xmlns y y1 y2 you your z-2 z-40 z-50 zoom zoomImg zoomMargin");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!header !selected *:min-w-[calc(var(--fd-toc-width)---spacing(16))] *:not-first:border-t *:pointer-events-auto --available-width --fd-docs-row-3 --fd-header-height --fd-layout-height --fd-page-width --fd-roll --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width --index -ms-2 -mx-1.5 -start-1 -translate-x-3 @max-5xl:invisible @max-5xl:opacity-0 @max-5xl:opacity-100 @max-5xl:ps-0 @max-5xl:transition-none @max-5xl:visible @max-5xl:w-0 @max-md:col-span-full [&>[data-icon]]:size-3.5 [&_svg]:shrink-0 [--fd-header-height:--spacing(14)] [--fd-layout-height:calc(100dvh-var(--fd-banner-height,0px))] [--fd-page-width:760px] [--fd-sidebar-col:var(--fd-sidebar-width)] [--fd-sidebar-width:0px] [--fd-toc-width:0px] [clip-path:inset(0_-8px_-8px)] [grid-area:header] [grid-area:main] [grid-area:right] [grid-area:sidebar] [grid-area:toc-popover] above activeClassName activeLine aiChat alignOffset along angle apart appear area aria-
|
|
1
|
+
@source inline("!header !selected *:min-w-[calc(var(--fd-toc-width)---spacing(16))] *:not-first:border-t *:pointer-events-auto --available-width --fd-docs-row-3 --fd-header-height --fd-layout-height --fd-page-width --fd-roll --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width --index -ms-2 -mx-1.5 -start-1 -translate-x-3 @max-5xl:invisible @max-5xl:opacity-0 @max-5xl:opacity-100 @max-5xl:ps-0 @max-5xl:transition-none @max-5xl:visible @max-5xl:w-0 @max-md:col-span-full [&>[data-icon]]:size-3.5 [&_svg]:shrink-0 [--fd-header-height:--spacing(14)] [--fd-layout-height:calc(100dvh-var(--fd-banner-height,0px))] [--fd-page-width:760px] [--fd-sidebar-col:var(--fd-sidebar-width)] [--fd-sidebar-width:0px] [--fd-toc-width:0px] [clip-path:inset(0_-8px_-8px)] [grid-area:header] [grid-area:main] [grid-area:right] [grid-area:sidebar] [grid-area:toc-popover] above activeClassName activeLine aiChat alignOffset along angle apart appear area aria-valuemax aria-valuemin aria-valuenow article available bar bars before bg-clip-content bg-fd-accent/60 bg-linear-to-b bg-origin-border border-x breadcrumb breadcrumbEnabled circle circumference clerk click closeOnClick col-start-2 collapse comes coming controller createLinkItemRenderer createPageTreeRenderer customSlots data-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-sidebar-in data-ending-style:duration-100 data-ending-style:scale-95 data-ending-style:scale-97 data-full data-highlighted:bg-fd-accent data-highlighted:text-fd-accent-foreground data-highlighted:text-fd-foreground data-popup-open:bg-fd-accent data-popup-open:text-fd-accent-foreground data-starting-style:scale-95 defaultVariants direction docs duration duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] easing edit end fade fallback fd-spacious-layout first:mt-1 focusin focusout font-semibold footer footerEnabled footerList from-50% from-fd-background fumadocs-core/breadcrumb gap-2.5 gaps getBreadcrumbItemsFromPath glide glides gliding gridTemplate group-hover:-translate-x-0.5 group-hover:translate-x-0.5 gutter h-(--fd-header-height) h-10 h-7.5 h-8 h-[calc(var(--fd-layout-height)-var(--fd-header-height)-100%)] has hasFolders hideIfDisabled hold hover hover:bg-fd-accent/40 hover:bg-fd-accent/60 hover:text-fd-foreground iconLinks in-data-popup-open:rotate-180 includePage includeRoot including inert information initial inset inset-e-0 inset-x-0 inset-y-1 inset-y-2 into itemClass itemOf items-end items-start keep keyboard labels layout:[--fd-page-width:1200px] layout:[--fd-toc-width:--spacing(76)] left lg:hidden linkItems mask-b-from-[calc(100%-32px)] mask-t-from-[calc(100%-16px)] max-h-[50vh] max-h-[min(28rem,var(--available-height))] max-lg:hidden max-md:[--fd-docs-row-3:calc(var(--fd-banner-height,0px)+var(--fd-header-height)+var(--fd-toc-popover-height,0px))] max-md:hidden max-md:layout:[--fd-toc-popover-height:--spacing(10)] max-w-(--available-width) max-w-(--fd-page-width) max-w-95 may mb-6 mb-8 md:border md:h-(--fd-layout-height) md:layout:[--fd-sidebar-col:--spacing(2)] md:layout:[--fd-sidebar-width:268px] md:min-h-0 md:ms-0 md:my-2 md:overflow-clip md:overflow-y-auto md:overscroll-y-contain md:pt-(--fd-header-height) md:px-[max(--spacing(6),calc((100%-var(--fd-page-width)-var(--fd-toc-width))/2))] md:rounded-2xl md:scrollbar-gutter-stable md:scrollbar-thin md:shadow-sm min-h-(--fd-layout-height) min-h-9 min-w-44 mobile motion-safe:animate-fd-roll-in motion-safe:transition-[translate,width,height,opacity] move mt-0.5 mt-2 mt-4 mt-8 mx-0.5 mx-2 my-2 navbar nd-page nd-page-panel nd-subnav nd-toc opacity origin outline-8 outline-fd-card outside p-0 pagination pb-4 pb-8 pe-1 pe-3 pe-4 picked pointer-events-none pointerleave pointerover popover popupClass position positionMethod prefers-reduced-motion print:h-auto print:overflow-visible progressbar ps-0 ps-16 ps-2.5 ps-3.5 ps-5.5 ps-6 ps-[calc(--spacing(2.5)-1px)] pt-4 pt-6 pt-8 px-[calc(--spacing(2.5)-1px)] queries rect remain right ring-1 ring-fd-border roll rolls rotate rotate-180 rounded rounded-t-2xl rtl:-translate-x-[calc(var(--index)*100%)] rtl:translate-x-3 scale scrolling selectProgress selectTopmost selectors self-start separators setShown setTheme shadow-xl shorter signal single size-3.5! size-4.5 size-7 size-8 soft start start-0 start-0.5 starts stroke-current/25 strokeDasharray strokeDashoffset tableOfContent tableOfContentPopover tabsOptions text-[1.75em] text-end text-fd-foreground timezone to-40% to-[16px] to-transparent toc-popover tocEnabled tocPopoverEnabled tocPopoverProps tocProps top-(--fd-banner-height,0px) top-0.5 top-[calc(var(--fd-banner-height,0px)+var(--fd-header-height))] top-full transition-[grid-template-columns] transition-[opacity,scale] transition-[opacity,translate] transition-[opacity,visibility] transition-[stroke-dashoffset] transition-[width,padding,opacity,visibility] transitionProperty translate translate-x-[calc(var(--index)*100%)] turn turns typography under unlisted updated useBaseSlots useBreadcrumbItems useFooterItems useSpaciousLayout useTOCSelector used viewports w-(--fd-sidebar-width) w-(--fd-toc-width) w-64 w-88 w-[85%] w-[calc(var(--anchor-width)+--spacing(2))] wider xl:bg-fd-background xl:border xl:me-2 xl:my-2 xl:rounded-2xl xl:shadow-sm z-10 z-30");
|
|
@@ -17,7 +17,7 @@ function resolveAlias(type) {
|
|
|
17
17
|
function CalloutContainer({ type: inputType = "info", icon, children, className, style, ...props }) {
|
|
18
18
|
const type = resolveAlias(inputType);
|
|
19
19
|
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
-
className: cn("flex gap-2 my-4 rounded-xl border bg-fd-card p-3 ps-1 text-sm text-fd-card-foreground
|
|
20
|
+
className: cn("flex gap-2 my-4 rounded-xl border bg-fd-card p-3 ps-1 text-sm text-fd-card-foreground", className),
|
|
21
21
|
style: {
|
|
22
22
|
"--callout-color": `var(--color-fd-${type}, var(--color-fd-muted))`,
|
|
23
23
|
...style
|
|
@@ -30,7 +30,7 @@ function CodeBlock({ ref, title, allowCopy = true, keepBackground = false, icon,
|
|
|
30
30
|
dir: "ltr",
|
|
31
31
|
...props,
|
|
32
32
|
tabIndex: -1,
|
|
33
|
-
className: cn(inTab ? "bg-fd-secondary -mx-px -mb-px last:rounded-b-xl" : "my-4 bg-fd-card rounded-xl", keepBackground && "bg-(--shiki-light-bg) dark:bg-(--shiki-dark-bg)", "shiki relative border
|
|
33
|
+
className: cn(inTab ? "bg-fd-secondary -mx-px -mb-px last:rounded-b-xl" : "my-4 bg-fd-card rounded-xl", keepBackground && "bg-(--shiki-light-bg) dark:bg-(--shiki-dark-bg)", "shiki relative border not-prose overflow-hidden text-sm", props.className),
|
|
34
34
|
children: [title ? /* @__PURE__ */ jsxs("div", {
|
|
35
35
|
className: "flex text-fd-muted-foreground items-center gap-2 h-9.5 border-b px-4",
|
|
36
36
|
children: [
|
|
@@ -4,17 +4,16 @@ import { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFoote
|
|
|
4
4
|
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
|
-
import {
|
|
8
|
-
import { algoliaClient } from "fumadocs-core/search/client/algolia";
|
|
7
|
+
import { useAlgoliaSearch } from "fumadocs-core/search/client";
|
|
9
8
|
//#region src/components/dialog/search-algolia.tsx
|
|
10
9
|
function AlgoliaSearchDialog({ searchOptions, tags = [], defaultTag, showAlgolia = false, allowClear = false, links = [], footer, ...props }) {
|
|
11
10
|
const [tag, setTag] = useState(defaultTag);
|
|
12
11
|
const { locale } = useI18n();
|
|
13
|
-
const
|
|
12
|
+
const search = useAlgoliaSearch({
|
|
14
13
|
tag,
|
|
15
14
|
locale,
|
|
16
15
|
...searchOptions
|
|
17
|
-
})
|
|
16
|
+
});
|
|
18
17
|
const defaultItems = useMemo(() => {
|
|
19
18
|
if (links.length === 0) return null;
|
|
20
19
|
return links.map(([name, link]) => ({
|
|
@@ -29,9 +28,7 @@ function AlgoliaSearchDialog({ searchOptions, tags = [], defaultTag, showAlgolia
|
|
|
29
28
|
});
|
|
30
29
|
const label = showAlgolia && /* @__PURE__ */ jsx(AlgoliaTitle, {});
|
|
31
30
|
return /* @__PURE__ */ jsxs(SearchDialog, {
|
|
32
|
-
search,
|
|
33
|
-
onSearchChange: setSearch,
|
|
34
|
-
isLoading: query.isLoading,
|
|
31
|
+
...search,
|
|
35
32
|
...props,
|
|
36
33
|
children: [
|
|
37
34
|
/* @__PURE__ */ jsx(SearchDialogOverlay, {}),
|
|
@@ -39,7 +36,7 @@ function AlgoliaSearchDialog({ searchOptions, tags = [], defaultTag, showAlgolia
|
|
|
39
36
|
/* @__PURE__ */ jsx(SearchDialogIcon, {}),
|
|
40
37
|
/* @__PURE__ */ jsx(SearchDialogInput, {}),
|
|
41
38
|
/* @__PURE__ */ jsx(SearchDialogClose, {})
|
|
42
|
-
] }), /* @__PURE__ */ jsx(SearchDialogList, {
|
|
39
|
+
] }), /* @__PURE__ */ jsx(SearchDialogList, { defaultItems })] }),
|
|
43
40
|
/* @__PURE__ */ jsxs(SearchDialogFooter, { children: [tags.length > 0 ? /* @__PURE__ */ jsxs(TagsList, {
|
|
44
41
|
tag,
|
|
45
42
|
onTagChange: setTag,
|
|
@@ -22,7 +22,7 @@ function DefaultSearchDialog({ type, defaultTag, tags = [], api, delayMs, allowC
|
|
|
22
22
|
locale,
|
|
23
23
|
tag
|
|
24
24
|
});
|
|
25
|
-
const
|
|
25
|
+
const search = useDocsSearch({
|
|
26
26
|
client,
|
|
27
27
|
delayMs
|
|
28
28
|
});
|
|
@@ -39,9 +39,7 @@ function DefaultSearchDialog({ type, defaultTag, tags = [], api, delayMs, allowC
|
|
|
39
39
|
setTag(v);
|
|
40
40
|
});
|
|
41
41
|
return /* @__PURE__ */ jsxs(SearchDialog, {
|
|
42
|
-
search,
|
|
43
|
-
onSearchChange: setSearch,
|
|
44
|
-
isLoading: query.isLoading,
|
|
42
|
+
...search,
|
|
45
43
|
...props,
|
|
46
44
|
children: [
|
|
47
45
|
/* @__PURE__ */ jsx(SearchDialogOverlay, {}),
|
|
@@ -49,7 +47,7 @@ function DefaultSearchDialog({ type, defaultTag, tags = [], api, delayMs, allowC
|
|
|
49
47
|
/* @__PURE__ */ jsx(SearchDialogIcon, {}),
|
|
50
48
|
/* @__PURE__ */ jsx(SearchDialogInput, {}),
|
|
51
49
|
/* @__PURE__ */ jsx(SearchDialogClose, {})
|
|
52
|
-
] }), /* @__PURE__ */ jsx(SearchDialogList, {
|
|
50
|
+
] }), /* @__PURE__ */ jsx(SearchDialogList, { defaultItems })] }),
|
|
53
51
|
/* @__PURE__ */ jsxs(SearchDialogFooter, { children: [tags.length > 0 && /* @__PURE__ */ jsx(TagsList, {
|
|
54
52
|
tag,
|
|
55
53
|
onTagChange: setTag,
|
|
@@ -4,8 +4,7 @@ import { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFoote
|
|
|
4
4
|
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
|
-
import {
|
|
8
|
-
import { oramaCloudClient } from "fumadocs-core/search/client/orama-cloud";
|
|
7
|
+
import { useOramaCloudSearch } from "fumadocs-core/search/client";
|
|
9
8
|
//#region src/components/dialog/search-orama.tsx
|
|
10
9
|
/**
|
|
11
10
|
* Orama Cloud integration
|
|
@@ -13,13 +12,13 @@ import { oramaCloudClient } from "fumadocs-core/search/client/orama-cloud";
|
|
|
13
12
|
function OramaSearchDialog({ client, searchOptions, tags = [], defaultTag, showOrama = true, allowClear = false, index, footer, links = [], ...props }) {
|
|
14
13
|
const { locale } = useI18n();
|
|
15
14
|
const [tag, setTag] = useState(defaultTag);
|
|
16
|
-
const
|
|
15
|
+
const search = useOramaCloudSearch({
|
|
17
16
|
client,
|
|
18
17
|
index,
|
|
19
18
|
params: searchOptions,
|
|
20
19
|
locale,
|
|
21
20
|
tag
|
|
22
|
-
})
|
|
21
|
+
});
|
|
23
22
|
const defaultItems = useMemo(() => {
|
|
24
23
|
if (links.length === 0) return null;
|
|
25
24
|
return links.map(([name, link]) => ({
|
|
@@ -34,9 +33,7 @@ function OramaSearchDialog({ client, searchOptions, tags = [], defaultTag, showO
|
|
|
34
33
|
});
|
|
35
34
|
const label = showOrama && /* @__PURE__ */ jsx(Label, {});
|
|
36
35
|
return /* @__PURE__ */ jsxs(SearchDialog, {
|
|
37
|
-
search,
|
|
38
|
-
onSearchChange: setSearch,
|
|
39
|
-
isLoading: query.isLoading,
|
|
36
|
+
...search,
|
|
40
37
|
...props,
|
|
41
38
|
children: [/* @__PURE__ */ jsx(SearchDialogOverlay, {}), /* @__PURE__ */ jsxs(SearchDialogContent, { children: [
|
|
42
39
|
/* @__PURE__ */ jsxs(SearchDialogHeader, { children: [
|
|
@@ -44,7 +41,7 @@ function OramaSearchDialog({ client, searchOptions, tags = [], defaultTag, showO
|
|
|
44
41
|
/* @__PURE__ */ jsx(SearchDialogInput, {}),
|
|
45
42
|
/* @__PURE__ */ jsx(SearchDialogClose, {})
|
|
46
43
|
] }),
|
|
47
|
-
/* @__PURE__ */ jsx(SearchDialogList, {
|
|
44
|
+
/* @__PURE__ */ jsx(SearchDialogList, { defaultItems }),
|
|
48
45
|
/* @__PURE__ */ jsxs(SearchDialogFooter, { children: [tags.length > 0 ? /* @__PURE__ */ jsxs(TagsList, {
|
|
49
46
|
tag,
|
|
50
47
|
onTagChange: setTag,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { SharedProps } from "../../contexts/search.js";
|
|
2
|
+
import * as JsxRuntime from "react/jsx-runtime";
|
|
2
3
|
import { ComponentProps, ReactNode } from "react";
|
|
3
4
|
import { Dialog } from "@base-ui/react/dialog";
|
|
4
|
-
import {
|
|
5
|
+
import { SearchResult, SearchResultItem, SearchResultRecord, SearchResultTable } from "fumadocs-core/search/client";
|
|
6
|
+
import { ReactSortedResult } from "fumadocs-core/search";
|
|
5
7
|
//#region src/components/dialog/search.d.ts
|
|
6
|
-
export type SearchItemType = (ReactSortedResult & {
|
|
8
|
+
export type SearchItemType = ((ReactSortedResult | SearchResultRecord) & {
|
|
7
9
|
external?: boolean;
|
|
8
10
|
}) | {
|
|
9
11
|
id: string;
|
|
@@ -11,22 +13,37 @@ export type SearchItemType = (ReactSortedResult & {
|
|
|
11
13
|
node: ReactNode;
|
|
12
14
|
onSelect: () => void;
|
|
13
15
|
};
|
|
16
|
+
type ItemRenderer = (props: {
|
|
17
|
+
item: SearchItemType;
|
|
18
|
+
table?: SearchResultTable;
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
}) => ReactNode;
|
|
21
|
+
interface TableProps {
|
|
22
|
+
table: SearchResultTable;
|
|
23
|
+
Item: ItemRenderer;
|
|
24
|
+
onSelect: (item: SearchItemType) => void;
|
|
25
|
+
}
|
|
14
26
|
export interface SearchDialogProps extends SharedProps {
|
|
15
27
|
search: string;
|
|
16
28
|
onSearchChange: (v: string) => void;
|
|
17
29
|
onSelect?: (item: SearchItemType) => void;
|
|
18
30
|
isLoading?: boolean;
|
|
31
|
+
/** the last successful search, `<SearchDialogList />` shows its results */
|
|
32
|
+
data?: SearchResult;
|
|
19
33
|
children: ReactNode;
|
|
20
34
|
}
|
|
21
|
-
export declare function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoading, onSelect: onSelectProp, children, dialogHandle }: SearchDialogProps):
|
|
22
|
-
export declare function SearchDialogHeader(props: ComponentProps<'div'>):
|
|
23
|
-
export declare function SearchDialogInput(props: ComponentProps<'input'>):
|
|
24
|
-
export declare function SearchDialogClose({ children, className, ...props }: ComponentProps<'button'>):
|
|
25
|
-
export declare function SearchDialogFooter(props: ComponentProps<'div'>):
|
|
26
|
-
export declare function SearchDialogOverlay({ className, ...props }: ComponentProps<typeof Dialog.Backdrop>):
|
|
27
|
-
export declare function SearchDialogContent({ ref, children, className, ...props }: ComponentProps<typeof Dialog.Popup>):
|
|
28
|
-
export declare function SearchDialogList({ items, Empty, Item, ...props }: Omit<ComponentProps<'div'>, 'children'> & {
|
|
29
|
-
|
|
35
|
+
export declare function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoading, data, onSelect: onSelectProp, children, dialogHandle }: SearchDialogProps): JsxRuntime.JSX.Element;
|
|
36
|
+
export declare function SearchDialogHeader(props: ComponentProps<'div'>): JsxRuntime.JSX.Element;
|
|
37
|
+
export declare function SearchDialogInput(props: ComponentProps<'input'>): JsxRuntime.JSX.Element;
|
|
38
|
+
export declare function SearchDialogClose({ children, className, ...props }: ComponentProps<'button'>): JsxRuntime.JSX.Element;
|
|
39
|
+
export declare function SearchDialogFooter(props: ComponentProps<'div'>): JsxRuntime.JSX.Element;
|
|
40
|
+
export declare function SearchDialogOverlay({ className, ...props }: ComponentProps<typeof Dialog.Backdrop>): JsxRuntime.JSX.Element;
|
|
41
|
+
export declare function SearchDialogContent({ ref, children, className, ...props }: ComponentProps<typeof Dialog.Popup>): JsxRuntime.JSX.Element;
|
|
42
|
+
export declare function SearchDialogList({ items: itemsProp, defaultItems, Empty, Item, Table, ...props }: Omit<ComponentProps<'div'>, 'children'> & {
|
|
43
|
+
/** @defaultValue the results of `data` from `<SearchDialog />` */
|
|
44
|
+
items?: (SearchItemType | SearchResultItem)[] | null;
|
|
45
|
+
/** shown without results */
|
|
46
|
+
defaultItems?: (SearchItemType | SearchResultItem)[] | null;
|
|
30
47
|
/**
|
|
31
48
|
* Renderer for empty list UI
|
|
32
49
|
*/
|
|
@@ -34,27 +51,30 @@ export declare function SearchDialogList({ items, Empty, Item, ...props }: Omit<
|
|
|
34
51
|
/**
|
|
35
52
|
* Renderer for items
|
|
36
53
|
*/
|
|
37
|
-
Item?:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
54
|
+
Item?: ItemRenderer;
|
|
55
|
+
/**
|
|
56
|
+
* Renderer for tables, `Item` and `onSelect` render their rows
|
|
57
|
+
*/
|
|
58
|
+
Table?: (props: TableProps) => ReactNode;
|
|
59
|
+
}): JsxRuntime.JSX.Element;
|
|
60
|
+
export declare function SearchDialogListTable({ table, Item, onSelect }: TableProps): JsxRuntime.JSX.Element;
|
|
61
|
+
export declare function SearchDialogListItem({ item, table, className, children, renderMarkdown, ...props }: ComponentProps<'div'> & {
|
|
62
|
+
/** the table of a row */
|
|
63
|
+
table?: SearchResultTable;
|
|
64
|
+
/** render the Markdown `content` of items, instead of their `hastContent` */
|
|
43
65
|
renderMarkdown?: (v: string) => ReactNode;
|
|
44
|
-
/** @deprecated highlight blocks is now wrapped in `<mark />`, use `renderMarkdown` to handle instead. */
|
|
45
|
-
renderHighlights?: (blocks: HighlightedText<ReactNode>[]) => ReactNode;
|
|
46
66
|
item: SearchItemType;
|
|
47
|
-
}):
|
|
48
|
-
export declare function SearchDialogIcon(props: ComponentProps<'svg'>):
|
|
67
|
+
}): JsxRuntime.JSX.Element;
|
|
68
|
+
export declare function SearchDialogIcon(props: ComponentProps<'svg'>): JsxRuntime.JSX.Element;
|
|
49
69
|
export interface TagsListProps extends ComponentProps<'div'> {
|
|
50
70
|
tag?: string;
|
|
51
71
|
onTagChange: (tag: string | undefined) => void;
|
|
52
72
|
allowClear?: boolean;
|
|
53
73
|
}
|
|
54
|
-
export declare function TagsList({ tag, onTagChange, allowClear, ...props }: TagsListProps):
|
|
74
|
+
export declare function TagsList({ tag, onTagChange, allowClear, ...props }: TagsListProps): JsxRuntime.JSX.Element;
|
|
55
75
|
export declare function TagsListItem({ value, className, ...props }: ComponentProps<'button'> & {
|
|
56
76
|
value: string;
|
|
57
|
-
}):
|
|
77
|
+
}): JsxRuntime.JSX.Element;
|
|
58
78
|
export declare function useSearch(): {
|
|
59
79
|
open: boolean;
|
|
60
80
|
onOpenChange: (open: boolean) => void;
|
|
@@ -62,15 +82,18 @@ export declare function useSearch(): {
|
|
|
62
82
|
onSearchChange: (v: string) => void;
|
|
63
83
|
onSelect: (item: SearchItemType) => void;
|
|
64
84
|
isLoading: boolean;
|
|
85
|
+
data?: SearchResult;
|
|
86
|
+
/** the query to highlight */
|
|
87
|
+
query: string;
|
|
88
|
+
/** the id of the active item */
|
|
89
|
+
getActive: () => string | null;
|
|
90
|
+
setActive: (id: string | null) => void;
|
|
91
|
+
subscribeActive: (listener: () => void) => () => void;
|
|
65
92
|
};
|
|
66
93
|
export declare function useTagsList(): {
|
|
67
94
|
value?: string;
|
|
68
95
|
onValueChange: (value: string | undefined) => void;
|
|
69
96
|
allowClear: boolean;
|
|
70
97
|
};
|
|
71
|
-
export declare function useSearchList(): {
|
|
72
|
-
active: string | null;
|
|
73
|
-
setActive: (v: string | null) => void;
|
|
74
|
-
};
|
|
75
98
|
//#endregion
|
|
76
99
|
export type { SharedProps };
|
|
@@ -3,26 +3,19 @@ import { cn } from "../../utils/cn.js";
|
|
|
3
3
|
import { buttonVariants } from "../ui/button.js";
|
|
4
4
|
import { mergeRefs } from "../../utils/merge-refs.js";
|
|
5
5
|
import { useRouter } from "fumadocs-core/framework";
|
|
6
|
+
import * as JsxRuntime from "react/jsx-runtime";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { ChevronRight, Hash, SearchIcon } from "lucide-react";
|
|
8
9
|
import { cva } from "class-variance-authority";
|
|
9
|
-
import { Fragment as Fragment$1, createContext, use, useCallback, useEffect, useEffectEvent, useMemo, useRef,
|
|
10
|
+
import { Fragment as Fragment$1, createContext, use, useCallback, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
10
11
|
import { T, useTranslations } from "@fuma-translate/react";
|
|
11
12
|
import { Dialog } from "@base-ui/react/dialog";
|
|
12
|
-
import { useOnChange } from "fumadocs-core/utils/use-on-change";
|
|
13
13
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import { visit } from "unist-util-visit";
|
|
14
|
+
import { useHighlightQuery } from "fumadocs-core/search/client";
|
|
15
|
+
import { toJsxRuntime } from "hast-util-to-jsx-runtime";
|
|
17
16
|
//#region src/components/dialog/search.tsx
|
|
18
17
|
const RootContext = createContext(null);
|
|
19
|
-
const ListContext = createContext(null);
|
|
20
18
|
const TagsListContext = createContext(null);
|
|
21
|
-
const PreContext = createContext(false);
|
|
22
|
-
const mdRenderer = createMarkdownRenderer({
|
|
23
|
-
remarkRehypeOptions: { allowDangerousHtml: true },
|
|
24
|
-
rehypePlugins: [rehypeRaw, rehypeCustomElements]
|
|
25
|
-
});
|
|
26
19
|
const mdComponents = {
|
|
27
20
|
mark(props) {
|
|
28
21
|
return /* @__PURE__ */ jsx("span", {
|
|
@@ -37,34 +30,20 @@ const mdComponents = {
|
|
|
37
30
|
className: "min-w-0"
|
|
38
31
|
});
|
|
39
32
|
},
|
|
40
|
-
|
|
41
|
-
return /* @__PURE__ */ jsx("strong", {
|
|
42
|
-
...props,
|
|
43
|
-
className: "text-fd-accent-foreground font-medium"
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
code(props) {
|
|
47
|
-
if (use(PreContext)) return /* @__PURE__ */ jsx("code", {
|
|
48
|
-
...props,
|
|
49
|
-
className: "mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)]"
|
|
50
|
-
});
|
|
51
|
-
return /* @__PURE__ */ jsx("code", {
|
|
52
|
-
...props,
|
|
53
|
-
className: "border rounded-md px-px bg-fd-secondary text-fd-secondary-foreground"
|
|
54
|
-
});
|
|
55
|
-
},
|
|
56
|
-
custom({ _tagName = "fragment", children, ...rest }) {
|
|
33
|
+
custom({ tagName, children, ...rest }) {
|
|
57
34
|
return /* @__PURE__ */ jsxs("span", {
|
|
58
35
|
className: "inline-flex max-w-full items-center border p-0.5 rounded-md bg-fd-card text-fd-card-foreground divide-x divide-fd-border",
|
|
59
36
|
children: [
|
|
60
37
|
/* @__PURE__ */ jsx("code", {
|
|
61
|
-
|
|
62
|
-
|
|
38
|
+
"data-highlight-ignore": "",
|
|
39
|
+
className: "not-prose rounded-sm px-0.5 me-1 bg-fd-primary font-medium text-xs text-fd-primary-foreground border-none",
|
|
40
|
+
children: tagName
|
|
63
41
|
}),
|
|
64
42
|
Object.entries(rest).map(([k, v]) => {
|
|
65
43
|
if (typeof v !== "string") return;
|
|
66
44
|
return /* @__PURE__ */ jsxs("code", {
|
|
67
|
-
|
|
45
|
+
"data-highlight-ignore": "",
|
|
46
|
+
className: "not-prose truncate text-xs text-fd-muted-foreground px-1",
|
|
68
47
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
69
48
|
className: "text-fd-card-foreground",
|
|
70
49
|
children: [k, ": "]
|
|
@@ -81,25 +60,44 @@ const mdComponents = {
|
|
|
81
60
|
pre(props) {
|
|
82
61
|
return /* @__PURE__ */ jsx("pre", {
|
|
83
62
|
...props,
|
|
84
|
-
className: cn("flex flex-col border rounded-md my-0.5 p-2 bg-fd-secondary text-fd-secondary-foreground max-h-20 overflow-hidden", props.className)
|
|
85
|
-
children: /* @__PURE__ */ jsx(PreContext, {
|
|
86
|
-
value: true,
|
|
87
|
-
children: props.children
|
|
88
|
-
})
|
|
63
|
+
className: cn("not-prose flex flex-col border rounded-md my-0.5 p-2 bg-fd-secondary text-fd-secondary-foreground max-h-20 overflow-hidden *:mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)]", props.className)
|
|
89
64
|
});
|
|
90
65
|
}
|
|
91
66
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
67
|
+
const renderOptions = {
|
|
68
|
+
development: false,
|
|
69
|
+
components: mdComponents,
|
|
70
|
+
...JsxRuntime
|
|
71
|
+
};
|
|
72
|
+
function Children({ children }) {
|
|
73
|
+
return children;
|
|
74
|
+
}
|
|
75
|
+
function TableCell(props) {
|
|
76
|
+
return /* @__PURE__ */ jsx("div", {
|
|
77
|
+
...props,
|
|
78
|
+
className: "min-w-0 not-last:truncate last:line-clamp-2"
|
|
79
|
+
});
|
|
101
80
|
}
|
|
102
|
-
|
|
81
|
+
const tableRenderOptions = {
|
|
82
|
+
...renderOptions,
|
|
83
|
+
components: {
|
|
84
|
+
...mdComponents,
|
|
85
|
+
table: Children,
|
|
86
|
+
thead: Children,
|
|
87
|
+
tbody: Children,
|
|
88
|
+
tr: Children,
|
|
89
|
+
th: TableCell,
|
|
90
|
+
td: TableCell
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const rowRenderOptions = {
|
|
94
|
+
...tableRenderOptions,
|
|
95
|
+
components: {
|
|
96
|
+
...tableRenderOptions.components,
|
|
97
|
+
thead: () => null
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoading = false, data, onSelect: onSelectProp, children, dialogHandle }) {
|
|
103
101
|
const router = useRouter();
|
|
104
102
|
const onOpenChangeCallback = useRef(onOpenChange);
|
|
105
103
|
onOpenChangeCallback.current = onOpenChange;
|
|
@@ -114,22 +112,42 @@ function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoading =
|
|
|
114
112
|
};
|
|
115
113
|
const onSelectCallback = useRef(onSelect);
|
|
116
114
|
onSelectCallback.current = onSelect;
|
|
115
|
+
const activeItem = useMemo(() => {
|
|
116
|
+
let active = null;
|
|
117
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
118
|
+
return {
|
|
119
|
+
getActive: () => active,
|
|
120
|
+
setActive(id) {
|
|
121
|
+
active = id;
|
|
122
|
+
for (const listener of listeners) listener();
|
|
123
|
+
},
|
|
124
|
+
subscribeActive(listener) {
|
|
125
|
+
listeners.add(listener);
|
|
126
|
+
return () => void listeners.delete(listener);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}, []);
|
|
117
130
|
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
118
131
|
open,
|
|
119
132
|
onOpenChange,
|
|
120
133
|
handle: dialogHandle,
|
|
121
134
|
children: /* @__PURE__ */ jsx(RootContext, {
|
|
122
135
|
value: useMemo(() => ({
|
|
136
|
+
...activeItem,
|
|
123
137
|
open,
|
|
124
138
|
search,
|
|
125
139
|
isLoading,
|
|
140
|
+
data,
|
|
141
|
+
query: data ? data.query : search,
|
|
126
142
|
onOpenChange: (v) => onOpenChangeCallback.current(v),
|
|
127
143
|
onSearchChange: (v) => onSearchChangeCallback.current(v),
|
|
128
144
|
onSelect: (v) => onSelectCallback.current(v)
|
|
129
145
|
}), [
|
|
146
|
+
activeItem,
|
|
130
147
|
isLoading,
|
|
131
148
|
open,
|
|
132
|
-
search
|
|
149
|
+
search,
|
|
150
|
+
data
|
|
133
151
|
]),
|
|
134
152
|
children
|
|
135
153
|
})
|
|
@@ -143,10 +161,13 @@ function SearchDialogHeader(props) {
|
|
|
143
161
|
}
|
|
144
162
|
function SearchDialogInput(props) {
|
|
145
163
|
const t = useTranslations({ note: "search dialog" });
|
|
146
|
-
const { search, onSearchChange } = useSearch();
|
|
164
|
+
const { search, onSearchChange, getActive, subscribeActive } = useSearch();
|
|
165
|
+
const active = useSyncExternalStore(subscribeActive, getActive, getActive);
|
|
147
166
|
return /* @__PURE__ */ jsx("input", {
|
|
148
167
|
"data-fd-search-dialog-input": "",
|
|
149
168
|
role: "combobox",
|
|
169
|
+
"aria-expanded": active !== null,
|
|
170
|
+
"aria-activedescendant": active !== null ? `fd-search-option-${active}` : void 0,
|
|
150
171
|
"aria-label": t("Search"),
|
|
151
172
|
"aria-autocomplete": "list",
|
|
152
173
|
"aria-controls": "fd-search-list",
|
|
@@ -208,30 +229,32 @@ function SearchDialogContent({ ref, children, className, ...props }) {
|
|
|
208
229
|
}), children]
|
|
209
230
|
}) });
|
|
210
231
|
}
|
|
211
|
-
function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div", {
|
|
232
|
+
function SearchDialogList({ items: itemsProp, defaultItems = null, Empty = () => /* @__PURE__ */ jsx("div", {
|
|
212
233
|
role: "status",
|
|
213
234
|
className: "py-12 text-center text-sm text-fd-muted-foreground",
|
|
214
235
|
children: /* @__PURE__ */ jsx(T, {
|
|
215
236
|
text: "No results found",
|
|
216
237
|
note: "search dialog"
|
|
217
238
|
})
|
|
218
|
-
}), Item = (props) => /* @__PURE__ */ jsx(SearchDialogListItem, { ...props }), ...props }) {
|
|
239
|
+
}), Item = (props) => /* @__PURE__ */ jsx(SearchDialogListItem, { ...props }), Table = (props) => /* @__PURE__ */ jsx(SearchDialogListTable, { ...props }), ...props }) {
|
|
219
240
|
const ref = useRef(null);
|
|
220
241
|
const t = useTranslations({ note: "search dialog" });
|
|
221
|
-
const { onSelect } = useSearch();
|
|
222
|
-
const
|
|
242
|
+
const { onSelect, data, getActive, setActive } = useSearch();
|
|
243
|
+
const items = itemsProp === void 0 ? data?.items ?? defaultItems : itemsProp;
|
|
244
|
+
useLayoutEffect(() => setActive(items?.[0]?.id ?? null), [setActive, items]);
|
|
223
245
|
const onKey = useEffectEvent((e) => {
|
|
224
246
|
if (!items || e.isComposing || e.keyCode === 229) return;
|
|
247
|
+
const list = flattenItems(items);
|
|
225
248
|
if (e.key === "ArrowDown" || e.key == "ArrowUp") {
|
|
226
|
-
let idx =
|
|
249
|
+
let idx = list.findIndex((item) => item.id === getActive());
|
|
227
250
|
if (idx === -1) idx = 0;
|
|
228
251
|
else if (e.key === "ArrowDown") idx++;
|
|
229
252
|
else idx--;
|
|
230
|
-
setActive(
|
|
253
|
+
setActive(list.at(idx % list.length)?.id ?? null);
|
|
231
254
|
e.preventDefault();
|
|
232
255
|
}
|
|
233
256
|
if (e.key === "Enter") {
|
|
234
|
-
const selected =
|
|
257
|
+
const selected = list.find((item) => item.id === getActive());
|
|
235
258
|
if (selected) onSelect(selected);
|
|
236
259
|
e.preventDefault();
|
|
237
260
|
}
|
|
@@ -252,46 +275,81 @@ function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div
|
|
|
252
275
|
content.removeEventListener("keydown", onKey);
|
|
253
276
|
};
|
|
254
277
|
}, []);
|
|
255
|
-
useOnChange(items, () => {
|
|
256
|
-
setActive(items?.[0]?.id ?? null);
|
|
257
|
-
});
|
|
258
|
-
useEffect(() => {
|
|
259
|
-
const input = ref.current?.closest("[role=\"dialog\"]")?.querySelector("[role=\"combobox\"]");
|
|
260
|
-
if (!input) return;
|
|
261
|
-
input.setAttribute("aria-expanded", String(active !== null));
|
|
262
|
-
if (active !== null) input.setAttribute("aria-activedescendant", `fd-search-option-${active}`);
|
|
263
|
-
else input.removeAttribute("aria-activedescendant");
|
|
264
|
-
}, [active]);
|
|
265
278
|
return /* @__PURE__ */ jsx("div", {
|
|
266
279
|
...props,
|
|
267
280
|
ref,
|
|
268
281
|
"data-empty": items === null,
|
|
269
|
-
className: cn("overflow-hidden h-(--fd-animated-height) transition-[height]", props.className),
|
|
270
|
-
children: /* @__PURE__ */
|
|
282
|
+
className: cn("overflow-hidden h-(--fd-animated-height) transition-[height] [&_::highlight(fd-search)]:text-fd-primary [&_::highlight(fd-search)]:underline", props.className),
|
|
283
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
271
284
|
id: "fd-search-list",
|
|
272
285
|
role: items?.length ? "listbox" : void 0,
|
|
273
286
|
"aria-label": items?.length ? t("Search") : void 0,
|
|
274
287
|
className: cn("w-full flex flex-col overflow-y-auto max-h-[460px] p-1", !items && "hidden"),
|
|
275
|
-
children: /* @__PURE__ */
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}) }, item.id))]
|
|
284
|
-
})
|
|
288
|
+
children: [items?.length === 0 && Empty(), items?.map((item) => /* @__PURE__ */ jsx(Fragment$1, { children: item.type === "table" ? Table({
|
|
289
|
+
table: item,
|
|
290
|
+
Item,
|
|
291
|
+
onSelect
|
|
292
|
+
}) : Item({
|
|
293
|
+
item,
|
|
294
|
+
onClick: () => onSelect(item)
|
|
295
|
+
}) }, item.id))]
|
|
285
296
|
})
|
|
286
297
|
});
|
|
287
298
|
}
|
|
288
|
-
function
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
299
|
+
function flattenItems(items) {
|
|
300
|
+
const out = [];
|
|
301
|
+
for (const item of items) if (item.type === "table") out.push(...item.rows);
|
|
302
|
+
else out.push(item);
|
|
303
|
+
return out;
|
|
304
|
+
}
|
|
305
|
+
function SearchDialogListTable({ table, Item, onSelect }) {
|
|
306
|
+
const { query } = useSearch();
|
|
307
|
+
const highlightRef = useHighlightQuery(query);
|
|
308
|
+
const headerId = `fd-search-table-${table.id}`;
|
|
309
|
+
const header = useMemo(() => table.header && toJsxRuntime(table.header, tableRenderOptions), [table.header]);
|
|
310
|
+
return /* @__PURE__ */ jsx("div", {
|
|
311
|
+
role: table.header ? "group" : void 0,
|
|
312
|
+
"aria-labelledby": table.header ? headerId : void 0,
|
|
313
|
+
className: "ms-3 shrink-0 border-s py-2 ps-3.25 pe-2.5",
|
|
314
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
315
|
+
className: "grid gap-x-3 overflow-hidden rounded-lg border bg-fd-card text-sm",
|
|
316
|
+
style: { gridTemplateColumns: `${"fit-content(30%) ".repeat(table.columns - 1)}minmax(30%, 1fr)` },
|
|
317
|
+
children: [header && /* @__PURE__ */ jsx("div", {
|
|
318
|
+
id: headerId,
|
|
319
|
+
ref: highlightRef,
|
|
320
|
+
"aria-hidden": true,
|
|
321
|
+
className: "col-span-full grid grid-cols-subgrid bg-fd-secondary px-3 py-1 text-xs text-fd-muted-foreground",
|
|
322
|
+
children: header
|
|
323
|
+
}), table.rows.map((row) => /* @__PURE__ */ jsx(Fragment$1, { children: Item({
|
|
324
|
+
item: row,
|
|
325
|
+
table,
|
|
326
|
+
onClick: () => onSelect(row)
|
|
327
|
+
}) }, row.id))]
|
|
328
|
+
})
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
function SearchDialogListItem({ item, table, className, children, renderMarkdown, ...props }) {
|
|
332
|
+
const { query, getActive, setActive, subscribeActive } = useSearch();
|
|
333
|
+
const isActive = () => getActive() === item.id;
|
|
334
|
+
const active = useSyncExternalStore(subscribeActive, isActive, isActive);
|
|
335
|
+
const highlightRef = useHighlightQuery(query);
|
|
336
|
+
const content = useMemo(() => {
|
|
337
|
+
if (item.type === "action") return item.node;
|
|
338
|
+
if (renderMarkdown && typeof item.content === "string") return renderMarkdown(item.content);
|
|
339
|
+
if (!("hastContent" in item)) return item.content;
|
|
340
|
+
if (!table) return toJsxRuntime(item.hastContent, renderOptions);
|
|
341
|
+
return toJsxRuntime(item.hastContent, table.header ? rowRenderOptions : tableRenderOptions);
|
|
342
|
+
}, [
|
|
343
|
+
item,
|
|
344
|
+
renderMarkdown,
|
|
345
|
+
table
|
|
346
|
+
]);
|
|
347
|
+
if (item.type === "action") children ??= content;
|
|
348
|
+
else if (table) children ??= /* @__PURE__ */ jsx("div", {
|
|
349
|
+
ref: highlightRef,
|
|
350
|
+
className: cn("contents", !table.header && "*:first:font-medium *:first:text-fd-primary *:nth-2:text-xs *:not-first:text-fd-muted-foreground"),
|
|
351
|
+
children: content
|
|
352
|
+
});
|
|
295
353
|
else children ??= /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
296
354
|
/* @__PURE__ */ jsx("div", {
|
|
297
355
|
className: "inline-flex items-center text-fd-muted-foreground text-xs empty:hidden",
|
|
@@ -303,24 +361,23 @@ function SearchDialogListItem({ item, className, children, renderMarkdown = (s)
|
|
|
303
361
|
}),
|
|
304
362
|
item.type === "heading" && /* @__PURE__ */ jsx(Hash, { className: "absolute inset-s-6 top-2.5 size-4 text-fd-muted-foreground" }),
|
|
305
363
|
/* @__PURE__ */ jsx("div", {
|
|
306
|
-
|
|
307
|
-
|
|
364
|
+
ref: highlightRef,
|
|
365
|
+
className: cn("prose prose-sm leading-5 min-w-0", item.type === "text" && "ps-4", item.type === "heading" && "ps-8", item.type === "page" || item.type === "heading" ? "font-medium text-inherit" : "text-fd-popover-foreground/80"),
|
|
366
|
+
children: content
|
|
308
367
|
})
|
|
309
368
|
] });
|
|
310
|
-
return /* @__PURE__ */ jsx("
|
|
311
|
-
type: "button",
|
|
369
|
+
return /* @__PURE__ */ jsx("div", {
|
|
312
370
|
id: `fd-search-option-${item.id}`,
|
|
313
371
|
role: "option",
|
|
314
|
-
tabIndex: -1,
|
|
315
372
|
ref: useCallback((element) => {
|
|
316
373
|
if (active && element) scrollIntoView(element, {
|
|
317
374
|
scrollMode: "if-needed",
|
|
318
375
|
block: "nearest",
|
|
319
|
-
boundary: element.
|
|
376
|
+
boundary: element.closest("[role=\"listbox\"]")
|
|
320
377
|
});
|
|
321
378
|
}, [active]),
|
|
322
379
|
"aria-selected": active,
|
|
323
|
-
className: cn("
|
|
380
|
+
className: cn("cursor-default", table ? "col-span-full grid grid-cols-subgrid items-baseline px-3 py-1.5 not-first:border-t" : "relative shrink-0 px-2.5 py-2 text-sm overflow-hidden rounded-lg", active && "bg-fd-accent text-fd-accent-foreground", className),
|
|
324
381
|
onPointerMove: () => setActive(item.id),
|
|
325
382
|
...props,
|
|
326
383
|
children
|
|
@@ -376,10 +433,5 @@ function useTagsList() {
|
|
|
376
433
|
if (!ctx) throw new Error("Missing <TagsList />");
|
|
377
434
|
return ctx;
|
|
378
435
|
}
|
|
379
|
-
function useSearchList() {
|
|
380
|
-
const ctx = use(ListContext);
|
|
381
|
-
if (!ctx) throw new Error("Missing <SearchDialogList />");
|
|
382
|
-
return ctx;
|
|
383
|
-
}
|
|
384
436
|
//#endregion
|
|
385
|
-
export { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogListItem, SearchDialogOverlay, TagsList, TagsListItem, useSearch,
|
|
437
|
+
export { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogListItem, SearchDialogListTable, SearchDialogOverlay, TagsList, TagsListItem, useSearch, useTagsList };
|
package/dist/contexts/tree.js
CHANGED
|
@@ -48,7 +48,7 @@ function useTabsGroups(tabs) {
|
|
|
48
48
|
const out = [];
|
|
49
49
|
const last = path[path.length - 1];
|
|
50
50
|
const page = last?.type === "page" ? last : void 0;
|
|
51
|
-
let scope = tree.fallback
|
|
51
|
+
let scope = tree.fallback ? [...tree.children, ...tree.fallback.children] : tree.children;
|
|
52
52
|
for (const node of path) {
|
|
53
53
|
if (node.type !== "folder" || !node.root) continue;
|
|
54
54
|
const group = {
|
|
@@ -57,7 +57,7 @@ function useTabsGroups(tabs) {
|
|
|
57
57
|
};
|
|
58
58
|
collectTabs(scope, node, page, tabs, group.options);
|
|
59
59
|
if (group.options.length > 0) out.push(group);
|
|
60
|
-
scope = node;
|
|
60
|
+
scope = node.children;
|
|
61
61
|
}
|
|
62
62
|
const custom = tabs.filter((tab) => !tab.$folder);
|
|
63
63
|
if (custom.length > 0) {
|
|
@@ -74,7 +74,7 @@ function useTabsGroups(tabs) {
|
|
|
74
74
|
}
|
|
75
75
|
/** collect the tabs of root folders with the same type as `active` within a scope */
|
|
76
76
|
function collectTabs(scope, active, page, tabs, out) {
|
|
77
|
-
for (const node of scope
|
|
77
|
+
for (const node of scope) {
|
|
78
78
|
if (node.type !== "folder") continue;
|
|
79
79
|
if (node.root === active.root) {
|
|
80
80
|
const tab = tabs.find((tab) => tab.$folder && (tab.$folder === node || tab.$folder.$id === node.$id));
|
|
@@ -84,7 +84,7 @@ function collectTabs(scope, active, page, tabs, out) {
|
|
|
84
84
|
...tab,
|
|
85
85
|
url: projection.url
|
|
86
86
|
} : tab);
|
|
87
|
-
} else if (!node.root) collectTabs(node, active, page, tabs, out);
|
|
87
|
+
} else if (!node.root) collectTabs(node.children, active, page, tabs, out);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
//#endregion
|
package/dist/style.css
CHANGED
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
color: var(--tw-prose-body);
|
|
541
541
|
max-width: none;
|
|
542
542
|
font-size: calc(1rem * var(--tw-prose-size));
|
|
543
|
-
line-height: calc(1.75rem * var(--tw-prose-size));
|
|
543
|
+
line-height: var(--tw-leading, calc(1.75rem * var(--tw-prose-size)));
|
|
544
544
|
:where([class~="lead"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
545
545
|
font-size: 1.25em;
|
|
546
546
|
line-height: 1.6;
|
|
@@ -857,6 +857,12 @@
|
|
|
857
857
|
:where(.prose > :last-child):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
858
858
|
margin-bottom: 0;
|
|
859
859
|
}
|
|
860
|
+
:where(blockquote > :first-child):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
861
|
+
margin-top: 0;
|
|
862
|
+
}
|
|
863
|
+
:where(blockquote > :last-child):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
864
|
+
margin-bottom: 0;
|
|
865
|
+
}
|
|
860
866
|
:where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
861
867
|
font-size: 0.875em;
|
|
862
868
|
line-height: 1.7142857;
|
|
@@ -1374,6 +1380,9 @@
|
|
|
1374
1380
|
.animate-pulse {
|
|
1375
1381
|
animation: var(--animate-pulse);
|
|
1376
1382
|
}
|
|
1383
|
+
.cursor-default {
|
|
1384
|
+
cursor: default;
|
|
1385
|
+
}
|
|
1377
1386
|
.touch-auto {
|
|
1378
1387
|
touch-action: auto;
|
|
1379
1388
|
}
|
|
@@ -1413,6 +1422,9 @@
|
|
|
1413
1422
|
.grid-cols-\[1fr_3fr\] {
|
|
1414
1423
|
grid-template-columns: 1fr 3fr;
|
|
1415
1424
|
}
|
|
1425
|
+
.grid-cols-subgrid {
|
|
1426
|
+
grid-template-columns: subgrid;
|
|
1427
|
+
}
|
|
1416
1428
|
.flex-col {
|
|
1417
1429
|
flex-direction: column;
|
|
1418
1430
|
}
|
|
@@ -1425,6 +1437,9 @@
|
|
|
1425
1437
|
.flex-wrap {
|
|
1426
1438
|
flex-wrap: wrap;
|
|
1427
1439
|
}
|
|
1440
|
+
.items-baseline {
|
|
1441
|
+
align-items: baseline;
|
|
1442
|
+
}
|
|
1428
1443
|
.items-center {
|
|
1429
1444
|
align-items: center;
|
|
1430
1445
|
}
|
|
@@ -1479,6 +1494,9 @@
|
|
|
1479
1494
|
.gap-6 {
|
|
1480
1495
|
gap: calc(var(--spacing) * 6);
|
|
1481
1496
|
}
|
|
1497
|
+
.gap-x-3 {
|
|
1498
|
+
column-gap: calc(var(--spacing) * 3);
|
|
1499
|
+
}
|
|
1482
1500
|
.gap-y-4 {
|
|
1483
1501
|
row-gap: calc(var(--spacing) * 4);
|
|
1484
1502
|
}
|
|
@@ -1768,9 +1786,6 @@
|
|
|
1768
1786
|
.mask-\[linear-gradient\(to_bottom\,transparent\,white_16px\,white_calc\(100\%-16px\)\,transparent\)\] {
|
|
1769
1787
|
mask-image: linear-gradient(to bottom,transparent,white 16px,white calc(100% - 16px),transparent);
|
|
1770
1788
|
}
|
|
1771
|
-
.mask-\[linear-gradient\(to_bottom\,white\,white_30px\,transparent_80px\)\] {
|
|
1772
|
-
mask-image: linear-gradient(to bottom,white,white 30px,transparent 80px);
|
|
1773
|
-
}
|
|
1774
1789
|
.bg-clip-content {
|
|
1775
1790
|
background-clip: content-box;
|
|
1776
1791
|
}
|
|
@@ -1864,9 +1879,6 @@
|
|
|
1864
1879
|
.px-\[calc\(--spacing\(2\.5\)-1px\)\] {
|
|
1865
1880
|
padding-inline: calc(calc(var(--spacing) * 2.5) - 1px);
|
|
1866
1881
|
}
|
|
1867
|
-
.px-px {
|
|
1868
|
-
padding-inline: 1px;
|
|
1869
|
-
}
|
|
1870
1882
|
.py-0 {
|
|
1871
1883
|
padding-block: 0px;
|
|
1872
1884
|
}
|
|
@@ -1921,6 +1933,9 @@
|
|
|
1921
1933
|
.ps-3\.5 {
|
|
1922
1934
|
padding-inline-start: calc(var(--spacing) * 3.5);
|
|
1923
1935
|
}
|
|
1936
|
+
.ps-3\.25 {
|
|
1937
|
+
padding-inline-start: calc(var(--spacing) * 3.25);
|
|
1938
|
+
}
|
|
1924
1939
|
.ps-4 {
|
|
1925
1940
|
padding-inline-start: calc(var(--spacing) * 4);
|
|
1926
1941
|
}
|
|
@@ -2069,6 +2084,10 @@
|
|
|
2069
2084
|
.text-\[10px\] {
|
|
2070
2085
|
font-size: 10px;
|
|
2071
2086
|
}
|
|
2087
|
+
.leading-5 {
|
|
2088
|
+
--tw-leading: calc(var(--spacing) * 5);
|
|
2089
|
+
line-height: calc(var(--spacing) * 5);
|
|
2090
|
+
}
|
|
2072
2091
|
.leading-none {
|
|
2073
2092
|
--tw-leading: 1;
|
|
2074
2093
|
line-height: 1;
|
|
@@ -2160,6 +2179,9 @@
|
|
|
2160
2179
|
.text-fd-secondary-foreground {
|
|
2161
2180
|
color: var(--color-fd-secondary-foreground);
|
|
2162
2181
|
}
|
|
2182
|
+
.text-inherit {
|
|
2183
|
+
color: inherit;
|
|
2184
|
+
}
|
|
2163
2185
|
.line-through {
|
|
2164
2186
|
text-decoration-line: line-through;
|
|
2165
2187
|
}
|
|
@@ -2581,13 +2603,28 @@
|
|
|
2581
2603
|
border-bottom-style: var(--tw-border-style);
|
|
2582
2604
|
border-bottom-width: 1px;
|
|
2583
2605
|
}
|
|
2606
|
+
:is(.\*\:mask-\[linear-gradient\(to_bottom\,white\,white_30px\,transparent_80px\)\] > *) {
|
|
2607
|
+
mask-image: linear-gradient(to bottom,white,white 30px,transparent 80px);
|
|
2608
|
+
}
|
|
2609
|
+
.not-first\:border-t:not(:first-child) {
|
|
2610
|
+
border-top-style: var(--tw-border-style);
|
|
2611
|
+
border-top-width: 1px;
|
|
2612
|
+
}
|
|
2584
2613
|
:is(.\*\:not-first\:border-t > *):not(:first-child) {
|
|
2585
2614
|
border-top-style: var(--tw-border-style);
|
|
2586
2615
|
border-top-width: 1px;
|
|
2587
2616
|
}
|
|
2617
|
+
:is(.\*\:not-first\:text-fd-muted-foreground > *):not(:first-child) {
|
|
2618
|
+
color: var(--color-fd-muted-foreground);
|
|
2619
|
+
}
|
|
2588
2620
|
.not-last\:mb-2:not(:last-child) {
|
|
2589
2621
|
margin-bottom: calc(var(--spacing) * 2);
|
|
2590
2622
|
}
|
|
2623
|
+
.not-last\:truncate:not(:last-child) {
|
|
2624
|
+
overflow: hidden;
|
|
2625
|
+
text-overflow: ellipsis;
|
|
2626
|
+
white-space: nowrap;
|
|
2627
|
+
}
|
|
2591
2628
|
@media (hover: hover) {
|
|
2592
2629
|
.group-hover\:-translate-x-0\.5:is(:where(.group):hover *) {
|
|
2593
2630
|
--tw-translate-x: calc(var(--spacing) * -0.5);
|
|
@@ -2659,9 +2696,22 @@
|
|
|
2659
2696
|
.first\:mt-1:first-child {
|
|
2660
2697
|
margin-top: var(--spacing);
|
|
2661
2698
|
}
|
|
2699
|
+
:is(.\*\:first\:font-medium > *):first-child {
|
|
2700
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
2701
|
+
font-weight: var(--font-weight-medium);
|
|
2702
|
+
}
|
|
2703
|
+
:is(.\*\:first\:text-fd-primary > *):first-child {
|
|
2704
|
+
color: var(--color-fd-primary);
|
|
2705
|
+
}
|
|
2662
2706
|
.last\:me-0:last-child {
|
|
2663
2707
|
margin-inline-end: 0px;
|
|
2664
2708
|
}
|
|
2709
|
+
.last\:line-clamp-2:last-child {
|
|
2710
|
+
overflow: hidden;
|
|
2711
|
+
display: -webkit-box;
|
|
2712
|
+
-webkit-box-orient: vertical;
|
|
2713
|
+
-webkit-line-clamp: 2;
|
|
2714
|
+
}
|
|
2665
2715
|
.last\:rounded-b-xl:last-child {
|
|
2666
2716
|
border-bottom-right-radius: var(--radius-xl);
|
|
2667
2717
|
border-bottom-left-radius: var(--radius-xl);
|
|
@@ -3067,6 +3117,10 @@
|
|
|
3067
3117
|
background-color: color-mix(in oklab, var(--color-fd-background) 80%, transparent);
|
|
3068
3118
|
}
|
|
3069
3119
|
}
|
|
3120
|
+
:is(.\*\:nth-2\:text-xs > *):nth-child(2) {
|
|
3121
|
+
font-size: var(--text-xs);
|
|
3122
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
3123
|
+
}
|
|
3070
3124
|
@supports (-webkit-touch-callout:none) {
|
|
3071
3125
|
.supports-\[-webkit-touch-callout\:none\]\:absolute {
|
|
3072
3126
|
position: absolute;
|
|
@@ -3657,6 +3711,12 @@
|
|
|
3657
3711
|
--fd-toc-width: 268px;
|
|
3658
3712
|
}
|
|
3659
3713
|
}
|
|
3714
|
+
.\[\&_\:\:highlight\(fd-search\)\]\:text-fd-primary ::highlight(fd-search) {
|
|
3715
|
+
color: var(--color-fd-primary);
|
|
3716
|
+
}
|
|
3717
|
+
.\[\&_\:\:highlight\(fd-search\)\]\:underline ::highlight(fd-search) {
|
|
3718
|
+
text-decoration-line: underline;
|
|
3719
|
+
}
|
|
3660
3720
|
.\[\&_svg\]\:size-3\.5 svg {
|
|
3661
3721
|
width: calc(var(--spacing) * 3.5);
|
|
3662
3722
|
height: calc(var(--spacing) * 3.5);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fumadocs/base-ui",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.17.1",
|
|
4
4
|
"description": "The Base UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -140,40 +140,37 @@
|
|
|
140
140
|
"dependencies": {
|
|
141
141
|
"@base-ui/react": "^1.8.0",
|
|
142
142
|
"@fuma-translate/react": "^1.0.2",
|
|
143
|
-
"@fumadocs/tailwind": "0.1.
|
|
143
|
+
"@fumadocs/tailwind": "0.1.3",
|
|
144
144
|
"class-variance-authority": "^0.7.1",
|
|
145
145
|
"cn": "^0.4.0",
|
|
146
|
+
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
146
147
|
"lucide-react": "^1.50.0",
|
|
147
148
|
"motion": "^14.0.0",
|
|
148
149
|
"next-themes": "^0.4.6",
|
|
149
150
|
"react-remove-scroll": "^2.7.2",
|
|
150
|
-
"rehype-raw": "^7.0.0",
|
|
151
151
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
152
|
-
"shiki": "^4.5.0"
|
|
153
|
-
"unist-util-visit": "^5.1.0"
|
|
152
|
+
"shiki": "^4.5.0"
|
|
154
153
|
},
|
|
155
154
|
"devDependencies": {
|
|
156
|
-
"@fumadocs/cli": "1.7.
|
|
155
|
+
"@fumadocs/cli": "1.7.5",
|
|
157
156
|
"@tailwindcss/cli": "^4.3.3",
|
|
158
157
|
"@tailwindcss/oxide": "^4.3.3",
|
|
159
158
|
"@tsdown/css": "^0.23.0",
|
|
160
|
-
"@types/hast": "^3.0.5",
|
|
161
159
|
"@types/mdx": "^2.0.14",
|
|
162
160
|
"@types/node": "^26.6.4",
|
|
163
161
|
"@types/react": "^19.3.0",
|
|
164
162
|
"@types/react-dom": "^19.3.0",
|
|
165
163
|
"fuma-cli": "^0.3.1",
|
|
166
|
-
"fumadocs-core": "16.
|
|
164
|
+
"fumadocs-core": "16.17.1",
|
|
167
165
|
"react-medium-image-zoom": "^5.4.9",
|
|
168
166
|
"tailwindcss": "^4.3.3",
|
|
169
167
|
"tsconfig": "0.0.0",
|
|
170
|
-
"tsdown": "0.23.0"
|
|
171
|
-
"unified": "^11.0.5"
|
|
168
|
+
"tsdown": "0.23.0"
|
|
172
169
|
},
|
|
173
170
|
"peerDependencies": {
|
|
174
171
|
"@types/mdx": "*",
|
|
175
172
|
"@types/react": "*",
|
|
176
|
-
"fumadocs-core": "16.
|
|
173
|
+
"fumadocs-core": "16.17.1",
|
|
177
174
|
"next": "16.x.x",
|
|
178
175
|
"react": "^19.2.0",
|
|
179
176
|
"react-dom": "^19.2.0",
|