@fumadocs/base-ui 16.17.7 → 16.17.9

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 (251) 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/dist/.translations/index.d.ts +1 -3
  6. package/dist/.translations/keys.js +1 -2
  7. package/dist/_virtual/_rolldown/runtime.js +1 -2
  8. package/dist/components/accordion.d.ts +1 -3
  9. package/dist/components/accordion.js +1 -2
  10. package/dist/components/banner.d.ts +1 -2
  11. package/dist/components/banner.js +1 -2
  12. package/dist/components/callout.d.ts +1 -3
  13. package/dist/components/callout.js +1 -2
  14. package/dist/components/card.d.ts +1 -3
  15. package/dist/components/card.js +1 -2
  16. package/dist/components/codeblock.d.ts +1 -3
  17. package/dist/components/codeblock.js +1 -2
  18. package/dist/components/codeblock.rsc.d.ts +7 -3
  19. package/dist/components/codeblock.rsc.js +21 -9
  20. package/dist/components/dialog/search-algolia.d.ts +1 -3
  21. package/dist/components/dialog/search-algolia.js +1 -2
  22. package/dist/components/dialog/search-default.d.ts +1 -3
  23. package/dist/components/dialog/search-default.js +1 -2
  24. package/dist/components/dialog/search-orama.d.ts +1 -3
  25. package/dist/components/dialog/search-orama.js +1 -2
  26. package/dist/components/dialog/search.d.ts +13 -16
  27. package/dist/components/dialog/search.js +19 -31
  28. package/dist/components/dynamic-codeblock.core.d.ts +9 -6
  29. package/dist/components/dynamic-codeblock.core.js +55 -18
  30. package/dist/components/dynamic-codeblock.d.ts +2 -4
  31. package/dist/components/dynamic-codeblock.js +1 -2
  32. package/dist/components/files.d.ts +1 -3
  33. package/dist/components/files.js +1 -2
  34. package/dist/components/github-info.d.ts +1 -3
  35. package/dist/components/github-info.js +1 -2
  36. package/dist/components/heading.d.ts +1 -2
  37. package/dist/components/heading.js +1 -2
  38. package/dist/components/image-zoom.d.ts +3 -5
  39. package/dist/components/image-zoom.js +2 -3
  40. package/dist/components/inline-toc.d.ts +1 -3
  41. package/dist/components/inline-toc.js +1 -2
  42. package/dist/components/sidebar/base.d.ts +0 -1
  43. package/dist/components/sidebar/base.js +1 -2
  44. package/dist/components/sidebar/link-item.d.ts +1 -2
  45. package/dist/components/sidebar/link-item.js +1 -2
  46. package/dist/components/sidebar/page-tree.d.ts +1 -2
  47. package/dist/components/sidebar/page-tree.js +1 -2
  48. package/dist/components/sidebar/tabs/dropdown.d.ts +1 -3
  49. package/dist/components/sidebar/tabs/dropdown.js +1 -2
  50. package/dist/components/sidebar/tabs/index.d.ts +1 -3
  51. package/dist/components/sidebar/tabs/index.js +1 -2
  52. package/dist/components/steps.d.ts +1 -3
  53. package/dist/components/steps.js +1 -2
  54. package/dist/components/tabs.d.ts +2 -4
  55. package/dist/components/tabs.js +1 -2
  56. package/dist/components/toc/block.d.ts +2 -6
  57. package/dist/components/toc/block.js +6 -13
  58. package/dist/components/toc/clerk.d.ts +2 -7
  59. package/dist/components/toc/clerk.js +85 -120
  60. package/dist/components/toc/default.d.ts +2 -7
  61. package/dist/components/toc/default.js +112 -149
  62. package/dist/components/toc/index.d.ts +1 -6
  63. package/dist/components/toc/index.js +1 -2
  64. package/dist/components/type-table.d.ts +1 -3
  65. package/dist/components/type-table.js +1 -2
  66. package/dist/components/ui/accordion.d.ts +1 -3
  67. package/dist/components/ui/accordion.js +1 -2
  68. package/dist/components/ui/button.d.ts +1 -3
  69. package/dist/components/ui/button.js +1 -2
  70. package/dist/components/ui/collapsible.d.ts +1 -3
  71. package/dist/components/ui/collapsible.js +1 -2
  72. package/dist/components/ui/popover.d.ts +1 -3
  73. package/dist/components/ui/popover.js +1 -2
  74. package/dist/components/ui/tabs.d.ts +1 -6
  75. package/dist/components/ui/tabs.js +1 -2
  76. package/dist/contexts/i18n.d.ts +1 -2
  77. package/dist/contexts/i18n.js +1 -2
  78. package/dist/contexts/search.d.ts +1 -2
  79. package/dist/contexts/search.js +1 -2
  80. package/dist/contexts/tree.d.ts +1 -2
  81. package/dist/contexts/tree.js +1 -2
  82. package/dist/i18n.d.ts +0 -2
  83. package/dist/i18n.js +1 -2
  84. package/dist/layouts/docs/client.d.ts +1 -2
  85. package/dist/layouts/docs/client.js +1 -2
  86. package/dist/layouts/docs/index.d.ts +0 -2
  87. package/dist/layouts/docs/index.js +1 -2
  88. package/dist/layouts/docs/page/index.d.ts +0 -2
  89. package/dist/layouts/docs/page/index.js +1 -2
  90. package/dist/layouts/docs/page/slots/breadcrumb.d.ts +1 -3
  91. package/dist/layouts/docs/page/slots/breadcrumb.js +1 -2
  92. package/dist/layouts/docs/page/slots/container.d.ts +1 -3
  93. package/dist/layouts/docs/page/slots/container.js +1 -2
  94. package/dist/layouts/docs/page/slots/footer.d.ts +1 -2
  95. package/dist/layouts/docs/page/slots/footer.js +1 -2
  96. package/dist/layouts/docs/page/slots/toc.d.ts +5 -7
  97. package/dist/layouts/docs/page/slots/toc.js +1 -2
  98. package/dist/layouts/docs/slots/container.d.ts +1 -3
  99. package/dist/layouts/docs/slots/container.js +1 -2
  100. package/dist/layouts/docs/slots/header.d.ts +1 -3
  101. package/dist/layouts/docs/slots/header.js +1 -2
  102. package/dist/layouts/docs/slots/sidebar.d.ts +2 -4
  103. package/dist/layouts/docs/slots/sidebar.js +1 -2
  104. package/dist/layouts/flux/index.d.ts +1 -2
  105. package/dist/layouts/flux/index.js +1 -2
  106. package/dist/layouts/flux/page/index.d.ts +0 -2
  107. package/dist/layouts/flux/page/index.js +1 -2
  108. package/dist/layouts/flux/page/slots/breadcrumb.d.ts +1 -3
  109. package/dist/layouts/flux/page/slots/breadcrumb.js +1 -2
  110. package/dist/layouts/flux/page/slots/container.d.ts +1 -3
  111. package/dist/layouts/flux/page/slots/container.js +1 -2
  112. package/dist/layouts/flux/page/slots/footer.d.ts +1 -2
  113. package/dist/layouts/flux/page/slots/footer.js +1 -2
  114. package/dist/layouts/flux/page/slots/toc.d.ts +5 -7
  115. package/dist/layouts/flux/page/slots/toc.js +1 -2
  116. package/dist/layouts/flux/slots/container.d.ts +1 -3
  117. package/dist/layouts/flux/slots/container.js +1 -2
  118. package/dist/layouts/flux/slots/sidebar.d.ts +2 -4
  119. package/dist/layouts/flux/slots/sidebar.js +1 -2
  120. package/dist/layouts/flux/slots/tab-dropdown.d.ts +1 -3
  121. package/dist/layouts/flux/slots/tab-dropdown.js +1 -2
  122. package/dist/layouts/glass/index.d.ts +0 -2
  123. package/dist/layouts/glass/index.js +1 -2
  124. package/dist/layouts/glass/layout-tabs.js +1 -2
  125. package/dist/layouts/glass/page/index.d.ts +0 -2
  126. package/dist/layouts/glass/page/index.js +1 -2
  127. package/dist/layouts/glass/page/slots/breadcrumb.d.ts +1 -3
  128. package/dist/layouts/glass/page/slots/breadcrumb.js +1 -2
  129. package/dist/layouts/glass/page/slots/footer.d.ts +1 -2
  130. package/dist/layouts/glass/page/slots/footer.js +1 -2
  131. package/dist/layouts/glass/page/slots/toc.d.ts +2 -4
  132. package/dist/layouts/glass/page/slots/toc.js +1 -2
  133. package/dist/layouts/glass/slots/header.d.ts +1 -3
  134. package/dist/layouts/glass/slots/header.js +1 -2
  135. package/dist/layouts/glass/slots/sidebar.d.ts +1 -3
  136. package/dist/layouts/glass/slots/sidebar.js +1 -2
  137. package/dist/layouts/home/index.d.ts +1 -2
  138. package/dist/layouts/home/index.js +1 -2
  139. package/dist/layouts/home/navbar.d.ts +1 -3
  140. package/dist/layouts/home/navbar.js +1 -2
  141. package/dist/layouts/home/not-found.d.ts +1 -3
  142. package/dist/layouts/home/not-found.js +1 -2
  143. package/dist/layouts/home/slots/container.d.ts +1 -3
  144. package/dist/layouts/home/slots/container.js +1 -2
  145. package/dist/layouts/home/slots/header.d.ts +1 -3
  146. package/dist/layouts/home/slots/header.js +1 -2
  147. package/dist/layouts/notebook/client.d.ts +1 -2
  148. package/dist/layouts/notebook/client.js +1 -2
  149. package/dist/layouts/notebook/index.d.ts +0 -2
  150. package/dist/layouts/notebook/index.js +1 -2
  151. package/dist/layouts/notebook/page/index.d.ts +0 -2
  152. package/dist/layouts/notebook/page/index.js +1 -2
  153. package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +1 -3
  154. package/dist/layouts/notebook/page/slots/breadcrumb.js +1 -2
  155. package/dist/layouts/notebook/page/slots/container.d.ts +1 -3
  156. package/dist/layouts/notebook/page/slots/container.js +1 -2
  157. package/dist/layouts/notebook/page/slots/footer.d.ts +1 -2
  158. package/dist/layouts/notebook/page/slots/footer.js +1 -2
  159. package/dist/layouts/notebook/page/slots/toc.d.ts +5 -7
  160. package/dist/layouts/notebook/page/slots/toc.js +1 -2
  161. package/dist/layouts/notebook/slots/container.d.ts +1 -3
  162. package/dist/layouts/notebook/slots/container.js +1 -2
  163. package/dist/layouts/notebook/slots/header.d.ts +1 -3
  164. package/dist/layouts/notebook/slots/header.js +1 -2
  165. package/dist/layouts/notebook/slots/sidebar.d.ts +1 -3
  166. package/dist/layouts/notebook/slots/sidebar.js +1 -2
  167. package/dist/layouts/shared/client.d.ts +1 -3
  168. package/dist/layouts/shared/client.js +1 -2
  169. package/dist/layouts/shared/index.d.ts +0 -2
  170. package/dist/layouts/shared/index.js +1 -2
  171. package/dist/layouts/shared/page-actions.d.ts +1 -3
  172. package/dist/layouts/shared/page-actions.js +1 -2
  173. package/dist/layouts/shared/slots/language-select.d.ts +1 -3
  174. package/dist/layouts/shared/slots/language-select.js +1 -2
  175. package/dist/layouts/shared/slots/search-trigger.d.ts +1 -3
  176. package/dist/layouts/shared/slots/search-trigger.js +1 -2
  177. package/dist/layouts/shared/slots/theme-switch.d.ts +1 -3
  178. package/dist/layouts/shared/slots/theme-switch.js +1 -2
  179. package/dist/layouts/spacious/index.d.ts +1 -2
  180. package/dist/layouts/spacious/index.js +1 -2
  181. package/dist/layouts/spacious/page/index.d.ts +0 -2
  182. package/dist/layouts/spacious/page/index.js +1 -2
  183. package/dist/layouts/spacious/page/slots/breadcrumb.d.ts +1 -3
  184. package/dist/layouts/spacious/page/slots/breadcrumb.js +1 -2
  185. package/dist/layouts/spacious/page/slots/footer.d.ts +1 -2
  186. package/dist/layouts/spacious/page/slots/footer.js +1 -2
  187. package/dist/layouts/spacious/page/slots/toc.d.ts +5 -6
  188. package/dist/layouts/spacious/page/slots/toc.js +1 -2
  189. package/dist/layouts/spacious/slots/actions.d.ts +1 -3
  190. package/dist/layouts/spacious/slots/actions.js +1 -2
  191. package/dist/layouts/spacious/slots/header.d.ts +1 -3
  192. package/dist/layouts/spacious/slots/header.js +1 -2
  193. package/dist/layouts/spacious/slots/sidebar.d.ts +2 -4
  194. package/dist/layouts/spacious/slots/sidebar.js +1 -2
  195. package/dist/mdx.d.ts +0 -2
  196. package/dist/mdx.js +1 -2
  197. package/dist/mdx.server.d.ts +0 -2
  198. package/dist/mdx.server.js +1 -2
  199. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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 +1 -2
  200. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  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/uncontrolled.d.ts +3 -0
  202. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  203. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  204. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  205. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  206. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  207. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  208. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  209. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  210. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  211. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  212. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  213. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  214. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  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-target-dimension.js +3 -0
  216. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  217. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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
  218. package/dist/og/takumi.d.ts +1 -3
  219. package/dist/og/takumi.js +1 -2
  220. package/dist/og.d.ts +1 -2
  221. package/dist/og.js +1 -2
  222. package/dist/page.d.ts +0 -2
  223. package/dist/page.js +1 -2
  224. package/dist/provider/astro.d.ts +1 -3
  225. package/dist/provider/astro.js +17 -2
  226. package/dist/provider/base.d.ts +0 -2
  227. package/dist/provider/base.js +1 -2
  228. package/dist/provider/next.d.ts +1 -3
  229. package/dist/provider/next.js +1 -2
  230. package/dist/provider/react-router.d.ts +1 -3
  231. package/dist/provider/react-router.js +1 -2
  232. package/dist/provider/tanstack.d.ts +1 -3
  233. package/dist/provider/tanstack.js +1 -2
  234. package/dist/provider/waku.d.ts +1 -3
  235. package/dist/provider/waku.js +1 -2
  236. package/dist/style.css +3 -6
  237. package/dist/tailwind/typography.js +1 -2
  238. package/dist/utils/cn.js +1 -2
  239. package/dist/utils/hotkey.js +1 -2
  240. package/dist/utils/merge-refs.js +1 -2
  241. package/dist/utils/urls.js +1 -2
  242. package/dist/utils/use-copy-button.d.ts +1 -3
  243. package/dist/utils/use-copy-button.js +1 -2
  244. package/dist/utils/use-footer-items.d.ts +1 -3
  245. package/dist/utils/use-footer-items.js +1 -2
  246. package/dist/utils/use-is-scroll-top.d.ts +1 -3
  247. package/dist/utils/use-is-scroll-top.js +1 -2
  248. package/package.json +11 -12
  249. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +0 -5
  250. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +0 -4
  251. /package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.9_react-dom@19.3.0_react@19.3.0__react@19.3.0 → 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.d.ts +0 -0
