jamdesk 1.0.0

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 (435) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +323 -0
  3. package/bin/jamdesk.js +76 -0
  4. package/dist/__tests__/integration/deprecated-components.integration.test.d.ts +8 -0
  5. package/dist/__tests__/integration/deprecated-components.integration.test.d.ts.map +1 -0
  6. package/dist/__tests__/integration/deprecated-components.integration.test.js +165 -0
  7. package/dist/__tests__/integration/deprecated-components.integration.test.js.map +1 -0
  8. package/dist/__tests__/integration/migrate.integration.test.d.ts +2 -0
  9. package/dist/__tests__/integration/migrate.integration.test.d.ts.map +1 -0
  10. package/dist/__tests__/integration/migrate.integration.test.js +64 -0
  11. package/dist/__tests__/integration/migrate.integration.test.js.map +1 -0
  12. package/dist/__tests__/integration/prepublish.integration.test.d.ts +2 -0
  13. package/dist/__tests__/integration/prepublish.integration.test.d.ts.map +1 -0
  14. package/dist/__tests__/integration/prepublish.integration.test.js +27 -0
  15. package/dist/__tests__/integration/prepublish.integration.test.js.map +1 -0
  16. package/dist/__tests__/integration/validate.integration.test.d.ts +2 -0
  17. package/dist/__tests__/integration/validate.integration.test.d.ts.map +1 -0
  18. package/dist/__tests__/integration/validate.integration.test.js +56 -0
  19. package/dist/__tests__/integration/validate.integration.test.js.map +1 -0
  20. package/dist/__tests__/unit/deploy-templates.test.d.ts +2 -0
  21. package/dist/__tests__/unit/deploy-templates.test.d.ts.map +1 -0
  22. package/dist/__tests__/unit/deploy-templates.test.js +124 -0
  23. package/dist/__tests__/unit/deploy-templates.test.js.map +1 -0
  24. package/dist/__tests__/unit/deprecated-components-sync.test.d.ts +2 -0
  25. package/dist/__tests__/unit/deprecated-components-sync.test.d.ts.map +1 -0
  26. package/dist/__tests__/unit/deprecated-components-sync.test.js +69 -0
  27. package/dist/__tests__/unit/deprecated-components-sync.test.js.map +1 -0
  28. package/dist/__tests__/unit/deps-sync.test.d.ts +14 -0
  29. package/dist/__tests__/unit/deps-sync.test.d.ts.map +1 -0
  30. package/dist/__tests__/unit/deps-sync.test.js +166 -0
  31. package/dist/__tests__/unit/deps-sync.test.js.map +1 -0
  32. package/dist/__tests__/unit/docs-config.test.d.ts +2 -0
  33. package/dist/__tests__/unit/docs-config.test.d.ts.map +1 -0
  34. package/dist/__tests__/unit/docs-config.test.js +288 -0
  35. package/dist/__tests__/unit/docs-config.test.js.map +1 -0
  36. package/dist/__tests__/unit/errors.test.d.ts +2 -0
  37. package/dist/__tests__/unit/errors.test.d.ts.map +1 -0
  38. package/dist/__tests__/unit/errors.test.js +27 -0
  39. package/dist/__tests__/unit/errors.test.js.map +1 -0
  40. package/dist/__tests__/unit/extract-hooks.test.d.ts +5 -0
  41. package/dist/__tests__/unit/extract-hooks.test.d.ts.map +1 -0
  42. package/dist/__tests__/unit/extract-hooks.test.js +205 -0
  43. package/dist/__tests__/unit/extract-hooks.test.js.map +1 -0
  44. package/dist/__tests__/unit/frontmatter-sync.test.d.ts +8 -0
  45. package/dist/__tests__/unit/frontmatter-sync.test.d.ts.map +1 -0
  46. package/dist/__tests__/unit/frontmatter-sync.test.js +26 -0
  47. package/dist/__tests__/unit/frontmatter-sync.test.js.map +1 -0
  48. package/dist/__tests__/unit/mdx-validator.test.d.ts +2 -0
  49. package/dist/__tests__/unit/mdx-validator.test.d.ts.map +1 -0
  50. package/dist/__tests__/unit/mdx-validator.test.js +264 -0
  51. package/dist/__tests__/unit/mdx-validator.test.js.map +1 -0
  52. package/dist/__tests__/unit/migrate-convert.test.d.ts +2 -0
  53. package/dist/__tests__/unit/migrate-convert.test.d.ts.map +1 -0
  54. package/dist/__tests__/unit/migrate-convert.test.js +297 -0
  55. package/dist/__tests__/unit/migrate-convert.test.js.map +1 -0
  56. package/dist/__tests__/unit/migrate-detect.test.d.ts +2 -0
  57. package/dist/__tests__/unit/migrate-detect.test.d.ts.map +1 -0
  58. package/dist/__tests__/unit/migrate-detect.test.js +35 -0
  59. package/dist/__tests__/unit/migrate-detect.test.js.map +1 -0
  60. package/dist/__tests__/unit/migrate-mdx.test.d.ts +2 -0
  61. package/dist/__tests__/unit/migrate-mdx.test.d.ts.map +1 -0
  62. package/dist/__tests__/unit/migrate-mdx.test.js +158 -0
  63. package/dist/__tests__/unit/migrate-mdx.test.js.map +1 -0
  64. package/dist/__tests__/unit/openapi.test.d.ts +2 -0
  65. package/dist/__tests__/unit/openapi.test.d.ts.map +1 -0
  66. package/dist/__tests__/unit/openapi.test.js +52 -0
  67. package/dist/__tests__/unit/openapi.test.js.map +1 -0
  68. package/dist/__tests__/unit/package-config.test.d.ts +2 -0
  69. package/dist/__tests__/unit/package-config.test.d.ts.map +1 -0
  70. package/dist/__tests__/unit/package-config.test.js +63 -0
  71. package/dist/__tests__/unit/package-config.test.js.map +1 -0
  72. package/dist/__tests__/unit/port.test.d.ts +2 -0
  73. package/dist/__tests__/unit/port.test.d.ts.map +1 -0
  74. package/dist/__tests__/unit/port.test.js +20 -0
  75. package/dist/__tests__/unit/port.test.js.map +1 -0
  76. package/dist/__tests__/unit/vendored-sync.test.d.ts +14 -0
  77. package/dist/__tests__/unit/vendored-sync.test.d.ts.map +1 -0
  78. package/dist/__tests__/unit/vendored-sync.test.js +90 -0
  79. package/dist/__tests__/unit/vendored-sync.test.js.map +1 -0
  80. package/dist/commands/broken-links.d.ts +11 -0
  81. package/dist/commands/broken-links.d.ts.map +1 -0
  82. package/dist/commands/broken-links.js +95 -0
  83. package/dist/commands/broken-links.js.map +1 -0
  84. package/dist/commands/clean.d.ts +7 -0
  85. package/dist/commands/clean.d.ts.map +1 -0
  86. package/dist/commands/clean.js +59 -0
  87. package/dist/commands/clean.js.map +1 -0
  88. package/dist/commands/deploy/cloudflare.d.ts +12 -0
  89. package/dist/commands/deploy/cloudflare.d.ts.map +1 -0
  90. package/dist/commands/deploy/cloudflare.js +409 -0
  91. package/dist/commands/deploy/cloudflare.js.map +1 -0
  92. package/dist/commands/deploy/templates.d.ts +23 -0
  93. package/dist/commands/deploy/templates.d.ts.map +1 -0
  94. package/dist/commands/deploy/templates.js +179 -0
  95. package/dist/commands/deploy/templates.js.map +1 -0
  96. package/dist/commands/deploy/types.d.ts +19 -0
  97. package/dist/commands/deploy/types.d.ts.map +1 -0
  98. package/dist/commands/deploy/types.js +5 -0
  99. package/dist/commands/deploy/types.js.map +1 -0
  100. package/dist/commands/dev.d.ts +14 -0
  101. package/dist/commands/dev.d.ts.map +1 -0
  102. package/dist/commands/dev.js +817 -0
  103. package/dist/commands/dev.js.map +1 -0
  104. package/dist/commands/doctor.d.ts +7 -0
  105. package/dist/commands/doctor.d.ts.map +1 -0
  106. package/dist/commands/doctor.js +159 -0
  107. package/dist/commands/doctor.js.map +1 -0
  108. package/dist/commands/init.d.ts +7 -0
  109. package/dist/commands/init.d.ts.map +1 -0
  110. package/dist/commands/init.js +96 -0
  111. package/dist/commands/init.js.map +1 -0
  112. package/dist/commands/migrate/convert-mdx.d.ts +50 -0
  113. package/dist/commands/migrate/convert-mdx.d.ts.map +1 -0
  114. package/dist/commands/migrate/convert-mdx.js +108 -0
  115. package/dist/commands/migrate/convert-mdx.js.map +1 -0
  116. package/dist/commands/migrate/convert.d.ts +80 -0
  117. package/dist/commands/migrate/convert.d.ts.map +1 -0
  118. package/dist/commands/migrate/convert.js +158 -0
  119. package/dist/commands/migrate/convert.js.map +1 -0
  120. package/dist/commands/migrate/detect.d.ts +31 -0
  121. package/dist/commands/migrate/detect.d.ts.map +1 -0
  122. package/dist/commands/migrate/detect.js +62 -0
  123. package/dist/commands/migrate/detect.js.map +1 -0
  124. package/dist/commands/migrate/extract-hooks.d.ts +71 -0
  125. package/dist/commands/migrate/extract-hooks.d.ts.map +1 -0
  126. package/dist/commands/migrate/extract-hooks.js +473 -0
  127. package/dist/commands/migrate/extract-hooks.js.map +1 -0
  128. package/dist/commands/migrate/index.d.ts +17 -0
  129. package/dist/commands/migrate/index.d.ts.map +1 -0
  130. package/dist/commands/migrate/index.js +282 -0
  131. package/dist/commands/migrate/index.js.map +1 -0
  132. package/dist/commands/migrate/prompts.d.ts +22 -0
  133. package/dist/commands/migrate/prompts.d.ts.map +1 -0
  134. package/dist/commands/migrate/prompts.js +67 -0
  135. package/dist/commands/migrate/prompts.js.map +1 -0
  136. package/dist/commands/migrate/types.d.ts +22 -0
  137. package/dist/commands/migrate/types.d.ts.map +1 -0
  138. package/dist/commands/migrate/types.js +26 -0
  139. package/dist/commands/migrate/types.js.map +1 -0
  140. package/dist/commands/openapi-check.d.ts +11 -0
  141. package/dist/commands/openapi-check.d.ts.map +1 -0
  142. package/dist/commands/openapi-check.js +88 -0
  143. package/dist/commands/openapi-check.js.map +1 -0
  144. package/dist/commands/rename.d.ts +10 -0
  145. package/dist/commands/rename.d.ts.map +1 -0
  146. package/dist/commands/rename.js +125 -0
  147. package/dist/commands/rename.js.map +1 -0
  148. package/dist/commands/update.d.ts +10 -0
  149. package/dist/commands/update.d.ts.map +1 -0
  150. package/dist/commands/update.js +57 -0
  151. package/dist/commands/update.js.map +1 -0
  152. package/dist/commands/validate.d.ts +12 -0
  153. package/dist/commands/validate.d.ts.map +1 -0
  154. package/dist/commands/validate.js +163 -0
  155. package/dist/commands/validate.js.map +1 -0
  156. package/dist/index.d.ts +9 -0
  157. package/dist/index.d.ts.map +1 -0
  158. package/dist/index.js +334 -0
  159. package/dist/index.js.map +1 -0
  160. package/dist/lib/config.d.ts +7 -0
  161. package/dist/lib/config.d.ts.map +1 -0
  162. package/dist/lib/config.js +18 -0
  163. package/dist/lib/config.js.map +1 -0
  164. package/dist/lib/deprecated-components.d.ts +72 -0
  165. package/dist/lib/deprecated-components.d.ts.map +1 -0
  166. package/dist/lib/deprecated-components.js +138 -0
  167. package/dist/lib/deprecated-components.js.map +1 -0
  168. package/dist/lib/deps.d.ts +17 -0
  169. package/dist/lib/deps.d.ts.map +1 -0
  170. package/dist/lib/deps.js +186 -0
  171. package/dist/lib/deps.js.map +1 -0
  172. package/dist/lib/docs-config.d.ts +67 -0
  173. package/dist/lib/docs-config.d.ts.map +1 -0
  174. package/dist/lib/docs-config.js +294 -0
  175. package/dist/lib/docs-config.js.map +1 -0
  176. package/dist/lib/errors.d.ts +23 -0
  177. package/dist/lib/errors.d.ts.map +1 -0
  178. package/dist/lib/errors.js +32 -0
  179. package/dist/lib/errors.js.map +1 -0
  180. package/dist/lib/frontmatter-utils.d.ts +25 -0
  181. package/dist/lib/frontmatter-utils.d.ts.map +1 -0
  182. package/dist/lib/frontmatter-utils.js +64 -0
  183. package/dist/lib/frontmatter-utils.js.map +1 -0
  184. package/dist/lib/mdx-validator.d.ts +27 -0
  185. package/dist/lib/mdx-validator.d.ts.map +1 -0
  186. package/dist/lib/mdx-validator.js +148 -0
  187. package/dist/lib/mdx-validator.js.map +1 -0
  188. package/dist/lib/navigation-validator.d.ts +31 -0
  189. package/dist/lib/navigation-validator.d.ts.map +1 -0
  190. package/dist/lib/navigation-validator.js +75 -0
  191. package/dist/lib/navigation-validator.js.map +1 -0
  192. package/dist/lib/normalize-config.d.ts +57 -0
  193. package/dist/lib/normalize-config.d.ts.map +1 -0
  194. package/dist/lib/normalize-config.js +63 -0
  195. package/dist/lib/normalize-config.js.map +1 -0
  196. package/dist/lib/openapi/cache.d.ts +40 -0
  197. package/dist/lib/openapi/cache.d.ts.map +1 -0
  198. package/dist/lib/openapi/cache.js +76 -0
  199. package/dist/lib/openapi/cache.js.map +1 -0
  200. package/dist/lib/openapi/errors.d.ts +36 -0
  201. package/dist/lib/openapi/errors.d.ts.map +1 -0
  202. package/dist/lib/openapi/errors.js +162 -0
  203. package/dist/lib/openapi/errors.js.map +1 -0
  204. package/dist/lib/openapi/index.d.ts +10 -0
  205. package/dist/lib/openapi/index.d.ts.map +1 -0
  206. package/dist/lib/openapi/index.js +12 -0
  207. package/dist/lib/openapi/index.js.map +1 -0
  208. package/dist/lib/openapi/types.d.ts +198 -0
  209. package/dist/lib/openapi/types.d.ts.map +1 -0
  210. package/dist/lib/openapi/types.js +8 -0
  211. package/dist/lib/openapi/types.js.map +1 -0
  212. package/dist/lib/openapi/validator.d.ts +45 -0
  213. package/dist/lib/openapi/validator.d.ts.map +1 -0
  214. package/dist/lib/openapi/validator.js +128 -0
  215. package/dist/lib/openapi/validator.js.map +1 -0
  216. package/dist/lib/openapi.d.ts +7 -0
  217. package/dist/lib/openapi.d.ts.map +1 -0
  218. package/dist/lib/openapi.js +7 -0
  219. package/dist/lib/openapi.js.map +1 -0
  220. package/dist/lib/output.d.ts +14 -0
  221. package/dist/lib/output.d.ts.map +1 -0
  222. package/dist/lib/output.js +19 -0
  223. package/dist/lib/output.js.map +1 -0
  224. package/dist/lib/path-security.d.ts +23 -0
  225. package/dist/lib/path-security.d.ts.map +1 -0
  226. package/dist/lib/path-security.js +35 -0
  227. package/dist/lib/path-security.js.map +1 -0
  228. package/dist/lib/port.d.ts +18 -0
  229. package/dist/lib/port.d.ts.map +1 -0
  230. package/dist/lib/port.js +65 -0
  231. package/dist/lib/port.js.map +1 -0
  232. package/dist/lib/spinner.d.ts +4 -0
  233. package/dist/lib/spinner.d.ts.map +1 -0
  234. package/dist/lib/spinner.js +16 -0
  235. package/dist/lib/spinner.js.map +1 -0
  236. package/dist/lib/version.d.ts +2 -0
  237. package/dist/lib/version.d.ts.map +1 -0
  238. package/dist/lib/version.js +49 -0
  239. package/dist/lib/version.js.map +1 -0
  240. package/dist/utils/update-checker.d.ts +34 -0
  241. package/dist/utils/update-checker.d.ts.map +1 -0
  242. package/dist/utils/update-checker.js +142 -0
  243. package/dist/utils/update-checker.js.map +1 -0
  244. package/package.json +125 -0
  245. package/templates/docs.json +11 -0
  246. package/templates/introduction.mdx +19 -0
  247. package/templates/quickstart.mdx +20 -0
  248. package/vendored/app/[[...slug]]/error.tsx +103 -0
  249. package/vendored/app/[[...slug]]/page.tsx +690 -0
  250. package/vendored/app/api/assets/[...path]/route.ts +78 -0
  251. package/vendored/app/api/ev/route.ts +61 -0
  252. package/vendored/app/api/isr-health/route.ts +66 -0
  253. package/vendored/app/api/mcp/[project]/route.ts +435 -0
  254. package/vendored/app/api/og/route.tsx +167 -0
  255. package/vendored/app/api/r2/[project]/[...path]/route.ts +214 -0
  256. package/vendored/app/api/revalidate/route.ts +76 -0
  257. package/vendored/app/globals.css +37 -0
  258. package/vendored/app/layout.tsx +571 -0
  259. package/vendored/app/not-found.tsx +47 -0
  260. package/vendored/components/CodeBlockCopyButton.tsx +146 -0
  261. package/vendored/components/HeaderLinkCopy.tsx +135 -0
  262. package/vendored/components/errors/NotFoundContent.tsx +147 -0
  263. package/vendored/components/layout/LayoutWrapper.tsx +128 -0
  264. package/vendored/components/mdx/Accordion.tsx +91 -0
  265. package/vendored/components/mdx/ApiCodePanel.tsx +51 -0
  266. package/vendored/components/mdx/ApiEndpoint.tsx +104 -0
  267. package/vendored/components/mdx/ApiPage.tsx +379 -0
  268. package/vendored/components/mdx/Badge.tsx +169 -0
  269. package/vendored/components/mdx/Callouts.tsx +140 -0
  270. package/vendored/components/mdx/Card.tsx +214 -0
  271. package/vendored/components/mdx/CodeGroup.tsx +136 -0
  272. package/vendored/components/mdx/Color.tsx +244 -0
  273. package/vendored/components/mdx/Columns.tsx +37 -0
  274. package/vendored/components/mdx/Expandable.tsx +37 -0
  275. package/vendored/components/mdx/Frame.tsx +51 -0
  276. package/vendored/components/mdx/Icon.tsx +132 -0
  277. package/vendored/components/mdx/Latex.tsx +75 -0
  278. package/vendored/components/mdx/MDXComponents.tsx +414 -0
  279. package/vendored/components/mdx/Mermaid.tsx +35 -0
  280. package/vendored/components/mdx/MermaidInner.tsx +342 -0
  281. package/vendored/components/mdx/OpenApiEndpoint.tsx +971 -0
  282. package/vendored/components/mdx/Panel.tsx +26 -0
  283. package/vendored/components/mdx/PanelWrapper.tsx +100 -0
  284. package/vendored/components/mdx/ParamField.tsx +75 -0
  285. package/vendored/components/mdx/RequestExample.tsx +91 -0
  286. package/vendored/components/mdx/ResponseExample.tsx +145 -0
  287. package/vendored/components/mdx/ResponseField.tsx +109 -0
  288. package/vendored/components/mdx/Steps.tsx +173 -0
  289. package/vendored/components/mdx/Table.tsx +352 -0
  290. package/vendored/components/mdx/Tabs.tsx +147 -0
  291. package/vendored/components/mdx/Tile.tsx +127 -0
  292. package/vendored/components/mdx/Tooltip.tsx +111 -0
  293. package/vendored/components/mdx/Tree.tsx +484 -0
  294. package/vendored/components/mdx/Update.tsx +90 -0
  295. package/vendored/components/mdx/View.tsx +354 -0
  296. package/vendored/components/mdx/YouTube.tsx +35 -0
  297. package/vendored/components/mdx/ZoomableImage.tsx +83 -0
  298. package/vendored/components/navigation/Breadcrumb.tsx +241 -0
  299. package/vendored/components/navigation/DefaultLogo.tsx +81 -0
  300. package/vendored/components/navigation/Header.tsx +512 -0
  301. package/vendored/components/navigation/LanguageSelector.tsx +249 -0
  302. package/vendored/components/navigation/PageNavigation.tsx +174 -0
  303. package/vendored/components/navigation/Sidebar.tsx +713 -0
  304. package/vendored/components/navigation/SocialFooter.tsx +186 -0
  305. package/vendored/components/navigation/TableOfContents.tsx +435 -0
  306. package/vendored/components/navigation/TabsNav.tsx +182 -0
  307. package/vendored/components/search/LazySearchModal.tsx +19 -0
  308. package/vendored/components/search/SearchModal.tsx +573 -0
  309. package/vendored/components/snippets/ProjectSnippets.tsx +4 -0
  310. package/vendored/components/theme/ThemeProvider.tsx +31 -0
  311. package/vendored/components/theme/ThemeToggle.tsx +134 -0
  312. package/vendored/components/ui/CodePanel.tsx +517 -0
  313. package/vendored/components/ui/CodePanelModal.tsx +342 -0
  314. package/vendored/contexts/TabSyncContext.tsx +30 -0
  315. package/vendored/hooks/useFocusTrap.ts +42 -0
  316. package/vendored/hooks/useHashNavigation.ts +39 -0
  317. package/vendored/hooks/useShikiHighlight.ts +101 -0
  318. package/vendored/lib/analytics-client.ts +77 -0
  319. package/vendored/lib/build/cache.ts +138 -0
  320. package/vendored/lib/build/error-parser.ts +690 -0
  321. package/vendored/lib/build/estimation.ts +113 -0
  322. package/vendored/lib/build/index.ts +17 -0
  323. package/vendored/lib/build/page-file-map.ts +48 -0
  324. package/vendored/lib/build/r2-upload.ts +179 -0
  325. package/vendored/lib/cache-keys.ts +117 -0
  326. package/vendored/lib/code-utils.ts +42 -0
  327. package/vendored/lib/content-loader.ts +176 -0
  328. package/vendored/lib/deprecated-components.ts +185 -0
  329. package/vendored/lib/docs-isr.ts +180 -0
  330. package/vendored/lib/docs-types.ts +874 -0
  331. package/vendored/lib/docs.ts +203 -0
  332. package/vendored/lib/domain-helpers.ts +107 -0
  333. package/vendored/lib/email-notifier.ts +102 -0
  334. package/vendored/lib/email-templates/build-failure.tsx +193 -0
  335. package/vendored/lib/email-templates/components/base-layout.tsx +150 -0
  336. package/vendored/lib/email-templates/components/error-box.tsx +88 -0
  337. package/vendored/lib/email-templates/components/info-row.tsx +63 -0
  338. package/vendored/lib/email-templates/index.ts +13 -0
  339. package/vendored/lib/empty-polyfill.js +3 -0
  340. package/vendored/lib/extract-highlights.ts +124 -0
  341. package/vendored/lib/fonts.ts +227 -0
  342. package/vendored/lib/frontmatter-utils.ts +77 -0
  343. package/vendored/lib/fs-utils.ts +20 -0
  344. package/vendored/lib/git-utils.ts +87 -0
  345. package/vendored/lib/health-checks.ts +224 -0
  346. package/vendored/lib/icon-utils.ts +492 -0
  347. package/vendored/lib/infer-page-type.ts +14 -0
  348. package/vendored/lib/isr-build-executor.ts +185 -0
  349. package/vendored/lib/language-icons.ts +152 -0
  350. package/vendored/lib/language-utils.ts +338 -0
  351. package/vendored/lib/latex-config.ts +64 -0
  352. package/vendored/lib/link-prefix-context.tsx +32 -0
  353. package/vendored/lib/logger.ts +63 -0
  354. package/vendored/lib/mcp-search.ts +255 -0
  355. package/vendored/lib/mdx-inline-components.ts +155 -0
  356. package/vendored/lib/mdx.ts +100 -0
  357. package/vendored/lib/middleware-helpers.ts +519 -0
  358. package/vendored/lib/navigation-resolver.ts +621 -0
  359. package/vendored/lib/navigation-utils.ts +103 -0
  360. package/vendored/lib/normalize-config.ts +94 -0
  361. package/vendored/lib/openapi/cache.ts +92 -0
  362. package/vendored/lib/openapi/code-examples.ts +389 -0
  363. package/vendored/lib/openapi/errors.ts +253 -0
  364. package/vendored/lib/openapi/generator.ts +230 -0
  365. package/vendored/lib/openapi/index.ts +84 -0
  366. package/vendored/lib/openapi/parser.ts +474 -0
  367. package/vendored/lib/openapi/types.ts +232 -0
  368. package/vendored/lib/openapi/validator.ts +156 -0
  369. package/vendored/lib/openapi-isr.ts +121 -0
  370. package/vendored/lib/page-isr-helpers.ts +137 -0
  371. package/vendored/lib/path-safety.ts +130 -0
  372. package/vendored/lib/paths.ts +35 -0
  373. package/vendored/lib/preprocess-mdx.ts +951 -0
  374. package/vendored/lib/process-mdx-with-exports.ts +75 -0
  375. package/vendored/lib/project-resolver.ts +165 -0
  376. package/vendored/lib/r2-content.ts +60 -0
  377. package/vendored/lib/r2-manifest.ts +84 -0
  378. package/vendored/lib/recent-searches.ts +41 -0
  379. package/vendored/lib/recma-compound-components.ts +84 -0
  380. package/vendored/lib/redirect-compiler.ts +160 -0
  381. package/vendored/lib/redirect-matcher.ts +296 -0
  382. package/vendored/lib/redis.ts +23 -0
  383. package/vendored/lib/rehype-class-to-classname.ts +31 -0
  384. package/vendored/lib/rehype-code-meta.ts +275 -0
  385. package/vendored/lib/rehype-nozoom-to-data.ts +45 -0
  386. package/vendored/lib/remark-extract-exports.ts +104 -0
  387. package/vendored/lib/resilience.ts +260 -0
  388. package/vendored/lib/revalidation-helpers.ts +200 -0
  389. package/vendored/lib/revalidation-trigger.ts +150 -0
  390. package/vendored/lib/screenshot-capture.ts +229 -0
  391. package/vendored/lib/search-client.ts +91 -0
  392. package/vendored/lib/search-suggestions.ts +38 -0
  393. package/vendored/lib/search.ts +158 -0
  394. package/vendored/lib/seo.ts +264 -0
  395. package/vendored/lib/shiki-client.ts +131 -0
  396. package/vendored/lib/shiki-config.ts +289 -0
  397. package/vendored/lib/shiki-css-theme.ts +46 -0
  398. package/vendored/lib/shiki-highlighter.ts +62 -0
  399. package/vendored/lib/shiki-transformers.ts +337 -0
  400. package/vendored/lib/slack-notifier.ts +248 -0
  401. package/vendored/lib/snippet-compiler-isr.ts +114 -0
  402. package/vendored/lib/snippet-loader-isr.ts +276 -0
  403. package/vendored/lib/static-artifacts.ts +375 -0
  404. package/vendored/lib/static-file-route.ts +72 -0
  405. package/vendored/lib/tracking-script.ts +19 -0
  406. package/vendored/lib/typography-config.ts +42 -0
  407. package/vendored/lib/validate-config.ts +268 -0
  408. package/vendored/next.config.js +45 -0
  409. package/vendored/postcss.config.js +6 -0
  410. package/vendored/schema/README.md +28 -0
  411. package/vendored/schema/docs-schema.json +4631 -0
  412. package/vendored/scripts/build-project.cjs +174 -0
  413. package/vendored/scripts/build-search-index.cjs +347 -0
  414. package/vendored/scripts/compile-snippets.cjs +488 -0
  415. package/vendored/scripts/copy-files.cjs +295 -0
  416. package/vendored/scripts/dev-project.cjs +534 -0
  417. package/vendored/scripts/enhance-navigation.cjs +354 -0
  418. package/vendored/scripts/validate-links.cjs +423 -0
  419. package/vendored/shared/constants.ts +6 -0
  420. package/vendored/shared/index.ts +19 -0
  421. package/vendored/shared/logger.ts +62 -0
  422. package/vendored/shared/memory-monitor.ts +190 -0
  423. package/vendored/shared/navigation-validator.ts +101 -0
  424. package/vendored/shared/path-security.ts +39 -0
  425. package/vendored/shared/status-reporter.ts +199 -0
  426. package/vendored/shared/timer.ts +51 -0
  427. package/vendored/shared/types.ts +102 -0
  428. package/vendored/tailwind.config.ts +39 -0
  429. package/vendored/themes/base.css +1311 -0
  430. package/vendored/themes/index.ts +119 -0
  431. package/vendored/themes/jam/variables.css +835 -0
  432. package/vendored/themes/nebula/variables.css +282 -0
  433. package/vendored/themes/pulsar/variables.css +1009 -0
  434. package/vendored/themes/types.ts +89 -0
  435. package/vendored/tsconfig.json +48 -0
