@fumadocs/base-ui 16.17.8 → 16.17.10

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.
Files changed (247) hide show
  1. package/css/generated/flux.css +1 -1
  2. package/css/generated/glass.css +1 -1
  3. package/css/generated/shared.css +1 -1
  4. package/css/generated/spacious.css +1 -1
  5. package/css/lib/base.css +8 -7
  6. package/dist/.translations/index.d.ts +1 -3
  7. package/dist/.translations/keys.js +1 -2
  8. package/dist/_virtual/_rolldown/runtime.js +1 -2
  9. package/dist/components/accordion.d.ts +1 -3
  10. package/dist/components/accordion.js +1 -2
  11. package/dist/components/banner.d.ts +0 -2
  12. package/dist/components/banner.js +1 -2
  13. package/dist/components/callout.d.ts +1 -3
  14. package/dist/components/callout.js +1 -2
  15. package/dist/components/card.d.ts +1 -3
  16. package/dist/components/card.js +1 -2
  17. package/dist/components/codeblock.d.ts +1 -3
  18. package/dist/components/codeblock.js +1 -2
  19. package/dist/components/codeblock.rsc.d.ts +1 -3
  20. package/dist/components/codeblock.rsc.js +1 -2
  21. package/dist/components/dialog/search-algolia.d.ts +1 -3
  22. package/dist/components/dialog/search-algolia.js +1 -2
  23. package/dist/components/dialog/search-default.d.ts +1 -3
  24. package/dist/components/dialog/search-default.js +1 -2
  25. package/dist/components/dialog/search-orama.d.ts +1 -3
  26. package/dist/components/dialog/search-orama.js +1 -2
  27. package/dist/components/dialog/search.d.ts +0 -2
  28. package/dist/components/dialog/search.js +1 -2
  29. package/dist/components/dynamic-codeblock.core.d.ts +0 -2
  30. package/dist/components/dynamic-codeblock.core.js +1 -2
  31. package/dist/components/dynamic-codeblock.d.ts +1 -3
  32. package/dist/components/dynamic-codeblock.js +1 -2
  33. package/dist/components/files.d.ts +1 -3
  34. package/dist/components/files.js +1 -2
  35. package/dist/components/github-info.d.ts +1 -3
  36. package/dist/components/github-info.js +1 -2
  37. package/dist/components/heading.d.ts +0 -2
  38. package/dist/components/heading.js +1 -2
  39. package/dist/components/image-zoom.d.ts +1 -3
  40. package/dist/components/image-zoom.js +1 -2
  41. package/dist/components/inline-toc.d.ts +1 -3
  42. package/dist/components/inline-toc.js +1 -2
  43. package/dist/components/sidebar/base.d.ts +0 -1
  44. package/dist/components/sidebar/base.js +5 -3
  45. package/dist/components/sidebar/link-item.d.ts +0 -2
  46. package/dist/components/sidebar/link-item.js +1 -2
  47. package/dist/components/sidebar/page-tree.d.ts +0 -2
  48. package/dist/components/sidebar/page-tree.js +1 -2
  49. package/dist/components/sidebar/tabs/dropdown.d.ts +1 -3
  50. package/dist/components/sidebar/tabs/dropdown.js +1 -2
  51. package/dist/components/sidebar/tabs/index.d.ts +1 -3
  52. package/dist/components/sidebar/tabs/index.js +1 -2
  53. package/dist/components/steps.d.ts +1 -3
  54. package/dist/components/steps.js +1 -2
  55. package/dist/components/tabs.d.ts +1 -3
  56. package/dist/components/tabs.js +1 -2
  57. package/dist/components/toc/block.d.ts +1 -3
  58. package/dist/components/toc/block.js +6 -13
  59. package/dist/components/toc/clerk.d.ts +2 -4
  60. package/dist/components/toc/clerk.js +85 -120
  61. package/dist/components/toc/default.d.ts +2 -4
  62. package/dist/components/toc/default.js +112 -149
  63. package/dist/components/toc/index.d.ts +1 -3
  64. package/dist/components/toc/index.js +1 -2
  65. package/dist/components/type-table.d.ts +1 -3
  66. package/dist/components/type-table.js +1 -2
  67. package/dist/components/ui/accordion.d.ts +1 -3
  68. package/dist/components/ui/accordion.js +1 -2
  69. package/dist/components/ui/button.d.ts +1 -3
  70. package/dist/components/ui/button.js +1 -2
  71. package/dist/components/ui/collapsible.d.ts +1 -3
  72. package/dist/components/ui/collapsible.js +1 -2
  73. package/dist/components/ui/popover.d.ts +1 -3
  74. package/dist/components/ui/popover.js +1 -2
  75. package/dist/components/ui/tabs.d.ts +1 -3
  76. package/dist/components/ui/tabs.js +1 -2
  77. package/dist/contexts/i18n.d.ts +0 -2
  78. package/dist/contexts/i18n.js +1 -2
  79. package/dist/contexts/search.d.ts +0 -2
  80. package/dist/contexts/search.js +1 -2
  81. package/dist/contexts/tree.d.ts +0 -2
  82. package/dist/contexts/tree.js +1 -2
  83. package/dist/i18n.d.ts +0 -2
  84. package/dist/i18n.js +1 -2
  85. package/dist/layouts/docs/client.d.ts +0 -2
  86. package/dist/layouts/docs/client.js +1 -2
  87. package/dist/layouts/docs/index.d.ts +0 -2
  88. package/dist/layouts/docs/index.js +1 -2
  89. package/dist/layouts/docs/page/index.d.ts +0 -2
  90. package/dist/layouts/docs/page/index.js +1 -2
  91. package/dist/layouts/docs/page/slots/breadcrumb.d.ts +1 -3
  92. package/dist/layouts/docs/page/slots/breadcrumb.js +1 -2
  93. package/dist/layouts/docs/page/slots/container.d.ts +1 -3
  94. package/dist/layouts/docs/page/slots/container.js +1 -2
  95. package/dist/layouts/docs/page/slots/footer.d.ts +0 -2
  96. package/dist/layouts/docs/page/slots/footer.js +1 -2
  97. package/dist/layouts/docs/page/slots/toc.d.ts +1 -3
  98. package/dist/layouts/docs/page/slots/toc.js +1 -2
  99. package/dist/layouts/docs/slots/container.d.ts +1 -3
  100. package/dist/layouts/docs/slots/container.js +1 -2
  101. package/dist/layouts/docs/slots/header.d.ts +1 -3
  102. package/dist/layouts/docs/slots/header.js +1 -2
  103. package/dist/layouts/docs/slots/sidebar.d.ts +1 -3
  104. package/dist/layouts/docs/slots/sidebar.js +5 -9
  105. package/dist/layouts/flux/index.d.ts +0 -2
  106. package/dist/layouts/flux/index.js +1 -2
  107. package/dist/layouts/flux/page/index.d.ts +0 -2
  108. package/dist/layouts/flux/page/index.js +1 -2
  109. package/dist/layouts/flux/page/slots/breadcrumb.d.ts +1 -3
  110. package/dist/layouts/flux/page/slots/breadcrumb.js +1 -2
  111. package/dist/layouts/flux/page/slots/container.d.ts +1 -3
  112. package/dist/layouts/flux/page/slots/container.js +1 -2
  113. package/dist/layouts/flux/page/slots/footer.d.ts +0 -2
  114. package/dist/layouts/flux/page/slots/footer.js +1 -2
  115. package/dist/layouts/flux/page/slots/toc.d.ts +1 -3
  116. package/dist/layouts/flux/page/slots/toc.js +1 -2
  117. package/dist/layouts/flux/slots/container.d.ts +1 -3
  118. package/dist/layouts/flux/slots/container.js +1 -2
  119. package/dist/layouts/flux/slots/sidebar.d.ts +1 -3
  120. package/dist/layouts/flux/slots/sidebar.js +1 -2
  121. package/dist/layouts/flux/slots/tab-dropdown.d.ts +1 -3
  122. package/dist/layouts/flux/slots/tab-dropdown.js +1 -2
  123. package/dist/layouts/glass/index.d.ts +0 -2
  124. package/dist/layouts/glass/index.js +1 -2
  125. package/dist/layouts/glass/layout-tabs.js +1 -2
  126. package/dist/layouts/glass/page/index.d.ts +0 -2
  127. package/dist/layouts/glass/page/index.js +1 -2
  128. package/dist/layouts/glass/page/slots/breadcrumb.d.ts +1 -3
  129. package/dist/layouts/glass/page/slots/breadcrumb.js +1 -2
  130. package/dist/layouts/glass/page/slots/footer.d.ts +0 -2
  131. package/dist/layouts/glass/page/slots/footer.js +1 -2
  132. package/dist/layouts/glass/page/slots/toc.d.ts +1 -3
  133. package/dist/layouts/glass/page/slots/toc.js +1 -2
  134. package/dist/layouts/glass/slots/header.d.ts +1 -3
  135. package/dist/layouts/glass/slots/header.js +1 -2
  136. package/dist/layouts/glass/slots/sidebar.d.ts +1 -3
  137. package/dist/layouts/glass/slots/sidebar.js +7 -5
  138. package/dist/layouts/home/index.d.ts +0 -2
  139. package/dist/layouts/home/index.js +1 -2
  140. package/dist/layouts/home/navbar.d.ts +1 -3
  141. package/dist/layouts/home/navbar.js +1 -2
  142. package/dist/layouts/home/not-found.d.ts +1 -3
  143. package/dist/layouts/home/not-found.js +1 -2
  144. package/dist/layouts/home/slots/container.d.ts +1 -3
  145. package/dist/layouts/home/slots/container.js +1 -2
  146. package/dist/layouts/home/slots/header.d.ts +1 -3
  147. package/dist/layouts/home/slots/header.js +1 -2
  148. package/dist/layouts/notebook/client.d.ts +0 -2
  149. package/dist/layouts/notebook/client.js +1 -2
  150. package/dist/layouts/notebook/index.d.ts +0 -2
  151. package/dist/layouts/notebook/index.js +1 -2
  152. package/dist/layouts/notebook/page/index.d.ts +0 -2
  153. package/dist/layouts/notebook/page/index.js +1 -2
  154. package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +1 -3
  155. package/dist/layouts/notebook/page/slots/breadcrumb.js +1 -2
  156. package/dist/layouts/notebook/page/slots/container.d.ts +1 -3
  157. package/dist/layouts/notebook/page/slots/container.js +1 -2
  158. package/dist/layouts/notebook/page/slots/footer.d.ts +0 -2
  159. package/dist/layouts/notebook/page/slots/footer.js +1 -2
  160. package/dist/layouts/notebook/page/slots/toc.d.ts +1 -3
  161. package/dist/layouts/notebook/page/slots/toc.js +1 -2
  162. package/dist/layouts/notebook/slots/container.d.ts +1 -3
  163. package/dist/layouts/notebook/slots/container.js +1 -2
  164. package/dist/layouts/notebook/slots/header.d.ts +1 -3
  165. package/dist/layouts/notebook/slots/header.js +1 -2
  166. package/dist/layouts/notebook/slots/sidebar.d.ts +0 -2
  167. package/dist/layouts/notebook/slots/sidebar.js +5 -9
  168. package/dist/layouts/shared/client.d.ts +1 -3
  169. package/dist/layouts/shared/client.js +1 -2
  170. package/dist/layouts/shared/index.d.ts +0 -2
  171. package/dist/layouts/shared/index.js +1 -2
  172. package/dist/layouts/shared/page-actions.d.ts +1 -3
  173. package/dist/layouts/shared/page-actions.js +1 -2
  174. package/dist/layouts/shared/slots/language-select.d.ts +1 -3
  175. package/dist/layouts/shared/slots/language-select.js +1 -2
  176. package/dist/layouts/shared/slots/search-trigger.d.ts +1 -3
  177. package/dist/layouts/shared/slots/search-trigger.js +1 -2
  178. package/dist/layouts/shared/slots/theme-switch.d.ts +1 -3
  179. package/dist/layouts/shared/slots/theme-switch.js +1 -2
  180. package/dist/layouts/spacious/index.d.ts +0 -2
  181. package/dist/layouts/spacious/index.js +1 -2
  182. package/dist/layouts/spacious/page/index.d.ts +0 -2
  183. package/dist/layouts/spacious/page/index.js +1 -2
  184. package/dist/layouts/spacious/page/slots/breadcrumb.d.ts +1 -3
  185. package/dist/layouts/spacious/page/slots/breadcrumb.js +1 -2
  186. package/dist/layouts/spacious/page/slots/footer.d.ts +0 -2
  187. package/dist/layouts/spacious/page/slots/footer.js +1 -2
  188. package/dist/layouts/spacious/page/slots/toc.d.ts +0 -2
  189. package/dist/layouts/spacious/page/slots/toc.js +1 -2
  190. package/dist/layouts/spacious/slots/actions.d.ts +1 -3
  191. package/dist/layouts/spacious/slots/actions.js +1 -2
  192. package/dist/layouts/spacious/slots/header.d.ts +1 -3
  193. package/dist/layouts/spacious/slots/header.js +1 -2
  194. package/dist/layouts/spacious/slots/sidebar.d.ts +1 -3
  195. package/dist/layouts/spacious/slots/sidebar.js +21 -25
  196. package/dist/mdx.d.ts +0 -2
  197. package/dist/mdx.js +1 -2
  198. package/dist/mdx.server.d.ts +0 -2
  199. package/dist/mdx.server.js +1 -2
  200. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/controlled.d.ts +0 -2
  201. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/controlled.js +1 -2
  202. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +1 -3
  203. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/uncontrolled.js +1 -2
  204. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js +1 -2
  205. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js +1 -2
  206. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/element-tests.js +1 -2
  207. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js +1 -2
  208. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js +1 -2
  209. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js +1 -2
  210. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js +1 -2
  211. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js +1 -2
  212. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js +1 -2
  213. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-scale.js +1 -2
  214. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js +1 -2
  215. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js +1 -2
  216. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +1 -2
  217. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/parse-position.js +1 -2
  218. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js +1 -2
  219. package/dist/og/takumi.d.ts +1 -3
  220. package/dist/og/takumi.js +1 -2
  221. package/dist/og.d.ts +0 -2
  222. package/dist/og.js +1 -2
  223. package/dist/page.d.ts +0 -2
  224. package/dist/page.js +1 -2
  225. package/dist/provider/astro.d.ts +1 -3
  226. package/dist/provider/astro.js +17 -2
  227. package/dist/provider/base.d.ts +0 -2
  228. package/dist/provider/base.js +1 -2
  229. package/dist/provider/next.d.ts +1 -3
  230. package/dist/provider/next.js +1 -2
  231. package/dist/provider/react-router.d.ts +1 -3
  232. package/dist/provider/react-router.js +1 -2
  233. package/dist/provider/tanstack.d.ts +1 -3
  234. package/dist/provider/tanstack.js +1 -2
  235. package/dist/provider/waku.d.ts +1 -3
  236. package/dist/provider/waku.js +1 -2
  237. package/dist/style.css +21 -24
  238. package/dist/utils/hotkey.js +1 -2
  239. package/dist/utils/merge-refs.js +1 -2
  240. package/dist/utils/urls.js +1 -2
  241. package/dist/utils/use-copy-button.d.ts +1 -3
  242. package/dist/utils/use-copy-button.js +1 -2
  243. package/dist/utils/use-footer-items.d.ts +1 -3
  244. package/dist/utils/use-footer-items.js +1 -2
  245. package/dist/utils/use-is-scroll-top.d.ts +1 -3
  246. package/dist/utils/use-is-scroll-top.js +1 -2
  247. package/package.json +5 -5
