zudoku 0.1.1-dev.5 → 0.1.1-dev.50

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 (582) hide show
  1. package/dist/app/App.js +21 -42
  2. package/dist/app/App.js.map +1 -1
  3. package/dist/app/main.js +11 -15
  4. package/dist/app/main.js.map +1 -1
  5. package/dist/cli/build/handler.js +3 -1
  6. package/dist/cli/build/handler.js.map +1 -1
  7. package/dist/cli/cmds/dev.js +0 -1
  8. package/dist/cli/cmds/dev.js.map +1 -1
  9. package/dist/cli/common/analytics/lib.js +1 -1
  10. package/dist/cli/common/analytics/lib.js.map +1 -1
  11. package/dist/cli/common/logger.d.ts +1 -2
  12. package/dist/cli/common/logger.js +3 -3
  13. package/dist/cli/common/logger.js.map +1 -1
  14. package/dist/cli/common/outdated.js +4 -4
  15. package/dist/cli/common/outdated.js.map +1 -1
  16. package/dist/cli/common/output.js +4 -4
  17. package/dist/cli/common/output.js.map +1 -1
  18. package/dist/cli/common/utils/box.js +2 -2
  19. package/dist/cli/common/utils/box.js.map +1 -1
  20. package/dist/cli/dev/handler.d.ts +1 -1
  21. package/dist/cli/dev/handler.js +14 -3
  22. package/dist/cli/dev/handler.js.map +1 -1
  23. package/dist/config/config.d.ts +20 -7
  24. package/dist/index.d.ts +2 -6
  25. package/dist/index.js +1 -5
  26. package/dist/index.js.map +1 -1
  27. package/dist/lib/authentication/authentication.js.map +1 -0
  28. package/dist/{app → lib}/authentication/clerk.d.ts +2 -2
  29. package/dist/{app → lib}/authentication/clerk.js +8 -5
  30. package/dist/lib/authentication/clerk.js.map +1 -0
  31. package/dist/{app → lib}/authentication/openid.js +3 -2
  32. package/dist/lib/authentication/openid.js.map +1 -0
  33. package/dist/{app → lib}/components/AnchorLink.js.map +1 -1
  34. package/dist/{app → lib}/components/CategoryHeading.js.map +1 -1
  35. package/dist/{app → lib/components}/DevPortal.d.ts +7 -7
  36. package/dist/lib/components/DevPortal.js +28 -0
  37. package/dist/lib/components/DevPortal.js.map +1 -0
  38. package/dist/{app → lib}/components/Dialog.d.ts +2 -2
  39. package/dist/{app → lib}/components/Dialog.js +3 -3
  40. package/dist/lib/components/Dialog.js.map +1 -0
  41. package/dist/lib/components/Header.d.ts +1 -0
  42. package/dist/lib/components/Header.js +15 -0
  43. package/dist/{app → lib}/components/Header.js.map +1 -1
  44. package/dist/{app → lib/components}/Heading.js +2 -2
  45. package/dist/lib/components/Heading.js.map +1 -0
  46. package/dist/{app → lib}/components/Input.js.map +1 -1
  47. package/dist/{app → lib}/components/Layout.js +3 -3
  48. package/dist/lib/components/Layout.js.map +1 -0
  49. package/dist/lib/components/Link.d.ts +1 -0
  50. package/dist/lib/components/Link.js +2 -0
  51. package/dist/lib/components/Link.js.map +1 -0
  52. package/dist/{app → lib}/components/Markdown.js.map +1 -1
  53. package/dist/lib/components/Router.d.ts +4 -0
  54. package/dist/lib/components/Router.js +20 -0
  55. package/dist/lib/components/Router.js.map +1 -0
  56. package/dist/lib/components/Select.d.ts +13 -0
  57. package/dist/lib/components/Select.js +27 -0
  58. package/dist/lib/components/Select.js.map +1 -0
  59. package/dist/lib/components/Spinner.d.ts +3 -0
  60. package/dist/lib/components/Spinner.js +4 -0
  61. package/dist/lib/components/Spinner.js.map +1 -0
  62. package/dist/{app → lib}/components/SyntaxHighlight.d.ts +2 -1
  63. package/dist/{app → lib}/components/SyntaxHighlight.js +4 -1
  64. package/dist/lib/components/SyntaxHighlight.js.map +1 -0
  65. package/dist/{app → lib}/components/TopNavigation.js.map +1 -1
  66. package/dist/{app → lib}/components/context/ComponentsContext.d.ts +1 -1
  67. package/dist/{app → lib}/components/context/ComponentsContext.js.map +1 -1
  68. package/dist/{app → lib}/components/context/DevPortalProvider.js +1 -1
  69. package/dist/lib/components/context/DevPortalProvider.js.map +1 -0
  70. package/dist/lib/components/context/PluginSystem.js.map +1 -0
  71. package/dist/{app → lib}/components/context/ThemeContext.js +1 -1
  72. package/dist/{app → lib}/components/context/ThemeContext.js.map +1 -1
  73. package/dist/{app → lib}/components/context/ViewportAnchorContext.js.map +1 -1
  74. package/dist/lib/components/index.d.ts +3 -0
  75. package/dist/lib/components/index.js +4 -0
  76. package/dist/lib/components/index.js.map +1 -0
  77. package/dist/{app → lib}/components/navigation/SideNavigation.js +1 -1
  78. package/dist/{app → lib}/components/navigation/SideNavigation.js.map +1 -1
  79. package/dist/{app → lib}/components/navigation/SideNavigationCategory.js +1 -1
  80. package/dist/{app → lib}/components/navigation/SideNavigationCategory.js.map +1 -1
  81. package/dist/{app → lib}/components/navigation/SideNavigationItem.d.ts +2 -1
  82. package/dist/{app → lib}/components/navigation/SideNavigationItem.js +12 -6
  83. package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -0
  84. package/dist/{app → lib}/components/navigation/SideNavigationWrapper.d.ts +3 -0
  85. package/dist/lib/components/navigation/SideNavigationWrapper.js +7 -0
  86. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +1 -0
  87. package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js.map +1 -1
  88. package/dist/{app → lib}/components/navigation/util.js.map +1 -1
  89. package/dist/{app → lib}/core/DevPortalContext.d.ts +5 -6
  90. package/dist/{app → lib}/core/DevPortalContext.js +2 -2
  91. package/dist/lib/core/DevPortalContext.js.map +1 -0
  92. package/dist/{app → lib}/core/helmet.js.map +1 -1
  93. package/dist/lib/core/icons.js.map +1 -0
  94. package/dist/{app → lib}/core/plugins.d.ts +1 -1
  95. package/dist/{app → lib}/core/plugins.js +1 -1
  96. package/dist/{app → lib}/core/plugins.js.map +1 -1
  97. package/dist/lib/core/router.js.map +1 -0
  98. package/dist/lib/core/types/combine.js.map +1 -0
  99. package/dist/{app → lib}/oas/graphql/index.js +2 -2
  100. package/dist/lib/oas/graphql/index.js.map +1 -0
  101. package/dist/{app → lib}/oas/parser/dereference/index.js.map +1 -1
  102. package/dist/{app → lib}/oas/parser/dereference/resolveRef.js.map +1 -1
  103. package/dist/{app → lib}/oas/parser/index.js.map +1 -1
  104. package/dist/{app → lib}/oas/parser/upgrade/index.js.map +1 -1
  105. package/dist/lib/plugins/api-key/CreateApiKey.d.ts +5 -0
  106. package/dist/lib/plugins/api-key/CreateApiKey.js +37 -0
  107. package/dist/lib/plugins/api-key/CreateApiKey.js.map +1 -0
  108. package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +5 -0
  109. package/dist/lib/plugins/api-key/SettingsApiKeys.js +38 -0
  110. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +1 -0
  111. package/dist/lib/plugins/api-key/index.d.ts +30 -0
  112. package/dist/lib/plugins/api-key/index.js +76 -0
  113. package/dist/lib/plugins/api-key/index.js.map +1 -0
  114. package/dist/lib/plugins/index.d.ts +4 -0
  115. package/dist/lib/plugins/index.js +5 -0
  116. package/dist/lib/plugins/index.js.map +1 -0
  117. package/dist/lib/plugins/markdown/MdxPage.d.ts +5 -0
  118. package/dist/lib/plugins/markdown/MdxPage.js +60 -0
  119. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -0
  120. package/dist/{app → lib}/plugins/markdown/Toc.js.map +1 -1
  121. package/dist/{app → lib}/plugins/markdown/generateRoutes.js +1 -6
  122. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -0
  123. package/dist/{app → lib}/plugins/markdown/index.js.map +1 -1
  124. package/dist/{app → lib}/plugins/openapi/ColorizedParam.d.ts +1 -2
  125. package/dist/{app → lib}/plugins/openapi/ColorizedParam.js +2 -2
  126. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -0
  127. package/dist/lib/plugins/openapi/MakeRequest.js +38 -0
  128. package/dist/lib/plugins/openapi/MakeRequest.js.map +1 -0
  129. package/dist/{app → lib}/plugins/openapi/MethodBadge.js.map +1 -1
  130. package/dist/{app → lib}/plugins/openapi/OperationList.js +12 -3
  131. package/dist/lib/plugins/openapi/OperationList.js.map +1 -0
  132. package/dist/lib/plugins/openapi/OperationListItem.js +18 -0
  133. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -0
  134. package/dist/{app → lib}/plugins/openapi/ParameterList.js +1 -1
  135. package/dist/{app → lib}/plugins/openapi/ParameterList.js.map +1 -1
  136. package/dist/lib/plugins/openapi/ParameterListItem.js +13 -0
  137. package/dist/{app → lib}/plugins/openapi/ParameterListItem.js.map +1 -1
  138. package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js +1 -1
  139. package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  140. package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js +3 -3
  141. package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  142. package/dist/lib/plugins/openapi/SchemaListView.d.ts +7 -0
  143. package/dist/lib/plugins/openapi/SchemaListView.js +43 -0
  144. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -0
  145. package/dist/{app → lib}/plugins/openapi/Select.js.map +1 -1
  146. package/dist/{app → lib}/plugins/openapi/Sidecar.js +15 -15
  147. package/dist/{app → lib}/plugins/openapi/Sidecar.js.map +1 -1
  148. package/dist/{app → lib}/plugins/openapi/SidecarBox.js.map +1 -1
  149. package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
  150. package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  151. package/dist/{app → lib}/plugins/openapi/graphql/gql.d.ts +5 -5
  152. package/dist/{app → lib}/plugins/openapi/graphql/gql.js +2 -3
  153. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -0
  154. package/dist/{app → lib}/plugins/openapi/graphql/graphql.d.ts +9 -0
  155. package/dist/{app → lib}/plugins/openapi/graphql/graphql.js +50 -0
  156. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -0
  157. package/dist/lib/plugins/openapi/graphql/index.js.map +1 -0
  158. package/dist/{app → lib}/plugins/openapi/index.js +3 -1
  159. package/dist/lib/plugins/openapi/index.js.map +1 -0
  160. package/dist/lib/plugins/openapi/playground/Editor.d.ts +1 -0
  161. package/dist/lib/plugins/openapi/playground/Editor.js +5 -0
  162. package/dist/lib/plugins/openapi/playground/Editor.js.map +1 -0
  163. package/dist/lib/plugins/openapi/playground/Headers.d.ts +7 -0
  164. package/dist/lib/plugins/openapi/playground/Headers.js +15 -0
  165. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -0
  166. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +4 -0
  167. package/dist/lib/plugins/openapi/playground/InlineInput.js +3 -0
  168. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -0
  169. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +6 -0
  170. package/dist/lib/plugins/openapi/playground/PathParams.js +21 -0
  171. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -0
  172. package/dist/lib/plugins/openapi/playground/Playground.d.ts +30 -0
  173. package/dist/lib/plugins/openapi/playground/Playground.js +99 -0
  174. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -0
  175. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +5 -0
  176. package/dist/lib/plugins/openapi/playground/QueryParams.js +34 -0
  177. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -0
  178. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +4 -0
  179. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +22 -0
  180. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +1 -0
  181. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +2 -0
  182. package/dist/lib/plugins/openapi/playground/createUrl.js +15 -0
  183. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -0
  184. package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
  185. package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.js +17 -9
  186. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -0
  187. package/dist/{app → lib}/plugins/openapi/util/urql.js.map +1 -1
  188. package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.js +2 -1
  189. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +1 -0
  190. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +1 -0
  191. package/dist/lib/plugins/openapi/worker/shared-worker.js +6 -0
  192. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +1 -0
  193. package/dist/{app → lib}/plugins/openapi/worker/worker.js.map +1 -1
  194. package/dist/lib/plugins/openapi-worker.d.ts +1 -0
  195. package/dist/lib/plugins/openapi-worker.js +2 -0
  196. package/dist/lib/plugins/openapi-worker.js.map +1 -0
  197. package/dist/{app → lib}/plugins/redirect/index.d.ts +1 -2
  198. package/dist/{app → lib}/plugins/redirect/index.js.map +1 -1
  199. package/dist/lib/ui/Button.d.ts +7 -0
  200. package/dist/lib/ui/Button.js +11 -0
  201. package/dist/lib/ui/Button.js.map +1 -0
  202. package/dist/{app → lib}/ui/Callout.js.map +1 -1
  203. package/dist/{app → lib}/ui/Card.js.map +1 -1
  204. package/dist/{app → lib}/ui/Note.js.map +1 -1
  205. package/dist/{app → lib}/ui/Tabs.d.ts +2 -2
  206. package/dist/{app → lib}/ui/Tabs.js +2 -2
  207. package/dist/{app → lib}/ui/Tabs.js.map +1 -1
  208. package/dist/lib/ui/button-variants.d.ts +4 -0
  209. package/dist/{app/ui/Button.js → lib/ui/button-variants.js} +2 -12
  210. package/dist/lib/ui/button-variants.js.map +1 -0
  211. package/dist/{app → lib}/util/MdxComponents.js +9 -9
  212. package/dist/lib/util/MdxComponents.js.map +1 -0
  213. package/dist/{app → lib}/util/cn.js.map +1 -1
  214. package/dist/lib/util/createVariantComponent.d.ts +9 -0
  215. package/dist/lib/util/createVariantComponent.js +17 -0
  216. package/dist/lib/util/createVariantComponent.js.map +1 -0
  217. package/dist/{app → lib}/util/createWaitForNotify.js.map +1 -1
  218. package/dist/{app → lib}/util/groupBy.js.map +1 -1
  219. package/dist/{app → lib}/util/joinPath.js.map +1 -1
  220. package/dist/{app → lib}/util/pastellize.js.map +1 -1
  221. package/dist/lib/util/slugify.js.map +1 -0
  222. package/dist/{app → lib}/util/traverseNavigation.js.map +1 -1
  223. package/dist/{app → lib}/util/useScrollToAnchor.js.map +1 -1
  224. package/dist/{app → lib}/util/useScrollToTop.js.map +1 -1
  225. package/dist/ts.d.ts +6 -0
  226. package/dist/ts.js +61 -0
  227. package/dist/ts.js.map +1 -0
  228. package/dist/vite/build.js +2 -8
  229. package/dist/vite/build.js.map +1 -1
  230. package/dist/vite/common.d.ts +1 -0
  231. package/dist/vite/common.js +5 -0
  232. package/dist/vite/common.js.map +1 -0
  233. package/dist/vite/config.d.ts +10 -3
  234. package/dist/vite/config.js +107 -58
  235. package/dist/vite/config.js.map +1 -1
  236. package/dist/vite/config.test.js +4 -3
  237. package/dist/vite/config.test.js.map +1 -1
  238. package/dist/vite/dev-server.d.ts +2 -0
  239. package/dist/vite/dev-server.js +30 -9
  240. package/dist/vite/dev-server.js.map +1 -1
  241. package/dist/vite/html.d.ts +1 -1
  242. package/dist/vite/html.js +2 -3
  243. package/dist/vite/html.js.map +1 -1
  244. package/dist/vite/plugin-api-keys.d.ts +4 -0
  245. package/dist/vite/plugin-api-keys.js +33 -0
  246. package/dist/vite/plugin-api-keys.js.map +1 -0
  247. package/dist/vite/plugin-api.d.ts +4 -0
  248. package/dist/vite/plugin-api.js +49 -0
  249. package/dist/vite/plugin-api.js.map +1 -0
  250. package/dist/vite/plugin-auth.d.ts +4 -0
  251. package/dist/vite/plugin-auth.js +30 -0
  252. package/dist/vite/plugin-auth.js.map +1 -0
  253. package/dist/vite/plugin-component.d.ts +4 -0
  254. package/dist/vite/plugin-component.js +16 -0
  255. package/dist/vite/plugin-component.js.map +1 -0
  256. package/dist/vite/plugin-config.d.ts +7 -0
  257. package/dist/vite/plugin-config.js +25 -0
  258. package/dist/vite/plugin-config.js.map +1 -0
  259. package/dist/vite/plugin-docs.d.ts +4 -0
  260. package/dist/vite/plugin-docs.js +45 -0
  261. package/dist/vite/plugin-docs.js.map +1 -0
  262. package/dist/vite/plugin-docs.test.js +30 -0
  263. package/dist/vite/plugin-docs.test.js.map +1 -0
  264. package/dist/vite/plugin-html.d.ts +3 -0
  265. package/dist/vite/plugin-html.js +47 -0
  266. package/dist/vite/plugin-html.js.map +1 -0
  267. package/dist/vite/plugin-mdx.d.ts +8 -0
  268. package/dist/vite/plugin-mdx.js +63 -0
  269. package/dist/vite/plugin-mdx.js.map +1 -0
  270. package/dist/vite/plugin-metadata.d.ts +6 -0
  271. package/dist/vite/plugin-metadata.js +24 -0
  272. package/dist/vite/plugin-metadata.js.map +1 -0
  273. package/dist/vite/plugin-openapi-worker.d.ts +4 -0
  274. package/dist/vite/plugin-openapi-worker.js +28 -0
  275. package/dist/vite/plugin-openapi-worker.js.map +1 -0
  276. package/dist/vite/plugin-redirect.d.ts +4 -0
  277. package/dist/vite/plugin-redirect.js +32 -0
  278. package/dist/vite/plugin-redirect.js.map +1 -0
  279. package/dist/vite/plugin.d.ts +2 -6
  280. package/dist/vite/plugin.js +22 -104
  281. package/dist/vite/plugin.js.map +1 -1
  282. package/lib/Spinner-9_-7nYgL.js +11855 -0
  283. package/lib/assets/index-BPdJm2ty.js +4764 -0
  284. package/lib/assets/worker-BCcpCNJ7.js +14473 -0
  285. package/lib/clerk-Wslx_mPo.js +19685 -0
  286. package/lib/prism-bash.min-DadFsM4Z.js +6 -0
  287. package/lib/prism-java.min-d5iT_mOd.js +6 -0
  288. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  289. package/lib/prism-markup-templating-DZrrEs0A.js +61 -0
  290. package/lib/prism-php.min-o7FpoMP_.js +10 -0
  291. package/lib/prism-ruby.min-C7LwcKyz.js +9 -0
  292. package/lib/urql-DMlBWUKL.js +1591 -0
  293. package/lib/zudoku.auth-clerk.js +32 -0
  294. package/lib/zudoku.components.js +1197 -0
  295. package/lib/zudoku.openapi-worker.js +225 -0
  296. package/lib/zudoku.plugins.js +20021 -0
  297. package/package.json +72 -50
  298. package/src/app/App.tsx +23 -46
  299. package/src/app/main.css +1 -0
  300. package/src/app/main.tsx +13 -17
  301. package/src/{app → lib}/authentication/clerk.ts +10 -9
  302. package/src/{app → lib}/authentication/openid.ts +4 -2
  303. package/src/{app → lib/components}/DevPortal.tsx +22 -41
  304. package/src/{app → lib}/components/Dialog.tsx +37 -37
  305. package/src/{app → lib}/components/Header.tsx +4 -4
  306. package/src/{app → lib/components}/Heading.tsx +2 -2
  307. package/src/{app → lib}/components/Layout.tsx +17 -7
  308. package/src/lib/components/Link.tsx +1 -0
  309. package/src/lib/components/Router.tsx +28 -0
  310. package/src/lib/components/Select.tsx +157 -0
  311. package/src/lib/components/Spinner.tsx +5 -0
  312. package/src/{app → lib}/components/SyntaxHighlight.tsx +10 -3
  313. package/src/{app → lib}/components/context/DevPortalProvider.ts +1 -1
  314. package/src/lib/components/index.ts +3 -0
  315. package/src/{app → lib}/components/navigation/SideNavigation.tsx +4 -1
  316. package/src/{app → lib}/components/navigation/SideNavigationCategory.tsx +3 -1
  317. package/src/{app → lib}/components/navigation/SideNavigationItem.tsx +16 -7
  318. package/src/lib/components/navigation/SideNavigationWrapper.tsx +24 -0
  319. package/src/{app → lib}/core/DevPortalContext.ts +10 -9
  320. package/src/{app → lib}/core/plugins.ts +1 -1
  321. package/src/{app → lib}/oas/graphql/index.ts +2 -2
  322. package/src/lib/plugins/api-key/CreateApiKey.tsx +100 -0
  323. package/src/lib/plugins/api-key/SettingsApiKeys.tsx +125 -0
  324. package/src/lib/plugins/api-key/index.tsx +126 -0
  325. package/src/lib/plugins/index.ts +4 -0
  326. package/src/{app → lib}/plugins/markdown/MdxPage.tsx +32 -10
  327. package/src/{app → lib}/plugins/markdown/generateRoutes.tsx +1 -16
  328. package/src/{app → lib}/plugins/openapi/ColorizedParam.tsx +1 -3
  329. package/src/lib/plugins/openapi/MakeRequest.tsx +58 -0
  330. package/src/{app → lib}/plugins/openapi/OperationList.tsx +14 -4
  331. package/src/{app → lib}/plugins/openapi/OperationListItem.tsx +36 -4
  332. package/src/{app → lib}/plugins/openapi/ParameterList.tsx +1 -1
  333. package/src/{app → lib}/plugins/openapi/ParameterListItem.tsx +5 -2
  334. package/src/{app → lib}/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
  335. package/src/{app → lib}/plugins/openapi/ResponsesSidecarBox.tsx +2 -3
  336. package/src/lib/plugins/openapi/SchemaListView.tsx +228 -0
  337. package/src/{app → lib}/plugins/openapi/Sidecar.tsx +23 -23
  338. package/src/{app → lib}/plugins/openapi/graphql/gql.ts +7 -7
  339. package/src/{app → lib}/plugins/openapi/graphql/graphql.ts +59 -0
  340. package/src/{app → lib}/plugins/openapi/index.tsx +8 -2
  341. package/src/lib/plugins/openapi/playground/Editor.tsx +4 -0
  342. package/src/lib/plugins/openapi/playground/Headers.tsx +60 -0
  343. package/src/lib/plugins/openapi/playground/InlineInput.tsx +6 -0
  344. package/src/lib/plugins/openapi/playground/PathParams.tsx +63 -0
  345. package/src/lib/plugins/openapi/playground/Playground.tsx +367 -0
  346. package/src/lib/plugins/openapi/playground/QueryParams.tsx +109 -0
  347. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +32 -0
  348. package/src/lib/plugins/openapi/playground/createUrl.ts +22 -0
  349. package/src/{app → lib}/plugins/openapi/util/generateSchemaExample.ts +22 -9
  350. package/src/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.ts +2 -1
  351. package/src/lib/plugins/openapi/worker/shared-worker.ts +5 -0
  352. package/src/lib/plugins/openapi-worker.ts +1 -0
  353. package/src/{app → lib}/plugins/redirect/index.tsx +1 -1
  354. package/src/lib/ui/Button.tsx +25 -0
  355. package/src/{app → lib}/ui/Tabs.tsx +2 -2
  356. package/src/{app/ui/Button.tsx → lib/ui/button-variants.ts} +4 -29
  357. package/src/{app → lib}/util/MdxComponents.tsx +33 -8
  358. package/src/{app → lib}/util/createVariantComponent.tsx +12 -7
  359. package/dist/app/DevPortal.js +0 -41
  360. package/dist/app/DevPortal.js.map +0 -1
  361. package/dist/app/Heading.js.map +0 -1
  362. package/dist/app/authentication/authentication.js.map +0 -1
  363. package/dist/app/authentication/clerk.js.map +0 -1
  364. package/dist/app/authentication/openid.js.map +0 -1
  365. package/dist/app/components/Dialog.js.map +0 -1
  366. package/dist/app/components/DynamicIcon.d.ts +0 -6
  367. package/dist/app/components/DynamicIcon.js +0 -6
  368. package/dist/app/components/DynamicIcon.js.map +0 -1
  369. package/dist/app/components/Header.d.ts +0 -1
  370. package/dist/app/components/Header.js +0 -15
  371. package/dist/app/components/Layout.js.map +0 -1
  372. package/dist/app/components/SyntaxHighlight.js.map +0 -1
  373. package/dist/app/components/context/DevPortalProvider.js.map +0 -1
  374. package/dist/app/components/context/PluginSystem.js.map +0 -1
  375. package/dist/app/components/navigation/SideNavigationItem.js.map +0 -1
  376. package/dist/app/components/navigation/SideNavigationWrapper.js +0 -6
  377. package/dist/app/components/navigation/SideNavigationWrapper.js.map +0 -1
  378. package/dist/app/config.d.ts +0 -3
  379. package/dist/app/config.js +0 -9
  380. package/dist/app/config.js.map +0 -1
  381. package/dist/app/core/DevPortalContext.js.map +0 -1
  382. package/dist/app/core/icons.js.map +0 -1
  383. package/dist/app/core/router.js.map +0 -1
  384. package/dist/app/core/types/combine.js.map +0 -1
  385. package/dist/app/markdowns.d.ts +0 -3
  386. package/dist/app/markdowns.js +0 -5
  387. package/dist/app/markdowns.js.map +0 -1
  388. package/dist/app/oas/graphql/index.js.map +0 -1
  389. package/dist/app/oas/graphql/server.js +0 -8
  390. package/dist/app/oas/graphql/server.js.map +0 -1
  391. package/dist/app/plugins/api-key/SettingsApiKeys.d.ts +0 -4
  392. package/dist/app/plugins/api-key/SettingsApiKeys.js +0 -7
  393. package/dist/app/plugins/api-key/SettingsApiKeys.js.map +0 -1
  394. package/dist/app/plugins/api-key/index.d.ts +0 -32
  395. package/dist/app/plugins/api-key/index.js +0 -55
  396. package/dist/app/plugins/api-key/index.js.map +0 -1
  397. package/dist/app/plugins/markdown/MdxPage.d.ts +0 -3
  398. package/dist/app/plugins/markdown/MdxPage.js +0 -55
  399. package/dist/app/plugins/markdown/MdxPage.js.map +0 -1
  400. package/dist/app/plugins/markdown/generateRoutes.js.map +0 -1
  401. package/dist/app/plugins/openapi/ColorizedParam.js.map +0 -1
  402. package/dist/app/plugins/openapi/MakeRequest.js +0 -23
  403. package/dist/app/plugins/openapi/MakeRequest.js.map +0 -1
  404. package/dist/app/plugins/openapi/OperationList.js.map +0 -1
  405. package/dist/app/plugins/openapi/OperationListItem.js +0 -15
  406. package/dist/app/plugins/openapi/OperationListItem.js.map +0 -1
  407. package/dist/app/plugins/openapi/ParameterListItem.js +0 -13
  408. package/dist/app/plugins/openapi/graphql/gql.js.map +0 -1
  409. package/dist/app/plugins/openapi/graphql/graphql.js.map +0 -1
  410. package/dist/app/plugins/openapi/graphql/index.js.map +0 -1
  411. package/dist/app/plugins/openapi/index.js.map +0 -1
  412. package/dist/app/plugins/openapi/playground/Playground.d.ts +0 -8
  413. package/dist/app/plugins/openapi/playground/Playground.js +0 -98
  414. package/dist/app/plugins/openapi/playground/Playground.js.map +0 -1
  415. package/dist/app/plugins/openapi/util/generateSchemaExample.js.map +0 -1
  416. package/dist/app/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  417. package/dist/app/ui/Button.d.ts +0 -11
  418. package/dist/app/ui/Button.js.map +0 -1
  419. package/dist/app/util/MdxComponents.js.map +0 -1
  420. package/dist/app/util/createVariantComponent.d.ts +0 -15
  421. package/dist/app/util/createVariantComponent.js +0 -12
  422. package/dist/app/util/createVariantComponent.js.map +0 -1
  423. package/dist/app/util/slugify.js.map +0 -1
  424. package/dist/auth.d.ts +0 -2
  425. package/dist/auth.js +0 -3
  426. package/dist/auth.js.map +0 -1
  427. package/dist/plugins.d.ts +0 -4
  428. package/dist/plugins.js +0 -6
  429. package/dist/plugins.js.map +0 -1
  430. package/src/app/components/DynamicIcon.tsx +0 -60
  431. package/src/app/components/navigation/SideNavigationWrapper.tsx +0 -15
  432. package/src/app/config.ts +0 -20
  433. package/src/app/markdowns.ts +0 -7
  434. package/src/app/oas/graphql/server.ts +0 -10
  435. package/src/app/plugins/api-key/SettingsApiKeys.tsx +0 -22
  436. package/src/app/plugins/api-key/index.tsx +0 -123
  437. package/src/app/plugins/openapi/MakeRequest.tsx +0 -49
  438. package/src/app/plugins/openapi/playground/Playground.tsx +0 -309
  439. package/src/app/plugins/openapi/queries.graphql +0 -6
  440. package/dist/{app → lib}/authentication/authentication.d.ts +0 -0
  441. package/dist/{app → lib}/authentication/authentication.js +0 -0
  442. package/dist/{app → lib}/authentication/openid.d.ts +0 -0
  443. package/dist/{app → lib}/components/AnchorLink.d.ts +0 -0
  444. package/dist/{app → lib}/components/AnchorLink.js +0 -0
  445. package/dist/{app → lib}/components/CategoryHeading.d.ts +0 -0
  446. package/dist/{app → lib}/components/CategoryHeading.js +0 -0
  447. package/dist/{app → lib/components}/Heading.d.ts +0 -0
  448. package/dist/{app → lib}/components/Input.d.ts +0 -0
  449. package/dist/{app → lib}/components/Input.js +0 -0
  450. package/dist/{app → lib}/components/Layout.d.ts +0 -0
  451. package/dist/{app → lib}/components/Markdown.d.ts +0 -0
  452. package/dist/{app → lib}/components/Markdown.js +0 -0
  453. package/dist/{app → lib}/components/TopNavigation.d.ts +0 -0
  454. package/dist/{app → lib}/components/TopNavigation.js +0 -0
  455. package/dist/{app → lib}/components/context/ComponentsContext.js +0 -0
  456. package/dist/{app → lib}/components/context/DevPortalProvider.d.ts +0 -0
  457. package/dist/{app → lib}/components/context/PluginSystem.d.ts +0 -0
  458. package/dist/{app → lib}/components/context/PluginSystem.js +0 -0
  459. package/dist/{app → lib}/components/context/ThemeContext.d.ts +0 -0
  460. package/dist/{app → lib}/components/context/ViewportAnchorContext.d.ts +0 -0
  461. package/dist/{app → lib}/components/context/ViewportAnchorContext.js +0 -0
  462. package/dist/{app → lib}/components/navigation/SideNavigation.d.ts +0 -0
  463. package/dist/{app → lib}/components/navigation/SideNavigationCategory.d.ts +0 -0
  464. package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.d.ts +0 -0
  465. package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js +0 -0
  466. package/dist/{app → lib}/components/navigation/util.d.ts +0 -0
  467. package/dist/{app → lib}/components/navigation/util.js +0 -0
  468. package/dist/{app → lib}/core/helmet.d.ts +0 -0
  469. package/dist/{app → lib}/core/helmet.js +0 -0
  470. package/dist/{app → lib}/core/icons.d.ts +0 -0
  471. package/dist/{app → lib}/core/icons.js +0 -0
  472. package/dist/{app → lib}/core/router.d.ts +0 -0
  473. package/dist/{app → lib}/core/router.js +0 -0
  474. package/dist/{app → lib}/core/types/combine.d.ts +0 -0
  475. package/dist/{app → lib}/core/types/combine.js +0 -0
  476. package/dist/{app → lib}/oas/graphql/index.d.ts +0 -0
  477. package/dist/{app → lib}/oas/parser/dereference/index.d.ts +0 -0
  478. package/dist/{app → lib}/oas/parser/dereference/index.js +0 -0
  479. package/dist/{app → lib}/oas/parser/dereference/resolveRef.d.ts +0 -0
  480. package/dist/{app → lib}/oas/parser/dereference/resolveRef.js +0 -0
  481. package/dist/{app → lib}/oas/parser/index.d.ts +0 -0
  482. package/dist/{app → lib}/oas/parser/index.js +0 -0
  483. package/dist/{app → lib}/oas/parser/upgrade/index.d.ts +0 -0
  484. package/dist/{app → lib}/oas/parser/upgrade/index.js +0 -0
  485. package/dist/{app → lib}/plugins/markdown/Toc.d.ts +0 -0
  486. package/dist/{app → lib}/plugins/markdown/Toc.js +0 -0
  487. package/dist/{app → lib}/plugins/markdown/generateRoutes.d.ts +0 -0
  488. package/dist/{app → lib}/plugins/markdown/index.d.ts +0 -0
  489. package/dist/{app → lib}/plugins/markdown/index.js +0 -0
  490. package/dist/{app → lib}/plugins/openapi/MakeRequest.d.ts +0 -0
  491. package/dist/{app → lib}/plugins/openapi/MethodBadge.d.ts +0 -0
  492. package/dist/{app → lib}/plugins/openapi/MethodBadge.js +0 -0
  493. package/dist/{app → lib}/plugins/openapi/OperationList.d.ts +0 -0
  494. package/dist/{app → lib}/plugins/openapi/OperationListItem.d.ts +0 -0
  495. package/dist/{app → lib}/plugins/openapi/ParameterList.d.ts +0 -0
  496. package/dist/{app → lib}/plugins/openapi/ParameterListItem.d.ts +0 -0
  497. package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.d.ts +0 -0
  498. package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.d.ts +0 -0
  499. package/dist/{app → lib}/plugins/openapi/Select.d.ts +0 -0
  500. package/dist/{app → lib}/plugins/openapi/Select.js +0 -0
  501. package/dist/{app → lib}/plugins/openapi/Sidecar.d.ts +0 -0
  502. package/dist/{app → lib}/plugins/openapi/SidecarBox.d.ts +0 -0
  503. package/dist/{app → lib}/plugins/openapi/SidecarBox.js +0 -0
  504. package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js +0 -0
  505. package/dist/{app → lib}/plugins/openapi/graphql/index.d.ts +0 -0
  506. package/dist/{app → lib}/plugins/openapi/graphql/index.js +0 -0
  507. package/dist/{app → lib}/plugins/openapi/index.d.ts +0 -0
  508. package/dist/{app → lib}/plugins/openapi/util/urql.d.ts +0 -0
  509. package/dist/{app → lib}/plugins/openapi/util/urql.js +0 -0
  510. package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -0
  511. package/dist/{app → lib}/plugins/openapi/worker/worker.d.ts +0 -0
  512. package/dist/{app → lib}/plugins/openapi/worker/worker.js +0 -0
  513. package/dist/{app → lib}/plugins/redirect/index.js +0 -0
  514. package/dist/{app → lib}/ui/Callout.d.ts +0 -0
  515. package/dist/{app → lib}/ui/Callout.js +0 -0
  516. package/dist/{app → lib}/ui/Card.d.ts +0 -0
  517. package/dist/{app → lib}/ui/Card.js +0 -0
  518. package/dist/{app → lib}/ui/Note.d.ts +0 -0
  519. package/dist/{app → lib}/ui/Note.js +0 -0
  520. package/dist/{app → lib}/util/MdxComponents.d.ts +0 -0
  521. package/dist/{app → lib}/util/cn.d.ts +0 -0
  522. package/dist/{app → lib}/util/cn.js +0 -0
  523. package/dist/{app → lib}/util/createWaitForNotify.d.ts +0 -0
  524. package/dist/{app → lib}/util/createWaitForNotify.js +0 -0
  525. package/dist/{app → lib}/util/groupBy.d.ts +0 -0
  526. package/dist/{app → lib}/util/groupBy.js +0 -0
  527. package/dist/{app → lib}/util/joinPath.d.ts +0 -0
  528. package/dist/{app → lib}/util/joinPath.js +0 -0
  529. package/dist/{app → lib}/util/pastellize.d.ts +0 -0
  530. package/dist/{app → lib}/util/pastellize.js +0 -0
  531. package/dist/{app → lib}/util/slugify.d.ts +0 -0
  532. package/dist/{app → lib}/util/slugify.js +0 -0
  533. package/dist/{app → lib}/util/traverseNavigation.d.ts +0 -0
  534. package/dist/{app → lib}/util/traverseNavigation.js +0 -0
  535. package/dist/{app → lib}/util/useScrollToAnchor.d.ts +0 -0
  536. package/dist/{app → lib}/util/useScrollToAnchor.js +0 -0
  537. package/dist/{app → lib}/util/useScrollToTop.d.ts +0 -0
  538. package/dist/{app → lib}/util/useScrollToTop.js +0 -0
  539. package/dist/{app/oas/graphql/server.d.ts → vite/plugin-docs.test.d.ts} +0 -0
  540. package/src/{app → lib}/authentication/authentication.ts +0 -0
  541. package/src/{app → lib}/components/AnchorLink.tsx +0 -0
  542. package/src/{app → lib}/components/CategoryHeading.tsx +1 -1
  543. package/src/{app → lib}/components/Input.tsx +0 -0
  544. package/src/{app → lib}/components/Markdown.tsx +0 -0
  545. package/src/{app → lib}/components/TopNavigation.tsx +0 -0
  546. package/src/{app → lib}/components/context/ComponentsContext.tsx +0 -0
  547. package/src/{app → lib}/components/context/PluginSystem.ts +0 -0
  548. package/src/{app → lib}/components/context/ThemeContext.tsx +1 -1
  549. package/src/{app → lib}/components/context/ViewportAnchorContext.tsx +0 -0
  550. package/src/{app → lib}/components/navigation/useNavigationCollapsibleState.ts +0 -0
  551. package/src/{app → lib}/components/navigation/util.ts +0 -0
  552. package/src/{app → lib}/core/helmet.ts +0 -0
  553. package/src/{app → lib}/core/icons.tsx +0 -0
  554. package/src/{app → lib}/core/router.tsx +0 -0
  555. package/src/{app → lib}/core/types/combine.ts +0 -0
  556. package/src/{app → lib}/oas/parser/dereference/index.ts +0 -0
  557. package/src/{app → lib}/oas/parser/dereference/resolveRef.ts +0 -0
  558. package/src/{app → lib}/oas/parser/index.ts +0 -0
  559. package/src/{app → lib}/oas/parser/schemas/v3.0.json +0 -0
  560. package/src/{app → lib}/oas/parser/schemas/v3.1.json +0 -0
  561. package/src/{app → lib}/oas/parser/upgrade/index.ts +0 -0
  562. package/src/{app → lib}/plugins/markdown/Toc.tsx +0 -0
  563. package/src/{app → lib}/plugins/markdown/index.tsx +0 -0
  564. package/src/{app → lib}/plugins/openapi/MethodBadge.tsx +0 -0
  565. package/src/{app → lib}/plugins/openapi/Select.tsx +0 -0
  566. package/src/{app → lib}/plugins/openapi/SidecarBox.tsx +0 -0
  567. package/src/{app → lib}/plugins/openapi/graphql/fragment-masking.ts +1 -1
  568. /package/src/{app → lib}/plugins/openapi/graphql/index.ts +0 -0
  569. /package/src/{app → lib}/plugins/openapi/util/urql.ts +0 -0
  570. /package/src/{app → lib}/plugins/openapi/worker/worker.ts +0 -0
  571. /package/src/{app → lib}/ui/Callout.tsx +0 -0
  572. /package/src/{app → lib}/ui/Card.tsx +0 -0
  573. /package/src/{app → lib}/ui/Note.tsx +0 -0
  574. /package/src/{app → lib}/util/cn.ts +0 -0
  575. /package/src/{app → lib}/util/createWaitForNotify.ts +0 -0
  576. /package/src/{app → lib}/util/groupBy.ts +0 -0
  577. /package/src/{app → lib}/util/joinPath.tsx +0 -0
  578. /package/src/{app → lib}/util/pastellize.ts +0 -0
  579. /package/src/{app → lib}/util/slugify.ts +0 -0
  580. /package/src/{app → lib}/util/traverseNavigation.ts +0 -0
  581. /package/src/{app → lib}/util/useScrollToAnchor.ts +0 -0
  582. /package/src/{app → lib}/util/useScrollToTop.ts +0 -0
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.1.1-dev.5",
3
+ "version": "0.1.1-dev.50",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
7
- "src/app",
8
- "cli.js"
7
+ "lib",
8
+ "cli.js",
9
+ "src/lib",
10
+ "src/app"
9
11
  ],
