fumadocs-ui 16.15.12 → 16.15.13
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/shared.css +1 -1
- package/dist/contexts/search.js +3 -6
- package/dist/layouts/docs/page/slots/container.js +1 -1
- package/dist/layouts/shared/page-actions.d.ts +10 -2
- package/dist/layouts/shared/page-actions.js +9 -7
- package/dist/layouts/shared/slots/theme-switch.js +3 -5
- package/dist/legacy/layout.js +4 -13
- package/dist/style.css +6 -0
- package/dist/utils/use-is-scroll-top.d.ts +3 -0
- package/dist/utils/use-is-scroll-top.js +11 -14
- package/package.json +6 -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] after aria-valuemax aria-valuemin aria-valuenow article attribute available backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-s-2.5 before:inset-y-1 before:w-px bg-fd-background/80 border-b-2 border-e border-e-0 border-fd-primary border-y-0 breadcrumb breadcrumbEnabled circleProps circumference clerk click collapsing containerProps createLinkItemRenderer data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-s-2.5 data-[active=true]:before:inset-y-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-[column-changed=true]:transition-[grid-template-columns] data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-column-changed data-full data-hovered data-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 desktop duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including information inset-e-0 inset-s-4 inset-y-2 instant isCollapseChanged isNavTransparent isTop items-end justify-items-center justify-start layout-level layoutTabs linkItems max max-h-[50vh] max-md:hidden max-md:layout:[--fd-header-height:--spacing(14)] max-w-[1168px] max-w-[380px] max-w-[900px] max-xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)] mb-4 mb-8 mb-auto md:layout:[--fd-sidebar-width:268px] md:pt-8 md:px-6 min min-h-(--fd-docs-height) mt-6 mx-0.5 navEnabled navTransparentMode nd-docs-layout nd-page nd-subnav nd-toc nd-toc-placeholder no normalizedValue onClickItem onClickOutside overflow-x-clip p-0 pagination pb-1.5 pe-0 pe-2.5 pe-4 pointer-events-none popover previousCollapsed progress progressbar provided pt-0.5 pt-12 pt-2 pt-3 px-6 py-0 py-6 radius restSvgProps rotate-180 rounded-none rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate setPreviousCollapsed showItem sidebarEnabled sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover text-[1.75em] text-end text-fd-foreground timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-[calc(--spacing(4)+var(--fd-docs-row-3))] transition-[opacity,translate,color] transition-[opacity,translate] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typography under unlisted updated useBaseSlots useDocsLayout useDocsPage useFooterItems useIsScrollTop useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:hidden xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 z-10 z-20 z-30");
|
|
1
|
+
@source inline("!header !showItem *:col-start-1 *:my-auto *:pointer-events-auto *:rounded-md *:row-start-1 *:w-(--fd-sidebar-width) --fd-docs-height --fd-docs-row-1 --fd-docs-row-2 --fd-docs-row-3 --fd-header-height --fd-layout-width --fd-sidebar-col --fd-sidebar-width --fd-toc-popover-height --fd-toc-width -mx-1 -translate-x-(--fd-sidebar-width) -translate-y-full [&_svg]:shrink-0 [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-sidebar-width:0px] [--fd-toc-popover-height:0px] [--fd-toc-width:0px] [grid-area:header] [grid-area:main] [grid-area:sidebar] [grid-area:toc-popover] [grid-area:toc] after aria-valuemax aria-valuemin aria-valuenow article attribute available backdrop-blur-sm before before:absolute before:bg-fd-border before:content-[''] before:inset-s-2.5 before:inset-y-1 before:w-px bg-fd-background/80 border-b-2 border-e border-e-0 border-fd-primary border-y-0 breadcrumb breadcrumbEnabled circleProps circumference clerk click collapsing containerProps createLinkItemRenderer data-[active=true]:before:absolute data-[active=true]:before:bg-fd-primary data-[active=true]:before:content-[''] data-[active=true]:before:inset-s-2.5 data-[active=true]:before:inset-y-2.5 data-[active=true]:before:w-px data-[active=true]:bg-fd-primary/10 data-[active=true]:hover:transition-colors data-[column-changed=true]:transition-[grid-template-columns] data-[state=closed]:animate-fd-sidebar-out data-[state=open]:animate-fd-sidebar-in data-[transparent=false]:bg-fd-background/80 data-column-changed data-full data-hovered data-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 desktop duration-250 edit empty:mb-0 first:mt-0 flex-row-reverse font-semibold footer footerEnabled footerList fumadocs-core/breadcrumb gap-2.5 gap-6 getBreadcrumbItemsFromPath grid-cols-1 gridTemplate h-(--fd-header-height) h-(--fd-toc-popover-height) h-10 h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] hideIfDisabled hover:bg-fd-accent/50 hover:opacity-80 hover:text-fd-accent-foreground/80 hover:transition-none iconLinks including information inset-e-0 inset-s-4 inset-y-2 instant isCollapseChanged isNavTransparent isTop items-end justify-items-center 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 previousCollapsed progress progressbar provided pt-0.5 pt-12 pt-2 pt-3 px-6 py-0 py-6 radius restSvgProps rotate-180 rounded-none rtl:-translate-x-2 rtl:translate-x-full selectedIdx setDate setPreviousCollapsed showItem sidebarEnabled sidebarProps size-4.5 stroke-current/25 strokeDasharray strokeDashoffset tabMode tableOfContent tableOfContentPopover text-[1.75em] text-end text-fd-foreground timezone toc-popover toc-title tocEnabled tocPopover tocPopoverEnabled tocPopoverProps tocProps top-(--fd-docs-row-1) top-(--fd-docs-row-2) top-[calc(--spacing(4)+var(--fd-docs-row-3))] transition-[opacity,translate,color] transition-[opacity,translate] transition-[width,inset-block,translate,background-color] translate-x-2 translate-y-full transparentMode typography under unlisted updated useBaseSlots useDocsLayout useDocsPage useFooterItems useIsScrollTop useTreeContext w-(--fd-sidebar-width) w-(--fd-toc-width) w-4 w-[85%] xl:hidden xl:in-data-[sidebar-collapsed=true]:pt-14 xl:layout:[--fd-toc-width:268px] xl:pt-14 xl:px-8 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 --callout-color --color-fd- --color-fd-muted --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --radix-navigation-menu-viewport-height --radix-popover-content-available-height --radix-popover-content-transform-origin --radix-popover-trigger-width --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top -mb-px -me-0.5 -me-2 -mx-px -rotate-90 -top-1.5 -translate-x-1/2 -translate-y-1/2 -z-1 @container @defaultValue @deprecated @fuma-translate/react @keyframes @max-lg:col-span-full @max-xl:hidden @param @radix-ui/react-accordion @radix-ui/react-collapsible @radix-ui/react-dialog @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-presence @radix-ui/react-scroll-area @radix-ui/react-tabs @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&_svg]:size-3.5 [&_svg]:size-4 [&_svg]:size-4.5 [&_svg]:size-5 [&_svg]:size-full [&_svg]:text-fd-muted-foreground [offset-distance:var(--offset-distance,0)] [scrollbar-width:none] a abcdefghijklmnopqrstuvwxyz234567 about absolute accordion action actions active add advanced algoliaClient align alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allowedMode allows alphabet always an anchor and animate-pulse animation another application/json areaRef aria-controls aria-describedby aria-expanded aria-label aria-selected as aside ask assume assumes async at auto await backdrop-blur-lg backdrop-blur-xs background background-position backgroundColor backgroundImage backgroundSize backward banner basePath baseProps baseSlots baseUrl based behaviour belongs 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 blocks boolean border border-b border-l border-none border-s border-t border-transparent borderBottom bottom bottom-0 bottom-1.5 boundary buffer bundle button buttonVariants by cache cached can case center central change changeLayout checked child children chooseLanguage class-variance-authority className clear client client-side clientHeight clientWidth clipPath clone close closeOnRedirect closed cn code col-span-full collapsed collapsible collection color colors column com compact compat compatible component components composedRef computed config const container containerRef 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 documented dominantBaseline don drawer dropdown duration-100 duration-200 duration-300 duration-400 each element else empty empty:hidden enabled encoded end-2 endIdx endpoint env environment equal error escape eslint-disable-next-line event export extends external extraProps false fd-moving-banner fd-scroll-container fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally fixed flex flex-1 flex-col flex-row flex-wrap flexDirection flushSync 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-[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 handle handleThemeChange has-focus-visible:bg-fd-accent hash hashchange hast have header headers heading height 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 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 js justify-between justify-center keepBackground key keyCode keydown keys l l0 l1 l2 label lang language languageSelect last:rounded-b-xl layer layout 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 listener listeners locale localeTranslations locales lower ltr lucide lucide-book lucide-book-icon lucide-react made main make mapped margin marginTop mark markdownUrl marked mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)] maskComposite maskImage max-h-(--radix-popover-content-available-height) max-h-20 max-h-[460px] max-h-[600px] max-h-[80svh] max-md:bg-fd-secondary max-md:border max-md:p-1.5 max-md:rounded-md max-w-[1400px] max-w-[98vw] max-w-full max-w-screen-sm max-width maximumFractionDigits mb-1 mb-2 md:hidden md:mb-auto md:size-5 md:top-[calc(50%-250px)] mdComponents mdRenderer mdx/types.js me-1 me-2 me-auto menu menuItems mergeRefs message middle min-h-0 min-w-0 min-w-[240px] min-w-fit min-w-full mode module mounted mouse ms-2 ms-auto ms-px mt-1 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name 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 noopener noreferrer normal normalize not not-last:mb-2 not-prose notation note now null number numbers object observer of offsetPath offsetTop on onChange onClick onCopy onKey onOpenChange onOpenChangeCallback onPointerEnter onPointerLeave onPointerMove onPrint onSearchChange onSearchChangeCallback onSelect onSelectCallback onTagChange onTagChangeCallback onValueChange once one only opacity-(--opacity,0) opacity-0 open openFromHash option optional options or oramaCloudClient order origin-(--radix-popover-content-transform-origin) origin-[top_center] origin-center original other out outline outline-none output overflow-auto overflow-hidden overflow-x-auto overflow-y-auto override overscroll-contain own owner oxlint-disable-next-line p p-0.5 p-1 p-1.5 p-2 p-3 p-4 padding paddingBottom paddingInlineStart page pageUrl panel panels parameters params parentId pass passed path pathname paths pb-0 pb-2 pe-2 per performing persist persistent placeholder placeholder:text-fd-muted-foreground please pointerType points populated positions possible powered pre pre-rendering predate prefetch present prev previous previousRef primary primaryColor primaryTextColor promise promises prompt prop props prose prose-no-margin provide provider ps-1 ps-2 ps-4 ps-8 pt-0 pure px px-0.5 px-1 px-1.5 px-2 px-2.5 px-3 px-4 px-px py-0.5 py-1 py-1.5 py-12 py-2 py-2.5 py-3 py-3.5 q query questions rainbow rainbowColors raw re-create react react-dom react-hooks/exhaustive-deps react-hooks/rules-of-hooks react-medium-image-zoom ref referenced region registering rehype-raw rehypeCustomElements rehypePlugins rehypeRaw rel relative remarkRehypeOptions remove render renderHighlights renderMarkdown repo repository required resolve resolved resolvedTheme response rest result results return revalidate right-2 role root rootRef round rounded-2xl rounded-[inherit] rounded-full rounded-lg rounded-md rounded-sm rounded-xl router row rtl:-scale-x-100 rtl:rotate-180 rtl:rotate-90 s 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 show showAlgolia showOrama shrink-0 side sideOffset sidebar signature simple since single site size size-1 size-3 size-3.5 size-4 size-5 size-6.5 size-9 size-full sizes slots sm solid some source space span specific src stars startIdx state static 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 system t tab tabIndex table tabs tabsRef tag tagName tags target text text-(--callout-color) text-[0.8125rem] text-[0.9375rem] text-center text-fd-accent-foreground text-fd-card text-fd-card-foreground text-fd-foreground/80 text-fd-muted-foreground text-fd-muted-foreground/50 text-fd-popover-foreground text-fd-popover-foreground/80 text-fd-primary text-fd-primary-foreground text-fd-primary/50 text-fd-secondary-foreground text-lg text-nowrap text-sm text-start text-xs text/plain textAnchor textContent 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-all transition-colors transition-opacity transition-transform translationKeys translations translations/keys.json transparent tree trigger true truncate try type typeof types unchanged undefined underline underlying understand unified unist-util-visit unknown unnecessarily updateAnchor updates upperX url urls us usage use useCopyButton useDocsSearch useI18n useId useIsDocsLayout useItems useMediaQuery useMemo useOnChange usePathname useProps useRef useRouter useSearchContext useSidebar useState useTOCItems useTabsGroups useTheme useTranslations useTreePath useful users using usually v v17 value valueToIdMap values variables variant variants vertical viewBox viewRef viewport viewportProps visit vite void w w-(--radix-popover-trigger-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces width will window with work wrap wrap-anywhere wrapElement wrapInSuspense wrapped x x1 x2 xmlns y y1 y2 you your z-2 z-40 z-50 zoom zoomImg zoomMargin");
|
|
1
|
+
@source inline("!collapsed !isActive !items !nested !open !title *:border-b *:data-[empty=true]:border-b-0 *:flex *:flex! *:flex-col *:flex-col! *:gap-0.5! *:has-[+:last-child[data-empty=true]]:border-b-0 *:last:border-b-0 *:rounded-full --callout-color --color-fd- --color-fd-muted --fd-animated-height --fd-banner-height --offset-distance --opacity --padding-right --radix-navigation-menu-viewport-height --radix-popover-content-available-height --radix-popover-content-transform-origin --radix-popover-trigger-width --shiki-dark-bg --shiki-light-bg --spacing --track-bottom --track-top -mb-px -me-0.5 -me-2 -mx-px -rotate-90 -top-1.5 -translate-x-1/2 -translate-y-1/2 -z-1 @container @defaultValue @deprecated @fuma-translate/react @keyframes @max-lg:col-span-full @max-xl:hidden @param @radix-ui/react-accordion @radix-ui/react-collapsible @radix-ui/react-dialog @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-presence @radix-ui/react-scroll-area @radix-ui/react-tabs @ts-expect-error @typescript-eslint/no-namespace [&>figure:only-child]:-m-4 [&>figure:only-child]:border-none [&_svg]:size-3.5 [&_svg]:size-4 [&_svg]:size-4.5 [&_svg]:size-5 [&_svg]:size-full [&_svg]:text-fd-muted-foreground [offset-distance:var(--offset-distance,0)] [scrollbar-width:none] a abcdefghijklmnopqrstuvwxyz234567 about absolute accordion action actions active add advanced algoliaClient align alignItems alignmentBaseline all allowClear allowCopy allowDangerousHtml allowedMode allows alphabet always an anchor and animate-pulse animation another application/json areaRef aria-controls aria-describedby aria-expanded aria-label aria-selected as aside ask assume assumes async at auto await backdrop-blur-lg backdrop-blur-xs background background-position backgroundColor backgroundImage backgroundSize backward banner basePath baseProps baseSlots baseUrl based behaviour belongs 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 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 checked child children chooseLanguage class-variance-authority className clear client client-side clientHeight clientWidth clipPath clone close closeOnRedirect closed cn code col-span-full collapsed collapsible collection color colors column com compact compat compatible component components composedRef computed config const container containerRef 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 documented dominantBaseline don drawer dropdown duration-100 duration-200 duration-300 duration-400 during each element else empty empty:hidden enabled encoded end-2 endIdx endpoint env environment equal error escape eslint-disable-next-line event export extends external extraProps false fd-moving-banner fd-scroll-container fd-step fd-steps fetch fetchClient fetchOptions field fieldVariants figure file fill fill-(--callout-color) fill-fd-muted fill-fd-muted-foreground fill-fd-primary fill-fd-primary-foreground filter filters finally fixed flex flex-1 flex-col flex-row flex-wrap flexDirection flushSync 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-[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 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 js justify-between justify-center keepBackground key keyCode keydown keys l l0 l1 l2 label lang language languageSelect last:rounded-b-xl layer layout 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 listener listeners locale localeTranslations locales lower ltr lucide lucide-book lucide-book-icon lucide-react made main make mapped margin marginTop mark markdownUrl marked mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] mask-[linear-gradient(to_bottom,white,white_30px,transparent_80px)] maskComposite maskImage max-h-(--radix-popover-content-available-height) max-h-20 max-h-[460px] max-h-[600px] max-h-[80svh] max-md:bg-fd-secondary max-md:border max-md:p-1.5 max-md:rounded-md max-w-[1400px] max-w-[98vw] max-w-full max-w-screen-sm max-width maximumFractionDigits mb-1 mb-2 md:hidden md:mb-auto md:size-5 md:top-[calc(50%-250px)] mdComponents mdRenderer mdx/types.js me-1 me-2 me-auto menu menuItems mergeRefs message middle min-h-0 min-w-0 min-w-[240px] min-w-fit min-w-full mode module mounted mouse ms-2 ms-auto ms-px mt-1 must mx-auto my-0 my-0! my-0.5 my-4 my-6 my-auto n name 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 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 option optional options or oramaCloudClient order origin-(--radix-popover-content-transform-origin) origin-[top_center] origin-center original other out outline outline-none output overflow-auto overflow-hidden overflow-x-auto overflow-y-auto override overscroll-contain own owner 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 placeholder placeholder:text-fd-muted-foreground please pointerType points populated positions possible powered pre pre-rendering predate prefetch present prev previous previousRef primary primaryColor primaryTextColor promise 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 questions rainbow rainbowColors raw re-create react react-dom react-hooks/exhaustive-deps react-hooks/rules-of-hooks react-medium-image-zoom reader ref referenced region registering rehype-raw rehypeCustomElements rehypePlugins rehypeRaw rel relative remarkRehypeOptions remove render renderHighlights renderMarkdown repo repository required resolve resolved resolvedTheme response rest result results return revalidate right-2 role root rootRef round rounded-2xl rounded-[inherit] rounded-full rounded-lg rounded-md rounded-sm rounded-xl router row rtl:-scale-x-100 rtl:rotate-180 rtl:rotate-90 s 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 solid some source space span specific src stars startIdx state static 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 system t tab tabIndex table tabs tabsRef tag tagName tags target text text-(--callout-color) text-[0.8125rem] text-[0.9375rem] text-center text-fd-accent-foreground text-fd-card text-fd-card-foreground text-fd-foreground/80 text-fd-muted-foreground text-fd-muted-foreground/50 text-fd-popover-foreground text-fd-popover-foreground/80 text-fd-primary text-fd-primary-foreground text-fd-primary/50 text-fd-secondary-foreground text-lg text-nowrap text-sm text-start text-xs text/plain textAnchor textContent 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-all transition-colors transition-opacity transition-transform translationKeys translations translations/keys.json transparent tree trigger true truncate try type typeof types unchanged undefined underline underlying understand unified unist-util-visit unknown unnecessarily updateAnchor updates upperX url urls 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 visit vite void w w-(--radix-popover-trigger-width) w-0 w-0.5 w-1.5 w-1/4 w-[calc(100%-1rem)] w-fit w-full w-max w-px want warn warning what when where which while white whitespace-nowrap whitespaces width will window with without work wrap wrap-anywhere wrapElement wrapInSuspense wrapped x x1 x2 xmlns y y1 y2 you your z-2 z-40 z-50 zoom zoomImg zoomMargin");
|
package/dist/contexts/search.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Suspense, createContext, lazy, use, useEffect, useEffectEvent, useMemo, useState } from "react";
|
|
3
|
+
import { Suspense, createContext, lazy, use, useEffect, useEffectEvent, useMemo, useState, useSyncExternalStore } from "react";
|
|
4
4
|
//#region src/contexts/search.tsx
|
|
5
5
|
const SearchContext = createContext({
|
|
6
6
|
enabled: false,
|
|
@@ -11,12 +11,9 @@ const SearchContext = createContext({
|
|
|
11
11
|
function useSearchContext() {
|
|
12
12
|
return use(SearchContext);
|
|
13
13
|
}
|
|
14
|
+
const noop = () => () => {};
|
|
14
15
|
function MetaOrControl() {
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
if (/Windows|Linux/i.test(window.navigator.userAgent)) setKey("Ctrl");
|
|
18
|
-
}, []);
|
|
19
|
-
return key;
|
|
16
|
+
return useSyncExternalStore(noop, () => true, () => false) && /Windows|Linux/i.test(navigator.userAgent) ? "Ctrl" : "⌘";
|
|
20
17
|
}
|
|
21
18
|
const DEFAULT_HOT_KEYS = [{
|
|
22
19
|
key: (e) => e.metaKey || e.ctrlKey,
|
|
@@ -13,7 +13,7 @@ function Container(props) {
|
|
|
13
13
|
"data-layout-content": "",
|
|
14
14
|
"data-full": full,
|
|
15
15
|
...props,
|
|
16
|
-
className: cn("flex flex-col min-w-0 w-full max-w-[900px] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14", full && "max-w-[1168px]", props.className),
|
|
16
|
+
className: cn("flex flex-col min-w-0 w-full max-w-[900px] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14", "md:in-data-[sidebar-collapsed=true]:pt-16 xl:in-data-[sidebar-collapsed=true]:pt-14", full && "max-w-[1168px]", props.className),
|
|
17
17
|
children: props.children
|
|
18
18
|
})
|
|
19
19
|
});
|
|
@@ -4,7 +4,7 @@ import { ComponentProps } from "react";
|
|
|
4
4
|
/**
|
|
5
5
|
* see https://fumadocs.dev/docs/integrations/llms#page-actions to customize.
|
|
6
6
|
*/
|
|
7
|
-
export declare function MarkdownCopyButton({ markdownUrl, ...props }: ComponentProps<'button'> & {
|
|
7
|
+
export declare function MarkdownCopyButton({ markdownUrl: _markdownUrl, ...props }: ComponentProps<'button'> & {
|
|
8
8
|
/**
|
|
9
9
|
* A URL to fetch the raw Markdown/MDX content of page
|
|
10
10
|
*/
|
|
@@ -13,7 +13,7 @@ export declare function MarkdownCopyButton({ markdownUrl, ...props }: ComponentP
|
|
|
13
13
|
/**
|
|
14
14
|
* see https://fumadocs.dev/docs/integrations/llms#page-actions to customize.
|
|
15
15
|
*/
|
|
16
|
-
export declare function ViewOptionsPopover({ markdownUrl, githubUrl, ...props }: ComponentProps<typeof PopoverTrigger> & {
|
|
16
|
+
export declare function ViewOptionsPopover({ markdownUrl, githubUrl, pageUrl: pageUrlProp, ...props }: ComponentProps<typeof PopoverTrigger> & {
|
|
17
17
|
/**
|
|
18
18
|
* A URL to the raw Markdown/MDX content of page
|
|
19
19
|
*/
|
|
@@ -22,5 +22,13 @@ export declare function ViewOptionsPopover({ markdownUrl, githubUrl, ...props }:
|
|
|
22
22
|
* Source file URL on GitHub
|
|
23
23
|
*/
|
|
24
24
|
githubUrl?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The page URL the AI prompts ask to read.
|
|
27
|
+
*
|
|
28
|
+
* Defaults to the URL the reader is on, without query and hash (the router
|
|
29
|
+
* pathname during server rendering). Set it when the site should hand out a
|
|
30
|
+
* canonical URL instead.
|
|
31
|
+
*/
|
|
32
|
+
pageUrl?: string;
|
|
25
33
|
}): import("react").JSX.Element;
|
|
26
34
|
//#endregion
|
|
@@ -13,7 +13,8 @@ const cache = /* @__PURE__ */ new Map();
|
|
|
13
13
|
/**
|
|
14
14
|
* see https://fumadocs.dev/docs/integrations/llms#page-actions to customize.
|
|
15
15
|
*/
|
|
16
|
-
function MarkdownCopyButton({ markdownUrl, ...props }) {
|
|
16
|
+
function MarkdownCopyButton({ markdownUrl: _markdownUrl, ...props }) {
|
|
17
|
+
const markdownUrl = withBasePath(_markdownUrl);
|
|
17
18
|
const t = useTranslations({ note: "page actions" });
|
|
18
19
|
const [isLoading, setLoading] = useState(false);
|
|
19
20
|
const [checked, onClick] = useCopyButton(async () => {
|
|
@@ -21,7 +22,7 @@ function MarkdownCopyButton({ markdownUrl, ...props }) {
|
|
|
21
22
|
if (cached) return navigator.clipboard.writeText(await cached);
|
|
22
23
|
setLoading(true);
|
|
23
24
|
try {
|
|
24
|
-
const promise = fetch(
|
|
25
|
+
const promise = fetch(markdownUrl).then((res) => res.text());
|
|
25
26
|
cache.set(markdownUrl, promise);
|
|
26
27
|
await navigator.clipboard.write([new ClipboardItem({ "text/plain": promise })]);
|
|
27
28
|
} finally {
|
|
@@ -43,12 +44,12 @@ function MarkdownCopyButton({ markdownUrl, ...props }) {
|
|
|
43
44
|
/**
|
|
44
45
|
* see https://fumadocs.dev/docs/integrations/llms#page-actions to customize.
|
|
45
46
|
*/
|
|
46
|
-
function ViewOptionsPopover({ markdownUrl, githubUrl, ...props }) {
|
|
47
|
+
function ViewOptionsPopover({ markdownUrl, githubUrl, pageUrl: pageUrlProp, ...props }) {
|
|
47
48
|
const pathname = usePathname();
|
|
48
49
|
const t = useTranslations({ note: "page actions" });
|
|
49
50
|
const items = useMemo(() => {
|
|
50
|
-
const pageUrl = typeof window === "undefined" ? pathname :
|
|
51
|
-
const q = t("Read {url}, I want to ask questions about it.", { variables: { url:
|
|
51
|
+
const pageUrl = pageUrlProp ?? (typeof window === "undefined" ? pathname : window.location.href);
|
|
52
|
+
const q = t("Read {url}, I want to ask questions about it.", { variables: { url: pageUrl } });
|
|
52
53
|
return [
|
|
53
54
|
githubUrl && {
|
|
54
55
|
title: t("Open in GitHub"),
|
|
@@ -62,7 +63,7 @@ function ViewOptionsPopover({ markdownUrl, githubUrl, ...props }) {
|
|
|
62
63
|
},
|
|
63
64
|
markdownUrl && {
|
|
64
65
|
title: t("View as Markdown"),
|
|
65
|
-
href:
|
|
66
|
+
href: markdownUrl,
|
|
66
67
|
icon: /* @__PURE__ */ jsx(TextIcon, {})
|
|
67
68
|
},
|
|
68
69
|
{
|
|
@@ -167,7 +168,8 @@ function ViewOptionsPopover({ markdownUrl, githubUrl, ...props }) {
|
|
|
167
168
|
githubUrl,
|
|
168
169
|
markdownUrl,
|
|
169
170
|
pathname,
|
|
170
|
-
t
|
|
171
|
+
t,
|
|
172
|
+
pageUrlProp
|
|
171
173
|
]);
|
|
172
174
|
return /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsxs(PopoverTrigger, {
|
|
173
175
|
...props,
|
|
@@ -3,11 +3,12 @@ import { cn } from "../../../utils/cn.js";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Airplay, Moon, Sun } from "lucide-react";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
|
-
import {
|
|
6
|
+
import { useSyncExternalStore } from "react";
|
|
7
7
|
import { useTranslations } from "@fuma-translate/react";
|
|
8
8
|
import { useTheme } from "next-themes";
|
|
9
9
|
import { flushSync } from "react-dom";
|
|
10
10
|
//#region src/layouts/shared/slots/theme-switch.tsx
|
|
11
|
+
const noop = () => () => {};
|
|
11
12
|
const itemVariants = cva("size-6.5 p-1.5 text-fd-muted-foreground", { variants: { active: {
|
|
12
13
|
true: "bg-fd-accent text-fd-accent-foreground",
|
|
13
14
|
false: "text-fd-muted-foreground"
|
|
@@ -19,7 +20,7 @@ const full = [
|
|
|
19
20
|
];
|
|
20
21
|
function ThemeSwitch({ className, mode = "light-dark", ...props }) {
|
|
21
22
|
const { setTheme, theme, resolvedTheme } = useTheme();
|
|
22
|
-
const
|
|
23
|
+
const mounted = useSyncExternalStore(noop, () => true, () => false);
|
|
23
24
|
const t = useTranslations({ note: "theme switcher" });
|
|
24
25
|
const themeAriaLabels = {
|
|
25
26
|
light: t("Light", { note: "aria-label" }),
|
|
@@ -30,9 +31,6 @@ function ThemeSwitch({ className, mode = "light-dark", ...props }) {
|
|
|
30
31
|
if (document?.startViewTransition) document.startViewTransition(() => flushSync(() => setTheme(newTheme)));
|
|
31
32
|
else setTheme(newTheme);
|
|
32
33
|
};
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
setMounted(true);
|
|
35
|
-
}, []);
|
|
36
34
|
const container = cn("inline-flex items-center rounded-full border p-1 overflow-hidden *:rounded-full", className);
|
|
37
35
|
if (mode === "light-dark") {
|
|
38
36
|
const value = mounted ? resolvedTheme : null;
|
package/dist/legacy/layout.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useIsScrollTop } from "../utils/use-is-scroll-top.js";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, use,
|
|
4
|
+
import { createContext, use, useMemo } from "react";
|
|
4
5
|
//#region src/legacy/layout.tsx
|
|
5
6
|
/**
|
|
6
7
|
* applied styles to different layout components in `Page` from layouts
|
|
@@ -20,18 +21,8 @@ function StylesProvider({ children, ...value }) {
|
|
|
20
21
|
}
|
|
21
22
|
const NavContext = createContext({ isTransparent: false });
|
|
22
23
|
function NavProvider({ transparentMode = "none", children }) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
if (transparentMode !== "top") return;
|
|
26
|
-
const listener = () => {
|
|
27
|
-
setTransparent(window.scrollY < 10);
|
|
28
|
-
};
|
|
29
|
-
listener();
|
|
30
|
-
window.addEventListener("scroll", listener);
|
|
31
|
-
return () => {
|
|
32
|
-
window.removeEventListener("scroll", listener);
|
|
33
|
-
};
|
|
34
|
-
}, [transparentMode]);
|
|
24
|
+
const isTop = useIsScrollTop({ enabled: transparentMode === "top" });
|
|
25
|
+
const transparent = transparentMode === "top" ? isTop ?? true : transparentMode === "always";
|
|
35
26
|
return /* @__PURE__ */ jsx(NavContext, {
|
|
36
27
|
value: useMemo(() => ({ isTransparent: transparent }), [transparent]),
|
|
37
28
|
children
|
package/dist/style.css
CHANGED
|
@@ -2766,6 +2766,9 @@
|
|
|
2766
2766
|
.md\:pb-8 {
|
|
2767
2767
|
padding-bottom: calc(var(--spacing) * 8);
|
|
2768
2768
|
}
|
|
2769
|
+
:where([data-sidebar-collapsed="true"]) .md\:in-data-\[sidebar-collapsed\=true\]\:pt-16 {
|
|
2770
|
+
padding-top: calc(var(--spacing) * 16);
|
|
2771
|
+
}
|
|
2769
2772
|
.has-data-\[collapsed\=true\]\:md\:flex:has([data-collapsed="true"]) {
|
|
2770
2773
|
display: flex;
|
|
2771
2774
|
}
|
|
@@ -2816,6 +2819,9 @@
|
|
|
2816
2819
|
.xl\:text-end {
|
|
2817
2820
|
text-align: end;
|
|
2818
2821
|
}
|
|
2822
|
+
:where([data-sidebar-collapsed="true"]) .xl\:in-data-\[sidebar-collapsed\=true\]\:pt-14 {
|
|
2823
|
+
padding-top: calc(var(--spacing) * 14);
|
|
2824
|
+
}
|
|
2819
2825
|
}
|
|
2820
2826
|
@container (width < 36rem) {
|
|
2821
2827
|
.\@max-xl\:hidden {
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { useSyncExternalStore } from "react";
|
|
3
3
|
//#region src/utils/use-is-scroll-top.ts
|
|
4
|
+
const subscribe = (onChange) => {
|
|
5
|
+
window.addEventListener("scroll", onChange, { passive: true });
|
|
6
|
+
return () => window.removeEventListener("scroll", onChange);
|
|
7
|
+
};
|
|
8
|
+
const noop = () => () => {};
|
|
9
|
+
const getServerSnapshot = () => void 0;
|
|
10
|
+
/**
|
|
11
|
+
* @returns `undefined` on the server, during hydration, or when disabled.
|
|
12
|
+
*/
|
|
4
13
|
function useIsScrollTop({ enabled = true }) {
|
|
5
|
-
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
if (!enabled) return;
|
|
8
|
-
const listener = () => {
|
|
9
|
-
setIsTop(window.scrollY < 10);
|
|
10
|
-
};
|
|
11
|
-
listener();
|
|
12
|
-
window.addEventListener("scroll", listener);
|
|
13
|
-
return () => {
|
|
14
|
-
window.removeEventListener("scroll", listener);
|
|
15
|
-
};
|
|
16
|
-
}, [enabled]);
|
|
17
|
-
return isTop;
|
|
14
|
+
return useSyncExternalStore(enabled ? subscribe : noop, () => enabled ? window.scrollY < 10 : void 0, getServerSnapshot);
|
|
18
15
|
}
|
|
19
16
|
//#endregion
|
|
20
17
|
export { useIsScrollTop };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "16.15.
|
|
3
|
+
"version": "16.15.13",
|
|
4
4
|
"description": "The Radix UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -161,7 +161,8 @@
|
|
|
161
161
|
"unist-util-visit": "^5.1.0"
|
|
162
162
|
},
|
|
163
163
|
"devDependencies": {
|
|
164
|
-
"@fumadocs/
|
|
164
|
+
"@fumadocs/base-ui": "16.15.13",
|
|
165
|
+
"@fumadocs/cli": "1.7.0",
|
|
165
166
|
"@tailwindcss/cli": "^4.3.3",
|
|
166
167
|
"@tailwindcss/oxide": "^4.3.3",
|
|
167
168
|
"@tsdown/css": "^0.23.0",
|
|
@@ -170,8 +171,8 @@
|
|
|
170
171
|
"@types/node": "^26.6.1",
|
|
171
172
|
"@types/react": "^19.3.0",
|
|
172
173
|
"@types/react-dom": "^19.3.0",
|
|
173
|
-
"fuma-cli": "^0.
|
|
174
|
-
"fumadocs-core": "16.15.
|
|
174
|
+
"fuma-cli": "^0.3.1",
|
|
175
|
+
"fumadocs-core": "16.15.13",
|
|
175
176
|
"react-medium-image-zoom": "^5.4.9",
|
|
176
177
|
"tailwindcss": "^4.3.3",
|
|
177
178
|
"tsconfig": "0.0.0",
|
|
@@ -181,7 +182,7 @@
|
|
|
181
182
|
"peerDependencies": {
|
|
182
183
|
"@types/mdx": "*",
|
|
183
184
|
"@types/react": "*",
|
|
184
|
-
"fumadocs-core": "16.15.
|
|
185
|
+
"fumadocs-core": "16.15.13",
|
|
185
186
|
"next": "16.x.x",
|
|
186
187
|
"react": "^19.2.0",
|
|
187
188
|
"react-dom": "^19.2.0",
|