@scalar/api-client 2.26.2 → 2.27.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/components/Server/ServerSelector.vue.js +6 -6
  3. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  6. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
  7. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  8. package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
  9. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
  10. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
  11. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
  12. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  13. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +6 -6
  14. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  15. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  16. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +62 -69
  17. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  18. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  19. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
  20. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  21. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
  22. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
  23. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +37 -41
  25. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
  26. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  27. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +107 -87
  28. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
  29. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
  30. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
  31. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
  34. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  35. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
  36. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
  37. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
  38. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
  39. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
  40. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
  41. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
  42. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
  43. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
  44. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
  45. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
  46. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -2
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +29 -37
  50. package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
  51. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  52. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  53. package/dist/v2/components/sidebar/Sidebar.vue.js +24 -23
  54. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
  55. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  56. package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
  57. package/dist/v2/features/app/App.vue.d.ts +5 -0
  58. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  59. package/dist/v2/features/app/App.vue.js +48 -46
  60. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  61. package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
  62. package/dist/v2/features/app/components/AppSidebar.vue2.js +64 -63
  63. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
  64. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  65. package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
  66. package/dist/v2/features/app/helpers/routes.d.ts +2 -0
  67. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  68. package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
  69. package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
  70. package/dist/v2/features/app/hooks/use-theme.js +34 -0
  71. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  72. package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
  73. package/dist/v2/features/collection/WorkspaceCollection.vue.js +13 -12
  74. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  75. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  76. package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
  77. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  78. package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
  79. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  80. package/dist/v2/features/collection/components/Environment.vue.js +27 -15
  81. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  82. package/dist/v2/features/collection/components/Overview.vue.js +2 -2
  83. package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
  84. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  85. package/dist/v2/features/collection/components/Servers.vue.js +93 -88
  86. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  87. package/dist/v2/features/collection/components/Settings.vue.js +19 -17
  88. package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
  89. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  90. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
  91. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
  92. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  93. package/dist/v2/features/modal/Modal.vue.js +15 -15
  94. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  95. package/dist/v2/features/operation/Operation.vue.js +30 -33
  96. package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
  97. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
  98. package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
  99. package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
  100. package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
  101. package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
  102. package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
  103. package/dist/v2/features/settings/components/Section.vue.js +26 -15
  104. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
  105. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
  106. package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
  107. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
  108. package/dist/v2/helpers/handle-hotkeys.js +2 -2
  109. package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
  110. package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
  111. package/dist/v2/hooks/use-global-hot-keys.js +8 -6
  112. package/dist/v2/workspace-events.d.ts.map +1 -1
  113. package/dist/v2/workspace-events.js +13 -6
  114. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  115. package/package.json +18 -17
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-openid-connect-discovery.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAGnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD;;;;;GAKG;AACH,QAAA,MAAM,4BAA4B;IAChC,kDAAkD;;IAElD,0CAA0C;;IAE1C,+DAA+D;;IAE/D,oEAAoE;;IAEpE,uDAAuD;;EAEvD,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GACtC,KAAK,MAAM,EACX,UAAU,MAAM,KACf,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CA2C/C,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { redirectToProxy as a } from "@scalar/helpers/url/redirect-to-proxy";
2
+ import { Type as n } from "@scalar/typebox";
3
+ import { coerceValue as p } from "@scalar/workspace-store/schemas/typebox-coerce";
4
+ const s = n.Object({
5
+ /** URL of the OAuth 2.0 Authorization Endpoint */
6
+ authorization_endpoint: n.Optional(n.String()),
7
+ /** URL of the OAuth 2.0 Token Endpoint */
8
+ token_endpoint: n.Optional(n.String()),
9
+ /** List of OAuth 2.0 scope values that this server supports */
10
+ scopes_supported: n.Optional(n.Array(n.String())),
11
+ /** List of OAuth 2.0 grant type values that this server supports */
12
+ grant_types_supported: n.Optional(n.Array(n.String())),
13
+ /** Supported PKCE code challenge methods (RFC 7636) */
14
+ code_challenge_methods_supported: n.Optional(n.Array(n.String()))
15
+ }), f = async (o, i) => {
16
+ try {
17
+ let e = o.trim();
18
+ if (!e)
19
+ return [new Error("URL cannot be empty"), null];
20
+ e.endsWith("/") && (e = e.slice(0, -1)), e.includes("/.well-known/openid-configuration") || (e = `${e}/.well-known/openid-configuration`);
21
+ const c = a(i, e), t = await fetch(c);
22
+ if (!t.ok)
23
+ return [
24
+ new Error(`Failed to fetch OpenID Connect discovery document: ${t.status} ${t.statusText}`),
25
+ null
26
+ ];
27
+ const r = p(s, await t.json());
28
+ return !r.authorization_endpoint && !r.token_endpoint ? [new Error("Invalid OpenID Connect discovery document: missing required endpoints"), null] : [null, r];
29
+ } catch (e) {
30
+ return e instanceof Error ? [e, null] : [new Error("Failed to fetch OpenID Connect discovery document"), null];
31
+ }
32
+ };
33
+ export {
34
+ f as fetchOpenIDConnectDiscovery
35
+ };
@@ -1,6 +1,6 @@
1
1
  import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
