zudoku 0.3.0-dev.11 → 0.3.0-dev.111

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 (683) hide show
  1. package/LICENSE.md +21 -0
  2. package/cli.js +5 -1
  3. package/dist/app/App.d.ts +1 -2
  4. package/dist/app/App.js +1 -29
  5. package/dist/app/App.js.map +1 -1
  6. package/dist/app/demo.d.ts +2 -0
  7. package/dist/app/demo.js +46 -0
  8. package/dist/app/demo.js.map +1 -0
  9. package/dist/app/entry.client.d.ts +2 -0
  10. package/dist/app/entry.client.js +35 -0
  11. package/dist/app/entry.client.js.map +1 -0
  12. package/dist/app/entry.server.d.ts +14 -0
  13. package/dist/app/entry.server.js +105 -0
  14. package/dist/app/entry.server.js.map +1 -0
  15. package/dist/app/main.d.ts +6 -1
  16. package/dist/app/main.js +79 -12
  17. package/dist/app/main.js.map +1 -1
  18. package/dist/app/standalone.d.ts +2 -0
  19. package/dist/app/standalone.js +51 -0
  20. package/dist/app/standalone.js.map +1 -0
  21. package/dist/app/tailwind.d.ts +1 -1
  22. package/dist/app/tailwind.js +0 -4
  23. package/dist/app/tailwind.js.map +1 -1
  24. package/dist/cli/cmds/dev.js +5 -0
  25. package/dist/cli/cmds/dev.js.map +1 -1
  26. package/dist/cli/dev/handler.d.ts +1 -0
  27. package/dist/cli/dev/handler.js +3 -1
  28. package/dist/cli/dev/handler.js.map +1 -1
  29. package/dist/config/config.d.ts +19 -45
  30. package/dist/config/validators/InputSidebarSchema.d.ts +176 -0
  31. package/dist/config/validators/InputSidebarSchema.js +71 -0
  32. package/dist/config/validators/InputSidebarSchema.js.map +1 -0
  33. package/dist/config/validators/SidebarSchema.d.ts +17 -0
  34. package/dist/config/validators/SidebarSchema.js +76 -0
  35. package/dist/config/validators/SidebarSchema.js.map +1 -0
  36. package/dist/config/validators/validate.d.ts +1323 -2
  37. package/dist/config/validators/validate.js +179 -1
  38. package/dist/config/validators/validate.js.map +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/internal.d.ts +1 -0
  41. package/dist/internal.js +2 -0
  42. package/dist/internal.js.map +1 -0
  43. package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
  44. package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
  45. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
  46. package/dist/lib/authentication/authentication.d.ts +10 -9
  47. package/dist/lib/authentication/components/SignIn.d.ts +1 -0
  48. package/dist/lib/authentication/components/SignIn.js +14 -0
  49. package/dist/lib/authentication/components/SignIn.js.map +1 -0
  50. package/dist/lib/authentication/components/SignOut.d.ts +1 -0
  51. package/dist/lib/authentication/components/SignOut.js +12 -0
  52. package/dist/lib/authentication/components/SignOut.js.map +1 -0
  53. package/dist/lib/authentication/components/SignUp.d.ts +1 -0
  54. package/dist/lib/authentication/components/SignUp.js +10 -0
  55. package/dist/lib/authentication/components/SignUp.js.map +1 -0
  56. package/dist/lib/authentication/hook.js +4 -4
  57. package/dist/lib/authentication/hook.js.map +1 -1
  58. package/dist/lib/authentication/providers/auth0.js +11 -6
  59. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  60. package/dist/lib/authentication/providers/clerk.js +59 -30
  61. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  62. package/dist/lib/authentication/providers/openid.d.ts +30 -7
  63. package/dist/lib/authentication/providers/openid.js +79 -29
  64. package/dist/lib/authentication/providers/openid.js.map +1 -1
  65. package/dist/lib/authentication/state.js +1 -1
  66. package/dist/lib/authentication/state.js.map +1 -1
  67. package/dist/lib/components/Bootstrap.d.ts +13 -0
  68. package/dist/lib/components/Bootstrap.js +12 -0
  69. package/dist/lib/components/Bootstrap.js.map +1 -0
  70. package/dist/lib/components/ClientOnly.d.ts +3 -0
  71. package/dist/lib/components/ClientOnly.js +7 -0
  72. package/dist/lib/components/ClientOnly.js.map +1 -0
  73. package/dist/lib/components/DevPortal.d.ts +5 -23
  74. package/dist/lib/components/DevPortal.js +38 -20
  75. package/dist/lib/components/DevPortal.js.map +1 -1
  76. package/dist/lib/components/DeveloperHint.d.ts +5 -0
  77. package/dist/lib/components/DeveloperHint.js +10 -0
  78. package/dist/lib/components/DeveloperHint.js.map +1 -0
  79. package/dist/lib/components/ErrorPage.d.ts +6 -0
  80. package/dist/lib/components/ErrorPage.js +9 -0
  81. package/dist/lib/components/ErrorPage.js.map +1 -0
  82. package/dist/lib/components/Header.js +26 -5
  83. package/dist/lib/components/Header.js.map +1 -1
  84. package/dist/lib/components/Heading.d.ts +9 -4
  85. package/dist/lib/components/Heading.js +17 -2
  86. package/dist/lib/components/Heading.js.map +1 -1
  87. package/dist/lib/components/InlineCode.d.ts +5 -0
  88. package/dist/lib/components/InlineCode.js +4 -0
  89. package/dist/lib/components/InlineCode.js.map +1 -0
  90. package/dist/lib/components/Layout.js +7 -5
  91. package/dist/lib/components/Layout.js.map +1 -1
  92. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  93. package/dist/lib/components/NotFoundPage.js +12 -0
  94. package/dist/lib/components/NotFoundPage.js.map +1 -0
  95. package/dist/lib/components/Search.d.ts +1 -0
  96. package/dist/lib/components/Search.js +34 -0
  97. package/dist/lib/components/Search.js.map +1 -0
  98. package/dist/lib/components/SlotletProvider.d.ts +9 -0
  99. package/dist/lib/components/SlotletProvider.js +16 -0
  100. package/dist/lib/components/SlotletProvider.js.map +1 -0
  101. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  102. package/dist/lib/components/SyntaxHighlight.js +24 -22
  103. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  104. package/dist/lib/components/TopNavigation.d.ts +1 -1
  105. package/dist/lib/components/TopNavigation.js +8 -4
  106. package/dist/lib/components/TopNavigation.js.map +1 -1
  107. package/dist/lib/components/context/ThemeContext.d.ts +1 -4
  108. package/dist/lib/components/context/ThemeContext.js +3 -29
  109. package/dist/lib/components/context/ThemeContext.js.map +1 -1
  110. package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
  111. package/dist/lib/components/context/ThemeProvider.js +23 -0
  112. package/dist/lib/components/context/ThemeProvider.js.map +1 -0
  113. package/dist/lib/components/context/ZudokuContext.d.ts +15 -0
  114. package/dist/lib/components/context/ZudokuContext.js +46 -0
  115. package/dist/lib/components/context/ZudokuContext.js.map +1 -0
  116. package/dist/lib/components/context/ZudokuProvider.d.ts +5 -0
  117. package/dist/lib/components/context/ZudokuProvider.js +16 -0
  118. package/dist/lib/components/context/ZudokuProvider.js.map +1 -0
  119. package/dist/lib/components/index.d.ts +32 -3
  120. package/dist/lib/components/index.js +21 -3
  121. package/dist/lib/components/index.js.map +1 -1
  122. package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
  123. package/dist/lib/components/navigation/Sidebar.js +12 -0
  124. package/dist/lib/components/navigation/Sidebar.js.map +1 -0
  125. package/dist/lib/components/navigation/SidebarBadge.d.ts +23 -0
  126. package/dist/lib/components/navigation/SidebarBadge.js +24 -0
  127. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
  128. package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
  129. package/dist/lib/components/navigation/SidebarCategory.js +33 -0
  130. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
  131. package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
  132. package/dist/lib/components/navigation/SidebarItem.js +42 -0
  133. package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
  134. package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
  135. package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
  136. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
  137. package/dist/lib/components/navigation/utils.d.ts +16 -0
  138. package/dist/lib/components/navigation/utils.js +85 -0
  139. package/dist/lib/components/navigation/utils.js.map +1 -0
  140. package/dist/lib/core/DevPortalContext.d.ts +58 -42
  141. package/dist/lib/core/DevPortalContext.js +18 -19
  142. package/dist/lib/core/DevPortalContext.js.map +1 -1
  143. package/dist/lib/core/plugins.d.ts +27 -8
  144. package/dist/lib/core/plugins.js +3 -0
  145. package/dist/lib/core/plugins.js.map +1 -1
  146. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  147. package/dist/lib/errors/ErrorAlert.js +8 -0
  148. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  149. package/dist/lib/errors/RouterError.d.ts +1 -0
  150. package/dist/lib/errors/RouterError.js +12 -0
  151. package/dist/lib/errors/RouterError.js.map +1 -0
  152. package/dist/lib/errors/ServerError.d.ts +3 -0
  153. package/dist/lib/errors/ServerError.js +6 -0
  154. package/dist/lib/errors/ServerError.js.map +1 -0
  155. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  156. package/dist/lib/errors/TopLevelError.js +7 -0
  157. package/dist/lib/errors/TopLevelError.js.map +1 -0
  158. package/dist/lib/oas/graphql/index.js +17 -8
  159. package/dist/lib/oas/graphql/index.js.map +1 -1
  160. package/dist/lib/oas/parser/index.d.ts +1 -1
  161. package/dist/lib/oas/parser/index.js +38 -14
  162. package/dist/lib/oas/parser/index.js.map +1 -1
  163. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +4 -4
  164. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  165. package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
  166. package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
  167. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
  168. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -0
  169. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  170. package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
  171. package/dist/lib/plugins/{api-key → api-keys}/index.js +18 -20
  172. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  173. package/dist/lib/plugins/custom-page/index.d.ts +8 -0
  174. package/dist/lib/plugins/custom-page/index.js +12 -0
  175. package/dist/lib/plugins/custom-page/index.js.map +1 -0
  176. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  177. package/dist/lib/plugins/markdown/MdxPage.js +10 -40
  178. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  179. package/dist/lib/plugins/markdown/Toc.js +17 -9
  180. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  181. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  182. package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
  183. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  184. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  185. package/dist/lib/plugins/markdown/index.js +3 -7
  186. package/dist/lib/plugins/markdown/index.js.map +1 -1
  187. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
  188. package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
  189. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  190. package/dist/lib/plugins/openapi/OperationList.js +17 -5
  191. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  192. package/dist/lib/plugins/openapi/OperationListItem.js +11 -5
  193. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  194. package/dist/lib/plugins/openapi/ParameterList.js +2 -1
  195. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  196. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  197. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  198. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -1
  199. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -28
  200. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  201. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -9
  202. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  203. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  204. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  205. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  206. package/dist/lib/plugins/openapi/Route.js +8 -0
  207. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  208. package/dist/lib/plugins/openapi/SchemaListView.js +10 -26
  209. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  210. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
  211. package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
  212. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  213. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  214. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  215. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  216. package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
  217. package/dist/lib/plugins/openapi/Sidecar.js +48 -16
  218. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  219. package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
  220. package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
  221. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  222. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  223. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  224. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
  225. package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
  226. package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
  227. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  228. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  229. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  230. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  231. package/dist/lib/plugins/openapi/{worker/worker.js → client/createServer.js} +5 -19
  232. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  233. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  234. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  235. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  236. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  237. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  238. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  239. package/dist/lib/plugins/openapi/client/worker.js +20 -0
  240. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  241. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  242. package/dist/lib/plugins/openapi/context.js +11 -0
  243. package/dist/lib/plugins/openapi/context.js.map +1 -0
  244. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
  245. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  246. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  247. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
  248. package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
  249. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  250. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  251. package/dist/lib/plugins/openapi/index.js +78 -33
  252. package/dist/lib/plugins/openapi/index.js.map +1 -1
  253. package/dist/lib/plugins/openapi/interfaces.d.ts +16 -0
  254. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  255. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  256. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  257. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  258. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +4 -5
  259. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -13
  260. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  261. package/dist/lib/plugins/openapi/playground/Playground.d.ts +23 -11
  262. package/dist/lib/plugins/openapi/playground/Playground.js +51 -19
  263. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  264. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +3 -1
  265. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -1
  266. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  267. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -3
  268. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -12
  269. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  270. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
  271. package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
  272. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
  273. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  274. package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
  275. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  276. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  277. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  278. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  279. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  280. package/dist/lib/plugins/openapi-worker.js +1 -1
  281. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  282. package/dist/lib/plugins/redirect/index.d.ts +0 -1
  283. package/dist/lib/plugins/redirect/index.js +3 -4
  284. package/dist/lib/plugins/redirect/index.js.map +1 -1
  285. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +2 -0
  286. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +3 -0
  287. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +1 -0
  288. package/dist/lib/plugins/search-inkeep/index.d.ts +6 -0
  289. package/dist/lib/plugins/search-inkeep/index.js +18 -0
  290. package/dist/lib/plugins/search-inkeep/index.js.map +1 -0
  291. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +23 -0
  292. package/dist/lib/plugins/search-inkeep/inkeep.js +23 -0
  293. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -0
  294. package/dist/lib/ui/Button.d.ts +5 -1
  295. package/dist/lib/ui/Button.js +24 -1
  296. package/dist/lib/ui/Button.js.map +1 -1
  297. package/dist/lib/ui/Callout.js +2 -2
  298. package/dist/lib/ui/Callout.js.map +1 -1
  299. package/dist/lib/ui/Card.js +1 -1
  300. package/dist/lib/ui/Card.js.map +1 -1
  301. package/dist/lib/ui/DropdownMenu.d.ts +27 -0
  302. package/dist/lib/ui/DropdownMenu.js +36 -0
  303. package/dist/lib/ui/DropdownMenu.js.map +1 -0
  304. package/dist/lib/ui/Input.js.map +1 -0
  305. package/dist/lib/util/MdxComponents.d.ts +2 -2
  306. package/dist/lib/util/MdxComponents.js +7 -5
  307. package/dist/lib/util/MdxComponents.js.map +1 -1
  308. package/dist/lib/util/fetchTimeout.d.ts +1 -0
  309. package/dist/lib/util/fetchTimeout.js +14 -0
  310. package/dist/lib/util/fetchTimeout.js.map +1 -0
  311. package/dist/lib/util/groupBy.d.ts +1 -6
  312. package/dist/lib/util/groupBy.js +10 -8
  313. package/dist/lib/util/groupBy.js.map +1 -1
  314. package/dist/lib/util/invariant.d.ts +6 -0
  315. package/dist/lib/util/invariant.js +21 -0
  316. package/dist/lib/util/invariant.js.map +1 -0
  317. package/dist/lib/util/joinPath.js +3 -2
  318. package/dist/lib/util/joinPath.js.map +1 -1
  319. package/dist/lib/util/logInit.d.ts +1 -0
  320. package/dist/lib/util/logInit.js +9 -0
  321. package/dist/lib/util/logInit.js.map +1 -0
  322. package/dist/lib/util/objectEntries.d.ts +4 -0
  323. package/dist/lib/util/objectEntries.js +2 -0
  324. package/dist/lib/util/objectEntries.js.map +1 -0
  325. package/dist/lib/util/renderIf.d.ts +1 -0
  326. package/dist/lib/util/renderIf.js +2 -0
  327. package/dist/lib/util/renderIf.js.map +1 -0
  328. package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
  329. package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
  330. package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
  331. package/dist/lib/util/useScrollToAnchor.js +31 -17
  332. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  333. package/dist/vite/build.js +30 -7
  334. package/dist/vite/build.js.map +1 -1
  335. package/dist/vite/config.d.ts +21 -12
  336. package/dist/vite/config.js +107 -55
  337. package/dist/vite/config.js.map +1 -1
  338. package/dist/vite/config.test.js +7 -4
  339. package/dist/vite/config.test.js.map +1 -1
  340. package/dist/vite/dev-server.d.ts +2 -1
  341. package/dist/vite/dev-server.js +44 -15
  342. package/dist/vite/dev-server.js.map +1 -1
  343. package/dist/vite/html.js +18 -5
  344. package/dist/vite/html.js.map +1 -1
  345. package/dist/vite/plugin-api-keys.js +7 -8
  346. package/dist/vite/plugin-api-keys.js.map +1 -1
  347. package/dist/vite/plugin-api.js +8 -24
  348. package/dist/vite/plugin-api.js.map +1 -1
  349. package/dist/vite/plugin-auth.js +5 -6
  350. package/dist/vite/plugin-auth.js.map +1 -1
  351. package/dist/vite/plugin-component.d.ts +2 -2
  352. package/dist/vite/plugin-component.js +9 -4
  353. package/dist/vite/plugin-component.js.map +1 -1
  354. package/dist/vite/plugin-config.d.ts +0 -2
  355. package/dist/vite/plugin-config.js +2 -13
  356. package/dist/vite/plugin-config.js.map +1 -1
  357. package/dist/vite/plugin-custom-css.d.ts +6 -0
  358. package/dist/vite/plugin-custom-css.js +54 -0
  359. package/dist/vite/plugin-custom-css.js.map +1 -0
  360. package/dist/vite/plugin-docs.js +11 -5
  361. package/dist/vite/plugin-docs.js.map +1 -1
  362. package/dist/vite/plugin-mdx.d.ts +3 -1
  363. package/dist/vite/plugin-mdx.js +5 -5
  364. package/dist/vite/plugin-mdx.js.map +1 -1
  365. package/dist/vite/plugin-metadata.js +1 -1
  366. package/dist/vite/plugin-metadata.js.map +1 -1
  367. package/dist/vite/plugin-redirect.js +10 -10
  368. package/dist/vite/plugin-redirect.js.map +1 -1
  369. package/dist/vite/plugin-sidebar.d.ts +3 -0
  370. package/dist/vite/plugin-sidebar.js +23 -0
  371. package/dist/vite/plugin-sidebar.js.map +1 -0
  372. package/dist/vite/plugin.js +7 -7
  373. package/dist/vite/plugin.js.map +1 -1
  374. package/dist/vite/prerender.d.ts +17 -0
  375. package/dist/vite/prerender.js +79 -0
  376. package/dist/vite/prerender.js.map +1 -0
  377. package/lib/AuthenticationPlugin-CH5NSVOu.js +55 -0
  378. package/lib/AuthenticationPlugin-CH5NSVOu.js.map +1 -0
  379. package/lib/CategoryHeading-BWq12Bfa.js +10 -0
  380. package/lib/CategoryHeading-BWq12Bfa.js.map +1 -0
  381. package/lib/Combination-D-9IH0zy.js +2789 -0
  382. package/lib/Combination-D-9IH0zy.js.map +1 -0
  383. package/lib/DeveloperHint-BQSFXH01.js +10 -0
  384. package/lib/DeveloperHint-BQSFXH01.js.map +1 -0
  385. package/lib/InkeepCustomTrigger-CE5-K5ex.js +6 -0
  386. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +1 -0
  387. package/lib/Input-HmAaR6kw.js +2239 -0
  388. package/lib/Input-HmAaR6kw.js.map +1 -0
  389. package/lib/Markdown-B_Gax7at.js +14108 -0
  390. package/lib/Markdown-B_Gax7at.js.map +1 -0
  391. package/lib/MdxPage-oN3huD58.js +187 -0
  392. package/lib/MdxPage-oN3huD58.js.map +1 -0
  393. package/lib/OperationList-Ctj0ihBN.js +448 -0
  394. package/lib/OperationList-Ctj0ihBN.js.map +1 -0
  395. package/lib/Route-DAF15JAU.js +14 -0
  396. package/lib/Route-DAF15JAU.js.map +1 -0
  397. package/lib/SlotletProvider-BG2PU1Mf.js +262 -0
  398. package/lib/SlotletProvider-BG2PU1Mf.js.map +1 -0
  399. package/lib/Spinner-BCz1kNGw.js +276 -0
  400. package/lib/Spinner-BCz1kNGw.js.map +1 -0
  401. package/lib/ZudokuContext-BIZ8zHbZ.js +1084 -0
  402. package/lib/ZudokuContext-BIZ8zHbZ.js.map +1 -0
  403. package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
  404. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  405. package/lib/assets/index-BPdJm2ty.js +1 -0
  406. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  407. package/lib/assets/{worker-DGvzLstc.js → worker-CR7aeKop.js} +3113 -2729
  408. package/lib/assets/worker-CR7aeKop.js.map +1 -0
  409. package/lib/index-7kcHaXD6.js +1771 -0
  410. package/lib/index-7kcHaXD6.js.map +1 -0
  411. package/lib/index-CtKkHGcd.js +5942 -0
  412. package/lib/index-CtKkHGcd.js.map +1 -0
  413. package/lib/index-D-9Z7HSn.js +124 -0
  414. package/lib/index-D-9Z7HSn.js.map +1 -0
  415. package/lib/index-pI9JkN46.js +4765 -0
  416. package/lib/index-pI9JkN46.js.map +1 -0
  417. package/lib/joinPath-B7kNnUX4.js +8 -0
  418. package/lib/joinPath-B7kNnUX4.js.map +1 -0
  419. package/lib/jsx-runtime-B6kdoens.js +635 -0
  420. package/lib/jsx-runtime-B6kdoens.js.map +1 -0
  421. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  422. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  423. package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
  424. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  425. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  426. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  427. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  428. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  429. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  430. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  431. package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
  432. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  433. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  434. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  435. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  436. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  437. package/lib/router-BiRCp01d.js +2971 -0
  438. package/lib/router-BiRCp01d.js.map +1 -0
  439. package/lib/slugify-CiPVjteN.js +28 -0
  440. package/lib/slugify-CiPVjteN.js.map +1 -0
  441. package/lib/state-DsXXkBLH.js +288 -0
  442. package/lib/state-DsXXkBLH.js.map +1 -0
  443. package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -2
  444. package/lib/urql-DrBfkb92.js.map +1 -0
  445. package/lib/utils-Bh4upQ0e.js +749 -0
  446. package/lib/utils-Bh4upQ0e.js.map +1 -0
  447. package/lib/zudoku.auth-auth0.js +31 -20
  448. package/lib/zudoku.auth-auth0.js.map +1 -0
  449. package/lib/zudoku.auth-clerk.js +59 -29
  450. package/lib/zudoku.auth-clerk.js.map +1 -0
  451. package/lib/zudoku.auth-openid.js +742 -573
  452. package/lib/zudoku.auth-openid.js.map +1 -0
  453. package/lib/zudoku.components.js +2064 -695
  454. package/lib/zudoku.components.js.map +1 -0
  455. package/lib/zudoku.openapi-worker.js +15035 -146
  456. package/lib/zudoku.openapi-worker.js.map +1 -0
  457. package/lib/zudoku.plugin-api-keys.js +325 -0
  458. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  459. package/lib/zudoku.plugin-custom-page.js +13 -0
  460. package/lib/zudoku.plugin-custom-page.js.map +1 -0
  461. package/lib/zudoku.plugin-markdown.js +31 -0
  462. package/lib/zudoku.plugin-markdown.js.map +1 -0
  463. package/lib/zudoku.plugin-openapi.js +14 -0
  464. package/lib/zudoku.plugin-openapi.js.map +1 -0
  465. package/lib/zudoku.plugin-redirect.js +11 -0
  466. package/lib/zudoku.plugin-redirect.js.map +1 -0
  467. package/lib/zudoku.plugin-search-inkeep.js +51 -0
  468. package/lib/zudoku.plugin-search-inkeep.js.map +1 -0
  469. package/package.json +67 -25
  470. package/src/app/App.tsx +0 -41
  471. package/src/app/demo-cdn.html +26 -0
  472. package/src/app/demo.html +18 -0
  473. package/src/app/demo.tsx +56 -0
  474. package/src/app/entry.client.tsx +47 -0
  475. package/src/app/entry.server.tsx +160 -0
  476. package/src/app/main.css +83 -3
  477. package/src/app/main.tsx +92 -15
  478. package/src/app/standalone.html +20 -0
  479. package/src/app/standalone.tsx +55 -0
  480. package/src/app/tailwind.ts +2 -6
  481. package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
  482. package/src/lib/authentication/authentication.ts +6 -9
  483. package/src/lib/authentication/components/SignIn.tsx +15 -0
  484. package/src/lib/authentication/components/SignOut.tsx +13 -0
  485. package/src/lib/authentication/components/SignUp.tsx +11 -0
  486. package/src/lib/authentication/hook.ts +4 -4
  487. package/src/lib/authentication/providers/auth0.tsx +16 -6
  488. package/src/lib/authentication/providers/clerk.tsx +63 -31
  489. package/src/lib/authentication/providers/openid.tsx +104 -34
  490. package/src/lib/authentication/state.ts +1 -1
  491. package/src/lib/components/Bootstrap.tsx +45 -0
  492. package/src/lib/components/ClientOnly.tsx +13 -0
  493. package/src/lib/components/DevPortal.tsx +70 -67
  494. package/src/lib/components/DeveloperHint.tsx +25 -0
  495. package/src/lib/components/ErrorPage.tsx +28 -0
  496. package/src/lib/components/Header.tsx +112 -41
  497. package/src/lib/components/Heading.tsx +26 -7
  498. package/src/lib/components/InlineCode.tsx +19 -0
  499. package/src/lib/components/Layout.tsx +19 -11
  500. package/src/lib/components/NotFoundPage.tsx +33 -0
  501. package/src/lib/components/Search.tsx +60 -0
  502. package/src/lib/components/SlotletProvider.tsx +30 -0
  503. package/src/lib/components/SyntaxHighlight.tsx +53 -44
  504. package/src/lib/components/TopNavigation.tsx +10 -5
  505. package/src/lib/components/context/ThemeContext.tsx +3 -41
  506. package/src/lib/components/context/ThemeProvider.tsx +27 -0
  507. package/src/lib/components/context/{DevPortalProvider.ts → ZudokuContext.ts} +19 -15
  508. package/src/lib/components/context/ZudokuProvider.tsx +26 -0
  509. package/src/lib/components/index.ts +25 -3
  510. package/src/lib/components/navigation/Sidebar.tsx +24 -0
  511. package/src/lib/components/navigation/SidebarBadge.tsx +43 -0
  512. package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
  513. package/src/lib/components/navigation/SidebarItem.tsx +128 -0
  514. package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
  515. package/src/lib/components/navigation/utils.ts +117 -0
  516. package/src/lib/core/DevPortalContext.ts +72 -68
  517. package/src/lib/core/plugins.ts +45 -13
  518. package/src/lib/errors/ErrorAlert.tsx +21 -0
  519. package/src/lib/errors/RouterError.tsx +13 -0
  520. package/src/lib/errors/ServerError.tsx +5 -0
  521. package/src/lib/errors/TopLevelError.tsx +8 -0
  522. package/src/lib/oas/graphql/index.ts +21 -10
  523. package/src/lib/oas/parser/index.ts +41 -22
  524. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +4 -4
  525. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
  526. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +49 -16
  527. package/src/lib/plugins/{api-key → api-keys}/index.tsx +27 -41
  528. package/src/lib/plugins/custom-page/index.tsx +22 -0
  529. package/src/lib/plugins/markdown/MdxPage.tsx +54 -73
  530. package/src/lib/plugins/markdown/Toc.tsx +53 -40
  531. package/src/lib/plugins/markdown/generateRoutes.tsx +35 -53
  532. package/src/lib/plugins/markdown/index.tsx +10 -7
  533. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
  534. package/src/lib/plugins/openapi/OperationList.tsx +46 -10
  535. package/src/lib/plugins/openapi/OperationListItem.tsx +51 -30
  536. package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
  537. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  538. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +9 -33
  539. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -16
  540. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
  541. package/src/lib/plugins/openapi/Route.tsx +21 -0
  542. package/src/lib/plugins/openapi/SchemaListView.tsx +39 -192
  543. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +125 -0
  544. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  545. package/src/lib/plugins/openapi/Sidecar.tsx +67 -25
  546. package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
  547. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  548. package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
  549. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  550. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  551. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
  552. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  553. package/src/lib/plugins/openapi/client/worker.ts +30 -0
  554. package/src/lib/plugins/openapi/context.tsx +16 -0
  555. package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
  556. package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
  557. package/src/lib/plugins/openapi/index.tsx +130 -74
  558. package/src/lib/plugins/openapi/interfaces.ts +10 -0
  559. package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
  560. package/src/lib/plugins/openapi/playground/PathParams.tsx +76 -50
  561. package/src/lib/plugins/openapi/playground/Playground.tsx +121 -81
  562. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +13 -7
  563. package/src/lib/plugins/openapi/playground/QueryParams.tsx +107 -66
  564. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
  565. package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
  566. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  567. package/src/lib/plugins/openapi-worker.ts +1 -1
  568. package/src/lib/plugins/redirect/index.tsx +3 -4
  569. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +3 -0
  570. package/src/lib/plugins/search-inkeep/index.tsx +63 -0
  571. package/src/lib/plugins/search-inkeep/inkeep.ts +32 -0
  572. package/src/lib/ui/Button.tsx +32 -2
  573. package/src/lib/ui/Callout.tsx +4 -4
  574. package/src/lib/ui/Card.tsx +1 -1
  575. package/src/lib/ui/DropdownMenu.tsx +199 -0
  576. package/src/lib/util/MdxComponents.tsx +7 -15
  577. package/src/lib/util/fetchTimeout.tsx +21 -0
  578. package/src/lib/util/groupBy.ts +7 -12
  579. package/src/lib/util/invariant.ts +26 -0
  580. package/src/lib/util/joinPath.tsx +3 -2
  581. package/src/lib/util/logInit.ts +9 -0
  582. package/src/lib/util/objectEntries.ts +5 -0
  583. package/src/lib/util/renderIf.ts +4 -0
  584. package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
  585. package/src/lib/util/useScrollToAnchor.ts +39 -18
  586. package/dist/lib/authentication/Callback.d.ts +0 -3
  587. package/dist/lib/authentication/Callback.js +0 -34
  588. package/dist/lib/authentication/Callback.js.map +0 -1
  589. package/dist/lib/components/Input.js.map +0 -1
  590. package/dist/lib/components/Link.d.ts +0 -1
  591. package/dist/lib/components/Link.js +0 -2
  592. package/dist/lib/components/Link.js.map +0 -1
  593. package/dist/lib/components/Router.d.ts +0 -4
  594. package/dist/lib/components/Router.js +0 -20
  595. package/dist/lib/components/Router.js.map +0 -1
  596. package/dist/lib/components/context/DevPortalProvider.d.ts +0 -9
  597. package/dist/lib/components/context/DevPortalProvider.js +0 -39
  598. package/dist/lib/components/context/DevPortalProvider.js.map +0 -1
  599. package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
  600. package/dist/lib/components/navigation/SideNavigation.js +0 -11
  601. package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
  602. package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
  603. package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
  604. package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
  605. package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -13
  606. package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
  607. package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
  608. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
  609. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -6
  610. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -16
  611. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
  612. package/dist/lib/components/navigation/util.d.ts +0 -8
  613. package/dist/lib/components/navigation/util.js +0 -15
  614. package/dist/lib/components/navigation/util.js.map +0 -1
  615. package/dist/lib/core/helmet.d.ts +0 -4
  616. package/dist/lib/core/helmet.js +0 -5
  617. package/dist/lib/core/helmet.js.map +0 -1
  618. package/dist/lib/core/icons.d.ts +0 -1
  619. package/dist/lib/core/icons.js +0 -2
  620. package/dist/lib/core/icons.js.map +0 -1
  621. package/dist/lib/core/router.d.ts +0 -1
  622. package/dist/lib/core/router.js +0 -2
  623. package/dist/lib/core/router.js.map +0 -1
  624. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  625. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  626. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  627. package/dist/lib/plugins/api-key/index.js.map +0 -1
  628. package/dist/lib/plugins/index.d.ts +0 -4
  629. package/dist/lib/plugins/index.js +0 -5
  630. package/dist/lib/plugins/index.js.map +0 -1
  631. package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
  632. package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
  633. package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
  634. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  635. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  636. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  637. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  638. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  639. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  640. package/dist/lib/ui/button-variants.d.ts +0 -4
  641. package/dist/lib/ui/button-variants.js +0 -24
  642. package/dist/lib/ui/button-variants.js.map +0 -1
  643. package/dist/lib/util/traverseNavigation.d.ts +0 -6
  644. package/dist/lib/util/traverseNavigation.js +0 -30
  645. package/dist/lib/util/traverseNavigation.js.map +0 -1
  646. package/dist/vite/common.d.ts +0 -1
  647. package/dist/vite/common.js +0 -5
  648. package/dist/vite/common.js.map +0 -1
  649. package/dist/vite/plugin-html.d.ts +0 -3
  650. package/dist/vite/plugin-html.js +0 -47
  651. package/dist/vite/plugin-html.js.map +0 -1
  652. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  653. package/dist/vite/plugin-openapi-worker.js +0 -28
  654. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  655. package/lib/Spinner-CzCKCaUK.js +0 -8444
  656. package/lib/clerk-Wslx_mPo.js +0 -19685
  657. package/lib/index-PyGcnQFX.js +0 -3462
  658. package/lib/loglevel-CoH7VSwE.js +0 -152
  659. package/lib/state-2Hu1renZ.js +0 -313
  660. package/lib/zudoku.plugins.js +0 -19916
  661. package/src/lib/authentication/Callback.tsx +0 -60
  662. package/src/lib/components/Link.tsx +0 -1
  663. package/src/lib/components/Router.tsx +0 -28
  664. package/src/lib/components/navigation/SideNavigation.tsx +0 -21
  665. package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -76
  666. package/src/lib/components/navigation/SideNavigationItem.tsx +0 -152
  667. package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -27
  668. package/src/lib/components/navigation/util.ts +0 -38
  669. package/src/lib/core/helmet.ts +0 -5
  670. package/src/lib/core/icons.tsx +0 -1
  671. package/src/lib/core/router.tsx +0 -1
  672. package/src/lib/plugins/index.ts +0 -4
  673. package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
  674. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  675. package/src/lib/plugins/openapi/worker/worker.ts +0 -56
  676. package/src/lib/ui/button-variants.ts +0 -31
  677. package/src/lib/util/traverseNavigation.ts +0 -55
  678. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  679. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  680. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
  681. /package/dist/lib/{components → ui}/Input.d.ts +0 -0
  682. /package/dist/lib/{components → ui}/Input.js +0 -0
  683. /package/src/lib/{components → ui}/Input.tsx +0 -0
