fumadocs-ui 16.16.0 → 16.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/generated/docs.css +1 -1
- package/css/generated/flux.css +1 -1
- package/css/generated/glass.css +1 -1
- package/css/generated/home.css +1 -1
- package/css/generated/notebook.css +1 -1
- package/css/generated/shared.css +1 -1
- package/dist/components/sidebar/base.d.ts +7 -1
- package/dist/components/sidebar/base.js +10 -1
- package/dist/components/tabs.js +2 -7
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.js +44 -25
- package/dist/contexts/search.js +3 -8
- package/dist/layouts/docs/client.js +1 -0
- package/dist/layouts/flux/slots/sidebar.d.ts +1 -1
- package/dist/layouts/flux/slots/sidebar.js +9 -11
- package/dist/layouts/glass/slots/sidebar.js +7 -4
- package/dist/layouts/notebook/client.js +1 -0
- package/dist/layouts/shared/client.js +1 -1
- package/dist/provider/base.js +3 -25
- package/dist/style.css +5 -0
- package/dist/utils/hotkey.js +29 -0
- package/package.json +5 -5
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]
|
|
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-2.5 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/flux.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!enabled !header *:gap-0! *:rounded-lg --removed-body-scroll-bar-size -mx-1 [&_svg]:shrink-0 [grid-area:main]
|
|
1
|
+
@source inline("!enabled !header *:gap-0! *:rounded-lg --removed-body-scroll-bar-size -mx-1 [&_svg]:shrink-0 [grid-area:main] animate animate-fd-fade-in aria-valuemax aria-valuemin aria-valuenow article available backdrop-blur-md backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-y-1 before:start-2.5 before:w-px bg-fd-background/60 bg-fd-popover/80 border-x bottom-26 breadcrumb breadcrumbEnabled circleProps circumference clerk click containerProps createLinkItemRenderer createPortal data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-y-2.5 data-[active=true]:before:start-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-full data-layout-content data-layout-main data-toc-popover data-toc-popover-content data-toc-popover-trigger defaultChildren defaultSlots defaultTabs duration ease edit empty:mb-0 exit first:mt-0 flex-row-reverse flux-layout-slot font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 getBreadcrumbItemsFromPath grid-cols-1 h-8.5 h-9 head hide hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none including information initial justify-items-center layout-level lg:text-sm linkItems mask-[linear-gradient(to_bottom,transparent,white_--spacing(14),white_calc(100%---spacing(14)),transparent)] max max-h-[50vh] max-w-[1200px] max-w-[900px] max-w-svw mb-1.5 mb-4 mb-8 mb-auto md:pt-8 md:px-6 min min-h-11 motion motion/react ms-1 mt-6 nd-flux-layout nd-page no normalizedValue onAnimationComplete opacity overflow-x-clip overflow-y-hidden pagination pb-24 pointer-events-none popLayout pr-(--removed-body-scroll-bar-size,0) progress progressbar provided ps-2.5 py-10 py-16 py-6 radius react-remove-scroll renderNavigationPanel replace restSvgProps rotate-180 scale selectedIdx setBlockScroll setContainer setDate sidebarEnabled sidebarProps size-4.5 sm:border sm:bottom-6 sm:max-w-[380px] sm:max-w-[400px] sm:p-1 sm:rounded-2xl spanProps start stroke-current/25 strokeDasharray strokeDashoffset tabDropdown tableOfContent text-[1.75em] text-end timezone tocEnabled tocProps tool transition translate-x-[calc(-50%-var(--removed-body-scroll-bar-size,0px)/2)] translateY typography under updated useBaseSlots useDocsPage useFluxLayout useFooterItems w-[calc(100%-var(--removed-body-scroll-bar-size,0px))] wait xl:pt-14 xl:px-8 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)]
|
|
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 prose-sm provided ps-2.5 ps-3 ps-4.5 pt-2 pt-4 reuse right right-margin rightIcon setDate setInAnimation setMobileOpen shadow-fd-background shouldOpen size-10 size-12 size-3.5! size-4! start text-[1.75em] text-end text-fd-foreground text-fd-primary/80 timeout timezone top-2 transition-[background-color,width,height] transition-[grid-template-rows] transition-[opacity,height] transition-[width,padding] transitionTimerRef typography under unlisted updated useBaseSlots useFooterItems useGlassLayout w-(--width) w-[360px] w-[calc(280px---spacing(2))] we well xl:[@media(hover:none)]:[--row:calc(6*var(--spacing))] xl:[@media(hover:none)]:h-6 xl:[@media(hover:none)]:h-px xl:[@media(hover:none)]:opacity-100 xl:[@media(hover:none)]:pointer-events-auto xl:[@media(hover:none)]:w-(--width) xl: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/home.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("*:max-w-(--fd-layout-width) *:mx-auto --fd-layout-width -me-1.5 -ms-1.5 -mx-1 [&_svg]:size-5.5 [--fd-layout-width:1400px]
|
|
1
|
+
@source inline("*:max-w-(--fd-layout-width) *:mx-auto --fd-layout-width -me-1.5 -ms-1.5 -mx-1 [&_svg]:size-5.5 [--fd-layout-width:1400px] been bg-fd-background/80 data-[active=true]:font-medium defaultVariants enableHoverToOpen first:ms-0 font-bold font-semibold gap-2.5 grid-cols-1 h-14 had hideIfDisabled hover:text-fd-popover-foreground/50 hovering isTop isTransparent justify-end last:me-0 lg:grid-cols-3 lg:hidden linkItems looking max-lg:hidden max-lg:rounded-b-2xl max-lg:shadow-lg max-sm:hidden max-sm:mt-2 max-w-[240px] max-w-md mb-4 md:grid-cols-2 might mobile mt-4 navEnabled navItemVariants nd-home-layout nd-nav ps-2.5 px-6 px-8 sm:flex-row sm:hidden sm:items-center sm:justify-end temporarily text-2xl text-6xl text-base transparentMode under useBaseSlots useHomeLayout useIsScrollTop");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@source inline("!footer !isSelected !showItem *:col-start-1 *:max-w-[1285px] *:max-w-[900px] *:my-auto *:pointer-events-auto *:row-start-1 *:w-(--fd-sidebar-width) --fd-ai-chat-col --fd-ai-chat-col_300ms_ease-in-out --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-col_150ms --fd-sidebar-width --fd-toc-col --fd-toc-popover-height --fd-toc-width -me-1.5 -ms-1.5 -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-col:max(var(--fd-toc-width),var(--fd-ai-chat-col))] [--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] [transition:--fd-sidebar-col_150ms,--fd-ai-chat-col_300ms_ease-in-out]
|
|
1
|
+
@source inline("!footer !isSelected !showItem *:col-start-1 *:max-w-[1285px] *:max-w-[900px] *:my-auto *:pointer-events-auto *:row-start-1 *:w-(--fd-sidebar-width) --fd-ai-chat-col --fd-ai-chat-col_300ms_ease-in-out --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-col_150ms --fd-sidebar-width --fd-toc-col --fd-toc-popover-height --fd-toc-width -me-1.5 -ms-1.5 -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-col:max(var(--fd-toc-width),var(--fd-ai-chat-col))] [--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] [transition:--fd-sidebar-col_150ms,--fd-ai-chat-col_300ms_ease-in-out] aiChat aiChatOpen aria-valuemax aria-valuemin aria-valuenow article auto-cols-auto auto-rows-auto available backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-s-2.5 before:inset-y-1 before:w-px bg-fd-background/80 border-b-2 border-e border-fd-primary breadcrumb breadcrumbEnabled circleProps circumference clerk click collapseTrigger containerProps createLinkItemRenderer data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-s-2.5 data-[active=true]:before:inset-y-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-[collapsed=false]:hidden data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-full data-header-body data-header-tabs data-hovered data-layout-content data-layout-main data-sidebar-collapsed data-sidebar-placeholder data-toc-popover data-toc-popover-content data-toc-popover-trigger data-transparent defaultSlots delaySetOpen duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList freezeUntil fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-toc-popover-height) h-10 h-14 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-2))] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-3))] has-data-[active=true]:text-fd-primary has-data-[collapsed=true]:md:flex hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none hoverDelay iconLinks including information inset-e-0 inset-y-2 isLayoutTabActive isNavTransparent isSelected isTop items-end justify-end justify-self-end layout-level layout:[--fd-header-height:--spacing(14)] lg:hidden lg:layout:[--fd-header-height:--spacing(24)] linkItems max max-h-[50vh] max-lg:flex max-lg:hidden max-md:flex max-md:hidden max-w-[240px] max-w-[380px] max-w-sm max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] maxTouchPoints mb-1.5 mb-3 mb-8 mb-auto md:gap-2 md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mt-px mx-0.5 navEnabled navMode navTransparentMode navbar nd-notebook-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside ontouchstart overflow-x-clip pageCol pagination pb-1.5 pe-4 pointer-events-none popover progress progressbar provided ps-2.5 pt-0.5 pt-12 pt-2 px-6 py-6 radius resolvedTabs restSvgProps rotate-180 rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate showItem showLayoutTabs sidebarCollapsible sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover takes text-[1.75em] text-end text-fd-foreground timeoutRef timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-(--fd-docs-row-3) transition-[opacity,translate,color] transition-[opacity,translate] transition-[opacity,visibility] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typedTabs typography under unlisted updated useBaseSlots useDocsPage useFooterItems useIsScrollTop useNotebookLayout w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:[--fd-ai-chat-col:var(--fd-ai-chat-width)] xl:border-s xl:h-[calc(var(--fd-docs-height)-var(--fd-docs-row-3))] xl:hidden xl:layout:[--fd-toc-width:268px] xl:max-w-full xl:pt-14 xl:px-8 xl:sticky xl:top-(--fd-docs-row-3) z-10 z-20");
|
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 algoliaClient align align-text-bottom alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allowedMode allows alphabet always an anchor and animate-pulse animation another application/json areaRef aria-activedescendant aria-autocomplete aria-controls aria-describedby aria-expanded aria-label aria-live aria-selected as aside ask assume assumes async at auto await backdrop-blur-lg backdrop-blur-xs background background-position backgroundColor backgroundImage backgroundSize backward banner basePath baseProps baseSlots baseUrl based became behaviour belongs 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 cn code col-span-full collapsed collapsible collection color colors column com combobox compact compat compatible component components composedRef computed config const container containerRef containing content contents context controlled/uncontrolled copy core counterSet createContext createMarkdownRenderer createRelativeLink css ctx current currentColor custom customize cva cx cy d dangerouslySetInnerHTML dark dark:bg-(--shiki-dark-bg) dashed data data-[active=true]:text-fd-primary data-[motion=from-end]:animate-fd-enterFromRight data-[motion=from-start]:animate-fd-enterFromLeft data-[motion=to-end]:animate-fd-exitToRight data-[motion=to-start]:animate-fd-exitToLeft data-[state=active]:border-fd-primary data-[state=active]:text-fd-primary data-[state=closed]:animate-fd-accordion-up data-[state=closed]:animate-fd-collapsible-up data-[state=closed]:animate-fd-dialog-out data-[state=closed]:animate-fd-fade-out data-[state=closed]:animate-fd-nav-menu-out data-[state=closed]:animate-fd-popover-out data-[state=hidden]:animate-fd-fade-out data-[state=inactive]:hidden data-[state=open]:animate-fd-accordion-down data-[state=open]:animate-fd-collapsible-down data-[state=open]:animate-fd-dialog-in data-[state=open]:animate-fd-fade-in data-[state=open]:animate-fd-nav-menu-in data-[state=open]:animate-fd-popover-in data-[state=open]:bg-fd-accent data-[state=open]:bg-fd-accent/50 data-[state=open]:text-fd-accent-foreground data-accordion-value data-active data-card data-checked data-checked:text-fd-accent-foreground data-collapsed data-empty data-icon data-line-numbers data-line-numbers-start data-search data-search-full data-state data-theme-toggle date debounced declare default defaultColor defaultFormatter defaultIndex defaultItems defaultLanguage defaultMdxComponents defaultOpen defaultOpenLevel defaultShikiFactory defaultTransform defaultUrl defaultValue defineI18nUI defined delay delayMs depends deprecated depth description detect dialog dir disabled disabled:bg-fd-secondary disabled:opacity-50 disabled:pointer-events-none disabled:text-fd-secondary-foreground display displayName displayed distance div divide-fd-border divide-x divide-y 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 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 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 oxlint-disable-next-line p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl pageUrlProp panel panels parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 per performing persist persistent 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/exhaustive-deps react-hooks/rules-of-hooks react-medium-image-zoom read reader ref referenced region registering rehype-raw rehypeCustomElements rehypePlugins rehypeRaw rel relative remarkRehypeOptions remove render renderHighlights renderMarkdown repo repository required resize 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 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 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-all transition-colors transition-opacity transition-transform translationKeys translations translations/keys.json transparent tree trigger true truncate try type typeof types unchanged undefined underline underlying understand unified unist-util-visit unknown unnecessarily update updateAnchor updates upperX url urls us usage use useCopyButton useDocsSearch useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange usePathname useProps useRef useRouter useSearchContext useSidebar useState useSyncExternalStore useTOCItems useTabsGroups useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visible visit vite void w w-(--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 *: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");
|
|
@@ -30,11 +30,17 @@ export interface SidebarProviderProps {
|
|
|
30
30
|
* Prefetch links, default behaviour depends on your React.js framework.
|
|
31
31
|
*/
|
|
32
32
|
prefetch?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Support collapsing the sidebar on desktop mode
|
|
35
|
+
*
|
|
36
|
+
* @defaultValue true
|
|
37
|
+
*/
|
|
38
|
+
collapsible?: boolean;
|
|
33
39
|
children?: ReactNode;
|
|
34
40
|
}
|
|
35
41
|
type Mode = 'drawer' | 'full';
|
|
36
42
|
declare const SidebarContext: import("react").Context<SidebarContext | null>;
|
|
37
|
-
export declare function SidebarProvider({ defaultOpenLevel, prefetch, children }: SidebarProviderProps): import("react").JSX.Element;
|
|
43
|
+
export declare function SidebarProvider({ defaultOpenLevel, prefetch, collapsible, children }: SidebarProviderProps): import("react").JSX.Element;
|
|
38
44
|
export declare function useSidebar(): SidebarContext;
|
|
39
45
|
export declare function useFolder(): {
|
|
40
46
|
open: boolean;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { cn } from "../../utils/cn.js";
|
|
4
4
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../ui/collapsible.js";
|
|
5
|
+
import { useHotKey } from "../../utils/hotkey.js";
|
|
5
6
|
import Link from "fumadocs-core/link";
|
|
6
7
|
import { usePathname } from "fumadocs-core/framework";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -36,7 +37,7 @@ var base_exports = /* @__PURE__ */ __exportAll({
|
|
|
36
37
|
});
|
|
37
38
|
const SidebarContext = createContext(null);
|
|
38
39
|
const FolderContext = createContext(null);
|
|
39
|
-
function SidebarProvider({ defaultOpenLevel = 0, prefetch, children }) {
|
|
40
|
+
function SidebarProvider({ defaultOpenLevel = 0, prefetch, collapsible = true, children }) {
|
|
40
41
|
const closeOnRedirect = useRef(true);
|
|
41
42
|
const [open, setOpen] = useState(false);
|
|
42
43
|
const [collapsed, setCollapsed] = useState(false);
|
|
@@ -46,6 +47,14 @@ function SidebarProvider({ defaultOpenLevel = 0, prefetch, children }) {
|
|
|
46
47
|
if (closeOnRedirect.current) setOpen(false);
|
|
47
48
|
closeOnRedirect.current = true;
|
|
48
49
|
});
|
|
50
|
+
useHotKey((e) => {
|
|
51
|
+
if (!(e.metaKey || e.ctrlKey) || e.shiftKey || e.altKey || e.key !== "b") return;
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
setCollapsed((prev) => !prev);
|
|
54
|
+
}, {
|
|
55
|
+
enabled: collapsible && mode === "full",
|
|
56
|
+
ignoreTyping: true
|
|
57
|
+
});
|
|
49
58
|
return /* @__PURE__ */ jsx(SidebarContext, {
|
|
50
59
|
value: useMemo(() => ({
|
|
51
60
|
open,
|
package/dist/components/tabs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { Tabs as Tabs$1, TabsContent as TabsContent$1, TabsList as TabsList$1, TabsTrigger as TabsTrigger$1 } from "./ui/tabs.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { createContext, useContext, useEffect, useId, useMemo
|
|
5
|
+
import { createContext, useContext, useEffect, useId, useMemo } from "react";
|
|
6
6
|
//#region src/components/tabs.tsx
|
|
7
7
|
const TabsContext = createContext(null);
|
|
8
8
|
function useTabContext() {
|
|
@@ -23,16 +23,11 @@ function TabsTrigger(props) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function Tabs({ ref, className, items, label, defaultIndex = 0, defaultValue = items ? escapeValue(items[defaultIndex]) : void 0, ...props }) {
|
|
26
|
-
const [value, setValue] = useState(defaultValue);
|
|
27
26
|
const collection = useMemo(() => [], []);
|
|
28
27
|
return /* @__PURE__ */ jsxs(Tabs$1, {
|
|
29
28
|
ref,
|
|
30
29
|
className: cn("flex flex-col overflow-hidden rounded-xl border bg-fd-secondary my-4", className),
|
|
31
|
-
|
|
32
|
-
onValueChange: (v) => {
|
|
33
|
-
if (items && !items.some((item) => escapeValue(item) === v)) return;
|
|
34
|
-
setValue(v);
|
|
35
|
-
},
|
|
30
|
+
defaultValue,
|
|
36
31
|
...props,
|
|
37
32
|
children: [items && /* @__PURE__ */ jsxs(TabsList, { children: [label && /* @__PURE__ */ jsx("span", {
|
|
38
33
|
className: "text-sm font-medium my-auto me-auto",
|
|
@@ -18,7 +18,7 @@ export interface TabsProps extends ComponentProps<typeof Primitive.Tabs> {
|
|
|
18
18
|
updateAnchor?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare const TabsList: import("react").ForwardRefExoticComponent<Primitive.TabsListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export declare
|
|
21
|
+
export declare function TabsTrigger({ value, ref, ...props }: ComponentProps<typeof Primitive.TabsTrigger>): import("react").JSX.Element;
|
|
22
22
|
export declare function Tabs({ ref, groupId, persist, updateAnchor, defaultValue, value: _value, onValueChange: _onValueChange, ...props }: TabsProps): import("react").JSX.Element;
|
|
23
23
|
export declare function TabsContent({ value, ref, ...props }: ComponentProps<typeof Primitive.TabsContent>): import("react").JSX.Element;
|
|
24
24
|
//#endregion
|
|
@@ -12,46 +12,60 @@ function useTabContext() {
|
|
|
12
12
|
return ctx;
|
|
13
13
|
}
|
|
14
14
|
const TabsList = Primitive.TabsList;
|
|
15
|
-
|
|
15
|
+
function TabsTrigger({ value, ref, ...props }) {
|
|
16
|
+
const { triggers } = useTabContext();
|
|
17
|
+
return /* @__PURE__ */ jsx(Primitive.TabsTrigger, {
|
|
18
|
+
ref: mergeRefs(ref, (element) => {
|
|
19
|
+
if (element) triggers.add(value);
|
|
20
|
+
else triggers.delete(value);
|
|
21
|
+
}),
|
|
22
|
+
value,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
16
26
|
function Tabs({ ref, groupId, persist = false, updateAnchor = false, defaultValue, value: _value, onValueChange: _onValueChange, ...props }) {
|
|
17
27
|
const tabsRef = useRef(null);
|
|
18
28
|
const valueToIdMap = useMemo(() => /* @__PURE__ */ new Map(), []);
|
|
19
29
|
const panels = useMemo(() => /* @__PURE__ */ new Map(), []);
|
|
20
|
-
const
|
|
30
|
+
const triggers = useMemo(() => /* @__PURE__ */ new Set(), []);
|
|
31
|
+
const [value, setValue] = _value === void 0 ? useState(defaultValue) : [_value, (v) => _onValueChange?.(v)];
|
|
32
|
+
const onChange = useEffectEvent((v) => {
|
|
33
|
+
if (triggers.has(v)) setValue(v);
|
|
34
|
+
});
|
|
35
|
+
const openFromHash = useEffectEvent(() => {
|
|
36
|
+
const hash = window.location.hash.slice(1);
|
|
37
|
+
if (!hash) return;
|
|
38
|
+
for (const [value, id] of valueToIdMap.entries()) if (id === hash) {
|
|
39
|
+
setValue(value);
|
|
40
|
+
tabsRef.current?.scrollIntoView();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const target = document.getElementById(hash);
|
|
44
|
+
if (!target) return;
|
|
45
|
+
for (const [value, panel] of panels.entries()) {
|
|
46
|
+
if (!panel.contains(target)) continue;
|
|
47
|
+
setValue(value);
|
|
48
|
+
requestAnimationFrame(() => target.scrollIntoView());
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
21
52
|
useLayoutEffect(() => {
|
|
22
53
|
if (!groupId) return;
|
|
23
54
|
let previous = sessionStorage.getItem(groupId);
|
|
24
55
|
if (persist) previous ??= localStorage.getItem(groupId);
|
|
25
|
-
if (previous)
|
|
56
|
+
if (previous) onChange(previous);
|
|
26
57
|
const groupListeners = listeners.get(groupId) ?? /* @__PURE__ */ new Set();
|
|
27
|
-
groupListeners.add(
|
|
58
|
+
groupListeners.add(onChange);
|
|
28
59
|
listeners.set(groupId, groupListeners);
|
|
29
60
|
return () => {
|
|
30
|
-
groupListeners.delete(
|
|
61
|
+
groupListeners.delete(onChange);
|
|
31
62
|
};
|
|
32
63
|
}, [groupId, persist]);
|
|
33
64
|
useLayoutEffect(() => {
|
|
34
|
-
const openFromHash = () => {
|
|
35
|
-
const hash = window.location.hash.slice(1);
|
|
36
|
-
if (!hash) return;
|
|
37
|
-
for (const [value, id] of valueToIdMap.entries()) if (id === hash) {
|
|
38
|
-
setValue(value);
|
|
39
|
-
tabsRef.current?.scrollIntoView();
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const target = document.getElementById(hash);
|
|
43
|
-
if (!target) return;
|
|
44
|
-
for (const [value, panel] of panels.entries()) {
|
|
45
|
-
if (!panel.contains(target)) continue;
|
|
46
|
-
setValue(value);
|
|
47
|
-
requestAnimationFrame(() => target.scrollIntoView());
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
65
|
openFromHash();
|
|
52
66
|
window.addEventListener("hashchange", openFromHash);
|
|
53
67
|
return () => window.removeEventListener("hashchange", openFromHash);
|
|
54
|
-
}, [
|
|
68
|
+
}, []);
|
|
55
69
|
return /* @__PURE__ */ jsx(Primitive.Tabs, {
|
|
56
70
|
ref: mergeRefs(ref, tabsRef),
|
|
57
71
|
value,
|
|
@@ -71,8 +85,13 @@ function Tabs({ ref, groupId, persist = false, updateAnchor = false, defaultValu
|
|
|
71
85
|
children: /* @__PURE__ */ jsx(TabsContext, {
|
|
72
86
|
value: useMemo(() => ({
|
|
73
87
|
valueToIdMap,
|
|
74
|
-
panels
|
|
75
|
-
|
|
88
|
+
panels,
|
|
89
|
+
triggers
|
|
90
|
+
}), [
|
|
91
|
+
valueToIdMap,
|
|
92
|
+
panels,
|
|
93
|
+
triggers
|
|
94
|
+
]),
|
|
76
95
|
children: props.children
|
|
77
96
|
})
|
|
78
97
|
});
|
package/dist/contexts/search.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useHotKey } from "../utils/hotkey.js";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Suspense, createContext, lazy, use,
|
|
4
|
+
import { Suspense, createContext, lazy, use, useMemo, useState, useSyncExternalStore } from "react";
|
|
4
5
|
//#region src/contexts/search.tsx
|
|
5
6
|
const SearchContext = createContext({
|
|
6
7
|
enabled: false,
|
|
@@ -25,18 +26,12 @@ const DEFAULT_HOT_KEYS = [{
|
|
|
25
26
|
const DefaultSearchDialog = lazy(() => import("../components/dialog/search-default.js"));
|
|
26
27
|
function SearchProvider({ SearchDialog = DefaultSearchDialog, children, preload = true, options, hotKey = DEFAULT_HOT_KEYS, links }) {
|
|
27
28
|
const [isOpen, setIsOpen] = useState(preload ? false : void 0);
|
|
28
|
-
|
|
29
|
+
useHotKey((e) => {
|
|
29
30
|
if (hotKey.every((v) => typeof v.key === "string" ? e.key === v.key : v.key(e))) {
|
|
30
31
|
setIsOpen((open) => !open);
|
|
31
32
|
e.preventDefault();
|
|
32
33
|
}
|
|
33
34
|
});
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
window.addEventListener("keydown", onKeyDown);
|
|
36
|
-
return () => {
|
|
37
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
38
|
-
};
|
|
39
|
-
}, []);
|
|
40
35
|
return /* @__PURE__ */ jsxs(SearchContext, {
|
|
41
36
|
value: useMemo(() => ({
|
|
42
37
|
enabled: true,
|
|
@@ -58,6 +58,7 @@ function LayoutBody(props) {
|
|
|
58
58
|
children: /* @__PURE__ */ jsx(slots.sidebar.provider, {
|
|
59
59
|
defaultOpenLevel,
|
|
60
60
|
prefetch,
|
|
61
|
+
collapsible: sidebarEnabled && sidebarProps.collapsible,
|
|
61
62
|
children: /* @__PURE__ */ jsxs(slots.container, {
|
|
62
63
|
...containerProps,
|
|
63
64
|
children: [
|
|
@@ -7,7 +7,7 @@ export interface SidebarProps extends ComponentProps<'aside'> {
|
|
|
7
7
|
banner?: ReactNode;
|
|
8
8
|
footer?: ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export type SidebarProviderProps = SidebarProviderProps$1
|
|
10
|
+
export type SidebarProviderProps = Omit<SidebarProviderProps$1, 'collapsible'>;
|
|
11
11
|
export declare const useSidebar: typeof useSidebar$1;
|
|
12
12
|
export declare function SidebarProvider(props: SidebarProviderProps): import("react").JSX.Element;
|
|
13
13
|
export declare function Sidebar({ footer, banner, components, ...rest }: SidebarProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { mergeRefs } from "../../../utils/merge-refs.js";
|
|
4
|
+
import { useHotKey } from "../../../utils/hotkey.js";
|
|
4
5
|
import { SidebarFolder as SidebarFolder$1, SidebarFolderContent as SidebarFolderContent$1, SidebarFolderLink as SidebarFolderLink$1, SidebarFolderTrigger as SidebarFolderTrigger$1, SidebarItem as SidebarItem$1, SidebarProvider as SidebarProvider$1, SidebarSeparator as SidebarSeparator$1, SidebarViewport, base_exports, useFolder, useFolderDepth } from "../../../components/sidebar/base.js";
|
|
5
6
|
import { createPageTreeRenderer } from "../../../components/sidebar/page-tree.js";
|
|
6
7
|
import { createLinkItemRenderer } from "../../../components/sidebar/link-item.js";
|
|
@@ -8,7 +9,7 @@ import { useFluxLayout } from "../index.js";
|
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { SidebarIcon, XIcon } from "lucide-react";
|
|
10
11
|
import { cva } from "class-variance-authority";
|
|
11
|
-
import {
|
|
12
|
+
import { useRef, useState } from "react";
|
|
12
13
|
import { useTranslations } from "@fuma-translate/react";
|
|
13
14
|
import { AnimatePresence, motion } from "motion/react";
|
|
14
15
|
import { RemoveScroll } from "react-remove-scroll";
|
|
@@ -29,7 +30,10 @@ function getItemOffset(depth) {
|
|
|
29
30
|
}
|
|
30
31
|
const { useSidebar } = base_exports;
|
|
31
32
|
function SidebarProvider(props) {
|
|
32
|
-
return /* @__PURE__ */ jsx(SidebarProvider$1, {
|
|
33
|
+
return /* @__PURE__ */ jsx(SidebarProvider$1, {
|
|
34
|
+
...props,
|
|
35
|
+
collapsible: false
|
|
36
|
+
});
|
|
33
37
|
}
|
|
34
38
|
function Sidebar({ footer, banner, components, ...rest }) {
|
|
35
39
|
const { menuItems } = useFluxLayout();
|
|
@@ -86,18 +90,12 @@ function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
|
86
90
|
const ref = useRef(null);
|
|
87
91
|
const [blockScroll, setBlockScroll] = useState(false);
|
|
88
92
|
const { open, setOpen } = useSidebar();
|
|
89
|
-
|
|
90
|
-
if (
|
|
93
|
+
useHotKey((e) => {
|
|
94
|
+
if (e.key === "Escape") {
|
|
91
95
|
setOpen(false);
|
|
92
96
|
e.preventDefault();
|
|
93
97
|
}
|
|
94
|
-
});
|
|
95
|
-
useEffect(() => {
|
|
96
|
-
window.addEventListener("keydown", listener);
|
|
97
|
-
return () => {
|
|
98
|
-
window.removeEventListener("keydown", listener);
|
|
99
|
-
};
|
|
100
|
-
}, []);
|
|
98
|
+
}, { enabled: open });
|
|
101
99
|
if (open && !blockScroll) setBlockScroll(true);
|
|
102
100
|
return /* @__PURE__ */ jsx(RemoveScroll, {
|
|
103
101
|
enabled: blockScroll,
|
|
@@ -23,10 +23,13 @@ const itemTriggerVariants = cva("inline-flex text-sm items-center gap-2 rounded-
|
|
|
23
23
|
} } });
|
|
24
24
|
const CollapsibleContext = createContext(true);
|
|
25
25
|
function SidebarProvider({ children, collapsible = true }) {
|
|
26
|
-
return /* @__PURE__ */ jsx(SidebarProvider$1, {
|
|
27
|
-
|
|
28
|
-
children
|
|
29
|
-
|
|
26
|
+
return /* @__PURE__ */ jsx(SidebarProvider$1, {
|
|
27
|
+
collapsible,
|
|
28
|
+
children: /* @__PURE__ */ jsx(CollapsibleContext, {
|
|
29
|
+
value: collapsible,
|
|
30
|
+
children
|
|
31
|
+
})
|
|
32
|
+
});
|
|
30
33
|
}
|
|
31
34
|
function useSidebar() {
|
|
32
35
|
const collapsible = use(CollapsibleContext);
|
|
@@ -29,7 +29,7 @@ function AIChatPanel({ open, className, children }) {
|
|
|
29
29
|
const [mounted, setMounted] = useState(open);
|
|
30
30
|
if (open && !mounted) setMounted(true);
|
|
31
31
|
return /* @__PURE__ */ jsx("aside", {
|
|
32
|
-
className: cn("z-40 overflow-clip bg-fd-card text-fd-card-foreground layout:[--fd-ai-chat-width:min(--spacing(100),100vw---spacing(4))] transition-[width,margin,translate
|
|
32
|
+
className: cn("z-40 overflow-clip bg-fd-card text-fd-card-foreground layout:[--fd-ai-chat-width:min(--spacing(100),100vw---spacing(4))] transition-[width,margin,translate] duration-300 ease-in-out motion-reduce:transition-none max-xl:fixed max-xl:inset-y-2 max-xl:end-2 max-xl:w-(--fd-ai-chat-width) max-xl:rounded-2xl max-xl:border max-xl:shadow-xl", open ? "w-(--fd-ai-chat-width)" : "invisible w-0 transition-[width,margin,translate,visibility] max-xl:translate-x-[calc(100%+--spacing(2))] rtl:max-xl:-translate-x-[calc(100%+--spacing(2))]", className),
|
|
33
33
|
children: /* @__PURE__ */ jsx("div", {
|
|
34
34
|
className: "flex flex-col size-full xl:w-(--fd-ai-chat-width)",
|
|
35
35
|
children: mounted && children
|
package/dist/provider/base.js
CHANGED
|
@@ -1,46 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { I18nProvider } from "../contexts/i18n.js";
|
|
3
|
+
import { useHotKey } from "../utils/hotkey.js";
|
|
3
4
|
import { SearchProvider } from "../contexts/search.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { useEffect, useEffectEvent } from "react";
|
|
6
6
|
import { ThemeProvider, useTheme, useTheme as useTheme$1 } from "next-themes";
|
|
7
7
|
import { flushSync } from "react-dom";
|
|
8
8
|
import { DirectionProvider } from "@radix-ui/react-direction";
|
|
9
9
|
//#region src/provider/base.tsx
|
|
10
10
|
/**
|
|
11
|
-
* Whether the event should be ignored because the user is interacting with an editable element,
|
|
12
|
-
* or an opened dialog (e.g. the search dialog).
|
|
13
|
-
*/
|
|
14
|
-
function isTypingTarget(target) {
|
|
15
|
-
if (!(target instanceof HTMLElement)) return false;
|
|
16
|
-
if (target.isContentEditable) return true;
|
|
17
|
-
if ([
|
|
18
|
-
"INPUT",
|
|
19
|
-
"TEXTAREA",
|
|
20
|
-
"SELECT"
|
|
21
|
-
].includes(target.tagName)) return true;
|
|
22
|
-
return target.closest("[role=\"dialog\"]") !== null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
11
|
* Toggle between light/dark mode with a hotkey, must be placed under `next-themes` provider.
|
|
26
12
|
*/
|
|
27
13
|
function ThemeHotKey({ hotKey }) {
|
|
28
14
|
const { setTheme, resolvedTheme } = useTheme$1();
|
|
29
|
-
|
|
30
|
-
if (e.defaultPrevented || e.isComposing || e.keyCode === 229) return;
|
|
31
|
-
if (isTypingTarget(e.target)) return;
|
|
15
|
+
useHotKey((e) => {
|
|
32
16
|
if (!(typeof hotKey === "string" ? !e.metaKey && !e.ctrlKey && !e.altKey && e.key.toLowerCase() === hotKey.toLowerCase() : hotKey(e))) return;
|
|
33
17
|
e.preventDefault();
|
|
34
18
|
const next = resolvedTheme === "dark" ? "light" : "dark";
|
|
35
19
|
if (document?.startViewTransition) document.startViewTransition(() => flushSync(() => setTheme(next)));
|
|
36
20
|
else setTheme(next);
|
|
37
|
-
});
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
window.addEventListener("keydown", onKeyDown);
|
|
40
|
-
return () => {
|
|
41
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
21
|
+
}, { ignoreTyping: true });
|
|
44
22
|
return null;
|
|
45
23
|
}
|
|
46
24
|
function RootProvider({ children, dir = "ltr", theme = {}, search, i18n }) {
|
package/dist/style.css
CHANGED
|
@@ -2088,6 +2088,11 @@
|
|
|
2088
2088
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2089
2089
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2090
2090
|
}
|
|
2091
|
+
.transition-\[width\,margin\,translate\] {
|
|
2092
|
+
transition-property: width,margin,translate;
|
|
2093
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2094
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2095
|
+
}
|
|
2091
2096
|
.transition-\[width\,padding\] {
|
|
2092
2097
|
transition-property: width,padding;
|
|
2093
2098
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useEffect, useEffectEvent } from "react";
|
|
2
|
+
//#region src/utils/hotkey.ts
|
|
3
|
+
/**
|
|
4
|
+
* Listen to `keydown` on window, skipping keys that are already handled or composing text.
|
|
5
|
+
*/
|
|
6
|
+
function useHotKey(onKeyDown, { enabled = true, ignoreTyping = false } = {}) {
|
|
7
|
+
const listener = useEffectEvent((e) => {
|
|
8
|
+
if (e.defaultPrevented || e.isComposing || e.keyCode === 229) return;
|
|
9
|
+
if (ignoreTyping && isTypingTarget(e.target)) return;
|
|
10
|
+
onKeyDown(e);
|
|
11
|
+
});
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!enabled) return;
|
|
14
|
+
window.addEventListener("keydown", listener);
|
|
15
|
+
return () => window.removeEventListener("keydown", listener);
|
|
16
|
+
}, [enabled]);
|
|
17
|
+
}
|
|
18
|
+
function isTypingTarget(target) {
|
|
19
|
+
if (!(target instanceof HTMLElement)) return false;
|
|
20
|
+
if (target.isContentEditable) return true;
|
|
21
|
+
if ([
|
|
22
|
+
"INPUT",
|
|
23
|
+
"TEXTAREA",
|
|
24
|
+
"SELECT"
|
|
25
|
+
].includes(target.tagName)) return true;
|
|
26
|
+
return target.closest("[role=\"dialog\"]") !== null;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { useHotKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "16.16.
|
|
3
|
+
"version": "16.16.2",
|
|
4
4
|
"description": "The Radix UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -162,8 +162,8 @@
|
|
|
162
162
|
"unist-util-visit": "^5.1.0"
|
|
163
163
|
},
|
|
164
164
|
"devDependencies": {
|
|
165
|
-
"@fumadocs/base-ui": "16.16.
|
|
166
|
-
"@fumadocs/cli": "1.7.
|
|
165
|
+
"@fumadocs/base-ui": "16.16.2",
|
|
166
|
+
"@fumadocs/cli": "1.7.3",
|
|
167
167
|
"@tailwindcss/cli": "^4.3.3",
|
|
168
168
|
"@tailwindcss/oxide": "^4.3.3",
|
|
169
169
|
"@tsdown/css": "^0.23.0",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"@types/react": "^19.3.0",
|
|
174
174
|
"@types/react-dom": "^19.3.0",
|
|
175
175
|
"fuma-cli": "^0.3.1",
|
|
176
|
-
"fumadocs-core": "16.16.
|
|
176
|
+
"fumadocs-core": "16.16.2",
|
|
177
177
|
"react-medium-image-zoom": "^5.4.9",
|
|
178
178
|
"tailwindcss": "^4.3.3",
|
|
179
179
|
"tsconfig": "0.0.0",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"peerDependencies": {
|
|
184
184
|
"@types/mdx": "*",
|
|
185
185
|
"@types/react": "*",
|
|
186
|
-
"fumadocs-core": "16.16.
|
|
186
|
+
"fumadocs-core": "16.16.2",
|
|
187
187
|
"next": "16.x.x",
|
|
188
188
|
"react": "^19.2.0",
|
|
189
189
|
"react-dom": "^19.2.0",
|