zudoku 0.3.0-dev.4 → 0.3.0-dev.40

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 (474) hide show
  1. package/dist/app/App.d.ts +1 -2
  2. package/dist/app/App.js +1 -28
  3. package/dist/app/App.js.map +1 -1
  4. package/dist/app/demo.d.ts +2 -0
  5. package/dist/app/demo.js +27 -0
  6. package/dist/app/demo.js.map +1 -0
  7. package/dist/app/entry.client.d.ts +2 -0
  8. package/dist/app/entry.client.js +35 -0
  9. package/dist/app/entry.client.js.map +1 -0
  10. package/dist/app/entry.server.d.ts +12 -0
  11. package/dist/app/entry.server.js +104 -0
  12. package/dist/app/entry.server.js.map +1 -0
  13. package/dist/app/main.d.ts +6 -1
  14. package/dist/app/main.js +54 -12
  15. package/dist/app/main.js.map +1 -1
  16. package/dist/app/standalone.d.ts +2 -0
  17. package/dist/app/standalone.js +32 -0
  18. package/dist/app/standalone.js.map +1 -0
  19. package/dist/app/tailwind.d.ts +1 -1
  20. package/dist/app/tailwind.js +0 -4
  21. package/dist/app/tailwind.js.map +1 -1
  22. package/dist/app/zudoku-manifest.d.ts +1 -0
  23. package/dist/app/zudoku-manifest.js +20 -0
  24. package/dist/app/zudoku-manifest.js.map +1 -0
  25. package/dist/cli/cmds/dev.js +5 -0
  26. package/dist/cli/cmds/dev.js.map +1 -1
  27. package/dist/cli/dev/handler.d.ts +1 -0
  28. package/dist/cli/dev/handler.js +3 -1
  29. package/dist/cli/dev/handler.js.map +1 -1
  30. package/dist/config/config.d.ts +15 -16
  31. package/dist/internal.d.ts +1 -0
  32. package/dist/internal.js +2 -0
  33. package/dist/internal.js.map +1 -0
  34. package/dist/lib/authentication/Callback.js +1 -1
  35. package/dist/lib/authentication/Callback.js.map +1 -1
  36. package/dist/lib/authentication/authentication.d.ts +2 -2
  37. package/dist/lib/authentication/hook.d.ts +1 -0
  38. package/dist/lib/authentication/hook.js +1 -0
  39. package/dist/lib/authentication/hook.js.map +1 -1
  40. package/dist/lib/authentication/providers/auth0.js +1 -0
  41. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  42. package/dist/lib/authentication/providers/clerk.js +4 -0
  43. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  44. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  45. package/dist/lib/authentication/providers/openid.js +2 -0
  46. package/dist/lib/authentication/providers/openid.js.map +1 -1
  47. package/dist/lib/authentication/state.d.ts +1 -0
  48. package/dist/lib/authentication/state.js +1 -0
  49. package/dist/lib/authentication/state.js.map +1 -1
  50. package/dist/lib/components/Bootstrap.d.ts +12 -0
  51. package/dist/lib/components/Bootstrap.js +9 -0
  52. package/dist/lib/components/Bootstrap.js.map +1 -0
  53. package/dist/lib/components/DevPortal.d.ts +4 -19
  54. package/dist/lib/components/DevPortal.js +17 -12
  55. package/dist/lib/components/DevPortal.js.map +1 -1
  56. package/dist/lib/components/ErrorPage.d.ts +6 -0
  57. package/dist/lib/components/ErrorPage.js +9 -0
  58. package/dist/lib/components/ErrorPage.js.map +1 -0
  59. package/dist/lib/components/Header.js +3 -3
  60. package/dist/lib/components/Header.js.map +1 -1
  61. package/dist/lib/components/Heading.d.ts +9 -4
  62. package/dist/lib/components/Heading.js +17 -2
  63. package/dist/lib/components/Heading.js.map +1 -1
  64. package/dist/lib/components/InlineCode.d.ts +5 -0
  65. package/dist/lib/components/InlineCode.js +4 -0
  66. package/dist/lib/components/InlineCode.js.map +1 -0
  67. package/dist/lib/components/Layout.js +3 -2
  68. package/dist/lib/components/Layout.js.map +1 -1
  69. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  70. package/dist/lib/components/NotFoundPage.js +12 -0
  71. package/dist/lib/components/NotFoundPage.js.map +1 -0
  72. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  73. package/dist/lib/components/SyntaxHighlight.js +21 -19
  74. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  75. package/dist/lib/components/TopNavigation.d.ts +1 -1
  76. package/dist/lib/components/TopNavigation.js +4 -0
  77. package/dist/lib/components/TopNavigation.js.map +1 -1
  78. package/dist/lib/components/context/DevPortalProvider.d.ts +1 -1
  79. package/dist/lib/components/context/DevPortalProvider.js +2 -2
  80. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  81. package/dist/lib/components/index.d.ts +28 -3
  82. package/dist/lib/components/index.js +17 -3
  83. package/dist/lib/components/index.js.map +1 -1
  84. package/dist/lib/core/DevPortalContext.d.ts +33 -3
  85. package/dist/lib/core/DevPortalContext.js +8 -5
  86. package/dist/lib/core/DevPortalContext.js.map +1 -1
  87. package/dist/lib/core/plugins.d.ts +7 -4
  88. package/dist/lib/core/plugins.js +1 -0
  89. package/dist/lib/core/plugins.js.map +1 -1
  90. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  91. package/dist/lib/errors/ErrorAlert.js +8 -0
  92. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  93. package/dist/lib/errors/RouterError.d.ts +1 -0
  94. package/dist/lib/errors/RouterError.js +12 -0
  95. package/dist/lib/errors/RouterError.js.map +1 -0
  96. package/dist/lib/errors/ServerError.d.ts +3 -0
  97. package/dist/lib/errors/ServerError.js +6 -0
  98. package/dist/lib/errors/ServerError.js.map +1 -0
  99. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  100. package/dist/lib/errors/TopLevelError.js +7 -0
  101. package/dist/lib/errors/TopLevelError.js.map +1 -0
  102. package/dist/lib/oas/graphql/index.js +1 -1
  103. package/dist/lib/oas/graphql/index.js.map +1 -1
  104. package/dist/lib/oas/parser/index.d.ts +1 -1
  105. package/dist/lib/oas/parser/index.js +38 -12
  106. package/dist/lib/oas/parser/index.js.map +1 -1
  107. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +4 -0
  108. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +1 -1
  109. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  110. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +4 -0
  111. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +38 -0
  112. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  113. package/dist/lib/plugins/{api-key → api-keys}/index.js +32 -9
  114. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  115. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  116. package/dist/lib/plugins/markdown/MdxPage.js +7 -6
  117. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  118. package/dist/lib/plugins/markdown/Toc.js +1 -1
  119. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  120. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  121. package/dist/lib/plugins/markdown/generateRoutes.js +4 -4
  122. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  123. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  124. package/dist/lib/plugins/markdown/index.js +3 -7
  125. package/dist/lib/plugins/markdown/index.js.map +1 -1
  126. package/dist/lib/plugins/openapi/OperationList.js +16 -5
  127. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  128. package/dist/lib/plugins/openapi/OperationListItem.js +10 -5
  129. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  130. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  131. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  132. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  133. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  134. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +1 -1
  135. package/dist/lib/plugins/openapi/{MakeRequest.js → PlaygroundDialogWrapper.js} +5 -5
  136. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  137. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -9
  138. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  139. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  140. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  141. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  142. package/dist/lib/plugins/openapi/Route.js +8 -0
  143. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  144. package/dist/lib/plugins/openapi/SchemaListView.js +6 -27
  145. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  146. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
  147. package/dist/lib/plugins/openapi/SchemaListViewItem.js +16 -0
  148. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  149. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  150. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  151. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  152. package/dist/lib/plugins/openapi/Sidecar.js +10 -8
  153. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  154. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  155. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  156. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  157. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  158. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  159. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  160. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  161. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  162. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  163. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  164. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  165. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  166. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  167. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  168. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  169. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  170. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  171. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  172. package/dist/lib/plugins/openapi/context.js +11 -0
  173. package/dist/lib/plugins/openapi/context.js.map +1 -0
  174. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  175. package/dist/lib/plugins/openapi/index.js +35 -20
  176. package/dist/lib/plugins/openapi/index.js.map +1 -1
  177. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  178. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  179. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  180. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -3
  181. package/dist/lib/plugins/openapi/playground/Headers.js +16 -6
  182. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  183. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +1 -1
  184. package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -3
  185. package/dist/lib/plugins/openapi/playground/Playground.js +8 -12
  186. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  187. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +3 -0
  188. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +10 -0
  189. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  190. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  191. package/dist/lib/plugins/openapi/playground/QueryParams.js +2 -1
  192. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  193. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  194. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  195. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  196. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  197. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  198. package/dist/lib/plugins/openapi-worker.js +1 -1
  199. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  200. package/dist/lib/plugins/redirect/index.js +2 -3
  201. package/dist/lib/plugins/redirect/index.js.map +1 -1
  202. package/dist/lib/ui/Callout.js +2 -2
  203. package/dist/lib/ui/Callout.js.map +1 -1
  204. package/dist/lib/ui/button-variants.d.ts +2 -2
  205. package/dist/lib/util/MdxComponents.js +2 -2
  206. package/dist/lib/util/MdxComponents.js.map +1 -1
  207. package/dist/lib/util/groupBy.d.ts +1 -6
  208. package/dist/lib/util/groupBy.js +10 -8
  209. package/dist/lib/util/groupBy.js.map +1 -1
  210. package/dist/lib/util/logInit.d.ts +1 -0
  211. package/dist/lib/util/logInit.js +9 -0
  212. package/dist/lib/util/logInit.js.map +1 -0
  213. package/dist/lib/util/objectEntries.d.ts +4 -0
  214. package/dist/lib/util/objectEntries.js +2 -0
  215. package/dist/lib/util/objectEntries.js.map +1 -0
  216. package/dist/lib/util/renderIf.d.ts +1 -0
  217. package/dist/lib/util/renderIf.js +2 -0
  218. package/dist/lib/util/renderIf.js.map +1 -0
  219. package/dist/vite/build.js +27 -8
  220. package/dist/vite/build.js.map +1 -1
  221. package/dist/vite/config.d.ts +13 -9
  222. package/dist/vite/config.js +98 -57
  223. package/dist/vite/config.js.map +1 -1
  224. package/dist/vite/config.test.js +7 -4
  225. package/dist/vite/config.test.js.map +1 -1
  226. package/dist/vite/dev-server.d.ts +2 -1
  227. package/dist/vite/dev-server.js +34 -13
  228. package/dist/vite/dev-server.js.map +1 -1
  229. package/dist/vite/html.js +5 -5
  230. package/dist/vite/html.js.map +1 -1
  231. package/dist/vite/plugin-api-keys.js +7 -8
  232. package/dist/vite/plugin-api-keys.js.map +1 -1
  233. package/dist/vite/plugin-api.js +8 -19
  234. package/dist/vite/plugin-api.js.map +1 -1
  235. package/dist/vite/plugin-auth.js +5 -6
  236. package/dist/vite/plugin-auth.js.map +1 -1
  237. package/dist/vite/plugin-component.js +3 -2
  238. package/dist/vite/plugin-component.js.map +1 -1
  239. package/dist/vite/plugin-config.d.ts +0 -1
  240. package/dist/vite/plugin-config.js +13 -7
  241. package/dist/vite/plugin-config.js.map +1 -1
  242. package/dist/vite/plugin-custom-css.d.ts +6 -0
  243. package/dist/vite/plugin-custom-css.js +55 -0
  244. package/dist/vite/plugin-custom-css.js.map +1 -0
  245. package/dist/vite/plugin-docs.js +14 -4
  246. package/dist/vite/plugin-docs.js.map +1 -1
  247. package/dist/vite/plugin-docs.test.js +1 -1
  248. package/dist/vite/plugin-docs.test.js.map +1 -1
  249. package/dist/vite/plugin-html.js +1 -9
  250. package/dist/vite/plugin-html.js.map +1 -1
  251. package/dist/vite/plugin-mdx.d.ts +3 -1
  252. package/dist/vite/plugin-mdx.js +4 -4
  253. package/dist/vite/plugin-mdx.js.map +1 -1
  254. package/dist/vite/plugin-redirect.js +9 -9
  255. package/dist/vite/plugin-redirect.js.map +1 -1
  256. package/dist/vite/plugin.js +3 -3
  257. package/dist/vite/plugin.js.map +1 -1
  258. package/dist/vite/prerender.d.ts +1 -0
  259. package/dist/vite/prerender.js +59 -0
  260. package/dist/vite/prerender.js.map +1 -0
  261. package/lib/AnchorLink-DCdBbdqo.js +705 -0
  262. package/lib/AnchorLink-DCdBbdqo.js.map +1 -0
  263. package/lib/DevPortalProvider-C-O1s7mm.js +1081 -0
  264. package/lib/DevPortalProvider-C-O1s7mm.js.map +1 -0
  265. package/lib/Markdown-CGZJUYcj.js +15028 -0
  266. package/lib/Markdown-CGZJUYcj.js.map +1 -0
  267. package/lib/MdxPage-BZLuBOqR.js +190 -0
  268. package/lib/MdxPage-BZLuBOqR.js.map +1 -0
  269. package/lib/OperationList-BEpN70_E.js +5562 -0
  270. package/lib/OperationList-BEpN70_E.js.map +1 -0
  271. package/lib/Route-WiMUalLG.js +13 -0
  272. package/lib/Route-WiMUalLG.js.map +1 -0
  273. package/lib/Select-BQ9-3iTJ.js +4571 -0
  274. package/lib/Select-BQ9-3iTJ.js.map +1 -0
  275. package/lib/Spinner-C1L_TK5f.js +182 -0
  276. package/lib/Spinner-C1L_TK5f.js.map +1 -0
  277. package/lib/_commonjsHelpers-BkfeUUK-.js +1 -0
  278. package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
  279. package/lib/assets/index-BPdJm2ty.js +1 -0
  280. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  281. package/lib/assets/{worker-BCcpCNJ7.js → worker-BjPv-hjP.js} +10742 -10318
  282. package/lib/assets/worker-BjPv-hjP.js.map +1 -0
  283. package/lib/context-_fYfJFgk.js +14 -0
  284. package/lib/context-_fYfJFgk.js.map +1 -0
  285. package/lib/createWorkerClient-TWecYOlx.js +16698 -0
  286. package/lib/createWorkerClient-TWecYOlx.js.map +1 -0
  287. package/lib/hook-SM2dMVmI.js +77 -0
  288. package/lib/hook-SM2dMVmI.js.map +1 -0
  289. package/lib/index-CtLNbq0d.js +412 -0
  290. package/lib/index-CtLNbq0d.js.map +1 -0
  291. package/lib/index-PvQa9XLl.js +724 -0
  292. package/lib/index-PvQa9XLl.js.map +1 -0
  293. package/lib/index-pI9JkN46.js +4765 -0
  294. package/lib/index-pI9JkN46.js.map +1 -0
  295. package/lib/jsx-runtime-DLtUZ5Ve.js +1526 -0
  296. package/lib/jsx-runtime-DLtUZ5Ve.js.map +1 -0
  297. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  298. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  299. package/lib/prism-csharp.min-Yizuc34Y.js +35 -0
  300. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  301. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  302. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  303. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  304. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  305. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  306. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  307. package/lib/prism-objectivec.min-BXSWqpJJ.js +2 -0
  308. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  309. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  310. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  311. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  312. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  313. package/lib/router-BkOLuJlq.js +2973 -0
  314. package/lib/router-BkOLuJlq.js.map +1 -0
  315. package/lib/slugify-DbLhpSPt.js +28 -0
  316. package/lib/slugify-DbLhpSPt.js.map +1 -0
  317. package/lib/{state-oycsxkHz.js → state-Ds_OxRHP.js} +20 -18
  318. package/lib/state-Ds_OxRHP.js.map +1 -0
  319. package/lib/util-Cgie7wjb.js +41 -0
  320. package/lib/util-Cgie7wjb.js.map +1 -0
  321. package/lib/zudoku.auth-auth0.js +3 -1
  322. package/lib/zudoku.auth-auth0.js.map +1 -0
  323. package/lib/zudoku.auth-clerk.js +11 -8
  324. package/lib/zudoku.auth-clerk.js.map +1 -0
  325. package/lib/zudoku.auth-openid.js +5 -2
  326. package/lib/zudoku.auth-openid.js.map +1 -0
  327. package/lib/zudoku.components.js +800 -464
  328. package/lib/zudoku.components.js.map +1 -0
  329. package/lib/zudoku.openapi-worker.js +3 -223
  330. package/lib/zudoku.openapi-worker.js.map +1 -0
  331. package/lib/zudoku.plugin-api-keys.js +287 -0
  332. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  333. package/lib/zudoku.plugin-markdown.js +49 -0
  334. package/lib/zudoku.plugin-markdown.js.map +1 -0
  335. package/lib/zudoku.plugin-openapi.js +9 -0
  336. package/lib/zudoku.plugin-openapi.js.map +1 -0
  337. package/lib/zudoku.plugin-redirect.js +11 -0
  338. package/lib/zudoku.plugin-redirect.js.map +1 -0
  339. package/package.json +33 -15
  340. package/src/app/App.tsx +0 -40
  341. package/src/app/demo-cdn.html +26 -0
  342. package/src/app/demo.html +18 -0
  343. package/src/app/demo.tsx +40 -0
  344. package/src/app/entry.client.tsx +47 -0
  345. package/src/app/entry.server.tsx +158 -0
  346. package/src/app/main.css +74 -0
  347. package/src/app/main.tsx +71 -15
  348. package/src/app/standalone.html +20 -0
  349. package/src/app/standalone.tsx +46 -0
  350. package/src/app/tailwind.ts +2 -6
  351. package/src/app/zudoku-manifest.ts +22 -0
  352. package/src/lib/authentication/Callback.tsx +1 -1
  353. package/src/lib/authentication/authentication.ts +2 -5
  354. package/src/lib/authentication/hook.ts +1 -0
  355. package/src/lib/authentication/providers/auth0.tsx +1 -0
  356. package/src/lib/authentication/providers/clerk.tsx +3 -0
  357. package/src/lib/authentication/providers/openid.tsx +3 -1
  358. package/src/lib/authentication/state.ts +2 -0
  359. package/src/lib/components/Bootstrap.tsx +37 -0
  360. package/src/lib/components/DevPortal.tsx +41 -56
  361. package/src/lib/components/ErrorPage.tsx +28 -0
  362. package/src/lib/components/Header.tsx +7 -7
  363. package/src/lib/components/Heading.tsx +26 -7
  364. package/src/lib/components/InlineCode.tsx +19 -0
  365. package/src/lib/components/Layout.tsx +9 -7
  366. package/src/lib/components/NotFoundPage.tsx +39 -0
  367. package/src/lib/components/SyntaxHighlight.tsx +27 -19
  368. package/src/lib/components/TopNavigation.tsx +5 -0
  369. package/src/lib/components/context/DevPortalProvider.ts +2 -2
  370. package/src/lib/components/index.ts +21 -3
  371. package/src/lib/core/DevPortalContext.ts +42 -13
  372. package/src/lib/core/plugins.ts +10 -5
  373. package/src/lib/errors/ErrorAlert.tsx +21 -0
  374. package/src/lib/errors/RouterError.tsx +13 -0
  375. package/src/lib/errors/ServerError.tsx +5 -0
  376. package/src/lib/errors/TopLevelError.tsx +8 -0
  377. package/src/lib/oas/graphql/index.ts +2 -2
  378. package/src/lib/oas/parser/index.ts +41 -20
  379. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +2 -8
  380. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +21 -14
  381. package/src/lib/plugins/{api-key → api-keys}/index.tsx +43 -9
  382. package/src/lib/plugins/markdown/MdxPage.tsx +52 -35
  383. package/src/lib/plugins/markdown/Toc.tsx +1 -1
  384. package/src/lib/plugins/markdown/generateRoutes.tsx +16 -6
  385. package/src/lib/plugins/markdown/index.tsx +10 -7
  386. package/src/lib/plugins/openapi/OperationList.tsx +40 -4
  387. package/src/lib/plugins/openapi/OperationListItem.tsx +69 -42
  388. package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
  389. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  390. package/src/lib/plugins/openapi/{MakeRequest.tsx → PlaygroundDialogWrapper.tsx} +4 -4
  391. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -16
  392. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -1
  393. package/src/lib/plugins/openapi/Route.tsx +21 -0
  394. package/src/lib/plugins/openapi/SchemaListView.tsx +23 -192
  395. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +110 -0
  396. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  397. package/src/lib/plugins/openapi/Sidecar.tsx +15 -10
  398. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
  399. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  400. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  401. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -1
  402. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  403. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  404. package/src/lib/plugins/openapi/context.tsx +16 -0
  405. package/src/lib/plugins/openapi/index.tsx +59 -52
  406. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  407. package/src/lib/plugins/openapi/playground/Headers.tsx +60 -33
  408. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  409. package/src/lib/plugins/openapi/playground/Playground.tsx +158 -193
  410. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +34 -0
  411. package/src/lib/plugins/openapi/playground/QueryParams.tsx +7 -2
  412. package/src/lib/plugins/openapi/playground/createUrl.ts +1 -1
  413. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  414. package/src/lib/plugins/openapi-worker.ts +1 -1
  415. package/src/lib/plugins/redirect/index.tsx +2 -2
  416. package/src/lib/ui/Callout.tsx +4 -4
  417. package/src/lib/util/MdxComponents.tsx +2 -12
  418. package/src/lib/util/groupBy.ts +7 -12
  419. package/src/lib/util/logInit.ts +9 -0
  420. package/src/lib/util/objectEntries.ts +5 -0
  421. package/src/lib/util/renderIf.ts +4 -0
  422. package/dist/lib/components/Link.d.ts +0 -1
  423. package/dist/lib/components/Link.js +0 -2
  424. package/dist/lib/components/Link.js.map +0 -1
  425. package/dist/lib/components/Router.d.ts +0 -4
  426. package/dist/lib/components/Router.js +0 -20
  427. package/dist/lib/components/Router.js.map +0 -1
  428. package/dist/lib/core/helmet.d.ts +0 -4
  429. package/dist/lib/core/helmet.js +0 -5
  430. package/dist/lib/core/helmet.js.map +0 -1
  431. package/dist/lib/core/icons.d.ts +0 -1
  432. package/dist/lib/core/icons.js +0 -2
  433. package/dist/lib/core/icons.js.map +0 -1
  434. package/dist/lib/core/router.d.ts +0 -1
  435. package/dist/lib/core/router.js +0 -2
  436. package/dist/lib/core/router.js.map +0 -1
  437. package/dist/lib/plugins/api-key/CreateApiKey.d.ts +0 -5
  438. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  439. package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +0 -5
  440. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  441. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  442. package/dist/lib/plugins/api-key/index.js.map +0 -1
  443. package/dist/lib/plugins/index.d.ts +0 -4
  444. package/dist/lib/plugins/index.js +0 -5
  445. package/dist/lib/plugins/index.js.map +0 -1
  446. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  447. package/dist/lib/plugins/openapi/Select.js +0 -5
  448. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  449. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  450. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  451. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  452. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  453. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  454. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  455. package/dist/vite/common.d.ts +0 -1
  456. package/dist/vite/common.js +0 -5
  457. package/dist/vite/common.js.map +0 -1
  458. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  459. package/dist/vite/plugin-openapi-worker.js +0 -28
  460. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  461. package/lib/Spinner-7LezPqGn.js +0 -8393
  462. package/lib/clerk-Wslx_mPo.js +0 -19685
  463. package/lib/index-DNx3xWa2.js +0 -3461
  464. package/lib/urql-DMlBWUKL.js +0 -1591
  465. package/lib/zudoku.plugins.js +0 -19863
  466. package/src/lib/components/Link.tsx +0 -1
  467. package/src/lib/components/Router.tsx +0 -28
  468. package/src/lib/core/helmet.ts +0 -5
  469. package/src/lib/core/icons.tsx +0 -1
  470. package/src/lib/core/router.tsx +0 -1
  471. package/src/lib/plugins/index.ts +0 -4
  472. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  473. /package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +0 -0
  474. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
