fumadocs-core 16.4.1 → 16.4.3

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 (284) hide show
  1. package/dist/advanced-DSlc7qa9.js +80 -0
  2. package/dist/advanced-DSlc7qa9.js.map +1 -0
  3. package/dist/algolia-BGWM-DkQ.js +49 -0
  4. package/dist/algolia-BGWM-DkQ.js.map +1 -0
  5. package/dist/algolia-FqjcaTcD.d.ts +68 -0
  6. package/dist/algolia-FqjcaTcD.d.ts.map +1 -0
  7. package/dist/breadcrumb.d.ts +29 -27
  8. package/dist/breadcrumb.d.ts.map +1 -0
  9. package/dist/breadcrumb.js +55 -72
  10. package/dist/breadcrumb.js.map +1 -0
  11. package/dist/chunk-C1JLJEPO.js +42 -0
  12. package/dist/codeblock-utils-Dh1w8ICD.d.ts +37 -0
  13. package/dist/codeblock-utils-Dh1w8ICD.d.ts.map +1 -0
  14. package/dist/content/github.d.ts +43 -32
  15. package/dist/content/github.d.ts.map +1 -0
  16. package/dist/content/github.js +29 -43
  17. package/dist/content/github.js.map +1 -0
  18. package/dist/content/index.d.ts +20 -13
  19. package/dist/content/index.d.ts.map +1 -0
  20. package/dist/content/index.js +17 -23
  21. package/dist/content/index.js.map +1 -0
  22. package/dist/content/mdx/preset-bundler.d.ts +22 -24
  23. package/dist/content/mdx/preset-bundler.d.ts.map +1 -0
  24. package/dist/content/mdx/preset-bundler.js +38 -69
  25. package/dist/content/mdx/preset-bundler.js.map +1 -0
  26. package/dist/content/mdx/preset-runtime.d.ts +22 -24
  27. package/dist/content/mdx/preset-runtime.d.ts.map +1 -0
  28. package/dist/content/mdx/preset-runtime.js +36 -68
  29. package/dist/content/mdx/preset-runtime.js.map +1 -0
  30. package/dist/content/toc.d.ts +7 -6
  31. package/dist/content/toc.d.ts.map +1 -0
  32. package/dist/content/toc.js +15 -19
  33. package/dist/content/toc.js.map +1 -0
  34. package/dist/definitions-DJAPG-2U.d.ts +62 -0
  35. package/dist/definitions-DJAPG-2U.d.ts.map +1 -0
  36. package/dist/dynamic-link.d.ts +7 -5
  37. package/dist/dynamic-link.d.ts.map +1 -0
  38. package/dist/dynamic-link.js +29 -27
  39. package/dist/dynamic-link.js.map +1 -0
  40. package/dist/fetch-B1nmMSyw.js +20 -0
  41. package/dist/fetch-B1nmMSyw.js.map +1 -0
  42. package/dist/framework/index.d.ts +38 -29
  43. package/dist/framework/index.d.ts.map +1 -0
  44. package/dist/framework/index.js +68 -17
  45. package/dist/framework/index.js.map +1 -0
  46. package/dist/framework/next.d.ts +15 -10
  47. package/dist/framework/next.d.ts.map +1 -0
  48. package/dist/framework/next.js +18 -26
  49. package/dist/framework/next.js.map +1 -0
  50. package/dist/framework/react-router.d.ts +15 -10
  51. package/dist/framework/react-router.d.ts.map +1 -0
  52. package/dist/framework/react-router.js +42 -55
  53. package/dist/framework/react-router.js.map +1 -0
  54. package/dist/framework/tanstack.d.ts +15 -10
  55. package/dist/framework/tanstack.d.ts.map +1 -0
  56. package/dist/framework/tanstack.js +54 -69
  57. package/dist/framework/tanstack.js.map +1 -0
  58. package/dist/framework/waku.d.ts +15 -10
  59. package/dist/framework/waku.d.ts.map +1 -0
  60. package/dist/framework/waku.js +47 -58
  61. package/dist/framework/waku.js.map +1 -0
  62. package/dist/highlight/client.d.ts +6 -7
  63. package/dist/highlight/client.d.ts.map +1 -0
  64. package/dist/highlight/client.js +22 -14
  65. package/dist/highlight/client.js.map +1 -0
  66. package/dist/highlight/index.d.ts +2 -30
  67. package/dist/highlight/index.js +3 -13
  68. package/dist/i18n/index.d.ts +2 -39
  69. package/dist/i18n/index.js +6 -7
  70. package/dist/i18n/index.js.map +1 -0
  71. package/dist/i18n/middleware.d.ts +36 -28
  72. package/dist/i18n/middleware.d.ts.map +1 -0
  73. package/dist/i18n/middleware.js +55 -73
  74. package/dist/i18n/middleware.js.map +1 -0
  75. package/dist/icon-5lVe3l-0.js +19 -0
  76. package/dist/icon-5lVe3l-0.js.map +1 -0
  77. package/dist/index-BhVrX5J1.d.ts +41 -0
  78. package/dist/index-BhVrX5J1.d.ts.map +1 -0
  79. package/dist/index-Co_C8NEi.d.ts +380 -0
  80. package/dist/index-Co_C8NEi.d.ts.map +1 -0
  81. package/dist/link.d.ts +17 -15
  82. package/dist/link.d.ts.map +1 -0
  83. package/dist/link.js +29 -9
  84. package/dist/link.js.map +1 -0
  85. package/dist/mdast-utils-ix4DsXJP.js +40 -0
  86. package/dist/mdast-utils-ix4DsXJP.js.map +1 -0
  87. package/dist/mdx-plugins/codeblock-utils.d.ts +2 -29
  88. package/dist/mdx-plugins/codeblock-utils.js +71 -9
  89. package/dist/mdx-plugins/codeblock-utils.js.map +1 -0
  90. package/dist/mdx-plugins/index.d.ts +15 -20
  91. package/dist/mdx-plugins/index.js +18 -73
  92. package/dist/mdx-plugins/rehype-code.d.ts +2 -55
  93. package/dist/mdx-plugins/rehype-code.js +5 -15
  94. package/dist/mdx-plugins/rehype-toc.d.ts +2 -14
  95. package/dist/mdx-plugins/rehype-toc.js +3 -7
  96. package/dist/mdx-plugins/remark-admonition.d.ts +2 -20
  97. package/dist/mdx-plugins/remark-admonition.js +74 -8
  98. package/dist/mdx-plugins/remark-admonition.js.map +1 -0
  99. package/dist/mdx-plugins/remark-code-tab.d.ts +2 -30
  100. package/dist/mdx-plugins/remark-code-tab.js +183 -7
  101. package/dist/mdx-plugins/remark-code-tab.js.map +1 -0
  102. package/dist/mdx-plugins/remark-directive-admonition.d.ts +2 -27
  103. package/dist/mdx-plugins/remark-directive-admonition.js +60 -7
  104. package/dist/mdx-plugins/remark-directive-admonition.js.map +1 -0
  105. package/dist/mdx-plugins/remark-gfm.d.ts +2 -1
  106. package/dist/mdx-plugins/remark-gfm.js +3 -7
  107. package/dist/mdx-plugins/remark-heading.d.ts +2 -31
  108. package/dist/mdx-plugins/remark-heading.js +45 -8
  109. package/dist/mdx-plugins/remark-heading.js.map +1 -0
  110. package/dist/mdx-plugins/remark-image.d.ts +2 -57
  111. package/dist/mdx-plugins/remark-image.js +192 -7
  112. package/dist/mdx-plugins/remark-image.js.map +1 -0
  113. package/dist/mdx-plugins/remark-mdx-files.d.ts +2 -40
  114. package/dist/mdx-plugins/remark-mdx-files.js +187 -7
  115. package/dist/mdx-plugins/remark-mdx-files.js.map +1 -0
  116. package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +2 -15
  117. package/dist/mdx-plugins/remark-mdx-mermaid.js +31 -7
  118. package/dist/mdx-plugins/remark-mdx-mermaid.js.map +1 -0
  119. package/dist/mdx-plugins/remark-npm.d.ts +2 -31
  120. package/dist/mdx-plugins/remark-npm.js +68 -8
  121. package/dist/mdx-plugins/remark-npm.js.map +1 -0
  122. package/dist/mdx-plugins/remark-steps.d.ts +2 -23
  123. package/dist/mdx-plugins/remark-steps.js +77 -7
  124. package/dist/mdx-plugins/remark-steps.js.map +1 -0
  125. package/dist/mdx-plugins/remark-structure.d.ts +2 -71
  126. package/dist/mdx-plugins/remark-structure.js +105 -11
  127. package/dist/mdx-plugins/remark-structure.js.map +1 -0
  128. package/dist/mixedbread-DSiQfUnN.js +88 -0
  129. package/dist/mixedbread-DSiQfUnN.js.map +1 -0
  130. package/dist/negotiation/index.d.ts +6 -4
  131. package/dist/negotiation/index.d.ts.map +1 -0
  132. package/dist/negotiation/index.js +41 -11
  133. package/dist/negotiation/index.js.map +1 -0
  134. package/dist/normalize-url-3WQZ_H_j.js +16 -0
  135. package/dist/normalize-url-3WQZ_H_j.js.map +1 -0
  136. package/dist/orama-cloud-BMDBfk05.js +84 -0
  137. package/dist/orama-cloud-BMDBfk05.js.map +1 -0
  138. package/dist/orama-cloud-legacy-CRZzZXWn.js +82 -0
  139. package/dist/orama-cloud-legacy-CRZzZXWn.js.map +1 -0
  140. package/dist/page-tree/index.d.ts +23 -11
  141. package/dist/page-tree/index.d.ts.map +1 -0
  142. package/dist/page-tree/index.js +3 -17
  143. package/dist/path-D6M0ZQvO.js +60 -0
  144. package/dist/path-D6M0ZQvO.js.map +1 -0
  145. package/dist/rehype-code-Bd52chOe.d.ts +58 -0
  146. package/dist/rehype-code-Bd52chOe.d.ts.map +1 -0
  147. package/dist/rehype-code-Dr35mETC.js +241 -0
  148. package/dist/rehype-code-Dr35mETC.js.map +1 -0
  149. package/dist/rehype-toc-BJVsblvp.d.ts +18 -0
  150. package/dist/rehype-toc-BJVsblvp.d.ts.map +1 -0
  151. package/dist/rehype-toc-Dqgey2tW.js +143 -0
  152. package/dist/rehype-toc-Dqgey2tW.js.map +1 -0
  153. package/dist/remark-admonition-Chku_iWO.d.ts +22 -0
  154. package/dist/remark-admonition-Chku_iWO.d.ts.map +1 -0
  155. package/dist/remark-code-tab-C0f6BPcw.d.ts +32 -0
  156. package/dist/remark-code-tab-C0f6BPcw.d.ts.map +1 -0
  157. package/dist/remark-directive-admonition-CBwJdh9z.d.ts +36 -0
  158. package/dist/remark-directive-admonition-CBwJdh9z.d.ts.map +1 -0
  159. package/dist/remark-gfm-B2aZXutO.d.ts +2 -0
  160. package/dist/remark-heading-CUAe4zIu.d.ts +37 -0
  161. package/dist/remark-heading-CUAe4zIu.d.ts.map +1 -0
  162. package/dist/remark-image-DMRnxsRO.d.ts +65 -0
  163. package/dist/remark-image-DMRnxsRO.d.ts.map +1 -0
  164. package/dist/remark-mdx-files-B5KMXnfh.d.ts +56 -0
  165. package/dist/remark-mdx-files-B5KMXnfh.d.ts.map +1 -0
  166. package/dist/remark-mdx-mermaid-C_4W5gfj.d.ts +17 -0
  167. package/dist/remark-mdx-mermaid-C_4W5gfj.d.ts.map +1 -0
  168. package/dist/remark-npm-CykFgJn2.d.ts +36 -0
  169. package/dist/remark-npm-CykFgJn2.d.ts.map +1 -0
  170. package/dist/remark-steps-5-DmLVv3.d.ts +28 -0
  171. package/dist/remark-steps-5-DmLVv3.d.ts.map +1 -0
  172. package/dist/remark-structure-CszwnaMR.d.ts +77 -0
  173. package/dist/remark-structure-CszwnaMR.d.ts.map +1 -0
  174. package/dist/remove-undefined-B7zJF-YS.js +19 -0
  175. package/dist/remove-undefined-B7zJF-YS.js.map +1 -0
  176. package/dist/search/algolia.d.ts +3 -69
  177. package/dist/search/algolia.js +69 -63
  178. package/dist/search/algolia.js.map +1 -0
  179. package/dist/search/client.d.ts +143 -114
  180. package/dist/search/client.d.ts.map +1 -0
  181. package/dist/search/client.js +98 -91
  182. package/dist/search/client.js.map +1 -0
  183. package/dist/search/index.d.ts +20 -18
  184. package/dist/search/index.d.ts.map +1 -0
  185. package/dist/search/index.js +3 -7
  186. package/dist/search/orama-cloud-legacy.d.ts +81 -0
  187. package/dist/search/orama-cloud-legacy.d.ts.map +1 -0
  188. package/dist/search/orama-cloud-legacy.js +50 -0
  189. package/dist/search/orama-cloud-legacy.js.map +1 -0
  190. package/dist/search/orama-cloud.d.ts +72 -70
  191. package/dist/search/orama-cloud.d.ts.map +1 -0
  192. package/dist/search/orama-cloud.js +46 -54
  193. package/dist/search/orama-cloud.js.map +1 -0
  194. package/dist/search/server.d.ts +6 -136
  195. package/dist/search/server.js +292 -369
  196. package/dist/search/server.js.map +1 -0
  197. package/dist/search-DcH54N2x.js +44 -0
  198. package/dist/search-DcH54N2x.js.map +1 -0
  199. package/dist/server-BzFuYBxW.d.ts +133 -0
  200. package/dist/server-BzFuYBxW.d.ts.map +1 -0
  201. package/dist/shiki-Bdk0JGsB.d.ts +33 -0
  202. package/dist/shiki-Bdk0JGsB.d.ts.map +1 -0
  203. package/dist/shiki-DoHr6fEj.js +80 -0
  204. package/dist/shiki-DoHr6fEj.js.map +1 -0
  205. package/dist/source/client/index.d.ts +7 -5
  206. package/dist/source/client/index.d.ts.map +1 -0
  207. package/dist/source/client/index.js +24 -35
  208. package/dist/source/client/index.js.map +1 -0
  209. package/dist/source/index.d.ts +3 -42
  210. package/dist/source/index.js +599 -752
  211. package/dist/source/index.js.map +1 -0
  212. package/dist/source/plugins/lucide-icons.d.ts +7 -7
  213. package/dist/source/plugins/lucide-icons.d.ts.map +1 -0
  214. package/dist/source/plugins/lucide-icons.js +21 -20
  215. package/dist/source/plugins/lucide-icons.js.map +1 -0
  216. package/dist/source/plugins/slugs.d.ts +3 -0
  217. package/dist/source/plugins/slugs.js +65 -0
  218. package/dist/source/plugins/slugs.js.map +1 -0
  219. package/dist/source/schema.d.ts +17 -14
  220. package/dist/source/schema.d.ts.map +1 -0
  221. package/dist/source/schema.js +26 -22
  222. package/dist/source/schema.js.map +1 -0
  223. package/dist/static-DAjBQpus.js +51 -0
  224. package/dist/static-DAjBQpus.js.map +1 -0
  225. package/dist/toc.d.ts +38 -25
  226. package/dist/toc.d.ts.map +1 -0
  227. package/dist/toc.js +123 -136
  228. package/dist/toc.js.map +1 -0
  229. package/dist/util-92szu3Vf.js +10 -0
  230. package/dist/util-92szu3Vf.js.map +1 -0
  231. package/dist/util-ofJFdM-e.d.ts +8 -0
  232. package/dist/util-ofJFdM-e.d.ts.map +1 -0
  233. package/dist/utils/use-effect-event.d.ts +3 -1
  234. package/dist/utils/use-effect-event.d.ts.map +1 -0
  235. package/dist/utils/use-effect-event.js +16 -13
  236. package/dist/utils/use-effect-event.js.map +1 -0
  237. package/dist/utils/use-media-query.d.ts +3 -1
  238. package/dist/utils/use-media-query.d.ts.map +1 -0
  239. package/dist/utils/use-media-query.js +20 -20
  240. package/dist/utils/use-media-query.js.map +1 -0
  241. package/dist/utils/use-on-change.d.ts +3 -1
  242. package/dist/utils/use-on-change.d.ts.map +1 -0
  243. package/dist/utils/use-on-change.js +23 -7
  244. package/dist/utils/use-on-change.js.map +1 -0
  245. package/dist/utils-bAoAH1Rh.js +134 -0
  246. package/dist/utils-bAoAH1Rh.js.map +1 -0
  247. package/package.json +72 -65
  248. package/dist/algolia-IZEDLPHE.js +0 -58
  249. package/dist/chunk-5PMI7QDD.js +0 -220
  250. package/dist/chunk-ADBHPKXG.js +0 -78
  251. package/dist/chunk-APKPSBSB.js +0 -74
  252. package/dist/chunk-CH7YHH7V.js +0 -222
  253. package/dist/chunk-EFVXL2PP.js +0 -144
  254. package/dist/chunk-EMWGTXSW.js +0 -19
  255. package/dist/chunk-FAEPKD7U.js +0 -20
  256. package/dist/chunk-FUUVPEA5.js +0 -29
  257. package/dist/chunk-GINBKBVQ.js +0 -12
  258. package/dist/chunk-GLRQBLGN.js +0 -59
  259. package/dist/chunk-JUF4WZ6G.js +0 -117
  260. package/dist/chunk-K4WNLOVQ.js +0 -75
  261. package/dist/chunk-L4JKQWCM.js +0 -131
  262. package/dist/chunk-MA6O2UUE.js +0 -50
  263. package/dist/chunk-ONG4RVCR.js +0 -8
  264. package/dist/chunk-OTD7MV33.js +0 -53
  265. package/dist/chunk-PFNP6PEB.js +0 -11
  266. package/dist/chunk-SH7BNTG7.js +0 -38
  267. package/dist/chunk-TWIDBWFG.js +0 -84
  268. package/dist/chunk-U67V476Y.js +0 -35
  269. package/dist/chunk-VLSDGCJE.js +0 -47
  270. package/dist/chunk-W6WTLKRA.js +0 -73
  271. package/dist/chunk-X2HFD5QJ.js +0 -275
  272. package/dist/chunk-XJ6ZQNEX.js +0 -91
  273. package/dist/chunk-XN2LKXFZ.js +0 -101
  274. package/dist/chunk-XOFXGHS4.js +0 -93
  275. package/dist/chunk-XZSI7AHE.js +0 -67
  276. package/dist/chunk-YVVDKJ2H.js +0 -34
  277. package/dist/chunk-ZMWYLUDP.js +0 -21
  278. package/dist/definitions-pJ7PybYY.d.ts +0 -60
  279. package/dist/fetch-IBTWQCJR.js +0 -22
  280. package/dist/loader-_E2HOdV0.d.ts +0 -333
  281. package/dist/mixedbread-A3WLENES.js +0 -117
  282. package/dist/orama-cloud-UZAPMPFV.js +0 -93
  283. package/dist/static-A2YJ5TXV.js +0 -62
  284. package/dist/util-bZU2QeJ2.d.ts +0 -6