10
12
  "module": "./dist/index.js",
11
13
  "types": "./dist/index.d.ts",
@@ -16,11 +18,17 @@
16
18
  ".": {
17
19
  "import": "./dist/index.js"
18
20
  },
19
- "./auth": {
20
- "import": "./dist/auth.js"
21
+ "./auth/clerk": {
22
+ "import": "./lib/zudoku.auth-clerk.js"
21
23
  },
22
24
  "./plugins": {
23
- "import": "./dist/plugins.js"
25
+ "import": "./lib/zudoku.plugins.js"
26
+ },
27
+ "./openapi-worker": {
28
+ "import": "./lib/zudoku.openapi-worker.js"
29
+ },
30
+ "./components": {
31
+ "import": "./lib/zudoku.components.js"
24
32
  },
25
33
  "./vite": {
26
34
  "require": "./dist/vite/plugin.js",
@@ -30,86 +38,79 @@
30
38
  "require": "./dist/app/tailwind.js",
31
39
  "import": "./dist/app/tailwind.js"
32
40
  },
33
- "./icons": {
34
- "require": "./dist/app/core/icons.js",
35
- "import": "./dist/app/core/icons.js"
36
- },
37
41
  "./main.css": {
38
42
  "require": "./src/app/main.css",
39
43
  "import": "./src/app/main.css"
44
+ },
45
+ "./app/*": {
46
+ "import": "./src/app/*"
40
47
  }
41
48
  },
