@gentleduck/docs 0.0.1

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 (462) hide show
  1. package/LICENSE +21 -0
  2. package/dist/callout-CFw8zUIz.js +2 -0
  3. package/dist/callout-CFw8zUIz.js.map +1 -0
  4. package/dist/callout-VcT2d48I.d.ts +17 -0
  5. package/dist/callout-VcT2d48I.d.ts.map +1 -0
  6. package/dist/charts-DX0UohRi.js +2 -0
  7. package/dist/charts-DX0UohRi.js.map +1 -0
  8. package/dist/charts-hfCEZEQp.d.ts +6 -0
  9. package/dist/charts-hfCEZEQp.d.ts.map +1 -0
  10. package/dist/client.d.ts +54 -0
  11. package/dist/client.js +1 -0
  12. package/dist/code-Cz75Womb.js +0 -0
  13. package/dist/code-block-CR2loi-i.d.ts +14 -0
  14. package/dist/code-block-CR2loi-i.d.ts.map +1 -0
  15. package/dist/code-block-DqFdGhI-.js +2 -0
  16. package/dist/code-block-DqFdGhI-.js.map +1 -0
  17. package/dist/code-block-wrapper-C8I0XMsN.d.ts +12 -0
  18. package/dist/code-block-wrapper-C8I0XMsN.d.ts.map +1 -0
  19. package/dist/code-block-wrapper-CCAw9mie.js +2 -0
  20. package/dist/code-block-wrapper-CCAw9mie.js.map +1 -0
  21. package/dist/code-preview-CeNXQxYN.d.ts +20 -0
  22. package/dist/code-preview-CeNXQxYN.d.ts.map +1 -0
  23. package/dist/code-preview-cIvw8qyg.js +2 -0
  24. package/dist/code-preview-cIvw8qyg.js.map +1 -0
  25. package/dist/colors-Ba_cRR6y.js +2 -0
  26. package/dist/colors-Ba_cRR6y.js.map +1 -0
  27. package/dist/colors-CpJMSMtf.d.ts +47 -0
  28. package/dist/colors-CpJMSMtf.d.ts.map +1 -0
  29. package/dist/command-menu-7HTBKVxd.js +0 -0
  30. package/dist/command-menu-BVebU1JI.js +2 -0
  31. package/dist/command-menu-BVebU1JI.js.map +1 -0
  32. package/dist/command-menu-C8RLyuBe.d.ts +7 -0
  33. package/dist/command-menu-C8RLyuBe.d.ts.map +1 -0
  34. package/dist/component-preview-CL6guE-v.js +2 -0
  35. package/dist/component-preview-CL6guE-v.js.map +1 -0
  36. package/dist/component-preview-DknaF8TG.d.ts +33 -0
  37. package/dist/component-preview-DknaF8TG.d.ts.map +1 -0
  38. package/dist/component-source-BCBDjfEb.js +5 -0
  39. package/dist/component-source-BCBDjfEb.js.map +1 -0
  40. package/dist/component-source-IrGlRkUy.d.ts +17 -0
  41. package/dist/component-source-IrGlRkUy.d.ts.map +1 -0
  42. package/dist/components/copy-button/copy-button.d.ts +4 -0
  43. package/dist/components/copy-button/copy-button.js +1 -0
  44. package/dist/components/copy-button/copy-button.types.d.ts +3 -0
  45. package/dist/components/copy-button/copy-button.types.js +0 -0
  46. package/dist/components/copy-button/index.d.ts +5 -0
  47. package/dist/components/copy-button/index.js +1 -0
  48. package/dist/components/docs/docs-copy-page.d.ts +2 -0
  49. package/dist/components/docs/docs-copy-page.js +1 -0
  50. package/dist/components/docs/docs-pager.d.ts +4 -0
  51. package/dist/components/docs/docs-pager.js +1 -0
  52. package/dist/components/docs/docs-sidebar.d.ts +4 -0
  53. package/dist/components/docs/docs-sidebar.js +1 -0
  54. package/dist/components/docs/docs-toc.d.ts +4 -0
  55. package/dist/components/docs/docs-toc.js +1 -0
  56. package/dist/components/docs/index.d.ts +8 -0
  57. package/dist/components/docs/index.js +1 -0
  58. package/dist/components/icons.d.ts +2 -0
  59. package/dist/components/icons.js +1 -0
  60. package/dist/components/index.d.ts +44 -0
  61. package/dist/components/index.js +1 -0
  62. package/dist/components/layouts/command-menu/command-menu.d.ts +2 -0
  63. package/dist/components/layouts/command-menu/command-menu.js +1 -0
  64. package/dist/components/layouts/command-menu/index.d.ts +3 -0
  65. package/dist/components/layouts/command-menu/index.js +1 -0
  66. package/dist/components/layouts/index.d.ts +8 -0
  67. package/dist/components/layouts/index.js +1 -0
  68. package/dist/components/layouts/site-footer/index.d.ts +2 -0
  69. package/dist/components/layouts/site-footer/index.js +1 -0
  70. package/dist/components/layouts/site-header/header-shell.d.ts +2 -0
  71. package/dist/components/layouts/site-header/header-shell.js +1 -0
  72. package/dist/components/layouts/site-header/index.d.ts +3 -0
  73. package/dist/components/layouts/site-header/index.js +1 -0
  74. package/dist/components/layouts/tailwind-indicator/index.d.ts +2 -0
  75. package/dist/components/layouts/tailwind-indicator/index.js +1 -0
  76. package/dist/components/main-nav.d.ts +2 -0
  77. package/dist/components/main-nav.js +1 -0
  78. package/dist/components/mdx/mdx-components/callout.d.ts +2 -0
  79. package/dist/components/mdx/mdx-components/callout.js +1 -0
  80. package/dist/components/mdx/mdx-components/code/code-block-wrapper.d.ts +2 -0
  81. package/dist/components/mdx/mdx-components/code/code-block-wrapper.js +1 -0
  82. package/dist/components/mdx/mdx-components/code/code-block.d.ts +2 -0
  83. package/dist/components/mdx/mdx-components/code/code-block.js +1 -0
  84. package/dist/components/mdx/mdx-components/code/code-preview.d.ts +2 -0
  85. package/dist/components/mdx/mdx-components/code/code-preview.js +1 -0
  86. package/dist/components/mdx/mdx-components/code/component-preview.d.ts +2 -0
  87. package/dist/components/mdx/mdx-components/code/component-preview.js +1 -0
  88. package/dist/components/mdx/mdx-components/code/component-source.d.ts +2 -0
  89. package/dist/components/mdx/mdx-components/code/component-source.js +1 -0
  90. package/dist/components/mdx/mdx-components/code/figcaption-block.d.ts +2 -0
  91. package/dist/components/mdx/mdx-components/code/figcaption-block.js +1 -0
  92. package/dist/components/mdx/mdx-components/code/index.d.ts +11 -0
  93. package/dist/components/mdx/mdx-components/code/index.js +1 -0
  94. package/dist/components/mdx/mdx-components/code/pre-block.d.ts +4 -0
  95. package/dist/components/mdx/mdx-components/code/pre-block.js +1 -0
  96. package/dist/components/mdx/mdx-components/code/span-block.d.ts +11 -0
  97. package/dist/components/mdx/mdx-components/code/span-block.d.ts.map +1 -0
  98. package/dist/components/mdx/mdx-components/code/span-block.js +2 -0
  99. package/dist/components/mdx/mdx-components/code/span-block.js.map +1 -0
  100. package/dist/components/mdx/mdx-components/components-list.d.ts +4 -0
  101. package/dist/components/mdx/mdx-components/components-list.js +1 -0
  102. package/dist/components/mdx/mdx-components/exalidraw.d.ts +7 -0
  103. package/dist/components/mdx/mdx-components/exalidraw.d.ts.map +1 -0
  104. package/dist/components/mdx/mdx-components/exalidraw.js +2 -0
  105. package/dist/components/mdx/mdx-components/exalidraw.js.map +1 -0
  106. package/dist/components/mdx/mdx-components/framework-docs.d.ts +2 -0
  107. package/dist/components/mdx/mdx-components/framework-docs.js +1 -0
  108. package/dist/components/mdx/mdx-components/index.d.ts +20 -0
  109. package/dist/components/mdx/mdx-components/index.js +1 -0
  110. package/dist/components/mdx/mdx-components/table.d.ts +2 -0
  111. package/dist/components/mdx/mdx-components/table.js +1 -0
  112. package/dist/components/mdx/mdx-components/tabs.d.ts +2 -0
  113. package/dist/components/mdx/mdx-components/tabs.js +1 -0
  114. package/dist/components/mdx/mdx-components/typepography.d.ts +2 -0
  115. package/dist/components/mdx/mdx-components/typepography.js +1 -0
  116. package/dist/components/mdx/mdx.d.ts +2 -0
  117. package/dist/components/mdx/mdx.js +1 -0
  118. package/dist/components/mobile-nav.d.ts +2 -0
  119. package/dist/components/mobile-nav.js +1 -0
  120. package/dist/components/mode-toggle.d.ts +2 -0
  121. package/dist/components/mode-toggle.js +1 -0
  122. package/dist/components/page-header.d.ts +2 -0
  123. package/dist/components/page-header.js +1 -0
  124. package/dist/components/providers.d.ts +2 -0
  125. package/dist/components/providers.js +1 -0
  126. package/dist/components/themes/index.d.ts +3 -0
  127. package/dist/components/themes/index.js +1 -0
  128. package/dist/components/themes/style-switcher.d.ts +2 -0
  129. package/dist/components/themes/style-switcher.js +1 -0
  130. package/dist/components-list-BCV3yN6H.js +2 -0
  131. package/dist/components-list-BCV3yN6H.js.map +1 -0
  132. package/dist/components-list-ZLlUD-Nr.d.ts +12 -0
  133. package/dist/components-list-ZLlUD-Nr.d.ts.map +1 -0
  134. package/dist/context/context.d.ts +2 -0
  135. package/dist/context/context.js +1 -0
  136. package/dist/context/context.types.d.ts +2 -0
  137. package/dist/context/context.types.js +0 -0
  138. package/dist/context/index.d.ts +4 -0
  139. package/dist/context/index.js +1 -0
  140. package/dist/context-Bd4Sf8r8.js +2 -0
  141. package/dist/context-Bd4Sf8r8.js.map +1 -0
  142. package/dist/context-BoqMzqgD.js +0 -0
  143. package/dist/context-tLL-jUw_.d.ts +26 -0
  144. package/dist/context-tLL-jUw_.d.ts.map +1 -0
  145. package/dist/context.types-8c0sgn5Q.js +0 -0
  146. package/dist/context.types-DgaGu8Ly.d.ts +57 -0
  147. package/dist/context.types-DgaGu8Ly.d.ts.map +1 -0
  148. package/dist/copy-button-Bh7DmVLN.d.ts +22 -0
  149. package/dist/copy-button-Bh7DmVLN.d.ts.map +1 -0
  150. package/dist/copy-button-D50DXq56.js +2 -0
  151. package/dist/copy-button-D50DXq56.js.map +1 -0
  152. package/dist/copy-button-DpLK4Hc9.js +0 -0
  153. package/dist/copy-button.types-D6D1XKDN.d.ts +19 -0
  154. package/dist/copy-button.types-D6D1XKDN.d.ts.map +1 -0
  155. package/dist/copy-button.types-ZXpoKEH1.js +0 -0
  156. package/dist/docs-B9qhW8T2.js +0 -0
  157. package/dist/docs-copy-page-B1HSXqlm.js +3 -0
  158. package/dist/docs-copy-page-B1HSXqlm.js.map +1 -0
  159. package/dist/docs-copy-page-rZ3GkUUQ.d.ts +13 -0
  160. package/dist/docs-copy-page-rZ3GkUUQ.d.ts.map +1 -0
  161. package/dist/docs-pager-2p2cKZcg.js +2 -0
  162. package/dist/docs-pager-2p2cKZcg.js.map +1 -0
  163. package/dist/docs-pager-CLERxm13.d.ts +25 -0
  164. package/dist/docs-pager-CLERxm13.d.ts.map +1 -0
  165. package/dist/docs-sidebar-C4HMPDIN.d.ts +30 -0
  166. package/dist/docs-sidebar-C4HMPDIN.d.ts.map +1 -0
  167. package/dist/docs-sidebar-Cq7haHti.js +2 -0
  168. package/dist/docs-sidebar-Cq7haHti.js.map +1 -0
  169. package/dist/docs-toc-B4_Znnrj.d.ts +13 -0
  170. package/dist/docs-toc-B4_Znnrj.d.ts.map +1 -0
  171. package/dist/docs-toc-DfQz3sNZ.js +2 -0
  172. package/dist/docs-toc-DfQz3sNZ.js.map +1 -0
  173. package/dist/events-BKAEw9TQ.d.ts +25 -0
  174. package/dist/events-BKAEw9TQ.d.ts.map +1 -0
  175. package/dist/events-D55YvIRi.js +2 -0
  176. package/dist/events-D55YvIRi.js.map +1 -0
  177. package/dist/figcaption-block-B7CmTI6d.d.ts +11 -0
  178. package/dist/figcaption-block-B7CmTI6d.d.ts.map +1 -0
  179. package/dist/figcaption-block-DWZhs-6i.js +2 -0
  180. package/dist/figcaption-block-DWZhs-6i.js.map +1 -0
  181. package/dist/framework-docs-ZYLz3BBy.js +2 -0
  182. package/dist/framework-docs-ZYLz3BBy.js.map +1 -0
  183. package/dist/framework-docs-tYKaeYsi.d.ts +13 -0
  184. package/dist/framework-docs-tYKaeYsi.d.ts.map +1 -0
  185. package/dist/header-shell-BusaKA4C.d.ts +39 -0
  186. package/dist/header-shell-BusaKA4C.d.ts.map +1 -0
  187. package/dist/header-shell-CWHnv2ot.js +2 -0
  188. package/dist/header-shell-CWHnv2ot.js.map +1 -0
  189. package/dist/hooks/index.d.ts +8 -0
  190. package/dist/hooks/index.js +1 -0
  191. package/dist/hooks/use-colors.d.ts +3 -0
  192. package/dist/hooks/use-colors.js +1 -0
  193. package/dist/hooks/use-config.d.ts +2 -0
  194. package/dist/hooks/use-config.js +1 -0
  195. package/dist/hooks/use-lift-mode.d.ts +2 -0
  196. package/dist/hooks/use-lift-mode.js +1 -0
  197. package/dist/hooks/use-meta-colors.d.ts +2 -0
  198. package/dist/hooks/use-meta-colors.js +1 -0
  199. package/dist/hooks/use-mounted.d.ts +2 -0
  200. package/dist/hooks/use-mounted.js +1 -0
  201. package/dist/hooks/use-themes-config.d.ts +2 -0
  202. package/dist/hooks/use-themes-config.js +1 -0
  203. package/dist/icons-BqnlXRgx.d.ts +30 -0
  204. package/dist/icons-BqnlXRgx.d.ts.map +1 -0
  205. package/dist/icons-bFf026bR.js +2 -0
  206. package/dist/icons-bFf026bR.js.map +1 -0
  207. package/dist/index-2mWOLEIP.d.ts +7 -0
  208. package/dist/index-2mWOLEIP.d.ts.map +1 -0
  209. package/dist/index-BZ1Usw1L.d.ts +8 -0
  210. package/dist/index-BZ1Usw1L.d.ts.map +1 -0
  211. package/dist/index-Bunxo_8h.d.ts +8 -0
  212. package/dist/index-Bunxo_8h.d.ts.map +1 -0
  213. package/dist/index-BwEOYyLd.d.ts +1 -0
  214. package/dist/index-CJOkJMYm.d.ts +1 -0
  215. package/dist/index-Cp46Zvz-.d.ts +1 -0
  216. package/dist/index-CsVdkYso.d.ts +1 -0
  217. package/dist/index-DIk3-d3u.d.ts +1 -0
  218. package/dist/index-LAzYY5Wa.d.ts +1 -0
  219. package/dist/index-k586z2Y3.d.ts +1 -0
  220. package/dist/index-mj9Ys67i.d.ts +1 -0
  221. package/dist/index-otwxHF3U.d.ts +1 -0
  222. package/dist/index.d.ts +11 -0
  223. package/dist/index.js +1 -0
  224. package/dist/layouts-hVp-aKom.js +0 -0
  225. package/dist/lib/charts.d.ts +2 -0
  226. package/dist/lib/charts.js +1 -0
  227. package/dist/lib/colors.d.ts +2 -0
  228. package/dist/lib/colors.js +1 -0
  229. package/dist/lib/events.d.ts +2 -0
  230. package/dist/lib/events.js +1 -0
  231. package/dist/lib/index.d.ts +6 -0
  232. package/dist/lib/index.js +1 -0
  233. package/dist/lib/registry-colors-data.d.ts +229 -0
  234. package/dist/lib/registry-colors-data.d.ts.map +1 -0
  235. package/dist/lib/registry-colors-data.js +1 -0
  236. package/dist/lib/registry-styles.d.ts +2 -0
  237. package/dist/lib/registry-styles.js +1 -0
  238. package/dist/lib/themes.d.ts +2 -0
  239. package/dist/lib/themes.js +1 -0
  240. package/dist/lib/utils.d.ts +2 -0
  241. package/dist/lib/utils.js +1 -0
  242. package/dist/main-nav-Df2pgQUs.js +2 -0
  243. package/dist/main-nav-Df2pgQUs.js.map +1 -0
  244. package/dist/main-nav-SathVgSN.d.ts +7 -0
  245. package/dist/main-nav-SathVgSN.d.ts.map +1 -0
  246. package/dist/mdx-CBnfwESR.d.ts +12 -0
  247. package/dist/mdx-CBnfwESR.d.ts.map +1 -0
  248. package/dist/mdx-components-BoD1jTr7.js +0 -0
  249. package/dist/mdx-cqn1ggXI.js +2 -0
  250. package/dist/mdx-cqn1ggXI.js.map +1 -0
  251. package/dist/metadata-plugin-Ag61IUUu.d.ts +7 -0
  252. package/dist/metadata-plugin-Ag61IUUu.d.ts.map +1 -0
  253. package/dist/metadata-plugin-Mc8lCfYT.js +2 -0
  254. package/dist/metadata-plugin-Mc8lCfYT.js.map +1 -0
  255. package/dist/mobile-nav-DRQtHK-O.js +2 -0
  256. package/dist/mobile-nav-DRQtHK-O.js.map +1 -0
  257. package/dist/mobile-nav-hEfoD2ld.d.ts +7 -0
  258. package/dist/mobile-nav-hEfoD2ld.d.ts.map +1 -0
  259. package/dist/mode-toggle-BcPx4Vfk.d.ts +7 -0
  260. package/dist/mode-toggle-BcPx4Vfk.d.ts.map +1 -0
  261. package/dist/mode-toggle-CGGAaMUK.js +2 -0
  262. package/dist/mode-toggle-CGGAaMUK.js.map +1 -0
  263. package/dist/nav-0JAtUIst.d.ts +18 -0
  264. package/dist/nav-0JAtUIst.d.ts.map +1 -0
  265. package/dist/nav-6wUjcK0K.js +0 -0
  266. package/dist/page-header-BGKsl1LK.js +2 -0
  267. package/dist/page-header-BGKsl1LK.js.map +1 -0
  268. package/dist/page-header-Brw3423H.d.ts +23 -0
  269. package/dist/page-header-Brw3423H.d.ts.map +1 -0
  270. package/dist/pre-block-BThyCz1h.js +2 -0
  271. package/dist/pre-block-BThyCz1h.js.map +1 -0
  272. package/dist/pre-block-CTP3z9eq.d.ts +33 -0
  273. package/dist/pre-block-CTP3z9eq.d.ts.map +1 -0
  274. package/dist/providers-BU3xm7I4.d.ts +11 -0
  275. package/dist/providers-BU3xm7I4.d.ts.map +1 -0
  276. package/dist/providers-fDpVqSs8.js +2 -0
  277. package/dist/providers-fDpVqSs8.js.map +1 -0
  278. package/dist/registry-colors-data-FyxAihEQ.js +2 -0
  279. package/dist/registry-colors-data-FyxAihEQ.js.map +1 -0
  280. package/dist/registry-styles-Cm1HpC4C.js +2 -0
  281. package/dist/registry-styles-Cm1HpC4C.js.map +1 -0
  282. package/dist/registry-styles-WvCGd0xY.d.ts +9 -0
  283. package/dist/registry-styles-WvCGd0xY.d.ts.map +1 -0
  284. package/dist/rehype-pre-block-source-Bz3-G4tr.js +2 -0
  285. package/dist/rehype-pre-block-source-Bz3-G4tr.js.map +1 -0
  286. package/dist/rehype-pre-block-source-Le9z9RN8.d.ts +7 -0
  287. package/dist/rehype-pre-block-source-Le9z9RN8.d.ts.map +1 -0
  288. package/dist/rehype-title-C1q6PbyG.js +2 -0
  289. package/dist/rehype-title-C1q6PbyG.js.map +1 -0
  290. package/dist/rehype-title-Dwt_OKnR.d.ts +7 -0
  291. package/dist/rehype-title-Dwt_OKnR.d.ts.map +1 -0
  292. package/dist/site-footer-CsUC-l-l.js +2 -0
  293. package/dist/site-footer-CsUC-l-l.js.map +1 -0
  294. package/dist/site-header-Bi3-9Kl3.js +2 -0
  295. package/dist/site-header-Bi3-9Kl3.js.map +1 -0
  296. package/dist/style-switcher-BXEGTMW2.d.ts +12 -0
  297. package/dist/style-switcher-BXEGTMW2.d.ts.map +1 -0
  298. package/dist/style-switcher-CpcMcuwL.js +2 -0
  299. package/dist/style-switcher-CpcMcuwL.js.map +1 -0
  300. package/dist/styles/base.css +156 -0
  301. package/dist/styles/docs.css +186 -0
  302. package/dist/styles/mdx.css +205 -0
  303. package/dist/table-B1hJe5kw.d.ts +10 -0
  304. package/dist/table-B1hJe5kw.d.ts.map +1 -0
  305. package/dist/table-Sc60jiil.js +2 -0
  306. package/dist/table-Sc60jiil.js.map +1 -0
  307. package/dist/tabs-DWxNPhgN.d.ts +23 -0
  308. package/dist/tabs-DWxNPhgN.d.ts.map +1 -0
  309. package/dist/tabs-KvYm5au9.js +2 -0
  310. package/dist/tabs-KvYm5au9.js.map +1 -0
  311. package/dist/tailwind-indicator-CV2jUfip.js +2 -0
  312. package/dist/tailwind-indicator-CV2jUfip.js.map +1 -0
  313. package/dist/themes-Dg5GgDgK.js +0 -0
  314. package/dist/themes-DsvojWlq.js +2 -0
  315. package/dist/themes-DsvojWlq.js.map +1 -0
  316. package/dist/themes-dv8YVpXg.d.ts +495 -0
  317. package/dist/themes-dv8YVpXg.d.ts.map +1 -0
  318. package/dist/typepography-B_jjjv9F.d.ts +54 -0
  319. package/dist/typepography-B_jjjv9F.d.ts.map +1 -0
  320. package/dist/typepography-Btk-lJ3O.js +2 -0
  321. package/dist/typepography-Btk-lJ3O.js.map +1 -0
  322. package/dist/types/index.d.ts +4 -0
  323. package/dist/types/index.js +0 -0
  324. package/dist/types/nav.d.ts +2 -0
  325. package/dist/types/nav.js +0 -0
  326. package/dist/types/unist.d.ts +2 -0
  327. package/dist/types/unist.js +0 -0
  328. package/dist/unist-Bs-H_R8g.d.ts +40 -0
  329. package/dist/unist-Bs-H_R8g.d.ts.map +1 -0
  330. package/dist/unist-DpNAVhDX.js +0 -0
  331. package/dist/use-colors-CeiLGCjZ.d.ts +13 -0
  332. package/dist/use-colors-CeiLGCjZ.d.ts.map +1 -0
  333. package/dist/use-colors-JhoQAYK2.js +2 -0
  334. package/dist/use-colors-JhoQAYK2.js.map +1 -0
  335. package/dist/use-config-CFygUPAg.d.ts +13 -0
  336. package/dist/use-config-CFygUPAg.d.ts.map +1 -0
  337. package/dist/use-config-D1zkiIbf.js +2 -0
  338. package/dist/use-config-D1zkiIbf.js.map +1 -0
  339. package/dist/use-lift-mode-Dya2HcpU.js +2 -0
  340. package/dist/use-lift-mode-Dya2HcpU.js.map +1 -0
  341. package/dist/use-lift-mode-IpZRia0D.d.ts +8 -0
  342. package/dist/use-lift-mode-IpZRia0D.d.ts.map +1 -0
  343. package/dist/use-meta-colors-BhIhFzvx.js +2 -0
  344. package/dist/use-meta-colors-BhIhFzvx.js.map +1 -0
  345. package/dist/use-meta-colors-C8OegAZO.d.ts +8 -0
  346. package/dist/use-meta-colors-C8OegAZO.d.ts.map +1 -0
  347. package/dist/use-mounted-D25Cx8rc.d.ts +5 -0
  348. package/dist/use-mounted-D25Cx8rc.d.ts.map +1 -0
  349. package/dist/use-mounted-SpB3P6Vt.js +2 -0
  350. package/dist/use-mounted-SpB3P6Vt.js.map +1 -0
  351. package/dist/use-themes-config-Bo-JZDNU.js +2 -0
  352. package/dist/use-themes-config-Bo-JZDNU.js.map +1 -0
  353. package/dist/use-themes-config-DfQCuhPn.d.ts +14 -0
  354. package/dist/use-themes-config-DfQCuhPn.d.ts.map +1 -0
  355. package/dist/utils-CMPpWmbv.d.ts +9 -0
  356. package/dist/utils-CMPpWmbv.d.ts.map +1 -0
  357. package/dist/utils-NjSy-iOL.js +2 -0
  358. package/dist/utils-NjSy-iOL.js.map +1 -0
  359. package/dist/velite/browser.d.ts +11 -0
  360. package/dist/velite/browser.d.ts.map +1 -0
  361. package/dist/velite/browser.js +2 -0
  362. package/dist/velite/browser.js.map +1 -0
  363. package/dist/velite/config.d.ts +21 -0
  364. package/dist/velite/config.d.ts.map +1 -0
  365. package/dist/velite/config.js +2 -0
  366. package/dist/velite/config.js.map +1 -0
  367. package/dist/velite/index.d.ts +10 -0
  368. package/dist/velite/index.js +1 -0
  369. package/dist/velite/plugins/index.d.ts +6 -0
  370. package/dist/velite/plugins/index.js +1 -0
  371. package/dist/velite/plugins/metadata-plugin.d.ts +4 -0
  372. package/dist/velite/plugins/metadata-plugin.js +1 -0
  373. package/dist/velite/plugins/rehype-pre-block-source.d.ts +4 -0
  374. package/dist/velite/plugins/rehype-pre-block-source.js +1 -0
  375. package/dist/velite/plugins/rehype-title.d.ts +4 -0
  376. package/dist/velite/plugins/rehype-title.js +1 -0
  377. package/dist/velite/rehype-npm-command.d.ts +8 -0
  378. package/dist/velite/rehype-npm-command.d.ts.map +1 -0
  379. package/dist/velite/rehype-npm-command.js +2 -0
  380. package/dist/velite/rehype-npm-command.js.map +1 -0
  381. package/dist/velite/utils.d.ts +5 -0
  382. package/dist/velite/utils.d.ts.map +1 -0
  383. package/dist/velite/utils.js +2 -0
  384. package/dist/velite/utils.js.map +1 -0
  385. package/package.json +174 -0
  386. package/src/client.ts +5 -0
  387. package/src/components/copy-button/copy-button.tsx +88 -0
  388. package/src/components/copy-button/copy-button.types.ts +17 -0
  389. package/src/components/copy-button/index.ts +2 -0
  390. package/src/components/docs/docs-copy-page.tsx +106 -0
  391. package/src/components/docs/docs-pager.tsx +114 -0
  392. package/src/components/docs/docs-sidebar.tsx +104 -0
  393. package/src/components/docs/docs-toc.tsx +104 -0
  394. package/src/components/docs/index.ts +4 -0
  395. package/src/components/icons.tsx +194 -0
  396. package/src/components/index.ts +13 -0
  397. package/src/components/layouts/command-menu/command-menu.tsx +166 -0
  398. package/src/components/layouts/command-menu/index.ts +1 -0
  399. package/src/components/layouts/index.ts +4 -0
  400. package/src/components/layouts/site-footer/index.tsx +70 -0
  401. package/src/components/layouts/site-header/header-shell.tsx +75 -0
  402. package/src/components/layouts/site-header/index.tsx +121 -0
  403. package/src/components/layouts/tailwind-indicator/index.tsx +16 -0
  404. package/src/components/main-nav.tsx +33 -0
  405. package/src/components/mdx/mdx-components/callout.tsx +17 -0
  406. package/src/components/mdx/mdx-components/code/code-block-wrapper.tsx +12 -0
  407. package/src/components/mdx/mdx-components/code/code-block.tsx +30 -0
  408. package/src/components/mdx/mdx-components/code/code-preview.tsx +80 -0
  409. package/src/components/mdx/mdx-components/code/component-preview.tsx +161 -0
  410. package/src/components/mdx/mdx-components/code/component-source.tsx +54 -0
  411. package/src/components/mdx/mdx-components/code/figcaption-block.tsx +25 -0
  412. package/src/components/mdx/mdx-components/code/index.ts +7 -0
  413. package/src/components/mdx/mdx-components/code/pre-block.tsx +103 -0
  414. package/src/components/mdx/mdx-components/code/span-block.tsx +13 -0
  415. package/src/components/mdx/mdx-components/components-list.tsx +23 -0
  416. package/src/components/mdx/mdx-components/exalidraw.tsx +12 -0
  417. package/src/components/mdx/mdx-components/framework-docs.tsx +20 -0
  418. package/src/components/mdx/mdx-components/index.ts +7 -0
  419. package/src/components/mdx/mdx-components/table.tsx +35 -0
  420. package/src/components/mdx/mdx-components/tabs.tsx +32 -0
  421. package/src/components/mdx/mdx-components/typepography.tsx +70 -0
  422. package/src/components/mdx/mdx.tsx +103 -0
  423. package/src/components/mobile-nav.tsx +91 -0
  424. package/src/components/mode-toggle.tsx +41 -0
  425. package/src/components/page-header.tsx +42 -0
  426. package/src/components/providers.tsx +14 -0
  427. package/src/components/themes/index.ts +1 -0
  428. package/src/components/themes/style-switcher.tsx +35 -0
  429. package/src/context/context.tsx +66 -0
  430. package/src/context/context.types.ts +55 -0
  431. package/src/context/index.ts +2 -0
  432. package/src/hooks/index.ts +6 -0
  433. package/src/hooks/use-colors.ts +27 -0
  434. package/src/hooks/use-config.ts +19 -0
  435. package/src/hooks/use-lift-mode.ts +19 -0
  436. package/src/hooks/use-meta-colors.ts +27 -0
  437. package/src/hooks/use-mounted.ts +11 -0
  438. package/src/hooks/use-themes-config.ts +17 -0
  439. package/src/index.ts +10 -0
  440. package/src/lib/charts.ts +23 -0
  441. package/src/lib/colors.ts +86 -0
  442. package/src/lib/events.ts +30 -0
  443. package/src/lib/index.ts +5 -0
  444. package/src/lib/registry-colors-data.ts +1810 -0
  445. package/src/lib/registry-styles.ts +8 -0
  446. package/src/lib/themes.ts +482 -0
  447. package/src/lib/utils.ts +42 -0
  448. package/src/styles/base.css +156 -0
  449. package/src/styles/docs.css +186 -0
  450. package/src/styles/mdx.css +205 -0
  451. package/src/types/index.ts +2 -0
  452. package/src/types/nav.ts +17 -0
  453. package/src/types/unist.ts +39 -0
  454. package/src/velite/browser.ts +11 -0
  455. package/src/velite/config.ts +118 -0
  456. package/src/velite/index.ts +5 -0
  457. package/src/velite/plugins/index.ts +3 -0
  458. package/src/velite/plugins/metadata-plugin.ts +26 -0
  459. package/src/velite/plugins/rehype-pre-block-source.ts +25 -0
  460. package/src/velite/plugins/rehype-title.ts +24 -0
  461. package/src/velite/rehype-npm-command.ts +42 -0
  462. package/src/velite/utils.ts +9 -0
