polen 0.10.0 → 0.11.0-next.10

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 (357) hide show
  1. package/build/api/api.d.ts +1 -0
  2. package/build/api/api.d.ts.map +1 -1
  3. package/build/api/api.js +1 -0
  4. package/build/api/api.js.map +1 -1
  5. package/build/api/config/configurator.d.ts +55 -26
  6. package/build/api/config/configurator.d.ts.map +1 -1
  7. package/build/api/config/configurator.js +27 -9
  8. package/build/api/config/configurator.js.map +1 -1
  9. package/build/api/config/merge.d.ts.map +1 -1
  10. package/build/api/config/merge.js +0 -11
  11. package/build/api/config/merge.js.map +1 -1
  12. package/build/api/content/metadata.d.ts +8 -2
  13. package/build/api/content/metadata.d.ts.map +1 -1
  14. package/build/api/content/metadata.js +1 -1
  15. package/build/api/content/metadata.js.map +1 -1
  16. package/build/api/schema/data-sources/data-sources.d.ts +1 -0
  17. package/build/api/schema/data-sources/data-sources.d.ts.map +1 -1
  18. package/build/api/schema/data-sources/data-sources.js +1 -0
  19. package/build/api/schema/data-sources/data-sources.js.map +1 -1
  20. package/build/api/schema/data-sources/introspection/introspection.d.ts +83 -0
  21. package/build/api/schema/data-sources/introspection/introspection.d.ts.map +1 -0
  22. package/build/api/schema/data-sources/introspection/introspection.js +110 -0
  23. package/build/api/schema/data-sources/introspection/introspection.js.map +1 -0
  24. package/build/api/schema/data-sources/memory/memory.d.ts +2 -2
  25. package/build/api/schema/data-sources/memory/memory.d.ts.map +1 -1
  26. package/build/api/schema/data-sources/memory/memory.js +1 -3
  27. package/build/api/schema/data-sources/memory/memory.js.map +1 -1
  28. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts +7 -3
  29. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts.map +1 -1
  30. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js +15 -11
  31. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js.map +1 -1
  32. package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts +16 -7
  33. package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts.map +1 -1
  34. package/build/api/schema/data-sources/schema-directory/schema-directory.js +26 -7
  35. package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
  36. package/build/api/schema/data-sources/schema-file/schema-file.d.ts +7 -2
  37. package/build/api/schema/data-sources/schema-file/schema-file.d.ts.map +1 -1
  38. package/build/api/schema/data-sources/schema-file/schema-file.js +13 -5
  39. package/build/api/schema/data-sources/schema-file/schema-file.js.map +1 -1
  40. package/build/api/schema/metadata.d.ts +16 -0
  41. package/build/api/schema/metadata.d.ts.map +1 -0
  42. package/build/api/schema/metadata.js +19 -0
  43. package/build/api/schema/metadata.js.map +1 -0
  44. package/build/api/schema/read.d.ts +85 -11
  45. package/build/api/schema/read.d.ts.map +1 -1
  46. package/build/api/schema/read.js +15 -6
  47. package/build/api/schema/read.js.map +1 -1
  48. package/build/api/schema/schema.d.ts +33 -2
  49. package/build/api/schema/schema.d.ts.map +1 -1
  50. package/build/api/schema/schema.js +42 -0
  51. package/build/api/schema/schema.js.map +1 -1
  52. package/build/api/schema-source/index.d.ts +2 -0
  53. package/build/api/schema-source/index.d.ts.map +1 -0
  54. package/build/api/schema-source/index.js +2 -0
  55. package/build/api/schema-source/index.js.map +1 -0
  56. package/build/api/schema-source/schema-source.d.ts +33 -0
  57. package/build/api/schema-source/schema-source.d.ts.map +1 -0
  58. package/build/api/schema-source/schema-source.js +137 -0
  59. package/build/api/schema-source/schema-source.js.map +1 -0
  60. package/build/api/static/manifest.d.ts +1 -2
  61. package/build/api/static/manifest.d.ts.map +1 -1
  62. package/build/api/static/manifest.js +1 -1
  63. package/build/api/static/manifest.js.map +1 -1
  64. package/build/api/vite/plugins/build.d.ts.map +1 -1
  65. package/build/api/vite/plugins/build.js +3 -0
  66. package/build/api/vite/plugins/build.js.map +1 -1
  67. package/build/api/vite/plugins/core.d.ts +1 -0
  68. package/build/api/vite/plugins/core.d.ts.map +1 -1
  69. package/build/api/vite/plugins/core.js +25 -22
  70. package/build/api/vite/plugins/core.js.map +1 -1
  71. package/build/api/vite/plugins/main.d.ts.map +1 -1
  72. package/build/api/vite/plugins/main.js +1 -8
  73. package/build/api/vite/plugins/main.js.map +1 -1
  74. package/build/api/vite/plugins/schema-assets.d.ts +22 -0
  75. package/build/api/vite/plugins/schema-assets.d.ts.map +1 -0
  76. package/build/api/vite/plugins/schema-assets.js +310 -0
  77. package/build/api/vite/plugins/schema-assets.js.map +1 -0
  78. package/build/api/vite/plugins/serve.d.ts.map +1 -1
  79. package/build/api/vite/plugins/serve.js +11 -0
  80. package/build/api/vite/plugins/serve.js.map +1 -1
  81. package/build/cli/commands/open.js +1 -1
  82. package/build/cli/commands/open.js.map +1 -1
  83. package/build/lib/grafaid/schema/schema.d.ts +1 -1
  84. package/build/lib/grafaid/schema/schema.d.ts.map +1 -1
  85. package/build/lib/grafaid/schema/schema.js +1 -1
  86. package/build/lib/grafaid/schema/schema.js.map +1 -1
  87. package/build/lib/graphql-change/change-groups.d.ts +2 -0
  88. package/build/lib/graphql-change/change-groups.d.ts.map +1 -1
  89. package/build/lib/graphql-change/change-groups.js +54 -0
  90. package/build/lib/graphql-change/change-groups.js.map +1 -1
  91. package/build/lib/kit-temp.d.ts +9 -0
  92. package/build/lib/kit-temp.d.ts.map +1 -1
  93. package/build/lib/kit-temp.js +14 -2
  94. package/build/lib/kit-temp.js.map +1 -1
  95. package/build/lib/path-map/path-map.d.ts.map +1 -1
  96. package/build/lib/path-map/path-map.js +3 -1
  97. package/build/lib/path-map/path-map.js.map +1 -1
  98. package/build/lib/react-router-aid/react-router-aid.d.ts +5 -3
  99. package/build/lib/react-router-aid/react-router-aid.d.ts.map +1 -1
  100. package/build/lib/react-router-aid/react-router-aid.js +7 -4
  101. package/build/lib/react-router-aid/react-router-aid.js.map +1 -1
  102. package/build/project-data.d.ts +3 -11
  103. package/build/project-data.d.ts.map +1 -1
  104. package/build/template/components/Changelog.d.ts +3 -3
  105. package/build/template/components/Changelog.d.ts.map +1 -1
  106. package/build/template/components/Changelog.js +8 -84
  107. package/build/template/components/Changelog.js.map +1 -1
  108. package/build/template/components/CodeBlock.d.ts +2 -0
  109. package/build/template/components/CodeBlock.d.ts.map +1 -1
  110. package/build/template/components/CodeBlock.js +1 -4
  111. package/build/template/components/CodeBlock.js.map +1 -1
  112. package/build/template/components/ComponentDispatch.d.ts +34 -0
  113. package/build/template/components/ComponentDispatch.d.ts.map +1 -0
  114. package/build/template/components/ComponentDispatch.js +33 -0
  115. package/build/template/components/ComponentDispatch.js.map +1 -0
  116. package/build/template/components/ReferenceLink.d.ts +19 -0
  117. package/build/template/components/ReferenceLink.d.ts.map +1 -0
  118. package/build/template/components/ReferenceLink.js +19 -0
  119. package/build/template/components/ReferenceLink.js.map +1 -0
  120. package/build/template/components/TypeAnnotation.d.ts.map +1 -1
  121. package/build/template/components/TypeAnnotation.js +3 -3
  122. package/build/template/components/TypeAnnotation.js.map +1 -1
  123. package/build/template/components/TypeFieldsLinkList.d.ts.map +1 -1
  124. package/build/template/components/TypeFieldsLinkList.js +4 -4
  125. package/build/template/components/TypeFieldsLinkList.js.map +1 -1
  126. package/build/template/components/TypeIndex.js +2 -2
  127. package/build/template/components/TypeIndex.js.map +1 -1
  128. package/build/template/components/VersionSelector.d.ts +7 -0
  129. package/build/template/components/VersionSelector.d.ts.map +1 -0
  130. package/build/template/components/VersionSelector.js +30 -0
  131. package/build/template/components/VersionSelector.js.map +1 -0
  132. package/build/template/components/graphql/type-link.d.ts.map +1 -1
  133. package/build/template/components/graphql/type-link.js +2 -2
  134. package/build/template/components/graphql/type-link.js.map +1 -1
  135. package/build/template/hooks/useVersionPath.d.ts +6 -0
  136. package/build/template/hooks/useVersionPath.d.ts.map +1 -0
  137. package/build/template/hooks/useVersionPath.js +10 -0
  138. package/build/template/hooks/useVersionPath.js.map +1 -0
  139. package/build/template/layouts/ChangelogLayout.d.ts.map +1 -0
  140. package/build/template/{components → layouts}/ChangelogLayout.js +1 -1
  141. package/build/template/layouts/ChangelogLayout.js.map +1 -0
  142. package/build/template/layouts/index.d.ts +1 -0
  143. package/build/template/layouts/index.d.ts.map +1 -1
  144. package/build/template/layouts/index.js +1 -0
  145. package/build/template/layouts/index.js.map +1 -1
  146. package/build/template/lib/fetch-text.d.ts +8 -0
  147. package/build/template/lib/fetch-text.d.ts.map +1 -0
  148. package/build/template/lib/fetch-text.js +14 -0
  149. package/build/template/lib/fetch-text.js.map +1 -0
  150. package/build/template/lib/polen-url.d.ts +14 -0
  151. package/build/template/lib/polen-url.d.ts.map +1 -1
  152. package/build/template/lib/polen-url.js +16 -0
  153. package/build/template/lib/polen-url.js.map +1 -1
  154. package/build/template/lib/schema-utils/constants.d.ts +5 -0
  155. package/build/template/lib/schema-utils/constants.d.ts.map +1 -0
  156. package/build/template/lib/schema-utils/constants.js +5 -0
  157. package/build/template/lib/schema-utils/constants.js.map +1 -0
  158. package/build/template/lib/schema-utils/schema-utils.d.ts +15 -0
  159. package/build/template/lib/schema-utils/schema-utils.d.ts.map +1 -0
  160. package/build/template/lib/schema-utils/schema-utils.js +37 -0
  161. package/build/template/lib/schema-utils/schema-utils.js.map +1 -0
  162. package/build/template/routes/changelog.d.ts +4 -3
  163. package/build/template/routes/changelog.d.ts.map +1 -1
  164. package/build/template/routes/changelog.js +15 -9
  165. package/build/template/routes/changelog.js.map +1 -1
  166. package/build/template/routes/index.js +2 -2
  167. package/build/template/routes/index.js.map +1 -1
  168. package/build/template/routes/pages.d.ts +10 -0
  169. package/build/template/routes/pages.d.ts.map +1 -0
  170. package/build/template/routes/pages.js +76 -0
  171. package/build/template/routes/pages.js.map +1 -0
  172. package/build/template/routes/reference.d.ts +35 -6
  173. package/build/template/routes/reference.d.ts.map +1 -1
  174. package/build/template/routes/reference.js +97 -14
  175. package/build/template/routes/reference.js.map +1 -1
  176. package/build/template/routes/root.d.ts.map +1 -1
  177. package/build/template/routes/root.js +11 -75
  178. package/build/template/routes/root.js.map +1 -1
  179. package/build/template/server/app.d.ts +22 -1
  180. package/build/template/server/app.d.ts.map +1 -1
  181. package/build/template/server/app.js +19 -9
  182. package/build/template/server/app.js.map +1 -1
  183. package/build/template/server/main.js +9 -1
  184. package/build/template/server/main.js.map +1 -1
  185. package/build/template/server/ssg/generate.js +2 -2
  186. package/build/template/server/ssg/generate.js.map +1 -1
  187. package/build/template/server/ssg/get-route-paths.d.ts +1 -1
  188. package/build/template/server/ssg/get-route-paths.d.ts.map +1 -1
  189. package/build/template/server/ssg/get-route-paths.js +90 -27
  190. package/build/template/server/ssg/get-route-paths.js.map +1 -1
  191. package/build/template/sources/schema-source.d.ts +15 -0
  192. package/build/template/sources/schema-source.d.ts.map +1 -0
  193. package/build/template/sources/schema-source.js +64 -0
  194. package/build/template/sources/schema-source.js.map +1 -0
  195. package/package.json +16 -17
  196. package/src/api/api.ts +1 -0
  197. package/src/api/config/configurator.ts +86 -36
  198. package/src/api/config/merge.ts +0 -16
  199. package/src/api/content/metadata.ts +1 -1
  200. package/src/api/schema/data-sources/data-sources.ts +1 -0
  201. package/src/api/schema/data-sources/introspection/introspection.ts +213 -0
  202. package/src/api/schema/data-sources/memory/memory.ts +3 -5
  203. package/src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts +29 -13
  204. package/src/api/schema/data-sources/schema-directory/schema-directory.ts +56 -16
  205. package/src/api/schema/data-sources/schema-file/schema-file.ts +16 -7
  206. package/src/api/schema/metadata.ts +23 -0
  207. package/src/api/schema/read.ts +109 -18
  208. package/src/api/schema/schema.ts +62 -2
  209. package/src/api/schema-source/index.ts +1 -0
  210. package/src/api/schema-source/schema-source.ts +189 -0
  211. package/src/api/static/manifest.ts +1 -1
  212. package/src/api/vite/plugins/build.ts +3 -0
  213. package/src/api/vite/plugins/core.ts +27 -22
  214. package/src/api/vite/plugins/main.ts +1 -9
  215. package/src/api/vite/plugins/schema-assets.ts +364 -0
  216. package/src/api/vite/plugins/serve.ts +15 -8
  217. package/src/cli/commands/open.ts +1 -1
  218. package/src/lib/grafaid/schema/schema.ts +1 -0
  219. package/src/lib/graphql-change/change-groups.ts +57 -0
  220. package/src/lib/kit-temp.ts +15 -2
  221. package/src/lib/mask/$.test.ts +3 -3
  222. package/src/lib/path-map/$.test.ts +22 -19
  223. package/src/lib/path-map/path-map.ts +3 -1
  224. package/src/lib/react-router-aid/react-router-aid.ts +12 -6
  225. package/src/project-data.ts +3 -11
  226. package/src/template/components/Changelog.tsx +16 -67
  227. package/src/template/components/CodeBlock.tsx +3 -5
  228. package/src/template/components/ComponentDispatch.tsx +42 -0
  229. package/src/template/components/ReferenceLink.tsx +34 -0
  230. package/src/template/components/TypeAnnotation.tsx +5 -7
  231. package/src/template/components/TypeFieldsLinkList.tsx +20 -23
  232. package/src/template/components/TypeIndex.tsx +10 -12
  233. package/src/template/components/VersionSelector.tsx +50 -0
  234. package/src/template/components/graphql/type-link.tsx +4 -3
  235. package/src/template/hooks/useVersionPath.ts +10 -0
  236. package/src/template/{components → layouts}/ChangelogLayout.tsx +1 -1
  237. package/src/template/layouts/index.ts +1 -0
  238. package/src/template/lib/fetch-text.ts +13 -0
  239. package/src/template/lib/polen-url.ts +20 -0
  240. package/src/template/lib/schema-utils/constants.ts +4 -0
  241. package/src/template/lib/schema-utils/schema-utils.ts +42 -0
  242. package/src/template/routes/changelog.tsx +19 -10
  243. package/src/template/routes/index.tsx +2 -2
  244. package/src/template/routes/pages.tsx +109 -0
  245. package/src/template/routes/reference.tsx +112 -12
  246. package/src/template/routes/root.tsx +11 -112
  247. package/src/template/server/app.ts +47 -14
  248. package/src/template/server/main.ts +9 -1
  249. package/src/template/server/ssg/generate.ts +2 -2
  250. package/src/template/server/ssg/get-route-paths.test.ts +132 -0
  251. package/src/template/server/ssg/get-route-paths.ts +91 -27
  252. package/src/template/sources/schema-source.ts +69 -0
  253. package/build/lib/graphql-document/$$.d.ts +0 -5
  254. package/build/lib/graphql-document/$$.d.ts.map +0 -1
  255. package/build/lib/graphql-document/$$.js +0 -5
  256. package/build/lib/graphql-document/$$.js.map +0 -1
  257. package/build/lib/graphql-document/$.d.ts +0 -2
  258. package/build/lib/graphql-document/$.d.ts.map +0 -1
  259. package/build/lib/graphql-document/$.js +0 -2
  260. package/build/lib/graphql-document/$.js.map +0 -1
  261. package/build/lib/graphql-document/analysis.d.ts +0 -44
  262. package/build/lib/graphql-document/analysis.d.ts.map +0 -1
  263. package/build/lib/graphql-document/analysis.js +0 -361
  264. package/build/lib/graphql-document/analysis.js.map +0 -1
  265. package/build/lib/graphql-document/components/GraphQLDocument.d.ts +0 -38
  266. package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +0 -1
  267. package/build/lib/graphql-document/components/GraphQLDocument.js +0 -151
  268. package/build/lib/graphql-document/components/GraphQLDocument.js.map +0 -1
  269. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +0 -7
  270. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +0 -1
  271. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +0 -27
  272. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +0 -1
  273. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts +0 -33
  274. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +0 -1
  275. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +0 -50
  276. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +0 -1
  277. package/build/lib/graphql-document/components/IdentifierLink.d.ts +0 -39
  278. package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +0 -1
  279. package/build/lib/graphql-document/components/IdentifierLink.js +0 -75
  280. package/build/lib/graphql-document/components/IdentifierLink.js.map +0 -1
  281. package/build/lib/graphql-document/components/graphql-document-styles.d.ts +0 -5
  282. package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +0 -1
  283. package/build/lib/graphql-document/components/graphql-document-styles.js +0 -144
  284. package/build/lib/graphql-document/components/graphql-document-styles.js.map +0 -1
  285. package/build/lib/graphql-document/components/index.d.ts +0 -5
  286. package/build/lib/graphql-document/components/index.d.ts.map +0 -1
  287. package/build/lib/graphql-document/components/index.js +0 -5
  288. package/build/lib/graphql-document/components/index.js.map +0 -1
  289. package/build/lib/graphql-document/example.d.ts +0 -25
  290. package/build/lib/graphql-document/example.d.ts.map +0 -1
  291. package/build/lib/graphql-document/example.js +0 -140
  292. package/build/lib/graphql-document/example.js.map +0 -1
  293. package/build/lib/graphql-document/graphql-document.d.ts +0 -35
  294. package/build/lib/graphql-document/graphql-document.d.ts.map +0 -1
  295. package/build/lib/graphql-document/graphql-document.js +0 -36
  296. package/build/lib/graphql-document/graphql-document.js.map +0 -1
  297. package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts +0 -43
  298. package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +0 -1
  299. package/build/lib/graphql-document/hooks/use-tooltip-state.js +0 -132
  300. package/build/lib/graphql-document/hooks/use-tooltip-state.js.map +0 -1
  301. package/build/lib/graphql-document/positioning-simple.d.ts +0 -63
  302. package/build/lib/graphql-document/positioning-simple.d.ts.map +0 -1
  303. package/build/lib/graphql-document/positioning-simple.js +0 -185
  304. package/build/lib/graphql-document/positioning-simple.js.map +0 -1
  305. package/build/lib/graphql-document/schema-context.d.ts +0 -8
  306. package/build/lib/graphql-document/schema-context.d.ts.map +0 -1
  307. package/build/lib/graphql-document/schema-context.js +0 -11
  308. package/build/lib/graphql-document/schema-context.js.map +0 -1
  309. package/build/lib/graphql-document/schema-integration.d.ts +0 -135
  310. package/build/lib/graphql-document/schema-integration.d.ts.map +0 -1
  311. package/build/lib/graphql-document/schema-integration.js +0 -328
  312. package/build/lib/graphql-document/schema-integration.js.map +0 -1
  313. package/build/lib/graphql-document/types.d.ts +0 -117
  314. package/build/lib/graphql-document/types.d.ts.map +0 -1
  315. package/build/lib/graphql-document/types.js +0 -2
  316. package/build/lib/graphql-document/types.js.map +0 -1
  317. package/build/template/components/ChangelogLayout.d.ts.map +0 -1
  318. package/build/template/components/ChangelogLayout.js.map +0 -1
  319. package/build/template/components/CodeHikePre.d.ts +0 -16
  320. package/build/template/components/CodeHikePre.d.ts.map +0 -1
  321. package/build/template/components/CodeHikePre.js +0 -37
  322. package/build/template/components/CodeHikePre.js.map +0 -1
  323. package/build/template/routes/reference.$type.$field.d.ts +0 -5
  324. package/build/template/routes/reference.$type.$field.d.ts.map +0 -1
  325. package/build/template/routes/reference.$type.$field.js +0 -31
  326. package/build/template/routes/reference.$type.$field.js.map +0 -1
  327. package/build/template/routes/reference.$type.d.ts +0 -5
  328. package/build/template/routes/reference.$type.d.ts.map +0 -1
  329. package/build/template/routes/reference.$type.js +0 -23
  330. package/build/template/routes/reference.$type.js.map +0 -1
  331. package/src/lib/graphql-document/$$.ts +0 -4
  332. package/src/lib/graphql-document/$.test.ts +0 -132
  333. package/src/lib/graphql-document/$.ts +0 -1
  334. package/src/lib/graphql-document/README.md +0 -102
  335. package/src/lib/graphql-document/analysis.ts +0 -415
  336. package/src/lib/graphql-document/components/GraphQLDocument.tsx +0 -265
  337. package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +0 -188
  338. package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +0 -46
  339. package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +0 -199
  340. package/src/lib/graphql-document/components/IdentifierLink.tsx +0 -160
  341. package/src/lib/graphql-document/components/graphql-document-styles.ts +0 -144
  342. package/src/lib/graphql-document/components/index.ts +0 -4
  343. package/src/lib/graphql-document/demo.md +0 -155
  344. package/src/lib/graphql-document/example.ts +0 -163
  345. package/src/lib/graphql-document/graphql-document.ts +0 -37
  346. package/src/lib/graphql-document/hooks/use-tooltip-state.test.ts +0 -76
  347. package/src/lib/graphql-document/hooks/use-tooltip-state.ts +0 -191
  348. package/src/lib/graphql-document/positioning-simple.test.ts +0 -248
  349. package/src/lib/graphql-document/positioning-simple.ts +0 -260
  350. package/src/lib/graphql-document/schema-context.tsx +0 -20
  351. package/src/lib/graphql-document/schema-integration.test.ts +0 -365
  352. package/src/lib/graphql-document/schema-integration.ts +0 -488
  353. package/src/lib/graphql-document/types.ts +0 -129
  354. package/src/template/components/CodeHikePre.tsx +0 -51
  355. package/src/template/routes/reference.$type.$field.tsx +0 -34
  356. package/src/template/routes/reference.$type.tsx +0 -27
  357. /package/build/template/{components → layouts}/ChangelogLayout.d.ts +0 -0
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { GrafaidOld } from '#lib/grafaid-old/index';
3
3
  import { Box, Flex, Heading } from '@radix-ui/themes';