42
49
  "dependencies": {
43
- "@cfworker/json-schema": "1.12.8",
44
- "@clerk/clerk-js": "^5.2.2",
45
- "@graphql-typed-document-node/core": "^3.2.0",
50
+ "@graphql-typed-document-node/core": "3.2.0",
46
51
  "@lekoarts/rehype-meta-as-attributes": "3.0.1",
47
52
  "@mdx-js/react": "3.0.1",
48
53
  "@mdx-js/rollup": "3.0.1",
54
+ "@monaco-editor/react": "^4.6.0",
49
55
  "@pothos/core": "3.41.0",
50
- "@radix-ui/react-collapsible": "1.0.3",
51
- "@radix-ui/react-dialog": "^1.1.1",
52
- "@radix-ui/react-slot": "^1.1.0",
53
- "@radix-ui/react-tabs": "^1.1.0",
54
- "@sentry/node": "^8.11.0",
56
+ "@radix-ui/react-select": "2.1.1",
57
+ "@radix-ui/react-visually-hidden": "1.1.0",
58
+ "@sentry/node": "8.11.0",
55
59
  "@stefanprobst/rehype-extract-toc": "2.2.0",
56
60
  "@tailwindcss/typography": "0.5.13",
57
- "@tanstack/react-query": "5.35.1",
58
- "@vitejs/plugin-react": "4.3.0",
59
- "@zudoku/httpsnippet": "10.0.9",
60
- "@zuplo/pino-pretty-configurations": "^1.5.0",
61
+ "@vitejs/plugin-react": "4.3.1",
61
62
  "autoprefixer": "10.4.19",
62
- "chalk": "^5.3.0",
63
- "class-variance-authority": "0.7.0",
64
- "clsx": "2.1.1",
65
- "dotenv": "^16.4.5",
66
- "esbuild": "^0.23.0",
67
- "express": "^4.19.2",
68
- "graphql": "^16.9.0",
63
+ "chokidar": "^3.6.0",
64
+ "dotenv": "16.4.5",
65
+ "esbuild": "0.23.0",
66
+ "express": "4.19.2",
67
+ "graphql": "16.9.0",
69
68
  "graphql-type-json": "0.3.2",
70
69
  "graphql-yoga": "5.2.0",
70
+ "loglevel": "^1.9.1",
71
71
  "lru-cache": "10.2.0",
72
- "lucide-react": "0.378.0",
73
- "mdx": "^0.3.1",
74
- "oauth4webapi": "2.10.4",
72
+ "mdx": "0.3.1",
75
73
  "object-hash": "3.0.0",
76
74
  "openapi-types": "12.1.3",
77
- "pino": "^9.2.0",
78
- "postcss": "8.4.38",
75
+ "picocolors": "^1.0.1",
76
+ "postcss": "8.4.39",
79
77
  "posthog-node": "^4.0.1",
80
78
  "prism-react-renderer": "2.3.1",
81
79
  "prismjs": "1.29.0",
82
80
  "react": "18.3.1",
83
81
  "react-dom": "18.3.1",
84
82
  "react-helmet-async": "2.0.5",
83
+ "react-hook-form": "^7.52.1",
85
84
  "react-markdown": "9.0.1",
86
- "react-router-dom": "6.23.0",
85
+ "react-router-dom": "6.24.1",
87
86
  "rehype-slug": "6.0.0",
88
87
  "remark-comment": "1.0.0",
89
88
  "remark-directive": "3.0.0",
90
89
  "remark-directive-rehype": "0.4.2",
91
90
  "remark-frontmatter": "5.0.0",
92
91
  "remark-gfm": "4.0.0",
93
- "remark-mdx-frontmatter": "4.0.0",
94
- "semver": "^7.6.2",
92
+ "remark-mdx-frontmatter": "5.0.0",
93
+ "semver": "7.6.2",
95
94
  "slugify": "1.6.6",
96
- "strip-ansi": "^7.1.0",
97
- "tailwind-merge": "2.3.0",
98
- "tailwindcss": "3.4.3",
99
- "ulid": "2.3.0",
95
+ "strip-ansi": "7.1.0",
96
+ "tailwindcss": "3.4.4",
97
+ "ulidx": "^2.3.0",
100
98
  "unist-util-visit": "5.0.0",
101
99
  "urql": "4.1.0",
102
- "vite": "^5.3.1",
103
- "vite-plugin-dts": "^3.9.1",
100
+ "vite": "5.3.3",
104
101
  "yaml": "2.4.1",
105
- "yargs": "^17.7.2",
106
- "zustand": "^4.5.2"
102
+ "yargs": "17.7.2"
107
103
  },
