zudoku 0.64.2 → 0.65.1
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.
- package/dist/app/main.d.ts +91 -1
- package/dist/app/main.js +5 -1
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +16 -16
- package/dist/config/validators/NavigationSchema.js +2 -4
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +53 -1
- package/dist/config/validators/validate.js +7 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +43 -0
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +6 -0
- package/dist/lib/authentication/providers/auth0.js +6 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +3 -1
- package/dist/lib/components/Autocomplete.js +6 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/RouterError.d.ts +3 -1
- package/dist/lib/errors/RouterError.js +3 -2
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +7 -4
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +4 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +1 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +15 -6
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -2
- package/dist/lib/plugins/openapi/Sidecar.js +39 -15
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +15 -16
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +13 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +56 -28
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -7
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +20 -9
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +3 -3
- package/dist/lib/ui/Badge.js +9 -7
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Button.js +1 -0
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -2
- package/dist/lib/ui/Checkbox.js +4 -4
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Collapsible.d.ts +4 -4
- package/dist/lib/ui/Collapsible.js +11 -4
- package/dist/lib/ui/Collapsible.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Frame.d.ts +8 -0
- package/dist/lib/ui/Frame.js +22 -0
- package/dist/lib/ui/Frame.js.map +1 -0
- package/dist/lib/ui/Item.d.ts +23 -0
- package/dist/lib/ui/Item.js +67 -0
- package/dist/lib/ui/Item.js.map +1 -0
- package/dist/lib/ui/NativeSelect.d.ts +5 -0
- package/dist/lib/ui/NativeSelect.js +14 -0
- package/dist/lib/ui/NativeSelect.js.map +1 -0
- package/dist/lib/ui/Select.d.ts +13 -11
- package/dist/lib/ui/Select.js +34 -23
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/util/readFrontmatter.d.ts +6 -0
- package/dist/lib/util/readFrontmatter.js +12 -0
- package/dist/lib/util/readFrontmatter.js.map +1 -0
- package/dist/vite/mdx/remark-last-modified.js +57 -3
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +3 -5
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +3 -4
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/lib/{Button-DmS4u8Lj.js → Button-B3ucvvQw.js} +7 -6
- package/lib/Button-B3ucvvQw.js.map +1 -0
- package/lib/{ErrorAlert--3alJ_-b.js → ErrorAlert-D5LKLFOd.js} +1100 -1112
- package/lib/ErrorAlert-D5LKLFOd.js.map +1 -0
- package/lib/{MdxPage-Bpa9tL63.js → MdxPage-hOCN-u-L.js} +6 -6
- package/lib/{MdxPage-Bpa9tL63.js.map → MdxPage-hOCN-u-L.js.map} +1 -1
- package/lib/{OAuthErrorPage-B79J86Fo.js → OAuthErrorPage-oXnxcJg4.js} +4 -4
- package/lib/{OAuthErrorPage-B79J86Fo.js.map → OAuthErrorPage-oXnxcJg4.js.map} +1 -1
- package/lib/{OasProvider-jr0oDSFy.js → OasProvider-BuBeRIHB.js} +2 -2
- package/lib/{OasProvider-jr0oDSFy.js.map → OasProvider-BuBeRIHB.js.map} +1 -1
- package/lib/{OperationList-DLEAg4qw.js → OperationList-Cx8TGKhB.js} +2053 -1830
- package/lib/OperationList-Cx8TGKhB.js.map +1 -0
- package/lib/{Pagination-H2HW9-Er.js → Pagination-lLSoHnxa.js} +2 -2
- package/lib/{Pagination-H2HW9-Er.js.map → Pagination-lLSoHnxa.js.map} +1 -1
- package/lib/{RouteGuard-CjzxosTf.js → RouteGuard-Brz95MSt.js} +2 -2
- package/lib/{RouteGuard-CjzxosTf.js.map → RouteGuard-Brz95MSt.js.map} +1 -1
- package/lib/RouterError-VGZB_wg4.js +42 -0
- package/lib/RouterError-VGZB_wg4.js.map +1 -0
- package/lib/{SchemaList-CSDSazqV.js → SchemaList-rBWXYJEb.js} +7 -7
- package/lib/{SchemaList-CSDSazqV.js.map → SchemaList-rBWXYJEb.js.map} +1 -1
- package/lib/SchemaView-jouS_xvc.js +586 -0
- package/lib/SchemaView-jouS_xvc.js.map +1 -0
- package/lib/Select-DFRCS31-.js +399 -0
- package/lib/Select-DFRCS31-.js.map +1 -0
- package/lib/{SignUp-Fycafbyg.js → SignUp-D2mmQOkg.js} +2 -2
- package/lib/{SignUp-Fycafbyg.js.map → SignUp-D2mmQOkg.js.map} +1 -1
- package/lib/{Toc-ChkOg2UU.js → Toc-CBWfFCVf.js} +2 -2
- package/lib/{Toc-ChkOg2UU.js.map → Toc-CBWfFCVf.js.map} +1 -1
- package/lib/{circular-DGfd8SGc.js → circular-CGkbVs2O.js} +6360 -5953
- package/lib/circular-CGkbVs2O.js.map +1 -0
- package/lib/{createServer-DGD8hEzT.js → createServer-CcV_75PW.js} +770 -735
- package/lib/createServer-CcV_75PW.js.map +1 -0
- package/lib/{errors-BTpjwHS6.js → errors-D7xzOd8X.js} +2 -2
- package/lib/{errors-BTpjwHS6.js.map → errors-D7xzOd8X.js.map} +1 -1
- package/lib/{index-Bvas0H4x.js → index-CF7_erXq.js} +2 -2
- package/lib/{index-Bvas0H4x.js.map → index-CF7_erXq.js.map} +1 -1
- package/lib/{index-FNRZUtwo.js → index-CPws05Tb.js} +3 -3
- package/lib/{index-FNRZUtwo.js.map → index-CPws05Tb.js.map} +1 -1
- package/lib/index-I4zC7Yht.js +3680 -0
- package/lib/index-I4zC7Yht.js.map +1 -0
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Badge.js +27 -13
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Button.js +6 -5
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Checkbox.js +29 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +7 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Collapsible.js +32 -5
- package/lib/ui/Collapsible.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +19 -18
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Frame.js +81 -0
- package/lib/ui/Frame.js.map +1 -0
- package/lib/ui/Item.js +188 -0
- package/lib/ui/Item.js.map +1 -0
- package/lib/ui/NativeSelect.js +57 -0
- package/lib/ui/NativeSelect.js.map +1 -0
- package/lib/ui/Select.js +166 -116
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Tabs.js +10 -10
- package/lib/zudoku.__internal.js +345 -345
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +7 -7
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +3 -3
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.auth-supabase.js +3 -3
- package/lib/zudoku.components.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/package.json +4 -4
- package/src/app/main.tsx +5 -1
- package/src/lib/authentication/providers/auth0.tsx +6 -1
- package/src/lib/components/Autocomplete.tsx +11 -2
- package/src/lib/components/Layout.tsx +3 -2
- package/src/lib/components/navigation/NavigationItem.tsx +7 -20
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/errors/RouterError.tsx +7 -2
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +3 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +7 -7
- package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
- package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +36 -13
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +67 -44
- package/src/lib/plugins/openapi/Sidecar.tsx +84 -41
- package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
- package/src/lib/plugins/openapi/SidecarExamples.tsx +59 -37
- package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
- package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
- package/src/lib/plugins/openapi/interfaces.ts +12 -0
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
- package/src/lib/plugins/openapi/playground/Playground.tsx +73 -35
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
- package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
- package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -52
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +82 -48
- package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
- package/src/lib/ui/Badge.tsx +21 -12
- package/src/lib/ui/Button.tsx +1 -0
- package/src/lib/ui/Checkbox.tsx +23 -24
- package/src/lib/ui/CodeBlock.tsx +3 -3
- package/src/lib/ui/Collapsible.tsx +26 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -18
- package/src/lib/ui/Frame.tsx +81 -0
- package/src/lib/ui/Item.tsx +192 -0
- package/src/lib/ui/NativeSelect.tsx +47 -0
- package/src/lib/ui/Select.tsx +153 -126
- package/src/lib/util/readFrontmatter.ts +13 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
- package/lib/Button-DmS4u8Lj.js.map +0 -1
- package/lib/ErrorAlert--3alJ_-b.js.map +0 -1
- package/lib/OperationList-DLEAg4qw.js.map +0 -1
- package/lib/RouterError-DZS2d6Sc.js +0 -41
- package/lib/RouterError-DZS2d6Sc.js.map +0 -1
- package/lib/SchemaView-DJiBd0_5.js +0 -397
- package/lib/SchemaView-DJiBd0_5.js.map +0 -1
- package/lib/Select-C1DeCqKv.js +0 -372
- package/lib/Select-C1DeCqKv.js.map +0 -1
- package/lib/circular-DGfd8SGc.js.map +0 -1
- package/lib/createServer-DGD8hEzT.js.map +0 -1
- package/lib/index-DP1xZgfJ.js +0 -3364
- package/lib/index-DP1xZgfJ.js.map +0 -1
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
package/lib/zudoku.auth-auth0.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { OpenIDAuthenticationProvider as
|
|
3
|
-
class
|
|
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
|
-
|
|
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
|
|
39
|
+
const h = (s) => new p(s);
|
|
40
40
|
export {
|
|
41
|
-
|
|
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,
|
|
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-
|
|
3
|
+
import { E as I } from "./index-CPws05Tb.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-
|
|
7
|
-
import { C as k, O as w } from "./OAuthErrorPage-
|
|
6
|
+
import { C, A as c } from "./errors-D7xzOd8X.js";
|
|
7
|
+
import { C as k, O as w } from "./OAuthErrorPage-oXnxcJg4.js";
|
|
8
8
|
const u = "/oauth/callback";
|
|
9
9
|
class y extends C {
|
|
10
10
|
msalInstance;
|
package/lib/zudoku.auth-clerk.js
CHANGED
|
@@ -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-
|
|
3
|
+
import { S as w, a as p, b as v } from "./SignUp-D2mmQOkg.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-
|
|
3
|
+
import { E as Ue } from "./index-CPws05Tb.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-
|
|
7
|
-
import { C as je, O as Oe } from "./OAuthErrorPage-
|
|
6
|
+
import { C as Ie, O as re, A as R } from "./errors-D7xzOd8X.js";
|
|
7
|
+
import { C as je, O as Oe } from "./OAuthErrorPage-oXnxcJg4.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-
|
|
4
|
-
import { S as f } from "./SignUp-
|
|
3
|
+
import { C as m, A as g } from "./errors-D7xzOd8X.js";
|
|
4
|
+
import { S as f } from "./SignUp-D2mmQOkg.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
|
|
9
|
+
import { H as T } from "./ErrorAlert-D5LKLFOd.js";
|
|
10
10
|
const d = ({
|
|
11
11
|
client: s,
|
|
12
12
|
config: e,
|
package/lib/zudoku.components.js
CHANGED
|
@@ -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
|
|
9
|
+
import "./ErrorAlert-D5LKLFOd.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-
|
|
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-CPws05Tb.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-
|
|
2
|
+
import { s as f } from "./index-CF7_erXq.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-
|
|
7
|
-
import { H as k, M as S } from "./ErrorAlert
|
|
6
|
+
import { L as N } from "./index-CPws05Tb.js";
|
|
7
|
+
import { H as k, M as S } from "./ErrorAlert-D5LKLFOd.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-
|
|
3
|
+
import { R as ye } from "./RouterError-VGZB_wg4.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
|
|
7
|
+
import { D as ve, a as Y } from "./ErrorAlert-D5LKLFOd.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-
|
|
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-
|
|
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-
|
|
7
|
+
const { MdxPage: n } = await import("./MdxPage-hOCN-u-L.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-
|
|
6
|
+
import { y as e, U as n, z as s } from "./index-I4zC7Yht.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-
|
|
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-
|
|
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.
|
|
3
|
+
"version": "0.65.1",
|
|
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
|
|
200
|
+
"glob": "11.1.0",
|
|
201
201
|
"glob-parent": "6.0.2",
|
|
202
|
-
"graphql": "16.
|
|
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.
|
|
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?.
|
|
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
|
|
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
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
|
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
|
|
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
|
|
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 >
|
|
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="
|
|
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} ›{" "}
|
|
@@ -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 {
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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} › </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
|
+
};
|