polen 0.10.0 → 0.11.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) 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 +20 -3
  6. package/build/api/config/configurator.d.ts.map +1 -1
  7. package/build/api/config/configurator.js +27 -3
  8. package/build/api/config/configurator.js.map +1 -1
  9. package/build/api/schema/data-sources/memory/memory.d.ts +2 -2
  10. package/build/api/schema/data-sources/memory/memory.d.ts.map +1 -1
  11. package/build/api/schema/data-sources/memory/memory.js +1 -3
  12. package/build/api/schema/data-sources/memory/memory.js.map +1 -1
  13. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts +7 -3
  14. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts.map +1 -1
  15. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js +15 -11
  16. package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js.map +1 -1
  17. package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts +16 -7
  18. package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts.map +1 -1
  19. package/build/api/schema/data-sources/schema-directory/schema-directory.js +26 -7
  20. package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
  21. package/build/api/schema/data-sources/schema-file/schema-file.d.ts +7 -2
  22. package/build/api/schema/data-sources/schema-file/schema-file.d.ts.map +1 -1
  23. package/build/api/schema/data-sources/schema-file/schema-file.js +13 -5
  24. package/build/api/schema/data-sources/schema-file/schema-file.js.map +1 -1
  25. package/build/api/schema/metadata.d.ts +8 -0
  26. package/build/api/schema/metadata.d.ts.map +1 -0
  27. package/build/api/schema/metadata.js +19 -0
  28. package/build/api/schema/metadata.js.map +1 -0
  29. package/build/api/schema/read.d.ts +3 -3
  30. package/build/api/schema/read.d.ts.map +1 -1
  31. package/build/api/schema/read.js.map +1 -1
  32. package/build/api/schema/schema.d.ts +33 -2
  33. package/build/api/schema/schema.d.ts.map +1 -1
  34. package/build/api/schema/schema.js +42 -0
  35. package/build/api/schema/schema.js.map +1 -1
  36. package/build/api/schema-source/index.d.ts +2 -0
  37. package/build/api/schema-source/index.d.ts.map +1 -0
  38. package/build/api/schema-source/index.js +2 -0
  39. package/build/api/schema-source/index.js.map +1 -0
  40. package/build/api/schema-source/schema-source.d.ts +33 -0
  41. package/build/api/schema-source/schema-source.d.ts.map +1 -0
  42. package/build/api/schema-source/schema-source.js +137 -0
  43. package/build/api/schema-source/schema-source.js.map +1 -0
  44. package/build/api/vite/plugins/core.d.ts +1 -0
  45. package/build/api/vite/plugins/core.d.ts.map +1 -1
  46. package/build/api/vite/plugins/core.js +21 -18
  47. package/build/api/vite/plugins/core.js.map +1 -1
  48. package/build/api/vite/plugins/schema-assets.d.ts +22 -0
  49. package/build/api/vite/plugins/schema-assets.d.ts.map +1 -0
  50. package/build/api/vite/plugins/schema-assets.js +269 -0
  51. package/build/api/vite/plugins/schema-assets.js.map +1 -0
  52. package/build/api/vite/plugins/serve.d.ts.map +1 -1
  53. package/build/api/vite/plugins/serve.js +11 -0
  54. package/build/api/vite/plugins/serve.js.map +1 -1
  55. package/build/lib/graphql-change/change-groups.d.ts +2 -0
  56. package/build/lib/graphql-change/change-groups.d.ts.map +1 -1
  57. package/build/lib/graphql-change/change-groups.js +54 -0
  58. package/build/lib/graphql-change/change-groups.js.map +1 -1
  59. package/build/lib/kit-temp.d.ts +9 -0
  60. package/build/lib/kit-temp.d.ts.map +1 -1
  61. package/build/lib/kit-temp.js +12 -0
  62. package/build/lib/kit-temp.js.map +1 -1
  63. package/build/lib/path-map/path-map.d.ts.map +1 -1
  64. package/build/lib/path-map/path-map.js +3 -1
  65. package/build/lib/path-map/path-map.js.map +1 -1
  66. package/build/project-data.d.ts +3 -11
  67. package/build/project-data.d.ts.map +1 -1
  68. package/build/template/components/Changelog.d.ts +3 -3
  69. package/build/template/components/Changelog.d.ts.map +1 -1
  70. package/build/template/components/Changelog.js +8 -84
  71. package/build/template/components/Changelog.js.map +1 -1
  72. package/build/template/components/CodeBlock.d.ts +2 -0
  73. package/build/template/components/CodeBlock.d.ts.map +1 -1
  74. package/build/template/components/CodeBlock.js +1 -4
  75. package/build/template/components/CodeBlock.js.map +1 -1
  76. package/build/template/components/ComponentDispatch.d.ts +34 -0
  77. package/build/template/components/ComponentDispatch.d.ts.map +1 -0
  78. package/build/template/components/ComponentDispatch.js +33 -0
  79. package/build/template/components/ComponentDispatch.js.map +1 -0
  80. package/build/template/components/ReferenceLink.d.ts +19 -0
  81. package/build/template/components/ReferenceLink.d.ts.map +1 -0
  82. package/build/template/components/ReferenceLink.js +19 -0
  83. package/build/template/components/ReferenceLink.js.map +1 -0
  84. package/build/template/components/TypeAnnotation.d.ts.map +1 -1
  85. package/build/template/components/TypeAnnotation.js +3 -3
  86. package/build/template/components/TypeAnnotation.js.map +1 -1
  87. package/build/template/components/TypeFieldsLinkList.d.ts.map +1 -1
  88. package/build/template/components/TypeFieldsLinkList.js +4 -4
  89. package/build/template/components/TypeFieldsLinkList.js.map +1 -1
  90. package/build/template/components/TypeIndex.js +2 -2
  91. package/build/template/components/TypeIndex.js.map +1 -1
  92. package/build/template/components/VersionSelector.d.ts +7 -0
  93. package/build/template/components/VersionSelector.d.ts.map +1 -0
  94. package/build/template/components/VersionSelector.js +30 -0
  95. package/build/template/components/VersionSelector.js.map +1 -0
  96. package/build/template/components/graphql/type-link.d.ts.map +1 -1
  97. package/build/template/components/graphql/type-link.js +2 -2
  98. package/build/template/components/graphql/type-link.js.map +1 -1
  99. package/build/template/hooks/useVersionPath.d.ts +6 -0
  100. package/build/template/hooks/useVersionPath.d.ts.map +1 -0
  101. package/build/template/hooks/useVersionPath.js +10 -0
  102. package/build/template/hooks/useVersionPath.js.map +1 -0
  103. package/build/template/layouts/ChangelogLayout.d.ts.map +1 -0
  104. package/build/template/{components → layouts}/ChangelogLayout.js +1 -1
  105. package/build/template/layouts/ChangelogLayout.js.map +1 -0
  106. package/build/template/layouts/index.d.ts +1 -0
  107. package/build/template/layouts/index.d.ts.map +1 -1
  108. package/build/template/layouts/index.js +1 -0
  109. package/build/template/layouts/index.js.map +1 -1
  110. package/build/template/lib/fetch-text.d.ts +8 -0
  111. package/build/template/lib/fetch-text.d.ts.map +1 -0
  112. package/build/template/lib/fetch-text.js +14 -0
  113. package/build/template/lib/fetch-text.js.map +1 -0
  114. package/build/template/lib/polen-url.d.ts +14 -0
  115. package/build/template/lib/polen-url.d.ts.map +1 -1
  116. package/build/template/lib/polen-url.js +16 -0
  117. package/build/template/lib/polen-url.js.map +1 -1
  118. package/build/template/lib/schema-utils/constants.d.ts +5 -0
  119. package/build/template/lib/schema-utils/constants.d.ts.map +1 -0
  120. package/build/template/lib/schema-utils/constants.js +5 -0
  121. package/build/template/lib/schema-utils/constants.js.map +1 -0
  122. package/build/template/lib/schema-utils/schema-utils.d.ts +15 -0
  123. package/build/template/lib/schema-utils/schema-utils.d.ts.map +1 -0
  124. package/build/template/lib/schema-utils/schema-utils.js +37 -0
  125. package/build/template/lib/schema-utils/schema-utils.js.map +1 -0
  126. package/build/template/routes/changelog.d.ts +4 -3
  127. package/build/template/routes/changelog.d.ts.map +1 -1
  128. package/build/template/routes/changelog.js +13 -7
  129. package/build/template/routes/changelog.js.map +1 -1
  130. package/build/template/routes/pages.d.ts +10 -0
  131. package/build/template/routes/pages.d.ts.map +1 -0
  132. package/build/template/routes/pages.js +76 -0
  133. package/build/template/routes/pages.js.map +1 -0
  134. package/build/template/routes/reference.$type.$field.js +1 -1
  135. package/build/template/routes/reference.$type.$field.js.map +1 -1
  136. package/build/template/routes/reference.$type.d.ts +4 -0
  137. package/build/template/routes/reference.$type.d.ts.map +1 -1
  138. package/build/template/routes/reference.$type.js +2 -0
  139. package/build/template/routes/reference.$type.js.map +1 -1
  140. package/build/template/routes/reference.d.ts +9 -3
  141. package/build/template/routes/reference.d.ts.map +1 -1
  142. package/build/template/routes/reference.js +30 -8
  143. package/build/template/routes/reference.js.map +1 -1
  144. package/build/template/routes/reference.version.$version.$type.$field.d.ts +6 -0
  145. package/build/template/routes/reference.version.$version.$type.$field.d.ts.map +1 -0
  146. package/build/template/routes/reference.version.$version.$type.$field.js +32 -0
  147. package/build/template/routes/reference.version.$version.$type.$field.js.map +1 -0
  148. package/build/template/routes/reference.version.$version.$type.d.ts +11 -0
  149. package/build/template/routes/reference.version.$version.$type.d.ts.map +1 -0
  150. package/build/template/routes/reference.version.$version.$type.js +26 -0
  151. package/build/template/routes/reference.version.$version.$type.js.map +1 -0
  152. package/build/template/routes/root.d.ts.map +1 -1
  153. package/build/template/routes/root.js +8 -72
  154. package/build/template/routes/root.js.map +1 -1
  155. package/build/template/server/app.d.ts +22 -1
  156. package/build/template/server/app.d.ts.map +1 -1
  157. package/build/template/server/app.js +19 -9
  158. package/build/template/server/app.js.map +1 -1
  159. package/build/template/server/main.js +9 -1
  160. package/build/template/server/main.js.map +1 -1
  161. package/build/template/server/ssg/generate.js +2 -2
  162. package/build/template/server/ssg/generate.js.map +1 -1
  163. package/build/template/server/ssg/get-route-paths.d.ts +1 -1
  164. package/build/template/server/ssg/get-route-paths.d.ts.map +1 -1
  165. package/build/template/server/ssg/get-route-paths.js +51 -27
  166. package/build/template/server/ssg/get-route-paths.js.map +1 -1
  167. package/build/template/sources/schema-source.d.ts +15 -0
  168. package/build/template/sources/schema-source.d.ts.map +1 -0
  169. package/build/template/sources/schema-source.js +63 -0
  170. package/build/template/sources/schema-source.js.map +1 -0
  171. package/package.json +1 -1
  172. package/src/api/api.ts +1 -0
  173. package/src/api/config/configurator.ts +51 -6
  174. package/src/api/schema/data-sources/memory/memory.ts +3 -5
  175. package/src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts +29 -13
  176. package/src/api/schema/data-sources/schema-directory/schema-directory.ts +56 -16
  177. package/src/api/schema/data-sources/schema-file/schema-file.ts +16 -7
  178. package/src/api/schema/metadata.ts +23 -0
  179. package/src/api/schema/read.ts +3 -3
  180. package/src/api/schema/schema.ts +62 -2
  181. package/src/api/schema-source/index.ts +1 -0
  182. package/src/api/schema-source/schema-source.ts +189 -0
  183. package/src/api/vite/plugins/core.ts +23 -18
  184. package/src/api/vite/plugins/schema-assets.ts +317 -0
  185. package/src/api/vite/plugins/serve.ts +15 -8
  186. package/src/lib/graphql-change/change-groups.ts +57 -0
  187. package/src/lib/kit-temp.ts +13 -0
  188. package/src/lib/path-map/$.test.ts +22 -19
  189. package/src/lib/path-map/path-map.ts +3 -1
  190. package/src/project-data.ts +3 -11
  191. package/src/template/components/Changelog.tsx +16 -67
  192. package/src/template/components/CodeBlock.tsx +3 -5
  193. package/src/template/components/ComponentDispatch.tsx +42 -0
  194. package/src/template/components/ReferenceLink.tsx +34 -0
  195. package/src/template/components/TypeAnnotation.tsx +5 -7
  196. package/src/template/components/TypeFieldsLinkList.tsx +20 -23
  197. package/src/template/components/TypeIndex.tsx +10 -12
  198. package/src/template/components/VersionSelector.tsx +50 -0
  199. package/src/template/components/graphql/type-link.tsx +4 -3
  200. package/src/template/hooks/useVersionPath.ts +10 -0
  201. package/src/template/{components → layouts}/ChangelogLayout.tsx +1 -1
  202. package/src/template/layouts/index.ts +1 -0
  203. package/src/template/lib/fetch-text.ts +13 -0
  204. package/src/template/lib/polen-url.ts +20 -0
  205. package/src/template/lib/schema-utils/constants.ts +4 -0
  206. package/src/template/lib/schema-utils/schema-utils.ts +42 -0
  207. package/src/template/routes/changelog.tsx +17 -8
  208. package/src/template/routes/pages.tsx +109 -0
  209. package/src/template/routes/reference.$type.$field.tsx +1 -1
  210. package/src/template/routes/reference.$type.tsx +2 -0
  211. package/src/template/routes/reference.tsx +38 -6
  212. package/src/template/routes/reference.version.$version.$type.$field.tsx +35 -0
  213. package/src/template/routes/reference.version.$version.$type.tsx +30 -0
  214. package/src/template/routes/root.tsx +8 -109
  215. package/src/template/server/app.ts +47 -14
  216. package/src/template/server/main.ts +9 -1
  217. package/src/template/server/ssg/generate.ts +2 -2
  218. package/src/template/server/ssg/get-route-paths.ts +53 -27
  219. package/src/template/sources/schema-source.ts +68 -0
  220. package/build/lib/graphql-document/$$.d.ts +0 -5
  221. package/build/lib/graphql-document/$$.d.ts.map +0 -1
  222. package/build/lib/graphql-document/$$.js +0 -5
  223. package/build/lib/graphql-document/$$.js.map +0 -1
  224. package/build/lib/graphql-document/$.d.ts +0 -2
  225. package/build/lib/graphql-document/$.d.ts.map +0 -1
  226. package/build/lib/graphql-document/$.js +0 -2
  227. package/build/lib/graphql-document/$.js.map +0 -1
  228. package/build/lib/graphql-document/analysis.d.ts +0 -44
  229. package/build/lib/graphql-document/analysis.d.ts.map +0 -1
  230. package/build/lib/graphql-document/analysis.js +0 -361
  231. package/build/lib/graphql-document/analysis.js.map +0 -1
  232. package/build/lib/graphql-document/components/GraphQLDocument.d.ts +0 -38
  233. package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +0 -1
  234. package/build/lib/graphql-document/components/GraphQLDocument.js +0 -151
  235. package/build/lib/graphql-document/components/GraphQLDocument.js.map +0 -1
  236. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +0 -7
  237. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +0 -1
  238. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +0 -27
  239. package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +0 -1
  240. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts +0 -33
  241. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +0 -1
  242. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +0 -50
  243. package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +0 -1
  244. package/build/lib/graphql-document/components/IdentifierLink.d.ts +0 -39
  245. package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +0 -1
  246. package/build/lib/graphql-document/components/IdentifierLink.js +0 -75
  247. package/build/lib/graphql-document/components/IdentifierLink.js.map +0 -1
  248. package/build/lib/graphql-document/components/graphql-document-styles.d.ts +0 -5
  249. package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +0 -1
  250. package/build/lib/graphql-document/components/graphql-document-styles.js +0 -144
  251. package/build/lib/graphql-document/components/graphql-document-styles.js.map +0 -1
  252. package/build/lib/graphql-document/components/index.d.ts +0 -5
  253. package/build/lib/graphql-document/components/index.d.ts.map +0 -1
  254. package/build/lib/graphql-document/components/index.js +0 -5
  255. package/build/lib/graphql-document/components/index.js.map +0 -1
  256. package/build/lib/graphql-document/example.d.ts +0 -25
  257. package/build/lib/graphql-document/example.d.ts.map +0 -1
  258. package/build/lib/graphql-document/example.js +0 -140
  259. package/build/lib/graphql-document/example.js.map +0 -1
  260. package/build/lib/graphql-document/graphql-document.d.ts +0 -35
  261. package/build/lib/graphql-document/graphql-document.d.ts.map +0 -1
  262. package/build/lib/graphql-document/graphql-document.js +0 -36
  263. package/build/lib/graphql-document/graphql-document.js.map +0 -1
  264. package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts +0 -43
  265. package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +0 -1
  266. package/build/lib/graphql-document/hooks/use-tooltip-state.js +0 -132
  267. package/build/lib/graphql-document/hooks/use-tooltip-state.js.map +0 -1
  268. package/build/lib/graphql-document/positioning-simple.d.ts +0 -63
  269. package/build/lib/graphql-document/positioning-simple.d.ts.map +0 -1
  270. package/build/lib/graphql-document/positioning-simple.js +0 -185
  271. package/build/lib/graphql-document/positioning-simple.js.map +0 -1
  272. package/build/lib/graphql-document/schema-context.d.ts +0 -8
  273. package/build/lib/graphql-document/schema-context.d.ts.map +0 -1
  274. package/build/lib/graphql-document/schema-context.js +0 -11
  275. package/build/lib/graphql-document/schema-context.js.map +0 -1
  276. package/build/lib/graphql-document/schema-integration.d.ts +0 -135
  277. package/build/lib/graphql-document/schema-integration.d.ts.map +0 -1
  278. package/build/lib/graphql-document/schema-integration.js +0 -328
  279. package/build/lib/graphql-document/schema-integration.js.map +0 -1
  280. package/build/lib/graphql-document/types.d.ts +0 -117
  281. package/build/lib/graphql-document/types.d.ts.map +0 -1
  282. package/build/lib/graphql-document/types.js +0 -2
  283. package/build/lib/graphql-document/types.js.map +0 -1
  284. package/build/template/components/ChangelogLayout.d.ts.map +0 -1
  285. package/build/template/components/ChangelogLayout.js.map +0 -1
  286. package/build/template/components/CodeHikePre.d.ts +0 -16
  287. package/build/template/components/CodeHikePre.d.ts.map +0 -1
  288. package/build/template/components/CodeHikePre.js +0 -37
  289. package/build/template/components/CodeHikePre.js.map +0 -1
  290. package/src/lib/graphql-document/$$.ts +0 -4
  291. package/src/lib/graphql-document/$.test.ts +0 -132
  292. package/src/lib/graphql-document/$.ts +0 -1
  293. package/src/lib/graphql-document/README.md +0 -102
  294. package/src/lib/graphql-document/analysis.ts +0 -415
  295. package/src/lib/graphql-document/components/GraphQLDocument.tsx +0 -265
  296. package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +0 -188
  297. package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +0 -46
  298. package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +0 -199
  299. package/src/lib/graphql-document/components/IdentifierLink.tsx +0 -160
  300. package/src/lib/graphql-document/components/graphql-document-styles.ts +0 -144
  301. package/src/lib/graphql-document/components/index.ts +0 -4
  302. package/src/lib/graphql-document/demo.md +0 -155
  303. package/src/lib/graphql-document/example.ts +0 -163
  304. package/src/lib/graphql-document/graphql-document.ts +0 -37
  305. package/src/lib/graphql-document/hooks/use-tooltip-state.test.ts +0 -76
  306. package/src/lib/graphql-document/hooks/use-tooltip-state.ts +0 -191
  307. package/src/lib/graphql-document/positioning-simple.test.ts +0 -248
  308. package/src/lib/graphql-document/positioning-simple.ts +0 -260
  309. package/src/lib/graphql-document/schema-context.tsx +0 -20
  310. package/src/lib/graphql-document/schema-integration.test.ts +0 -365
  311. package/src/lib/graphql-document/schema-integration.ts +0 -488
  312. package/src/lib/graphql-document/types.ts +0 -129
  313. package/src/template/components/CodeHikePre.tsx +0 -51
  314. /package/build/template/{components → layouts}/ChangelogLayout.d.ts +0 -0