108
104
  "devDependencies": {
109
- "@graphql-codegen/cli": "^5.0.2",
105
+ "@radix-ui/react-collapsible": "1.1.0",
106
+ "@radix-ui/react-dialog": "1.1.1",
107
+ "@radix-ui/react-slot": "1.1.0",
108
+ "@radix-ui/react-tabs": "1.1.0",
109
+ "@tanstack/react-query": "5.50.1",
110
110
  "@types/express": "^4.17.21",
111
111
  "@types/har-format": "^1.2.15",
112
112
  "@types/json-schema": "7.0.15",
113
+ "@types/loglevel": "^1.6.3",
113
114
  "@types/mdx": "2.0.13",
114
115
  "@types/node": "20.12.10",
115
116
  "@types/object-hash": "^3.0.6",
@@ -117,11 +118,32 @@
117
118
  "@types/react-dom": "18.3.0",
118
119
  "@types/semver": "^7.5.8",
119
120
  "@types/yargs": "^17.0.32",
120
- "typescript": "5.5.3"
121
+ "@zudoku/httpsnippet": "10.0.9",
122
+ "class-variance-authority": "0.7.0",
123
+ "clsx": "2.1.1",
124
+ "lucide-react": "0.378.0",
125
+ "oauth4webapi": "2.11.1",
126
+ "prism-react-renderer": "2.3.1",
127
+ "prismjs": "1.29.0",
128
+ "react-helmet-async": "2.0.5",
129
+ "react-markdown": "9.0.1",
130
+ "react-router-dom": "6.24.1",
131
+ "tailwind-merge": "2.3.0",
132
+ "typescript": "5.5.3",
133
+ "zustand": "4.5.4"
134
+ },
135
+ "peerDependencies": {
136
+ "react": ">18.0.0",
137
+ "react-dom": ">18.0.0"
138
+ },
139
+ "optionalDependencies": {
140
+ "@clerk/clerk-js": "5.2.2"
121
141
  },
