@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
@@ -3,7 +3,6 @@ import { cn } from "../../utils/cn.js";
3
3
  import { buttonVariants } from "../ui/button.js";
4
4
  import { mergeRefs } from "../../utils/merge-refs.js";
5
5
  import { useRouter } from "fumadocs-core/framework";
6
- import * as JsxRuntime from "react/jsx-runtime";
7
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
7
  import { ChevronRight, CircleAlert, Hash, SearchIcon } from "lucide-react";
9
8
  import { cva } from "class-variance-authority";
@@ -11,9 +10,9 @@ import { Fragment as Fragment$1, createContext, use, useCallback, useEffect, use
11
10
  import { T, useTranslations } from "@fuma-translate/react";
12
11
  import { Dialog } from "@base-ui/react/dialog";
13
12
  import scrollIntoView from "scroll-into-view-if-needed";
13
+ import { toJsx } from "fumadocs-core/utils/hast-to-jsx";
14
14
  import { useHighlightQuery } from "fumadocs-core/search/client";
15
- import { toJsxRuntime } from "hast-util-to-jsx-runtime";
16
- //#region src/components/dialog/search.tsx
15
+ // src/components/dialog/search.tsx
17
16
  const RootContext = createContext(null);
18
17
  const TagsListContext = createContext(null);
19
18
  const mdComponents = {
@@ -64,11 +63,7 @@ const mdComponents = {
64
63
  });
65
64
  }
66
65
  };
67
- const renderOptions = {
68
- development: false,
69
- components: mdComponents,
70
- ...JsxRuntime
71
- };
66
+ const renderOptions = { components: mdComponents };
72
67
  function Children({ children }) {
73
68
  return children;
74
69
  }
@@ -78,25 +73,19 @@ function TableCell(props) {
78
73
  className: "min-w-0 not-last:truncate last:line-clamp-2"
79
74
  });
80
75
  }