@@ -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,20 +1,26 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createRoute } 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
25
  export const changelog = createRoute({
20
26
  path: `changelog`,
@@ -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,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,SAAS;CACV,CAAC,CAAA"}
1
+ {"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE1D,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,IAAI,EAAE;IACrC,+BAA+B;IAC/B,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;QACzB,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAA;IAC3B,CAAC;IAED,sDAAsD;IACtD,MAAM,UAAU,GAAG,MAAM,YAAY,CAAC,gBAAgB,EAAE,CAAA;IAExD,OAAO;QACL,UAAU;KACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,IAAI,GAAG,aAAa,EAAiB,CAAA;IAE3C,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,wEAAsD,CAAA;IAC/D,CAAC;IAED,OAAO,CACL,KAAC,eAAe,IAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,YACxC,KAAC,SAAS,IAAC,UAAU,EAAE,IAAI,CAAC,UAA2E,GAAI,GAC3F,CACnB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,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 { createRoute } 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 = createRoute({
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,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3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Aa,IAAC,OAAO,EAAE,OAAO,YAC7B,KAAC,MAAM,KAAG,GACI,GACJ,CACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAC;IAC/B,mDAAmD;IACnD,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,8BAA8B;CACtD,CAAC,CAAA"}
@@ -25,7 +25,7 @@ const Component = () => {
25
25
  return _jsx(Field, { data: field });
26
26
  };
27
27
  export const reference$type$field = ReactRouterAid.createRoute({
28
- path: `:type/:field`,
28
+ path: `:field`,
29
29
  Component,
30
30
  });
31
31
  //# sourceMappingURL=reference.$type.$field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.$type.$field.js","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.$field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAG9D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAqC,CAAA;IAC7D,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,uBAAuB,MAAM,CAAC,IAAI,EA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AED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAA;IACtD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,OAAO,QAAQ,MAAM,CAAC,IAAI,uBAAuB,CAAA;IACnD,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,wBAAwB,MAAM,CAAC,KAAK,YAAY,MAAM,CAAC,IAAI,EAAE,CAAA;IACtE,CAAC;IAED,OAAO,KAAC,KAAK,IAAC,IAAI,EAAE,KAAK,GAAI,CAAA;AAC/B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC,WAAW,CAAC;IAC7D,IAAI,EAAE,QAAQ;IACd,SAAS;CACV,CAAC,CAAA"}
@@ -1,5 +1,9 @@
1
1
  export declare const reference$type: {
2
2
  path: string;
3
3
  Component: () => string | import("react/jsx-runtime").JSX.Element;
4
+ children: {
5
+ path: string;
6
+ Component: () => string | import("react/jsx-runtime").JSX.Element;
7
+ }[];
4
8
  };
5
9
  //# sourceMappingURL=reference.$type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.$type.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,cAAc;;;CAGzB,CAAA"}
1
+ {"version":3,"file":"reference.$type.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,cAAc;;;;;;;CAIzB,CAAA"}
@@ -4,6 +4,7 @@ import { useLoaderData } from '#lib/react-router-loader/react-router-loader';
4
4
  import { useParams } from 'react-router';
5
5
  import { MissingSchema } from '../components/MissingSchema.js';
6
6
  import { NamedType } from '../components/NamedType.js';
7
+ import { reference$type$field } from './reference.$type.$field.js';
7
8
  const Component = () => {
8
9
  const params = useParams();
9
10
  const data = useLoaderData(`reference`);
@@ -19,5 +20,6 @@ const Component = () => {
19
20
  export const reference$type = createRoute({
20
21
  path: `:type`,
21
22
  Component,
23
+ children: [reference$type$field],
22
24
  });
23
25
  //# sourceMappingURL=reference.$type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.$type.js","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAGtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAsB,CAAA;IAE9C,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAA;IAC7C,CAAC;IAED,OAAO,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,GAAI,CAAA;AAClC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACxC,IAAI,EAAE,OAAO;IACb,SAAS;CACV,CAAC,CAAA"}
1
+ {"version":3,"file":"reference.$type.js","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAGlE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAsB,CAAA;IAE9C,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAA;IAC7C,CAAC;IAED,OAAO,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,GAAI,CAAA;AAClC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACxC,IAAI,EAAE,OAAO;IACb,SAAS;IACT,QAAQ,EAAE,CAAC,oBAAoB,CAAC;CACjC,CAAC,CAAA"}
@@ -1,13 +1,19 @@
1
1
  import { GrafaidOld } from '#lib/grafaid-old/index';
2
2
  export declare const reference: {
3
3
  path: string;
4
- loader: () => {
5
- schema: GrafaidOld.Schema.Schema | null;
6
- };
4
+ loader: ({ params }: any) => Promise<{
5
+ schema: GrafaidOld.Schema.Schema;
6
+ currentVersion: any;
7
+ availableVersions: string[];
8
+ }>;
7
9
  Component: () => import("react/jsx-runtime").JSX.Element;
8
10
  children: {
9
11
  path: string;
10
12
  Component: () => string | import("react/jsx-runtime").JSX.Element;
13
+ children: {
14
+ path: string;
15
+ Component: () => string | import("react/jsx-runtime").JSX.Element;
16
+ }[];
11
17
  }[];
12
18
  };
13
19
  //# 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;AAkFnD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAKpB,CAAA"}
@@ -1,16 +1,28 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { GrafaidOld } from '#lib/grafaid-old/index';
3
3
  import { createRoute } from '#lib/react-router-aid/react-router-aid';
4
4
  import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
5
+ import { Box } from '@radix-ui/themes';
5
6
  import { Outlet } from 'react-router';
6
- import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
7
7
  import { MissingSchema } from '../components/MissingSchema.js';
8
+ import { VersionSelector } from '../components/VersionSelector.js';
9
+ import { useVersionPath } from '../hooks/useVersionPath.js';
8
10
  import { SidebarLayout } from '../layouts/index.js';
11
+ import { VERSION_LATEST } from '../lib/schema-utils/constants.js';
12
+ import { schemaSource } from '../sources/schema-source.js';
9
13
  import { reference$type } from './reference.$type.js';
10
- const loader = createLoader(() => {
11
- const latestSchemaVersion = PROJECT_DATA.schema?.versions[0].after ?? null;
14
+ import { referenceVersion$version$type } from './reference.version.$version.$type.js';
15
+ const loader = createLoader(async ({ params }) => {
16
+ // Handle both versioned and unversioned routes:
17
+ // - Versioned: /reference/version/:version/:type → params.version exists
18
+ // - Unversioned: /reference/:type → params.version is undefined, defaults to latest
19
+ const currentVersion = params.version ?? VERSION_LATEST;
20
+ const schema = await schemaSource.get(currentVersion);
21
+ const availableVersions = schemaSource.versions;
12
22
  return {
13
- schema: latestSchemaVersion,
23
+ schema,
24
+ currentVersion,
25
+ availableVersions,
14
26
  };
15
27
  });
16
28
  const Component = () => {
@@ -22,6 +34,8 @@ const Component = () => {
22
34
  const kindMap = GrafaidOld.getKindMap(data.schema);
23
35
  const sidebarItems = [];
24
36
  const kindEntries = Object.entries(kindMap.list).filter(([_, types]) => types.length > 0);
37
+ // Build path prefix based on current version using new route structure
38
+ const versionPath = useVersionPath();
25
39
  for (const [title, types] of kindEntries) {
26
40
  sidebarItems.push({
27
41
  type: `ItemSection`,
@@ -31,16 +45,24 @@ const Component = () => {
31
45
  links: types.map(type => ({
32
46
  type: `ItemLink`,
33
47
  title: type.name,
34
- pathExp: `reference/${type.name}`,
48
+ pathExp: `reference/${versionPath}${type.name}`,
35
49
  })),
36
50
  });
37
51
  }
38
- return (_jsx(SidebarLayout, { sidebar: sidebarItems, children: _jsx(Outlet, {}) }));
52
+ return (_jsxs(SidebarLayout, { sidebar: sidebarItems, children: [_jsx(Box, { mb: `4`, children: _jsx(VersionSelector, { availableVersions: data.availableVersions, currentVersion: data.currentVersion }) }), _jsx(Outlet, {})] }));
39
53
  };
54
+ // Create the versioned reference route with explicit version prefix
55
+ const referenceVersioned = createRoute({
56
+ path: `version/:version`,
57
+ loader,
58
+ Component,
59
+ children: [referenceVersion$version$type],
60
+ });
61
+ // Create the main reference route with explicit version path and fallback type path
40
62
  export const reference = createRoute({
41
63
  path: `reference`,
42
64
  loader,
43
65
  Component,
44
- children: [reference$type],
66
+ children: [referenceVersioned, reference$type],
45
67
  });
46
68
  //# sourceMappingURL=reference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE;IAC/B,MAAM,mBAAmB,GAAG,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAA;IAC1E,OAAO;QACL,MAAM,EAAE,mBAAmB;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,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,4CAA4C;IAC5C,MAAM,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAElD,MAAM,YAAY,GAAmB,EAAE,CAAA;IACvC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAA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M,WAAW,GAAG,cAAc,EAAE,CAAA;IAEpC,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC;QACzC,YAAY,CAAC,IAAI,CAAC;YAChB,IAAI,EAAE,aAAsB;YAC5B,KAAK;YACL,OAAO,EAAE,aAAa,KAAK,CAAC,WAAW,EAAE,EAAE;YAC3C,SAAS,EAAE,KAAK;YAChB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACxB,IAAI,EAAE,UAAmB;gBACzB,KAAK,EAAE,IAAI,CAAC,IAAI;gBAChB,OAAO,EAAE,aAAa,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE;aAChD,CAAC,CAAC;SACJ,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,CACL,MAAC,aAAa,IAAC,OAAO,EAAE,YAAY,aAClC,KAAC,GAAG,IAAC,EAAE,EAAE,GAAG,YACV,KAAC,eAAe,IACd,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,cAAc,EAAE,IAAI,CAAC,cAAc,GACnC,GACE,EACN,KAAC,MAAM,KAAG,IACI,CACjB,CAAA;AACH,CAAC,CAAA;AAED,oEAAoE;AACpE,MAAM,kBAAkB,GAAG,WAAW,CAAC;IACrC,IAAI,EAAE,kBAAkB;IACxB,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,6BAA6B,CAAC;CAC1C,CAAC,CAAA;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,kBAAkB,EAAE,cAAc,CAAC;CAC/C,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const referenceVersion$version$type$field: {
2
+ id: string;
3
+ path: string;
4
+ Component: () => string | import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ //# sourceMappingURL=reference.version.$version.$type.$field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.version.$version.$type.$field.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.version.$version.$type.$field.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mCAAmC;;;;CAI9C,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Grafaid } from '#lib/grafaid/index';
3
+ import { createRoute } from '#lib/react-router-aid/react-router-aid';
4
+ import { useLoaderData } from '#lib/react-router-loader/react-router-loader';
5
+ import { useParams } from 'react-router';
6
+ import { Field } from '../components/Field.js';
7
+ import { MissingSchema } from '../components/MissingSchema.js';
8
+ const Component = () => {
9
+ const params = useParams();
10
+ const data = useLoaderData(`reference`);
11
+ if (!data.schema) {
12
+ return _jsx(MissingSchema, {});
13
+ }
14
+ const type = data.schema.getType(params.type);
15
+ if (!type)
16
+ return `Could not find type ${params.type}`;
17
+ if (!Grafaid.Schema.TypesLike.isFielded(type)) {
18
+ return `Type ${params.type} does not have fields`;
19
+ }
20
+ const fields = type.getFields();
21
+ const field = fields[params.field];
22
+ if (!field) {
23
+ return `Could not find field ${params.field} on type ${params.type}`;
24
+ }
25
+ return _jsx(Field, { data: field });
26
+ };
27
+ export const referenceVersion$version$type$field = createRoute({
28
+ id: `reference-version-type-field`,
29
+ path: `:field`,
30
+ Component,
31
+ });
32
+ //# sourceMappingURL=reference.version.$version.$type.$field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.version.$version.$type.$field.js","sourceRoot":"","sources":["../../../src/template/routes/reference.version.$version.$type.$field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAG9D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAsD,CAAA;IAC9E,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAA;IACtD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,OAAO,QAAQ,MAAM,CAAC,IAAI,uBAAuB,CAAA;IACnD,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,wBAAwB,MAAM,CAAC,KAAK,YAAY,MAAM,CAAC,IAAI,EAAE,CAAA;IACtE,CAAC;IAED,OAAO,KAAC,KAAK,IAAC,IAAI,EAAE,KAAK,GAAI,CAAA;AAC/B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,WAAW,CAAC;IAC7D,EAAE,EAAE,8BAA8B;IAClC,IAAI,EAAE,QAAQ;IACd,SAAS;CACV,CAAC,CAAA"}
@@ -0,0 +1,11 @@
1
+ export declare const referenceVersion$version$type: {
2
+ id: string;
3
+ path: string;
4
+ Component: () => import("react/jsx-runtime").JSX.Element;
5
+ children: {
6
+ id: string;
7
+ path: string;
8
+ Component: () => string | import("react/jsx-runtime").JSX.Element;
9
+ }[];
10
+ };
11
+ //# sourceMappingURL=reference.version.$version.$type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.version.$version.$type.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.version.$version.$type.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,6BAA6B;;;;;;;;;CAKxC,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createRoute } from '#lib/react-router-aid/react-router-aid';
3
+ import { useLoaderData } from '#lib/react-router-loader/react-router-loader';
4
+ import { useParams } from 'react-router';
5
+ import { MissingSchema } from '../components/MissingSchema.js';
6
+ import { NamedType } from '../components/NamedType.js';
7
+ import { referenceVersion$version$type$field } from './reference.version.$version.$type.$field.js';
8
+ const Component = () => {
9
+ const params = useParams();
10
+ const data = useLoaderData(`reference`);
11
+ if (!data.schema) {
12
+ return _jsx(MissingSchema, {});
13
+ }
14
+ const type = data.schema.getType(params.type);
15
+ if (!type) {
16
+ return _jsxs("div", { children: ["Type not found: ", params.type] });
17
+ }
18
+ return _jsx(NamedType, { data: type });
19
+ };
20
+ export const referenceVersion$version$type = createRoute({
21
+ id: `reference-version-type`,
22
+ path: `:type`,
23
+ Component,
24
+ children: [referenceVersion$version$type$field],
25
+ });
26
+ //# sourceMappingURL=reference.version.$version.$type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.version.$version.$type.js","sourceRoot":"","sources":["../../../src/template/routes/reference.version.$version.$type.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAEtD,OAAO,EAAE,mCAAmC,EAAE,MAAM,8CAA8C,CAAA;AAElG,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAuC,CAAA;IAE/D,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,8CAAsB,MAAM,CAAC,IAAI,IAAO,CAAA;IACjD,CAAC;IAED,OAAO,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,GAAI,CAAA;AAClC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,WAAW,CAAC;IACvD,EAAE,EAAE,wBAAwB;IAC5B,IAAI,EAAE,OAAO;IACb,SAAS;IACT,QAAQ,EAAE,CAAC,mCAAmC,CAAC;CAChD,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AA4C1D,eAAO,MAAM,SAAS,+CAkBrB,CAAA;AAmKD,eAAO,MAAM,IAAI;;;;CAIf,CAAA"}
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAmB1D,eAAO,MAAM,SAAS,+CASrB,CAAA;AAgGD,eAAO,MAAM,IAAI;;;;CAIf,CAAA"}