@@ -0,0 +1,287 @@
1
+ import { j as e, c as g, O as j } from "./jsx-runtime-DLtUZ5Ve.js";
2
+ import { R as v, u as b } from "./hook-SM2dMVmI.js";
3
+ import { u as w, a as h, S as N, b as k, c as K, d as E, e as S, f as p, B as o } from "./Select-BQ9-3iTJ.js";
4
+ import { c as l, a as A, L as x } from "./Markdown-CGZJUYcj.js";
5
+ import { a as m, b as C, c as P } from "./DevPortalProvider-C-O1s7mm.js";
6
+ import * as R from "react";
7
+ import { useState as D } from "react";
8
+ /**
9
+ * @license lucide-react v0.378.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const I = l("EyeOff", [
15
+ ["path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24", key: "1jxqfv" }],
16
+ [
17
+ "path",
18
+ {
19
+ d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",
20
+ key: "9wicm4"
21
+ }
22
+ ],
23
+ [
24
+ "path",
25
+ { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61", key: "1jreej" }
26
+ ],
27
+ ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }]
28
+ ]);
29
+ /**
30
+ * @license lucide-react v0.378.0 - ISC
31
+ *
32
+ * This source code is licensed under the ISC license.
33
+ * See the LICENSE file in the root directory of this source tree.
34
+ */
35
+ const O = l("Eye", [
36
+ ["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }],
37
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
38
+ ]);
39
+ /**
40
+ * @license lucide-react v0.378.0 - ISC
41
+ *
42
+ * This source code is licensed under the ISC license.
43
+ * See the LICENSE file in the root directory of this source tree.
44
+ */
45
+ const q = l("RotateCw", [
46
+ ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
47
+ ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
48
+ ]);
49
+ /**
50
+ * @license lucide-react v0.378.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */
55
+ const z = l("Trash", [
56
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
57
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
58
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }]
59
+ ]);
60
+ var M = process.env.NODE_ENV === "production", d = "Invariant failed";
61
+ function u(t, n) {
62
+ if (!t) {
63
+ if (M)
64
+ throw new Error(d);
65
+ var a = typeof n == "function" ? n() : n, r = a ? "".concat(d, ": ").concat(a) : d;
66
+ throw new Error(r);
67
+ }
68
+ }
69
+ const y = R.forwardRef(
70
+ ({ className: t, type: n, ...a }, r) => /* @__PURE__ */ e.jsx(
71
+ "input",
72
+ {
73
+ type: n,
74
+ className: A(
75
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
76
+ t
77
+ ),
78
+ ref: r,
79
+ ...a
80
+ }
81
+ )
82
+ );
83
+ y.displayName = "Input";
84
+ const L = ({ service: t }) => {
85
+ const n = m(), a = g(), r = w({
86
+ defaultValues: {
87
+ expiresOn: "30"
88
+ }
89
+ }), i = h({
90
+ mutationFn: ({ description: s, expiresOn: c }) => {
91
+ if (!t.createKey)
92
+ throw new Error("deleteKey not implemented");
93
+ const f = c !== "never" ? T(Number(c)) : void 0;
94
+ return t.createKey(
95
+ { description: s, expiresOn: f },
96
+ n
97
+ );
98
+ },
99
+ onSuccess: () => a("/settings/api-keys/")
100
+ });
101
+ return t.createKey ? /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-lg pt-[--padding-content-top] pb-[--padding-content-bottom]", children: [
102
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between mb-4 border-b border-border pb-1", children: /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "New API Key" }) }),
103
+ /* @__PURE__ */ e.jsx(
104
+ "form",
105
+ {
106
+ onSubmit: r.handleSubmit((s) => i.mutate(s)),
107
+ children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col", children: [
108
+ "Note",
109
+ /* @__PURE__ */ e.jsx(y, { ...r.register("description") }),
110
+ "Expiration",
111
+ /* @__PURE__ */ e.jsxs(
112
+ N,
113
+ {
114
+ onValueChange: (s) => r.setValue("expiresOn", s),
115
+ defaultValue: r.getValues("expiresOn"),
116
+ children: [
117
+ /* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsx(K, {}) }),
118
+ /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsxs(S, { children: [
119
+ [7, 30, 60, 90].map((s) => /* @__PURE__ */ e.jsxs(p, { value: String(s), children: [
120
+ s,
121
+ " days"
122
+ ] }, s)),
123
+ /* @__PURE__ */ e.jsx(p, { value: "never", children: "Never" })
124
+ ] }) })
125
+ ]
126
+ }
127
+ ),
128
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
129
+ /* @__PURE__ */ e.jsx(o, { children: "Generate Key" }),
130
+ /* @__PURE__ */ e.jsx(o, { variant: "outline", asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/", children: "Cancel" }) })
131
+ ] })
132
+ ] })
133
+ }
134
+ )
135
+ ] }) : null;
136
+ }, T = (t) => {
137
+ const n = /* @__PURE__ */ new Date();
138
+ return n.setDate(n.getDate() + t), n.toISOString();
139
+ }, V = ({ service: t }) => {
140
+ const n = m(), a = C(), { data: r } = P({
141
+ queryFn: () => t.getKeys(n),
142
+ queryKey: ["api-keys"],
143
+ retry: !1
144
+ }), i = h({
145
+ mutationFn: (s) => {
146
+ if (!t.deleteKey)
147
+ throw new Error("deleteKey not implemented");
148
+ return t.deleteKey(s, n);
149
+ },
150
+ onSuccess: () => {
151
+ a.invalidateQueries({ queryKey: ["api-keys"] });
152
+ }
153
+ });
154
+ return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-lg h-full pt-[--padding-content-top] pb-[--padding-content-bottom]", children: [
155
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-4 border-b border-border pb-3", children: [
156
+ /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
157
+ t.createKey && /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/new", children: "Create API Key" }) })
158
+ ] }),
159
+ r.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-4 items-center h-1/2 my-8", children: [
160
+ /* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
161
+ "No API keys created yet.",
162
+ /* @__PURE__ */ e.jsx("br", {}),
163
+ "Get started and create the first one now"
164
+ ] }),
165
+ t.createKey && /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx(x, { to: "/settings/api-keys/new", children: "Create API Key" }) })
166
+ ] }) : /* @__PURE__ */ e.jsx("ul", { className: "grid grid-cols-[minmax(250px,min-content)_1fr_min-content] ", children: r.map((s) => /* @__PURE__ */ e.jsxs(
167
+ "li",
168
+ {
169
+ className: "border-b border-border p-5 grid grid-cols-subgrid col-span-full gap-2 items-center",
170
+ children: [
171
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 text-sm", children: [
172
+ s.description ?? s.id,
173
+ /* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-xs", children: [
174
+ s.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
175
+ "Created on ",
176
+ new Date(s.createdOn).toLocaleDateString()
177
+ ] }),
178
+ s.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
179
+ "Expires on ",
180
+ new Date(s.expiresOn).toLocaleDateString()
181
+ ] })
182
+ ] })
183
+ ] }),
184
+ /* @__PURE__ */ e.jsx("div", { className: "items-center flex justify-center", children: /* @__PURE__ */ e.jsx(F, { apiKey: s.key }) }),
185
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
186
+ t.rollKey && /* @__PURE__ */ e.jsx(o, { size: "icon", children: /* @__PURE__ */ e.jsx(q, { size: 16 }) }),
187
+ t.deleteKey && /* @__PURE__ */ e.jsx(
188
+ o,
189
+ {
190
+ variant: "ghost",
191
+ size: "icon",
192
+ onClick: () => {
193
+ confirm("Do you want to delete this key?") && i.mutate(s.id);
194
+ },
195
+ disabled: i.isPending,
196
+ children: /* @__PURE__ */ e.jsx(z, { size: 16 })
197
+ }
198
+ )
199
+ ] })
200
+ ]
201
+ },
202
+ s.id
203
+ )) })
204
+ ] });
205
+ }, F = ({ apiKey: t }) => {
206
+ const [n, a] = D(!1);
207
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm", children: [
208
+ /* @__PURE__ */ e.jsx("code", { className: "border border-border rounded bg-gray-100 dark:bg-gray-950 p-1 font-mono", children: n ? t : "•".repeat(t.length) }),
209
+ /* @__PURE__ */ e.jsx(
210
+ o,
211
+ {
212
+ variant: "outline",
213
+ onClick: () => a((r) => !r),
214
+ size: "icon",
215
+ children: n ? /* @__PURE__ */ e.jsx(I, { size: 16 }) : /* @__PURE__ */ e.jsx(O, { size: 16 })
216
+ }
217
+ )
218
+ ] });
219
+ }, _ = "https://zudoku-rewiringamerica-main-ef9c9c0.d2.zuplo.dev", B = (t) => ({
220
+ deleteKey: async (n, a) => {
221
+ const r = new Request(t + `/v1/developer/api-keys/${n}`, {
222
+ method: "DELETE"
223
+ });
224
+ await a.signRequest(r);
225
+ const i = await fetch(r);
226
+ u(i.ok, "Failed to delete API key");
227
+ },
228
+ createKey: async (n, a) => {
229
+ const r = new Request(t + "/v1/developer/api-keys", {
230
+ method: "POST",
231
+ headers: {
232
+ "Content-Type": "application/json"
233
+ },
234
+ body: JSON.stringify(n)
235
+ });
236
+ await a.signRequest(r);
237
+ const i = await fetch(r);
238
+ u(i.ok, "Failed to create API key");
239
+ },
240
+ getKeys: async (n) => {
241
+ const a = new Request(t + "/v1/developer/api-keys");
242
+ await n.signRequest(a);
243
+ const r = await fetch(a);
244
+ return u(r.ok, "Failed to fetch API keys"), await r.json();
245
+ }
246
+ }), G = () => {
247
+ const t = b();
248
+ return t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(j, {}) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2 my-12", children: [
249
+ "Please login first to view this page",
250
+ /* @__PURE__ */ e.jsx(o, { onClick: () => t.login(), children: "Login" })
251
+ ] });
252
+ }, Z = (t) => {
253
+ const n = "endpoint" in t ? t.endpoint : _, a = "getKeys" in t ? t : B(n);
254
+ return {
255
+ getIdentities: async (r) => {
256
+ try {
257
+ return (await a.getKeys(r)).map((s) => ({
258
+ authorizeRequest: (c) => (c.headers.set("Authorization", `Bearer ${s.key}`), c),
259
+ id: s.id,
260
+ label: s.description ?? s.id
261
+ }));
262
+ } catch {
263
+ return [];
264
+ }
265
+ },
266
+ getRoutes: () => [
267
+ {
268
+ element: /* @__PURE__ */ e.jsx(G, {}),
269
+ errorElement: /* @__PURE__ */ e.jsx(v, {}),
270
+ children: [
271
+ {
272
+ path: "/settings/api-keys",
273
+ element: /* @__PURE__ */ e.jsx(V, { service: a })
274
+ },
275
+ {
276
+ path: "/settings/api-keys/new",
277
+ element: /* @__PURE__ */ e.jsx(L, { service: a })
278
+ }
279
+ ]
280
+ }
281
+ ]
282
+ };
283
+ };
284
+ export {
285
+ Z as apiKeyPlugin
286
+ };
287
+ //# sourceMappingURL=zudoku.plugin-api-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zudoku.plugin-api-keys.js","sources":["../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/eye-off.js","../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/eye.js","../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/rotate-cw.js","../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/trash.js","../../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../src/lib/components/Input.tsx","../src/lib/plugins/api-keys/CreateApiKey.tsx","../src/lib/plugins/api-keys/SettingsApiKeys.tsx","../src/lib/plugins/api-keys/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst EyeOff = createLucideIcon(\"EyeOff\", [\n [\"path\", { d: \"M9.88 9.88a3 3 0 1 0 4.24 4.24\", key: \"1jxqfv\" }],\n [\n \"path\",\n {\n d: \"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68\",\n key: \"9wicm4\"\n }\n ],\n [\n \"path\",\n { d: \"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61\", key: \"1jreej\" }\n ],\n [\"line\", { x1: \"2\", x2: \"22\", y1: \"2\", y2: \"22\", key: \"a6p6uj\" }]\n]);\n\nexport { EyeOff as default };\n//# sourceMappingURL=eye-off.js.map\n","/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Eye = createLucideIcon(\"Eye\", [\n [\"path\", { d: \"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z\", key: \"rwhkz3\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n]);\n\nexport { Eye as default };\n//# sourceMappingURL=eye.js.map\n","/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst RotateCw = createLucideIcon(\"RotateCw\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n]);\n\nexport { RotateCw as default };\n//# sourceMappingURL=rotate-cw.js.map\n","/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Trash = createLucideIcon(\"Trash\", [\n [\"path\", { d: \"M3 6h18\", key: \"d0wm0j\" }],\n [\"path\", { d: \"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\", key: \"4alrt4\" }],\n [\"path\", { d: \"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\", key: \"v07s0e\" }]\n]);\n\nexport { Trash as default };\n//# sourceMappingURL=trash.js.map\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nexport { invariant as default };\n","import * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","import { useMutation } from \"@tanstack/react-query\";\nimport { useForm } from \"react-hook-form\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useDevPortal } from \"../../components/context/DevPortalProvider.js\";\nimport { Input } from \"../../components/Input.js\";\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"../../components/Select.js\";\nimport { Button } from \"../../ui/Button.js\";\nimport { ApiKeyService } from \"./index.js\";\n\ntype CreateApiKey = { description: string; expiresOn?: string };\n\nexport const CreateApiKey = ({ service }: { service: ApiKeyService }) => {\n const context = useDevPortal();\n const navigate = useNavigate();\n const form = useForm<CreateApiKey>({\n defaultValues: {\n expiresOn: \"30\",\n },\n });\n const createKeyMutation = useMutation({\n mutationFn: ({ description, expiresOn }: CreateApiKey) => {\n if (!service.createKey) {\n throw new Error(\"deleteKey not implemented\");\n }\n\n const expiresOnDate =\n expiresOn !== \"never\" ? addDaysToDate(Number(expiresOn)) : undefined;\n\n return service.createKey(\n { description: description, expiresOn: expiresOnDate },\n context,\n );\n },\n onSuccess: () => navigate(\"/settings/api-keys/\"),\n });\n\n if (!service.createKey) {\n return null;\n }\n\n return (\n <div className=\"max-w-screen-lg pt-[--padding-content-top] pb-[--padding-content-bottom]\">\n <div className=\"flex justify-between mb-4 border-b border-border pb-1\">\n <h1 className=\"font-medium text-2xl\">New API Key</h1>\n </div>\n <form\n onSubmit={form.handleSubmit((data) => createKeyMutation.mutate(data))}\n >\n <div className=\"flex gap-2 flex-col\">\n Note\n <Input {...form.register(\"description\")} />\n Expiration\n <Select\n onValueChange={(value) => form.setValue(\"expiresOn\", value)}\n defaultValue={form.getValues(\"expiresOn\")}\n >\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectGroup>\n {[7, 30, 60, 90].map((option) => (\n <SelectItem value={String(option)} key={option}>\n {option} days\n </SelectItem>\n ))}\n <SelectItem value=\"never\">Never</SelectItem>\n </SelectGroup>\n </SelectContent>\n </Select>\n <div className=\"flex gap-2\">\n <Button>Generate Key</Button>\n <Button variant=\"outline\" asChild>\n <Link to=\"/settings/api-keys/\">Cancel</Link>\n </Button>\n </div>\n </div>\n </form>\n </div>\n );\n};\n\nconst addDaysToDate = (days: number): string => {\n const date = new Date();\n date.setDate(date.getDate() + days);\n return date.toISOString();\n};\n","import {\n useMutation,\n useQueryClient,\n useSuspenseQuery,\n} from \"@tanstack/react-query\";\nimport { EyeIcon, EyeOffIcon, RotateCwIcon, TrashIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { useDevPortal } from \"../../components/context/DevPortalProvider.js\";\nimport { Button } from \"../../ui/Button.js\";\nimport { ApiKeyService } from \"./index.js\";\n\nexport const SettingsApiKeys = ({ service }: { service: ApiKeyService }) => {\n const context = useDevPortal();\n const queryClient = useQueryClient();\n const { data } = useSuspenseQuery({\n queryFn: () => service.getKeys(context),\n queryKey: [\"api-keys\"],\n retry: false,\n });\n\n const deleteKeyMutation = useMutation({\n mutationFn: (id: string) => {\n if (!service.deleteKey) {\n throw new Error(\"deleteKey not implemented\");\n }\n\n return service.deleteKey(id, context);\n },\n onSuccess: () => {\n void queryClient.invalidateQueries({ queryKey: [\"api-keys\"] });\n },\n });\n\n return (\n <div className=\"max-w-screen-lg h-full pt-[--padding-content-top] pb-[--padding-content-bottom]\">\n <div className=\"flex justify-between mb-4 border-b border-border pb-3\">\n <h1 className=\"font-medium text-2xl\">API Keys</h1>\n {service.createKey && (\n <Button asChild>\n <Link to=\"/settings/api-keys/new\">Create API Key</Link>\n </Button>\n )}\n </div>\n\n {data.length === 0 ? (\n <div className=\"flex flex-col justify-center gap-4 items-center h-1/2 my-8\">\n <div className=\"text-center\">\n No API keys created yet.\n <br />\n Get started and create the first one now\n </div>\n {service.createKey && (\n <Button asChild>\n <Link to=\"/settings/api-keys/new\">Create API Key</Link>\n </Button>\n )}\n </div>\n ) : (\n <ul className=\"grid grid-cols-[minmax(250px,min-content)_1fr_min-content] \">\n {data.map((key: any) => (\n <li\n className=\"border-b border-border p-5 grid grid-cols-subgrid col-span-full gap-2 items-center\"\n key={key.id}\n >\n <div className=\"flex flex-col gap-1 text-sm\">\n {key.description ?? key.id}\n <div className=\"text-muted-foreground text-xs\">\n {key.createdOn && (\n <div>\n Created on {new Date(key.createdOn).toLocaleDateString()}\n </div>\n )}\n {key.expiresOn && (\n <div>\n Expires on {new Date(key.expiresOn).toLocaleDateString()}\n </div>\n )}\n </div>\n </div>\n <div className=\"items-center flex justify-center\">\n <RevealApiKey apiKey={key.key} />\n </div>\n <div className=\"flex gap-2\">\n {service.rollKey && (\n <Button size=\"icon\">\n <RotateCwIcon size={16} />\n </Button>\n )}\n {service.deleteKey && (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => {\n if (!confirm(\"Do you want to delete this key?\")) {\n return;\n }\n\n deleteKeyMutation.mutate(key.id);\n }}\n disabled={deleteKeyMutation.isPending}\n >\n <TrashIcon size={16} />\n </Button>\n )}\n </div>\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n};\n\nconst RevealApiKey = ({ apiKey }: { apiKey: string }) => {\n const [revealed, setRevealed] = useState(false);\n\n return (\n <div className=\"flex gap-2 items-center text-sm\">\n <code className=\"border border-border rounded bg-gray-100 dark:bg-gray-950 p-1 font-mono\">\n {revealed ? apiKey : \"•\".repeat(apiKey.length)}\n </code>\n <Button\n variant=\"outline\"\n onClick={() => setRevealed((prev) => !prev)}\n size=\"icon\"\n >\n {revealed ? <EyeOffIcon size={16} /> : <EyeIcon size={16} />}\n </Button>\n </div>\n );\n};\n","import { Outlet, type RouteObject } from \"react-router-dom\";\nimport invariant from \"tiny-invariant\";\nimport { useAuth } from \"../../authentication/hook.js\";\nimport { DevPortalContext } from \"../../core/DevPortalContext.js\";\nimport {\n type ApiIdentityPlugin,\n type DevPortalPlugin,\n} from \"../../core/plugins.js\";\nimport { RouterError } from \"../../errors/RouterError.js\";\nimport { Button } from \"../../ui/Button.js\";\nimport { CreateApiKey } from \"./CreateApiKey.js\";\nimport { SettingsApiKeys } from \"./SettingsApiKeys.js\";\n\nexport type ApiKeyResults = Promise<ApiKey[]>;\nconst DEFAULT_API_KEY_ENDPOINT =\n \"https://zudoku-rewiringamerica-main-ef9c9c0.d2.zuplo.dev\";\n\nexport type ApiKeyService = {\n getKeys: (context: DevPortalContext) => ApiKeyResults;\n rollKey?: (id: string, context: DevPortalContext) => Promise<void>;\n deleteKey?: (id: string, context: DevPortalContext) => Promise<void>;\n updateKeyDescription?: (\n apiKey: { jd: string; description: string },\n context: DevPortalContext,\n ) => Promise<void>;\n getUsage?: (apiKeys: string[], context: DevPortalContext) => Promise<void>;\n createKey?: (\n apiKey: { description: string; expiresOn?: string },\n context: DevPortalContext,\n ) => Promise<void>;\n};\n\nexport type GetApiKeysOptions = ApiKeyService | { endpoint: string } | object;\n\nexport type ApiKeyPluginOptions = object & GetApiKeysOptions;\n\nexport interface ApiKey {\n id: string;\n description?: string;\n createdOn?: string;\n updatedOn?: string;\n expiresOn?: string;\n key: string;\n}\n\nconst createDefaultHandler = (endpoint: string): ApiKeyService => {\n return {\n deleteKey: async (id, context) => {\n const request = new Request(endpoint + `/v1/developer/api-keys/${id}`, {\n method: \"DELETE\",\n });\n\n await context.signRequest(request);\n\n const response = await fetch(request);\n invariant(response.ok, \"Failed to delete API key\");\n },\n createKey: async (apiKey, context) => {\n const request = new Request(endpoint + `/v1/developer/api-keys`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(apiKey),\n });\n\n await context.signRequest(request);\n\n const response = await fetch(request);\n invariant(response.ok, \"Failed to create API key\");\n },\n getKeys: async (context) => {\n const request = new Request(endpoint + `/v1/developer/api-keys`);\n\n await context.signRequest(request);\n\n const keys = await fetch(request);\n invariant(keys.ok, \"Failed to fetch API keys\");\n\n return await keys.json();\n },\n };\n};\n\nconst ProtectedRoute = () => {\n const auth = useAuth();\n\n // TODO: should we suspend here somehow?\n if (auth.isPending) {\n return null;\n }\n\n return auth.isAuthenticated ? (\n <Outlet />\n ) : (\n <div className=\"flex flex-col justify-center gap-2 items-center h-1/2 my-12\">\n Please login first to view this page\n <Button onClick={() => auth.login()}>Login</Button>\n </div>\n );\n};\n\nexport const apiKeyPlugin = (\n options: ApiKeyPluginOptions,\n): DevPortalPlugin & ApiIdentityPlugin => {\n const endpoint =\n \"endpoint\" in options ? options.endpoint : DEFAULT_API_KEY_ENDPOINT;\n\n const service =\n \"getKeys\" in options ? options : createDefaultHandler(endpoint);\n\n return {\n getIdentities: async (context) => {\n try {\n const keys = await service.getKeys(context);\n\n return keys.map((key) => ({\n authorizeRequest: (request) => {\n request.headers.set(\"Authorization\", `Bearer ${key.key}`);\n return request;\n },\n id: key.id,\n label: key.description ?? key.id,\n }));\n } catch {\n return [];\n }\n },\n getRoutes: (): RouteObject[] => {\n // TODO: Make lazy\n return [\n {\n element: <ProtectedRoute />,\n errorElement: <RouterError />,\n children: [\n {\n path: \"/settings/api-keys\",\n element: <SettingsApiKeys service={service} />,\n },\n {\n path: \"/settings/api-keys/new\",\n element: <CreateApiKey service={service} />,\n },\n ],\n },\n ];\n },\n };\n};\n"],"names":["EyeOff","createLucideIcon","Eye","RotateCw","Trash","isProduction","prefix","invariant","condition","message","provided","value","Input","React","className","type","props","ref","jsx","cn","CreateApiKey","service","context","useDevPortal","navigate","useNavigate","form","useForm","createKeyMutation","useMutation","description","expiresOn","expiresOnDate","addDaysToDate","jsxs","data","Select","SelectTrigger","SelectValue","SelectContent","SelectGroup","option","SelectItem","Button","Link","days","date","SettingsApiKeys","queryClient","useQueryClient","useSuspenseQuery","deleteKeyMutation","id","key","RevealApiKey","RotateCwIcon","TrashIcon","apiKey","revealed","setRevealed","useState","prev","EyeOffIcon","EyeIcon","DEFAULT_API_KEY_ENDPOINT","createDefaultHandler","endpoint","request","response","keys","ProtectedRoute","auth","useAuth","Outlet","apiKeyPlugin","options","RouterError"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAASC,EAAiB,UAAU;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,kCAAkC,KAAK,SAAQ,CAAE;AAAA,EAC/D;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACN;AAAA,EACF;AAAA,EACD;AAAA,IACE;AAAA,IACA,EAAE,GAAG,0EAA0E,KAAK,SAAU;AAAA,EAC/F;AAAA,EACD,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AAClE,CAAC;ACvBD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMC,IAAMD,EAAiB,OAAO;AAAA,EAClC,CAAC,QAAQ,EAAE,GAAG,gDAAgD,KAAK,SAAQ,CAAE;AAAA,EAC7E,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU;AAC1D,CAAC;ACZD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAME,IAAWF,EAAiB,YAAY;AAAA,EAC5C,CAAC,QAAQ,EAAE,GAAG,qDAAqD,KAAK,SAAQ,CAAE;AAAA,EAClF,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAQ,CAAE;AAC7C,CAAC;ACZD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMG,IAAQH,EAAiB,SAAS;AAAA,EACtC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,yCAAyC,KAAK,SAAQ,CAAE;AAAA,EACtE,CAAC,QAAQ,EAAE,GAAG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D,IAAUA,IAAUV,EAAqBC,CAAQ;AAEzD,SAAA;AAAA,IACL,eAAe,OAAO5C,MAAY;AAC5B,UAAA;AAGK,gBAFM,MAAMD,EAAQ,QAAQC,CAAO,GAE9B,IAAI,CAAC+B,OAAS;AAAA,UACxB,kBAAkB,CAACc,OACjBA,EAAQ,QAAQ,IAAI,iBAAiB,UAAUd,EAAI,GAAG,EAAE,GACjDc;AAAA,UAET,IAAId,EAAI;AAAA,UACR,OAAOA,EAAI,eAAeA,EAAI;AAAA,QAC9B,EAAA;AAAA,MAAA,QACI;AACN,eAAO;MACT;AAAA,IACF;AAAA,IACA,WAAW,MAEF;AAAA,MACL;AAAA,QACE,+BAAUiB,GAAe,EAAA;AAAA,QACzB,oCAAeM,GAAY,EAAA;AAAA,QAC3B,UAAU;AAAA,UACR;AAAA,YACE,MAAM;AAAA,YACN,SAAU1D,gBAAAA,EAAA,IAAA6B,GAAA,EAAgB,SAAA1B,EAAkB,CAAA;AAAA,UAC9C;AAAA,UACA;AAAA,YACE,MAAM;AAAA,YACN,SAAUH,gBAAAA,EAAA,IAAAE,GAAA,EAAa,SAAAC,EAAkB,CAAA;AAAA,UAC3C;AAAA,QACF;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AAEJ;","x_google_ignoreList":[0,1,2,3,4]}
@@ -0,0 +1,49 @@
1
+ import { j as s, N as x } from "./jsx-runtime-DLtUZ5Ve.js";
2
+ import { u as d } from "./DevPortalProvider-C-O1s7mm.js";
3
+ import { t as f, i as g } from "./util-Cgie7wjb.js";
4
+ const h = (t, e) => {
5
+ const r = Object.entries(t).flatMap(
6
+ ([n, m]) => {
7
+ const a = n.match(/pages\/(.*).mdx?$/), o = a == null ? void 0 : a.at(1);
8
+ if (!o) return [];
9
+ const i = o.split("/");
10
+ return {
11
+ path: i.at(-1) === "index" ? i.slice(0, -1).join("/") : o,
12
+ lazy: async () => {
13
+ const { MdxPage: u } = await import("./MdxPage-BZLuBOqR.js"), { default: c, ...l } = await m();
14
+ return {
15
+ element: /* @__PURE__ */ s.jsx(
16
+ u,
17
+ {
18
+ mdxComponent: c,
19
+ ...l,
20
+ defaultOptions: e
21
+ }
22
+ )
23
+ };
24
+ }
25
+ };
26
+ }
27
+ ), p = Array.from(
28
+ new Set(r.map((n) => n.path.split("/").at(0)))
29
+ ).map((n) => ({
30
+ path: `/${n}`,
31
+ element: /* @__PURE__ */ s.jsx(j, {})
32
+ }));
33
+ return [...r, ...p];
34
+ }, j = () => {
35
+ const t = d();
36
+ return t ? f(t, (e, r) => {
37
+ if (!("children" in e || !g(e)))
38
+ return /* @__PURE__ */ s.jsx(x, { to: r, replace: !0 });
39
+ }) : null;
40
+ }, N = ({
41
+ markdownFiles: t,
42
+ defaultOptions: e
43
+ }) => ({
44
+ getRoutes: () => h(t, e)
45
+ });
46
+ export {
47
+ N as markdownPlugin
48
+ };
49
+ //# sourceMappingURL=zudoku.plugin-markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zudoku.plugin-markdown.js","sources":["../src/lib/plugins/markdown/generateRoutes.tsx","../src/lib/plugins/markdown/index.tsx"],"sourcesContent":["import { Navigate, type RouteObject } from \"react-router-dom\";\nimport { useTopNavigationItem } from \"../../components/context/DevPortalProvider.js\";\nimport { isPathItem } from \"../../components/navigation/util.js\";\nimport { traverseNavigation } from \"../../util/traverseNavigation.js\";\n\nimport {\n MarkdownPluginDefaultOptions,\n MarkdownPluginOptions,\n} from \"./index.js\";\n\nexport const generateRoutes = (\n markdownFiles: MarkdownPluginOptions[\"markdownFiles\"],\n defaultOptions?: MarkdownPluginDefaultOptions,\n): RouteObject[] => {\n const routes = Object.entries(markdownFiles).flatMap(\n ([file, importPromise]) => {\n // @todo we can pass in the folder name and then filter the markdown files based on that path\n const match = file.match(/pages\\/(.*).mdx?$/);\n const path = match?.at(1);\n\n if (!path) return [];\n\n const pathSegments = path.split(\"/\");\n const isIndexFile = pathSegments.at(-1) === \"index\";\n const routePath = isIndexFile\n ? pathSegments.slice(0, -1).join(\"/\")\n : path;\n\n return {\n path: routePath,\n lazy: async () => {\n const { MdxPage } = await import(\"./MdxPage.js\");\n const { default: Component, ...props } = await importPromise();\n return {\n element: (\n <MdxPage\n mdxComponent={Component}\n {...props}\n defaultOptions={defaultOptions}\n />\n ),\n };\n },\n } satisfies RouteObject;\n },\n );\n\n const rootRoutes: RouteObject[] = Array.from(\n new Set(routes.map((route) => route.path.split(\"/\").at(0))),\n ).map((dir) => ({\n path: `/${dir}`,\n element: <Redirect />,\n }));\n\n return [...routes, ...rootRoutes];\n};\n\nconst Redirect = () => {\n const navItem = useTopNavigationItem();\n\n if (!navItem) return null;\n\n return traverseNavigation(navItem, (node, fullPath) => {\n if (\"children\" in node || !isPathItem(node)) return;\n return <Navigate to={fullPath} replace />;\n });\n};\n","import type { Toc } from \"@stefanprobst/rehype-extract-toc\";\nimport type { MDXProps } from \"mdx/types.js\";\nimport type { DevPortalPlugin } from \"../../core/plugins.js\";\nimport { generateRoutes } from \"./generateRoutes.js\";\n\nexport type MarkdownPluginOptions = {\n markdownFiles: Record<string, () => Promise<MDXImport>>;\n defaultOptions?: MarkdownPluginDefaultOptions;\n};\nexport type MarkdownPluginDefaultOptions = Pick<\n Frontmatter,\n \"toc\" | \"disablePager\"\n>;\n\nexport type Frontmatter = {\n title?: string;\n description?: string;\n category?: string;\n toc?: boolean;\n disablePager?: boolean;\n};\n\nexport type MDXImport = {\n tableOfContents: Toc;\n frontmatter: Frontmatter;\n default: (props: MDXProps) => JSX.Element;\n};\n\nexport const markdownPlugin = ({\n markdownFiles,\n defaultOptions,\n}: MarkdownPluginOptions): DevPortalPlugin => ({\n getRoutes: () => generateRoutes(markdownFiles, defaultOptions),\n});\n"],"names":["generateRoutes","markdownFiles","defaultOptions","routes","file","importPromise","match","path","pathSegments","MdxPage","Component","props","jsx","rootRoutes","route","dir","Redirect","navItem","useTopNavigationItem","traverseNavigation","node","fullPath","isPathItem","Navigate","markdownPlugin"],"mappings":";;;AAUa,MAAAA,IA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C,CAAA;AAAA,EAAA,CACxC,IALoB;AAMvB,GCtCaG,IAAiB,CAAC;AAAA,EAC7B,eAAAvB;AAAA,EACA,gBAAAC;AACF,OAA+C;AAAA,EAC7C,WAAW,MAAMF,EAAeC,GAAeC,CAAc;AAC/D;"}
@@ -0,0 +1,9 @@
1
+ import "./jsx-runtime-DLtUZ5Ve.js";
2
+ import { o as e } from "./index-PvQa9XLl.js";
3
+ import "./createWorkerClient-TWecYOlx.js";
4
+ import "./Markdown-CGZJUYcj.js";
5
+ import "./router-BkOLuJlq.js";
6
+ export {
7
+ e as openApiPlugin
8
+ };
9
+ //# sourceMappingURL=zudoku.plugin-openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zudoku.plugin-openapi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,11 @@
1
+ import { r as o } from "./router-BkOLuJlq.js";
2
+ const i = (r) => ({
3
+ getRoutes: () => r.redirects.map(({ from: e, to: t, replace: a }) => ({
4
+ path: e,
5
+ loader: () => o(t)
6
+ }))
7
+ });
8
+ export {
9
+ i as redirectPlugin
10
+ };
11
+ //# sourceMappingURL=zudoku.plugin-redirect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zudoku.plugin-redirect.js","sources":["../src/lib/plugins/redirect/index.tsx"],"sourcesContent":["import { redirect } from \"react-router-dom\";\nimport type { DevPortalPlugin } from \"../../core/plugins.js\";\n\nexport type Redirect = {\n from: string;\n to: string;\n replace?: boolean;\n};\n\nexport const redirectPlugin = (options: {\n redirects: Redirect[];\n}): DevPortalPlugin => {\n return {\n getRoutes: () =>\n options.redirects.map(({ from, to, replace }) => ({\n path: from,\n loader: () => redirect(to),\n })),\n };\n};\n"],"names":["redirectPlugin","options","from","to","replace","redirect"],"mappings":";AASa,MAAAA,IAAiB,CAACC,OAGtB;AAAA,EACL,WAAW,MACTA,EAAQ,UAAU,IAAI,CAAC,EAAE,MAAAC,GAAM,IAAAC,GAAI,SAAAC,SAAe;AAAA,IAChD,MAAMF;AAAA,IACN,QAAQ,MAAMG,EAASF,CAAE;AAAA,EAAA,EACzB;AAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.3.0-dev.4",
3
+ "version": "0.3.0-dev.40",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -18,6 +18,9 @@
18
18
  ".": {
19
19
  "import": "./dist/index.js"
20
20
  },