81
- const tableRenderOptions = {
82
- ...renderOptions,
83
- components: {
84
- ...mdComponents,
85
- table: Children,
86
- thead: Children,
87
- tbody: Children,
88
- tr: Children,
89
- th: TableCell,
90
- td: TableCell
91
- }
92
- };
93
- const rowRenderOptions = {
94
- ...tableRenderOptions,
95
- components: {
96
- ...tableRenderOptions.components,
97
- thead: () => null
98
- }
99
- };
76
+ const tableRenderOptions = { components: {
77
+ ...mdComponents,
78
+ table: Children,
79
+ thead: Children,
80
+ tbody: Children,
81
+ tr: Children,
82
+ th: TableCell,
83
+ td: TableCell
84
+ } };
85
+ const rowRenderOptions = { components: {
86
+ ...tableRenderOptions.components,
87
+ thead: () => null
88
+ } };
100
89
  function SearchDialog({ open, onOpenChange, search, onSearchChange, isLoading = false, data, error, onSelect: onSelectProp, children, dialogHandle }) {
101
90
  const router = useRouter();
102
91
  const onOpenChangeCallback = useRef(onOpenChange);
@@ -326,7 +315,7 @@ function SearchDialogListTable({ table, Item, onSelect }) {
326
315
  const { query } = useSearch();
327
316
  const highlightRef = useHighlightQuery(query);
328
317
  const headerId = `fd-search-table-${table.id}`;
329
- const header = useMemo(() => table.header && toJsxRuntime(table.header, tableRenderOptions), [table.header]);
318
+ const header = useMemo(() => table.header && toJsx(table.header, tableRenderOptions), [table.header]);
330
319
  return /* @__PURE__ */ jsx("div", {
331
320
  role: table.header ? "group" : void 0,
332
321
  "aria-labelledby": table.header ? headerId : void 0,
@@ -357,8 +346,8 @@ function SearchDialogListItem({ item, table, className, children, renderMarkdown
357
346
  if (item.type === "action") return item.node;
358
347
  if (renderMarkdown && typeof item.content === "string") return renderMarkdown(item.content);
359
348
  if (!("hastContent" in item)) return item.content;
360
- if (!table) return toJsxRuntime(item.hastContent, renderOptions);
361
- return toJsxRuntime(item.hastContent, table.header ? rowRenderOptions : tableRenderOptions);
349
+ if (!table) return toJsx(item.hastContent, renderOptions);
350
+ return toJsx(item.hastContent, table.header ? rowRenderOptions : tableRenderOptions);
362
351
  }, [
363
352
  item,
364
353
  renderMarkdown,
@@ -453,5 +442,4 @@ function useTagsList() {
453
442
  if (!ctx) throw new Error("Missing <TagsList />");
454
443
  return ctx;
455
444
  }
456
- //#endregion
457
445
  export { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogListItem, SearchDialogListTable, SearchDialogOverlay, TagsList, TagsListItem, useSearch, useTagsList };
@@ -1,9 +1,7 @@
1
1
  import { CodeBlockProps } from "./codeblock.js";
2
+ import { Highlighter } from "fumadocs-core/highlight";
2
3
  import { UseShikiOptions } from "fumadocs-core/highlight/shiki/react";
3
4
  import { HighlighterCore } from "shiki";
4
- declare namespace dynamic_codeblock_core_d_exports {
5
- export { DynamicCodeBlock, DynamicCodeblockProps };
6
- }
7
5
  export interface DynamicCodeblockProps {
8
6
  highlighter: HighlighterCore | (() => HighlighterCore | PromiseLike<HighlighterCore>);
9
7
  lang: string;
@@ -23,6 +21,11 @@ export interface DynamicCodeblockProps {
23
21
  options: DistributiveOmit<UseShikiOptions, 'lang'>;
24
22
  }
25
23
  type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
26
- export declare function DynamicCodeBlock({ lang, code, codeblock, options, wrapInSuspense, highlighter }: DynamicCodeblockProps): import("react").JSX.Element;
27
- //#endregion
28
- export { dynamic_codeblock_core_d_exports };
24
+ /**
25
+ * Create a code block that highlights with your own highlighter.
26
+ */
27
+ export declare function createDynamicCodeBlock({ highlighter }: {
28
+ highlighter: Highlighter;
29
+ }): (props: Omit<DynamicCodeblockProps, 'highlighter' | 'options'>) => import("react").JSX.Element;
30
+ export declare function DynamicCodeBlock({ highlighter, options, wrapInSuspense, ...props }: DynamicCodeblockProps): import("react").JSX.Element;
31
+ export {};
@@ -2,9 +2,10 @@
2
2
  import { cn } from "../utils/cn.js";
3
3
  import { CodeBlock, Pre } from "./codeblock.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
- import { createContext, use, useId } from "react";
6
- import { useShikiDynamic } from "fumadocs-core/highlight/shiki/react";
7
- //#region src/components/dynamic-codeblock.core.tsx
5
+ import { Suspense, createContext, use, useMemo, useRef } from "react";
6
+ import { toJsx } from "fumadocs-core/utils/hast-to-jsx";
7
+ import { createShikiHighlighter } from "fumadocs-core/highlight/shiki";
8
+ // src/components/dynamic-codeblock.core.tsx
8
9
  const PropsContext = createContext(void 0);
9
10
  function DefaultPre(props) {
10
11
  const extraProps = use(PropsContext);
@@ -15,31 +16,68 @@ function DefaultPre(props) {
15
16
  children: /* @__PURE__ */ jsx(Pre, { children: props.children })
16
17
  });
17
18
  }
18
- function DynamicCodeBlock({ lang, code, codeblock, options, wrapInSuspense = true, highlighter }) {
19
- const id = useId();
20
- const shikiOptions = {
21
- lang,
19
+ /**
20
+ * Create a code block that highlights with your own highlighter.
21
+ */
22
+ function createDynamicCodeBlock({ highlighter }) {
23
+ return function DynamicCodeBlock(props) {
24
+ return /* @__PURE__ */ jsx(Base, {
25
+ highlighter,
26
+ components: { pre: DefaultPre },
27
+ ...props
28
+ });
29
+ };
30
+ }
31
+ function DynamicCodeBlock({ highlighter, options, wrapInSuspense = true, ...props }) {
32
+ const initial = useRef({
33
+ highlighter,
34
+ options
35
+ });
36
+ const instance = useMemo(() => createShikiHighlighter(initial.current.highlighter, {
22
37
  defaultColor: false,
23
- ...options,
38
+ ...initial.current.options
39
+ }), []);
40
+ const node = /* @__PURE__ */ jsx(Base, {
41
+ highlighter: instance,
24
42
  components: {
25
43
  pre: DefaultPre,
26
44
  ...options?.components
27
- }
28
- };
29
- let node = useShikiDynamic(highlighter, code, shikiOptions, [
30
- id,
45
+ },
46
+ wrapInSuspense,
47
+ ...props
48
+ });
49
+ return wrapInSuspense ? node : /* @__PURE__ */ jsx(Suspense, { children: node });
50
+ }
51
+ function Base({ highlighter, lang, code, codeblock, wrapInSuspense = true, components }) {
52
+ let node = /* @__PURE__ */ jsx(Highlighted, {
53
+ highlighter,
31
54
  lang,
32
- code
33
- ]);
34
- if (wrapInSuspense) node ??= /* @__PURE__ */ jsx(Placeholder, {
35
55
  code,
36
- components: shikiOptions.components
56
+ components
57
+ });
58
+ if (wrapInSuspense && highlighter.loadLanguage) node = /* @__PURE__ */ jsx(Suspense, {
59
+ fallback: /* @__PURE__ */ jsx(Placeholder, {
60
+ code,
61
+ components
62
+ }),
63
+ children: node
37
64
  });
38
65
  return /* @__PURE__ */ jsx(PropsContext, {
39
66
  value: codeblock,
40
67
  children: node
41
68
  });
42
69
  }
70
+ const languages = /* @__PURE__ */ new WeakMap();
71
+ function Highlighted({ highlighter, lang, code, components }) {
72
+ if (highlighter.loadLanguage) {
73
+ let loading = languages.get(highlighter);
74
+ if (!loading) languages.set(highlighter, loading = /* @__PURE__ */ new Map());
75
+ let promise = loading.get(lang);
76
+ if (!promise) loading.set(lang, promise = highlighter.loadLanguage(lang));
77
+ use(promise);
78
+ }
79
+ return toJsx(highlighter.codeToHast(code, { lang }), { components });
80
+ }
43
81
  function Placeholder({ code, components = {} }) {
44
82
  const { pre: Pre = "pre", code: Code = "code" } = components;
45
83
  return /* @__PURE__ */ jsx(Pre, { children: /* @__PURE__ */ jsx(Code, { children: code.split("\n").map((line, i) => /* @__PURE__ */ jsx("span", {
@@ -47,5 +85,4 @@ function Placeholder({ code, components = {} }) {
47
85
  children: line
48
86
  }, i)) }) });
49
87
  }
50
- //#endregion
51
- export { DynamicCodeBlock };
88
+ export { DynamicCodeBlock, createDynamicCodeBlock };
@@ -1,7 +1,5 @@
1
- import { DynamicCodeblockProps as DynamicCodeblockProps$1, dynamic_codeblock_core_d_exports } from "./dynamic-codeblock.core.js";
2
- //#region src/components/dynamic-codeblock.d.ts
1
+ import { DynamicCodeblockProps as DynamicCodeblockProps$1 } from "./dynamic-codeblock.core.js";
3
2
  export type DynamicCodeblockProps = Omit<DynamicCodeblockProps$1, 'highlighter' | 'options'> & {
4
3
  options?: DynamicCodeblockProps$1['options'];
5
4
  };
6
- export declare function DynamicCodeBlock(props: DynamicCodeblockProps): import("react").JSX.Element;
7
- //#endregion
5
+ export declare function DynamicCodeBlock(props: DynamicCodeblockProps): import("react").JSX.Element;
@@ -2,7 +2,7 @@
2
2
  import { DynamicCodeBlock as DynamicCodeBlock$1 } from "./dynamic-codeblock.core.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { defaultShikiFactory } from "fumadocs-core/highlight/shiki/full";
5
- //#region src/components/dynamic-codeblock.tsx
5
+ // src/components/dynamic-codeblock.tsx
6
6
  function DynamicCodeBlock(props) {
7
7
  return /* @__PURE__ */ jsx(DynamicCodeBlock$1, {
8
8
  highlighter: () => defaultShikiFactory.getOrInit(),
@@ -13,5 +13,4 @@ function DynamicCodeBlock(props) {
13
13
  ...props
14
14
  });
15
15
  }
16
- //#endregion
17
16
  export { DynamicCodeBlock };
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
- //#region src/components/files.d.ts
3
2
  export declare function Files({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.ReactElement;
4
3
  export interface FileProps extends HTMLAttributes<HTMLDivElement> {
5
4
  name: string;
@@ -16,5 +15,4 @@ export interface FolderProps extends HTMLAttributes<HTMLDivElement> {
16
15
  defaultOpen?: boolean;
17
16
  }
18
17
  export declare function File({ name, icon, className, ...rest }: FileProps): React.ReactElement;
19
- export declare function Folder({ name, defaultOpen, ...props }: FolderProps): React.ReactElement;
20
- //#endregion
18
+ export declare function Folder({ name, defaultOpen, ...props }: FolderProps): React.ReactElement;
@@ -5,7 +5,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { FileIcon, FolderIcon, FolderOpen } from "lucide-react";
6
6
  import { cva } from "class-variance-authority";
7
7
  import { useState } from "react";
8
- //#region src/components/files.tsx
8
+ // src/components/files.tsx
9
9
  const itemVariants = cva("flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4");
10
10
  function Files({ className, ...props }) {
11
11
  return /* @__PURE__ */ jsx("div", {
@@ -36,5 +36,4 @@ function Folder({ name, defaultOpen = false, ...props }) {
36
36
  }) })]
37
37
  });
38
38
  }
39
- //#endregion
40
39
  export { File, Files, Folder };
@@ -1,5 +1,4 @@
1
1
  import { ComponentProps } from "react";
2
- //#region src/components/github-info.d.ts
3
2
  export interface FetchRepositoryInfoOptions {
4
3
  owner: string;
5
4
  repo: string;
@@ -15,5 +14,4 @@ export interface GithubInfoProps extends ComponentProps<'a'>, FetchRepositoryInf
15
14
  locale?: Intl.LocalesArgument;
16
15
  }
17
16
  export declare function fetchRepositoryInfo({ owner, repo, token, baseUrl, fetchOptions }: FetchRepositoryInfoOptions): Promise<RepositoryInfo>;
18
- export declare function GithubInfo({ repo, owner, token, baseUrl, fetchOptions, locale, ...props }: GithubInfoProps): import("react").JSX.Element;
19
- //#endregion
17
+ export declare function GithubInfo({ repo, owner, token, baseUrl, fetchOptions, locale, ...props }: GithubInfoProps): import("react").JSX.Element;
@@ -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,8 +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
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 };
@@ -1,8 +1,7 @@
1
- import { UncontrolledProps } from "../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.js";
2
- import "../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/index.js";
1
+ import { UncontrolledProps } from "../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";
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;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../utils/cn.js";
3
3
  import { buttonVariants } from "./ui/button.js";
4
- import { Uncontrolled } from "../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.js";
4
+ import { Uncontrolled } from "../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";
5
5
  import "./image-zoom2.css";
6
6
  import { Image } from "fumadocs-core/framework";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -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,
@@ -300,5 +300,4 @@ function useAutoScroll(active, ref) {
300
300
  ref
301
301
  ]);
302
302
  }
303
- //#endregion
304
303
  export { SidebarCollapseTrigger, SidebarContent, SidebarDrawerContent, SidebarDrawerOverlay, SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, SidebarProvider, SidebarSeparator, SidebarTrigger, SidebarViewport, base_exports, useAutoScroll, useFolder, useFolderDepth, useSidebar };
@@ -1,11 +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
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,4 +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
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
- import { Tabs as Tabs$1, TabsContent as TabsContent$1, TabsList as TabsList$1, TabsTrigger as TabsTrigger$1, tabs_d_exports } from "./ui/tabs.js";
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,13 +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
- declare namespace block_d_exports {
5
- export { TOCEmpty, TOCItem, TOCItems, TOCItemsProps };
6
- }
7
4
  export type TOCItemsProps = ComponentProps<'div'>;
8
- 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;
9
6
  export declare function TOCItem({ item, ...props }: Primitive.TOCItemProps & {
10
7
  item: Primitive.TOCItemType;
11
8
  }): import("react").JSX.Element;
12
- //#endregion
13
- export { TOCEmpty, block_d_exports };
9
+ export { TOCEmpty };