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
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-integration.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-document/schema-integration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,WAAW,EAMjB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,4CAA4C;IAC5C,UAAU,CAAC,EAAE;QACX,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAA;IACf,0CAA0C;IAC1C,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,UAAU,CAAC,EAAE;QACX,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,oDAAoD;IACpD,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IA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Ac,WAAW,KACxB,cAEF,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,+BAA+B;IAC/B,QAAQ,EAAE,OAAO,YAAY,EAAE,cAAc,CAAA;IAC7C,6CAA6C;IAC7C,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAC1C,6CAA6C;IAC7C,YAAY,EAAE;QACZ,UAAU,EAAE,UAAU,CAAA;QACtB,OAAO,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;KAC9B,EAAE,CAAA;CACJ;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,EACd,QAAQ,aAAa,EACrB,cAAc,WAAW,KACxB,yBA4CF,CAAA"}
@@ -1,328 +0,0 @@
1
- /**
2
- * Layer 2: Schema Integration
3
- *
4
- * Bridge between GraphQL analysis and Polen's schema system.
5
- * Resolves identifiers against the actual schema, extracts documentation,
6
- * and generates reference URLs for navigation.
7
- */
8
- import { getNamedType, isInputObjectType, isInterfaceType, isListType, isNonNullType, isObjectType, } from 'graphql';
9
- import { analyze } from './analysis.js';
10
- /**
11
- * Polen's implementation of SchemaResolver
12
- */
13
- export class PolenSchemaResolver {
14
- schema;
15
- routeConfig;
16
- constructor(schema, routeConfig = {}) {
17
- this.schema = schema;
18
- this.routeConfig = routeConfig;
19
- }
20
- /**
21
- * Resolve an identifier against the schema
22
- */
23
- resolveIdentifier(identifier) {
24
- const basePath = this.routeConfig.basePath || `/reference`;
25
- switch (identifier.kind) {
26
- case `Type`:
27
- return this.resolveType(identifier, basePath);
28
- case `Field`:
29
- return this.resolveField(identifier, basePath);
30
- case `Argument`:
31
- return this.resolveArgument(identifier, basePath);
32
- case `Variable`:
33
- // Variables don't have schema resolution
34
- return {
35
- exists: true,
36
- referenceUrl: `${basePath}#variables`,
37
- documentation: {
38
- typeInfo: `Variable`,
39
- description: `Query variable: $${identifier.name}`,
40
- },
41
- };
42
- case `Directive`:
43
- return this.resolveDirective(identifier, basePath);
44
- case `Fragment`:
45
- // Fragments don't have schema resolution
46
- return {
47
- exists: true,
48
- referenceUrl: `${basePath}#fragments`,
49
- documentation: {
50
- typeInfo: `Fragment`,
51
- description: `Fragment: ${identifier.name}`,
52
- },
53
- };
54
- default:
55
- return null;
56
- }
57
- }
58
- /**
59
- * Get documentation for a schema path
60
- */
61
- getDocumentation(schemaPath) {
62
- if (schemaPath.length === 0)
63
- return null;
64
- const [typeName, fieldName, argName] = schemaPath;
65
- if (!typeName)
66
- return null;
67
- const type = this.schema.getType(typeName);
68
- if (!type)
69
- return null;
70
- // Type-level documentation
71
- if (schemaPath.length === 1) {
72
- return {
73
- typeInfo: this.getTypeSignature(type),
74
- description: type.description || undefined,
75
- deprecated: `deprecationReason` in type
76
- ? {
77
- reason: type.deprecationReason,
78
- }
79
- : undefined,
80
- };
81
- }
82
- // Field-level documentation
83
- if (fieldName && schemaPath.length === 2) {
84
- const field = this.getFieldFromType(type, fieldName);
85
- if (!field)
86
- return null;
87
- return {
88
- typeInfo: this.getTypeSignature(field.type),
89
- description: field.description || undefined,
90
- deprecated: field.deprecationReason
91
- ? {
92
- reason: field.deprecationReason,
93
- }
94
- : undefined,
95
- };
96
- }
97
- // Argument-level documentation
98
- if (fieldName && argName && schemaPath.length === 3) {
99
- const field = this.getFieldFromType(type, fieldName);
100
- if (!field || !(`args` in field))
101
- return null;
102
- const arg = field.args.find((a) => a.name === argName);
103
- if (!arg)
104
- return null;
105
- return {
106
- typeInfo: this.getTypeSignature(arg.type),
107
- description: arg.description || undefined,
108
- defaultValue: arg.defaultValue !== undefined
109
- ? String(arg.defaultValue)
110
- : undefined,
111
- };
112
- }
113
- return null;
114
- }
115
- /**
116
- * Generate a reference URL for a schema path
117
- */
118
- generateReferenceLink(schemaPath) {
119
- const basePath = this.routeConfig.basePath || `/reference`;
120
- const includeFragments = this.routeConfig.includeFragments !== false;
121
- if (schemaPath.length === 0)
122
- return basePath;
123
- const [typeName, fieldName, argName] = schemaPath;
124
- // Type reference
125
- if (schemaPath.length === 1) {
126
- return `${basePath}/${typeName}`;
127
- }
128
- // Field reference
129
- if (fieldName && schemaPath.length === 2) {
130
- const fragment = includeFragments ? `#${fieldName}` : ``;
131
- return `${basePath}/${typeName}${fragment}`;
132
- }
133
- // Argument reference
134
- if (fieldName && argName && schemaPath.length === 3) {
135
- const fragment = includeFragments ? `#${fieldName}-${argName}` : ``;
136
- return `${basePath}/${typeName}${fragment}`;
137
- }
138
- return `${basePath}/${typeName}`;
139
- }
140
- /**
141
- * Check if a type exists in the schema
142
- */
143
- typeExists(typeName) {
144
- return !!this.schema.getType(typeName);
145
- }
146
- /**
147
- * Get all available types for validation
148
- */
149
- getAllTypes() {
150
- return Object.keys(this.schema.getTypeMap())
151
- .filter(name => !name.startsWith(`__`)); // Filter out introspection types
152
- }
153
- // Private helper methods
154
- resolveType(identifier, basePath) {
155
- const type = this.schema.getType(identifier.name);
156
- return {
157
- exists: !!type,
158
- graphqlType: type || undefined,
159
- referenceUrl: `${basePath}/${identifier.name}`,
160
- documentation: type
161
- ? {
162
- typeInfo: this.getTypeSignature(type),
163
- description: type.description || undefined,
164
- }
165
- : undefined,
166
- };
167
- }
168
- resolveField(identifier, basePath) {
169
- if (!identifier.parentType) {
170
- return {
171
- exists: false,
172
- referenceUrl: `${basePath}#${identifier.name}`,
173
- };
174
- }
175
- const parentType = this.schema.getType(identifier.parentType);
176
- if (!parentType) {
177
- return {
178
- exists: false,
179
- referenceUrl: `${basePath}/${identifier.parentType}#${identifier.name}`,
180
- };
181
- }
182
- const field = this.getFieldFromType(parentType, identifier.name);
183
- return {
184
- exists: !!field,
185
- referenceUrl: `${basePath}/${identifier.parentType}#${identifier.name}`,
186
- documentation: field
187
- ? {
188
- typeInfo: this.getTypeSignature(field.type),
189
- description: field.description || undefined,
190
- deprecated: field.deprecationReason
191
- ? {
192
- reason: field.deprecationReason,
193
- }
194
- : undefined,
195
- }
196
- : undefined,
197
- deprecated: field?.deprecationReason
198
- ? {
199
- reason: field.deprecationReason,
200
- }
201
- : undefined,
202
- };
203
- }
204
- resolveArgument(identifier, basePath) {
205
- const schemaPath = identifier.schemaPath;
206
- if (schemaPath.length < 3) {
207
- return {
208
- exists: false,
209
- referenceUrl: `${basePath}#${identifier.name}`,
210
- };
211
- }
212
- const [typeName, fieldName] = schemaPath;
213
- if (!typeName || !fieldName) {
214
- return {
215
- exists: false,
216
- referenceUrl: `${basePath}#${identifier.name}`,
217
- };
218
- }
219
- const parentType = this.schema.getType(typeName);
220
- if (!parentType) {
221
- return {
222
- exists: false,
223
- referenceUrl: `${basePath}/${typeName}#${fieldName}-${identifier.name}`,
224
- };
225
- }
226
- const field = this.getFieldFromType(parentType, fieldName);
227
- if (!field || !(`args` in field)) {
228
- return {
229
- exists: false,
230
- referenceUrl: `${basePath}/${typeName}#${fieldName}-${identifier.name}`,
231
- };
232
- }
233
- const arg = field.args.find((a) => a.name === identifier.name);
234
- return {
235
- exists: !!arg,
236
- referenceUrl: `${basePath}/${typeName}#${fieldName}-${identifier.name}`,
237
- documentation: arg
238
- ? {
239
- typeInfo: this.getTypeSignature(arg.type),
240
- description: arg.description || undefined,
241
- defaultValue: arg.defaultValue !== undefined
242
- ? String(arg.defaultValue)
243
- : undefined,
244
- }
245
- : undefined,
246
- };
247
- }
248
- resolveDirective(identifier, basePath) {
249
- const directive = this.schema.getDirective(identifier.name);
250
- return {
251
- exists: !!directive,
252
- referenceUrl: `${basePath}/directives#${identifier.name}`,
253
- documentation: directive
254
- ? {
255
- typeInfo: `Directive`,
256
- description: directive.description || undefined,
257
- }
258
- : undefined,
259
- };
260
- }
261
- getFieldFromType(type, fieldName) {
262
- if (isObjectType(type) || isInterfaceType(type)) {
263
- return type.getFields()[fieldName] || null;
264
- }
265
- if (isInputObjectType(type)) {
266
- return type.getFields()[fieldName] || null;
267
- }
268
- return null;
269
- }
270
- getTypeSignature(type) {
271
- if (isNonNullType(type)) {
272
- return `${this.getTypeSignature(type.ofType)}!`;
273
- }
274
- if (isListType(type)) {
275
- return `[${this.getTypeSignature(type.ofType)}]`;
276
- }
277
- return getNamedType(type).name;
278
- }
279
- }
280
- /**
281
- * Create a schema resolver for Polen
282
- */
283
- export const createPolenSchemaResolver = (schema, routeConfig) => {
284
- return new PolenSchemaResolver(schema, routeConfig);
285
- };
286
- /**
287
- * Perform schema-aware analysis of a GraphQL document
288
- */
289
- export const analyzeWithSchema = (source, schema, routeConfig) => {
290
- const analysis = analyze(source, {
291
- schema,
292
- validateAgainstSchema: true,
293
- includePositions: true,
294
- });
295
- const resolver = createPolenSchemaResolver(schema, routeConfig);
296
- const resolutions = new Map();
297
- const schemaErrors = [];
298
- // Resolve all identifiers against schema
299
- for (const identifier of analysis.identifiers.all) {
300
- const key = `${identifier.position.start}-${identifier.name}-${identifier.kind}`;
301
- const resolution = resolver.resolveIdentifier(identifier);
302
- if (resolution) {
303
- resolutions.set(key, resolution);
304
- // Add validation errors for non-existent identifiers
305
- if (!resolution.exists && (identifier.kind === `Type` || identifier.kind === `Field`)) {
306
- schemaErrors.push({
307
- identifier,
308
- message: `${identifier.kind} "${identifier.name}" does not exist in schema`,
309
- severity: `error`,
310
- });
311
- }
312
- // Add deprecation warnings
313
- if (resolution.deprecated) {
314
- schemaErrors.push({
315
- identifier,
316
- message: `${identifier.kind} "${identifier.name}" is deprecated: ${resolution.deprecated.reason}`,
317
- severity: `warning`,
318
- });
319
- }
320
- }
321
- }
322
- return {
323
- analysis,
324
- resolutions,
325
- schemaErrors,
326
- };
327
- };
328
- //# sourceMappingURL=schema-integration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-integration.js","sourceRoot":"","sources":["../../../src/lib/graphql-document/schema-integration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EAKZ,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,GACb,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,OAA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CAAC,IAAI,EAAE,CAAA;QAChF,MAAM,UAAU,GAAG,QAAQ,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAA;QAEzD,IAAI,UAAU,EAAE,CAAC;YACf,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;YAEhC,qDAAqD;YACrD,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,MAAM,IAAI,UAAU,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,CAAC;gBACtF,YAAY,CAAC,IAAI,CAAC;oBAChB,UAAU;oBACV,OAAO,EAAE,GAAG,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,4BAA4B;oBAC3E,QAAQ,EAAE,OAAO;iBAClB,CAAC,CAAA;YACJ,CAAC;YAED,2BAA2B;YAC3B,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;gBAC1B,YAAY,CAAC,IAAI,CAAC;oBAChB,UAAU;oBACV,OAAO,EAAE,GAAG,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,oBAAoB,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE;oBACjG,QAAQ,EAAE,SAAS;iBACpB,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ;QACR,WAAW;QACX,YAAY;KACb,CAAA;AACH,CAAC,CAAA"}
@@ -1,117 +0,0 @@
1
- import type { DocumentNode, GraphQLError, GraphQLSchema } from 'graphql';
2
- /**
3
- * Represents a GraphQL identifier found in a document
4
- */
5
- export interface Identifier {
6
- /** The name of the identifier (e.g., 'User', 'name', 'id') */
7
- name: string;
8
- /** The kind of GraphQL construct this identifier represents */
9
- kind: `Type` | `Field` | `Argument` | `Directive` | `Variable` | `Fragment`;
10
- /** Position information in the source document */
11
- position: {
12
- /** Character offset from start of document */
13
- start: number;
14
- /** Character offset for end of identifier */
15
- end: number;
16
- /** Line number (1-based) */
17
- line: number;
18
- /** Column number (1-based) */
19
- column: number;
20
- };
21
- /** The parent type name if this is a field or argument */
22
- parentType?: string;
23
- /** Path through the schema to this identifier (e.g., ['User', 'posts', 'title']) */
24
- schemaPath: string[];
25
- /** Context about where this identifier appears */
26
- context: IdentifierContext;
27
- }
28
- /**
29
- * Additional context about where an identifier appears in the document
30
- */
31
- export interface IdentifierContext {
32
- /** The operation type if this identifier is within an operation */
33
- operationType?: `query` | `mutation` | `subscription`;
34
- /** The operation name if this identifier is within a named operation */
35
- operationName?: string;
36
- /** Whether this identifier is in a fragment definition */
37
- inFragment?: string;
38
- /** The selection path leading to this identifier */
39
- selectionPath: string[];
40
- }
41
- /**
42
- * Map of all identifiers found in a GraphQL document
43
- */
44
- export interface IdentifierMap {
45
- /** Quick lookup by character position */
46
- byPosition: Map<number, Identifier>;
47
- /** Grouped by identifier kind for easy filtering */
48
- byKind: Map<Identifier[`kind`], Identifier[]>;
49
- /** Any validation errors found during analysis */
50
- errors: AnalysisError[];
51
- /** All identifiers as a flat array */
52
- all: Identifier[];
53
- }
54
- /**
55
- * Analysis error with context about the identifier that caused it
56
- */
57
- export interface AnalysisError {
58
- /** The identifier that caused the error (if applicable) */
59
- identifier?: Identifier;
60
- /** Human-readable error message */
61
- message: string;
62
- /** Error severity level */
63
- severity: `error` | `warning` | `info`;
64
- /** Position in the document where the error occurred */
65
- position?: {
66
- line: number;
67
- column: number;
68
- };
69
- }
70
- /**
71
- * Result of analyzing a GraphQL document
72
- */
73
- export interface AnalysisResult {
74
- /** The parsed AST */
75
- ast: DocumentNode;
76
- /** Map of all identifiers found */
77
- identifiers: IdentifierMap;
78
- /** Whether the document parsed successfully */
79
- isValid: boolean;
80
- /** Any parse or validation errors */
81
- errors: GraphQLError[];
82
- }
83
- /**
84
- * Configuration for GraphQL document analysis
85
- */
86
- export interface AnalysisConfig {
87
- /** Whether to include position information for identifiers */
88
- includePositions?: boolean;
89
- /** Whether to validate against a schema (if provided) */
90
- validateAgainstSchema?: boolean;
91
- /** Schema to validate against */
92
- schema?: GraphQLSchema;
93
- /** Whether to extract fragment information */
94
- includeFragments?: boolean;
95
- }
96
- /**
97
- * Interface for the main GraphQL analyzer
98
- */
99
- export interface GraphQLAnalyzer {
100
- /**
101
- * Parse a GraphQL document string into an AST
102
- */
103
- parse(source: string): DocumentNode;
104
- /**
105
- * Extract all identifiers from a GraphQL AST
106
- */
107
- extractIdentifiers(ast: DocumentNode, config?: AnalysisConfig): IdentifierMap;
108
- /**
109
- * Validate a GraphQL document against a schema
110
- */
111
- validateAgainstSchema(ast: DocumentNode, schema: GraphQLSchema): GraphQLError[];
112
- /**
113
- * Perform complete analysis of a GraphQL document
114
- */
115
- analyze(source: string, config?: AnalysisConfig): AnalysisResult;
116
- }
117
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-document/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAExE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAA;IAC3E,kDAAkD;IAClD,QAAQ,EAAE;QACR,8CAA8C;QAC9C,KAAK,EAAE,MAAM,CAAA;QACb,6CAA6C;QAC7C,GAAG,EAAE,MAAM,CAAA;QACX,4BAA4B;QAC5B,IAAI,EAAE,MAAM,CAAA;QACZ,8BAA8B;QAC9B,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,oFAAoF;IACpF,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,kDAAkD;IAClD,OAAO,EAAE,iBAAiB,CAAA;CAC3B;AAED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yD;IACzD,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,iCAAiC;IACjC,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAAA;IAEnC;;OAEG;IACH,kBAAkB,CAAC,GAAG,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,aAAa,CAAA;IAE7E;;OAEG;IACH,qBAAqB,CACnB,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,aAAa,GACpB,YAAY,EAAE,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,cAAc,CAAA;CACjE"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/graphql-document/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChangelogLayout.d.ts","sourceRoot":"","sources":["../../../src/template/components/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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChangelogLayout.js","sourceRoot":"","sources":["../../../src/template/components/ChangelogLayout.tsx"],"names":[],"mappings":";AAAA,OAAO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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,16 +0,0 @@
1
- import { Pre as CodeHikePre } from 'codehike/code';
2
- import React from 'react';
3
- type CodeHikePreProps = React.ComponentProps<typeof CodeHikePre>;
4
- type HTMLPreProps = React.ComponentPropsWithoutRef<'pre'>;
5
- type PreProps = CodeHikePreProps | HTMLPreProps;
6
- /**
7
- * Custom Pre component that adds interactive GraphQL support to Code Hike
8
- *
9
- * Usage in MDX:
10
- * ```graphql interactive
11
- * query { ... }
12
- * ```
13
- */
14
- export declare const Pre: React.FC<PreProps>;
15
- export {};
16
- //# sourceMappingURL=CodeHikePre.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodeHikePre.d.ts","sourceRoot":"","sources":["../../../src/template/components/CodeHikePre.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAA;AAChE,KAAK,YAAY,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AACzD,KAAK,QAAQ,GAAG,gBAAgB,GAAG,YAAY,CAAA;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAkClC,CAAA"}
@@ -1,37 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Pre as CodeHikePre } from 'codehike/code';
3
- import React from 'react';
4
- import { GraphQLDocument } from '../../lib/graphql-document/components/GraphQLDocument.js';
5
- /**
6
- * Custom Pre component that adds interactive GraphQL support to Code Hike
7
- *
8
- * Usage in MDX:
9
- * ```graphql interactive
10
- * query { ... }
11
- * ```
12
- */
13
- export const Pre = (props) => {
14
- // Check if this is a Code Hike pre component (has 'code' prop)
15
- if ('code' in props && props.code) {
16
- const { code } = props;
17
- // Check if this is an interactive GraphQL block
18
- if (code.lang === 'graphql' && code.meta?.includes('interactive')) {
19
- // Extract the GraphQL schema if available
20
- const schema = typeof window !== 'undefined'
21
- ? window.__POLEN_GRAPHQL_SCHEMA__
22
- : null;
23
- // For interactive GraphQL blocks, we need to apply Code Hike's styling
24
- // but add GraphQLDocument's interactive features
25
- return (_jsx(GraphQLDocument, { schema: schema, options: {
26
- className: 'ch-code-container',
27
- // Use Code Hike's Pre component for rendering
28
- renderCode: () => _jsx(CodeHikePre, { ...props }),
29
- }, children: code.code }));
30
- }
31
- // For other Code Hike code blocks, use Code Hike's Pre
32
- return _jsx(CodeHikePre, { ...props });
33
- }
34
- // For standard HTML pre elements, render as-is
35
- return _jsx("pre", { ...props });
36
- };
37
- //# sourceMappingURL=CodeHikePre.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CodeHikePre.js","sourceRoot":"","sources":["../../../src/template/components/CodeHikePre.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAA;AAM1F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAAuB,CAAC,KAAK,EAAE,EAAE;IAC/C,+DAA+D;IAC/D,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;QAEtB,gDAAgD;QAChD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAClE,0CAA0C;YAC1C,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK,WAAW;gBAC1C,CAAC,CAAE,MAAc,CAAC,wBAAwB;gBAC1C,CAAC,CAAC,IAAI,CAAA;YAER,uEAAuE;YACvE,iDAAiD;YACjD,OAAO,CACL,KAAC,eAAe,IACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;oBACP,SAAS,EAAE,mBAAmB;oBAC9B,8CAA8C;oBAC9C,UAAU,EAAE,GAAG,EAAE,CAAC,KAAC,WAAW,OAAK,KAAyB,GAAI;iBACjE,YAEA,IAAI,CAAC,IAAI,GACM,CACnB,CAAA;QACH,CAAC;QAED,uDAAuD;QACvD,OAAO,KAAC,WAAW,OAAK,KAAyB,GAAI,CAAA;IACvD,CAAC;IAED,+CAA+C;IAC/C,OAAO,iBAAS,KAAqB,GAAI,CAAA;AAC3C,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export declare const reference$type$field: {
2
- path: string;
3
- Component: () => string | import("react/jsx-runtime").JSX.Element;
4
- };
5
- //# sourceMappingURL=reference.$type.$field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reference.$type.$field.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.$field.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,oBAAoB;;;CAG/B,CAAA"}
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Grafaid } from '#lib/grafaid/index';
3
- import { ReactRouterAid } from '#lib/react-router-aid/index';
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 reference$type$field = ReactRouterAid.createRoute({
28
- path: `:type/:field`,
29
- Component,
30
- });
31
- //# sourceMappingURL=reference.$type.$field.js.map
@@ -1 +0,0 @@
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,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,cAAc;IACpB,SAAS;CACV,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export declare const reference$type: {
2
- path: string;
3
- Component: () => string | import("react/jsx-runtime").JSX.Element;
4
- };
5
- //# sourceMappingURL=reference.$type.d.ts.map
@@ -1 +0,0 @@
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,23 +0,0 @@
1
- import { jsx as _jsx } 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
- const Component = () => {
8
- const params = useParams();
9
- const data = useLoaderData(`reference`);
10
- if (!data.schema) {
11
- return _jsx(MissingSchema, {});
12
- }
13
- const type = data.schema.getType(params.type);
14
- if (!type) {
15
- return `Could not find type ${params.type}`;
16
- }
17
- return _jsx(NamedType, { data: type });
18
- };
19
- export const reference$type = createRoute({
20
- path: `:type`,
21
- Component,
22
- });
23
- //# sourceMappingURL=reference.$type.js.map
@@ -1 +0,0 @@
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,4 +0,0 @@
1
- export * from './analysis.js'
2
- export * from './positioning-simple.js'
3
- export * from './schema-integration.js'
4
- export * from './types.js'