21
+ "./internal": {
22
+ "import": "./dist/internal.js"
23
+ },
21
24
  "./auth/clerk": {
22
25
  "import": "./lib/zudoku.auth-clerk.js"
23
26
  },
@@ -27,8 +30,17 @@
27
30
  "./auth/openid": {
28
31
  "import": "./lib/zudoku.auth-openid.js"
29
32
  },
30
- "./plugins": {
31
- "import": "./lib/zudoku.plugins.js"
33
+ "./plugins/api-keys": {
34
+ "import": "./lib/zudoku.plugin-api-keys.js"
35
+ },
36
+ "./plugins/markdown": {
37
+ "import": "./lib/zudoku.plugin-markdown.js"
38
+ },
39
+ "./plugins/openapi": {
40
+ "import": "./lib/zudoku.plugin-openapi.js"
41
+ },
42
+ "./plugins/redirect": {
43
+ "import": "./lib/zudoku.plugin-redirect.js"
32
44
  },
33
45
  "./openapi-worker": {
34
46
  "import": "./lib/zudoku.openapi-worker.js"
@@ -53,22 +65,27 @@
53
65
  }
54
66
  },
55
67
  "dependencies": {
68
+ "@envelop/core": "5.0.1",
56
69
  "@graphql-typed-document-node/core": "3.2.0",
70
+ "@hiogawa/vite-plugin-ssr-css": "0.0.0",
57
71
  "@lekoarts/rehype-meta-as-attributes": "3.0.1",
58
72
  "@mdx-js/react": "3.0.1",
59
73
  "@mdx-js/rollup": "3.0.1",
60
74
  "@monaco-editor/react": "^4.6.0",
61
75
  "@pothos/core": "3.41.0",
76
+ "@radix-ui/react-collapsible": "1.1.0",
62
77
  "@radix-ui/react-select": "2.1.1",
63
78
  "@radix-ui/react-visually-hidden": "1.1.0",
64
79
  "@sentry/node": "8.11.0",
65
80
  "@stefanprobst/rehype-extract-toc": "2.2.0",
66
81
  "@tailwindcss/typography": "0.5.13",
82
+ "@tanstack/react-query": "5.50.1",
67
83
  "@vitejs/plugin-react": "4.3.1",
84
+ "@zudoku/react-helmet-async": "2.0.4",
68
85
  "autoprefixer": "10.4.19",
69
86
  "chokidar": "^3.6.0",
87
+ "class-variance-authority": "0.7.0",
70
88
  "dotenv": "16.4.5",
71
- "esbuild": "0.23.0",
72
89
  "express": "4.19.2",
73
90
  "graphql": "16.9.0",
74
91
  "graphql-type-json": "0.3.2",
@@ -85,7 +102,7 @@
85
102
  "prismjs": "1.29.0",
86
103
  "react": "18.3.1",
87
104
  "react-dom": "18.3.1",
88
- "react-helmet-async": "2.0.5",
105
+ "react-error-boundary": "^4.0.13",
89
106
  "react-hook-form": "^7.52.1",
90
107
  "react-markdown": "9.0.1",
91
108
  "react-router-dom": "6.24.1",
@@ -96,47 +113,46 @@
96
113
  "remark-frontmatter": "5.0.0",
97
114
  "remark-gfm": "4.0.0",
98
115
  "remark-mdx-frontmatter": "5.0.0",
116
+ "rollup": "^4.18.1",
99
117
  "semver": "7.6.2",
100
118
  "slugify": "1.6.6",
101
119
  "strip-ansi": "7.1.0",
120
+ "tailwind-merge": "2.3.0",
102
121
  "tailwindcss": "3.4.4",
122
+ "tiny-invariant": "1.3.3",
103
123
  "ulidx": "^2.3.0",
104
124
  "unist-util-visit": "5.0.0",
105
125
  "urql": "4.1.0",
106
126
  "vite": "5.3.3",
107
127
  "yaml": "2.4.1",
108
- "yargs": "17.7.2"
128
+ "yargs": "17.7.2",
129
+ "zustand": "4.5.4"
109
130
  },