4
4
  import { Obj } from '@wollybeard/kit';
5
- import { Link } from './Link.js';
5
+ import { ReferenceLink } from './ReferenceLink.js';
6
6
  export const TypeIndex = ({ schema }) => {
7
7
  const kindMap = GrafaidOld.getKindMap(schema);
8
8
  const sections = Obj.entries(kindMap.list);
@@ -12,6 +12,6 @@ const TypeSection = ({ title, types }) => {
12
12
  return (_jsxs(Box, { children: [_jsx(Heading, { size: '3', children: title }), _jsx(TypeList, { types: types })] }));
13
13
  };
14
14
  const TypeList = ({ types }) => {
15
- return ((_jsx(Box, { children: types.map(type => (_jsx(Box, { children: _jsx(Link, { to: `/reference/${type.name}`, children: type.name }) }, type.name))) })));
15
+ return (_jsx(Box, { children: types.map(type => (_jsx(Box, { children: _jsx(ReferenceLink, { type: type.name, children: type.name }) }, type.name))) }));
16
16
  };
17
17
  //# sourceMappingURL=TypeIndex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypeIndex.js","sourceRoot":"","sources":["../../../src/template/components/TypeIndex.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AA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CAIb,CACP,CAAC,GACE,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ interface VersionSelectorProps {
2
+ availableVersions: string[];
3
+ currentVersion: string;
4
+ }
5
+ export declare const VersionSelector: ({ availableVersions, currentVersion }: VersionSelectorProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
7
+ //# sourceMappingURL=VersionSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionSelector.d.ts","sourceRoot":"","sources":["../../../src/template/components/VersionSelector.tsx"],"names":[],"mappings":"AAIA,UAAU,oBAAoB;IAC5B,iBAAiB,EAAE,MAAM,EAAE,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,eAAe,GAAI,uCAAuC,oBAAoB,mDAwC1F,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Select } from '@radix-ui/themes';
3
+ import { useNavigate, useParams } from 'react-router';
4
+ import { VERSION_LATEST } from '../lib/schema-utils/constants.js';
5
+ export const VersionSelector = ({ availableVersions, currentVersion }) => {
6
+ const navigate = useNavigate();
7
+ const params = useParams();
8
+ // Don't show selector if only one version
9
+ if (availableVersions.length <= 1) {
10
+ return null;
11
+ }
12
+ const handleVersionChange = (newVersion) => {
13
+ // Build new path preserving the current type/field if any
14
+ const currentType = params[`type`];
15
+ const currentField = params[`field`];
16
+ let newPath = `/reference`;
17
+ if (newVersion !== VERSION_LATEST) {
18
+ newPath += `/version/${newVersion}`;
19
+ }
20
+ if (currentType) {
21
+ newPath += `/${currentType}`;
22
+ if (currentField) {
23
+ newPath += `/${currentField}`;
24
+ }
25
+ }
26
+ navigate(newPath);
27
+ };
28
+ return (_jsxs(Select.Root, { value: currentVersion, onValueChange: handleVersionChange, children: [_jsx(Select.Trigger, {}), _jsx(Select.Content, { children: availableVersions.map(version => (_jsx(Select.Item, { value: version, children: version === VERSION_LATEST ? `Latest` : version }, version))) })] }));
29
+ };
30
+ //# sourceMappingURL=VersionSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionSelector.js","sourceRoot":"","sources":["../../../src/template/components/VersionSelector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAOjE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAwB,EAAE,EAAE;IAC7F,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,0CAA0C;IAC1C,IAAI,iBAAiB,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QAClC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAE,EAAE;QACjD,0DAA0D;QAC1D,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;QAClC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;QAEpC,IAAI,OAAO,GAAG,YAAY,CAAA;QAC1B,IAAI,UAAU,KAAK,cAAc,EAAE,CAAC;YAClC,OAAO,IAAI,YAAY,UAAU,EAAE,CAAA;QACrC,CAAC;QACD,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,IAAI,IAAI,WAAW,EAAE,CAAA;YAC5B,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,IAAI,IAAI,YAAY,EAAE,CAAA;YAC/B,CAAC;QACH,CAAC;QAED,QAAQ,CAAC,OAAO,CAAC,CAAA;IACnB,CAAC,CAAA;IAED,OAAO,CACL,MAAC,MAAM,CAAC,IAAI,IAAC,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,aACpE,KAAC,MAAM,CAAC,OAAO,KAAG,EAClB,KAAC,MAAM,CAAC,OAAO,cACZ,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAChC,KAAC,MAAM,CAAC,IAAI,IAAe,KAAK,EAAE,OAAO,YACtC,OAAO,KAAK,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,IADhC,OAAO,CAEX,CACf,CAAC,GACa,IACL,CACf,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"type-link.d.ts","sourceRoot":"","sources":["../../../../src/template/components/graphql/type-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAM5C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAA;CAAE,CAWvE,CAAA"}
1
+ {"version":3,"file":"type-link.d.ts","sourceRoot":"","sources":["../../../../src/template/components/graphql/type-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAM5C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAA;CAAE,CAYvE,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Grafaid } from '#lib/grafaid/index';
3
3
  import { Code, Flex } from '@radix-ui/themes';
4
- import { Link } from '../Link.js';
4
+ import { ReferenceLink } from '../ReferenceLink.js';
5
5
  import { TypeKindIcon } from './graphql.js';
6
6
  import { typeKindTokensIndex } from './type-kind-tokens.js';
7
7
  export const TypeLink = ({ type }) => {
8
8
  const kind = Grafaid.Schema.typeKindFromClass(type);
9
- return (_jsx(Link, { to: `/reference/${type.name}`, children: _jsxs(Flex, { align: 'center', gap: '1', display: 'inline-flex', children: [_jsx(TypeKindIcon, { kind: kind }), ` `, _jsx(Code, { color: typeKindTokensIndex[kind].color, variant: 'ghost', children: type.name })] }) }));
9
+ return (_jsx(ReferenceLink, { type: type.name, children: _jsxs(Flex, { align: 'center', gap: '1', display: 'inline-flex', children: [_jsx(TypeKindIcon, { kind: kind }), ` `, _jsx(Code, { color: typeKindTokensIndex[kind].color, variant: 'ghost', children: type.name })] }) }));
10
10
  };
11
11
  //# sourceMappingURL=type-link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-link.js","sourceRoot":"","sources":["../../../../src/template/components/graphql/type-link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,CAAC,MAAM,QAAQ,GAAuD,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACvF,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACnD,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,cAAc,IAAI,CAAC,IAAI,EAAE,YACjC,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,GAAG,EAAC,OAAO,EAAC,aAAa,aAChD,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,GAAI,EAC3B,GAAG,EACJ,KAAC,IAAI,IAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAC,OAAO,YAAE,IAAI,CAAC,IAAI,GAAQ,IAC3E,GACF,CACR,CAAA;AACH,CAAC,CAAA"}
1
+ {"version":3,"file":"type-link.js","sourceRoot":"","sources":["../../../../src/template/components/graphql/type-link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,CAAC,MAAM,QAAQ,GAAuD,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACvF,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAEnD,OAAO,CACL,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,YAC5B,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,GAAG,EAAC,OAAO,EAAC,aAAa,aAChD,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,GAAI,EAC3B,GAAG,EACJ,KAAC,IAAI,IAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAC,OAAO,YAAE,IAAI,CAAC,IAAI,GAAQ,IAC3E,GACO,CACjB,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Custom hook to generate version path for versioned routes
3
+ * Returns the appropriate path prefix for the current version
4
+ */
5
+ export declare const useVersionPath: () => string;
6
+ //# sourceMappingURL=useVersionPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVersionPath.d.ts","sourceRoot":"","sources":["../../../src/template/hooks/useVersionPath.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,MAGjC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { useParams } from 'react-router';
2
+ /**
3
+ * Custom hook to generate version path for versioned routes
4
+ * Returns the appropriate path prefix for the current version
5
+ */
6
+ export const useVersionPath = () => {
7
+ const params = useParams();
8
+ return params[`version`] ? `version/${params[`version`]}/` : ``;
9
+ };
10
+ //# sourceMappingURL=useVersionPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVersionPath.js","sourceRoot":"","sources":["../../../src/template/hooks/useVersionPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAW,EAAE;IACzC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;AACjE,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangelogLayout.d.ts","sourceRoot":"","sources":["../../../src/template/layouts/ChangelogLayout.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAEpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAA;CACvC;AAoED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyE1D,CAAA"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CRITICALITY_CONFIG, isCriticalityBreaking, isCriticalityDangerous, isCriticalitySafe, } from '#lib/graphql-change/criticality';
3
3
  import { Box, Flex, Text } from '@radix-ui/themes';
4
4
  import { useEffect, useState } from 'react';
5
- import { renderDate } from './Changelog.js';
5
+ import { renderDate } from '../components/Changelog.js';
6
6
  const calculateCounts = (version) => {
7
7
  return {
8
8
  breaking: version.changes.filter(isCriticalityBreaking).length,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangelogLayout.js","sourceRoot":"","sources":["../../../src/template/layouts/ChangelogLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,iCAAiC,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAavD,MAAM,eAAe,GAAG,CAAC,OAAmC,EAAiB,EAAE;IAC7E,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,MAAM;QAC9D,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,MAAM;QAChE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM;KACvD,CAAA;AACH,CAAC,CAAA;AAED,MAAM,YAAY,GAIb,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE;IACrC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAA;IAEzC,OAAO,CACL,KAAC,GAAG,IAAC,EAAE,EAAC,GAAG,YACT,aACE,IAAI,EAAE,IAAI,MAAM,EAAE,EAClB,KAAK,EAAE;gBACL,cAAc,EAAE,MAAM;gBACtB,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,eAAe;gBAC/B,OAAO,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A;QAElE,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;QACpD,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAA;IAExB,OAAO,CACL,MAAC,IAAI,IAAC,GAAG,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAE3C,MAAC,GAAG,IACF,KAAK,EAAE;oBACL,QAAQ,EAAE,QAAQ;oBAClB,GAAG,EAAE,MAAM;oBACX,MAAM,EAAE,aAAa;oBACrB,QAAQ,EAAE,OAAO;oBACjB,SAAS,EAAE,oBAAoB;oBAC/B,SAAS,EAAE,MAAM;iBAClB,aAED,KAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,MAAM,EAAC,QAAQ,EAAC,EAAE,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,yBAE1D,EACN,kBAAkB,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAC/C,KAAC,YAAY,IAEX,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAHjD,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAI/B,CACH,CAAC,IACE,EAGN,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,YACjC,QAAQ,GACL,IACD,CACR,CAAA;AACH,CAAC,CAAA"}
@@ -1,2 +1,3 @@
1
+ export * from './ChangelogLayout.js';
1
2
  export * from './SidebarLayout.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,3 @@
1
+ export * from './ChangelogLayout.js';
1
2
  export * from './SidebarLayout.js';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Fetch text content from a URL
3
+ * @param url - The URL to fetch from
4
+ * @returns Promise that resolves to the text content
5
+ * @throws Error if the request fails
6
+ */
7
+ export declare const fetchText: (url: string) => Promise<string>;
8
+ //# sourceMappingURL=fetch-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-text.d.ts","sourceRoot":"","sources":["../../../src/template/lib/fetch-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,MAAM,CAM3D,CAAA"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Fetch text content from a URL
3
+ * @param url - The URL to fetch from
4
+ * @returns Promise that resolves to the text content
5
+ * @throws Error if the request fails
6
+ */
7
+ export const fetchText = async (url) => {
8
+ const response = await fetch(url);
9
+ if (!response.ok) {
10
+ throw new Error(`Failed to fetch: ${url} (${response.status} ${response.statusText})`);
11
+ }
12
+ return response.text();
13
+ };
14
+ //# sourceMappingURL=fetch-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-text.js","sourceRoot":"","sources":["../../../src/template/lib/fetch-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,GAAW,EAAmB,EAAE;IAC9D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IACjC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,KAAK,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAA;AACxB,CAAC,CAAA"}
@@ -21,4 +21,18 @@
21
21
  * polenUrlPath('reference/Pokemon#field') // '/demos/pokemon/reference/Pokemon#field'
22
22
  */
23
23
  export declare const polenUrlPath: (...segments: string[]) => string;
24
+ /**
25
+ * Create a Polen URL path for assets.
26
+ *
27
+ * This is a convenience wrapper around `polenUrlPath` that automatically
28
+ * prepends the assets root path.
29
+ *
30
+ * @param segments - Path segments within the assets directory
31
+ * @returns Full URL path to the asset
32
+ *
33
+ * @example
34
+ * polenUrlPathAssets('schemas', 'latest.json') // '/demos/pokemon/assets/schemas/latest.json'
35
+ * polenUrlPathAssets('images/logo.png') // '/demos/pokemon/assets/images/logo.png'
36
+ */
37
+ export declare const polenUrlPathAssets: (...segments: string[]) => string;
24
38
  //# sourceMappingURL=polen-url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"polen-url.d.ts","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,UAAU,MAAM,EAAE,KAAG,MAUpD,CAAA"}
1
+ {"version":3,"file":"polen-url.d.ts","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,UAAU,MAAM,EAAE,KAAG,MAUpD,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,UAAU,MAAM,EAAE,KAAG,MAK1D,CAAA"}
@@ -30,4 +30,20 @@ export const polenUrlPath = (...segments) => {
30
30
  .replace(/^\//, ''); // Remove leading slash
31
31
  return basePath + path;
32
32
  };
33
+ /**
34
+ * Create a Polen URL path for assets.
35
+ *
36
+ * This is a convenience wrapper around `polenUrlPath` that automatically
37
+ * prepends the assets root path.
38
+ *
39
+ * @param segments - Path segments within the assets directory
40
+ * @returns Full URL path to the asset
41
+ *
42
+ * @example
43
+ * polenUrlPathAssets('schemas', 'latest.json') // '/demos/pokemon/assets/schemas/latest.json'
44
+ * polenUrlPathAssets('images/logo.png') // '/demos/pokemon/assets/images/logo.png'
45
+ */
46
+ export const polenUrlPathAssets = (...segments) => {
47
+ return polenUrlPath(PROJECT_DATA.server.routes.assets, ...segments);
48
+ };
33
49
  //# sourceMappingURL=polen-url.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"polen-url.js","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,QAAkB,EAAU,EAAE;IAC5D,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAA,CAAC,0BAA0B;IAEjE,sCAAsC;IACtC,MAAM,IAAI,GAAG,QAAQ;SAClB,IAAI,CAAC,GAAG,CAAC;SACT,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,2BAA2B;SAChD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA,CAAC,uBAAuB;IAE7C,OAAO,QAAQ,GAAG,IAAI,CAAA;AACxB,CAAC,CAAA"}
1
+ {"version":3,"file":"polen-url.js","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,QAAkB,EAAU,EAAE;IAC5D,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAA,CAAC,0BAA0B;IAEjE,sCAAsC;IACtC,MAAM,IAAI,GAAG,QAAQ;SAClB,IAAI,CAAC,GAAG,CAAC;SACT,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,2BAA2B;SAChD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA,CAAC,uBAAuB;IAE7C,OAAO,QAAQ,GAAG,IAAI,CAAA;AACxB,CAAC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAG,QAAkB,EAAU,EAAE;IAClE,OAAO,YAAY,CACjB,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EACjC,GAAG,QAAQ,CACZ,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Re-exports of schema constants for template usage
3
+ */
4
+ export { dateToVersionString, VERSION_LATEST } from '#api/schema/schema';
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Re-exports of schema constants for template usage
3
+ */
4
+ export { dateToVersionString, VERSION_LATEST } from '#api/schema/schema';
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { DocumentNode, GraphQLSchema } from 'graphql';
2
+ /**
3
+ * Convert a GraphQL AST back to a GraphQL Schema object
4
+ */
5
+ export declare const astToSchema: (ast: DocumentNode) => GraphQLSchema;
6
+ /**
7
+ * Simple cache for loaded schemas to avoid repeated conversions
8
+ */
9
+ export declare const createSchemaCache: () => {
10
+ get(version: string): GraphQLSchema | undefined;
11
+ set(version: string, schema: GraphQLSchema): void;
12
+ has(version: string): boolean;
13
+ clear(): void;
14
+ };
15
+ //# sourceMappingURL=schema-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-utils.d.ts","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/schema-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE1D;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,YAAY,KAAG,aAK/C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;iBAIb,MAAM,GAAG,aAAa,GAAG,SAAS;iBAIlC,MAAM,UAAU,aAAa,GAAG,IAAI;iBASpC,MAAM,GAAG,OAAO;aAIpB,IAAI;CAIhB,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { buildSchema, print } from 'graphql';
2
+ /**
3
+ * Convert a GraphQL AST back to a GraphQL Schema object
4
+ */
5
+ export const astToSchema = (ast) => {
6
+ // Convert AST back to SDL string
7
+ const sdl = print(ast);
8
+ // Build schema from SDL
9
+ return buildSchema(sdl);
10
+ };
11
+ /**
12
+ * Simple cache for loaded schemas to avoid repeated conversions
13
+ */
14
+ export const createSchemaCache = () => {
15
+ const cache = new Map();
16
+ return {
17
+ get(version) {
18
+ return cache.get(version);
19
+ },
20
+ set(version, schema) {
21
+ // Limit cache size to prevent memory issues
22
+ if (cache.size >= 10) {
23
+ const firstKey = cache.keys().next().value;
24
+ if (firstKey)
25
+ cache.delete(firstKey);
26
+ }
27
+ cache.set(version, schema);
28
+ },
29
+ has(version) {
30
+ return cache.has(version);
31
+ },
32
+ clear() {
33
+ cache.clear();
34
+ },
35
+ };
36
+ };
37
+ //# sourceMappingURL=schema-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-utils.js","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/schema-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG5C;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAiB,EAAiB,EAAE;IAC9D,iCAAiC;IACjC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACtB,wBAAwB;IACxB,OAAO,WAAW,CAAC,GAAG,CAAC,CAAA;AACzB,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAA;IAE9C,OAAO;QACL,GAAG,CAAC,OAAe;YACjB,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC3B,CAAC;QAED,GAAG,CAAC,OAAe,EAAE,MAAqB;YACxC,4CAA4C;YAC5C,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;gBACrB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAA;gBAC1C,IAAI,QAAQ;oBAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;YACtC,CAAC;YACD,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QAC5B,CAAC;QAED,GAAG,CAAC,OAAe;YACjB,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC3B,CAAC;QAED,KAAK;YACH,KAAK,CAAC,KAAK,EAAE,CAAA;QACf,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
@@ -1,8 +1,9 @@
1
+ import type { GraphqlChangeset } from '#lib/graphql-changeset/index';
1
2
  export declare const changelog: {
2
3
  path: string;
3
- loader: () => {
4
- schema: import("../../api/schema/schema.js").Schema | null;
5
- };
4
+ loader: () => Promise<{
5
+ changesets: GraphqlChangeset.ChangeSet[];
6
+ }>;
6
7
  Component: () => import("react/jsx-runtime").JSX.Element;
7
8
  };
8
9
  //# sourceMappingURL=changelog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":"AA0BA,eAAO,MAAM,SAAS;;;;;;CAIpB,CAAA"}
1
+ {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAmCpE,eAAO,MAAM,SAAS;;;;;;CAIpB,CAAA"}
@@ -1,22 +1,28 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createRoute } from '#lib/react-router-aid/react-router-aid';
2
+ import { route } from '#lib/react-router-aid/react-router-aid';
3
3
  import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
4
- import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
5
4
  import { Changelog } from '../components/Changelog.js';
6
- import { ChangelogLayout } from '../components/ChangelogLayout.js';
7
- const loader = createLoader(() => {
5
+ import { ChangelogLayout } from '../layouts/index.js';
6
+ import { schemaSource } from '../sources/schema-source.js';
7
+ const loader = createLoader(async () => {
8
+ // Check if schema exists first
9
+ if (schemaSource.isEmpty) {
10
+ return { changesets: [] };
11
+ }
12
+ // Fetch all changesets with before/after/changes data
13
+ const changesets = await schemaSource.getAllChangesets();
8
14
  return {
9
- schema: PROJECT_DATA.schema,
15
+ changesets,
10
16
  };
11
17
  });
12
18
  const Component = () => {
13
19
  const data = useLoaderData();
14
- if (!data.schema) {
15
- return _jsx("div", { children: "No data to show. There is no schema is." });
20
+ if (data.changesets.length === 0) {
21
+ return _jsx("div", { children: "No schema versions available for changelog." });
16
22
  }
17
- return (_jsx(ChangelogLayout, { versions: data.schema.versions, children: _jsx(Changelog, { schema: data.schema }) }));
23
+ return (_jsx(ChangelogLayout, { versions: data.changesets, children: _jsx(Changelog, { changesets: data.changesets }) }));
18
24
  };
19
- export const changelog = createRoute({
25
+ export const changelog = route({
20
26
  path: `changelog`,
21
27
  loader,
22
28
  Component,
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAElE,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE;IAC/B,OAAO;QACL,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,IAAI,GAAG,aAAa,EAAiB,CAAA;IAE3C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,oEAAkD,CAAA;IAC3D,CAAC;IAED,OAAO,CACL,KAAC,eAAe,IAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,YAC7C,KAAC,SAAS,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,GAClB,CACnB,CAAA;AACH,CAAC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@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createRouteIndex } from '#lib/react-router-aid/react-router-aid';
2
+ import { routeIndex } from '#lib/react-router-aid/react-router-aid';
3
3
  import { Box } from '@radix-ui/themes';
4
4
  const Component = () => {
5
5
  return _jsx(Box, { children: "home todo" });
6
6
  };
7
- export const index = createRouteIndex({
7
+ export const index = routeIndex({
8
8
  Component,
9
9
  });
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/template/routes/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,GAAG,4BAAgB,CAAA;AAC7B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,gBAAgB,CAAC;IACpC,SAAS;CACV,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/template/routes/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAA;AACnE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,GAAG,4BAAgB,CAAA;AAC7B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC;IAC9B,SAAS;CACV,CAAC,CAAA"}
@@ -0,0 +1,10 @@
1
+ export declare const pages: {
2
+ loader: () => Promise<{
3
+ schema: null;
4
+ } | {
5
+ schema: import("graphql").GraphQLSchema;
6
+ }>;
7
+ Component: () => import("react/jsx-runtime").JSX.Element;
8
+ children: import("react-router").RouteObject[];
9
+ };
10
+ //# sourceMappingURL=pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/template/routes/pages.tsx"],"names":[],"mappings":"AAuGA,eAAO,MAAM,KAAK;;;;;;;;CAKhB,CAAA"}
@@ -0,0 +1,76 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { route } from '#lib/react-router-aid/react-router-aid';
3
+ import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
4
+ import { SidebarLayout } from '#template/layouts/index';
5
+ import { MDXProvider } from '@mdx-js/react';
6
+ import { Badge, Box, Button, Callout, Card, Code, DataList, Em, Heading, Link, Quote, Separator, Strong, Table, Tabs, Text, Tooltip, } from '@radix-ui/themes';
7
+ import { Outlet, useLocation } from 'react-router';
8
+ import PROJECT_DATA_PAGES_CATALOG from 'virtual:polen/project/data/pages-catalog.jsonsuper';
9
+ import { routes } from 'virtual:polen/project/routes.jsx';
10
+ import { CodeBlock } from '../components/CodeBlock.js';
11
+ import { schemaSource } from '../sources/schema-source.js';
12
+ const loader = createLoader(async () => {
13
+ // Check if schema exists first
14
+ if (schemaSource.isEmpty) {
15
+ return { schema: null };
16
+ }
17
+ // Fetch the latest schema for MDX pages
18
+ const schema = await schemaSource.get('latest');
19
+ return { schema };
20
+ });
21
+ const Component = () => {
22
+ const { schema } = useLoaderData();
23
+ const location = useLocation();
24
+ // Build sidebar from pages catalog
25
+ // Get the top-level path segment (e.g., '/guide/foo' -> '/guide')
26
+ const pathSegments = location.pathname.split('/').filter(Boolean);
27
+ const topLevelPath = pathSegments[0] ? `/${pathSegments[0]}` : '/';
28
+ // Get the sidebar for this section
29
+ const sidebar = PROJECT_DATA_PAGES_CATALOG.sidebarIndex[topLevelPath]?.items || [];
30
+ return (_jsx(MDXProvider, { components: {
31
+ // Map markdown elements to Radix with spacing
32
+ p: (props) => _jsx(Text, { as: 'p', mb: '4', ...props }),
33
+ h1: (props) => _jsx(Heading, { size: '8', mt: '6', mb: '4', ...props }),
34
+ h2: (props) => _jsx(Heading, { size: '7', mt: '6', mb: '3', ...props }),
35
+ h3: (props) => _jsx(Heading, { size: '6', mt: '5', mb: '3', ...props }),
36
+ h4: (props) => _jsx(Heading, { size: '5', mt: '5', mb: '2', ...props }),
37
+ h5: (props) => _jsx(Heading, { size: '4', mt: '4', mb: '2', ...props }),
38
+ h6: (props) => _jsx(Heading, { size: '3', mt: '4', mb: '2', ...props }),
39
+ strong: Strong,
40
+ em: Em,
41
+ code: Code,
42
+ blockquote: (props) => _jsx(Quote, { my: '4', ...props }),
43
+ a: Link,
44
+ hr: (props) => _jsx(Separator, { my: '6', ...props }),
45
+ table: Table.Root,
46
+ thead: Table.Header,
47
+ tbody: Table.Body,
48
+ tr: Table.Row,
49
+ th: Table.ColumnHeaderCell,
50
+ td: Table.Cell,
51
+ // Lists need spacing too
52
+ ul: (props) => _jsx(Box, { as: 'ul', mb: '4', style: { paddingLeft: '1.5rem' }, ...props }),
53
+ ol: (props) => _jsx(Box, { as: 'ol', mb: '4', style: { paddingLeft: '1.5rem' }, ...props }),
54
+ li: (props) => _jsx(Box, { as: 'li', mb: '2', ...props }),
55
+ // Direct Radix components for MDX
56
+ Badge,
57
+ Button,
58
+ // @ts-expect-error
59
+ Callout,
60
+ Card,
61
+ // @ts-expect-error
62
+ DataList,
63
+ // @ts-expect-error
64
+ Tabs,
65
+ Tooltip,
66
+ // Code Hike component with schema injected
67
+ CodeBlock: (props) => _jsx(CodeBlock, { ...props, schema: schema }),
68
+ }, children: _jsx(SidebarLayout, { sidebar: sidebar, children: _jsx(Outlet, {}) }) }));
69
+ };
70
+ export const pages = route({
71
+ // Pathless layout route - doesn't affect URL paths
72
+ loader,
73
+ Component,
74
+ children: [...routes], // All MDX page routes go here
75
+ });
76
+ //# sourceMappingURL=pages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/template/routes/pages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAA;AAC9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B;YACnB,IAAI;YACJ,OAAO;YAEP,2CAA2C;YAC3C,SAAS,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI;SACpE,YAED,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,YAC7B,KAAC,MAAM,KAAG,GACI,GACJ,CACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC;IACzB,mDAAmD;IACnD,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,8BAA8B;CACtD,CAAC,CAAA"}
@@ -1,13 +1,42 @@
1
1
  import { GrafaidOld } from '#lib/grafaid-old/index';
2
+ export declare const loader: ({ params }: any) => Promise<{
3
+ schema: GrafaidOld.Schema.Schema;
4
+ currentVersion: any;
5
+ availableVersions: string[];
6
+ }>;
7
+ /**
8
+ * Reference documentation with proper nested structure - all routes in one file
9
+ */
2
10
  export declare const reference: {
11
+ id: string;
3
12
  path: string;
4
- loader: () => {
5
- schema: GrafaidOld.Schema.Schema | null;
6
- };
13
+ loader: ({ params }: any) => Promise<{
14
+ schema: GrafaidOld.Schema.Schema;
15
+ currentVersion: any;
16
+ availableVersions: string[];
17
+ }>;
7
18
  Component: () => import("react/jsx-runtime").JSX.Element;
8
- children: {
19
+ children: (import("#lib/react-router-aid/react-router-aid").RouteObjectIndex | {
9
20
  path: string;
10
- Component: () => string | import("react/jsx-runtime").JSX.Element;
11
- }[];
21
+ Component: () => import("react/jsx-runtime").JSX.Element;
22
+ errorElement: import("react/jsx-runtime").JSX.Element;
23
+ children: {
24
+ path: string;
25
+ Component: () => import("react/jsx-runtime").JSX.Element;
26
+ errorElement: import("react/jsx-runtime").JSX.Element;
27
+ }[];
28
+ } | {
29
+ path: string;
30
+ children: (import("#lib/react-router-aid/react-router-aid").RouteObjectIndex | {
31
+ path: string;
32
+ Component: () => import("react/jsx-runtime").JSX.Element;
33
+ errorElement: import("react/jsx-runtime").JSX.Element;
34
+ children: {
35
+ path: string;
36
+ Component: () => import("react/jsx-runtime").JSX.Element;
37
+ errorElement: import("react/jsx-runtime").JSX.Element;
38
+ }[];
39
+ })[];
40
+ })[];
12
41
  };
13
42
  //# sourceMappingURL=reference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAkDnD,eAAO,MAAM,SAAS;;;;;;;;;;CAKpB,CAAA"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAcnD,eAAO,MAAM,MAAM;;;;EAcjB,CAAA;AAgHF;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYpB,CAAA"}