zudoku 0.64.2 → 0.65.0

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 (279) hide show
  1. package/dist/app/main.d.ts +91 -1
  2. package/dist/app/main.js +5 -1
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/config/validators/InputNavigationSchema.d.ts +16 -16
  5. package/dist/config/validators/NavigationSchema.js +2 -4
  6. package/dist/config/validators/NavigationSchema.js.map +1 -1
  7. package/dist/config/validators/validate.d.ts +53 -1
  8. package/dist/config/validators/validate.js +7 -0
  9. package/dist/config/validators/validate.js.map +1 -1
  10. package/dist/config/validators/validate.test.js +43 -0
  11. package/dist/config/validators/validate.test.js.map +1 -1
  12. package/dist/flat-config.d.ts +6 -0
  13. package/dist/lib/authentication/providers/auth0.js +6 -1
  14. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  15. package/dist/lib/components/Autocomplete.d.ts +3 -1
  16. package/dist/lib/components/Autocomplete.js +6 -2
  17. package/dist/lib/components/Autocomplete.js.map +1 -1
  18. package/dist/lib/components/Layout.js +3 -2
  19. package/dist/lib/components/Layout.js.map +1 -1
  20. package/dist/lib/components/navigation/NavigationItem.js +2 -2
  21. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  22. package/dist/lib/errors/ErrorAlert.js +1 -1
  23. package/dist/lib/errors/RouterError.d.ts +3 -1
  24. package/dist/lib/errors/RouterError.js +3 -2
  25. package/dist/lib/errors/RouterError.js.map +1 -1
  26. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
  27. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -1
  28. package/dist/lib/plugins/openapi/OperationList.js +2 -1
  29. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  30. package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
  31. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  32. package/dist/lib/plugins/openapi/ParameterList.js +7 -4
  33. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  34. package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
  35. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  36. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +4 -1
  37. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  38. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +1 -2
  39. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +15 -6
  40. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  41. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -2
  42. package/dist/lib/plugins/openapi/Sidecar.js +39 -15
  43. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  44. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  45. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  46. package/dist/lib/plugins/openapi/SidecarExamples.js +15 -16
  47. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  48. package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
  49. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
  50. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  51. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  52. package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
  53. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
  54. package/dist/lib/plugins/openapi/interfaces.d.ts +13 -0
  55. package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
  56. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  57. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
  58. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
  59. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
  60. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  61. package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
  62. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  63. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +8 -0
  64. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
  65. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  66. package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
  67. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  68. package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
  69. package/dist/lib/plugins/openapi/playground/Playground.js +56 -28
  70. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  71. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
  72. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  73. package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
  74. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  75. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
  76. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
  77. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
  78. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
  79. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
  80. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
  81. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
  82. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
  83. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
  84. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
  85. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
  86. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
  87. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  88. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
  89. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  90. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -7
  91. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  92. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
  93. package/dist/lib/plugins/openapi/schema/SchemaView.js +20 -9
  94. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  95. package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
  96. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
  97. package/dist/lib/ui/Badge.d.ts +3 -3
  98. package/dist/lib/ui/Badge.js +9 -7
  99. package/dist/lib/ui/Badge.js.map +1 -1
  100. package/dist/lib/ui/Button.d.ts +1 -1
  101. package/dist/lib/ui/Button.js +1 -0
  102. package/dist/lib/ui/Button.js.map +1 -1
  103. package/dist/lib/ui/Checkbox.d.ts +2 -2
  104. package/dist/lib/ui/Checkbox.js +4 -4
  105. package/dist/lib/ui/Checkbox.js.map +1 -1
  106. package/dist/lib/ui/CodeBlock.js +1 -1
  107. package/dist/lib/ui/CodeBlock.js.map +1 -1
  108. package/dist/lib/ui/Collapsible.d.ts +4 -4
  109. package/dist/lib/ui/Collapsible.js +11 -4
  110. package/dist/lib/ui/Collapsible.js.map +1 -1
  111. package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
  112. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  113. package/dist/lib/ui/Frame.d.ts +8 -0
  114. package/dist/lib/ui/Frame.js +22 -0
  115. package/dist/lib/ui/Frame.js.map +1 -0
  116. package/dist/lib/ui/Item.d.ts +23 -0
  117. package/dist/lib/ui/Item.js +67 -0
  118. package/dist/lib/ui/Item.js.map +1 -0
  119. package/dist/lib/ui/NativeSelect.d.ts +5 -0
  120. package/dist/lib/ui/NativeSelect.js +14 -0
  121. package/dist/lib/ui/NativeSelect.js.map +1 -0
  122. package/dist/lib/ui/Select.d.ts +13 -11
  123. package/dist/lib/ui/Select.js +34 -23
  124. package/dist/lib/ui/Select.js.map +1 -1
  125. package/dist/lib/util/readFrontmatter.d.ts +6 -0
  126. package/dist/lib/util/readFrontmatter.js +12 -0
  127. package/dist/lib/util/readFrontmatter.js.map +1 -0
  128. package/dist/vite/mdx/remark-last-modified.js +57 -3
  129. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  130. package/dist/vite/plugin-api.js +2 -2
  131. package/dist/vite/plugin-api.js.map +1 -1
  132. package/dist/vite/plugin-frontmatter.js +3 -5
  133. package/dist/vite/plugin-frontmatter.js.map +1 -1
  134. package/dist/vite/plugin-markdown-export.js +3 -4
  135. package/dist/vite/plugin-markdown-export.js.map +1 -1
  136. package/lib/{Button-DmS4u8Lj.js → Button-B3ucvvQw.js} +7 -6
  137. package/lib/Button-B3ucvvQw.js.map +1 -0
  138. package/lib/{ErrorAlert--3alJ_-b.js → ErrorAlert-BOVgwTRP.js} +2555 -2609
  139. package/lib/ErrorAlert-BOVgwTRP.js.map +1 -0
  140. package/lib/{MdxPage-Bpa9tL63.js → MdxPage-CBYFyqUs.js} +6 -6
  141. package/lib/{MdxPage-Bpa9tL63.js.map → MdxPage-CBYFyqUs.js.map} +1 -1
  142. package/lib/{OAuthErrorPage-B79J86Fo.js → OAuthErrorPage-DlTYnbLO.js} +4 -4
  143. package/lib/{OAuthErrorPage-B79J86Fo.js.map → OAuthErrorPage-DlTYnbLO.js.map} +1 -1
  144. package/lib/{OasProvider-jr0oDSFy.js → OasProvider-DIPAQ79S.js} +2 -2
  145. package/lib/{OasProvider-jr0oDSFy.js.map → OasProvider-DIPAQ79S.js.map} +1 -1
  146. package/lib/{OperationList-DLEAg4qw.js → OperationList-BOTFIfda.js} +2053 -1830
  147. package/lib/OperationList-BOTFIfda.js.map +1 -0
  148. package/lib/{Pagination-H2HW9-Er.js → Pagination-BOZ9Pxcw.js} +2 -2
  149. package/lib/{Pagination-H2HW9-Er.js.map → Pagination-BOZ9Pxcw.js.map} +1 -1
  150. package/lib/{RouteGuard-CjzxosTf.js → RouteGuard-Brz95MSt.js} +2 -2
  151. package/lib/{RouteGuard-CjzxosTf.js.map → RouteGuard-Brz95MSt.js.map} +1 -1
  152. package/lib/RouterError-DQS_bMwf.js +42 -0
  153. package/lib/RouterError-DQS_bMwf.js.map +1 -0
  154. package/lib/{SchemaList-CSDSazqV.js → SchemaList-Bu95q_q2.js} +7 -7
  155. package/lib/{SchemaList-CSDSazqV.js.map → SchemaList-Bu95q_q2.js.map} +1 -1
  156. package/lib/SchemaView-CaxK_HV4.js +586 -0
  157. package/lib/SchemaView-CaxK_HV4.js.map +1 -0
  158. package/lib/Select-DFRCS31-.js +399 -0
  159. package/lib/Select-DFRCS31-.js.map +1 -0
  160. package/lib/{SignUp-Fycafbyg.js → SignUp-CfB278ao.js} +2 -2
  161. package/lib/{SignUp-Fycafbyg.js.map → SignUp-CfB278ao.js.map} +1 -1
  162. package/lib/{Toc-ChkOg2UU.js → Toc-DQIqdghO.js} +2 -2
  163. package/lib/{Toc-ChkOg2UU.js.map → Toc-DQIqdghO.js.map} +1 -1
  164. package/lib/{circular-DGfd8SGc.js → circular-B-_VyILZ.js} +6360 -5953
  165. package/lib/circular-B-_VyILZ.js.map +1 -0
  166. package/lib/{createServer-DGD8hEzT.js → createServer-C5lXk4ba.js} +770 -735
  167. package/lib/createServer-C5lXk4ba.js.map +1 -0
  168. package/lib/{errors-BTpjwHS6.js → errors-DqoyOKev.js} +2 -2
  169. package/lib/{errors-BTpjwHS6.js.map → errors-DqoyOKev.js.map} +1 -1
  170. package/lib/index-B7yD7ZUk.js +3680 -0
  171. package/lib/index-B7yD7ZUk.js.map +1 -0
  172. package/lib/{index-Bvas0H4x.js → index-BG79m3lF.js} +2 -2
  173. package/lib/{index-Bvas0H4x.js.map → index-BG79m3lF.js.map} +1 -1
  174. package/lib/{index-FNRZUtwo.js → index-DHDtI9H5.js} +3 -3
  175. package/lib/{index-FNRZUtwo.js.map → index-DHDtI9H5.js.map} +1 -1
  176. package/lib/ui/ActionButton.js +1 -1
  177. package/lib/ui/Badge.js +27 -13
  178. package/lib/ui/Badge.js.map +1 -1
  179. package/lib/ui/Button.js +6 -5
  180. package/lib/ui/Button.js.map +1 -1
  181. package/lib/ui/Checkbox.js +29 -26
  182. package/lib/ui/Checkbox.js.map +1 -1
  183. package/lib/ui/CodeBlock.js +7 -7
  184. package/lib/ui/CodeBlock.js.map +1 -1
  185. package/lib/ui/Collapsible.js +32 -5
  186. package/lib/ui/Collapsible.js.map +1 -1
  187. package/lib/ui/EmbeddedCodeBlock.js +19 -18
  188. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  189. package/lib/ui/Frame.js +81 -0
  190. package/lib/ui/Frame.js.map +1 -0
  191. package/lib/ui/Item.js +188 -0
  192. package/lib/ui/Item.js.map +1 -0
  193. package/lib/ui/NativeSelect.js +57 -0
  194. package/lib/ui/NativeSelect.js.map +1 -0
  195. package/lib/ui/Select.js +166 -116
  196. package/lib/ui/Select.js.map +1 -1
  197. package/lib/ui/Tabs.js +10 -10
  198. package/lib/zudoku.__internal.js +345 -345
  199. package/lib/zudoku.__internal.js.map +1 -1
  200. package/lib/zudoku.auth-auth0.js +7 -7
  201. package/lib/zudoku.auth-auth0.js.map +1 -1
  202. package/lib/zudoku.auth-azureb2c.js +3 -3
  203. package/lib/zudoku.auth-clerk.js +1 -1
  204. package/lib/zudoku.auth-openid.js +3 -3
  205. package/lib/zudoku.auth-supabase.js +3 -3
  206. package/lib/zudoku.components.js +2 -2
  207. package/lib/zudoku.plugin-api-catalog.js +3 -3
  208. package/lib/zudoku.plugin-api-keys.js +4 -4
  209. package/lib/zudoku.plugin-markdown.js +1 -1
  210. package/lib/zudoku.plugin-openapi.js +1 -1
  211. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  212. package/package.json +4 -4
  213. package/src/app/main.tsx +5 -1
  214. package/src/lib/authentication/providers/auth0.tsx +6 -1
  215. package/src/lib/components/Autocomplete.tsx +11 -2
  216. package/src/lib/components/Layout.tsx +3 -2
  217. package/src/lib/components/navigation/NavigationItem.tsx +7 -20
  218. package/src/lib/errors/ErrorAlert.tsx +1 -1
  219. package/src/lib/errors/RouterError.tsx +7 -2
  220. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +2 -2
  221. package/src/lib/plugins/openapi/OperationList.tsx +3 -1
  222. package/src/lib/plugins/openapi/OperationListItem.tsx +7 -7
  223. package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
  224. package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
  225. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +36 -13
  226. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +67 -44
  227. package/src/lib/plugins/openapi/Sidecar.tsx +84 -41
  228. package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
  229. package/src/lib/plugins/openapi/SidecarExamples.tsx +59 -37
  230. package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
  231. package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
  232. package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
  233. package/src/lib/plugins/openapi/interfaces.ts +12 -0
  234. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
  235. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
  236. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
  237. package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
  238. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
  239. package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
  240. package/src/lib/plugins/openapi/playground/Playground.tsx +73 -35
  241. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
  242. package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
  243. package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
  244. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
  245. package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
  246. package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
  247. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
  248. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
  249. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -52
  250. package/src/lib/plugins/openapi/schema/SchemaView.tsx +82 -48
  251. package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
  252. package/src/lib/ui/Badge.tsx +21 -12
  253. package/src/lib/ui/Button.tsx +1 -0
  254. package/src/lib/ui/Checkbox.tsx +23 -24
  255. package/src/lib/ui/CodeBlock.tsx +3 -3
  256. package/src/lib/ui/Collapsible.tsx +26 -4
  257. package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -18
  258. package/src/lib/ui/Frame.tsx +81 -0
  259. package/src/lib/ui/Item.tsx +192 -0
  260. package/src/lib/ui/NativeSelect.tsx +47 -0
  261. package/src/lib/ui/Select.tsx +153 -126
  262. package/src/lib/util/readFrontmatter.ts +13 -0
  263. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
  264. package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
  265. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
  266. package/lib/Button-DmS4u8Lj.js.map +0 -1
  267. package/lib/ErrorAlert--3alJ_-b.js.map +0 -1
  268. package/lib/OperationList-DLEAg4qw.js.map +0 -1
  269. package/lib/RouterError-DZS2d6Sc.js +0 -41
  270. package/lib/RouterError-DZS2d6Sc.js.map +0 -1
  271. package/lib/SchemaView-DJiBd0_5.js +0 -397
  272. package/lib/SchemaView-DJiBd0_5.js.map +0 -1
  273. package/lib/Select-C1DeCqKv.js +0 -372
  274. package/lib/Select-C1DeCqKv.js.map +0 -1
  275. package/lib/circular-DGfd8SGc.js.map +0 -1
  276. package/lib/createServer-DGD8hEzT.js.map +0 -1
  277. package/lib/index-DP1xZgfJ.js +0 -3364
  278. package/lib/index-DP1xZgfJ.js.map +0 -1
  279. package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