@@ -0,0 +1,13 @@
1
+ import { cn } from '@gentleduck/libs/cn'
2
+
3
+ export function SpanBlock({ className, children, ...props }: React.HTMLAttributes<HTMLSpanElement>) {
4
+ return isLineComment(children?.toString()!) ? null : (
5
+ <span className={cn(className)} {...props}>
6
+ {children}
7
+ </span>
8
+ )
9
+ }
10
+ function isLineComment(str: string): boolean {
11
+ // Matches strings starting with // followed by optional space and text
12
+ return /^\/\/.*$/.test(str)
13
+ }
@@ -0,0 +1,23 @@
1
+ 'use client'
2
+
3
+ import { type DocsEntry, useDocsEntries } from '@duck-docs/context'
4
+ import Link from 'next/link'
5
+
6
+ export function ComponentsList({ components }: { components?: DocsEntry[] }) {
7
+ const docs = useDocsEntries()
8
+ const resolved = components ?? docs ?? []
9
+ const list = resolved.filter((doc) => doc.component)
10
+
11
+ return (
12
+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 md:gap-x-8 lg:gap-x-16 lg:gap-y-6 xl:gap-x-20">
13
+ {list.map((component) => (
14
+ <Link
15
+ className="font-medium text-lg underline-offset-4 hover:underline md:text-base"
16
+ href={component.permalink ?? component.slug}
17
+ key={component.title}>
18
+ {component.title}
19
+ </Link>
20
+ ))}
21
+ </div>
22
+ )
23
+ }
@@ -0,0 +1,12 @@
1
+ 'use client'
2
+ import { Excalidraw } from '@excalidraw/excalidraw'
3
+
4
+ export function Exalidraw() {
5
+ return (
6
+ <>
7
+ <div className="h-[500px] w-full">
8
+ <Excalidraw />
9
+ </div>
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,20 @@
1
+ 'use client'
2
+
3
+ import { Mdx } from '@duck-docs/components/mdx/mdx'
4
+ import { useDocsEntries } from '@duck-docs/context'
5
+ import type * as React from 'react'
6
+
7
+ interface FrameworkDocsProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ data: string
9
+ }
10
+
11
+ export function FrameworkDocs({ ...props }: FrameworkDocsProps) {
12
+ const docs = useDocsEntries() ?? []
13
+ const frameworkDoc = docs.find((doc) => doc.slug === `/docs/installation/${props.data}`)
14
+
15
+ if (!frameworkDoc?.content) {
16
+ return null
17
+ }
18
+
19
+ return <Mdx code={frameworkDoc.content} />
20
+ }
@@ -0,0 +1,7 @@
1
+ export * from './callout'
2
+ export * from './code'
3
+ export * from './components-list'
4
+ export * from './framework-docs'
5
+ export * from './table'
6
+ export * from './tabs'
7
+ export * from './typepography'
@@ -0,0 +1,35 @@
1
+ import { cn } from '@gentleduck/libs/cn'
2
+ import type { FC } from 'react'
3
+
4
+ export const Table: FC<React.HTMLAttributes<HTMLTableElement>> = ({ className, ...props }) => (
5
+ <div className="my-6 w-full rounded-lg border">
6
+ <table
7
+ className={cn(
8
+ 'relative w-full overflow-hidden border-none text-sm [&_tbody_tr:last-child]:border-b-0',
9
+ className,
10
+ )}
11
+ {...props}
12
+ />
13
+ </div>
14
+ )
15
+
16
+ export const TableRow: FC<React.HTMLAttributes<HTMLTableRowElement>> = ({ className, ...props }) => (
17
+ <tr className={cn('m-0 border-b', className)} {...props} />
18
+ )
19
+
20
+ export const TableHeader: FC<React.HTMLAttributes<HTMLTableCellElement>> = ({ className, ...props }) => (
21
+ <th
22
+ className={cn('px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right', className)}
23
+ {...props}
24
+ />
25
+ )
26
+
27
+ export const TableCell: FC<React.HTMLAttributes<HTMLTableCellElement>> = ({ className, ...props }) => (
28
+ <td
29
+ className={cn(
30
+ 'whitespace-nowrap px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right',
31
+ className,
32
+ )}
33
+ {...props}
34
+ />
35
+ )
@@ -0,0 +1,32 @@
1
+ import { cn } from '@gentleduck/libs/cn'
2
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@gentleduck/registry-ui-duckui/tabs'
3
+
4
+ export function Tab({ className, ...props }: React.ComponentProps<typeof Tabs>) {
5
+ return <Tabs className={cn('relative mt-6 w-full', className)} {...props} />
6
+ }
7
+
8
+ export function TabList({ className, ...props }: React.ComponentProps<typeof TabsList>) {
9
+ return (
10
+ <TabsList className={cn('w-full justify-start rounded-none border-b bg-transparent p-0', className)} {...props} />
11
+ )
12
+ }
13
+ export function TabTrigger({ className, ...props }: React.ComponentProps<typeof TabsTrigger>) {
14
+ return (
15
+ <TabsTrigger
16
+ className={cn(
17
+ "cursor-pointer rounded-none border-b-[2px] border-b-transparent px-12 py-2 font-semibold [&[aria-selected='true']]:border-b-primary [&[aria-selected='true']]:shadow-none",
18
+ className,
19
+ )}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ export function TabContent({ className, ...props }: React.ComponentProps<typeof TabsContent>) {
26
+ return (
27
+ <TabsContent
28
+ className={cn('relative [&_h3.font-heading]:font-semibold [&_h3.font-heading]:text-base', className)}
29
+ {...props}
30
+ />
31
+ )
32
+ }
@@ -0,0 +1,70 @@
1
+ import { cn } from '@gentleduck/libs/cn'
2
+ import Link from 'next/link'
3
+ import type React from 'react'
4
+
5
+ interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {}
6
+ interface AnchorProps extends React.HTMLAttributes<HTMLAnchorElement> {}
7
+ interface ParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {}
8
+
9
+ export function H1({ className, ...props }: HeadingProps) {
10
+ return <h1 className={cn('mt-2 scroll-m-20 font-bold font-heading text-4xl', className)} {...props} />
11
+ }
12
+
13
+ export function H2({ className, ...props }: HeadingProps) {
14
+ return (
15
+ <h2
16
+ className={cn(
17
+ 'mt-12 scroll-m-20 border-b pb-2 font-heading font-semibold text-2xl tracking-tight first:mt-0',
18
+ className,
19
+ )}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ export function H3({ className, ...props }: HeadingProps) {
26
+ return (
27
+ <h3 className={cn('mt-8 scroll-m-20 font-heading font-semibold text-xl tracking-tight', className)} {...props} />
28
+ )
29
+ }
30
+
31
+ export function H4({ className, ...props }: HeadingProps) {
32
+ return (
33
+ <h4 className={cn('mt-8 scroll-m-20 font-heading font-semibold text-lg tracking-tight', className)} {...props} />
34
+ )
35
+ }
36
+
37
+ export function H5({ className, ...props }: HeadingProps) {
38
+ return <h5 className={cn('mt-8 scroll-m-20 font-semibold text-lg tracking-tight', className)} {...props} />
39
+ }
40
+
41
+ export function H6({ className, ...props }: HeadingProps) {
42
+ return <h6 className={cn('mt-8 scroll-m-20 font-semibold text-base tracking-tight', className)} {...props} />
43
+ }
44
+
45
+ export function A({ className, ...props }: AnchorProps) {
46
+ return <a className={cn('font-medium underline underline-offset-4', className)} {...props} />
47
+ }
48
+
49
+ export function P({ className, ...props }: ParagraphProps) {
50
+ return <p className={cn('leading-7 [&:not(:first-child)]:mt-6', className)} {...props} />
51
+ }
52
+
53
+ export function LinkBlock({ className, ...props }: React.ComponentProps<typeof Link>) {
54
+ return <Link className={cn('font-medium underline underline-offset-4', className)} {...props} />
55
+ }
56
+ export function LinkedCard({ className, ...props }: React.ComponentProps<typeof Link>) {
57
+ return (
58
+ <Link
59
+ className={cn(
60
+ 'flex w-full flex-col items-center rounded-xl border bg-card p-6 text-card-foreground shadow transition-colors hover:bg-muted/50 sm:p-10',
61
+ className,
62
+ )}
63
+ {...props}
64
+ />
65
+ )
66
+ }
67
+
68
+ export function Hr({ ...props }: React.HTMLAttributes<HTMLHRElement>) {
69
+ return <hr className="my-4 md:my-8" {...props} />
70
+ }
@@ -0,0 +1,103 @@
1
+ 'use client'
2
+
3
+ import { cn } from '@gentleduck/libs/cn'
4
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@gentleduck/registry-ui-duckui/accordion'
5
+ import { Alert, AlertDescription, AlertTitle } from '@gentleduck/registry-ui-duckui/alert'
6
+ import { AspectRatio } from '@gentleduck/registry-ui-duckui/aspect-ratio'
7
+ import { Badge } from '@gentleduck/registry-ui-duckui/badge'
8
+ import { Button } from '@gentleduck/registry-ui-duckui/button'
9
+ import { Kbd } from '@gentleduck/registry-ui-duckui/kbd'
10
+ import Image from 'next/image'
11
+ import type * as React from 'react'
12
+ import runtime from 'react/jsx-runtime'
13
+ import { Callout } from './mdx-components/callout'
14
+ import { CodeBlock, CodeBlockWrapper, ComponentPreview, ComponentSource, PreBlock } from './mdx-components/code'
15
+ import { FigcaptionBlock } from './mdx-components/code/figcaption-block'
16
+ import { ComponentsList } from './mdx-components/components-list'
17
+ import { Table, TableCell, TableHeader, TableRow } from './mdx-components/table'
18
+ import { Tab, TabContent, TabList, TabTrigger } from './mdx-components/tabs'
19
+ import { A, H1, H2, H3, H4, H5, H6, Hr, LinkBlock, LinkedCard, P } from './mdx-components/typepography'
20
+
21
+ const useMDXComponent = (code: string) => {
22
+ const fn = new Function(code)
23
+ return fn({ ...runtime }).default
24
+ }
25
+
26
+ const components = {
27
+ Accordion,
28
+ AccordionContent,
29
+ AccordionItem,
30
+ AccordionTrigger,
31
+ Alert,
32
+ AlertDescription,
33
+ AlertTitle,
34
+ AspectRatio,
35
+ a: A,
36
+ Badge,
37
+ Button,
38
+ blockquote: ({ className, ...props }: React.HTMLAttributes<HTMLElement>) => (
39
+ <blockquote className={cn('mt-6 border-l-2 pl-6 italic', className)} {...props} />
40
+ ),
41
+ Callout,
42
+ CodeBlockWrapper,
43
+ ComponentPreview,
44
+ ComponentSource,
45
+ ComponentsList,
46
+ code: CodeBlock,
47
+ figcaption: FigcaptionBlock,
48
+ h1: H1,
49
+ h2: H2,
50
+ h3: H3,
51
+ h4: H4,
52
+ h5: H5,
53
+ h6: H6,
54
+ hr: Hr,
55
+ // span: SpanBlock,
56
+ Image,
57
+ img: ({ className, alt, ...props }: React.ImgHTMLAttributes<HTMLImageElement>) => (
58
+ <img alt={alt} className={cn('rounded-md', className)} {...props} />
59
+ ),
60
+ Kbd: Kbd,
61
+ Link: LinkBlock,
62
+ LinkedCard,
63
+ li: ({ className, ...props }: React.HTMLAttributes<HTMLElement>) => (
64
+ <li className={cn('mt-2', className)} {...props} />
65
+ ),
66
+ ol: ({ className, ...props }: React.HTMLAttributes<HTMLOListElement>) => (
67
+ <ol className={cn('my-6 ml-6 list-decimal', className)} {...props} />
68
+ ),
69
+ p: P,
70
+ pre: PreBlock,
71
+ Step: ({ className, ...props }: React.ComponentProps<'h3'>) => (
72
+ <h3 className={cn('step scroll-m-20 font-heading font-semibold text-xl tracking-tight', className)} {...props} />
73
+ ),
74
+ Steps: ({ ...props }) => (
75
+ <div className="[&>h3]:step steps mb-12 ml-4 border-l pl-8 [counter-reset:step]" {...props} />
76
+ ),
77
+ Tabs: Tab,
78
+ TabsContent: TabContent,
79
+ TabsList: TabList,
80
+ TabsTrigger: TabTrigger,
81
+ table: Table,
82
+ td: TableCell,
83
+ th: TableHeader,
84
+ tr: TableRow,
85
+ ul: ({ className, ...props }: React.HTMLAttributes<HTMLUListElement>) => (
86
+ <ul className={cn('my-6 ml-6 list-disc', className)} {...props} />
87
+ ),
88
+ // FrameworkDocs,
89
+ }
90
+
91
+ interface MdxProps {
92
+ code: string
93
+ }
94
+
95
+ export function Mdx({ code }: MdxProps) {
96
+ const Component = useMDXComponent(code)
97
+
98
+ return (
99
+ <div className="mdx">
100
+ <Component components={components} />
101
+ </div>
102
+ )
103
+ }
@@ -0,0 +1,91 @@
1
+ 'use client'
2
+
3
+ import { useDocsConfig } from '@duck-docs/context'
4
+ import { cn } from '@gentleduck/libs/cn'
5
+ import { Button } from '@gentleduck/registry-ui-duckui/button'
6
+ import { Drawer, DrawerContent, DrawerTrigger } from '@gentleduck/registry-ui-duckui/drawer'
7
+ import { ScrollArea } from '@gentleduck/registry-ui-duckui/scroll-area'
8
+ import { PanelsTopLeft } from 'lucide-react'
9
+ import Link, { type LinkProps } from 'next/link'
10
+ import { useRouter } from 'next/navigation'
11
+ import * as React from 'react'
12
+
13
+ export function MobileNav() {
14
+ const [open, setOpen] = React.useState(false)
15
+ const docsConfig = useDocsConfig()
16
+
17
+ return (
18
+ <Drawer onOpenChange={setOpen} open={open}>
19
+ <DrawerTrigger asChild>
20
+ <Button
21
+ className="mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
22
+ icon={<PanelsTopLeft />}
23
+ size={'icon'}
24
+ variant="ghost"></Button>
25
+ </DrawerTrigger>
26
+ <DrawerContent className="pr-0 pb-4">
27
+ <ScrollArea>
28
+ <div className="hide-scroll my-4 h-[calc(100vh-8rem)] pb-10 pl-6">
29
+ <div className="flex flex-col space-y-3">
30
+ {docsConfig.mainNav?.map(
31
+ (item) =>
32
+ item.href && (
33
+ <MobileLink href={item.href} key={item.href} onOpenChange={setOpen}>
34
+ {item.title}
35
+ </MobileLink>
36
+ ),
37
+ )}
38
+ </div>
39
+ <div className="flex flex-col space-y-2">
40
+ {docsConfig.sidebarNav.map((item, index) => (
41
+ <div className="flex flex-col space-y-3 pt-6" key={index}>
42
+ <h4 className="font-medium">{item.title}</h4>
43
+ {item?.items?.length &&
44
+ item.items.map((item) => (
45
+ <React.Fragment key={item.href}>
46
+ {!item.disabled &&
47
+ (item.href ? (
48
+ <MobileLink className="text-muted-foreground" href={item.href} onOpenChange={setOpen}>
49
+ {item.title}
50
+ {item.label && (
51
+ <span className="ml-2 rounded-md bg-primary px-1.5 py-0.5 text-accent text-xs leading-none no-underline group-hover:no-underline">
52
+ {item.label}
53
+ </span>
54
+ )}
55
+ </MobileLink>
56
+ ) : (
57
+ item.title
58
+ ))}
59
+ </React.Fragment>
60
+ ))}
61
+ </div>
62
+ ))}
63
+ </div>
64
+ </div>
65
+ </ScrollArea>
66
+ </DrawerContent>
67
+ </Drawer>
68
+ )
69
+ }
70
+
71
+ interface MobileLinkProps extends LinkProps {
72
+ onOpenChange?: (open: boolean) => void
73
+ children: React.ReactNode
74
+ className?: string
75
+ }
76
+
77
+ function MobileLink({ href, onOpenChange, className, children, ...props }: MobileLinkProps) {
78
+ const router = useRouter()
79
+ return (
80
+ <Link
81
+ className={cn(className)}
82
+ href={href}
83
+ onClick={() => {
84
+ router.push(href.toString())
85
+ onOpenChange?.(false)
86
+ }}
87
+ {...props}>
88
+ {children}
89
+ </Link>
90
+ )
91
+ }
@@ -0,0 +1,41 @@
1
+ 'use client'
2
+
3
+ import { useSiteConfig } from '@duck-docs/context'
4
+ import { useMetaColor } from '@duck-docs/hooks/use-meta-colors'
5
+ import { Button } from '@gentleduck/registry-ui-duckui/button'
6
+ import { MoonIcon, SunIcon } from 'lucide-react'
7
+ import { useTheme } from 'next-themes'
8
+ import * as React from 'react'
9
+
10
+ const DEFAULT_META_THEME_COLORS = {
11
+ dark: '#000000',
12
+ light: '#ffffff',
13
+ }
14
+
15
+ export function ModeSwitcher() {
16
+ const { setTheme, resolvedTheme } = useTheme()
17
+ const { setMetaColor } = useMetaColor()
18
+ const siteConfig = useSiteConfig()
19
+ const metaThemeColors = siteConfig.metaThemeColors ?? DEFAULT_META_THEME_COLORS
20
+
21
+ const toggleTheme = React.useCallback(() => {
22
+ setTheme(resolvedTheme === 'dark' ? 'light' : 'dark')
23
+ setMetaColor(resolvedTheme === 'dark' ? metaThemeColors.light : metaThemeColors.dark)
24
+ }, [resolvedTheme, setTheme, setMetaColor])
25
+
26
+ return (
27
+ <Button
28
+ aria-label="toggle theme"
29
+ className="group/toggle"
30
+ icon={
31
+ <>
32
+ <SunIcon className="hidden [html.dark_&]:block" />
33
+ <MoonIcon className="hidden [html.light_&]:block" />
34
+ </>
35
+ }
36
+ onClick={toggleTheme}
37
+ size={'icon'}
38
+ variant="ghost"
39
+ />
40
+ )
41
+ }
@@ -0,0 +1,42 @@
1
+ import { cn } from '@gentleduck/libs/cn'
2
+
3
+ function PageHeader({ className, children, ...props }: React.ComponentProps<'section'>) {
4
+ return (
5
+ <section className={cn('border-grid', className)} {...props}>
6
+ <div className="container-wrapper">
7
+ <div className="container flex flex-col items-center gap-2 py-[clamp(2rem,5vw,5rem)] text-center xl:gap-4">
8
+ {children}
9
+ </div>
10
+ </div>
11
+ </section>
12
+ )
13
+ }
14
+
15
+ function PageHeaderHeading({ className, ...props }: React.ComponentProps<'h1'>) {
16
+ return (
17
+ <h1
18
+ className={cn(
19
+ 'max-w-4xl text-balance font-semibold text-4xl text-primary uppercase leading-tighter tracking-tight lg:font-semibold lg:leading-[1.1] xl:text-5xl xl:tracking-tighter',
20
+ className,
21
+ )}
22
+ {...props}
23
+ />
24
+ )
25
+ }
26
+
27
+ function PageHeaderDescription({ className, ...props }: React.ComponentProps<'p'>) {
28
+ return (
29
+ <p className={cn('max-w-3xl text-balance text-accent-foreground/80 text-base sm:text-lg', className)} {...props} />
30
+ )
31
+ }
32
+
33
+ function PageActions({ className, ...props }: React.ComponentProps<'div'>) {
34
+ return (
35
+ <div
36
+ className={cn('flex w-full items-center justify-center gap-2 pt-2 **:data-[slot=button]:shadow-none', className)}
37
+ {...props}
38
+ />
39
+ )
40
+ }
41
+
42
+ export { PageActions, PageHeader, PageHeaderDescription, PageHeaderHeading }
@@ -0,0 +1,14 @@
1
+ 'use client'
2
+
3
+ import { Provider as JotaiProvider } from 'jotai'
4
+ import type { ThemeProviderProps } from 'next-themes'
5
+ import { ThemeProvider as NextThemesProvider } from 'next-themes'
6
+ import * as React from 'react'
7
+
8
+ export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
9
+ return (
10
+ <JotaiProvider>
11
+ <NextThemesProvider {...props}>{children}</NextThemesProvider>
12
+ </JotaiProvider>
13
+ )
14
+ }
@@ -0,0 +1 @@
1
+ export * from './style-switcher'
@@ -0,0 +1,35 @@
1
+ 'use client'
2
+
3
+ import { useConfig } from '@duck-docs/hooks/use-config'
4
+ import { type Style, styles } from '@duck-docs/lib/registry-styles'
5
+ import { cn } from '@gentleduck/libs/cn'
6
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@gentleduck/registry-ui-duckui/select'
7
+ import type * as React from 'react'
8
+
9
+ export function StyleSwitcher({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectTrigger>) {
10
+ const [config, setConfig] = useConfig()
11
+
12
+ return (
13
+ <Select
14
+ onValueChange={
15
+ ((value: Style['name']) =>
16
+ setConfig({
17
+ ...config,
18
+ style: value,
19
+ })) as never
20
+ }
21
+ value={config.style}>
22
+ <SelectTrigger className={cn('h-7 w-[145px] text-xs [&_svg]:h-4 [&_svg]:w-4', className)} {...props}>
23
+ <span className="text-muted-foreground">Style: </span>
24
+ <SelectValue placeholder="Select style" />
25
+ </SelectTrigger>
26
+ <SelectContent>
27
+ {styles.map((style) => (
28
+ <SelectItem className="text-xs" key={style.name} value={style.name}>
29
+ {style.label}
30
+ </SelectItem>
31
+ ))}
32
+ </SelectContent>
33
+ </Select>
34
+ )
35
+ }
@@ -0,0 +1,66 @@
1
+ 'use client'
2
+
3
+ import * as React from 'react'
4
+ import type { DocsConfig, DocsContextValue, DocsEntry, DocsSiteConfig, RegistryIndex } from './context.types'
5
+
6
+ const DocsContext = React.createContext<DocsContextValue | null>(null)
7
+
8
+ export function DocsProvider({
9
+ children,
10
+ docs,
11
+ docsConfig,
12
+ registryIndex,
13
+ siteConfig,
14
+ }: {
15
+ children: React.ReactNode
16
+ docs?: DocsEntry[]
17
+ docsConfig: DocsConfig
18
+ registryIndex?: RegistryIndex
19
+ siteConfig: DocsSiteConfig
20
+ }) {
21
+ const value = React.useMemo(
22
+ () => ({
23
+ docs,
24
+ docsConfig,
25
+ registryIndex,
26
+ siteConfig,
27
+ }),
28
+ [docs, docsConfig, registryIndex, siteConfig],
29
+ )
30
+
31
+ return <DocsContext.Provider value={value}>{children}</DocsContext.Provider>
32
+ }
33
+
34
+ export function useDocsContext() {
35
+ const context = React.useContext(DocsContext)
36
+ if (!context) {
37
+ throw new Error(
38
+ 'DocsProvider is missing. Wrap your app with <DocsProvider> from @gentleduck/docs and pass docsConfig and siteConfig.',
39
+ )
40
+ }
41
+ return context
42
+ }
43
+
44
+ export function useDocsConfig() {
45
+ const { docsConfig } = useDocsContext()
46
+ if (!docsConfig) {
47
+ throw new Error('DocsProvider is missing docsConfig. Pass docsConfig to <DocsProvider>.')
48
+ }
49
+ return docsConfig
50
+ }
51
+
52
+ export function useSiteConfig() {
53
+ const { siteConfig } = useDocsContext()
54
+ if (!siteConfig) {
55
+ throw new Error('DocsProvider is missing siteConfig. Pass siteConfig to <DocsProvider>.')
56
+ }
57
+ return siteConfig
58
+ }
59
+
60
+ export function useDocsEntries() {
61
+ return useDocsContext().docs
62
+ }
63
+
64
+ export function useRegistryIndex() {
65
+ return useDocsContext().registryIndex
66
+ }
@@ -0,0 +1,55 @@
1
+ import type { MainNavItem, SidebarNavItem } from '@duck-docs/types/nav'
2
+ export type DocsConfig = {
3
+ chartsNav?: SidebarNavItem[]
4
+ mainNav: MainNavItem[]
5
+ sidebarNav: SidebarNavItem[]
6
+ }
7
+
8
+ export type DocsSiteConfig = {
9
+ author?: {
10
+ name: string
11
+ url?: string
12
+ }
13
+ branding?: {
14
+ logoDark?: string
15
+ logoLight?: string
16
+ }
17
+ description?: string
18
+ githubRepo?: string
19
+ links?: {
20
+ email?: string
21
+ github?: string
22
+ twitter?: string
23
+ }
24
+ metaThemeColors?: {
25
+ dark: string
26
+ light: string
27
+ }
28
+ name: string
29
+ title?: string
30
+ url?: string
31
+ }
32
+
33
+ export type DocsEntry = {
34
+ component?: boolean
35
+ content?: string
36
+ permalink?: string
37
+ slug: string
38
+ title: string
39
+ toc?: TocEntry[]
40
+ }
41
+
42
+ export type TocEntry = {
43
+ items?: TocEntry[]
44
+ title: string
45
+ url: string
46
+ }
47
+
48
+ export type DocsContextValue = {
49
+ docs?: DocsEntry[]
50
+ docsConfig: DocsConfig
51
+ registryIndex?: RegistryIndex
52
+ siteConfig: DocsSiteConfig
53
+ }
54
+
55
+ export type RegistryIndex = Record<string, { component?: React.ComponentType } & Record<string, unknown>>
@@ -0,0 +1,2 @@
1
+ export * from './context'
2
+ export * from './context.types'