2
2
  import type { AuthStore } from '@scalar/workspace-store/entities/auth';
3
- import type { ComponentsObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ import { type ComponentsObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
4
4
  import type { SecuritySchemeObjectSecret } from './secret-types';
5
5
  /** Document security merged with the config security schemes */
6
6
  export type MergedSecuritySchemes = Record<string, SecuritySchemeObjectSecret>;
@@ -1 +1 @@
1
- {"version":3,"file":"merge-security.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/merge-security.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAItE,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAA;AAE9E,kGAAkG;AAClG,eAAO,MAAM,aAAa,GACxB,yBAAyB,gBAAgB,CAAC,iBAAiB,CAAM,EACjE,uBAAuB,2BAA2B,CAAC,iBAAiB,CAAM,EAC1E,WAAW,SAAS,EACpB,cAAc,MAAM,KACnB,qBAoBF,CAAA"}
1
+ {"version":3,"file":"merge-security.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/merge-security.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AAKtE,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAA;AAE9E,kGAAkG;AAClG,eAAO,MAAM,aAAa,GACxB,yBAAyB,gBAAgB,CAAC,iBAAiB,CAAM,EACjE,uBAAuB,2BAA2B,CAAC,iBAAiB,CAAM,EAC1E,WAAW,SAAS,EACpB,cAAc,MAAM,KACnB,qBA2BF,CAAA"}
@@ -1,15 +1,23 @@
1
- import { objectEntries as o } from "@scalar/helpers/object/object-entries";
1
+ import { objectEntries as c } from "@scalar/helpers/object/object-entries";
2
+ import { deepClone as f } from "@scalar/workspace-store/helpers/deep-clone";
2
3
  import { getResolvedRef as p } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import { mergeObjects as S } from "@scalar/workspace-store/helpers/merge-object";
4
- import { unpackProxyObject as d } from "@scalar/workspace-store/helpers/unpack-proxy";
5
- import { extractSecuritySchemeSecrets as f } from "./extract-security-scheme-secrets.js";
6
- const l = (m = {}, c = {}, u, s) => {
7
- const i = o(m).reduce(
8
- (e, [r, t]) => (e[r] = structuredClone(d(p(t))), e),
4
+ import { mergeObjects as g } from "@scalar/workspace-store/helpers/merge-object";
5
+ import { coerceValue as h } from "@scalar/workspace-store/schemas/typebox-coerce";
6
+ import { SecuritySchemeObjectSchema as l } from "@scalar/workspace-store/schemas/v3.1/strict/openapi-document";
7
+ import { extractSecuritySchemeSecrets as y } from "./extract-security-scheme-secrets.js";
8
+ const D = (m = {}, s = {}, i, n) => {
9
+ const d = c(m).reduce(
10
+ (e, [r, o]) => {
11
+ const t = f(p(o));
12
+ return t && (e[r] = t), e;
13
+ },
9
14
  {}
10
- ), n = S(i, c) ?? {};
11
- return o(n).reduce((e, [r, t]) => (e[r] = f(t, u, r, s), e), {});
15
+ ), u = g(d, s) ?? {};
16
+ return c(u).reduce((e, [r, o]) => {
17
+ const S = { ...h(l, o), ...o };
18
+ return e[r] = y(S, i, r, n), e;
19
+ }, {});
12
20
  };
13
21
  export {
14
- l as mergeSecurity
22
+ D as mergeSecurity
15
23
  };
@@ -0,0 +1,5 @@
1
+ import { type SecretsOpenIdConnect } from '@scalar/workspace-store/entities/auth';
2
+ import type { OpenIDConnectDiscovery } from './fetch-openid-connect-discovery.js';
3
+ /** Takes in an open ID Connect discovery response and converts it into an oauth flow to be used for authorization */
4
+ export declare const openIDDiscoveryToFlows: (discovery: OpenIDConnectDiscovery) => SecretsOpenIdConnect;
5
+ //# sourceMappingURL=openid-discovery-to-flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openid-discovery-to-flows.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAItG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAE9E,qHAAqH;AACrH,eAAO,MAAM,sBAAsB,GAAI,WAAW,sBAAsB,KAAG,oBAqD1E,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { OpenIDConnectSchema as p } from "@scalar/workspace-store/entities/auth";
2
+ import { coerceValue as c } from "@scalar/workspace-store/schemas/typebox-coerce";
3
+ const u = (o) => {
4
+ const s = Object.fromEntries((o.scopes_supported ?? []).map((a) => [a, ""])), r = new Set(o.grant_types_supported ?? ["authorization_code", "implicit"]), t = o.authorization_endpoint, e = o.token_endpoint, i = o.code_challenge_methods_supported?.includes("S256") ? "SHA-256" : o.code_challenge_methods_supported?.includes("plain") ? "plain" : "no", n = {};
5
+ return r.has("implicit") && t && (n.implicit = {
6
+ authorizationUrl: t,
7
+ refreshUrl: t,
8
+ scopes: s
9
+ }), r.has("password") && e && (n.password = {
10
+ tokenUrl: e,
11
+ refreshUrl: e,
12
+ scopes: s
13
+ }), r.has("client_credentials") && e && (n.clientCredentials = {
14
+ tokenUrl: e,
15
+ refreshUrl: e,
16
+ scopes: s
17
+ }), r.has("authorization_code") && t && e && (n.authorizationCode = {
18
+ authorizationUrl: t,
19
+ tokenUrl: e,
20
+ refreshUrl: e,
21
+ "x-usePkce": i,
22
+ scopes: s
23
+ }), c(p, n);
24
+ };
25
+ export {
26
+ u as openIDDiscoveryToFlows
27
+ };
@@ -17,7 +17,9 @@ export type HttpObjectSecret = HttpObject & XScalarSecretHTTP & XScalarSecretTok
17
17
  export type OAuth2ObjectSecret = Omit<OAuth2Object, 'flows'> & {
18
18
  flows: OAuthFlowsObjectSecret;
19
19
  };
20
- export type OpenIdConnectObjectSecret = OpenIdConnectObject;
20
+ export type OpenIdConnectObjectSecret = OpenIdConnectObject & {
21
+ flows?: OAuthFlowsObjectSecret;
22
+ };
21
23
  export type SecuritySchemeObjectSecret = ApiKeyObjectSecret | HttpObjectSecret | OAuth2ObjectSecret | OpenIdConnectObjectSecret;
22
24
  export {};
23
25
  //# sourceMappingURL=secret-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secret-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/secret-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,8DAA8D,CAAA;AAErE,KAAK,qBAAqB,GAAG,qBAAqB,GAAG,kBAAkB,CAAA;AAEvE,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,wBAAwB,CAAA;AAE1G,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GACrD,qBAAqB,GACrB,iBAAiB,GACjB,yBAAyB,CAAA;AAE3B,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,GACvE,qBAAqB,GACrB,yBAAyB,CAAA;AAE3B,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,GACvE,qBAAqB,GACrB,yBAAyB,GACzB,wBAAwB,CAAA;AAE1B,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,iBAAiB,CAAC,EAAE,gCAAgC,CAAA;IACpD,iBAAiB,CAAC,EAAE,gCAAgC,CAAA;CACrD,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,kBAAkB,CAAA;AAClE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAClF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAChG,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,CAAA;AAE3D,MAAM,MAAM,0BAA0B,GAClC,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,yBAAyB,CAAA"}
1
+ {"version":3,"file":"secret-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/secret-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,wDAAwD,CAAA;AAC/D,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,8DAA8D,CAAA;AAErE,KAAK,qBAAqB,GAAG,qBAAqB,GAAG,kBAAkB,CAAA;AAEvE,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,wBAAwB,CAAA;AAE1G,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GACrD,qBAAqB,GACrB,iBAAiB,GACjB,yBAAyB,CAAA;AAE3B,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,GACvE,qBAAqB,GACrB,yBAAyB,CAAA;AAE3B,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,GACvE,qBAAqB,GACrB,yBAAyB,GACzB,wBAAwB,CAAA;AAE1B,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,iBAAiB,CAAC,EAAE,gCAAgC,CAAA;IACpD,iBAAiB,CAAC,EAAE,gCAAgC,CAAA;CACrD,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,kBAAkB,CAAA;AAClE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAClF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAChG,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAEhG,MAAM,MAAM,0BAA0B,GAClC,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,yBAAyB,CAAA"}
@@ -18,9 +18,8 @@ export type SecuritySchemeGroup = {
18
18
  * We also add a hash to the id to ensure it is unique across
19
19
  * multiple requirements of the same scheme with different scopes
20
20
  */
21
- export declare const formatScheme: ({ name, type, value, }: {
21
+ export declare const formatScheme: ({ name, value }: {
22
22
  name: string;
23
- type: SecuritySchemeObject["type"] | "complex";
24
23
  value: SecurityRequirementObject;
25
24
  }) => {
26
25
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,wBAI1B;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAC9C,KAAK,EAAE,yBAAyB,CAAA;CACjC;;;;;CAKC,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAKxF,CAAA;AA6BJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACjE,iGAAiG;AACjG,iBAAiB,yBAAyB,EAAE,KAC3C,oBAAoB,EAAE,GAAG,mBAAmB,EAsE9C,CAAA"}
1
+ {"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,iBAAiB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,yBAAyB,CAAA;CAAE;;;;;CAK9F,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAIxF,CAAA;AA6BJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;AACjE,iGAAiG;AACjG,iBAAiB,yBAAyB,EAAE,KAC3C,oBAAoB,EAAE,GAAG,mBAAmB,EAsE9C,CAAA"}
@@ -1,34 +1,27 @@
1
- import { generateHash as h } from "@scalar/helpers/string/generate-hash";
2
- import { getResolvedRef as p } from "@scalar/workspace-store/helpers/get-resolved-ref";
1
+ import { generateHash as p } from "@scalar/helpers/string/generate-hash";
2
+ import { getResolvedRef as u } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { authOptions as b } from "./auth-options.js";
4
- const m = ({
5
- name: o,
6
- type: i,
7
- value: n
8
- }) => ({
9
- id: h(JSON.stringify(n)),
10
- label: i === "openIdConnect" ? `${o} (coming soon)` : o,
11
- value: n,
4
+ const m = ({ name: o, value: i }) => ({
5
+ id: p(JSON.stringify(i)),
6
+ label: o,
7
+ value: i,
12
8
  isDeletable: !0
13
- }), y = (o) => m({
14
- type: "complex",
9
+ }), S = (o) => m({
15
10
  name: Object.keys(o).join(" & "),
16
11
  value: o
17
12
  }), f = (o, i) => {
18
- const n = Object.keys(o);
19
- if (n.length > 1)
20
- return y(o);
21
- if (n[0]) {
22
- const s = p(i[n[0]]);
23
- return s ? m({ name: n[0], type: s.type, value: o }) : void 0;
24
- }
25
- }, v = (o, i, n) => {
26
- const { requiredFormatted: s, requiredSchemeNames: u, existingIds: d } = o.reduce(
13
+ const a = Object.keys(o);
14
+ if (a.length > 1)
15
+ return S(o);
16
+ if (a[0])
17
+ return u(i[a[0]]) ? m({ name: a[0], value: o }) : void 0;
18
+ }, j = (o, i, a) => {
19
+ const { requiredFormatted: c, requiredSchemeNames: h, existingIds: r } = o.reduce(
27
20
  (e, t) => {
28
- const a = f(t, i);
29
- a && (e.requiredFormatted.push(a), e.existingIds.add(a.id));
30
- for (const r of Object.keys(t))
31
- e.requiredSchemeNames.add(r);
21
+ const n = f(t, i);
22
+ n && (e.requiredFormatted.push(n), e.existingIds.add(n.id));
23
+ for (const s of Object.keys(t))
24
+ e.requiredSchemeNames.add(s);
32
25
  return e;
33
26
  },
34
27
  {
@@ -36,23 +29,22 @@ const m = ({
36
29
  requiredSchemeNames: /* @__PURE__ */ new Set(),
37
30
  existingIds: /* @__PURE__ */ new Set()
38
31
  }
39
- ), c = [];
32
+ ), d = [];
40
33
  for (const [e, t] of Object.entries(i)) {
41
- if (u.has(e))
34
+ if (h.has(e))
42
35
  continue;
43
- const a = p(t);
44
- if (a) {
45
- const r = m({ name: e, type: a.type, value: { [e]: [] } });
46
- c.push(r), d.add(r.id);
36
+ if (u(t)) {
37
+ const s = m({ name: e, value: { [e]: [] } });
38
+ d.push(s), r.add(s.id);
47
39
  }
48
40
  }
49
- for (const e of n) {
41
+ for (const e of a) {
50
42
  const t = f(e, i);
51
- t && !d.has(t.id) && (c.push(t), d.add(t.id));
43
+ t && !r.has(t.id) && (d.push(t), r.add(t.id));
52
44
  }
53
45
  const l = [
54
- { label: "Required authentication", options: s },
55
- { label: "Available authentication", options: c }
46
+ { label: "Required authentication", options: c },
47
+ { label: "Available authentication", options: d }
56
48
  ];
57
49
  return l.push({
58
50
  label: "Add new authentication",
@@ -66,7 +58,7 @@ const m = ({
66
58
  }), l;
67
59
  };
68
60
  export {
69
- y as formatComplexScheme,
61
+ S as formatComplexScheme,
70
62
  m as formatScheme,
71
- v as getSecuritySchemeOptions
63
+ j as getSecuritySchemeOptions
72
64
  };
@@ -39,7 +39,7 @@ const D = ["aria-labelledby"], I = { class: "text-c-1 m-0 flex flex-1 items-cent
39
39
  class: "contents"
40
40
  }, [
41
41
  a("div", {
42
- class: n(["bg-b-2 flex items-center", e.isStatic && "rounded-t-lg border border-b-0"])
42
+ class: n(["bg-b-2 flex items-center", e.isStatic && "rounded-t-xl border border-b-0"])
43
43
  }, [
44
44
  d(s(B), {
45
45
  class: n(["hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-base font-medium outline-none md:px-1.5 xl:pr-0.5 xl:pl-2", e.isStatic && "!pl-3"]),
@@ -54,11 +54,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
54
54
  } & {
55
55
  "create:workspace": () => any;
56
56
  "select:workspace": (id?: string | undefined) => any;
57
+ "navigate:to:settings": () => any;
57
58
  selectItem: (id: string) => any;
58
59
  reorder: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
59
60
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
60
61
  "onCreate:workspace"?: (() => any) | undefined;
61
62
  "onSelect:workspace"?: ((id?: string | undefined) => any) | undefined;
63
+ "onNavigate:to:settings"?: (() => any) | undefined;
62
64
  onSelectItem?: ((id: string) => any) | undefined;
63
65
  onReorder?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
64
66
  "onUpdate:sidebarWidth"?: ((value: number) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AAyLA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAKhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAA;IACpB,qCAAqC;IACrC,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B,2CAA2C;IAC3C,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,+CAA+C;IAC/C,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EACR,OAAO,GACP,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAA;CACxE,CAAC;AAgBF,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,eAAe,CAAC,IAAI,OAAO,CAAA;IAC3B,sDAAsD;IACtD,SAAS,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;IACpD,mDAAmD;IACnD,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,yDAAyD;IACzD,KAAK,CAAC,CAAC,KAAK,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,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,13 +1,13 @@
1
- import { defineComponent as D, mergeModels as v, useSlots as V, ref as B, useModel as M, computed as C, createBlock as u, openBlock as l, unref as r, withCtx as s, createVNode as y, createSlots as E, renderSlot as i, createElementBlock as w, createCommentVNode as m, Fragment as R, normalizeProps as f, guardReactiveProps as p, createElementVNode as g, isRef as z } from "vue";
2
- import { ScalarIconButton as F, ScalarSidebarSearchInput as N } from "@scalar/components";
1
+ import { defineComponent as V, mergeModels as S, useSlots as h, ref as B, useModel as M, computed as C, createBlock as u, openBlock as l, unref as r, withCtx as s, createVNode as y, createSlots as E, renderSlot as i, createElementBlock as g, createCommentVNode as m, Fragment as N, normalizeProps as f, guardReactiveProps as p, createElementVNode as w, isRef as R } from "vue";
2
+ import { ScalarIconButton as z, ScalarSidebarSearchInput as F } from "@scalar/components";
3
3
  import { ScalarIconFileDashed as q, ScalarIconMagnifyingGlass as A } from "@scalar/icons";
4
4
  import { ScalarSidebar as U } from "@scalar/sidebar";
5
5
  import j from "./SidebarMenu.vue.js";
6
6
  import { useSearchIndex as G } from "../../features/search/hooks/use-search-index.js";
7
7
  import H from "../resize/Resize.vue.js";
8
- const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K = { class: "flex items-center justify-between" }, L = { key: 1 }, _ = /* @__PURE__ */ D({
8
+ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K = { class: "flex items-center justify-between" }, L = { key: 1 }, _ = /* @__PURE__ */ V({
9
9
  __name: "Sidebar",
10
- props: /* @__PURE__ */ v({
10
+ props: /* @__PURE__ */ S({
11
11
  sidebarState: {},
12
12
  layout: {},
13
13
  activeWorkspace: {},
@@ -21,14 +21,14 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
21
21
  },
22
22
  sidebarWidthModifiers: {}
23
23
  }),
24
- emits: /* @__PURE__ */ v(["selectItem", "select:workspace", "create:workspace", "reorder"], ["update:sidebarWidth"]),
24
+ emits: /* @__PURE__ */ S(["selectItem", "select:workspace", "create:workspace", "reorder", "navigate:to:settings"], ["update:sidebarWidth"]),
25
25
  setup(a, { emit: x }) {
26
- const d = x, b = V(), n = B(!1), k = M(a, "sidebarWidth"), S = (o) => o.type === "example" && o.title === "draft", { query: c, results: I } = G(() => a.documents), W = C(() => I.value ?? a.sidebarState.items.value), $ = (o) => {
27
- d("selectItem", o), c.value = "", n.value = !1;
26
+ const n = x, b = h(), d = B(!1), v = M(a, "sidebarWidth"), k = (o) => o.type === "example" && o.title === "draft", { query: c, results: $ } = G(() => a.documents), I = C(() => $.value ?? a.sidebarState.items.value), W = (o) => {
27
+ n("selectItem", o), c.value = "", d.value = !1;
28
28
  };
29
29
  return (o, t) => (l(), u(r(H), {
30
- width: k.value,
31
- "onUpdate:width": t[5] || (t[5] = (e) => k.value = e),
30
+ width: v.value,
31
+ "onUpdate:width": t[6] || (t[6] = (e) => v.value = e),
32
32
  class: "flex flex-col"
33
33
  }, {
34
34
  default: s(() => [
@@ -39,36 +39,37 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
39
39
  isDroppable: a.isDroppable,
40
40
  isExpanded: a.sidebarState.isExpanded,
41
41
  isSelected: a.sidebarState.isSelected,
42
- items: W.value,
42
+ items: I.value,
43
43
  layout: "client",
44
- onReorder: t[4] || (t[4] = (e, h) => d("reorder", e, h)),
45
- onSelectItem: $
44
+ onReorder: t[5] || (t[5] = (e, D) => n("reorder", e, D)),
45
+ onSelectItem: W
46
46
  }, E({
47
47
  header: s(() => [
48
- g("div", J, [
49
- g("div", K, [
48
+ w("div", J, [
49
+ w("div", K, [
50
50
  a.layout !== "modal" ? (l(), u(j, {
51
51
  key: 0,
52
52
  activeWorkspace: a.activeWorkspace,
53
53
  workspaces: a.workspaces,
54
- "onCreate:workspace": t[0] || (t[0] = (e) => d("create:workspace")),
55
- "onSelect:workspace": t[1] || (t[1] = (e) => d("select:workspace", e))
54
+ "onCreate:workspace": t[0] || (t[0] = (e) => n("create:workspace")),
55
+ "onNavigate:to:settings": t[1] || (t[1] = (e) => n("navigate:to:settings")),
56
+ "onSelect:workspace": t[2] || (t[2] = (e) => n("select:workspace", e))
56
57
  }, {
57
58
  sidebarMenuActions: s(() => [
58
59
  i(o.$slots, "sidebarMenuActions")
59
60
  ]),
60
61
  _: 3
61
- }, 8, ["activeWorkspace", "workspaces"])) : a.layout === "modal" ? (l(), w("div", L)) : m("", !0),
62
- y(r(F), {
62
+ }, 8, ["activeWorkspace", "workspaces"])) : a.layout === "modal" ? (l(), g("div", L)) : m("", !0),
63
+ y(r(z), {
63
64
  icon: r(A),
64
65
  label: "Search",
65
- onClick: t[2] || (t[2] = (e) => n.value = !n.value)
66
+ onClick: t[3] || (t[3] = (e) => d.value = !d.value)
66
67
  }, null, 8, ["icon"])
67
68
  ]),
68
- n.value ? (l(), u(r(N), {
69
+ d.value ? (l(), u(r(F), {
69
70
  key: 0,
70
71
  modelValue: r(c),
71
- "onUpdate:modelValue": t[3] || (t[3] = (e) => z(c) ? c.value = e : null),
72
+ "onUpdate:modelValue": t[4] || (t[4] = (e) => R(c) ? c.value = e : null),
72
73
  autofocus: ""
73
74
  }, null, 8, ["modelValue"])) : m("", !0)
74
75
  ])
@@ -77,8 +78,8 @@ const J = { class: "bg-sidebar-b-1 z-1 flex flex-col gap-1.5 px-3 pb-1.5" }, K =
77
78
  i(o.$slots, "decorator", f(p(e)))
78
79
  ]),
79
80
  icon: s((e) => [
80
- b.icon || S(e.item) ? (l(), w(R, { key: 0 }, [
81
- S(e.item) ? (l(), u(r(q), { key: 0 })) : m("", !0),
81
+ b.icon || k(e.item) ? (l(), g(N, { key: 0 }, [
82
+ k(e.item) ? (l(), u(r(q), { key: 0 })) : m("", !0),
82
83
  i(o.$slots, "icon", f(p(e)))
83
84
  ], 64)) : m("", !0)
84
85
  ]),
@@ -20,9 +20,11 @@ type __VLS_Slots = {
20
20
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
21
21
  "create:workspace": () => any;
22
22
  "select:workspace": (id?: string | undefined) => any;
23
+ "navigate:to:settings": () => any;
23
24
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
25
  "onCreate:workspace"?: (() => any) | undefined;
25
26
  "onSelect:workspace"?: ((id?: string | undefined) => any) | undefined;
27
+ "onNavigate:to:settings"?: (() => any) | undefined;
26
28
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
29
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
30
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AAqEA,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAI3B,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B;;;OAGG;IACH,UAAU,EAAE,cAAc,EAAE,CAAA;CAC7B,CAAC;AAYF,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AA4IF,QAAA,MAAM,UAAU;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AA0EA,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAG3B,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B;;;OAGG;IACH,UAAU,EAAE,cAAc,EAAE,CAAA;CAC7B,CAAC;AAcF,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AA8IF,QAAA,MAAM,UAAU;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,50 +1,50 @@
1
- import { defineComponent as p, createBlock as u, openBlock as k, unref as o, withCtx as t, createVNode as r, renderSlot as m, createTextVNode as d } from "vue";
2
- import { ScalarMenu as S, ScalarMenuSection as f, ScalarMenuWorkspacePicker as w, ScalarMenuLink as M, ScalarMenuResources as C, ScalarMenuSupport as V } from "@scalar/components";
3
- import { ScalarIconGear as W } from "@scalar/icons";
4
- import { RouterLink as v } from "vue-router";
5
- const L = /* @__PURE__ */ p({
1
+ import { defineComponent as p, createBlock as u, openBlock as k, unref as t, withCtx as r, createVNode as o, renderSlot as d, createTextVNode as m } from "vue";
2
+ import { ScalarMenu as S, ScalarMenuSection as f, ScalarMenuWorkspacePicker as w, ScalarMenuLink as M, ScalarMenuResources as g, ScalarMenuSupport as v } from "@scalar/components";
3
+ import { ScalarIconGear as C } from "@scalar/icons";
4
+ const x = /* @__PURE__ */ p({
6
5
  __name: "SidebarMenu",
7
6
  props: {
8
7
  activeWorkspace: {},
9
8
  workspaces: {}
10
9
  },
11
- emits: ["create:workspace", "select:workspace"],
12
- setup(a, { emit: i }) {
13
- const n = i;
14
- return (c, e) => (k(), u(o(S), null, {
15
- products: t(() => [...e[2] || (e[2] = [])]),
16
- sections: t(({ close: l }) => [
17
- r(o(f), null, {
18
- default: t(() => [
19
- m(c.$slots, "sidebarMenuActions", {}, () => [
20
- r(o(w), {
21
- modelValue: a.activeWorkspace.id,
22
- workspaceOptions: a.workspaces,
23
- onCreateWorkspace: e[0] || (e[0] = (s) => n("create:workspace")),
24
- "onUpdate:modelValue": e[1] || (e[1] = (s) => n("select:workspace", s))
10
+ emits: ["create:workspace", "select:workspace", "navigate:to:settings"],
11
+ setup(n, { emit: i }) {
12
+ const a = i;
13
+ return (c, e) => (k(), u(t(S), null, {
14
+ products: r(() => [...e[2] || (e[2] = [])]),
15
+ sections: r(({ close: l }) => [
16
+ o(t(f), null, {
17
+ default: r(() => [
18
+ d(c.$slots, "sidebarMenuActions", {}, () => [
19
+ o(t(w), {
20
+ modelValue: n.activeWorkspace.id,
21
+ workspaceOptions: n.workspaces,
22
+ onCreateWorkspace: e[0] || (e[0] = (s) => a("create:workspace")),
23
+ "onUpdate:modelValue": e[1] || (e[1] = (s) => a("select:workspace", s))
25
24
  }, null, 8, ["modelValue", "workspaceOptions"]),
26
- r(o(M), {
27
- is: o(v),
28
- icon: o(W),
29
- to: "/settings",
30
- onClick: l
25
+ o(t(M), {
26
+ is: "button",
27
+ icon: t(C),
28
+ onClick: () => {
29
+ l(), a("navigate:to:settings");
30
+ }
31
31
  }, {
32
- default: t(() => [...e[3] || (e[3] = [
33
- d(" Settings ", -1)
32
+ default: r(() => [...e[3] || (e[3] = [
33
+ m(" Settings ", -1)
34
34
  ])]),
35
35
  _: 1
36
- }, 8, ["is", "icon", "onClick"])
36
+ }, 8, ["icon", "onClick"])
37
37
  ])
38
38
  ]),
39
39
  _: 2
40
40
  }, 1024),
41
- r(o(C)),
42
- r(o(V))
41
+ o(t(g)),
42
+ o(t(v))
43
43
  ]),
44
44
  _: 3
45
45
  }));
46
46
  }
47
47
  });
48
48
  export {
49
- L as default
49
+ x as default
50
50
  };
@@ -1,5 +1,6 @@
1
1
  import { type ModalState } from '@scalar/components';
2
2
  import type { ClientPlugin } from '@scalar/oas-utils/helpers';
3
+ import { type Theme } from '@scalar/themes';
3
4
  import type { CommandPaletteState } from '../../../v2/features/command-palette/hooks/use-command-palette-state.js';
4
5
  import type { ClientLayout } from '../../../v2/types/layout';
5
6
  import { type AppState } from './app-state.js';
@@ -13,6 +14,8 @@ export default _default;
13
14
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
14
15
  layout: Exclude<ClientLayout, "modal">;
15
16
  plugins?: ClientPlugin[];
17
+ customThemes?: Theme[];
18
+ fallbackThemeSlug?: string;
16
19
  getAppState: () => AppState;
17
20
  getCommandPaletteState: () => CommandPaletteState;
18
21
  }, {
@@ -20,6 +23,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
20
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
21
24
  layout: Exclude<ClientLayout, "modal">;
22
25
  plugins?: ClientPlugin[];
26
+ customThemes?: Theme[];
27
+ fallbackThemeSlug?: string;
23
28
  getAppState: () => AppState;
24
29
  getCommandPaletteState: () => CommandPaletteState;
25
30
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAqPA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAY7D,OA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