@@ -2,7 +2,7 @@ import { cn } from "../utils/cn.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { GitFork, Star } from "lucide-react";
4
4
  import { use } from "react";
5
- //#region src/components/github-info.tsx
5
+ // src/components/github-info.tsx
6
6
  async function fetchRepositoryInfo({ owner, repo, token, baseUrl = "https://api.github.com", fetchOptions = { next: { revalidate: 60 } } }) {
7
7
  const endpoint = `${baseUrl}/repos/${owner}/${repo}`;
8
8
  const headers = new Headers(fetchOptions.headers);
@@ -71,5 +71,4 @@ function GithubInfo({ repo, owner, token, baseUrl, fetchOptions, locale, ...prop
71
71
  })]
72
72
  });
73
73
  }
74
- //#endregion
75
74
  export { GithubInfo, fetchRepositoryInfo };
@@ -1,9 +1,7 @@
1
1
  import { ComponentPropsWithoutRef } from "react";
2
- //#region src/components/heading.d.ts
3
2
  type Types = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
4
3
  type HeadingProps<T extends Types> = Omit<ComponentPropsWithoutRef<T>, 'as'> & {
5
4
  as?: T;
6
5
  };
7
6
  export declare function Heading<T extends Types = 'h1'>({ as, ...props }: HeadingProps<T>): import("react").JSX.Element;