122
142
  "scripts": {
123
- "build": "tsc --project tsconfig.node.json",
124
- "test": "node --test --enable-source-maps",
125
- "codegen": "graphql-codegen --config ./scripts/codegen.ts"
143
+ "build": "tsc --project tsconfig.json",
144
+ "build:vite": "vite build && pnpm run hack:fix-worker-paths",
145
+ "hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
146
+ "clean": "tsc --build --clean",
147
+ "test": "node --test --enable-source-maps"
126
148
  }
127
149
  }
package/src/app/App.tsx CHANGED
@@ -1,62 +1,39 @@
1
1
  import "./main.css";
2
2
 
3
- import DevPortal from "./DevPortal.js";
4
- import { markdownPlugin } from "./plugins/markdown/index.js";
5
- import { openApiPlugin } from "./plugins/openapi/index.js";
3
+ // Virtual config
4
+ import config from "virtual:zudoku-config";
6
5
 
7
- import config from "./config.js";
8
- // import markdowns from "./markdowns.js";
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
9
18
 
10
19
  export default function App() {
11
20
  return (
12
21
  <DevPortal
13
22
  meta={{
14
- headerTitle: config?.ui?.headerTitle ?? "Developer Portal",
15
- pageTitle: config?.ui?.pageTitle ?? "%s | Dev Portal",
16
- logo: config?.ui?.logo ?? "https://cdn.zuplo.com/www/favicon.png",
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",
17
26
  favicon:
18
- config?.ui?.metadata?.favicon ??
27
+ config.ui?.metadata?.favicon ??
19
28
  "https://cdn.zuplo.com/www/favicon.png",
20
29
  }}
21
30
  navigation={config.navigation ?? []}
22
- // authentication={
23
- // config.authentication
24
- // ? getAuthProvider(config.authentication)
25
- // : undefined
26
- // }
31
+ authentication={configuredAuthProvider}
27
32
  plugins={[
28
- ...(config.docs
29
- ? Array.isArray(config.docs)
30
- ? config.docs
31
- : [config.docs]
32
- : []
33
- ).map((docs) =>
34
- markdownPlugin({
35
- markdownFiles: docs?.files ?? {},
36
- }),
37
- ),
38
- ...(config.apis
39
- ? Array.isArray(config.apis)
40
- ? config.apis
41
- : [config.apis]
42
- : []
43
- ).map((api) => openApiPlugin(api)),
44
- // if (!accessToken) {
45
- // return;
46
- // }
47
-
48
- // const consumers = await fetch(
49
- // "https://zudoku-customer-main-b36fa2f.d2.zuplo.dev/v1/developer/api-keys",
50
- // {
51
- // headers: {
52
- // Authorization: `Bearer ${accessToken}`,
53
- // },
54
- // },
55
- // );
56
-
57
- // return { consumers: [await consumers.json()] };
58
- // },
59
- // }),
33
+ ...configuredDocsPlugins,
34
+ ...configuredApiPlugins,
35
+ configuredApiKeysPlugin,
36
+ configuredRedirectPlugin,
60
37
  ]}
61
38
  />
62
39
  );
package/src/app/main.css CHANGED
@@ -23,6 +23,7 @@
23
23
 
24
24
  html {
25
25
  scroll-padding-block: var(--scroll-padding);
26
+ scrollbar-gutter: stable;
26
27
  }
27
28
 
28
29
  body {
package/src/app/main.tsx CHANGED
@@ -1,22 +1,18 @@
1
- import React from "react";
2
- import ReactDOM from "react-dom/client";
1
+ import log from "loglevel";
2
+ import { StrictMode } from "react";
3
+ import { createRoot } from "react-dom/client";
3
4
  import App from "./App.js";
4
5
 
5
- // if (import.meta.env.DEV) {
6
- // const { default: wdyr } = await import(
7
- // "@welldone-software/why-did-you-render"
8
- // );
9
- //
10
- // wdyr(React, {
11
- // include: [/.*/],
12
- // exclude: [/^BrowserRouter/, /^Link/, /^Route/],
13
- // trackHooks: true,
14
- // trackAllPureComponents: true,
15
- // });
16
- // }
6
+ log.setDefaultLevel("silent");
17
7
 
18
- ReactDOM.createRoot(document.getElementById("root")!).render(
19
- <React.StrictMode>
8
+ if (import.meta.env.DEV) {
9
+ log.setLevel("debug");
10
+ } else if (localStorage.getItem("ENABLE_DEBUG_LOGS")) {
11
+ log.setLevel("debug");
12
+ }
13
+
14
+ createRoot(document.getElementById("root")!).render(
15
+ <StrictMode>
20
16
  <App />
21
- </React.StrictMode>,
17
+ </StrictMode>,
22
18
  );
@@ -1,14 +1,15 @@
1
- import { Clerk } from "@clerk/clerk-js";
1
+ import type { Clerk } from "@clerk/clerk-js";
2
2
  import { type AuthProvider } from "./authentication.js";
3
3
 
4
- const clerkProvider = ({
5
- clerkPubKey,
6
- }: {
7
- clerkPubKey: string;
8
- }): AuthProvider => {
9
- const clerkApi = new Clerk(clerkPubKey);
4
+ const clerkAuth = ({ clerkPubKey }: { clerkPubKey: string }): AuthProvider => {
5
+ let clerkApi: Clerk;
10
6
 
11
- const clerkIsLoaded = clerkApi.load({});
7
+ const clerkIsLoaded = (async () => {
8
+ const { Clerk } = await import("@clerk/clerk-js");
9
+ clerkApi = new Clerk(clerkPubKey);
10
+
11
+ await clerkApi.load({});
12
+ })();
12
13
 
13
14
  return {
14
15
  initialize: async (context) => {
@@ -44,4 +45,4 @@ const clerkProvider = ({
44
45
  };
45
46
  };
46
47
 
47
- export default clerkProvider;
48
+ export default clerkAuth;
@@ -1,6 +1,8 @@
1
+ import logger from "loglevel";
1
2
  import * as oauth from "oauth4webapi";
2
3
  import { DevPortalContext } from "../core/DevPortalContext.js";
3
4
  import { type AuthProvider } from "./authentication.js";
5
+
4
6
  const algorithm = "oauth2";
5
7
 
6
8
  const getAuthServerByIssuer = async (issuer: string) => {
@@ -140,7 +142,7 @@ export const openIdAuth = ({
140
142
  state,
141
143
  );
142
144
  if (oauth.isOAuth2Error(params)) {
143
- console.error("Error Response", params);
145
+ logger.error("Error Response", params);
144
146
  throw new Error(); // Handle OAuth 2.0 redirect error
145
147
  }
146
148
 
@@ -167,7 +169,7 @@ export const openIdAuth = ({
167
169
  response,
168
170
  );
169
171
  if (oauth.isOAuth2Error(oauthResult)) {
170
- console.error("Error Response", oauthResult);
172
+ logger.error("Error Response", oauthResult);
171
173
  throw new Error(oauthResult.error);
172
174
  }
173
175
 
@@ -1,25 +1,27 @@
1
1
  import { MDXProvider } from "@mdx-js/react";
2
2
  import { QueryClientProvider } from "@tanstack/react-query";
3
3
  import { memo, Suspense, useEffect, useMemo } from "react";
4
- import { createBrowserRouter, RouterProvider } from "react-router-dom";
5
- import { type AuthProvider } from "./authentication/authentication.js";
6
- import {
7
- ComponentsProvider,
8
- DEFAULT_COMPONENTS,
9
- type ComponentsContextType,
10
- } from "./components/context/ComponentsContext.js";
11
- import { DevPortalProvider } from "./components/context/DevPortalProvider.js";
12
- import { ThemeProvider } from "./components/context/ThemeContext.js";
13
- import { ViewportAnchorProvider } from "./components/context/ViewportAnchorContext.js";
14
- import { Layout } from "./components/Layout.js";
4
+ import { type AuthProvider } from "../authentication/authentication.js";
15
5
  import {
16
6
  DevPortalContext,
17
7
  queryClient,
18
8
  type NavigationItem,
19
- } from "./core/DevPortalContext.js";
20
- import { HelmetProvider } from "./core/helmet.js";
21
- import { isNavigationPlugin, type DevPortalPlugin } from "./core/plugins.js";
22
- import { MdxComponents, type MdxComponentsType } from "./util/MdxComponents.js";
9
+ } from "../core/DevPortalContext.js";
10
+ import { HelmetProvider } from "../core/helmet.js";
11
+ import { type DevPortalPlugin } from "../core/plugins.js";
12
+ import {
13
+ MdxComponents,
14
+ type MdxComponentsType,
15
+ } from "../util/MdxComponents.js";
16
+ import {
17
+ ComponentsProvider,
18
+ DEFAULT_COMPONENTS,
19
+ type ComponentsContextType,
20
+ } from "./context/ComponentsContext.js";
21
+ import { DevPortalProvider } from "./context/DevPortalProvider.js";
22
+ import { ThemeProvider } from "./context/ThemeContext.js";
23
+ import { ViewportAnchorProvider } from "./context/ViewportAnchorContext.js";
24
+ import { Router } from "./Router.js";
23
25
 
24
26
  export const DevPortalSystemPaths = {
25
27
  Settings: "/settings",
@@ -44,28 +46,7 @@ export type DevPortalProps = {
44
46
  overrides?: ComponentsContextType;
45
47
  };
46
48
 
47
- const DevPortal = (props: DevPortalProps) => {
48
- const router = useMemo(() => {
49
- const routes = (props.plugins ?? []).flatMap((plugin) =>
50
- isNavigationPlugin(plugin) ? plugin.getRoutes() : [],
51
- );
52
-
53
- return createBrowserRouter([
54
- {
55
- path: "/",
56
- element: <Layout />,
57
- errorElement: (
58
- <Layout>
59
- <div className="h-[75vh] flex items-center justify-center">
60
- Error, look at the console
61
- </div>
62
- </Layout>
63
- ),
64
- children: routes,
65
- },
66
- ]);
67
- }, [props.plugins]);
68
-
49
+ const DevPortalInner = (props: DevPortalProps) => {
69
50
  const components = useMemo(
70
51
  () => ({ ...DEFAULT_COMPONENTS, ...props.overrides }),
71
52
  [props.overrides],
@@ -97,7 +78,7 @@ const DevPortal = (props: DevPortalProps) => {
97
78
  </div>
98
79
  }
99
80
  >
100
- <RouterProvider router={router} />
81
+ <Router plugins={props.plugins} />
101
82
  </Suspense>
102
83
  </ViewportAnchorProvider>
103
84
  </ComponentsProvider>
@@ -109,7 +90,7 @@ const DevPortal = (props: DevPortalProps) => {
109
90
  );
110
91
  };
111
92
 
112
- const MemoDevPortal = memo(DevPortal);
113
- MemoDevPortal.displayName = "DevPortal";
93
+ const DevPortal = memo(DevPortalInner);
94
+ DevPortal.displayName = "DevPortal";
114
95
 
115
- export default MemoDevPortal;
96
+ export { DevPortal };
@@ -1,15 +1,15 @@
1
- import * as React from "react"
2
- import * as DialogPrimitive from "@radix-ui/react-dialog"
3
- import { XIcon } from "lucide-react"
1
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
2
+ import { XIcon } from "lucide-react";
3
+ import * as React from "react";
4
4
  import { cn } from "../util/cn.js";
5
5
 
6
- const Dialog = DialogPrimitive.Root
6
+ const Dialog = DialogPrimitive.Root;
7
7
 
8
- const DialogTrigger = DialogPrimitive.Trigger
8
+ const DialogTrigger = DialogPrimitive.Trigger;
9
9
 
10
- const DialogPortal = DialogPrimitive.Portal
10
+ const DialogPortal = DialogPrimitive.Portal;
11
11
 
12
- const DialogClose = DialogPrimitive.Close
12
+ const DialogClose = DialogPrimitive.Close;
13
13
 
14
14
  const DialogOverlay = React.forwardRef<
15
15
  React.ElementRef<typeof DialogPrimitive.Overlay>,
@@ -19,12 +19,12 @@ const DialogOverlay = React.forwardRef<
19
19
  ref={ref}
20
20
  className={cn(
21
21
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
22
- className
22
+ className,
23
23
  )}
24
24
  {...props}
25
25
  />
26
- ))
27
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
26
+ ));
27
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
28
28
 
29
29
  const DialogContent = React.forwardRef<
30
30
  React.ElementRef<typeof DialogPrimitive.Content>,
@@ -35,8 +35,8 @@ const DialogContent = React.forwardRef<
35
35
  <DialogPrimitive.Content
36
36
  ref={ref}
37
37
  className={cn(
38
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
39
- className
38
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg border-border",
39
+ className,
40
40
  )}
41
41
  {...props}
42
42
  >
@@ -47,36 +47,36 @@ const DialogContent = React.forwardRef<
47
47
  </DialogPrimitive.Close>
48
48
  </DialogPrimitive.Content>
49
49
  </DialogPortal>
50
- ))
51
- DialogContent.displayName = DialogPrimitive.Content.displayName
50
+ ));
51
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
52
52
 
53
53
  const DialogHeader = ({
54
- className,
55
- ...props
56
- }: React.HTMLAttributes<HTMLDivElement>) => (
54
+ className,
55
+ ...props
56
+ }: React.HTMLAttributes<HTMLDivElement>) => (
57
57
  <div
58
58
  className={cn(
59
59
  "flex flex-col space-y-1.5 text-center sm:text-left",
60
- className
60
+ className,
61
61
  )}
62
62
  {...props}
63
63
  />
64
- )
65
- DialogHeader.displayName = "DialogHeader"
64
+ );
65
+ DialogHeader.displayName = "DialogHeader";
66
66
 
67
67
  const DialogFooter = ({
68
- className,
69
- ...props
70
- }: React.HTMLAttributes<HTMLDivElement>) => (
68
+ className,
69
+ ...props
70
+ }: React.HTMLAttributes<HTMLDivElement>) => (
71
71
  <div
72
72
  className={cn(
73
73
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
74
- className
74
+ className,
75
75
  )}
76
76
  {...props}
77
77
  />
78
- )
79
- DialogFooter.displayName = "DialogFooter"
78
+ );
79
+ DialogFooter.displayName = "DialogFooter";
80
80
 