@@ -1,6 +1,6 @@
1
- import { u as a } from "./ZudokuContext-BUZ5hkWB.js";
2
- import { OpenIDAuthenticationProvider as r } from "./zudoku.auth-openid.js";
3
- class c extends r {
1
+ import { u as r } from "./ZudokuContext-BUZ5hkWB.js";
2
+ import { OpenIDAuthenticationProvider as a } from "./zudoku.auth-openid.js";
3
+ class p extends a {
4
4
  options;
5
5
  constructor(t) {
6
6
  super({
@@ -13,11 +13,11 @@ class c extends r {
13
13
  }), this.options = t.options;
14
14
  }
15
15
  onAuthorizationUrl = async (t, { isSignUp: e }) => {
16
- this.options?.alwaysPromptLogin !== !1 && t.searchParams.set("prompt", "login"), e && t.searchParams.set("screen_hint", "signup");
16
+ this.options?.prompt !== void 0 ? this.options.prompt !== "" && t.searchParams.set("prompt", this.options.prompt) : this.options?.alwaysPromptLogin !== !1 && t.searchParams.set("prompt", "login"), e && t.searchParams.set("screen_hint", "signup");
17
17
  };
18
18
  signOut = async (t) => {
19
19
  const e = await this.getAuthServer(), i = await this.getAccessToken();
20
- a.setState({
20
+ r.setState({
21
21
  isAuthenticated: !1,
22
22
  isPending: !1,
23
23
  profile: void 0,
@@ -36,8 +36,8 @@ class c extends r {
36
36
  );
37
37
  };
38
38
  }
39
- const u = (s) => new c(s);
39
+ const h = (s) => new p(s);
40
40
  export {
41
- u as default
41
+ h as default
42
42
  };
43
43
  //# sourceMappingURL=zudoku.auth-auth0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zudoku.auth-auth0.js","sources":["../src/lib/authentication/providers/auth0.tsx"],"sourcesContent":["import type { Auth0AuthenticationConfig } from \"../../../config/config.js\";\nimport type {\n AuthActionContext,\n AuthenticationPlugin,\n AuthenticationProviderInitializer,\n} from \"../authentication.js\";\nimport { useAuthState } from \"../state.js\";\nimport { OpenIDAuthenticationProvider } from \"./openid.js\";\n\nclass Auth0AuthenticationProvider\n extends OpenIDAuthenticationProvider\n implements AuthenticationPlugin\n{\n private readonly options: Auth0AuthenticationConfig[\"options\"];\n constructor(config: Auth0AuthenticationConfig) {\n super({\n ...config,\n type: \"openid\",\n issuer: `https://${config.domain}/`,\n clientId: config.clientId,\n audience: config.audience,\n scopes: config.scopes,\n });\n this.options = config.options;\n }\n\n onAuthorizationUrl = async (\n url: URL,\n { isSignUp }: { isSignUp: boolean },\n ) => {\n if (this.options?.alwaysPromptLogin !== false) {\n url.searchParams.set(\"prompt\", \"login\");\n }\n if (isSignUp) {\n url.searchParams.set(\"screen_hint\", \"signup\");\n }\n };\n\n signOut = async (_: AuthActionContext): Promise<void> => {\n const as = await this.getAuthServer();\n const idToken = await this.getAccessToken();\n\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n providerData: undefined,\n });\n\n const redirectUrl = new URL(window.location.origin);\n redirectUrl.pathname = this.redirectToAfterSignOut;\n\n // SEE: https://auth0.com/docs/authenticate/login/logout/log-users-out-of-auth0\n // For Auth0 tenants created on or after 14 November 2023, RP-Initiated\n // Logout End Session Endpoint Discovery is enabled by default.\n // Otherwise we fallback to the old non-compliant logout\n\n // The endSessionEndpoint is set, the IdP supports some form of logout,\n // so we use the IdP logout. Otherwise, just redirect the user to home\n if (as.end_session_endpoint) {\n const logoutUrl = new URL(as.end_session_endpoint);\n if (idToken) {\n logoutUrl.searchParams.set(\"id_token_hint\", idToken);\n }\n logoutUrl.searchParams.set(\n \"post_logout_redirect_uri\",\n redirectUrl.toString(),\n );\n\n // window.location.href = logoutUrl.toString();\n } else {\n const _logoutUrl = new URL(\n `${this.issuer.replace(/\\/$/, \"\")}/oidc/logout`,\n );\n // window.location.href = logoutUrl.toString();\n }\n };\n}\n\nconst auth0Auth: AuthenticationProviderInitializer<\n Auth0AuthenticationConfig\n> = (options) => new Auth0AuthenticationProvider(options);\n\nexport default auth0Auth;\n"],"names":["Auth0AuthenticationProvider","OpenIDAuthenticationProvider","config","url","isSignUp","_","as","idToken","useAuthState","redirectUrl","logoutUrl","auth0Auth","options"],"mappings":";;AASA,MAAMA,UACIC,EAEV;AAAA,EACmB;AAAA,EACjB,YAAYC,GAAmC;AAC7C,UAAM;AAAA,MACJ,GAAGA;AAAA,MACH,MAAM;AAAA,MACN,QAAQ,WAAWA,EAAO,MAAM;AAAA,MAChC,UAAUA,EAAO;AAAA,MACjB,UAAUA,EAAO;AAAA,MACjB,QAAQA,EAAO;AAAA,IAAA,CAChB,GACD,KAAK,UAAUA,EAAO;AAAA,EACxB;AAAA,EAEA,qBAAqB,OACnBC,GACA,EAAE,UAAAC,QACC;AACH,IAAI,KAAK,SAAS,sBAAsB,MACtCD,EAAI,aAAa,IAAI,UAAU,OAAO,GAEpCC,KACFD,EAAI,aAAa,IAAI,eAAe,QAAQ;AAAA,EAEhD;AAAA,EAEA,UAAU,OAAOE,MAAwC;AACvD,UAAMC,IAAK,MAAM,KAAK,cAAA,GAChBC,IAAU,MAAM,KAAK,eAAA;AAE3B,IAAAC,EAAa,SAAS;AAAA,MACpB,iBAAiB;AAAA,MACjB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,cAAc;AAAA,IAAA,CACf;AAED,UAAMC,IAAc,IAAI,IAAI,OAAO,SAAS,MAAM;AAUlD,QATAA,EAAY,WAAW,KAAK,wBASxBH,EAAG,sBAAsB;AAC3B,YAAMI,IAAY,IAAI,IAAIJ,EAAG,oBAAoB;AACjD,MAAIC,KACFG,EAAU,aAAa,IAAI,iBAAiBH,CAAO,GAErDG,EAAU,aAAa;AAAA,QACrB;AAAA,QACAD,EAAY,SAAA;AAAA,MAAS;AAAA,IAIzB;AACqB,UAAI;AAAA,QACrB,GAAG,KAAK,OAAO,QAAQ,OAAO,EAAE,CAAC;AAAA,MAAA;AAAA,EAIvC;AACF;AAEA,MAAME,IAEF,CAACC,MAAY,IAAIZ,EAA4BY,CAAO;"}
1
+ {"version":3,"file":"zudoku.auth-auth0.js","sources":["../src/lib/authentication/providers/auth0.tsx"],"sourcesContent":["import type { Auth0AuthenticationConfig } from \"../../../config/config.js\";\nimport type {\n AuthActionContext,\n AuthenticationPlugin,\n AuthenticationProviderInitializer,\n} from \"../authentication.js\";\nimport { useAuthState } from \"../state.js\";\nimport { OpenIDAuthenticationProvider } from \"./openid.js\";\n\nclass Auth0AuthenticationProvider\n extends OpenIDAuthenticationProvider\n implements AuthenticationPlugin\n{\n private readonly options: Auth0AuthenticationConfig[\"options\"];\n constructor(config: Auth0AuthenticationConfig) {\n super({\n ...config,\n type: \"openid\",\n issuer: `https://${config.domain}/`,\n clientId: config.clientId,\n audience: config.audience,\n scopes: config.scopes,\n });\n this.options = config.options;\n }\n\n onAuthorizationUrl = async (\n url: URL,\n { isSignUp }: { isSignUp: boolean },\n ) => {\n if (this.options?.prompt !== undefined) {\n if (this.options.prompt !== \"\") {\n url.searchParams.set(\"prompt\", this.options.prompt);\n }\n } else if (this.options?.alwaysPromptLogin !== false) {\n url.searchParams.set(\"prompt\", \"login\");\n }\n\n if (isSignUp) {\n url.searchParams.set(\"screen_hint\", \"signup\");\n }\n };\n\n signOut = async (_: AuthActionContext): Promise<void> => {\n const as = await this.getAuthServer();\n const idToken = await this.getAccessToken();\n\n useAuthState.setState({\n isAuthenticated: false,\n isPending: false,\n profile: undefined,\n providerData: undefined,\n });\n\n const redirectUrl = new URL(window.location.origin);\n redirectUrl.pathname = this.redirectToAfterSignOut;\n\n // SEE: https://auth0.com/docs/authenticate/login/logout/log-users-out-of-auth0\n // For Auth0 tenants created on or after 14 November 2023, RP-Initiated\n // Logout End Session Endpoint Discovery is enabled by default.\n // Otherwise we fallback to the old non-compliant logout\n\n // The endSessionEndpoint is set, the IdP supports some form of logout,\n // so we use the IdP logout. Otherwise, just redirect the user to home\n if (as.end_session_endpoint) {\n const logoutUrl = new URL(as.end_session_endpoint);\n if (idToken) {\n logoutUrl.searchParams.set(\"id_token_hint\", idToken);\n }\n logoutUrl.searchParams.set(\n \"post_logout_redirect_uri\",\n redirectUrl.toString(),\n );\n\n // window.location.href = logoutUrl.toString();\n } else {\n const _logoutUrl = new URL(\n `${this.issuer.replace(/\\/$/, \"\")}/oidc/logout`,\n );\n // window.location.href = logoutUrl.toString();\n }\n };\n}\n\nconst auth0Auth: AuthenticationProviderInitializer<\n Auth0AuthenticationConfig\n> = (options) => new Auth0AuthenticationProvider(options);\n\nexport default auth0Auth;\n"],"names":["Auth0AuthenticationProvider","OpenIDAuthenticationProvider","config","url","isSignUp","_","as","idToken","useAuthState","redirectUrl","logoutUrl","auth0Auth","options"],"mappings":";;AASA,MAAMA,UACIC,EAEV;AAAA,EACmB;AAAA,EACjB,YAAYC,GAAmC;AAC7C,UAAM;AAAA,MACJ,GAAGA;AAAA,MACH,MAAM;AAAA,MACN,QAAQ,WAAWA,EAAO,MAAM;AAAA,MAChC,UAAUA,EAAO;AAAA,MACjB,UAAUA,EAAO;AAAA,MACjB,QAAQA,EAAO;AAAA,IAAA,CAChB,GACD,KAAK,UAAUA,EAAO;AAAA,EACxB;AAAA,EAEA,qBAAqB,OACnBC,GACA,EAAE,UAAAC,QACC;AACH,IAAI,KAAK,SAAS,WAAW,SACvB,KAAK,QAAQ,WAAW,MAC1BD,EAAI,aAAa,IAAI,UAAU,KAAK,QAAQ,MAAM,IAE3C,KAAK,SAAS,sBAAsB,MAC7CA,EAAI,aAAa,IAAI,UAAU,OAAO,GAGpCC,KACFD,EAAI,aAAa,IAAI,eAAe,QAAQ;AAAA,EAEhD;AAAA,EAEA,UAAU,OAAOE,MAAwC;AACvD,UAAMC,IAAK,MAAM,KAAK,cAAA,GAChBC,IAAU,MAAM,KAAK,eAAA;AAE3B,IAAAC,EAAa,SAAS;AAAA,MACpB,iBAAiB;AAAA,MACjB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,cAAc;AAAA,IAAA,CACf;AAED,UAAMC,IAAc,IAAI,IAAI,OAAO,SAAS,MAAM;AAUlD,QATAA,EAAY,WAAW,KAAK,wBASxBH,EAAG,sBAAsB;AAC3B,YAAMI,IAAY,IAAI,IAAIJ,EAAG,oBAAoB;AACjD,MAAIC,KACFG,EAAU,aAAa,IAAI,iBAAiBH,CAAO,GAErDG,EAAU,aAAa;AAAA,QACrB;AAAA,QACAD,EAAY,SAAA;AAAA,MAAS;AAAA,IAIzB;AACqB,UAAI;AAAA,QACrB,GAAG,KAAK,OAAO,QAAQ,OAAO,EAAE,CAAC;AAAA,MAAA;AAAA,EAIvC;AACF;AAEA,MAAME,IAEF,CAACC,MAAY,IAAIZ,EAA4BY,CAAO;"}
@@ -1,10 +1,10 @@
1
1
  import { j as n } from "./jsx-runtime-BzflLqGi.js";
2
2
  import { PublicClientApplication as A, EventType as f } from "@azure/msal-browser";
3
- import { E as I } from "./index-FNRZUtwo.js";
3
+ import { E as I } from "./index-DHDtI9H5.js";
4
4
  import { C as T } from "./ClientOnly-E7hGysn1.js";
5
5
  import { j as S, u as h } from "./ZudokuContext-BUZ5hkWB.js";
6
- import { C, A as c } from "./errors-BTpjwHS6.js";
7
- import { C as k, O as w } from "./OAuthErrorPage-B79J86Fo.js";
6
+ import { C, A as c } from "./errors-DqoyOKev.js";
7
+ import { C as k, O as w } from "./OAuthErrorPage-DlTYnbLO.js";
8
8
  const u = "/oauth/callback";
9
9
  class y extends C {
10
10
  msalInstance;
@@ -1,6 +1,6 @@
1
1
  import { j as l } from "./jsx-runtime-BzflLqGi.js";
2
2
  import { LogOutIcon as f } from "lucide-react";
3
- import { S as w, a as p, b as v } from "./SignUp-Fycafbyg.js";
3
+ import { S as w, a as p, b as v } from "./SignUp-CfB278ao.js";
4
4
  import { u as n } from "./ZudokuContext-BUZ5hkWB.js";
5
5
  const b = ({
6
6
  clerkPubKey: d,
@@ -1,10 +1,10 @@
1
1
  import { j as D } from "./jsx-runtime-BzflLqGi.js";
2
2
  import { g as Le } from "./invariant-Bm-FVUQE.js";
3
- import { E as Ue } from "./index-FNRZUtwo.js";
3
+ import { E as Ue } from "./index-DHDtI9H5.js";
4
4
  import { C as xe } from "./ClientOnly-E7hGysn1.js";
5
5
  import { j as Ce, u as S } from "./ZudokuContext-BUZ5hkWB.js";
6
- import { C as Ie, O as re, A as R } from "./errors-BTpjwHS6.js";
7
- import { C as je, O as Oe } from "./OAuthErrorPage-B79J86Fo.js";
6
+ import { C as Ie, O as re, A as R } from "./errors-DqoyOKev.js";
7
+ import { C as je, O as Oe } from "./OAuthErrorPage-DlTYnbLO.js";
8
8
  var J = { exports: {} }, De = J.exports, oe;
9
9
  function Je() {
10
10
  return oe || (oe = 1, (function(t) {
@@ -1,12 +1,12 @@
1
1
  import { j as i } from "./jsx-runtime-BzflLqGi.js";
2
2
  import { createClient as h } from "@supabase/supabase-js";
3
- import { C as m, A as g } from "./errors-BTpjwHS6.js";
4
- import { S as f } from "./SignUp-Fycafbyg.js";
3
+ import { C as m, A as g } from "./errors-DqoyOKev.js";
4
+ import { S as f } from "./SignUp-CfB278ao.js";
5
5
  import { u } from "./ZudokuContext-BUZ5hkWB.js";
6
6
  import { Auth as v } from "@supabase/auth-ui-react";
7
7
  import { ThemeSupa as S } from "@supabase/auth-ui-shared";
8
8
  import { a as A } from "./chunk-PVWAREVJ-BMhpCH5D.js";
9
- import { H as T } from "./ErrorAlert--3alJ_-b.js";
9
+ import { H as T } from "./ErrorAlert-BOVgwTRP.js";
10
10
  const d = ({
11
11
  client: s,
12
12
  config: e,
@@ -6,9 +6,9 @@ import "./ui/Button.js";
6
6
  import "./ui/Callout.js";
7
7
  import "./ClientOnly-E7hGysn1.js";
8
8
  import "./ZudokuContext-BUZ5hkWB.js";
9
- import "./ErrorAlert--3alJ_-b.js";
9
+ import "./ErrorAlert-BOVgwTRP.js";
10
10
  import "./Spinner-CI6bRyZw.js";
11
- import { B as d, i as h, C as l, d as k, c as S, L as y, M, e as T, S as Z, T as c, Z as f, g, h as A, f as B, j as E, u as H } from "./index-FNRZUtwo.js";
11
+ import { B as d, i as h, C as l, d as k, c as S, L as y, M, e as T, S as Z, T as c, Z as f, g, h as A, f as B, j as E, u as H } from "./index-DHDtI9H5.js";
12
12
  export {
13
13
  d as Button,
14
14
  h as CACHE_KEYS,
@@ -1,10 +1,10 @@
1
1
  import { j as t } from "./jsx-runtime-BzflLqGi.js";
2
- import { s as f } from "./index-Bvas0H4x.js";
2
+ import { s as f } from "./index-BG79m3lF.js";
3
3
  import { e as b, m as j } from "./chunk-PVWAREVJ-BMhpCH5D.js";
4
4
  import { u as x, b as v, j as d } from "./ZudokuContext-BUZ5hkWB.js";
5
5
  import { H as y } from "./index.esm-BnYHxCYC.js";
6
- import { L as N } from "./index-FNRZUtwo.js";
7
- import { H as k, M as S } from "./ErrorAlert--3alJ_-b.js";
6
+ import { L as N } from "./index-DHDtI9H5.js";
7
+ import { H as k, M as S } from "./ErrorAlert-BOVgwTRP.js";
8
8
  const w = ({
9
9
  items: o,
10
10
  filterCatalogItems: r = (i) => i,
@@ -1,13 +1,13 @@
1
1
  import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
2
  import { CircleSlashIcon as z, CheckIcon as ue, XIcon as he, PencilLineIcon as fe, RefreshCwIcon as pe, TrashIcon as me, KeyRoundIcon as xe } from "lucide-react";
3
- import { R as ye } from "./RouterError-DZS2d6Sc.js";
3
+ import { R as ye } from "./RouterError-DQS_bMwf.js";
4
4
  import { i as I } from "./invariant-Bm-FVUQE.js";
5
5
  import { O as ge, u as je } from "./chunk-PVWAREVJ-BMhpCH5D.js";
6
6
  import { u as Ce } from "./hook-CMeoxziF.js";
7
- import { D as ve, a as Y } from "./ErrorAlert--3alJ_-b.js";
7
+ import { D as ve, a as Y } from "./ErrorAlert-BOVgwTRP.js";
8
8
  import { Button as w } from "./ui/Button.js";
9
9
  import { a as se, g as ne, b as we } from "./ZudokuContext-BUZ5hkWB.js";
10
- import { u as O, A as M, a as q, b as ke, S as be, c as Ne, d as Ke, e as Ee, f as De, g as Z, h as Ae } from "./Select-C1DeCqKv.js";
10
+ import { u as O, A as M, a as q, b as ke, S as be, c as Ne, d as Ke, e as Ee, f as De, g as Z, h as Ae } from "./Select-DFRCS31-.js";
11
11
  import * as L from "react";
12
12
  import Pe, { createContext as Q, useRef as E, useLayoutEffect as Ie, useEffect as re, useId as _, useContext as B, useInsertionEffect as Re, useMemo as F, useCallback as Se, Children as Te, isValidElement as Oe, useState as K, forwardRef as Me } from "react";
13
13
  import { C as qe, a as $e } from "./Card-KFniaZn5.js";
@@ -15,7 +15,7 @@ import { e as H, f as D, D as V, g as G, a as J, b as U, c as W, d as ie } from
15
15
  import { Input as ae } from "./ui/Input.js";
16
16
  import { c as A } from "./cn-dYga0KKN.js";
17
17
  import { a as ze } from "./index.esm-BYObtETB.js";
18
- import { B as Fe } from "./Button-DmS4u8Lj.js";
18
+ import { B as Fe } from "./Button-B3ucvvQw.js";
19
19
  import { S as Le } from "./Spinner-CI6bRyZw.js";
20
20
  import { useAuth as Qe } from "./zudoku.hooks.js";
21
21
  const _e = () => {
@@ -4,7 +4,7 @@ const p = (t) => ({
4
4
  ([e, a]) => ({
5
5
  path: e,
6
6
  lazy: async () => {
7
- const { MdxPage: n } = await import("./MdxPage-Bpa9tL63.js"), { default: o, ...s } = await a();
7
+ const { MdxPage: n } = await import("./MdxPage-CBYFyqUs.js"), { default: o, ...s } = await a();
8
8
  return {
9
9
  element: /* @__PURE__ */ r.jsx(
10
10
  n,
@@ -3,7 +3,7 @@ import "lucide-react";
3
3
  import "./chunk-PVWAREVJ-BMhpCH5D.js";
4
4
  import "./ui/Button.js";
5
5
  import "./ZudokuContext-BUZ5hkWB.js";
6
- import { y as e, U as n, z as s } from "./index-DP1xZgfJ.js";
6
+ import { y as e, U as n, z as s } from "./index-B7yD7ZUk.js";
7
7
  export {
8
8
  e as GetNavigationOperationsQuery,
9
9
  n as UNTAGGED_PATH,
@@ -3,12 +3,12 @@ import { C as w } from "./ClientOnly-E7hGysn1.js";
3
3
  import { VisuallyHidden as I } from "@radix-ui/react-visually-hidden";
4
4
  import { j as k, u as N, a as _, l as j, m as L } from "./ZudokuContext-BUZ5hkWB.js";
5
5
  import { useRef as C, useLayoutEffect as T, useState as E } from "react";
6
- import { B as R } from "./Button-DmS4u8Lj.js";
6
+ import { B as R } from "./Button-B3ucvvQw.js";
7
7
  import { ShieldAlertIcon as z, AlertTriangleIcon as F, InfoIcon as h, LightbulbIcon as q, BracketsIcon as A, FileTextIcon as P } from "lucide-react";
8
8
  import { c as m } from "./cn-dYga0KKN.js";
9
9
  import { C as $, a as b, b as f, c as D, d as B, e as O } from "./Command-CUcrW3qs.js";
10
10
  import { c as U } from "./Dialog-BQciPiHN.js";
11
- import { S as G } from "./RouteGuard-CjzxosTf.js";
11
+ import { S as G } from "./RouteGuard-Brz95MSt.js";
12
12
  import { u as H, L as p } from "./chunk-PVWAREVJ-BMhpCH5D.js";
13
13
  const K = {
14
14
  note: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.64.2",
3
+ "version": "0.65.0",
4
4
  "type": "module",
5
5
  "homepage": "https://zudoku.dev",
6
6
  "repository": {
@@ -197,9 +197,9 @@
197
197
  "estree-util-value-to-estree": "3.4.1",
198
198
  "express": "5.1.0",
199
199
  "fast-equals": "5.2.2",
200
- "glob": "11.0.3",
200
+ "glob": "11.1.0",
201
201
  "glob-parent": "6.0.2",
202
- "graphql": "16.11.0",
202
+ "graphql": "16.12.0",
203
203
  "graphql-type-json": "0.3.2",
204
204
  "graphql-yoga": "5.16.0",
205
205
  "gray-matter": "4.0.3",
@@ -269,7 +269,7 @@
269
269
  "@types/react-is": "19.2.0",
270
270
  "@types/semver": "7.7.0",
271
271
  "@types/unist": "^3.0.3",
272
- "@types/yargs": "17.0.33",
272
+ "@types/yargs": "17.0.35",
273
273
  "@vitest/coverage-v8": "3.2.4",
274
274
  "esbuild": "0.25.11",
275
275
  "happy-dom": "20.0.10",
package/src/app/main.tsx CHANGED
@@ -90,7 +90,11 @@ export const getRoutesByOptions = (
90
90
  }))
91
91
  : [],
92
92
  )
93
- .concat([{ path: "*", element: <StatusPage statusCode={404} /> }]);
93
+ .concat([{ path: "*", element: <StatusPage statusCode={404} /> }])
94
+ .map((route) => ({
95
+ ...route,
96
+ errorElement: <RouterError className="w-full m-0" />,
97
+ }));
94
98
 
95
99
  // @TODO Detect conflicts in routes and log warning
96
100
 
@@ -28,9 +28,14 @@ class Auth0AuthenticationProvider
28
28
  url: URL,
29
29
  { isSignUp }: { isSignUp: boolean },
30
30
  ) => {
31
- if (this.options?.alwaysPromptLogin !== false) {
31
+ if (this.options?.prompt !== undefined) {
32
+ if (this.options.prompt !== "") {
33
+ url.searchParams.set("prompt", this.options.prompt);
34
+ }
35
+ } else if (this.options?.alwaysPromptLogin !== false) {
32
36
  url.searchParams.set("prompt", "login");
33
37
  }
38
+
34
39
  if (isSignUp) {
35
40
  url.searchParams.set("screen_hint", "signup");
36
41
  }
@@ -11,12 +11,14 @@ import { Popover, PopoverContent } from "zudoku/ui/Popover.js";
11
11
  import { cn } from "../util/cn.js";
12
12
 
13
13
  type AutocompleteProps = {
14
- value: string;
14
+ value?: string | number | readonly string[] | undefined;
15
15
  options: readonly string[];
16
16
  onChange: (e: string) => void;
17
+ onSelect?: (e: string) => void;
17
18
  className?: string;
18
19
  placeholder?: string;
19
20
  onEnterPress?: (e: KeyboardEvent<HTMLInputElement>) => void;
21
+ onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
20
22
  ref?: Ref<HTMLInputElement>;
21
23
  shouldFilter?: boolean;
22
24
  };
@@ -28,7 +30,9 @@ const AutocompletePopover = ({
28
30
  className,
29
31
  placeholder = "Value",
30
32
  onEnterPress,
33
+ onKeyDown,
31
34
  ref,
35
+ onSelect,
32
36
  }: AutocompleteProps) => {
33
37
  const [open, setOpen] = useState(false);
34
38
  const [dontClose, setDontClose] = useState(false);
@@ -48,7 +52,7 @@ const AutocompletePopover = ({
48
52
  ref.current = el;
49
53
  }
50
54
  }}
51
- value={value}
55
+ value={value ? String(value) : undefined}
52
56
  placeholder={placeholder}
53
57
  className={cn("h-9 bg-transparent", className)}
54
58
  onFocus={() => setOpen(true)}
@@ -59,6 +63,10 @@ const AutocompletePopover = ({
59
63
  setOpen(false);
60
64
  }}
61
65
  onKeyDown={(e) => {
66
+ onKeyDown?.(e);
67
+
68
+ if (e.defaultPrevented) return;
69
+
62
70
  if (e.key === "Enter") {
63
71
  setOpen(false);
64
72
  inputRef.current?.blur();
@@ -91,6 +99,7 @@ const AutocompletePopover = ({
91
99
  key={enumValue}
92
100
  value={enumValue}
93
101
  onSelect={(selected) => {
102
+ onSelect?.(selected);
94
103
  onChange(selected);
95
104
  setOpen(false);
96
105
  }}
@@ -1,5 +1,6 @@
1
1
  import { type ReactNode, Suspense, useEffect } from "react";
2
2
  import { Outlet } from "react-router";
3
+ import { TooltipProvider } from "zudoku/ui/Tooltip.js";
3
4
  import { cn } from "../util/cn.js";
4
5
  import { useScrollToAnchor } from "../util/useScrollToAnchor.js";
5
6
  import { useScrollToTop } from "../util/useScrollToTop.js";
@@ -28,7 +29,7 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
28
29
  }, [authentication]);
29
30
 
30
31
  return (
31
- <>
32
+ <TooltipProvider>
32
33
  <Slot.Target name="layout-before-head" />
33
34
  <Header />
34
35
  <Slot.Target name="layout-after-head" />
@@ -45,6 +46,6 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
45
46
  </Suspense>
46
47
  </div>
47
48
  <Footer />
48
- </>
49
+ </TooltipProvider>
49
50
  );
50
51
  };
@@ -1,13 +1,7 @@
1
1
  import { ExternalLinkIcon } from "lucide-react";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { NavLink, useLocation } from "react-router";
4
- import {
5
- Tooltip,
6
- TooltipArrow,
7
- TooltipContent,
8
- TooltipProvider,
9
- TooltipTrigger,
10
- } from "zudoku/ui/Tooltip.js";
4
+ import { Tooltip, TooltipContent, TooltipTrigger } from "zudoku/ui/Tooltip.js";
11
5
  import type { NavigationItem as NavigationItemType } from "../../../config/validators/NavigationSchema.js";
12
6
  import { useAuth } from "../../authentication/hook.js";
13
7
  import { cn } from "../../util/cn.js";
@@ -47,19 +41,12 @@ const TruncatedLabel = ({
47
41
  {label}
48
42
  </span>
49
43
  {isTruncated && (
50
- <TooltipProvider delayDuration={500}>
51
- <Tooltip disableHoverableContent>
52
- <TooltipTrigger className="absolute inset-0 z-10" />
53
- <TooltipContent
54
- className="max-w-64 rounded-lg"
55
- side="bottom"
56
- align="center"
57
- >
58
- <TooltipArrow />
59
- {label}
60
- </TooltipContent>
61
- </Tooltip>
62
- </TooltipProvider>
44
+ <Tooltip disableHoverableContent>
45
+ <TooltipTrigger className="absolute inset-0 z-10" />
46
+ <TooltipContent className="max-w-64" side="bottom" align="center">
47
+ {label}
48
+ </TooltipContent>
49
+ </Tooltip>
63
50
  )}
64
51
  </>
65
52
  );
@@ -17,7 +17,7 @@ export function ErrorAlert({ error }: { error: unknown }) {
17
17
  const stringError = cause instanceof Error ? String(cause.stack) : stack;
18
18
 
19
19
  return (
20
- <Typography className="grid grid-cols-1 !max-w-none pt-(--padding-content-top)">
20
+ <Typography className="grid grid-cols-1 max-w-none! pt-(--padding-content-top)">
21
21
  <Heading level={1}>{title}</Heading>
22
22
  Error: {message}
23
23
  {hint && <DeveloperHint className="mb-4">{hint}</DeveloperHint>}
@@ -1,13 +1,18 @@
1
1
  import { isRouteErrorResponse, useRouteError } from "react-router";
2
2
  import { NotFoundPage } from "../components/NotFoundPage.js";
3
+ import { cn } from "../util/cn.js";
3
4
  import { ErrorAlert } from "./ErrorAlert.js";
4
5
 
5
- export function RouterError() {
6
+ export function RouterError({ className }: { className?: string }) {
6
7
  const error = useRouteError();
7
8
 
8
9
  if (isRouteErrorResponse(error) && error.status === 404) {
9
10
  return <NotFoundPage />;
10
11
  }
11
12
 
12
- return <ErrorAlert error={error} />;
13
+ return (
14
+ <div className={cn("mx-4 max-w-2xl", className)}>
15
+ <ErrorAlert error={error} />
16
+ </div>
17
+ );
13
18
  }
@@ -21,8 +21,8 @@ export const GeneratedExampleSidecarBox = ({
21
21
  return (
22
22
  <SidecarBox.Root>
23
23
  <SidecarBox.Head className="text-xs flex justify-between items-center">
24
- <div className="flex items-center gap-1.5 font-mono">
25
- Request Body Example
24
+ <div className="flex items-center gap-1.5">
25
+ <span className="font-medium">Request Body Example</span>
26
26
  <TooltipProvider>
27
27
  <Tooltip>
28
28
  <TooltipTrigger asChild>
@@ -146,6 +146,8 @@ const OperationsForTagQuery = graphql(/* GraphQL */ `
146
146
  }
147
147
  `);
148
148
 
149
+ const LAZY_OPERATION_LIST_THRESHOLD = 30;
150
+
149
151
  export const OperationList = ({
150
152
  tag,
151
153
  untagged,
@@ -202,7 +204,7 @@ export const OperationList = ({
202
204
 
203
205
  // Simple heuristic to determine if we should lazy highlight the code
204
206
  // This is to avoid the performance issues when there are a lot of operations
205
- const shouldLazyHighlight = operations.length > 30;
207
+ const shouldLazyHighlight = operations.length > LAZY_OPERATION_LIST_THRESHOLD;
206
208
 
207
209
  // The summary property is preferable here as it is a short description of
208
210
  // the API, whereas the description property is typically longer and supports
@@ -1,6 +1,7 @@
1
1
  import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
2
2
  import { useState } from "react";
3
3
  import { Badge } from "zudoku/ui/Badge.js";
4
+ import { Separator } from "zudoku/ui/Separator.js";
4
5
  import { Heading } from "../../components/Heading.js";
5
6
  import { Markdown } from "../../components/Markdown.js";
6
7
  import { cn } from "../../util/cn.js";
@@ -120,10 +121,13 @@ export const OperationListItem = ({
120
121
  []
121
122
  ),
122
123
  )}
124
+ {renderIf(operation.requestBody?.content?.at(0)?.schema, () => (
125
+ <Separator className="my-4" />
126
+ ))}
123
127
  {renderIf(
124
128
  operation.requestBody?.content?.at(0)?.schema,
125
129
  (schema) => (
126
- <div className="mt-4 flex flex-col gap-4">
130
+ <div className="flex flex-col gap-4">
127
131
  <Heading
128
132
  level={3}
129
133
  className="capitalize flex items-center gap-2"
@@ -145,13 +149,10 @@ export const OperationListItem = ({
145
149
  </div>
146
150
  ),
147
151
  )}
152
+ <Separator className="my-4" />
148
153
  {operation.responses.length > 0 && (
149
154
  <>
150
- <Heading
151
- level={3}
152
- className="capitalize mt-8 pt-8 border-t"
153
- id={`${operation.slug}/responses`}
154
- >
155
+ <Heading level={3} id={`${operation.slug}/responses`}>
155
156
  {operation.summary && (
156
157
  <VisuallyHidden>
157
158
  {operation.summary} &rsaquo;{" "}
@@ -172,7 +173,6 @@ export const OperationListItem = ({
172
173
  {renderIf(!options?.disableSidecar && !isMCPEndpoint, () => (
173
174
  <Sidecar
174
175
  selectedResponse={selectedResponse}
175
- onSelectResponse={setSelectedResponse}
176
176
  operation={operation}
177
177
  globalSelectedServer={globalSelectedServer}
178
178
  shouldLazyHighlight={shouldLazyHighlight}
@@ -1,6 +1,8 @@
1
1
  import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
2
+ import { Fragment } from "react";
2
3
  import { Heading } from "../../components/Heading.js";
3
- import { Card } from "../../ui/Card.js";
4
+ import { Frame, FramePanel } from "../../ui/Frame.js";
5
+ import { ItemGroup, ItemSeparator } from "../../ui/Item.js";
4
6
  import type { ParameterItem } from "./graphql/graphql.js";
5
7
  import type { ParameterGroup } from "./OperationListItem.js";
6
8
  import { ParameterListItem } from "./ParameterListItem.js";
@@ -15,25 +17,37 @@ export const ParameterList = ({
15
17
  group: ParameterGroup;
16
18
  parameters: ParameterItem[];
17
19
  id: string;
18
- }) => (
19
- <>
20
- <Heading level={3} id={`${id}/${group}-parameters`} className="capitalize">
21
- {summary && <VisuallyHidden>{summary} &rsaquo; </VisuallyHidden>}
22
- {group === "header" ? "Headers" : `${group} Parameters`}
23
- </Heading>
24
- <Card>
25
- <ul className="list-none m-0 px-0 divide-y ">
26
- {parameters
27
- .sort((a, b) => (a.required === b.required ? 0 : a.required ? -1 : 1))
28
- .map((parameter) => (
29
- <ParameterListItem
30
- key={`${parameter.name}-${parameter.in}`}
31
- parameter={parameter}
32
- id={id}
33
- group={group}
34
- />
35
- ))}
36
- </ul>
37
- </Card>
38
- </>
39
- );
20
+ }) => {
21
+ const sortedParameters = parameters.sort((a, b) =>
22
+ a.required === b.required ? 0 : a.required ? -1 : 1,
23
+ );
24
+
25
+ return (
26
+ <>
27
+ <Heading
28
+ level={3}
29
+ id={`${id}/${group}-parameters`}
30
+ className="capitalize"
31
+ >
32
+ {summary && <VisuallyHidden>{summary} &rsaquo; </VisuallyHidden>}
33
+ {group === "header" ? "Headers" : `${group} Parameters`}
34
+ </Heading>
35
+ <Frame>
36
+ <FramePanel className="p-0!">
37
+ <ItemGroup className="overflow-clip">
38
+ {sortedParameters.map((parameter) => (
39
+ <Fragment key={`${parameter.name}-${parameter.in}`}>
40
+ <ParameterListItem
41
+ parameter={parameter}
42
+ id={id}
43
+ group={group}
44
+ />
45
+ <ItemSeparator />
46
+ </Fragment>
47
+ ))}
48
+ </ItemGroup>
49
+ </FramePanel>
50
+ </Frame>
51
+ </>
52
+ );
53
+ };