8
- //#endregion
9
7
  export {};
@@ -5,7 +5,7 @@ import { useCopyButton } from "../utils/use-copy-button.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { CopyCheckIcon, LinkIcon } from "lucide-react";
7
7
  import { useTranslations } from "@fuma-translate/react";
8
- //#region src/components/heading.tsx
8
+ // src/components/heading.tsx
9
9
  function Heading({ as, ...props }) {
10
10
  const As = as ?? "h1";
11
11
  const t = useTranslations({ note: "heading anchor" });
@@ -37,5 +37,4 @@ function Heading({ as, ...props }) {
37
37
  })]
38
38
  });
39
39
  }
40
- //#endregion
41
40
  export { Heading };
@@ -2,7 +2,6 @@ import { UncontrolledProps } from "../node_modules/.pnpm/react-medium-image-zoom
2
2
  import "../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/index.js";
3
3
  import { ImageProps } from "fumadocs-core/framework";
4
4
  import { ComponentProps, ReactNode } from "react";
5
- //#region src/components/image-zoom.d.ts
6
5
  export type ImageZoomProps = ImageProps & {
7
6
  /**
8
7
  * Image props when zoom in
@@ -25,5 +24,4 @@ export declare function ImageZoom({ zoomInProps, children, rmiz, caption, ...pro
25
24
  */
26
25
  export declare function Lightbox({ children }: {
27
26
  children: ReactNode;
28
- }): import("react").JSX.Element;
29
- //#endregion
27
+ }): import("react").JSX.Element;
@@ -9,7 +9,7 @@ import { ChevronLeft, ChevronRight, X } from "lucide-react";
9
9
  import { createContext, use, useRef, useState } from "react";