81
81
  const DialogTitle = React.forwardRef<
82
82
  React.ElementRef<typeof DialogPrimitive.Title>,
@@ -86,12 +86,12 @@ const DialogTitle = React.forwardRef<
86
86
  ref={ref}
87
87
  className={cn(
88
88
  "text-lg font-semibold leading-none tracking-tight",
89
- className
89
+ className,
90
90
  )}
91
91
  {...props}
92
92
  />
93
- ))
94
- DialogTitle.displayName = DialogPrimitive.Title.displayName
93
+ ));
94
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
95
95
 
96
96
  const DialogDescription = React.forwardRef<
97
97
  React.ElementRef<typeof DialogPrimitive.Description>,
@@ -102,18 +102,18 @@ const DialogDescription = React.forwardRef<
102
102
  className={cn("text-sm text-muted-foreground", className)}
103
103
  {...props}
104
104
  />
105
- ))
106
- DialogDescription.displayName = DialogPrimitive.Description.displayName
105
+ ));
106
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
107
107
 
108
108
  export {
109
109
  Dialog,
110
- DialogPortal,
111
- DialogOverlay,
112
- DialogTrigger,
113
110
  DialogClose,
114
111
  DialogContent,
115
- DialogHeader,
112
+ DialogDescription,
116
113
  DialogFooter,
114
+ DialogHeader,
115
+ DialogOverlay,
116
+ DialogPortal,
117
117
  DialogTitle,
118
- DialogDescription,
119
- }
118
+ DialogTrigger,
119
+ };
@@ -5,7 +5,7 @@ import { TopNavigation } from "./TopNavigation.js";
5
5
  import { useDevPortal } from "./context/DevPortalProvider.js";
