fumadocs-ui 16.16.2 → 16.17.0
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/shared.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 +70 -7
- package/package.json +9 -12
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-sidebar-out 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 empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including inert information inset-e-0 inset-s-4 inset-y-2 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) mt-6 mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside overflow-x-clip p-0 pagination pb-1.5 pe-0 pe-
|
|
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-sidebar-out 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 empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including inert information inset-e-0 inset-s-4 inset-y-2 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) mt-6 mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside overflow-x-clip p-0 pagination pb-1.5 pe-0 pe-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 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 --fd-header-height --fd-left-width --fd-main-width --fd-right-width --row --width -me-1.5 -mt-1.5 -mx-1 -translate-x-[280px] @default @sm:max-w-[200px] [--fd-left-width:0px] [--fd-main-width:900px] [--fd-right-width:0px] [--row:calc(3*var(--spacing))] [--row:calc(6*var(--spacing))] [grid-area:left-margin/left-margin/right/right] [grid-area:left] [grid-area:main] [grid-area:right/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)] aiChat article autoScroll available backdrop-blur-sm base baseVariants before bg-fd-muted-foreground/50 bg-fd-popover/80 clientX collapse contentProps data-[active=false]:hover:text-fd-accent-foreground data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-fd-full defaultSlots defaultTabs edit exitTimerRef fd-glass-layout first:mt-0 flex-row-reverse font-semibold footer footerList fumadocs-core/breadcrumb getBreadcrumbItemsFromPath grid-cols-1 gridTemplate gridTemplateRows h-0 h-6 h-8 h-[calc(100dvh---spacing(4))] handles hover hover:decoration-dashed hover:decoration-fd-muted-foreground hover:opacity-80 hover:underline hover:underline-offset-4 inAnimation including information innerWidth inset-e-0 isLayoutTabActive itemTriggerVariants items-start justify-end 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)] 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 mobile mt-2 mt-2.5 mt-4 mx-2 my-2 nd-toc nd-toc-title no onPointerDown opacity-100 overflow-x-clip overflow-y-hidden p-0 p-6 pagination pb-16 pb-4 pe-3 pe-3.5 pen pointer pointer-events-none
|
|
1
|
+
@source inline("!footer --fd-header-height --fd-left-width --fd-main-width --fd-right-width --row --width -me-1.5 -mt-1.5 -mx-1 -translate-x-[280px] @default @sm:max-w-[200px] [--fd-left-width:0px] [--fd-main-width:900px] [--fd-right-width:0px] [--row:calc(3*var(--spacing))] [--row:calc(6*var(--spacing))] [grid-area:left-margin/left-margin/right/right] [grid-area:left] [grid-area:main] [grid-area:right/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)] aiChat article autoScroll available backdrop-blur-sm base baseVariants before bg-fd-muted-foreground/50 bg-fd-popover/80 clientX collapse contentProps data-[active=false]:hover:text-fd-accent-foreground data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-fd-full defaultSlots defaultTabs edit exitTimerRef fd-glass-layout first:mt-0 flex-row-reverse font-semibold footer footerList fumadocs-core/breadcrumb getBreadcrumbItemsFromPath grid-cols-1 gridTemplate gridTemplateRows h-0 h-6 h-8 h-[calc(100dvh---spacing(4))] handles hover hover:decoration-dashed hover:decoration-fd-muted-foreground hover:opacity-80 hover:underline hover:underline-offset-4 inAnimation including information innerWidth inset-e-0 isLayoutTabActive itemTriggerVariants items-start justify-end 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)] 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 mobile mt-2 mt-2.5 mt-4 mx-2 my-2 nd-toc nd-toc-title no onPointerDown opacity-100 overflow-x-clip overflow-y-hidden p-0 p-6 pagination pb-16 pb-4 pe-3 pe-3.5 pen pointer pointer-events-none provided ps-2.5 ps-3 ps-4.5 pt-2 pt-4 reuse right right-margin rightIcon setDate setInAnimation setMobileOpen shadow-fd-background shouldOpen size-10 size-12 size-3.5! size-4! start text-[1.75em] text-end text-fd-foreground text-fd-primary/80 timeout timezone top-2 transition-[background-color,width,height] transition-[grid-template-rows] transition-[opacity,height] transition-[width,padding] transitionTimerRef typography under unlisted updated useBaseSlots useFooterItems useGlassLayout w-(--width) w-[360px] w-[calc(280px---spacing(2))] we well xl:[@media(hover:none)]:[--row:calc(6*var(--spacing))] xl:[@media(hover:none)]:h-6 xl:[@media(hover:none)]:h-px xl:[@media(hover:none)]:opacity-100 xl:[@media(hover:none)]:pointer-events-auto xl:[@media(hover:none)]:w-(--width) xl: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");
|
package/css/generated/shared.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!collapsed !isActive !items !nested !open !title *:border-b *:data-[empty=true]:border-b-0 *:flex *:flex! *:flex-col *:flex-col! *:gap-0.5! *:has-[+:last-child[data-empty=true]]:border-b-0 *:last:border-b-0 *:rounded-full ---spacing --callout-color --color-fd- --color-fd-muted --fd-ai-chat-width --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --radix-navigation-menu-viewport-height --radix-popover-content-available-height --radix-popover-content-transform-origin --radix-popover-trigger-width --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top -mb-px -me-0.5 -me-2 -mx-px -rotate-90 -top-1.5 -translate-x-1/2 -translate-y-1/2 -z-1 @container @defaultValue @deprecated @fuma-translate/react @keyframes @max-lg:col-span-full @max-xl:hidden @param @radix-ui/react-accordion @radix-ui/react-collapsible @radix-ui/react-dialog @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-presence @radix-ui/react-scroll-area @radix-ui/react-tabs @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&_svg]:size-3.5 [&_svg]:size-4 [&_svg]:size-4.5 [&_svg]:size-5 [&_svg]:size-full [&_svg]:text-fd-muted-foreground [clip-path:inset(0_0_100%)] [offset-distance:var(--offset-distance,0)] [scrollbar-width:none] a abcdefghijklmnopqrstuvwxyz234567 about absolute accordion action actions active add advanced after algoliaClient align align-text-bottom alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allowedMode allows alphabet altKey always an anchor and 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-transparent bind binded bitsLeft black block blockRef blocks boolean border border-b border-l border-none border-s border-t border-transparent borderBottom bottom bottom-0 bottom-1.5 boundary buffer bundle button buttonVariants by cache cached can canonical case center central change changeLayout changes 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 compatible component components composedRef computed config const container containerRef containing content contents context controlled/uncontrolled copy core counterSet createContext createMarkdownRenderer createRelativeLink css ctx current currentColor custom customize cva cx cy d dangerouslySetInnerHTML dark dark:bg-(--shiki-dark-bg) dashed data data-[active=true]:text-fd-primary data-[motion=from-end]:animate-fd-enterFromRight data-[motion=from-start]:animate-fd-enterFromLeft data-[motion=to-end]:animate-fd-exitToRight data-[motion=to-start]:animate-fd-exitToLeft data-[state=active]:border-fd-primary data-[state=active]:text-fd-primary data-[state=closed]:animate-fd-accordion-up data-[state=closed]:animate-fd-collapsible-up data-[state=closed]:animate-fd-dialog-out data-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-nav-menu-out data-[state=closed]:animate-fd-popover-out data-[state=hidden]:animate-fd-fade-out data-[state=inactive]:hidden data-[state=open]:animate-fd-accordion-down data-[state=open]:animate-fd-collapsible-down data-[state=open]:animate-fd-dialog-in data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-nav-menu-in data-[state=open]:animate-fd-popover-in data-[state=open]:bg-fd-accent data-[state=open]:bg-fd-accent/50 data-[state=open]:text-fd-accent-foreground data-accordion-value data-active data-card data-checked data-checked:text-fd-accent-foreground data-collapsed data-empty data-icon data-line-numbers data-line-numbers-start data-search data-search-full data-state data-theme-toggle date debounced declare default defaultColor defaultFormatter defaultIndex defaultItems defaultLanguage defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay delayMs depends deprecated depth description desktop detect dialog dir disabled disabled:bg-fd-secondary disabled:opacity-50 disabled:pointer-events-none disabled:text-fd-secondary-foreground display displayName displayed distance div divide-fd-border divide-x divide-y 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 enabled encoded end-2 endIdx endpoint env environment equal error escape eslint-disable-next-line event export expose extends external extraProps false fd-moving-banner fd-scroll-container fd-search-list fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally fixed flex flex-1 flex-col flex-row flex-wrap flexDirection 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 forceMount forks formatter formatterOptions found fragment free from full fumadocs-core/framework fumadocs-core/highlight fumadocs-core/i18n fumadocs-core/link fumadocs-core/page-tree fumadocs-core/search fumadocs-core/source fumadocs-core/toc function gap gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-3.5 gap-4 gap-y-4 generated ghost github-dark github-light githubUrl given global globalKey grid grid-cols-2 grid-cols-[1fr_3fr] group group-data-[active=true]:bg-fd-primary group-data-[active=true]:text-fd-primary-foreground group-data-[state=active]:bg-fd-primary group-data-[state=open]:rotate-180 group-data-[state=open]:rotate-90 group-hover/heading:opacity-100 group/heading groupListeners groups guides h h-(--fd-animated-height) h-(--radix-navigation-menu-viewport-height) h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 hand handle handleThemeChange has-focus-visible:bg-fd-accent hash hashchange hast have header headers heading height here hidden hideLocale highlight highlighter hints hover:bg-fd-accent hover:bg-fd-accent/80 hover:bg-fd-primary/80 hover:text-fd-accent-foreground hovered href html hydration i i18n i18nProvider icon icon-sm icon-xs iconClass id idea idx if if-needed ignore ignoreTyping img import in inPre inTab index infinite info inline inline-flex input inputType inset-0 inset-e-2 inset-s-0 inset-s-3 inset-s-6 inset-x-0 inset-x-2 inset-y-0 inside instanceof instead integration interface intersect invisible is isActive isComposing isFirst isLast isLoading isTabActive isUp it item itemLineLengths itemVariants items items-center its js justify-between justify-center keepBackground key keyCode keydown keys l l0 l1 l2 label lang language languageSelect last:rounded-b-xl layer layout 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 list-none listbox listener listeners locale localeTranslations locales lower ltr lucide lucide-book lucide-book-icon lucide-react made main make mapped margin marginTop mark markdownUrl marked mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)] maskComposite maskImage max-h-(--radix-popover-content-available-height) max-h-20 max-h-[460px] max-h-[600px] max-h-[80svh] max-md:bg-fd-secondary max-md:border max-md:p-1.5 max-md:rounded-md max-w-[1400px] max-w-[98vw] max-w-full max-w-screen-sm max-width 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-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 ms-px mt-1 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name names namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new newTheme next next-themes next/og node nodes none noop noopener noreferrer normal normalize not not-last:mb-2 not-prose notation note now null number numbers object observer of offsetHeight offsetPath offsetTop on onChange onClick onCopy onKey onOpenChange onOpenChangeCallback onPointerEnter onPointerLeave onPointerMove onPrint onSearchChange onSearchChangeCallback onSelect onSelectCallback onTagChange onTagChangeCallback onValueChange once one only opacity-(--opacity,0) opacity-0 open openFromHash opened option optional options or oramaCloudClient order origin-(--radix-popover-content-transform-origin) origin-[top_center] origin-center original other out outline outline-none output over overflow-auto overflow-clip overflow-hidden overflow-x-auto overflow-y-auto override overscroll-contain own owner p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl 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 present prev 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 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 setHover setLoading setMounted setOpen setOpenSearch setSvg setTag setValue shadow-2xl shadow-black/50 shadow-lg shadow-md shadow-sm shiftKey shiki shikiOptions shortcuts should show showAlgolia showOrama shrink-0 side sideOffset sidebar signature simple since single site size size-1 size-3 size-3.5 size-4 size-5 size-6.5 size-9 size-full sizes slots sm 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.5 top-3 top-4 touch transform transition-[clip-path] transition-[height] transition-[opacity,offset-distance] transition-[width,height] 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 useTabsGroups useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visible visit vite void w w-(--fd-ai-chat-width) w-(--radix-popover-trigger-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces 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! *:flex-col *:flex-col! *:gap-0.5! *: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 --callout-color --color-fd- --color-fd-muted --fd-ai-chat-width --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --radix-navigation-menu-viewport-height --radix-popover-content-available-height --radix-popover-content-transform-origin --radix-popover-trigger-width --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top -mb-px -me-0.5 -me-2 -mx-px -rotate-90 -top-1.5 -translate-x-1/2 -translate-y-1/2 -z-1 @container @defaultValue @deprecated @fuma-translate/react @keyframes @max-lg:col-span-full @max-xl:hidden @param @radix-ui/react-accordion @radix-ui/react-collapsible @radix-ui/react-dialog @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-presence @radix-ui/react-scroll-area @radix-ui/react-tabs @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&_::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 advanced after align align-text-bottom alignItems alignmentBaseline all allowClear allowCopy allowedMode allows alphabet altKey always an anchor and 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-transparent bind binded 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 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 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-[motion=from-end]:animate-fd-enterFromRight data-[motion=from-start]:animate-fd-enterFromLeft data-[motion=to-end]:animate-fd-exitToRight data-[motion=to-start]:animate-fd-exitToLeft data-[state=active]:border-fd-primary data-[state=active]:text-fd-primary data-[state=closed]:animate-fd-accordion-up data-[state=closed]:animate-fd-collapsible-up data-[state=closed]:animate-fd-dialog-out data-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-nav-menu-out data-[state=closed]:animate-fd-popover-out data-[state=hidden]:animate-fd-fade-out data-[state=inactive]:hidden data-[state=open]:animate-fd-accordion-down data-[state=open]:animate-fd-collapsible-down data-[state=open]:animate-fd-dialog-in data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-nav-menu-in data-[state=open]:animate-fd-popover-in data-[state=open]:bg-fd-accent data-[state=open]:bg-fd-accent/50 data-[state=open]:text-fd-accent-foreground data-accordion-value data-active data-card data-checked data-checked:text-fd-accent-foreground data-collapsed data-empty data-highlight-ignore data-icon data-line-numbers data-line-numbers-start data-search data-search-full data-state data-theme-toggle date debounced declare default defaultColor defaultFormatter defaultIndex defaultItems defaultLanguage defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay delayMs depends deprecated depth description desktop detect development dialog dir disabled disabled:bg-fd-secondary disabled:opacity-50 disabled:pointer-events-none disabled:text-fd-secondary-foreground display displayName displayed distance div divide-fd-border divide-x divide-y 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 enabled encoded end-2 endIdx endpoint env environment equal error escape eslint-disable-next-line event export expose extends external extraProps false fd-moving-banner fd-scroll-container fd-search-list fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally fixed flex flex-1 flex-col flex-row flex-wrap flexDirection 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 forceMount forks formatter formatterOptions found free from full fumadocs-core/framework fumadocs-core/highlight fumadocs-core/i18n fumadocs-core/link fumadocs-core/page-tree fumadocs-core/search fumadocs-core/source fumadocs-core/toc function gap gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-3.5 gap-4 gap-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-[state=active]:bg-fd-primary group-data-[state=open]:rotate-180 group-data-[state=open]:rotate-90 group-hover/heading:opacity-100 group/heading groupListeners groups guides h h-(--fd-animated-height) h-(--radix-navigation-menu-viewport-height) h-9.5 h-[calc(100%+--spacing(1.5))] h-full h-px h1 h2 h3 h4 h5 h6 hand 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 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 inline inline-flex input inputType inset-0 inset-e-2 inset-s-0 inset-s-3 inset-s-6 inset-x-0 inset-x-2 inset-y-0 inside instanceof instead integration interface intersect invisible is isActive isComposing isFirst isLast isLoading isTabActive isUp it item itemLineLengths itemVariants items items-baseline items-center itemsProp its js justify-between justify-center keepBackground 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 list-none listbox listener listeners locale localeTranslations locales lower ltr lucide lucide-book lucide-book-icon lucide-react made main make mapped margin marginTop mark markdownUrl marked mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] maskComposite maskImage max-h-(--radix-popover-content-available-height) max-h-20 max-h-[460px] max-h-[600px] max-h-[80svh] max-md:bg-fd-secondary max-md:border max-md:p-1.5 max-md:rounded-md max-w-[1400px] max-w-[98vw] max-w-full max-w-screen-sm max-width 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-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 ms-px mt-1 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name names namespace nav navItems navTitle navigate navigation nd-copy-ignore nd-sidebar nd-sidebar-mobile nearest needed nested nested-url never new newTheme next next-themes next/og node nodes none noop noopener noreferrer normal normalize not not-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 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-(--radix-popover-content-transform-origin) origin-[top_center] origin-center original other out outline outline-none output over overflow-auto overflow-clip overflow-hidden overflow-x-auto overflow-y-auto override overscroll-contain own owner p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl 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 present prev 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 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 setHover setLoading setMounted setOpen setOpenSearch setSvg setTag setValue shadow-2xl shadow-black/50 shadow-lg shadow-md shadow-sm shiftKey shiki shikiOptions shortcuts should show showAlgolia showOrama shown shows shrink-0 side sideOffset sidebar signature simple since single site size size-1 size-3 size-3.5 size-4 size-5 size-6.5 size-9 size-full sizes slots sm 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.5 top-3 top-4 touch tr transform transition-[clip-path] transition-[height] transition-[opacity,offset-distance] transition-[width,height] 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 useTabsGroups 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-(--fd-ai-chat-width) w-(--radix-popover-trigger-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces 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");
|
|
@@ -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";
|
|
4
|
+
import { SearchResult, SearchResultItem, SearchResultRecord, SearchResultTable } from "fumadocs-core/search/client";
|
|
3
5
|
import { DialogContent, DialogOverlay } from "@radix-ui/react-dialog";
|
|
4
|
-
import {
|
|
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 }: 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(props: ComponentProps<typeof DialogOverlay>):
|
|
27
|
-
export declare function SearchDialogContent({ children, ...props }: ComponentProps<typeof DialogContent>):
|
|
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 }: 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(props: ComponentProps<typeof DialogOverlay>): JsxRuntime.JSX.Element;
|
|
41
|
+
export declare function SearchDialogContent({ children, ...props }: ComponentProps<typeof DialogContent>): 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 };
|
|
@@ -2,26 +2,19 @@
|
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
3
|
import { buttonVariants } from "../ui/button.js";
|
|
4
4
|
import { useRouter } from "fumadocs-core/framework";
|
|
5
|
+
import * as JsxRuntime from "react/jsx-runtime";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { ChevronRight, Hash, SearchIcon } from "lucide-react";
|
|
7
8
|
import { cva } from "class-variance-authority";
|
|
8
|
-
import { Fragment as Fragment$1, createContext, use, useCallback, useEffect, useEffectEvent, useMemo, useRef,
|
|
9
|
+
import { Fragment as Fragment$1, createContext, use, useCallback, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
9
10
|
import { T, useTranslations } from "@fuma-translate/react";
|
|
10
|
-
import { useOnChange } from "fumadocs-core/utils/use-on-change";
|
|
11
11
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
12
|
+
import { useHighlightQuery } from "fumadocs-core/search/client";
|
|
12
13
|
import { Dialog, DialogContent, DialogOverlay, DialogTitle } from "@radix-ui/react-dialog";
|
|
13
|
-
import {
|
|
14
|
-
import rehypeRaw from "rehype-raw";
|
|
15
|
-
import { visit } from "unist-util-visit";
|
|
14
|
+
import { toJsxRuntime } from "hast-util-to-jsx-runtime";
|
|
16
15
|
//#region src/components/dialog/search.tsx
|
|
17
16
|
const RootContext = createContext(null);
|
|
18
|
-
const ListContext = createContext(null);
|
|
19
17
|
const TagsListContext = createContext(null);
|
|
20
|
-
const PreContext = createContext(false);
|
|
21
|
-
const mdRenderer = createMarkdownRenderer({
|
|
22
|
-
remarkRehypeOptions: { allowDangerousHtml: true },
|
|
23
|
-
rehypePlugins: [rehypeRaw, rehypeCustomElements]
|
|
24
|
-
});
|
|
25
18
|
const mdComponents = {
|
|
26
19
|
mark(props) {
|
|
27
20
|
return /* @__PURE__ */ jsx("span", {
|
|
@@ -36,34 +29,20 @@ const mdComponents = {
|
|
|
36
29
|
className: "min-w-0"
|
|
37
30
|
});
|
|
38
31
|
},
|
|
39
|
-
|
|
40
|
-
return /* @__PURE__ */ jsx("strong", {
|
|
41
|
-
...props,
|
|
42
|
-
className: "text-fd-accent-foreground font-medium"
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
code(props) {
|
|
46
|
-
if (use(PreContext)) return /* @__PURE__ */ jsx("code", {
|
|
47
|
-
...props,
|
|
48
|
-
className: "mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)]"
|
|
49
|
-
});
|
|
50
|
-
return /* @__PURE__ */ jsx("code", {
|
|
51
|
-
...props,
|
|
52
|
-
className: "border rounded-md px-px bg-fd-secondary text-fd-secondary-foreground"
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
custom({ _tagName = "fragment", children, ...rest }) {
|
|
32
|
+
custom({ tagName, children, ...rest }) {
|
|
56
33
|
return /* @__PURE__ */ jsxs("span", {
|
|
57
34
|
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",
|
|
58
35
|
children: [
|
|
59
36
|
/* @__PURE__ */ jsx("code", {
|
|
60
|
-
|
|
61
|
-
|
|
37
|
+
"data-highlight-ignore": "",
|
|
38
|
+
className: "not-prose rounded-sm px-0.5 me-1 bg-fd-primary font-medium text-xs text-fd-primary-foreground border-none",
|
|
39
|
+
children: tagName
|
|
62
40
|
}),
|
|
63
41
|
Object.entries(rest).map(([k, v]) => {
|
|
64
42
|
if (typeof v !== "string") return;
|
|
65
43
|
return /* @__PURE__ */ jsxs("code", {
|
|
66
|
-
|
|
44
|
+
"data-highlight-ignore": "",
|
|
45
|
+
className: "not-prose truncate text-xs text-fd-muted-foreground px-1",
|
|
67
46
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
68
47
|
className: "text-fd-card-foreground",
|
|
69
48
|
children: [k, ": "]
|
|
@@ -80,25 +59,44 @@ const mdComponents = {
|
|
|
80
59
|
pre(props) {
|
|
81
60
|
return /* @__PURE__ */ jsx("pre", {
|
|
82
61
|
...props,
|
|
83
|
-
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)
|
|
84
|
-
children: /* @__PURE__ */ jsx(PreContext, {
|
|
85
|
-
value: true,
|
|
86
|
-
children: props.children
|
|
87
|
-
})
|
|
62
|
+
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)
|
|
88
63
|
});
|
|
89
64
|
}
|
|
90
65
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
66
|
+
const renderOptions = {
|
|
67
|
+
development: false,
|
|
68
|
+
components: mdComponents,
|
|
69
|
+
...JsxRuntime
|
|
70
|
+
};
|
|
71
|
+
function Children({ children }) {
|
|
72
|
+
return children;
|
|
73
|
+
}
|
|
74
|
+
function TableCell(props) {
|
|
75
|
+
return /* @__PURE__ */ jsx("div", {
|
|
76
|
+
...props,
|
|
77
|
+
className: "min-w-0 not-last:truncate last:line-clamp-2"
|
|
78
|
+
});
|
|
100
79
|
}
|
|
101
|
-
|
|
80
|
+
const tableRenderOptions = {
|
|
81
|
+
...renderOptions,
|
|
82
|
+
components: {
|
|
83
|
+
...mdComponents,
|
|
84
|
+
table: Children,
|
|
85
|
+
thead: Children,
|
|
86
|
+
tbody: Children,
|
|
87
|
+
tr: Children,
|
|
88
|
+
th: TableCell,
|
|
89
|
+
td: TableCell
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const rowRenderOptions = {
|
|
93
|
+
...tableRenderOptions,
|
|
94
|
+
components: {
|
|
95
|
+
...tableRenderOptions.components,
|
|
96
|
+
thead: () => null
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoading = false, data, onSelect: onSelectProp, children }) {
|
|
102
100
|
const router = useRouter();
|
|
103
101
|
const onOpenChangeCallback = useRef(onOpenChange);
|
|
104
102
|
onOpenChangeCallback.current = onOpenChange;
|
|
@@ -113,21 +111,41 @@ function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoading =
|
|
|
113
111
|
};
|
|
114
112
|
const onSelectCallback = useRef(onSelect);
|
|
115
113
|
onSelectCallback.current = onSelect;
|
|
114
|
+
const activeItem = useMemo(() => {
|
|
115
|
+
let active = null;
|
|
116
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
117
|
+
return {
|
|
118
|
+
getActive: () => active,
|
|
119
|
+
setActive(id) {
|
|
120
|
+
active = id;
|
|
121
|
+
for (const listener of listeners) listener();
|
|
122
|
+
},
|
|
123
|
+
subscribeActive(listener) {
|
|
124
|
+
listeners.add(listener);
|
|
125
|
+
return () => void listeners.delete(listener);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}, []);
|
|
116
129
|
return /* @__PURE__ */ jsx(Dialog, {
|
|
117
130
|
open,
|
|
118
131
|
onOpenChange,
|
|
119
132
|
children: /* @__PURE__ */ jsx(RootContext, {
|
|
120
133
|
value: useMemo(() => ({
|
|
134
|
+
...activeItem,
|
|
121
135
|
open,
|
|
122
136
|
search,
|
|
123
137
|
isLoading,
|
|
138
|
+
data,
|
|
139
|
+
query: data ? data.query : search,
|
|
124
140
|
onOpenChange: (v) => onOpenChangeCallback.current(v),
|
|
125
141
|
onSearchChange: (v) => onSearchChangeCallback.current(v),
|
|
126
142
|
onSelect: (v) => onSelectCallback.current(v)
|
|
127
143
|
}), [
|
|
144
|
+
activeItem,
|
|
128
145
|
isLoading,
|
|
129
146
|
open,
|
|
130
|
-
search
|
|
147
|
+
search,
|
|
148
|
+
data
|
|
131
149
|
]),
|
|
132
150
|
children
|
|
133
151
|
})
|
|
@@ -141,9 +159,12 @@ function SearchDialogHeader(props) {
|
|
|
141
159
|
}
|
|
142
160
|
function SearchDialogInput(props) {
|
|
143
161
|
const t = useTranslations({ note: "search dialog" });
|
|
144
|
-
const { search, onSearchChange } = useSearch();
|
|
162
|
+
const { search, onSearchChange, getActive, subscribeActive } = useSearch();
|
|
163
|
+
const active = useSyncExternalStore(subscribeActive, getActive, getActive);
|
|
145
164
|
return /* @__PURE__ */ jsx("input", {
|
|
146
165
|
role: "combobox",
|
|
166
|
+
"aria-expanded": active !== null,
|
|
167
|
+
"aria-activedescendant": active !== null ? `fd-search-option-${active}` : void 0,
|
|
147
168
|
"aria-label": t("Search"),
|
|
148
169
|
"aria-autocomplete": "list",
|
|
149
170
|
"aria-controls": "fd-search-list",
|
|
@@ -194,30 +215,32 @@ function SearchDialogContent({ children, ...props }) {
|
|
|
194
215
|
}), children]
|
|
195
216
|
});
|
|
196
217
|
}
|
|
197
|
-
function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div", {
|
|
218
|
+
function SearchDialogList({ items: itemsProp, defaultItems = null, Empty = () => /* @__PURE__ */ jsx("div", {
|
|
198
219
|
role: "status",
|
|
199
220
|
className: "py-12 text-center text-sm text-fd-muted-foreground",
|
|
200
221
|
children: /* @__PURE__ */ jsx(T, {
|
|
201
222
|
text: "No results found",
|
|
202
223
|
note: "search dialog"
|
|
203
224
|
})
|
|
204
|
-
}), Item = (props) => /* @__PURE__ */ jsx(SearchDialogListItem, { ...props }), ...props }) {
|
|
225
|
+
}), Item = (props) => /* @__PURE__ */ jsx(SearchDialogListItem, { ...props }), Table = (props) => /* @__PURE__ */ jsx(SearchDialogListTable, { ...props }), ...props }) {
|
|
205
226
|
const ref = useRef(null);
|
|
206
227
|
const t = useTranslations({ note: "search dialog" });
|
|
207
|
-
const { onSelect } = useSearch();
|
|
208
|
-
const
|
|
228
|
+
const { onSelect, data, getActive, setActive } = useSearch();
|
|
229
|
+
const items = itemsProp === void 0 ? data?.items ?? defaultItems : itemsProp;
|
|
230
|
+
useLayoutEffect(() => setActive(items?.[0]?.id ?? null), [setActive, items]);
|
|
209
231
|
const onKey = useEffectEvent((e) => {
|
|
210
232
|
if (!items || e.isComposing || e.keyCode === 229) return;
|
|
233
|
+
const list = flattenItems(items);
|
|
211
234
|
if (e.key === "ArrowDown" || e.key == "ArrowUp") {
|
|
212
|
-
let idx =
|
|
235
|
+
let idx = list.findIndex((item) => item.id === getActive());
|
|
213
236
|
if (idx === -1) idx = 0;
|
|
214
237
|
else if (e.key === "ArrowDown") idx++;
|
|
215
238
|
else idx--;
|
|
216
|
-
setActive(
|
|
239
|
+
setActive(list.at(idx % list.length)?.id ?? null);
|
|
217
240
|
e.preventDefault();
|
|
218
241
|
}
|
|
219
242
|
if (e.key === "Enter") {
|
|
220
|
-
const selected =
|
|
243
|
+
const selected = list.find((item) => item.id === getActive());
|
|
221
244
|
if (selected) onSelect(selected);
|
|
222
245
|
e.preventDefault();
|
|
223
246
|
}
|
|
@@ -237,46 +260,81 @@ function SearchDialogList({ items = null, Empty = () => /* @__PURE__ */ jsx("div
|
|
|
237
260
|
window.removeEventListener("keydown", onKey);
|
|
238
261
|
};
|
|
239
262
|
}, []);
|
|
240
|
-
useOnChange(items, () => {
|
|
241
|
-
setActive(items?.[0]?.id ?? null);
|
|
242
|
-
});
|
|
243
|
-
useEffect(() => {
|
|
244
|
-
const input = ref.current?.closest("[role=\"dialog\"]")?.querySelector("[role=\"combobox\"]");
|
|
245
|
-
if (!input) return;
|
|
246
|
-
input.setAttribute("aria-expanded", String(active !== null));
|
|
247
|
-
if (active !== null) input.setAttribute("aria-activedescendant", `fd-search-option-${active}`);
|
|
248
|
-
else input.removeAttribute("aria-activedescendant");
|
|
249
|
-
}, [active]);
|
|
250
263
|
return /* @__PURE__ */ jsx("div", {
|
|
251
264
|
...props,
|
|
252
265
|
ref,
|
|
253
266
|
"data-empty": items === null,
|
|
254
|
-
className: cn("overflow-hidden h-(--fd-animated-height) transition-[height]", props.className),
|
|
255
|
-
children: /* @__PURE__ */
|
|
267
|
+
className: cn("overflow-hidden h-(--fd-animated-height) transition-[height] [&_::highlight(fd-search)]:text-fd-primary [&_::highlight(fd-search)]:underline", props.className),
|
|
268
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
256
269
|
id: "fd-search-list",
|
|
257
270
|
role: items?.length ? "listbox" : void 0,
|
|
258
271
|
"aria-label": items?.length ? t("Search") : void 0,
|
|
259
272
|
className: cn("w-full flex flex-col overflow-y-auto max-h-[460px] p-1", !items && "hidden"),
|
|
260
|
-
children: /* @__PURE__ */
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}) }, item.id))]
|
|
269
|
-
})
|
|
273
|
+
children: [items?.length === 0 && Empty(), items?.map((item) => /* @__PURE__ */ jsx(Fragment$1, { children: item.type === "table" ? Table({
|
|
274
|
+
table: item,
|
|
275
|
+
Item,
|
|
276
|
+
onSelect
|
|
277
|
+
}) : Item({
|
|
278
|
+
item,
|
|
279
|
+
onClick: () => onSelect(item)
|
|
280
|
+
}) }, item.id))]
|
|
270
281
|
})
|
|
271
282
|
});
|
|
272
283
|
}
|
|
273
|
-
function
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
284
|
+
function flattenItems(items) {
|
|
285
|
+
const out = [];
|
|
286
|
+
for (const item of items) if (item.type === "table") out.push(...item.rows);
|
|
287
|
+
else out.push(item);
|
|
288
|
+
return out;
|
|
289
|
+
}
|
|
290
|
+
function SearchDialogListTable({ table, Item, onSelect }) {
|
|
291
|
+
const { query } = useSearch();
|
|
292
|
+
const highlightRef = useHighlightQuery(query);
|
|
293
|
+
const headerId = `fd-search-table-${table.id}`;
|
|
294
|
+
const header = useMemo(() => table.header && toJsxRuntime(table.header, tableRenderOptions), [table.header]);
|
|
295
|
+
return /* @__PURE__ */ jsx("div", {
|
|
296
|
+
role: table.header ? "group" : void 0,
|
|
297
|
+
"aria-labelledby": table.header ? headerId : void 0,
|
|
298
|
+
className: "ms-3 shrink-0 border-s py-2 ps-3.25 pe-2.5",
|
|
299
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
300
|
+
className: "grid gap-x-3 overflow-hidden rounded-lg border bg-fd-card text-sm",
|
|
301
|
+
style: { gridTemplateColumns: `${"fit-content(30%) ".repeat(table.columns - 1)}minmax(30%, 1fr)` },
|
|
302
|
+
children: [header && /* @__PURE__ */ jsx("div", {
|
|
303
|
+
id: headerId,
|
|
304
|
+
ref: highlightRef,
|
|
305
|
+
"aria-hidden": true,
|
|
306
|
+
className: "col-span-full grid grid-cols-subgrid bg-fd-secondary px-3 py-1 text-xs text-fd-muted-foreground",
|
|
307
|
+
children: header
|
|
308
|
+
}), table.rows.map((row) => /* @__PURE__ */ jsx(Fragment$1, { children: Item({
|
|
309
|
+
item: row,
|
|
310
|
+
table,
|
|
311
|
+
onClick: () => onSelect(row)
|
|
312
|
+
}) }, row.id))]
|
|
313
|
+
})
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
function SearchDialogListItem({ item, table, className, children, renderMarkdown, ...props }) {
|
|
317
|
+
const { query, getActive, setActive, subscribeActive } = useSearch();
|
|
318
|
+
const isActive = () => getActive() === item.id;
|
|
319
|
+
const active = useSyncExternalStore(subscribeActive, isActive, isActive);
|
|
320
|
+
const highlightRef = useHighlightQuery(query);
|
|
321
|
+
const content = useMemo(() => {
|
|
322
|
+
if (item.type === "action") return item.node;
|
|
323
|
+
if (renderMarkdown && typeof item.content === "string") return renderMarkdown(item.content);
|
|
324
|
+
if (!("hastContent" in item)) return item.content;
|
|
325
|
+
if (!table) return toJsxRuntime(item.hastContent, renderOptions);
|
|
326
|
+
return toJsxRuntime(item.hastContent, table.header ? rowRenderOptions : tableRenderOptions);
|
|
327
|
+
}, [
|
|
328
|
+
item,
|
|
329
|
+
renderMarkdown,
|
|
330
|
+
table
|
|
331
|
+
]);
|
|
332
|
+
if (item.type === "action") children ??= content;
|
|
333
|
+
else if (table) children ??= /* @__PURE__ */ jsx("div", {
|
|
334
|
+
ref: highlightRef,
|
|
335
|
+
className: cn("contents", !table.header && "*:first:font-medium *:first:text-fd-primary *:nth-2:text-xs *:not-first:text-fd-muted-foreground"),
|
|
336
|
+
children: content
|
|
337
|
+
});
|
|
280
338
|
else children ??= /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
281
339
|
/* @__PURE__ */ jsx("div", {
|
|
282
340
|
className: "inline-flex items-center text-fd-muted-foreground text-xs empty:hidden",
|
|
@@ -288,24 +346,23 @@ function SearchDialogListItem({ item, className, children, renderMarkdown = (s)
|
|
|
288
346
|
}),
|
|
289
347
|
item.type === "heading" && /* @__PURE__ */ jsx(Hash, { className: "absolute inset-s-6 top-2.5 size-4 text-fd-muted-foreground" }),
|
|
290
348
|
/* @__PURE__ */ jsx("div", {
|
|
291
|
-
|
|
292
|
-
|
|
349
|
+
ref: highlightRef,
|
|
350
|
+
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"),
|
|
351
|
+
children: content
|
|
293
352
|
})
|
|
294
353
|
] });
|
|
295
|
-
return /* @__PURE__ */ jsx("
|
|
296
|
-
type: "button",
|
|
354
|
+
return /* @__PURE__ */ jsx("div", {
|
|
297
355
|
id: `fd-search-option-${item.id}`,
|
|
298
356
|
role: "option",
|
|
299
|
-
tabIndex: -1,
|
|
300
357
|
ref: useCallback((element) => {
|
|
301
358
|
if (active && element) scrollIntoView(element, {
|
|
302
359
|
scrollMode: "if-needed",
|
|
303
360
|
block: "nearest",
|
|
304
|
-
boundary: element.
|
|
361
|
+
boundary: element.closest("[role=\"listbox\"]")
|
|
305
362
|
});
|
|
306
363
|
}, [active]),
|
|
307
364
|
"aria-selected": active,
|
|
308
|
-
className: cn("
|
|
365
|
+
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),
|
|
309
366
|
onPointerMove: () => setActive(item.id),
|
|
310
367
|
...props,
|
|
311
368
|
children
|
|
@@ -361,10 +418,5 @@ function useTagsList() {
|
|
|
361
418
|
if (!ctx) throw new Error("Missing <TagsList />");
|
|
362
419
|
return ctx;
|
|
363
420
|
}
|
|
364
|
-
function useSearchList() {
|
|
365
|
-
const ctx = use(ListContext);
|
|
366
|
-
if (!ctx) throw new Error("Missing <SearchDialogList />");
|
|
367
|
-
return ctx;
|
|
368
|
-
}
|
|
369
421
|
//#endregion
|
|
370
|
-
export { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogListItem, SearchDialogOverlay, TagsList, TagsListItem, useSearch,
|
|
422
|
+
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
|
@@ -485,6 +485,9 @@
|
|
|
485
485
|
.ms-2 {
|
|
486
486
|
margin-inline-start: calc(var(--spacing) * 2);
|
|
487
487
|
}
|
|
488
|
+
.ms-3 {
|
|
489
|
+
margin-inline-start: calc(var(--spacing) * 3);
|
|
490
|
+
}
|
|
488
491
|
.ms-auto {
|
|
489
492
|
margin-inline-start: auto;
|
|
490
493
|
}
|
|
@@ -517,7 +520,7 @@
|
|
|
517
520
|
color: var(--tw-prose-body);
|
|
518
521
|
max-width: none;
|
|
519
522
|
font-size: calc(1rem * var(--tw-prose-size));
|
|
520
|
-
line-height: calc(1.75rem * var(--tw-prose-size));
|
|
523
|
+
line-height: var(--tw-leading, calc(1.75rem * var(--tw-prose-size)));
|
|
521
524
|
:where([class~="lead"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
522
525
|
font-size: 1.25em;
|
|
523
526
|
line-height: 1.6;
|
|
@@ -834,6 +837,12 @@
|
|
|
834
837
|
:where(.prose > :last-child):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
835
838
|
margin-bottom: 0;
|
|
836
839
|
}
|
|
840
|
+
:where(blockquote > :first-child):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
841
|
+
margin-top: 0;
|
|
842
|
+
}
|
|
843
|
+
:where(blockquote > :last-child):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
844
|
+
margin-bottom: 0;
|
|
845
|
+
}
|
|
837
846
|
:where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
838
847
|
font-size: 0.875em;
|
|
839
848
|
line-height: 1.7142857;
|
|
@@ -1281,6 +1290,9 @@
|
|
|
1281
1290
|
.animate-pulse {
|
|
1282
1291
|
animation: var(--animate-pulse);
|
|
1283
1292
|
}
|
|
1293
|
+
.cursor-default {
|
|
1294
|
+
cursor: default;
|
|
1295
|
+
}
|
|
1284
1296
|
.resize {
|
|
1285
1297
|
resize: both;
|
|
1286
1298
|
}
|
|
@@ -1317,6 +1329,9 @@
|
|
|
1317
1329
|
.grid-cols-\[1fr_3fr\] {
|
|
1318
1330
|
grid-template-columns: 1fr 3fr;
|
|
1319
1331
|
}
|
|
1332
|
+
.grid-cols-subgrid {
|
|
1333
|
+
grid-template-columns: subgrid;
|
|
1334
|
+
}
|
|
1320
1335
|
.flex-col {
|
|
1321
1336
|
flex-direction: column;
|
|
1322
1337
|
}
|
|
@@ -1329,6 +1344,9 @@
|
|
|
1329
1344
|
.flex-wrap {
|
|
1330
1345
|
flex-wrap: wrap;
|
|
1331
1346
|
}
|
|
1347
|
+
.items-baseline {
|
|
1348
|
+
align-items: baseline;
|
|
1349
|
+
}
|
|
1332
1350
|
.items-center {
|
|
1333
1351
|
align-items: center;
|
|
1334
1352
|
}
|
|
@@ -1380,6 +1398,9 @@
|
|
|
1380
1398
|
.gap-6 {
|
|
1381
1399
|
gap: calc(var(--spacing) * 6);
|
|
1382
1400
|
}
|
|
1401
|
+
.gap-x-3 {
|
|
1402
|
+
column-gap: calc(var(--spacing) * 3);
|
|
1403
|
+
}
|
|
1383
1404
|
.gap-y-4 {
|
|
1384
1405
|
row-gap: calc(var(--spacing) * 4);
|
|
1385
1406
|
}
|
|
@@ -1601,9 +1622,6 @@
|
|
|
1601
1622
|
.mask-\[linear-gradient\(to_bottom\,transparent\,white_16px\,white_calc\(100\%-16px\)\,transparent\)\] {
|
|
1602
1623
|
mask-image: linear-gradient(to bottom,transparent,white 16px,white calc(100% - 16px),transparent);
|
|
1603
1624
|
}
|
|
1604
|
-
.mask-\[linear-gradient\(to_bottom\,white\,white_30px\,transparent_80px\)\] {
|
|
1605
|
-
mask-image: linear-gradient(to bottom,white,white 30px,transparent 80px);
|
|
1606
|
-
}
|
|
1607
1625
|
.fill-\(--callout-color\) {
|
|
1608
1626
|
fill: var(--callout-color);
|
|
1609
1627
|
}
|
|
@@ -1685,9 +1703,6 @@
|
|
|
1685
1703
|
.px-8 {
|
|
1686
1704
|
padding-inline: calc(var(--spacing) * 8);
|
|
1687
1705
|
}
|
|
1688
|
-
.px-px {
|
|
1689
|
-
padding-inline: 1px;
|
|
1690
|
-
}
|
|
1691
1706
|
.py-0 {
|
|
1692
1707
|
padding-block: 0px;
|
|
1693
1708
|
}
|
|
@@ -1736,6 +1751,9 @@
|
|
|
1736
1751
|
.ps-3 {
|
|
1737
1752
|
padding-inline-start: calc(var(--spacing) * 3);
|
|
1738
1753
|
}
|
|
1754
|
+
.ps-3\.25 {
|
|
1755
|
+
padding-inline-start: calc(var(--spacing) * 3.25);
|
|
1756
|
+
}
|
|
1739
1757
|
.ps-4 {
|
|
1740
1758
|
padding-inline-start: calc(var(--spacing) * 4);
|
|
1741
1759
|
}
|
|
@@ -1857,6 +1875,10 @@
|
|
|
1857
1875
|
.text-\[10px\] {
|
|
1858
1876
|
font-size: 10px;
|
|
1859
1877
|
}
|
|
1878
|
+
.leading-5 {
|
|
1879
|
+
--tw-leading: calc(var(--spacing) * 5);
|
|
1880
|
+
line-height: calc(var(--spacing) * 5);
|
|
1881
|
+
}
|
|
1860
1882
|
.leading-none {
|
|
1861
1883
|
--tw-leading: 1;
|
|
1862
1884
|
line-height: 1;
|
|
@@ -1948,6 +1970,9 @@
|
|
|
1948
1970
|
.text-fd-secondary-foreground {
|
|
1949
1971
|
color: var(--color-fd-secondary-foreground);
|
|
1950
1972
|
}
|
|
1973
|
+
.text-inherit {
|
|
1974
|
+
color: inherit;
|
|
1975
|
+
}
|
|
1951
1976
|
.line-through {
|
|
1952
1977
|
text-decoration-line: line-through;
|
|
1953
1978
|
}
|
|
@@ -2284,9 +2309,24 @@
|
|
|
2284
2309
|
border-bottom-style: var(--tw-border-style);
|
|
2285
2310
|
border-bottom-width: 1px;
|
|
2286
2311
|
}
|
|
2312
|
+
:is(.\*\:mask-\[linear-gradient\(to_bottom\,white\,white_30px\,transparent_80px\)\] > *) {
|
|
2313
|
+
mask-image: linear-gradient(to bottom,white,white 30px,transparent 80px);
|
|
2314
|
+
}
|
|
2315
|
+
.not-first\:border-t:not(:first-child) {
|
|
2316
|
+
border-top-style: var(--tw-border-style);
|
|
2317
|
+
border-top-width: 1px;
|
|
2318
|
+
}
|
|
2319
|
+
:is(.\*\:not-first\:text-fd-muted-foreground > *):not(:first-child) {
|
|
2320
|
+
color: var(--color-fd-muted-foreground);
|
|
2321
|
+
}
|
|
2287
2322
|
.not-last\:mb-2:not(:last-child) {
|
|
2288
2323
|
margin-bottom: calc(var(--spacing) * 2);
|
|
2289
2324
|
}
|
|
2325
|
+
.not-last\:truncate:not(:last-child) {
|
|
2326
|
+
overflow: hidden;
|
|
2327
|
+
text-overflow: ellipsis;
|
|
2328
|
+
white-space: nowrap;
|
|
2329
|
+
}
|
|
2290
2330
|
@media (hover: hover) {
|
|
2291
2331
|
.group-hover\/heading\:opacity-100:is(:where(.group\/heading):hover *) {
|
|
2292
2332
|
opacity: 100%;
|
|
@@ -2344,9 +2384,22 @@
|
|
|
2344
2384
|
.first\:mt-0:first-child {
|
|
2345
2385
|
margin-top: 0px;
|
|
2346
2386
|
}
|
|
2387
|
+
:is(.\*\:first\:font-medium > *):first-child {
|
|
2388
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
2389
|
+
font-weight: var(--font-weight-medium);
|
|
2390
|
+
}
|
|
2391
|
+
:is(.\*\:first\:text-fd-primary > *):first-child {
|
|
2392
|
+
color: var(--color-fd-primary);
|
|
2393
|
+
}
|
|
2347
2394
|
.last\:me-0:last-child {
|
|
2348
2395
|
margin-inline-end: 0px;
|
|
2349
2396
|
}
|
|
2397
|
+
.last\:line-clamp-2:last-child {
|
|
2398
|
+
overflow: hidden;
|
|
2399
|
+
display: -webkit-box;
|
|
2400
|
+
-webkit-box-orient: vertical;
|
|
2401
|
+
-webkit-line-clamp: 2;
|
|
2402
|
+
}
|
|
2350
2403
|
.last\:rounded-b-xl:last-child {
|
|
2351
2404
|
border-bottom-right-radius: var(--radius-xl);
|
|
2352
2405
|
border-bottom-left-radius: var(--radius-xl);
|
|
@@ -2610,6 +2663,10 @@
|
|
|
2610
2663
|
background-color: color-mix(in oklab, var(--color-fd-background) 80%, transparent);
|
|
2611
2664
|
}
|
|
2612
2665
|
}
|
|
2666
|
+
:is(.\*\:nth-2\:text-xs > *):nth-child(2) {
|
|
2667
|
+
font-size: var(--text-xs);
|
|
2668
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
2669
|
+
}
|
|
2613
2670
|
@media (prefers-reduced-motion: reduce) {
|
|
2614
2671
|
.motion-reduce\:transition-none {
|
|
2615
2672
|
transition-property: none;
|
|
@@ -3063,6 +3120,12 @@
|
|
|
3063
3120
|
--fd-toc-width: 268px;
|
|
3064
3121
|
}
|
|
3065
3122
|
}
|
|
3123
|
+
.\[\&_\:\:highlight\(fd-search\)\]\:text-fd-primary ::highlight(fd-search) {
|
|
3124
|
+
color: var(--color-fd-primary);
|
|
3125
|
+
}
|
|
3126
|
+
.\[\&_\:\:highlight\(fd-search\)\]\:underline ::highlight(fd-search) {
|
|
3127
|
+
text-decoration-line: underline;
|
|
3128
|
+
}
|
|
3066
3129
|
.\[\&_svg\]\:size-3\.5 svg {
|
|
3067
3130
|
width: calc(var(--spacing) * 3.5);
|
|
3068
3131
|
height: calc(var(--spacing) * 3.5);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.17.0",
|
|
4
4
|
"description": "The Radix UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
},
|
|
140
140
|
"dependencies": {
|
|
141
141
|
"@fuma-translate/react": "^1.0.2",
|
|
142
|
-
"@fumadocs/tailwind": "0.1.
|
|
142
|
+
"@fumadocs/tailwind": "0.1.3",
|
|
143
143
|
"@radix-ui/react-accordion": "^1.2.20",
|
|
144
144
|
"@radix-ui/react-collapsible": "^1.1.20",
|
|
145
145
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
@@ -152,38 +152,35 @@
|
|
|
152
152
|
"@radix-ui/react-tabs": "^1.1.21",
|
|
153
153
|
"class-variance-authority": "^0.7.1",
|
|
154
154
|
"cn": "^0.4.0",
|
|
155
|
+
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
155
156
|
"lucide-react": "^1.50.0",
|
|
156
157
|
"motion": "^14.0.0",
|
|
157
158
|
"next-themes": "^0.4.6",
|
|
158
159
|
"react-remove-scroll": "^2.7.2",
|
|
159
|
-
"rehype-raw": "^7.0.0",
|
|
160
160
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
161
|
-
"shiki": "^4.5.0"
|
|
162
|
-
"unist-util-visit": "^5.1.0"
|
|
161
|
+
"shiki": "^4.5.0"
|
|
163
162
|
},
|
|
164
163
|
"devDependencies": {
|
|
165
|
-
"@fumadocs/base-ui": "16.
|
|
166
|
-
"@fumadocs/cli": "1.7.
|
|
164
|
+
"@fumadocs/base-ui": "16.17.0",
|
|
165
|
+
"@fumadocs/cli": "1.7.4",
|
|
167
166
|
"@tailwindcss/cli": "^4.3.3",
|
|
168
167
|
"@tailwindcss/oxide": "^4.3.3",
|
|
169
168
|
"@tsdown/css": "^0.23.0",
|
|
170
|
-
"@types/hast": "^3.0.5",
|
|
171
169
|
"@types/mdx": "^2.0.14",
|
|
172
170
|
"@types/node": "^26.6.4",
|
|
173
171
|
"@types/react": "^19.3.0",
|
|
174
172
|
"@types/react-dom": "^19.3.0",
|
|
175
173
|
"fuma-cli": "^0.3.1",
|
|
176
|
-
"fumadocs-core": "16.
|
|
174
|
+
"fumadocs-core": "16.17.0",
|
|
177
175
|
"react-medium-image-zoom": "^5.4.9",
|
|
178
176
|
"tailwindcss": "^4.3.3",
|
|
179
177
|
"tsconfig": "0.0.0",
|
|
180
|
-
"tsdown": "0.23.0"
|
|
181
|
-
"unified": "^11.0.5"
|
|
178
|
+
"tsdown": "0.23.0"
|
|
182
179
|
},
|
|
183
180
|
"peerDependencies": {
|
|
184
181
|
"@types/mdx": "*",
|
|
185
182
|
"@types/react": "*",
|
|
186
|
-
"fumadocs-core": "16.
|
|
183
|
+
"fumadocs-core": "16.17.0",
|
|
187
184
|
"next": "16.x.x",
|
|
188
185
|
"react": "^19.2.0",
|
|
189
186
|
"react-dom": "^19.2.0",
|