10
10
  import { useTranslations } from "@fuma-translate/react";
11
11
  import { createPortal, flushSync } from "react-dom";
12
- //#region src/components/image-zoom.tsx
12
+ // src/components/image-zoom.tsx
13
13
  const LightboxContext = createContext(null);
14
14
  function getImageSrc(src) {
15
15
  if (typeof src === "string") return src;
@@ -253,5 +253,4 @@ function transition(from, update) {
253
253
  if (to) to.style.viewTransitionName = "";
254
254
  });
255
255
  }
256
- //#endregion
257
256
  export { ImageZoom, Lightbox };
@@ -1,9 +1,7 @@
1
1
  import { Collapsible } from "./ui/collapsible.js";
2
2
  import { ComponentProps } from "react";
3
3
  import { TOCItemType } from "fumadocs-core/toc";
4
- //#region src/components/inline-toc.d.ts
5
4
  export interface InlineTocProps extends ComponentProps<typeof Collapsible> {
6
5
  items: TOCItemType[];
7
6
  }
8
- export declare function InlineTOC({ items, className, ...props }: InlineTocProps): import("react").JSX.Element;
9
- //#endregion
7
+ export declare function InlineTOC({ items, className, ...props }: InlineTocProps): import("react").JSX.Element;
@@ -4,7 +4,7 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./ui/collap
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { ChevronDown } from "lucide-react";
6
6
  import { useTranslations } from "@fuma-translate/react";
7
- //#region src/components/inline-toc.tsx
7
+ // src/components/inline-toc.tsx
8
8
  function InlineTOC({ items, className, ...props }) {
9
9
  const t = useTranslations({ note: "inline table of contents" });
10
10
  return /* @__PURE__ */ jsxs(Collapsible, {
@@ -24,5 +24,4 @@ function InlineTOC({ items, className, ...props }) {
24
24
  }) })]
25
25
  });
26
26
  }
27
- //#endregion
28
27
  export { InlineTOC };
@@ -82,5 +82,4 @@ export declare function SidebarCollapseTrigger(props: ComponentProps<'button'>):
82
82
  * scroll to the element if `active` is true
83
83
  */
84
84
  export declare function useAutoScroll(active: boolean, ref: RefObject<HTMLElement | null>): void;
85
- //#endregion
86
85
  export { base_d_exports };
@@ -14,7 +14,7 @@ import { useOnChange } from "fumadocs-core/utils/use-on-change";
14
14
  import { ScrollArea } from "@base-ui/react/scroll-area";
15
15
  import { useMediaQuery } from "fumadocs-core/utils/use-media-query";
16
16
  import scrollIntoView from "scroll-into-view-if-needed";