@@ -1,72 +1,57 @@
1
- import {
2
- FrameworkProvider
3
- } from "../chunk-K4WNLOVQ.js";
4
- import "../chunk-U67V476Y.js";
5
-
6
- // src/framework/tanstack.tsx
7
- import { useRef, useMemo } from "react";
8
- import {
9
- useParams,
10
- Link,
11
- useRouter,
12
- useRouterState
13
- } from "@tanstack/react-router";
1
+ import { FrameworkProvider } from "./index.js";
2
+ import { useMemo, useRef } from "react";
14
3
  import { jsx } from "react/jsx-runtime";
15
- var framework = {
16
- Link({ href, prefetch = true, ...props }) {
17
- return /* @__PURE__ */ jsx(Link, { to: href, preload: prefetch ? "intent" : false, ...props, children: props.children });
18
- },
19
- usePathname() {
20
- const { isLoading, pathname } = useRouterState({
21
- select: (state) => ({
22
- isLoading: state.isLoading,
23
- pathname: state.location.pathname
24
- })
25
- });
26
- const activePathname = useRef(pathname);
27
- return useMemo(() => {
28
- if (isLoading) {
29
- return activePathname.current;
30
- }
31
- activePathname.current = pathname;
32
- return pathname;
33
- }, [isLoading, pathname]);
34
- },
35
- useRouter() {
36
- const router = useRouter();
37
- return useMemo(
38
- () => ({
39
- push(url) {
40
- void router.navigate({
41
- href: url
42
- });
43
- },
44
- refresh() {
45
- void router.invalidate();
46
- }
47
- }),
48
- [router]
49
- );
50
- },
51
- useParams() {
52
- return useParams({ strict: false });
53
- }
4
+ import { Link, useParams, useRouter, useRouterState } from "@tanstack/react-router";
5
+
6
+ //#region src/framework/tanstack.tsx
7
+ const framework = {
8
+ Link({ href, prefetch = true, ...props }) {
9
+ return /* @__PURE__ */ jsx(Link, {
10
+ to: href,
11
+ preload: prefetch ? "intent" : false,
12
+ ...props,
13
+ children: props.children
14
+ });
15
+ },
16
+ usePathname() {
17
+ const { isLoading, pathname } = useRouterState({ select: (state) => ({
18
+ isLoading: state.isLoading,
19
+ pathname: state.location.pathname
20
+ }) });
21
+ const activePathname = useRef(pathname);
22
+ return useMemo(() => {
23
+ if (isLoading) return activePathname.current;
24
+ activePathname.current = pathname;
25
+ return pathname;
26
+ }, [isLoading, pathname]);
27
+ },
28
+ useRouter() {
29
+ const router = useRouter();
30
+ return useMemo(() => ({
31
+ push(url) {
32
+ router.navigate({ href: url });
33
+ },
34
+ refresh() {
35
+ router.invalidate();
36
+ }
37
+ }), [router]);
38
+ },
39
+ useParams() {
40
+ return useParams({ strict: false });
41
+ }
54
42
  };
55
- function TanstackProvider({
56
- children,
57
- Link: CustomLink,
58
- Image: CustomImage
59
- }) {
60
- return /* @__PURE__ */ jsx(
61
- FrameworkProvider,
62
- {
63
- ...framework,
64
- Link: CustomLink ?? framework.Link,
65
- Image: CustomImage ?? framework.Image,
66
- children
67
- }
68
- );
43
+ /**
44
+ * Fumadocs adapter for Tanstack Router/Start
45
+ */
46
+ function TanstackProvider({ children, Link: CustomLink, Image: CustomImage }) {
47
+ return /* @__PURE__ */ jsx(FrameworkProvider, {
48
+ ...framework,
49
+ Link: CustomLink ?? framework.Link,
50
+ Image: CustomImage ?? framework.Image,
51
+ children
52
+ });
69
53
  }
70
- export {
71
- TanstackProvider
72
- };
54
+
55
+ //#endregion
56
+ export { TanstackProvider };
57
+ //# sourceMappingURL=tanstack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstack.js","names":["framework: Framework"],"sources":["../../src/framework/tanstack.tsx"],"sourcesContent":["import { type ReactNode, useRef, useMemo } from 'react';\nimport { type Framework, FrameworkProvider } from '@/framework/index';\nimport { useParams, Link, useRouter, useRouterState } from '@tanstack/react-router';\n\nconst framework: Framework = {\n Link({ href, prefetch = true, ...props }) {\n return (\n <Link to={href} preload={prefetch ? 'intent' : false} {...props}>\n {props.children}\n </Link>\n );\n },\n usePathname() {\n const { isLoading, pathname } = useRouterState({\n select: (state) => ({\n isLoading: state.isLoading,\n pathname: state.location.pathname,\n }),\n });\n\n const activePathname = useRef(pathname);\n return useMemo(() => {\n if (isLoading) {\n return activePathname.current;\n }\n\n activePathname.current = pathname;\n return pathname;\n }, [isLoading, pathname]);\n },\n useRouter() {\n const router = useRouter();\n\n return useMemo(\n () => ({\n push(url) {\n void router.navigate({\n href: url,\n });\n },\n refresh() {\n void router.invalidate();\n },\n }),\n [router],\n );\n },\n useParams() {\n return useParams({ strict: false });\n },\n};\n\n/**\n * Fumadocs adapter for Tanstack Router/Start\n */\nexport function TanstackProvider({\n children,\n Link: CustomLink,\n Image: CustomImage,\n}: {\n children: ReactNode;\n Link?: Framework['Link'];\n Image?: Framework['Image'];\n}) {\n return (\n <FrameworkProvider\n {...framework}\n Link={CustomLink ?? framework.Link}\n Image={CustomImage ?? framework.Image}\n >\n {children}\n </FrameworkProvider>\n );\n}\n"],"mappings":";;;;;;AAIA,MAAMA,YAAuB;CAC3B,KAAK,EAAE,MAAM,WAAW,MAAM,GAAG,SAAS;AACxC,SACE,oBAAC;GAAK,IAAI;GAAM,SAAS,WAAW,WAAW;GAAO,GAAI;aACvD,MAAM;IACF;;CAGX,cAAc;EACZ,MAAM,EAAE,WAAW,aAAa,eAAe,EAC7C,SAAS,WAAW;GAClB,WAAW,MAAM;GACjB,UAAU,MAAM,SAAS;GAC1B,GACF,CAAC;EAEF,MAAM,iBAAiB,OAAO,SAAS;AACvC,SAAO,cAAc;AACnB,OAAI,UACF,QAAO,eAAe;AAGxB,kBAAe,UAAU;AACzB,UAAO;KACN,CAAC,WAAW,SAAS,CAAC;;CAE3B,YAAY;EACV,MAAM,SAAS,WAAW;AAE1B,SAAO,eACE;GACL,KAAK,KAAK;AACR,IAAK,OAAO,SAAS,EACnB,MAAM,KACP,CAAC;;GAEJ,UAAU;AACR,IAAK,OAAO,YAAY;;GAE3B,GACD,CAAC,OAAO,CACT;;CAEH,YAAY;AACV,SAAO,UAAU,EAAE,QAAQ,OAAO,CAAC;;CAEtC;;;;AAKD,SAAgB,iBAAiB,EAC/B,UACA,MAAM,YACN,OAAO,eAKN;AACD,QACE,oBAAC;EACC,GAAI;EACJ,MAAM,cAAc,UAAU;EAC9B,OAAO,eAAe,UAAU;EAE/B;GACiB"}
@@ -1,12 +1,17 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { Framework } from './index.js';
4
- import 'next/dist/shared/lib/get-img-props';
5
-
6
- declare function WakuProvider({ children, Link: CustomLink, Image: CustomImage, }: {
7
- children: ReactNode;
8
- Link?: Framework['Link'];
9
- Image?: Framework['Image'];
10
- }): react_jsx_runtime.JSX.Element;
1
+ import { Framework } from "./index.js";
2
+ import { ReactNode } from "react";
3
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
11
4
 
5
+ //#region src/framework/waku.d.ts
6
+ declare function WakuProvider({
7
+ children,
8
+ Link: CustomLink,
9
+ Image: CustomImage
10
+ }: {
11
+ children: ReactNode;
12
+ Link?: Framework['Link'];
13
+ Image?: Framework['Image'];
14
+ }): react_jsx_runtime8.JSX.Element;
15
+ //#endregion
12
16
  export { WakuProvider };
17
+ //# sourceMappingURL=waku.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waku.d.ts","names":[],"sources":["../../src/framework/waku.tsx"],"sourcesContent":[],"mappings":";;;;;iBA+CgB,YAAA;;QAER;SACC;;YAEG;SACH;EANO,KAAA,CAAA,EAON,SAPkB,CAAA,OAAA,CAAA;CAC1B,CAAA,EAOD,kBAAA,CAAA,GAAA,CAAA,OAPC"}
@@ -1,63 +1,52 @@
1
- "use client";
2
- import {
3
- FrameworkProvider
4
- } from "../chunk-K4WNLOVQ.js";
5
- import "../chunk-U67V476Y.js";
1
+ 'use client';
6
2
 
7
- // src/framework/waku.tsx
3
+ import { FrameworkProvider } from "./index.js";
8
4
  import { useMemo } from "react";
9
- import { Link as WakuLink, useRouter } from "waku";
10
5
  import { jsx } from "react/jsx-runtime";
11
- var framework = {
12
- usePathname() {
13
- const { path } = useRouter();
14
- return path;
15
- },
16
- useParams() {
17
- const { query } = useRouter();
18
- return useMemo(() => {
19
- const params = new URLSearchParams(query);
20
- return Object.fromEntries(
21
- Array.from(params.entries()).map(([key, value]) => [
22
- key,
23
- Array.isArray(value) ? value[0] : value
24
- ])
25
- );
26
- }, [query]);
27
- },
28
- useRouter() {
29
- const router = useRouter();
30
- return useMemo(
31
- () => ({
32
- push(url) {
33
- void router.push(url);
34
- },
35
- refresh() {
36
- void router.push(router.path);
37
- }
38
- }),
39
- [router]
40
- );
41
- },
42
- Link({ href, prefetch = true, ...props }) {
43
- return /* @__PURE__ */ jsx(WakuLink, { to: href, unstable_prefetchOnEnter: prefetch, ...props, children: props.children });
44
- }
6
+ import { Link, useRouter } from "waku";
7
+
8
+ //#region src/framework/waku.tsx
9
+ const framework = {
10
+ usePathname() {
11
+ const { path } = useRouter();
12
+ return path;
13
+ },
14
+ useParams() {
15
+ const { query } = useRouter();
16
+ return useMemo(() => {
17
+ const params = new URLSearchParams(query);
18
+ return Object.fromEntries(Array.from(params.entries()).map(([key, value]) => [key, Array.isArray(value) ? value[0] : value]));
19
+ }, [query]);
20
+ },
21
+ useRouter() {
22
+ const router = useRouter();
23
+ return useMemo(() => ({
24
+ push(url) {
25
+ router.push(url);
26
+ },
27
+ refresh() {
28
+ router.push(router.path);
29
+ }
30
+ }), [router]);
31
+ },
32
+ Link({ href, prefetch = true, ...props }) {
33
+ return /* @__PURE__ */ jsx(Link, {
34
+ to: href,
35
+ unstable_prefetchOnEnter: prefetch,
36
+ ...props,
37
+ children: props.children
38
+ });
39
+ }
45
40
  };
46
- function WakuProvider({
47
- children,
48
- Link: CustomLink,
49
- Image: CustomImage
50
- }) {
51
- return /* @__PURE__ */ jsx(
52
- FrameworkProvider,
53
- {
54
- ...framework,
55
- Link: CustomLink ?? framework.Link,
56
- Image: CustomImage ?? framework.Image,
57
- children
58
- }
59
- );
41
+ function WakuProvider({ children, Link: CustomLink, Image: CustomImage }) {
42
+ return /* @__PURE__ */ jsx(FrameworkProvider, {
43
+ ...framework,
44
+ Link: CustomLink ?? framework.Link,
45
+ Image: CustomImage ?? framework.Image,
46
+ children
47
+ });
60
48
  }
61
- export {
62
- WakuProvider
63
- };
49
+
50
+ //#endregion
51
+ export { WakuProvider };
52
+ //# sourceMappingURL=waku.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waku.js","names":["framework: Framework","WakuLink"],"sources":["../../src/framework/waku.tsx"],"sourcesContent":["'use client';\n\nimport { type ReactNode, useMemo } from 'react';\nimport { Link as WakuLink, useRouter } from 'waku';\nimport { type Framework, FrameworkProvider } from './index.js';\n\nconst framework: Framework = {\n usePathname() {\n const { path } = useRouter();\n return path;\n },\n useParams() {\n const { query } = useRouter();\n return useMemo(() => {\n const params = new URLSearchParams(query);\n return Object.fromEntries(\n Array.from(params.entries()).map(([key, value]) => [\n key,\n Array.isArray(value) ? value[0] : value,\n ]),\n );\n }, [query]);\n },\n useRouter() {\n const router = useRouter();\n\n return useMemo(\n () => ({\n push(url: string) {\n void router.push(url);\n },\n refresh() {\n void router.push(router.path);\n },\n }),\n [router],\n );\n },\n Link({ href, prefetch = true, ...props }) {\n return (\n <WakuLink to={href!} unstable_prefetchOnEnter={prefetch} {...props}>\n {props.children}\n </WakuLink>\n );\n },\n};\n\nexport function WakuProvider({\n children,\n Link: CustomLink,\n Image: CustomImage,\n}: {\n children: ReactNode;\n Link?: Framework['Link'];\n Image?: Framework['Image'];\n}) {\n return (\n <FrameworkProvider\n {...framework}\n Link={CustomLink ?? framework.Link}\n Image={CustomImage ?? framework.Image}\n >\n {children}\n </FrameworkProvider>\n );\n}\n"],"mappings":";;;;;;;;AAMA,MAAMA,YAAuB;CAC3B,cAAc;EACZ,MAAM,EAAE,SAAS,WAAW;AAC5B,SAAO;;CAET,YAAY;EACV,MAAM,EAAE,UAAU,WAAW;AAC7B,SAAO,cAAc;GACnB,MAAM,SAAS,IAAI,gBAAgB,MAAM;AACzC,UAAO,OAAO,YACZ,MAAM,KAAK,OAAO,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CACjD,KACA,MAAM,QAAQ,MAAM,GAAG,MAAM,KAAK,MACnC,CAAC,CACH;KACA,CAAC,MAAM,CAAC;;CAEb,YAAY;EACV,MAAM,SAAS,WAAW;AAE1B,SAAO,eACE;GACL,KAAK,KAAa;AAChB,IAAK,OAAO,KAAK,IAAI;;GAEvB,UAAU;AACR,IAAK,OAAO,KAAK,OAAO,KAAK;;GAEhC,GACD,CAAC,OAAO,CACT;;CAEH,KAAK,EAAE,MAAM,WAAW,MAAM,GAAG,SAAS;AACxC,SACE,oBAACC;GAAS,IAAI;GAAO,0BAA0B;GAAU,GAAI;aAC1D,MAAM;IACE;;CAGhB;AAED,SAAgB,aAAa,EAC3B,UACA,MAAM,YACN,OAAO,eAKN;AACD,QACE,oBAAC;EACC,GAAI;EACJ,MAAM,cAAc,UAAU;EAC9B,OAAO,eAAe,UAAU;EAE/B;GACiB"}
@@ -1,9 +1,7 @@
1
- import { DependencyList, ReactNode } from 'react';
2
- import { HighlightOptions } from './index.js';
3
- import 'shiki';
4
- import 'shiki/themes';
5
- import 'hast-util-to-jsx-runtime';
6
- import 'hast';
1
+ import { t as HighlightOptions } from "../shiki-Bdk0JGsB.js";
2
+ import { DependencyList, ReactNode } from "react";
3
+
4
+ //#region src/highlight/client.d.ts
7
5
 
8
6
  /**
9
7
  * get highlighted results, should be used with React Suspense API.
@@ -11,5 +9,6 @@ import 'hast';
11
9
  * note: results are cached with (lang, code) as keys, if this is not the desired behaviour, pass a `deps` instead.
12
10
  */
13
11
  declare function useShiki(code: string, options: HighlightOptions, deps?: DependencyList): ReactNode;
14
-
12
+ //#endregion
15
13
  export { useShiki };
14
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","names":[],"sources":["../../src/highlight/client.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAWA;;;AAIG,iBAJa,QAAA,CAIb,IAAA,EAAA,MAAA,EAAA,OAAA,EAFQ,gBAER,EAAA,IAAA,CAAA,EADM,cACN,CAAA,EAAA,SAAA"}
@@ -1,18 +1,26 @@
1
- "use client";
2
- import {
3
- highlight
4
- } from "../chunk-XN2LKXFZ.js";
5
- import "../chunk-U67V476Y.js";
1
+ 'use client';
6
2
 
7
- // src/highlight/client.tsx
3
+ import { i as highlight } from "../shiki-DoHr6fEj.js";
8
4
  import { use, useMemo } from "react";
9
- var promises = {};
5
+
6
+ //#region src/highlight/client.tsx
7
+ const promises = {};
8
+ /**
9
+ * get highlighted results, should be used with React Suspense API.
10
+ *
11
+ * note: results are cached with (lang, code) as keys, if this is not the desired behaviour, pass a `deps` instead.
12
+ */
10
13
  function useShiki(code, options, deps) {
11
- const key = useMemo(() => {
12
- return deps ? JSON.stringify(deps) : `${options.lang}:${code}`;
13
- }, [code, deps, options.lang]);
14
- return use(promises[key] ??= highlight(code, options));
14
+ const key = useMemo(() => {
15
+ return deps ? JSON.stringify(deps) : `${options.lang}:${code}`;
16
+ }, [
17
+ code,
18
+ deps,
19
+ options.lang
20
+ ]);
21
+ return use(promises[key] ??= highlight(code, options));
15
22
  }
16
- export {
17
- useShiki
18
- };
23
+
24
+ //#endregion
25
+ export { useShiki };
26
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","names":["promises: Record<string, Promise<ReactNode>>"],"sources":["../../src/highlight/client.tsx"],"sourcesContent":["'use client';\nimport { type DependencyList, type ReactNode, use, useMemo } from 'react';\nimport { highlight, type HighlightOptions } from './shiki';\n\nconst promises: Record<string, Promise<ReactNode>> = {};\n\n/**\n * get highlighted results, should be used with React Suspense API.\n *\n * note: results are cached with (lang, code) as keys, if this is not the desired behaviour, pass a `deps` instead.\n */\nexport function useShiki(\n code: string,\n options: HighlightOptions,\n deps?: DependencyList,\n): ReactNode {\n const key = useMemo(() => {\n return deps ? JSON.stringify(deps) : `${options.lang}:${code}`;\n }, [code, deps, options.lang]);\n\n return use((promises[key] ??= highlight(code, options)));\n}\n"],"mappings":";;;;;;AAIA,MAAMA,WAA+C,EAAE;;;;;;AAOvD,SAAgB,SACd,MACA,SACA,MACW;CACX,MAAM,MAAM,cAAc;AACxB,SAAO,OAAO,KAAK,UAAU,KAAK,GAAG,GAAG,QAAQ,KAAK,GAAG;IACvD;EAAC;EAAM;EAAM,QAAQ;EAAK,CAAC;AAE9B,QAAO,IAAK,SAAS,SAAS,UAAU,MAAM,QAAQ,CAAE"}
@@ -1,30 +1,2 @@
1
- import { CodeToHastOptionsCommon, BundledLanguage, CodeOptionsMeta, CodeOptionsThemes, BundledHighlighterOptions, Highlighter } from 'shiki';
2
- import { BundledTheme } from 'shiki/themes';
3
- import { Components, Options } from 'hast-util-to-jsx-runtime';
4
- import { ReactNode } from 'react';
5
- import { Root } from 'hast';
6
-
7
- type HighlightOptionsCommon = CodeToHastOptionsCommon<BundledLanguage> & CodeOptionsMeta & {
8
- /**
9
- * The Regex Engine for Shiki
10
- *
11
- * @defaultValue 'js'
12
- */
13
- engine?: 'js' | 'oniguruma';
14
- components?: Partial<Components>;
15
- fallbackLanguage?: BundledLanguage;
16
- };
17
- type HighlightOptionsThemes = CodeOptionsThemes<BundledTheme>;
18
- type HighlightOptions = HighlightOptionsCommon & (HighlightOptionsThemes | Record<never, never>);
19
- declare function highlightHast(code: string, options: HighlightOptions): Promise<Root>;
20
- declare function hastToJsx(hast: Root, options?: Partial<Options>): JSX.Element;
21
- /**
22
- * Get Shiki highlighter instance of Fumadocs (mostly for internal use, you should use Shiki directly over this).
23
- *
24
- * @param engineType - Shiki Regex engine to use.
25
- * @param options - Shiki options.
26
- */
27
- declare function getHighlighter(engineType: 'js' | 'oniguruma', options: Omit<BundledHighlighterOptions<BundledLanguage, BundledTheme>, 'engine'>): Promise<Highlighter>;
28
- declare function highlight(code: string, options: HighlightOptions): Promise<ReactNode>;
29
-
30
- export { type HighlightOptions, type HighlightOptionsCommon, type HighlightOptionsThemes, getHighlighter, hastToJsx, highlight, highlightHast };
1
+ import { a as hastToJsx, i as getHighlighter, n as HighlightOptionsCommon, o as highlight, r as HighlightOptionsThemes, s as highlightHast, t as HighlightOptions } from "../shiki-Bdk0JGsB.js";
2
+ export { type HighlightOptions, type HighlightOptionsCommon, type HighlightOptionsThemes, getHighlighter, hastToJsx, highlight, highlightHast };
@@ -1,13 +1,3 @@
1
- import {
2
- getHighlighter,
3
- hastToJsx,
4
- highlight,
5
- highlightHast
6
- } from "../chunk-XN2LKXFZ.js";
7
- import "../chunk-U67V476Y.js";
8
- export {
9
- getHighlighter,
10
- hastToJsx,
11
- highlight,
12
- highlightHast
13
- };
1
+ import { a as highlightHast, i as highlight, n as getHighlighter, r as hastToJsx } from "../shiki-DoHr6fEj.js";
2
+
3
+ export { getHighlighter, hastToJsx, highlight, highlightHast };
@@ -1,39 +1,2 @@
1
- interface I18nConfig<Languages extends string = string> {
2
- /**
3
- * Supported locale codes.
4
- *
5
- * A page tree will be built for each language.
6
- */
7
- languages: Languages[];
8
- /**
9
- * Default locale if not specified
10
- */
11
- defaultLanguage: Languages;
12
- /**
13
- * Don't show the locale prefix on URL.
14
- *
15
- * - `always`: Always hide the prefix
16
- * - `default-locale`: Only hide the default locale
17
- * - `never`: Never hide the prefix
18
- *
19
- * This API uses `NextResponse.rewrite`.
20
- *
21
- * @defaultValue 'never'
22
- */
23
- hideLocale?: 'always' | 'default-locale' | 'never';
24
- /**
25
- * Used by `loader()`, specify the way to parse i18n file structure.
26
- *
27
- * @defaultValue 'dot'
28
- */
29
- parser?: 'dot' | 'dir' | 'none';
30
- /**
31
- * the fallback language when the page has no translations available for a given locale.
32
- *
33
- * Default to ``defaultLanguage`, no fallback when set to `null`.
34
- */
35
- fallbackLanguage?: Languages | null;
36
- }
37
- declare function defineI18n<Languages extends string>(config: I18nConfig<Languages>): I18nConfig<Languages>;
38
-
39
- export { type I18nConfig, defineI18n };
1
+ import { n as defineI18n, t as I18nConfig } from "../index-BhVrX5J1.js";
2
+ export { I18nConfig, defineI18n };
@@ -1,9 +1,8 @@
1
- import "../chunk-U67V476Y.js";
2
-
3
- // src/i18n/index.ts
1
+ //#region src/i18n/index.ts
4
2
  function defineI18n(config) {
5
- return config;
3
+ return config;
6
4
  }
7
- export {
8
- defineI18n
9
- };
5
+
6
+ //#endregion
7
+ export { defineI18n };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/i18n/index.ts"],"sourcesContent":["export interface I18nConfig<Languages extends string = string> {\n /**\n * Supported locale codes.\n *\n * A page tree will be built for each language.\n */\n languages: Languages[];\n\n /**\n * Default locale if not specified\n */\n defaultLanguage: Languages;\n\n /**\n * Don't show the locale prefix on URL.\n *\n * - `always`: Always hide the prefix\n * - `default-locale`: Only hide the default locale\n * - `never`: Never hide the prefix\n *\n * This API uses `NextResponse.rewrite`.\n *\n * @defaultValue 'never'\n */\n hideLocale?: 'always' | 'default-locale' | 'never';\n\n /**\n * Used by `loader()`, specify the way to parse i18n file structure.\n *\n * @defaultValue 'dot'\n */\n parser?: 'dot' | 'dir' | 'none';\n\n /**\n * the fallback language when the page has no translations available for a given locale.\n *\n * Default to ``defaultLanguage`, no fallback when set to `null`.\n */\n fallbackLanguage?: Languages | null;\n}\n\nexport function defineI18n<Languages extends string>(\n config: I18nConfig<Languages>,\n): I18nConfig<Languages> {\n return config;\n}\n"],"mappings":";AAyCA,SAAgB,WACd,QACuB;AACvB,QAAO"}
@@ -1,34 +1,42 @@
1
- import { NextProxy } from 'next/server';
2
- import { I18nConfig } from './index.js';
3
- import { NextURL } from 'next/dist/server/web/next-url';
1
+ import { t as I18nConfig } from "../index-BhVrX5J1.js";
2
+ import { NextProxy } from "next/server";
3
+ import { NextURL } from "next/dist/server/web/next-url";
4
4
 
5
+ //#region src/i18n/middleware.d.ts
5
6
  interface MiddlewareOptions extends I18nConfig {
6
- /**
7
- * Either:
8
- * - A formatter object
9
- * - A function that adds the locale prefix to pathname
10
- */
11
- format?: URLFormatter | ((locale: string, pathname: string) => string);
12
- /**
13
- * the cookie to store locale code when `hideLocale` is set to `always`.
14
- */
15
- cookieName?: string;
7
+ /**
8
+ * Either:
9
+ * - A formatter object
10
+ * - A function that adds the locale prefix to pathname
11
+ */
12
+ format?: URLFormatter | ((locale: string, pathname: string) => string);
13
+ /**
14
+ * the cookie to store locale code when `hideLocale` is set to `always`.
15
+ */
16
+ cookieName?: string;
16
17
  }
17
18
  interface URLFormatter {
18
- /**
19
- * get locale code from request URL
20
- */
21
- get: (url: NextURL) => string | undefined;
22
- /**
23
- * add locale code to request URL (which is missing the locale).
24
- */
25
- add: (url: NextURL, locale: string) => URL;
26
- /**
27
- * remove locale code from request URL
28
- */
29
- remove: (url: NextURL) => URL;
19
+ /**
20
+ * get locale code from request URL
21
+ */
22
+ get: (url: NextURL) => string | undefined;
23
+ /**
24
+ * add locale code to request URL (which is missing the locale).
25
+ */
26
+ add: (url: NextURL, locale: string) => URL;
27
+ /**
28
+ * remove locale code from request URL
29
+ */
30
+ remove: (url: NextURL) => URL;
30
31
  }
31
32
  declare const DefaultFormatter: URLFormatter;
32
- declare function createI18nMiddleware({ languages, defaultLanguage, format, cookieName, hideLocale, }: MiddlewareOptions): NextProxy;
33
-
34
- export { DefaultFormatter, type URLFormatter, createI18nMiddleware };
33
+ declare function createI18nMiddleware({
34
+ languages,
35
+ defaultLanguage,
36
+ format,
37
+ cookieName,
38
+ hideLocale
39
+ }: MiddlewareOptions): NextProxy;
40
+ //#endregion
41
+ export { DefaultFormatter, URLFormatter, createI18nMiddleware };
42
+ //# sourceMappingURL=middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.d.ts","names":[],"sources":["../../src/i18n/middleware.ts"],"sourcesContent":[],"mappings":";;;;;UAMU,iBAAA,SAA0B;;AAFyB;AAgB7D;;;EASyC,MAAA,CAAA,EAjB9B,YAiB8B,GAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,GAAA,MAAA,CAAA;EAKzB;;;EAGH,UAAA,CAAA,EAAA,MAgBZ;AAED;AACE,UApCe,YAAA,CAoCf;EACA;;;EAGA,GAAA,EAAA,CAAA,GAAA,EApCW,OAoCX,EAAA,GAAA,MAAA,GAAA,SAAA;EACC;;;aAhCU,4BAA4B;;;;gBAKzB,YAAY;;cAGf,kBAAkB;iBAkBf,oBAAA;;;;;;GAMb,oBAAoB"}