110
131
  "devDependencies": {
111
- "@radix-ui/react-collapsible": "1.1.0",
112
132
  "@radix-ui/react-dialog": "1.1.1",
113
133
  "@radix-ui/react-slot": "1.1.0",
114
134
  "@radix-ui/react-tabs": "1.1.0",
115
- "@tanstack/react-query": "5.50.1",
116
135
  "@types/express": "^4.17.21",
117
136
  "@types/har-format": "^1.2.15",
118
137
  "@types/json-schema": "7.0.15",
119
- "@types/loglevel": "^1.6.3",
120
138
  "@types/mdx": "2.0.13",
121
139
  "@types/node": "20.12.10",
122
140
  "@types/object-hash": "^3.0.6",
123
141
  "@types/react": "18.3.3",
124
142
  "@types/react-dom": "18.3.0",
143
+ "@types/rollup": "^0.54.0",
125
144
  "@types/semver": "^7.5.8",
126
145
  "@types/yargs": "^17.0.32",
127
146
  "@zudoku/httpsnippet": "10.0.9",
128
- "class-variance-authority": "0.7.0",
129
147
  "clsx": "2.1.1",
130
148
  "lucide-react": "0.378.0",
131
149
  "oauth4webapi": "2.11.1",
132
150
  "prism-react-renderer": "2.3.1",
133
151
  "prismjs": "1.29.0",
134
- "react-helmet-async": "2.0.5",
135
152
  "react-markdown": "9.0.1",
136
153
  "react-router-dom": "6.24.1",
137
- "tailwind-merge": "2.3.0",
138
- "typescript": "5.5.3",
139
- "zustand": "4.5.4"
154
+ "rollup-plugin-visualizer": "^5.12.0",
155
+ "typescript": "5.5.3"
140
156
  },