17
- //#region src/components/sidebar/base.tsx
17
+ // src/components/sidebar/base.tsx
18
18
  var base_exports = /* @__PURE__ */ __exportAll({
19
19
  SidebarCollapseTrigger: () => SidebarCollapseTrigger,
20
20
  SidebarContent: () => SidebarContent,
@@ -152,7 +152,10 @@ function SidebarViewport({ className, ...props }) {
152
152
  children: [
153
153
  /* @__PURE__ */ jsx(ScrollArea.Viewport, {
154
154
  className: "size-full rounded-[inherit] p-4 overscroll-contain mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)]",
155
- children: props.children
155
+ children: /* @__PURE__ */ jsx(ScrollArea.Content, {
156
+ className: "flex flex-col gap-0.5",
157
+ children: props.children
158
+ })
156
159
  }),
157
160
  /* @__PURE__ */ jsx(ScrollArea.Corner, {}),
158
161
  /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
@@ -300,5 +303,4 @@ function useAutoScroll(active, ref) {
300
303
  ref
301
304
  ]);
302
305
  }
303
- //#endregion
304
306
  export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarSeparator, SidebarTrigger, SidebarViewport, base_exports, useAutoScroll, useFolder, useFolderDepth, useSidebar };
@@ -1,12 +1,10 @@
1
1
  import { base_d_exports } from "./base.js";
2
2
  import { LinkItemType } from "../../layouts/shared/index.js";
3
3
  import { HTMLAttributes } from "react";
4
- //#region src/components/sidebar/link-item.d.ts
5
4
  type InternalComponents = Pick<typeof base_d_exports, 'SidebarFolder' | 'SidebarFolderLink' | 'SidebarFolderContent' | 'SidebarFolderTrigger' | 'SidebarItem'>;
6
5
  export declare function createLinkItemRenderer({ SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem }: InternalComponents): ({ item, ...props }: HTMLAttributes<HTMLElement> & {
7
6
  item: Exclude<LinkItemType, {
8
7
  type: 'icon';
9
8
  }>;
10
9
  }) => import("react").JSX.Element;
11
- //#endregion
12
10
  export {};
@@ -2,7 +2,7 @@
2
2
  import { isLinkItemActive } from "../../layouts/shared/index.js";
3
3
  import { usePathname } from "fumadocs-core/framework";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/sidebar/link-item.tsx
5
+ // src/components/sidebar/link-item.tsx
6
6
  function createLinkItemRenderer({ SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem }) {
7
7
  /**
8
8
  * Render sidebar items from page tree
@@ -33,5 +33,4 @@ function createLinkItemRenderer({ SidebarFolder, SidebarFolderContent, SidebarFo
33
33
  });
34
34
  };
35
35
  }
36
- //#endregion
37
36
  export { createLinkItemRenderer };
@@ -1,7 +1,6 @@
1
1
  import { base_d_exports } from "./base.js";
2
2
  import { FC, ReactNode } from "react";
3
3
  import * as PageTree from "fumadocs-core/page-tree";
4
- //#region src/components/sidebar/page-tree.d.ts
5
4
  export interface SidebarPageTreeComponents {
6
5
  Item: FC<{
7
6
  item: PageTree.Item;
@@ -16,5 +15,4 @@ export interface SidebarPageTreeComponents {
16
15
  }
17
16
  type InternalComponents = Pick<typeof base_d_exports, 'SidebarSeparator' | 'SidebarFolder' | 'SidebarFolderLink' | 'SidebarFolderContent' | 'SidebarFolderTrigger' | 'SidebarItem'>;
18
17
  export declare function createPageTreeRenderer({ SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarSeparator, SidebarItem }: InternalComponents): (components: Partial<SidebarPageTreeComponents>) => import("react").JSX.Element;
19
- //#endregion
20
18
  export {};
@@ -3,7 +3,7 @@ import { isActive } from "../../utils/urls.js";
3
3
  import { usePathname } from "fumadocs-core/framework";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Fragment as Fragment$1, createContext, use, useMemo } from "react";
6
- //#region src/components/sidebar/page-tree.tsx
6
+ // src/components/sidebar/page-tree.tsx
7
7
  const RendererContext = createContext(null);
8
8
  function createPageTreeRenderer({ SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarSeparator, SidebarItem }) {
9
9
  function renderList(nodes) {
@@ -65,5 +65,4 @@ function createPageTreeRenderer({ SidebarFolder, SidebarFolderContent, SidebarFo
65
65
  });
66
66
  };
67
67
  }
68
- //#endregion
69
68
  export { createPageTreeRenderer };
@@ -1,6 +1,5 @@
1
1
  import { LayoutTab } from "../../../layouts/shared/index.js";
2
2
  import { ComponentProps, ReactNode } from "react";
3
- //#region src/components/sidebar/tabs/dropdown.d.ts
4
3
  export type SidebarTabWithProps = LayoutTab;
5
4
  /**
6
5
  * Renders the given tabs as a dropdown per tabs group, one for each root folder on the
@@ -9,5 +8,4 @@ export type SidebarTabWithProps = LayoutTab;
9
8
  export declare function SidebarTabsDropdown({ options, placeholder, ...props }: {
10
9
  placeholder?: ReactNode;
11
10
  options: LayoutTab[];
12
- } & ComponentProps<'button'>): import("react").JSX.Element[];
13
- //#endregion
11
+ } & ComponentProps<'button'>): import("react").JSX.Element[];
@@ -9,7 +9,7 @@ import { usePathname } from "fumadocs-core/framework";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Check, ChevronsUpDown } from "lucide-react";
11
11
  import { useMemo, useState } from "react";
12
- //#region src/components/sidebar/tabs/dropdown.tsx
12
+ // src/components/sidebar/tabs/dropdown.tsx
13
13
  /**
14
14
  * Renders the given tabs as a dropdown per tabs group, one for each root folder on the
15
15
  * current page's path, letting users switch between root folders of the same type.
@@ -83,5 +83,4 @@ function Dropdown({ options, placeholder, ...props }) {
83
83
  })]
84
84
  });
85
85
  }
86
- //#endregion
87
86
  export { SidebarTabsDropdown };
@@ -1,9 +1,7 @@
1
1
  import { LayoutTab } from "../../../layouts/shared/index.js";
2
2
  import * as PageTree from "fumadocs-core/page-tree";
3
- //#region src/components/sidebar/tabs/index.d.ts
4
3
  export type SidebarTab = LayoutTab;
5
4
  export interface GetSidebarTabsOptions {
6
5
  transform?: (option: SidebarTab, node: PageTree.Folder) => SidebarTab | null;
7
6
  }
8
- export declare function getSidebarTabs(tree: PageTree.Root, { transform }?: GetSidebarTabsOptions): SidebarTab[];
9
- //#endregion
7
+ export declare function getSidebarTabs(tree: PageTree.Root, { transform }?: GetSidebarTabsOptions): SidebarTab[];
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- //#region src/components/sidebar/tabs/index.tsx
2
+ // src/components/sidebar/tabs/index.tsx
3
3
  const defaultTransform = (option, node) => {
4
4
  if (!node.icon) return option;
5
5
  return {
@@ -42,5 +42,4 @@ function getFolderUrls(folder, output = /* @__PURE__ */ new Set()) {
42
42
  }
43
43
  return output;
44
44
  }