@@ -0,0 +1,56 @@
1
+ /* eslint-disable no-console */
2
+ import {
3
+ cacheExchange,
4
+ Client,
5
+ fetchExchange,
6
+ mapExchange,
7
+ } from "../util/urql.js";
8
+ import { createServer } from "./createServer.js";
9
+ import { CreateClientFunction } from "./interfaces.js";
10
+
11
+ export type WorkerGraphQLMessage = { id: string; body: string };
12
+
13
+ const localServer = createServer();
14
+
15
+ /**
16
+ * Creates an in memory Client that does not use Workers. This allows
17
+ * developers to run the simple standalone version of zudoku using the CDN
18
+ * hosted scripts. Worker's cannot be loaded cross domain so in this case
19
+ * we sacrifice performance for making it work cross domain.
20
+ */
21
+ export const createClient: CreateClientFunction = () => {
22
+ return new Client({
23
+ url: "/__z/graphql",
24
+ // Custom fetch to send the GraphQL request to the worker and convert the response back to a `Response` object
25
+ fetch: async (req, init) => {
26
+ if (!init?.body) throw new Error("No body");
27
+ const response = await localServer.fetch(
28
+ new Request("http://localhost/__z/graphql", {
29
+ method: "POST",
30
+ body: init.body,
31
+ headers: {
32
+ "Content-Type": "application/json",
33
+ },
34
+ }),
35
+ );
36
+ return response;
37
+ // port.postMessage({
38
+ // id: e.data.id,
39
+ // body: await response.text(),
40
+ // } satisfies WorkerGraphQLMessage);
41
+ },
42
+ exchanges: [
43
+ cacheExchange,
44
+ mapExchange({
45
+ onError(error, operation) {
46
+ console.error(error);
47
+ console.groupCollapsed("Operation info");
48
+ console.log("body", operation.query.loc?.source.body.trim());
49
+ console.log("variables", operation.variables);
50
+ console.groupEnd();
51
+ },
52
+ }),
53
+ fetchExchange,
54
+ ],
55
+ });
56
+ };
@@ -0,0 +1,33 @@
1
+ import { useLogger } from "@envelop/core";
2
+ import { createGraphQLServer } from "../../../oas/graphql/index.js";
3
+
4
+ const map = new Map<string, number>();
5
+
6
+ /**
7
+ * Creates the GraphQL server
8
+ */
9
+ export const createServer = () =>
10
+ createGraphQLServer({
11
+ plugins: [
12
+ // eslint-disable-next-line react-hooks/rules-of-hooks
13
+ useLogger({
14
+ logFn: (eventName, { args }) => {
15
+ if (import.meta.env.PROD) return;
16
+
17
+ if (eventName.endsWith("-start")) {
18
+ map.set(`${eventName}-${args.operationName}`, performance.now());
19
+ } else if (eventName.endsWith("-end")) {
20
+ const startEvent = eventName.replace("-end", "-start");
21
+ const start = map.get(`${startEvent}-${args.operationName}`);
22
+ if (start) {
23
+ // eslint-disable-next-line no-console
24
+ console.log(
25
+ `${args.operationName} query took ${performance.now() - start}ms`,
26
+ );
27
+ map.delete(`${startEvent}-${args.operationName}`);
28
+ }
29
+ }
30
+ },
31
+ }),
32
+ ],
33
+ });
@@ -7,15 +7,34 @@ import {
7
7
  fetchExchange,
8
8
  mapExchange,
9
9
  } from "../util/urql.js";