141
157
  "peerDependencies": {
142
158
  "react": ">18.0.0",
@@ -147,7 +163,9 @@
147
163
  },
148
164
  "scripts": {
149
165
  "build": "tsc --project tsconfig.json",
150
- "build:vite": "vite build && pnpm run hack:fix-worker-paths",
166
+ "build:vite": "vite build && pnpm run hack:fix-worker-paths lib",
167
+ "build:standalone:vite": "vite build --config vite.standalone.config.ts",
168
+ "build:standalone:html": "cp ./src/app/standalone.html ./standalone/standalone.html && cp ./src/app/demo.html ./standalone/demo.html && cp ./src/app/demo-cdn.html ./standalone/index.html",
151
169
  "hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
152
170
  "clean": "tsc --build --clean",
153
171
  "test": "node --test --enable-source-maps"
package/src/app/App.tsx CHANGED
@@ -1,40 +0,0 @@
1
- import "./main.css";
2
-
3
- // Virtual config
4
- import config from "virtual:zudoku-config";
5
-
6
- // Virtual Plugins
7
- import { configuredApiKeysPlugin } from "virtual:zudoku-api-keys-plugin";
8
- import { configuredApiPlugins } from "virtual:zudoku-api-plugins";
9
- import { configuredAuthProvider } from "virtual:zudoku-auth";
10
- import { configuredDocsPlugins } from "virtual:zudoku-docs-plugins";
11
- import { configuredRedirectPlugin } from "virtual:zudoku-redirect-plugin";
12
-
13
- // Base React Component
14
- import { DevPortal } from "zudoku/components";
15
-
16
- // IMPORTANT: This component must not contain tailwind classes
17
- // This directory is not processed by the tailwind plugin
18
-
19
- export default function App() {
20
- return (
21
- <DevPortal
22
- meta={{
23
- headerTitle: config.ui?.headerTitle ?? "Developer Portal",
24
- pageTitle: config.ui?.pageTitle ?? "%s | Dev Portal",
25
- logo: config.ui?.logo ?? "https://cdn.zuplo.com/www/favicon.png",
26
- favicon:
27
- config.ui?.metadata?.favicon ??
28
- "https://cdn.zuplo.com/www/favicon.png",
29
- }}
30
- navigation={config.navigation ?? []}
31
- authentication={configuredAuthProvider}
32
- plugins={[
33
- ...configuredDocsPlugins,
34
- ...configuredApiPlugins,
35
- configuredApiKeysPlugin,
36
- configuredRedirectPlugin,
37
- ]}
38
- />
39
- );
40
- }
@@ -0,0 +1,26 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link
6
+ rel="icon"
7
+ type="image/svg+xml"
8
+ href="https://cdn.zudoku.dev/logos/icon.svg"
9
+ />
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
+ <title>Zudoku Demo</title>
12
+ <script
13
+ type="module"
14
+ crossorigin
15
+ src="https://cdn.zudoku.dev/latest/demo.js"
16
+ ></script>
17
+ <link
18
+ rel="stylesheet"
19
+ crossorigin
20
+ href="https://cdn.zudoku.dev/latest/style.css"
21
+ />
22
+ </head>
23
+ <body>
24
+ <div id="root"></div>
25
+ </body>
26
+ </html>