@@ -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,13 +1,8 @@
1
1
  import { ComponentProps } from "react";
2
2
  import * as Primitive from "fumadocs-core/toc";
3
- declare namespace clerk_d_exports {
4
- export { TOCEmpty, TOCItem, TOCItems, TOCItemsProps };
5
- }
6
3
  export type TOCItemsProps = ComponentProps<'div'>;
7
- 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;
8
5
  export declare function TOCEmpty(): import("react").JSX.Element;
9
6
  export declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
10
7
  item: Primitive.TOCItemType;
11
- }): import("react").JSX.Element;
12
- //#endregion
13
- export { clerk_d_exports };
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,15 +1,10 @@
1
1
  import { ComponentProps } from "react";
2
2
  import * as Primitive from "fumadocs-core/toc";
3
- declare namespace default_d_exports {
4
- export { TOCEmpty, TOCItem, TOCItems, TOCItemsProps };
5
- }
6
3
  export interface TOCItemsProps extends ComponentProps<'div'> {
7
4
  thumbBox?: boolean;
8
5
  }
9
- 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;
10
7
  export declare function TOCEmpty(): import("react").JSX.Element;
11
8
  export declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
12
9
  item: Primitive.TOCItemType;
13
- }): import("react").JSX.Element;
14
- //#endregion
15
- export { default_d_exports };
10
+ }): import("react").JSX.Element;
@@ -1,119 +1,24 @@
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/default.tsx
9
+ // src/components/toc/default.tsx
11
10
  var default_exports = /* @__PURE__ */ __exportAll({
12
11
  TOCEmpty: () => TOCEmpty,
13
12
  TOCItem: () => TOCItem,
14
13
  TOCItems: () => TOCItems
15
14
  });