45
- //#endregion
46
45
  export { getSidebarTabs };
@@ -1,9 +1,7 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/components/steps.d.ts
3
2
  export declare function Steps({ children }: {
4
3
  children: ReactNode;
5
4
  }): import("react").JSX.Element;
6
5
  export declare function Step({ children }: {
7
6
  children: ReactNode;
8
- }): import("react").JSX.Element;
9
- //#endregion
7
+ }): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- //#region src/components/steps.tsx
2
+ // src/components/steps.tsx
3
3
  function Steps({ children }) {
4
4
  return /* @__PURE__ */ jsx("div", {
5
5
  className: "fd-steps",
@@ -12,5 +12,4 @@ function Step({ children }) {
12
12
  children
13
13
  });
14
14
  }
15
- //#endregion
16
15
  export { Step, Steps };
@@ -1,7 +1,6 @@
1
1
  import { Tabs as Tabs$1, TabsContent as TabsContent$1, TabsList as TabsList$1, TabsTrigger as TabsTrigger$1 } from "./ui/tabs.js";
2
2
  import * as React$1 from "react";
3
3
  import { ComponentProps, ReactNode } from "react";
4
- //#region src/components/tabs.d.ts
5
4
  export interface TabsProps extends Omit<ComponentProps<typeof Tabs$1>, 'value' | 'onValueChange'> {
6
5
  /**
7
6
  * Use simple mode instead of advanced usage as documented in https://radix-ui.com/primitives/docs/components/tabs.
@@ -28,5 +27,4 @@ export interface TabProps extends Omit<ComponentProps<typeof TabsContent$1>, 'va
28
27
  value?: string;
29
28
  }
30
29
  export declare function Tab({ value, ...props }: TabProps): React$1.JSX.Element;
31
- export declare function TabsContent({ value, className, ...props }: ComponentProps<typeof TabsContent$1>): React$1.JSX.Element;
32
- //#endregion
30
+ export declare function TabsContent({ value, className, ...props }: ComponentProps<typeof TabsContent$1>): React$1.JSX.Element;
@@ -3,7 +3,7 @@ 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
5
  import { createContext, useContext, useEffect, useId, useMemo } from "react";
6
- //#region src/components/tabs.tsx
6
+ // src/components/tabs.tsx
7
7
  const TabsContext = createContext(null);
8
8
  function useTabContext() {
9
9
  const ctx = useContext(TabsContext);
@@ -86,5 +86,4 @@ function useCollectionIndex() {
86
86
  function escapeValue(v) {
87
87
  return v.toLowerCase().replace(/\s/, "-");
88
88
  }
89
- //#endregion
90
89
  export { Tab, Tabs, TabsContent, TabsList, TabsTrigger };
@@ -1,11 +1,9 @@
1
1
  import { TOCEmpty } from "./default.js";
2
2
  import { ComponentProps } from "react";
3
3
  import * as Primitive from "fumadocs-core/toc";
4
- //#region src/components/toc/block.d.ts
5
4
  export type TOCItemsProps = ComponentProps<'div'>;
6
- export declare function TOCItems({ ref, className, children, ...props }: TOCItemsProps): import("react").JSX.Element;
5
+ export declare function TOCItems({ className, children, ...props }: TOCItemsProps): import("react").JSX.Element;
7
6
  export declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
8
7
  item: Primitive.TOCItemType;
9
8
  }): import("react").JSX.Element;
10
- //#endregion
11
9
  export { TOCEmpty };
@@ -1,25 +1,20 @@
1
1
  "use client";
2
2
  import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
3
3
  import { cn } from "../../utils/cn.js";
4
- import { mergeRefs } from "../../utils/merge-refs.js";
5
4
  import { TOCEmpty } from "./default.js";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { useEffect, useRef } from "react";
6
+ import { useCallback } from "react";
8
7
  import * as Primitive from "fumadocs-core/toc";
9
- //#region src/components/toc/block.tsx
8
+ // src/components/toc/block.tsx
10
9
  var block_exports = /* @__PURE__ */ __exportAll({
11
10
  TOCEmpty: () => TOCEmpty,
12
11
  TOCItem: () => TOCItem,
13
12
  TOCItems: () => TOCItems
14
13
  });
15
- function TOCItems({ ref, className, children, ...props }) {
16
- const containerRef = useRef(null);
17
- const blockRef = useRef(null);
14
+ function TOCItems({ className, children, ...props }) {
18
15
  const tocInfo = Primitive.useTOC();
19
- useEffect(() => {
20
- const container = containerRef.current;
21
- const block = blockRef.current;
22
- if (!container || !block) return;
16
+ const ref = useCallback((block) => {
17
+ const container = block.parentElement;
23
18
  const positions = /* @__PURE__ */ new Map();
24
19
  let height = 0;
25
20
  const update = (items) => {
@@ -53,11 +48,10 @@ function TOCItems({ ref, className, children, ...props }) {
53
48
  };
54
49
  }, [tocInfo]);
55
50
  return /* @__PURE__ */ jsxs("div", {
56
- ref: mergeRefs(containerRef, ref),
57
51
  className: cn("relative flex flex-col", className),
58
52
  ...props,
59
53
  children: [/* @__PURE__ */ jsx("div", {
60
- ref: blockRef,
54
+ ref,
61
55
  className: "absolute inset-0 bg-linear-to-r from-fd-primary/10 [clip-path:inset(0_0_100%)] data-ready:transition-[clip-path] duration-300 ease-out"
62
56
  }), children]
63
57
  });
@@ -82,5 +76,4 @@ function TOCItem({ item, ...props }) {
82
76
  }), item.title]
83
77
  });
84
78
  }
85
- //#endregion
86
79
  export { TOCEmpty, TOCItem, TOCItems, block_exports };
@@ -1,10 +1,8 @@
1
1
  import { ComponentProps } from "react";
2
2
  import * as Primitive from "fumadocs-core/toc";
3
- //#region src/components/toc/clerk.d.ts
4
3
  export type TOCItemsProps = ComponentProps<'div'>;
5
- export declare function TOCItems({ ref, className, children, ...props }: TOCItemsProps): import("react").JSX.Element;
4
+ export declare function TOCItems({ className, children, ...props }: TOCItemsProps): import("react").JSX.Element;
6
5
  export declare function TOCEmpty(): import("react").JSX.Element;
7
6
  export declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
8
7
  item: Primitive.TOCItemType;
9
- }): import("react").JSX.Element;
10
- //#endregion
8
+ }): import("react").JSX.Element;
@@ -1,106 +1,23 @@
1
1
  "use client";