10
+ import { createClient as createMemoryClient } from "./createMemoryClient.js";
11
+ import { CreateClientFunction } from "./interfaces.js";
10
12
 
11
13
  export type WorkerGraphQLMessage = { id: string; body: string };
12
-
13
14
  const ulid = monotonicFactory();
14
- export const createSharedWorkerClient = () => {
15
+
16
+ /**
17
+ * This loads the client from a worker and uses mess port to send requests
18
+ * and responses between the main thread and the worker.
19
+ */
20
+ export const createClient: CreateClientFunction = ({
21
+ useMemoryClient,
22
+ }: {
23
+ useMemoryClient: boolean;
24
+ }) => {
25
+ if (useMemoryClient || typeof SharedWorker === "undefined") {
26
+ return createMemoryClient({ useMemoryClient });
27
+ }
28
+ // NOTE: This URL needs to be inline with the SharedWorker otherwse
29
+ // vite build does not recognize the worker file as a module.
15
30
  const worker = new SharedWorker(new URL("./worker.ts", import.meta.url), {
16
31
  type: "module",
17
32
  });
18
33
 
34
+ worker.onerror = (e) => {
35
+ console.error(e);
36
+ };
37
+
19
38
  worker.port.start();
20
39
 
21
40
  const [waitFor, notify] = createWaitForNotify<string>();
@@ -0,0 +1,5 @@
1
+ import { Client } from "urql";
2
+
3
+ export type CreateClientFunction = (config: {
4
+ useMemoryClient: boolean;
5
+ }) => Client;
@@ -0,0 +1,30 @@
1
+ import { createServer } from "./createServer.js";
2
+ import { type WorkerGraphQLMessage } from "./createWorkerClient.js";
3
+
4
+ const localServer = createServer();
5
+
6
+ const worker = self as unknown as SharedWorkerGlobalScope;
7
+
8
+ worker.addEventListener(
9
+ "connect",
10
+ function (event: MessageEvent<{ id: string; body: string }>) {
11
+ const port = event.ports[0];
12
+
13
+ port.onmessage = async function (e) {
14
+ const response = await localServer.fetch(
15
+ new Request("/__z/graphql", {
16
+ method: "POST",
17
+ body: e.data.body,
18
+ headers: {
19
+ "Content-Type": "application/json",
20
+ },
21
+ }),
22
+ );
23
+
24
+ port.postMessage({
25
+ id: e.data.id,
26
+ body: await response.text(),
27
+ } satisfies WorkerGraphQLMessage);
28
+ };
29
+ },
30
+ );
@@ -0,0 +1,16 @@
1
+ import { createContext, useContext } from "react";
2
+ import { OasPluginConfig } from "./interfaces.js";
3
+
4
+ const OasContext = createContext<{ config: OasPluginConfig } | undefined>(
5
+ undefined,
6
+ );
7
+
8
+ export const OasConfigProvider = OasContext.Provider;
9
+
10
+ export const useOasConfig = () => {
11
+ const ctx = useContext(OasContext);
12
+ if (!ctx) {
13
+ throw new Error("useOasConfig must be used within a OasConfigProvider");
14
+ }
15
+ return ctx.config;
16
+ };
@@ -13,12 +13,12 @@ import * as types from "./graphql.js";
13
13
  * Therefore it is highly recommended to use the babel or swc plugin for production.
14
14
  */
15
15
  const documents = {
16
- "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n":
17
- types.GetServerQueryDocument,
18
16
  "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
19
17
  types.OperationsFragmentFragmentDoc,
20
18
  "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n":
21
19
  types.AllOperationsDocument,
20
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n":
21
+ types.GetServerQueryDocument,
22
22
  "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n":
23
23
  types.GetCategoriesDocument,
24
24
  };
@@ -37,12 +37,6 @@ const documents = {
37
37
  */
38
38
  export function graphql(source: string): unknown;
39
39
 
40
- /**
41
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
42
- */
43
- export function graphql(
44
- source: "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n",
45
- ): (typeof documents)["\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n"];
46
40
  /**
47
41
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
48
42
  */
@@ -55,6 +49,12 @@ export function graphql(
55
49
  export function graphql(
56
50
  source: "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n",
57
51
  ): (typeof documents)["\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n"];
52
+ /**
53
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
54
+ */
55
+ export function graphql(
56
+ source: "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n",
57
+ ): (typeof documents)["\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n"];
58
58
  /**
59
59
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
60
60
  */
@@ -57,7 +57,7 @@ export type MediaTypeObject = {
57
57
  encoding?: Maybe<Array<EncodingItem>>;
58
58
  examples?: Maybe<Array<ExampleItem>>;
59
59
  mediaType: Scalars["String"]["output"];
60
- schema: Scalars["JSON"]["output"];
60
+ schema?: Maybe<Scalars["JSON"]["output"]>;
61
61
  };
62
62
 
63
63
  export type OperationItem = {
@@ -163,16 +163,6 @@ export type TagItem = {
163
163
  name: Scalars["String"]["output"];
164
164
  };
165
165
 
166
- export type GetServerQueryQueryVariables = Exact<{
167
- input: Scalars["JSON"]["input"];
168
- type: SchemaType;
169
- }>;
170
-
171
- export type GetServerQueryQuery = {
172
- __typename?: "Query";
173
- schema: { __typename?: "Schema"; url: string };
174
- };
175
-
176
166
  export type OperationsFragmentFragment = {
177
167
  __typename?: "OperationItem";
178
168
  slug: string;
@@ -206,7 +196,7 @@ export type OperationsFragmentFragment = {
206
196
  content?: Array<{
207
197
  __typename?: "MediaTypeObject";
208
198
  mediaType: string;
209
- schema: any;
199
+ schema?: any | null;
210
200
  encoding?: Array<{ __typename?: "EncodingItem"; name: string }> | null;
211
201
  }> | null;
212
202
  } | null;
@@ -218,7 +208,7 @@ export type OperationsFragmentFragment = {
218
208
  content?: Array<{
219
209
  __typename?: "MediaTypeObject";
220
210
  mediaType: string;
221
- schema: any;
211
+ schema?: any | null;
222
212
  encoding?: Array<{ __typename?: "EncodingItem"; name: string }> | null;
223
213
  }> | null;
224
214
  }>;
@@ -252,6 +242,16 @@ export type AllOperationsQuery = {
252
242
  };
253
243
  };
254
244
 
245
+ export type GetServerQueryQueryVariables = Exact<{
246
+ input: Scalars["JSON"]["input"];
247
+ type: SchemaType;
248
+ }>;
249
+
250
+ export type GetServerQueryQuery = {
251
+ __typename?: "Query";
252
+ schema: { __typename?: "Schema"; url: string };
253
+ };
254
+
255
255
  export type GetCategoriesQueryVariables = Exact<{
256
256
  input: Scalars["JSON"]["input"];
257
257
  type: SchemaType;
@@ -423,73 +423,6 @@ export const OperationsFragmentFragmentDoc = {
423
423
  },
424
424
  ],
425
425
  } as unknown as DocumentNode<OperationsFragmentFragment, unknown>;
426
- export const GetServerQueryDocument = {
427
- kind: "Document",
428
- definitions: [
429
- {
430
- kind: "OperationDefinition",
431
- operation: "query",
432
- name: { kind: "Name", value: "getServerQuery" },
433
- variableDefinitions: [
434
- {
435
- kind: "VariableDefinition",
436
- variable: {
437
- kind: "Variable",
438
- name: { kind: "Name", value: "input" },
439
- },
440
- type: {
441
- kind: "NonNullType",
442
- type: { kind: "NamedType", name: { kind: "Name", value: "JSON" } },
443
- },
444
- },
445
- {
446
- kind: "VariableDefinition",
447
- variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
448
- type: {
449
- kind: "NonNullType",
450
- type: {
451
- kind: "NamedType",
452
- name: { kind: "Name", value: "SchemaType" },
453
- },
454
- },
455
- },
456
- ],
457
- selectionSet: {
458
- kind: "SelectionSet",
459
- selections: [
460
- {
461
- kind: "Field",
462
- name: { kind: "Name", value: "schema" },
463
- arguments: [
464
- {
465
- kind: "Argument",
466
- name: { kind: "Name", value: "input" },
467
- value: {
468
- kind: "Variable",
469
- name: { kind: "Name", value: "input" },
470
- },
471
- },
472
- {
473
- kind: "Argument",
474
- name: { kind: "Name", value: "type" },
475
- value: {
476
- kind: "Variable",
477
- name: { kind: "Name", value: "type" },
478
- },
479
- },
480
- ],
481
- selectionSet: {
482
- kind: "SelectionSet",
483
- selections: [
484
- { kind: "Field", name: { kind: "Name", value: "url" } },
485
- ],
486
- },
487
- },
488
- ],
489
- },
490
- },
491
- ],
492
- } as unknown as DocumentNode<GetServerQueryQuery, GetServerQueryQueryVariables>;
493
426
  export const AllOperationsDocument = {
494
427
  kind: "Document",
495
428
  definitions: [
@@ -735,6 +668,73 @@ export const AllOperationsDocument = {
735
668
  },
736
669
  ],
737
670
  } as unknown as DocumentNode<AllOperationsQuery, AllOperationsQueryVariables>;
671
+ export const GetServerQueryDocument = {
672
+ kind: "Document",
673
+ definitions: [
674
+ {
675
+ kind: "OperationDefinition",
676
+ operation: "query",
677
+ name: { kind: "Name", value: "getServerQuery" },
678
+ variableDefinitions: [
679
+ {
680
+ kind: "VariableDefinition",
681
+ variable: {
682
+ kind: "Variable",
683
+ name: { kind: "Name", value: "input" },
684
+ },
685
+ type: {
686
+ kind: "NonNullType",
687
+ type: { kind: "NamedType", name: { kind: "Name", value: "JSON" } },
688
+ },
689
+ },
690
+ {
691
+ kind: "VariableDefinition",
692
+ variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
693
+ type: {
694
+ kind: "NonNullType",
695
+ type: {
696
+ kind: "NamedType",
697
+ name: { kind: "Name", value: "SchemaType" },
698
+ },
699
+ },
700
+ },
701
+ ],
702
+ selectionSet: {
703
+ kind: "SelectionSet",
704
+ selections: [
705
+ {
706
+ kind: "Field",
707
+ name: { kind: "Name", value: "schema" },
708
+ arguments: [
709
+ {
710
+ kind: "Argument",
711
+ name: { kind: "Name", value: "input" },
712
+ value: {
713
+ kind: "Variable",
714
+ name: { kind: "Name", value: "input" },
715
+ },
716
+ },
717
+ {
718
+ kind: "Argument",
719
+ name: { kind: "Name", value: "type" },
720
+ value: {
721
+ kind: "Variable",
722
+ name: { kind: "Name", value: "type" },
723
+ },
724
+ },
725
+ ],
726
+ selectionSet: {
727
+ kind: "SelectionSet",
728
+ selections: [
729
+ { kind: "Field", name: { kind: "Name", value: "url" } },
730
+ ],
731
+ },
732
+ },
733
+ ],
734
+ },
735
+ },
736
+ ],
737
+ } as unknown as DocumentNode<GetServerQueryQuery, GetServerQueryQueryVariables>;
738
738
  export const GetCategoriesDocument = {
739
739
  kind: "Document",
740
740
  definitions: [