16
- function TOCItems({ ref, className, thumbBox = true, children, ...props }) {
17
- const containerRef = useRef(null);
15
+ function TOCItems({ className, thumbBox = true, 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 += ` C ${upperX} ${top - 4} ${x} ${upperBottom + 4} ${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
- const itemLineLengths = [];
81
- if (thumbBox) {
82
- const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
83
- path.setAttribute("d", d);
84
- const n = path.getTotalLength();
85
- for (let i = 0; i < positions.length; i++) {
86
- const [top, bottom] = positions[i];
87
- let l = i > 0 ? itemLineLengths[i - 1][1] + (top - positions[i - 1][1]) : top;
88
- while (l < n && path.getPointAtLength(l).y < top) l++;
89
- itemLineLengths.push([l, l + bottom - top]);
90
- }
91
- }
92
- setSvg({
93
- content: output,
94
- width: w,
95
- height: h,
96
- d,
97
- itemLineLengths,
98
- positions
99
- });
100
- }, [items, thumbBox]);
101
- useEffect(() => {
102
- const container = containerRef.current;
103
- if (!container) return;
104
- const observer = new ResizeObserver(onPrint);
105
- observer.observe(container);
106
- onPrint();
107
- return () => {
108
- observer.unobserve(container);
109
- };
110
- }, [onPrint]);
111
17
  return /* @__PURE__ */ jsxs("div", {
112
- ref: mergeRefs(containerRef, ref),
113
18
  className: cn("relative flex flex-col", className),
114
19
  ...props,
115
- children: [svg && /* @__PURE__ */ jsx(ThumbTrack, {
116
- computed: svg,
20
+ children: [items.length > 0 && /* @__PURE__ */ jsx(ThumbTrack, {
21
+ items,
117
22
  thumbBox
118
23
  }), children]
119
24
  });
@@ -125,60 +30,119 @@ function TOCEmpty() {
125
30
  children: t("No Headings")
126
31
  });
127
32
  }
128
- function ThumbTrack({ computed, thumbBox }) {
129
- const ref = useRef(null);
130
- const previousRef = useRef(null);
131
- const tocInfo = Primitive.useTOC();
132
- function calculate(items) {
133
- const out = {};
134
- const startIdx = items.findIndex((item) => item.active);
135
- if (startIdx === -1) return out;
136
- const endIdx = items.findLastIndex((item) => item.active);
137
- out["--track-top"] = `${computed.positions[startIdx][0]}px`;
138
- out["--track-bottom"] = `${computed.positions[endIdx][1]}px`;
139
- if (thumbBox) {
140
- let isUp = false;
141
- if (previousRef.current) {
142
- const prev = previousRef.current;
143
- isUp = prev.startIdx > startIdx || prev.endIdx > endIdx || prev.startIdx === startIdx && prev.endIdx === endIdx && prev.isUp;
33
+ function ThumbTrack({ items, thumbBox }) {
34
+ const toc = Primitive.useTOC();
35
+ const ref = useCallback((track) => {
36
+ const container = track.parentElement;
37
+ const svg = track.querySelector("svg");
38
+ const path = svg.querySelector("path");
39
+ const steps = svg.getElementsByTagName("g");
40
+ const thumb = thumbBox ? track.querySelector("div") : null;
41
+ const segment = document.createElementNS("http://www.w3.org/2000/svg", "path");
42
+ const positions = /* @__PURE__ */ new Map();
43
+ let previous;
44
+ const update = (infos) => {
45
+ let start = -1;
46
+ let end = -1;
47
+ for (let i = 0; i < infos.length; i++) {
48
+ if (!infos[i].active || !positions.has(infos[i].original.url)) continue;
49
+ if (start === -1) start = i;
50
+ end = i;
144
51
  }
145
- previousRef.current = {
146
- startIdx,
147
- endIdx,
52
+ if (start === -1) return;
53
+ const first = positions.get(infos[start].original.url);
54
+ const last = positions.get(infos[end].original.url);
55
+ svg.style.clipPath = `polygon(0 ${first.top}px, 100% ${first.top}px, 100% ${last.bottom}px, 0 ${last.bottom}px)`;
56
+ if (!thumb) return;
57
+ const isUp = previous !== void 0 && (previous.start > start || previous.end > end || previous.start === start && previous.end === end && previous.isUp);
58
+ previous = {
59
+ start,
60
+ end,
148
61
  isUp
149
62
  };
150
- out["--offset-distance"] = isUp ? `${computed.itemLineLengths[startIdx][0]}px` : `${computed.itemLineLengths[endIdx][1]}px`;
151
- out["--opacity"] = items[isUp ? startIdx : endIdx].original._step !== void 0 ? "0" : "1";
152
- }
153
- return out;
154
- }
155
- Primitive.useTOCListener((items) => {
156
- const element = ref.current;
157
- if (!element) return;
158
- for (const [k, v] of Object.entries(calculate(items))) element.style.setProperty(k, v);
159
- });
63
+ thumb.style.offsetDistance = `${isUp ? first.offset : last.offset + last.bottom - last.top}px`;
64
+ thumb.style.opacity = infos[isUp ? start : end].original._step === void 0 ? "1" : "0";
65
+ };
66
+ const observer = new ResizeObserver(() => {
67
+ if (container.clientHeight === 0) return;
68
+ const anchors = /* @__PURE__ */ new Map();
69
+ for (const anchor of container.getElementsByTagName("a")) anchors.set(anchor.getAttribute("href"), anchor);
70
+ let d = "";
71
+ let width = 0;
72
+ let height = 0;
73
+ let length = 0;
74
+ let last;
75
+ positions.clear();
76
+ for (const item of items) {
77
+ const anchor = anchors.get(item.url);
78
+ if (!anchor) continue;
79
+ const styles = getComputedStyle(anchor);
80
+ const x = getLineOffset(item.depth) + .5;
81
+ const top = anchor.offsetTop + parseFloat(styles.paddingTop);
82
+ const bottom = anchor.offsetTop + anchor.clientHeight - parseFloat(styles.paddingBottom);
83
+ if (last) {
84
+ const curve = `C ${last.x} ${top - 4} ${x} ${last.bottom + 4} ${x} ${top}`;
85
+ d += ` ${curve} L${x} ${bottom}`;
86
+ if (thumb) {
87
+ segment.setAttribute("d", `M${last.x} ${last.bottom} ${curve}`);
88
+ length += segment.getTotalLength();
89
+ }
90
+ } else d += `M${x} ${top} L${x} ${bottom}`;
91
+ last = {
92
+ x,
93
+ top,
94
+ bottom,
95
+ offset: length
96
+ };
97
+ positions.set(item.url, last);
98
+ length += bottom - top;
99
+ width = Math.max(width, x + 8);
100
+ height = Math.max(height, bottom);
101
+ }
102
+ let step = 0;
103
+ for (const item of items) {
104
+ if (item._step === void 0) continue;
105
+ const position = positions.get(item.url);
106
+ const g = steps[step++];
107
+ if (position) g.setAttribute("transform", `translate(${position.x}, ${(position.top + position.bottom) / 2})`);
108
+ }
109
+ path.setAttribute("d", d);
110
+ track.style.width = `${width}px`;
111
+ track.style.height = `${height}px`;
112
+ if (thumb) thumb.style.offsetPath = `path("${d}")`;
113
+ update(toc.get());
114
+ });
115
+ observer.observe(container);
116
+ toc.listen(update);
117
+ return () => {
118
+ observer.disconnect();
119
+ toc.unlisten(update);
120
+ };
121
+ }, [
122
+ items,
123
+ thumbBox,
124
+ toc
125
+ ]);
160
126
  return /* @__PURE__ */ jsxs("div", {
161
127
  ref,
162
128
  className: "absolute top-0 inset-s-0 origin-center rtl:-scale-x-100",
163
- style: {
164
- width: computed.width,
165
- height: computed.height,
166
- ...calculate(tocInfo.get())
167
- },
168
- children: [/* @__PURE__ */ jsx("svg", {
169
- xmlns: "http://www.w3.org/2000/svg",
170
- viewBox: `0 0 ${computed.width} ${computed.height}`,
171
- className: "absolute transition-[clip-path]",
172
- style: {
173
- width: computed.width,
174
- height: computed.height,
175
- clipPath: `polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))`
176
- },
177
- children: computed.content
178
- }), thumbBox && /* @__PURE__ */ jsx("div", {
179
- className: "absolute left-0 size-1 bg-fd-primary rounded-full [offset-distance:var(--offset-distance,0)] opacity-(--opacity,0) transition-[opacity,offset-distance]",
180
- style: { offsetPath: `path("${computed.d}")` }
181
- })]
129
+ children: [/* @__PURE__ */ jsxs("svg", {
130
+ className: "absolute size-full [clip-path:polygon(0_0,100%_0,100%_0,0_0)] transition-[clip-path]",
131
+ children: [/* @__PURE__ */ jsx("path", {
132
+ className: "stroke-fd-primary",
133
+ strokeWidth: "1",
134
+ fill: "none"
135
+ }), items.map((item) => item._step !== void 0 && /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("circle", {
136
+ r: "8",
137
+ className: "fill-fd-primary"
138
+ }), /* @__PURE__ */ jsx("text", {
139
+ textAnchor: "middle",
140
+ alignmentBaseline: "central",
141
+ dominantBaseline: "middle",
142
+ className: "fill-fd-primary-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",
143
+ children: item._step
144
+ })] }, item.url))]
145
+ }), thumbBox && /* @__PURE__ */ jsx("div", { className: "absolute left-0 size-1 bg-fd-primary rounded-full opacity-0 transition-[opacity,offset-distance]" })]
182
146
  });
183
147
  }
184
148
  const BASE = 8;
@@ -256,5 +220,4 @@ function TOCItem({ item, ...props }) {
256
220
  children: [svg, item.title]
257
221
  });
258
222
  }
259
- //#endregion
260
223
  export { TOCEmpty, TOCItem, TOCItems, default_exports };
@@ -1,12 +1,7 @@
1
1
  import { ComponentProps } from "react";
2
2
  import * as Primitive from "fumadocs-core/toc";
3
- declare namespace index_d_exports {
4
- export { TOCProvider, TOCProviderProps, TOCScrollArea, useActiveAnchor, useActiveAnchors, useItems, useTOCItems };
5
- }
6
3
  export declare function useTOCItems(): Primitive.TOCItemType[];
7
4
  export type TOCProviderProps = Primitive.AnchorProviderProps;
8
5
  export declare const useActiveAnchor: typeof Primitive.useActiveAnchor, useActiveAnchors: typeof Primitive.useActiveAnchors, useItems: typeof Primitive.useItems;
9
6
  export declare function TOCProvider({ toc, children, ...props }: TOCProviderProps): import("react").JSX.Element;
10
- export declare function TOCScrollArea({ ref, className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
11
- //#endregion
12
- export { index_d_exports };
7
+ export declare function TOCScrollArea({ ref, className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
@@ -5,7 +5,7 @@ import { mergeRefs } from "../../utils/merge-refs.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { createContext, use, useRef } from "react";
7
7
  import * as Primitive from "fumadocs-core/toc";
8
- //#region src/components/toc/index.tsx
8
+ // src/components/toc/index.tsx
9
9
  var toc_exports = /* @__PURE__ */ __exportAll({
10
10
  TOCProvider: () => TOCProvider,
11
11
  TOCScrollArea: () => TOCScrollArea,
@@ -41,5 +41,4 @@ function TOCScrollArea({ ref, className, ...props }) {
41
41
  })
42
42
  });
43
43
  }
44
- //#endregion
45
44
  export { TOCProvider, TOCScrollArea, toc_exports, useActiveAnchor, useActiveAnchors, useItems, useTOCItems };
@@ -1,5 +1,4 @@
1
1
  import { ComponentProps, ReactNode } from "react";
2
- //#region src/components/type-table.d.ts
3
2
  export interface ParameterNode {
4
3
  name: string;
5
4
  description: ReactNode;
@@ -32,5 +31,4 @@ export interface TypeNode {
32
31
  }
33
32
  export declare function TypeTable({ id, type, className, ...props }: {
34
33
  type: Record<string, TypeNode>;
35
- } & ComponentProps<'div'>): import("react").JSX.Element;
36
- //#endregion
34
+ } & ComponentProps<'div'>): import("react").JSX.Element;