2
2
  import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
3
3
  import { cn } from "../../utils/cn.js";
4
- import { mergeRefs } from "../../utils/merge-refs.js";
5
4
  import { useTOCItems } from "./index.js";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
+ import { useCallback, useMemo } from "react";
8
7
  import { useTranslations } from "@fuma-translate/react";
9
8
  import * as Primitive from "fumadocs-core/toc";
10
- //#region src/components/toc/clerk.tsx
9
+ // src/components/toc/clerk.tsx
11
10
  var clerk_exports = /* @__PURE__ */ __exportAll({
12
11
  TOCEmpty: () => TOCEmpty,
13
12
  TOCItem: () => TOCItem,
14
13
  TOCItems: () => TOCItems
15
14
  });
16
- function TOCItems({ ref, className, children, ...props }) {
17
- const containerRef = useRef(null);
15
+ function TOCItems({ className, children, ...props }) {
18
16
  const items = useTOCItems();
19
- const [svg, setSvg] = useState(null);
20
- const onPrint = useCallback(() => {
21
- const container = containerRef.current;
22
- if (!container || container.clientHeight === 0) return;
23
- if (items.length === 0) {
24
- setSvg(null);
25
- return;
26
- }
27
- let w = 0;
28
- let h = 0;
29
- let d = "";
30
- const positions = [];
31
- const output = [];
32
- for (let i = 0; i < items.length; i++) {
33
- const item = items[i];
34
- const element = container.querySelector(`a[href="${item.url}"]`);
35
- if (!element) continue;
36
- const styles = getComputedStyle(element);
37
- const x = getLineOffset(item.depth) + .5;
38
- const top = element.offsetTop + parseFloat(styles.paddingTop);
39
- const bottom = element.offsetTop + element.clientHeight - parseFloat(styles.paddingBottom);
40
- w = Math.max(x + 8, w);
41
- h = Math.max(h, bottom);
42
- if (i === 0) d += ` M${x} ${top} L${x} ${bottom}`;
43
- else {
44
- const [, upperBottom, upperX] = i > 0 ? positions[i - 1] : [
45
- 0,
46
- 0,
47
- 0
48
- ];
49
- d += ` L ${upperX} ${upperBottom} ${x} ${top} L${x} ${bottom}`;
50
- }
51
- if (item._step !== void 0) output.push(/* @__PURE__ */ jsxs("g", {
52
- transform: `translate(${x}, ${(top + bottom) / 2})`,
53
- children: [/* @__PURE__ */ jsx("circle", {
54
- cx: "0",
55
- cy: "0",
56
- r: "8",
57
- className: "fill-fd-primary"
58
- }), /* @__PURE__ */ jsx("text", {
59
- cx: "0",
60
- cy: "0",
61
- textAnchor: "middle",
62
- alignmentBaseline: "central",
63
- dominantBaseline: "middle",
64
- className: "fill-fd-primary-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",
65
- children: item._step
66
- })]
67
- }, i));
68
- positions.push([
69
- top,
70
- bottom,
71
- x
72
- ]);
73
- }
74
- output.unshift(/* @__PURE__ */ jsx("path", {
75
- d,
76
- className: "stroke-fd-primary",
77
- strokeWidth: "1",
78
- fill: "none"
79
- }, "path"));
80
- setSvg({
81
- content: output,
82
- width: w,
83
- height: h,
84
- d,
85
- itemLineLengths: [],
86
- positions
87
- });
88
- }, [items]);
89
- useEffect(() => {
90
- const container = containerRef.current;
91
- if (!container) return;
92
- const observer = new ResizeObserver(onPrint);
93
- observer.observe(container);
94
- onPrint();
95
- return () => {
96
- observer.unobserve(container);
97
- };
98
- }, [onPrint]);
99
17
  return /* @__PURE__ */ jsxs("div", {
100
- ref: mergeRefs(containerRef, ref),
101
18
  className: cn("relative flex flex-col", className),
102
19
  ...props,
103
- children: [svg && /* @__PURE__ */ jsx(ThumbTrack, { computed: svg }), children]
20
+ children: [items.length > 0 && /* @__PURE__ */ jsx(ThumbTrack, { items }), children]
104
21
  });
105
22
  }
106
23
  function TOCEmpty() {
@@ -110,41 +27,90 @@ function TOCEmpty() {
110
27
  children: t("No Headings")
111
28
  });
112
29
  }