@@ -0,0 +1,874 @@
1
+ // Types and client-safe utilities for docs configuration
2
+ // This file contains no Node.js-specific imports and can be used in client components
3
+ // Updated to support the new hierarchical docs.json schema
4
+
5
+ // =============================================================================
6
+ // ASSET PATH CONSTANTS
7
+ // =============================================================================
8
+
9
+ /**
10
+ * Asset prefix for Jamdesk project assets.
11
+ *
12
+ * All project images and assets are served under this prefix to avoid conflicts
13
+ * with customer site paths when using Cloudflare Workers for subpath hosting.
14
+ * For example, a customer hosting docs at example.com/docs won't have their
15
+ * /images/ path conflict with documentation images.
16
+ */
17
+ export const ASSET_PREFIX = '/_jd';
18
+
19
+ // =============================================================================
20
+ // THEME TYPES
21
+ // =============================================================================
22
+
23
+ /**
24
+ * Available themes
25
+ */
26
+ export type ThemeName = 'jam' | 'nebula' | 'pulsar';
27
+
28
+ // =============================================================================
29
+ // ICON TYPES
30
+ // =============================================================================
31
+
32
+ /**
33
+ * Icon style options for FontAwesome
34
+ */
35
+ export type IconStyle =
36
+ | 'brands'
37
+ | 'duotone'
38
+ | 'light'
39
+ | 'regular'
40
+ | 'sharp-duotone-solid'
41
+ | 'sharp-light'
42
+ | 'sharp-regular'
43
+ | 'sharp-solid'
44
+ | 'sharp-thin'
45
+ | 'solid'
46
+ | 'thin';
47
+
48
+ /**
49
+ * Icon library options
50
+ */
51
+ export type IconLibrary = 'fontawesome' | 'lucide';
52
+
53
+ /**
54
+ * Icon configuration - can be a string or object with style/library
55
+ */
56
+ export interface IconConfigObject {
57
+ name: string;
58
+ style?: IconStyle;
59
+ library?: IconLibrary;
60
+ }
61
+
62
+ export type IconConfig = string | IconConfigObject;
63
+
64
+ // =============================================================================
65
+ // COLOR TYPES
66
+ // =============================================================================
67
+
68
+ /**
69
+ * Color configuration for light/dark themes
70
+ */
71
+ export interface ColorPair {
72
+ light?: string;
73
+ dark?: string;
74
+ }
75
+
76
+ /**
77
+ * Colors configuration
78
+ */
79
+ export interface ColorsConfig {
80
+ primary: string;
81
+ light?: string;
82
+ dark?: string;
83
+ }
84
+
85
+ // =============================================================================
86
+ // LOGO & FAVICON TYPES
87
+ // =============================================================================
88
+
89
+ /**
90
+ * Logo configuration - can be a string path or object with light/dark variants
91
+ */
92
+ export interface LogoConfig {
93
+ light: string;
94
+ dark?: string;
95
+ href?: string;
96
+ }
97
+
98
+ export type Logo = LogoConfig | string;
99
+
100
+ /**
101
+ * Favicon configuration - can be a string or object with light/dark variants
102
+ */
103
+ export interface FaviconConfig {
104
+ light: string;
105
+ dark: string;
106
+ }
107
+
108
+ export type Favicon = FaviconConfig | string;
109
+
110
+ // =============================================================================
111
+ // FONT TYPES
112
+ // =============================================================================
113
+
114
+ /**
115
+ * Single font configuration
116
+ */
117
+ export interface SingleFontConfig {
118
+ family: string;
119
+ weight?: number;
120
+ source?: string;
121
+ format?: 'woff' | 'woff2';
122
+ }
123
+
124
+ /**
125
+ * Font configuration for heading/body split
126
+ */
127
+ export interface HeadingBodyFontConfig {
128
+ heading?: SingleFontConfig;
129
+ body?: SingleFontConfig;
130
+ }
131
+
132
+ /**
133
+ * Font configuration - can be a single font or heading/body split
134
+ * Legacy support: { primary?: string; mono?: string }
135
+ */
136
+ export type FontConfig = SingleFontConfig | HeadingBodyFontConfig | {
137
+ primary?: string;
138
+ mono?: string;
139
+ };
140
+
141
+ // =============================================================================
142
+ // NAVIGATION TYPES - PAGES AND GROUPS
143
+ // =============================================================================
144
+
145
+ /**
146
+ * Page with optional method and title (for API endpoints)
147
+ */
148
+ export interface NavigationPageObject {
149
+ page: string;
150
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
151
+ title?: string;
152
+ icon?: IconConfig;
153
+ tag?: string;
154
+ }
155
+
156
+ /**
157
+ * A page can be a string path or an object with additional metadata
158
+ */
159
+ export type NavigationPage = string | NavigationPageObject;
160
+
161
+ /**
162
+ * Group configuration - can contain pages and nested groups
163
+ */
164
+ export interface GroupConfig {
165
+ group: string;
166
+ icon?: IconConfig;
167
+ hidden?: boolean;
168
+ root?: string;
169
+ tag?: string;
170
+ expanded?: boolean;
171
+ public?: boolean;
172
+ pages?: (NavigationPage | GroupConfig)[];
173
+ openapi?: string | string[];
174
+ asyncapi?: string | string[];
175
+ }
176
+
177
+ // =============================================================================
178
+ // NAVIGATION TYPES - TABS, ANCHORS, ETC.
179
+ // =============================================================================
180
+
181
+ /**
182
+ * Tab position options
183
+ * - 'top': Tabs appear in header/tab bar
184
+ * - 'left': Tabs appear at top of sidebar
185
+ */
186
+ export type TabsPosition = 'top' | 'left';
187
+
188
+ /**
189
+ * External link anchor - appears at top of sidebar on all pages
190
+ * These are simple external navigation links, NOT content sections
191
+ */
192
+ export interface ExternalAnchorConfig {
193
+ name: string;
194
+ href: string;
195
+ icon?: IconConfig;
196
+ }
197
+
198
+ /**
199
+ * Tab configuration
200
+ */
201
+ export interface TabConfig {
202
+ tab: string;
203
+ icon?: IconConfig;
204
+ hidden?: boolean;
205
+ href?: string;
206
+ groups?: GroupConfig[];
207
+ pages?: (NavigationPage | GroupConfig)[];
208
+ // Can also have nested structures (anchors removed - use tabs instead)
209
+ dropdowns?: DropdownConfig[];
210
+ products?: ProductConfig[];
211
+ menu?: MenuItemConfig[];
212
+ openapi?: string | string[];
213
+ asyncapi?: string | string[];
214
+ }
215
+
216
+ /**
217
+ * Anchor configuration (top-level navigation sections)
218
+ * @deprecated Use TabConfig instead. Anchors in navigation are deprecated.
219
+ * For external links, use the top-level `anchors` field with ExternalAnchorConfig.
220
+ */
221
+ export interface AnchorConfig {
222
+ anchor: string;
223
+ icon?: IconConfig;
224
+ color?: ColorPair;
225
+ hidden?: boolean;
226
+ href?: string;
227
+ groups?: GroupConfig[];
228
+ pages?: (NavigationPage | GroupConfig)[];
229
+ tabs?: TabConfig[];
230
+ versions?: VersionConfig[];
231
+ languages?: LanguageConfig[];
232
+ dropdowns?: DropdownConfig[];
233
+ products?: ProductConfig[];
234
+ openapi?: string | string[];
235
+ asyncapi?: string | string[];
236
+ global?: GlobalConfig;
237
+ }
238
+
239
+ /**
240
+ * Dropdown configuration
241
+ */
242
+ export interface DropdownConfig {
243
+ dropdown: string;
244
+ icon?: IconConfig;
245
+ color?: ColorPair;
246
+ description?: string;
247
+ hidden?: boolean;
248
+ href?: string;
249
+ groups?: GroupConfig[];
250
+ pages?: (NavigationPage | GroupConfig)[];
251
+ tabs?: TabConfig[];
252
+ anchors?: AnchorConfig[];
253
+ products?: ProductConfig[];
254
+ versions?: VersionConfig[];
255
+ languages?: LanguageConfig[];
256
+ openapi?: string | string[];
257
+ asyncapi?: string | string[];
258
+ }
259
+
260
+ /**
261
+ * Product configuration (for multi-product docs)
262
+ */
263
+ export interface ProductConfig {
264
+ product: string;
265
+ name?: string;
266
+ icon?: IconConfig;
267
+ color?: ColorPair;
268
+ description?: string;
269
+ hidden?: boolean;
270
+ href?: string;
271
+ groups?: GroupConfig[];
272
+ pages?: (NavigationPage | GroupConfig)[];
273
+ tabs?: TabConfig[];
274
+ anchors?: AnchorConfig[];
275
+ dropdowns?: DropdownConfig[];
276
+ versions?: VersionConfig[];
277
+ languages?: LanguageConfig[];
278
+ openapi?: string | string[];
279
+ asyncapi?: string | string[];
280
+ }
281
+
282
+ /**
283
+ * Menu item configuration
284
+ */
285
+ export interface MenuItemConfig {
286
+ item: string;
287
+ icon?: IconConfig;
288
+ description?: string;
289
+ hidden?: boolean;
290
+ href?: string;
291
+ groups?: GroupConfig[];
292
+ pages?: (NavigationPage | GroupConfig)[];
293
+ openapi?: string | string[];
294
+ asyncapi?: string | string[];
295
+ }
296
+
297
+ /**
298
+ * Version configuration
299
+ */
300
+ export interface VersionConfig {
301
+ version: string;
302
+ default?: boolean;
303
+ hidden?: boolean;
304
+ href?: string;
305
+ groups?: GroupConfig[];
306
+ pages?: (NavigationPage | GroupConfig)[];
307
+ tabs?: TabConfig[];
308
+ anchors?: AnchorConfig[];
309
+ dropdowns?: DropdownConfig[];
310
+ products?: ProductConfig[];
311
+ languages?: LanguageConfig[];
312
+ openapi?: string | string[];
313
+ asyncapi?: string | string[];
314
+ }
315
+
316
+ /**
317
+ * Supported language codes
318
+ */
319
+ export type LanguageCode =
320
+ | 'en' | 'cn' | 'zh' | 'zh-Hans' | 'zh-Hant'
321
+ | 'es' | 'fr' | 'fr-CA' | 'fr-ca'
322
+ | 'ja' | 'jp' | 'ja-jp'
323
+ | 'pt' | 'pt-BR' | 'de' | 'ko' | 'it' | 'ru' | 'ro'
324
+ | 'cs' | 'id' | 'ar' | 'tr' | 'hi' | 'sv' | 'no'
325
+ | 'lv' | 'nl' | 'uk' | 'vi' | 'pl' | 'uz' | 'he';
326
+
327
+ /**
328
+ * Language configuration
329
+ */
330
+ export interface LanguageConfig {
331
+ language: LanguageCode;
332
+ default?: boolean;
333
+ hidden?: boolean;
334
+ href?: string;
335
+ groups?: GroupConfig[];
336
+ pages?: (NavigationPage | GroupConfig)[];
337
+ tabs?: TabConfig[];
338
+ anchors?: AnchorConfig[];
339
+ dropdowns?: DropdownConfig[];
340
+ products?: ProductConfig[];
341
+ versions?: VersionConfig[];
342
+ banner?: BannerConfig;
343
+ openapi?: string | string[];
344
+ asyncapi?: string | string[];
345
+ }
346
+
347
+ /**
348
+ * Global navigation configuration
349
+ */
350
+ export interface GlobalConfig {
351
+ languages?: Array<{ language: LanguageCode; default?: boolean; hidden?: boolean; href: string }>;
352
+ versions?: Array<{ version: string; default?: boolean; hidden?: boolean; href: string }>;
353
+ tabs?: Array<{ tab: string; icon?: IconConfig; hidden?: boolean; href: string }>;
354
+ dropdowns?: Array<{ dropdown: string; icon?: IconConfig; color?: ColorPair; description?: string; hidden?: boolean; href: string }>;
355
+ anchors?: Array<{ anchor: string; icon?: IconConfig; color?: ColorPair; hidden?: boolean; href: string }>;
356
+ products?: Array<{ product: string; name?: string; icon?: IconConfig; color?: ColorPair; description?: string; hidden?: boolean; href: string }>;
357
+ }
358
+
359
+ // =============================================================================
360
+ // NAVIGATION CONFIG (TOP-LEVEL)
361
+ // =============================================================================
362
+
363
+ /**
364
+ * Navigation configuration - one of these structures
365
+ */
366
+ export interface NavigationConfig {
367
+ global?: GlobalConfig;
368
+ /**
369
+ * @deprecated Use `tabs` instead. Anchors with content should be converted to tabs.
370
+ * For external links, use the top-level `anchors` field in DocsConfig.
371
+ */
372
+ anchors?: AnchorConfig[];
373
+ tabs?: TabConfig[];
374
+ groups?: GroupConfig[];
375
+ pages?: (NavigationPage | GroupConfig)[];
376
+ products?: ProductConfig[];
377
+ dropdowns?: DropdownConfig[];
378
+ versions?: VersionConfig[];
379
+ languages?: LanguageConfig[];
380
+ openapi?: string | string[];
381
+ asyncapi?: string | string[];
382
+ }
383
+
384
+ // =============================================================================
385
+ // NAVBAR & FOOTER TYPES
386
+ // =============================================================================
387
+
388
+ /**
389
+ * Navbar link
390
+ */
391
+ export interface NavbarLink {
392
+ label: string;
393
+ icon?: IconConfig;
394
+ href: string;
395
+ }
396
+
397
+ /**
398
+ * Navbar primary button/action
399
+ */
400
+ export interface NavbarPrimary {
401
+ type: 'button' | 'github';
402
+ label?: string;
403
+ href: string;
404
+ }
405
+
406
+ /**
407
+ * Mintlify navbar style (accepted for compatibility, ignored in rendering)
408
+ */
409
+ export type NavbarStyle = 'default' | 'topOfContent';
410
+
411
+ /**
412
+ * Navbar configuration
413
+ */
414
+ export interface NavbarConfig {
415
+ links?: NavbarLink[];
416
+ primary?: NavbarPrimary;
417
+ style?: NavbarStyle; // Mintlify compat - accepted but ignored
418
+ }
419
+
420
+ /**
421
+ * Footer social media platforms
422
+ */
423
+ export type SocialPlatform =
424
+ | 'x' | 'website' | 'facebook' | 'youtube' | 'discord' | 'slack'
425
+ | 'github' | 'linkedin' | 'instagram' | 'hacker-news' | 'medium'
426
+ | 'telegram' | 'twitter' | 'x-twitter' | 'earth-americas'
427
+ | 'bluesky' | 'threads' | 'reddit' | 'podcast';
428
+
429
+ /**
430
+ * Footer link item
431
+ */
432
+ export interface FooterLinkItem {
433
+ label: string;
434
+ href: string;
435
+ }
436
+
437
+ /**
438
+ * Footer link column
439
+ */
440
+ export interface FooterLinkColumn {
441
+ header?: string;
442
+ items: FooterLinkItem[];
443
+ }
444
+
445
+ /**
446
+ * Footer configuration
447
+ */
448
+ export interface FooterConfig {
449
+ socials?: Partial<Record<SocialPlatform, string>>;
450
+ links?: FooterLinkColumn[];
451
+ }
452
+
453
+ // =============================================================================
454
+ // PAGE FRONTMATTER
455
+ // =============================================================================
456
+
457
+ /**
458
+ * MDX page frontmatter fields
459
+ * Used in page.tsx for type-safe access to frontmatter data
460
+ */
461
+ export interface PageFrontmatter {
462
+ title?: string;
463
+ description?: string;
464
+ sidebarTitle?: string;
465
+ icon?: string;
466
+ mode?: 'wide';
467
+ api?: string;
468
+ openapi?: string;
469
+ hideFooter?: boolean;
470
+ }
471
+
472
+ // =============================================================================
473
+ // API CONFIGURATION
474
+ // =============================================================================
475
+
476
+ /**
477
+ * API authentication method
478
+ */
479
+ export type ApiAuthMethod = 'bearer' | 'basic' | 'key' | 'cobo';
480
+
481
+ /**
482
+ * API playground display mode
483
+ */
484
+ export type ApiPlaygroundDisplay = 'interactive' | 'simple' | 'none';
485
+
486
+ /**
487
+ * API configuration
488
+ */
489
+ export interface ApiConfig {
490
+ openapi?: string | string[];
491
+ asyncapi?: string | string[];
492
+ params?: {
493
+ expanded?: 'all' | 'closed';
494
+ };
495
+ playground?: {
496
+ display?: ApiPlaygroundDisplay;
497
+ proxy?: boolean;
498
+ };
499
+ examples?: {
500
+ defaults?: 'required' | 'all';
501
+ languages?: string[];
502
+ prefill?: boolean;
503
+ };
504
+ mdx?: {
505
+ auth?: {
506
+ method?: ApiAuthMethod;
507
+ name?: string;
508
+ };
509
+ server?: string | string[];
510
+ };
511
+ }
512
+
513
+ // =============================================================================
514
+ // APPEARANCE & STYLING
515
+ // =============================================================================
516
+
517
+ /**
518
+ * Appearance configuration
519
+ */
520
+ export interface AppearanceConfig {
521
+ default?: 'system' | 'light' | 'dark';
522
+ strict?: boolean;
523
+ }
524
+
525
+ /**
526
+ * Mintlify modeToggle configuration (backward compatibility)
527
+ * Maps to AppearanceConfig at runtime
528
+ */
529
+ export interface ModeToggleConfig {
530
+ default?: 'dark' | 'light';
531
+ isHidden?: boolean;
532
+ }
533
+
534
+ /**
535
+ * Mintlify layout type (accepted for compatibility, ignored - theme determines layout)
536
+ */
537
+ export type MintlifyLayout = 'sidenav' | 'topnav';
538
+
539
+ /**
540
+ * Background configuration
541
+ */
542
+ export interface BackgroundConfig {
543
+ image?: string | { light: string; dark: string };
544
+ decoration?: 'gradient' | 'grid' | 'windows';
545
+ color?: ColorPair;
546
+ }
547
+
548
+ /**
549
+ * Styling configuration
550
+ */
551
+ export interface StylingConfig {
552
+ eyebrows?: 'section' | 'breadcrumbs';
553
+ codeblocks?: 'system' | 'dark' | {
554
+ theme?: string | { light: string; dark: string };
555
+ languages?: { custom?: string[] };
556
+ };
557
+ latex?: boolean;
558
+ /**
559
+ * Enable typography enhancements (smart quotes, dashes, ellipses).
560
+ * Uses remark-smartypants to convert:
561
+ * - "quotes" → "curly quotes"
562
+ * - -- → en-dash (–)
563
+ * - --- → em-dash (—)
564
+ * - ... → ellipsis (…)
565
+ *
566
+ * Default: false (disabled for performance).
567
+ * Note: May interfere with code examples containing quote characters.
568
+ */
569
+ typography?: boolean;
570
+ }
571
+
572
+ // =============================================================================
573
+ // INTEGRATIONS
574
+ // =============================================================================
575
+
576
+ /**
577
+ * Analytics and integration configurations (stubs - TODO: implement)
578
+ */
579
+ export interface IntegrationsConfig {
580
+ ga4?: { measurementId: string };
581
+ amplitude?: { apiKey: string };
582
+ clarity?: { projectId: string };
583
+ clearbit?: { publicApiKey: string };
584
+ fathom?: { siteId: string };
585
+ frontchat?: { snippetId: string };
586
+ gtm?: { tagId: string };
587
+ heap?: { appId: string };
588
+ hightouch?: { writeKey: string; apiHost?: string };
589
+ hotjar?: { hjid: string; hjsv: string };
590
+ intercom?: { appId: string };
591
+ koala?: { publicApiKey: string };
592
+ logrocket?: { appId: string };
593
+ mixpanel?: { projectToken: string };
594
+ osano?: { scriptSource: string };
595
+ pirsch?: { id: string };
596
+ posthog?: { apiKey: string; apiHost?: string };
597
+ plausible?: { domain: string; server?: string };
598
+ segment?: { key: string };
599
+ telemetry?: { enabled: boolean };
600
+ cookies?: { key?: string; value?: string };
601
+ }
602
+
603
+ // =============================================================================
604
+ // OTHER CONFIGURATION
605
+ // =============================================================================
606
+
607
+ /**
608
+ * Search configuration
609
+ */
610
+ export interface SearchConfig {
611
+ prompt?: string;
612
+ /** Popular pages to show in search empty state */
613
+ popularPages?: Array<{
614
+ title: string;
615
+ slug: string;
616
+ icon?: string;
617
+ }>;
618
+ }
619
+
620
+ /**
621
+ * SEO configuration
622
+ */
623
+ export interface SeoConfig {
624
+ metatags?: Record<string, string>;
625
+ indexing?: 'navigable' | 'all';
626
+ /** Include hidden pages in sitemap (default: false) */
627
+ indexHiddenPages?: boolean;
628
+ }
629
+
630
+ /**
631
+ * Redirect configuration
632
+ */
633
+ export interface RedirectConfig {
634
+ source: string;
635
+ destination: string;
636
+ permanent?: boolean;
637
+ }
638
+
639
+ /**
640
+ * Banner configuration
641
+ */
642
+ export interface BannerConfig {
643
+ content: string;
644
+ dismissible?: boolean;
645
+ }
646
+
647
+ /**
648
+ * Error page configuration
649
+ */
650
+ export interface ErrorsConfig {
651
+ '404'?: {
652
+ redirect?: boolean;
653
+ title?: string;
654
+ description?: string;
655
+ };
656
+ }
657
+
658
+ /**
659
+ * Contextual option - built-in or custom
660
+ */
661
+ export type ContextualOption =
662
+ | 'copy' | 'view' | 'chatgpt' | 'claude' | 'perplexity'
663
+ | 'mcp' | 'cursor' | 'vscode'
664
+ | {
665
+ title: string;
666
+ description: string;
667
+ icon?: IconConfig;
668
+ href: string | { base: string; query?: Array<{ key: string; value: string }> };
669
+ };
670
+
671
+ /**
672
+ * Contextual menu configuration
673
+ */
674
+ export interface ContextualConfig {
675
+ options: ContextualOption[];
676
+ }
677
+
678
+ /**
679
+ * Thumbnail configuration
680
+ */
681
+ export interface ThumbnailsConfig {
682
+ appearance?: 'light' | 'dark';
683
+ background?: string;
684
+ fonts?: { family: string };
685
+ }
686
+
687
+ /**
688
+ * Interaction configuration
689
+ */
690
+ export interface InteractionConfig {
691
+ drilldown?: boolean;
692
+ }
693
+
694
+ /**
695
+ * Metadata configuration
696
+ */
697
+ export interface MetadataConfig {
698
+ timestamp?: boolean;
699
+ }
700
+
701
+ /**
702
+ * Icons library configuration
703
+ */
704
+ export interface IconsConfig {
705
+ library: IconLibrary;
706
+ }
707
+
708
+ /**
709
+ * Analytics configuration
710
+ */
711
+ export interface AnalyticsConfig {
712
+ /** Enable/disable Jamdesk analytics (default: true) */
713
+ enabled?: boolean;
714
+ }
715
+
716
+ // =============================================================================
717
+ // MAIN DOCS CONFIG
718
+ // =============================================================================
719
+
720
+ /**
721
+ * Main documentation configuration
722
+ * Only supports the new hierarchical format
723
+ */
724
+ export interface DocsConfig {
725
+ // Schema reference
726
+ $schema?: string;
727
+
728
+ // Required fields
729
+ theme: ThemeName;
730
+ name: string;
731
+ colors: ColorsConfig;
732
+ navigation: NavigationConfig;
733
+
734
+ // Optional fields
735
+ description?: string;
736
+ favicon?: Favicon;
737
+ logo?: Logo;
738
+
739
+ // Tab position - controls where tabs are displayed
740
+ // 'top': Tabs in header/tab bar (default for pulsar)
741
+ // 'left': Tabs at top of sidebar (default for jam/nebula)
742
+ tabsPosition?: TabsPosition;
743
+
744
+ // External link anchors - appear at top of sidebar on all pages
745
+ anchors?: ExternalAnchorConfig[];
746
+
747
+ // Navigation helpers
748
+ navbar?: NavbarConfig;
749
+ footer?: FooterConfig;
750
+
751
+ // API configuration
752
+ api?: ApiConfig;
753
+
754
+ // Appearance
755
+ appearance?: AppearanceConfig;
756
+ background?: BackgroundConfig;
757
+
758
+ // Search & SEO
759
+ search?: SearchConfig;
760
+ seo?: SeoConfig;
761
+
762
+ // Styling
763
+ fonts?: FontConfig;
764
+ icons?: IconsConfig;
765
+ styling?: StylingConfig;
766
+
767
+ // Features
768
+ redirects?: RedirectConfig[];
769
+ integrations?: IntegrationsConfig;
770
+ banner?: BannerConfig;
771
+ errors?: ErrorsConfig;
772
+ contextual?: ContextualConfig;
773
+ thumbnails?: ThumbnailsConfig;
774
+ interaction?: InteractionConfig;
775
+ metadata?: MetadataConfig;
776
+ analytics?: AnalyticsConfig;
777
+
778
+ // Mintlify compatibility fields (normalized at load time)
779
+ modeToggle?: ModeToggleConfig;
780
+ layout?: MintlifyLayout;
781
+
782
+ // Auto-detected at build time
783
+ _hasCustomCss?: boolean;
784
+ _hasCustomJs?: boolean;
785
+
786
+ // Runtime: Set by ISR middleware based on project config
787
+ // When true, all navigation links should be prefixed with /docs
788
+ hostAtDocs?: boolean;
789
+ }
790
+
791
+ // =============================================================================
792
+ // HELPER FUNCTIONS
793
+ // =============================================================================
794
+
795
+ /**
796
+ * Helper to normalize navigation page to consistent format
797
+ */
798
+ export function normalizeNavPage(page: NavigationPage): {
799
+ path: string;
800
+ method?: string;
801
+ title: string;
802
+ icon?: string;
803
+ tag?: string;
804
+ } {
805
+ if (typeof page === 'string') {
806
+ return {
807
+ path: page,
808
+ title: page
809
+ .split('/')
810
+ .pop()
811
+ ?.replace(/-/g, ' ')
812
+ .replace(/\b\w/g, (l) => l.toUpperCase()) || page,
813
+ };
814
+ }
815
+ return {
816
+ path: page.page,
817
+ method: page.method,
818
+ title: page.title || page.page
819
+ .split('/')
820
+ .pop()
821
+ ?.replace(/-/g, ' ')
822
+ .replace(/\b\w/g, (l) => l.toUpperCase()) || page.page,
823
+ icon: getIconName(page.icon),
824
+ tag: page.tag,
825
+ };
826
+ }
827
+
828
+ /**
829
+ * Transform an image path from /images/... to /_jd/images/...
830
+ *
831
+ * Used for config-defined images (favicon, logo) that need the asset prefix.
832
+ */
833
+ export function transformConfigImagePath(path: string | undefined): string | undefined {
834
+ if (!path) return path;
835
+ if (path.startsWith('/images/')) {
836
+ return ASSET_PREFIX + path;
837
+ }
838
+ return path;
839
+ }
840
+
841
+ /**
842
+ * Normalize logo config to consistent object format.
843
+ * Also transforms /images/... paths to /_jd/images/...
844
+ */
845
+ export function normalizeLogo(logo: Logo | undefined): LogoConfig | null {
846
+ if (!logo) return null;
847
+ if (typeof logo === 'string') {
848
+ return { light: transformConfigImagePath(logo)! };
849
+ }
850
+ return {
851
+ ...logo,
852
+ light: transformConfigImagePath(logo.light)!,
853
+ dark: transformConfigImagePath(logo.dark),
854
+ };
855
+ }
856
+
857
+
858
+ /**
859
+ * Normalize icon config to get the icon name string
860
+ */
861
+ export function getIconName(icon: IconConfig | undefined): string | undefined {
862
+ if (!icon) return undefined;
863
+ if (typeof icon === 'string') return icon;
864
+ return icon.name;
865
+ }
866
+
867
+ /**
868
+ * Get icon library from config
869
+ */
870
+ export function getIconLibrary(icon: IconConfig | undefined): IconLibrary | undefined {
871
+ if (!icon) return undefined;
872
+ if (typeof icon === 'string') return undefined;
873
+ return icon.library;
874
+ }