6
6
  import { useTheme } from "./context/ThemeContext.js";
7
7
 
8
- export const Header = memo(() => {
8
+ export const Header = memo(function HeaderInner() {
9
9
  const [isDark, toggleTheme] = useTheme();
10
10
  const { isLoggedIn, email } = useDevPortalState();
11
11
  const { login, logout, meta } = useDevPortal();
@@ -25,7 +25,7 @@ export const Header = memo(() => {
25
25
  </span>
26
26
  </div>
27
27
  <div className="grid grid-cols-[--sidecar-grid-cols] items-center gap-8">
28
- <div className="w-full max-w-prose mx-auto">
28
+ <div className="w-full max-w-prose">
29
29
  <button className="flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72">
30
30
  <div className="flex items-center gap-2 flex-grow">
31
31
  <SearchIcon size={14} />
@@ -37,9 +37,9 @@ export const Header = memo(() => {
37
37
  </button>
38
38
  </div>
39
39
  <div className="items-center justify-self-end text-sm hidden lg:flex">
40
- {!isLoggedIn ? (
40
+ {isLoggedIn ? (
41
41
  <button
42
- className="cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded"
42
+ className="cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded text-nowrap"
43
43
  onClick={logout}
44
44
  >
45
45
  Logout {email ? `(${email})` : null}
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from "react";
2
- import { useRegisterAnchorElement } from "./components/context/ViewportAnchorContext.js";
3
- import { cn } from "./util/cn.js";
2
+ import { cn } from "../util/cn.js";
3
+ import { useRegisterAnchorElement } from "./context/ViewportAnchorContext.js";
4
4
 
5
5
  const getComponent = (level: number) => {
6
6
  switch (level) {