113
- function ThumbTrack({ computed }) {
114
- const ref = useRef(null);
115
- const tocInfo = Primitive.useTOC();
116
- function calculate(items) {
117
- const out = {};
118
- const startIdx = items.findIndex((item) => item.active);
119
- if (startIdx === -1) return out;
120
- const endIdx = items.findLastIndex((item) => item.active);
121
- out["--track-top"] = `${computed.positions[startIdx][0]}px`;
122
- out["--track-bottom"] = `${computed.positions[endIdx][1]}px`;
123
- return out;
124
- }
125
- Primitive.useTOCListener((items) => {
126
- const element = ref.current;
127
- if (!element) return;
128
- for (const [k, v] of Object.entries(calculate(items))) element.style.setProperty(k, v);
129
- });
30
+ function ThumbTrack({ items }) {
31
+ const toc = Primitive.useTOC();
32
+ const ref = useCallback((track) => {
33
+ const container = track.parentElement;
34
+ const svg = track.querySelector("svg");
35
+ const path = svg.querySelector("path");
36
+ const steps = svg.getElementsByTagName("g");
37
+ const positions = /* @__PURE__ */ new Map();
38
+ const update = (infos) => {
39
+ let top = -1;
40
+ let bottom = -1;
41
+ for (const info of infos) {
42
+ const position = info.active ? positions.get(info.original.url) : void 0;
43
+ if (!position) continue;
44
+ if (top === -1) top = position.top;
45
+ bottom = position.bottom;
46
+ }
47
+ if (top !== -1) svg.style.clipPath = `polygon(0 ${top}px, 100% ${top}px, 100% ${bottom}px, 0 ${bottom}px)`;
48
+ };
49
+ const observer = new ResizeObserver(() => {
50
+ if (container.clientHeight === 0) return;
51
+ const anchors = /* @__PURE__ */ new Map();
52
+ for (const anchor of container.getElementsByTagName("a")) anchors.set(anchor.getAttribute("href"), anchor);
53
+ let d = "";
54
+ let width = 0;
55
+ let height = 0;
56
+ let last;
57
+ positions.clear();
58
+ for (const item of items) {
59
+ const anchor = anchors.get(item.url);
60
+ if (!anchor) continue;
61
+ const styles = getComputedStyle(anchor);
62
+ const x = getLineOffset(item.depth) + .5;
63
+ const top = anchor.offsetTop + parseFloat(styles.paddingTop);
64
+ const bottom = anchor.offsetTop + anchor.clientHeight - parseFloat(styles.paddingBottom);
65
+ d += last ? ` L ${last.x} ${last.bottom} ${x} ${top}` : `M${x} ${top}`;
66
+ d += ` L${x} ${bottom}`;
67
+ last = {
68
+ x,
69
+ top,
70
+ bottom
71
+ };
72
+ positions.set(item.url, last);
73
+ width = Math.max(width, x + 8);
74
+ height = Math.max(height, bottom);
75
+ }
76
+ let step = 0;
77
+ for (const item of items) {
78
+ if (item._step === void 0) continue;
79
+ const position = positions.get(item.url);
80
+ const g = steps[step++];
81
+ if (position) g.setAttribute("transform", `translate(${position.x}, ${(position.top + position.bottom) / 2})`);
82
+ }
83
+ path.setAttribute("d", d);
84
+ track.style.width = `${width}px`;
85
+ track.style.height = `${height}px`;
86
+ update(toc.get());
87
+ });
88
+ observer.observe(container);
89
+ toc.listen(update);
90
+ return () => {
91
+ observer.disconnect();
92
+ toc.unlisten(update);
93
+ };
94
+ }, [items, toc]);
130
95
  return /* @__PURE__ */ jsx("div", {
131
96
  ref,
132
97
  className: "absolute top-0 inset-s-0 origin-center rtl:-scale-x-100",
133
- style: {
134
- width: computed.width,
135
- height: computed.height,
136
- ...calculate(tocInfo.get())
137
- },
138
- children: /* @__PURE__ */ jsx("svg", {
139
- xmlns: "http://www.w3.org/2000/svg",
140
- viewBox: `0 0 ${computed.width} ${computed.height}`,
141
- className: "absolute transition-[clip-path]",
142
- style: {
143
- width: computed.width,
144
- height: computed.height,
145
- clipPath: `polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))`
146
- },
147
- children: computed.content
98
+ children: /* @__PURE__ */ jsxs("svg", {
99
+ className: "absolute size-full [clip-path:polygon(0_0,100%_0,100%_0,0_0)] transition-[clip-path]",
100
+ children: [/* @__PURE__ */ jsx("path", {
101
+ className: "stroke-fd-primary",
102
+ strokeWidth: "1",
103
+ fill: "none"
104
+ }), items.map((item) => item._step !== void 0 && /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("circle", {
105
+ r: "8",
106
+ className: "fill-fd-primary"
107
+ }), /* @__PURE__ */ jsx("text", {
108
+ textAnchor: "middle",
109
+ alignmentBaseline: "central",
110
+ dominantBaseline: "middle",
111
+ className: "fill-fd-primary-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",
112
+ children: item._step
113
+ })] }, item.url))]
148
114
  })
149
115
  });
150
116
  }
@@ -223,5 +189,4 @@ function TOCItem({ item, ...props }) {
223
189
  children: [svg, item.title]
224
190
  });
225
191
  }
226
- //#endregion
227
192
  export { TOCEmpty, TOCItem, TOCItems, clerk_exports };
@@ -1,12 +1,10 @@
1
1
  import { ComponentProps } from "react";
2
2
  import * as Primitive from "fumadocs-core/toc";
3
- //#region src/components/toc/default.d.ts
4
3
  export interface TOCItemsProps extends ComponentProps<'div'> {
5
4
  thumbBox?: boolean;
6
5
  }
7
- export declare function TOCItems({ ref, className, thumbBox, children, ...props }: TOCItemsProps): import("react").JSX.Element;
6
+ export declare function TOCItems({ className, thumbBox, children, ...props }: TOCItemsProps): import("react").JSX.Element;
8
7
  export declare function TOCEmpty(): import("react").JSX.Element;
9
8
  export declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
10
9
  item: Primitive.TOCItemType;
11
- }): import("react").JSX.Element;
12
- //#endregion
10
+ }): import("react").JSX.Element;