@scalar/api-client 2.26.2 → 2.29.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/CHANGELOG.md +218 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/libs/local-storage.js +3 -3
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +26 -26
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +88 -103
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +52 -54
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +106 -86
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +4 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +32 -40
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +5 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +80 -78
- package/dist/v2/features/app/app-events.d.ts +2 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +89 -64
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +172 -151
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +99 -97
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +2 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +11 -11
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +41 -22
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
- package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -33
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +132 -115
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -16
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
|
@@ -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;
|
|
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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AAkB,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,
|
|
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;
|
|
@@ -42,5 +41,7 @@ export declare const formatComplexScheme: (scheme: NonNullable<OpenApiDocument["
|
|
|
42
41
|
*/
|
|
43
42
|
export declare const getSecuritySchemeOptions: (security: NonNullable<OpenApiDocument["security"]>, securitySchemes: NonNullable<ComponentsObject["securitySchemes"]>,
|
|
44
43
|
/** We need to add the selected schemes if they do not already exist in the calculated options */
|
|
45
|
-
selectedSchemes: SecurityRequirementObject[]
|
|
44
|
+
selectedSchemes: SecurityRequirementObject[],
|
|
45
|
+
/** Allows adding authentication which is not in the document */
|
|
46
|
+
canAddNewAuth?: boolean) => SecuritySchemeOption[] | SecuritySchemeGroup[];
|
|
46
47
|
//# sourceMappingURL=security-scheme.d.ts.map
|
|
@@ -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,
|
|
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;AAC5C,gEAAgE;AAChE,uBAAoB,KACnB,oBAAoB,EAAE,GAAG,mBAAmB,EA2E9C,CAAA"}
|
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
import { generateHash as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import { authOptions as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
value:
|
|
8
|
-
}) => ({
|
|
9
|
-
id: h(JSON.stringify(n)),
|
|
10
|
-
label: i === "openIdConnect" ? `${o} (coming soon)` : o,
|
|
11
|
-
value: n,
|
|
1
|
+
import { generateHash as b } from "@scalar/helpers/string/generate-hash";
|
|
2
|
+
import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { authOptions as S } from "./auth-options.js";
|
|
4
|
+
const c = ({ name: o, value: i }) => ({
|
|
5
|
+
id: b(JSON.stringify(i)),
|
|
6
|
+
label: o,
|
|
7
|
+
value: i,
|
|
12
8
|
isDeletable: !0
|
|
13
|
-
}),
|
|
14
|
-
type: "complex",
|
|
9
|
+
}), g = (o) => c({
|
|
15
10
|
name: Object.keys(o).join(" & "),
|
|
16
11
|
value: o
|
|
17
|
-
}),
|
|
12
|
+
}), u = (o, i) => {
|
|
18
13
|
const n = Object.keys(o);
|
|
19
14
|
if (n.length > 1)
|
|
20
|
-
return
|
|
21
|
-
if (n[0])
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}, v = (o, i, n) => {
|
|
26
|
-
const { requiredFormatted: s, requiredSchemeNames: u, existingIds: d } = o.reduce(
|
|
15
|
+
return g(o);
|
|
16
|
+
if (n[0])
|
|
17
|
+
return h(i[n[0]]) ? c({ name: n[0], value: o }) : void 0;
|
|
18
|
+
}, y = (o, i, n, l = !0) => {
|
|
19
|
+
const { requiredFormatted: f, requiredSchemeNames: p, existingIds: d } = o.reduce(
|
|
27
20
|
(e, t) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
21
|
+
const s = u(t, i);
|
|
22
|
+
s && (e.requiredFormatted.push(s), e.existingIds.add(s.id));
|
|
30
23
|
for (const r of Object.keys(t))
|
|
31
24
|
e.requiredSchemeNames.add(r);
|
|
32
25
|
return e;
|
|
@@ -36,37 +29,36 @@ const m = ({
|
|
|
36
29
|
requiredSchemeNames: /* @__PURE__ */ new Set(),
|
|
37
30
|
existingIds: /* @__PURE__ */ new Set()
|
|
38
31
|
}
|
|
39
|
-
),
|
|
32
|
+
), a = [];
|
|
40
33
|
for (const [e, t] of Object.entries(i)) {
|
|
41
|
-
if (
|
|
34
|
+
if (p.has(e))
|
|
42
35
|
continue;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
c.push(r), d.add(r.id);
|
|
36
|
+
if (h(t)) {
|
|
37
|
+
const r = c({ name: e, value: { [e]: [] } });
|
|
38
|
+
a.push(r), d.add(r.id);
|
|
47
39
|
}
|
|
48
40
|
}
|
|
49
41
|
for (const e of n) {
|
|
50
|
-
const t =
|
|
51
|
-
t && !d.has(t.id) && (
|
|
42
|
+
const t = u(e, i);
|
|
43
|
+
t && !d.has(t.id) && (a.push(t), d.add(t.id));
|
|
52
44
|
}
|
|
53
|
-
const
|
|
54
|
-
{ label: "Required authentication", options:
|
|
55
|
-
{ label: "Available authentication", options:
|
|
45
|
+
const m = [
|
|
46
|
+
{ label: "Required authentication", options: f },
|
|
47
|
+
{ label: "Available authentication", options: a }
|
|
56
48
|
];
|
|
57
|
-
return l.push({
|
|
49
|
+
return l ? (m.push({
|
|
58
50
|
label: "Add new authentication",
|
|
59
|
-
options: Object.entries(
|
|
51
|
+
options: Object.entries(S).map(([e, t]) => ({
|
|
60
52
|
id: e,
|
|
61
53
|
label: t.label,
|
|
62
54
|
value: { [e]: [] },
|
|
63
55
|
payload: t.payload,
|
|
64
56
|
isDeletable: !1
|
|
65
57
|
}))
|
|
66
|
-
}),
|
|
58
|
+
}), m) : f.length ? m : a;
|
|
67
59
|
};
|
|
68
60
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
g as formatComplexScheme,
|
|
62
|
+
c as formatScheme,
|
|
63
|
+
y as getSecuritySchemeOptions
|
|
72
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"AA4pBA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;gBAEJ,mBAAmB;IAC/B,6FAA6F;iBAChF,kBAAkB,GAAG,SAAS;IAC3C,mEAAmE;WAC5D,MAAM,GAAG,MAAM,EAAE;IACxB,sCAAsC;eAC3B,OAAO;IAClB,yBAAyB;YACjB,OAAO;IACf,kDAAkD;aACzC,YAAY;IACrB,mDAAmD;WAC5C,MAAM,EAAE;IACf,2CAA2C;eAChC,MAAM,EAAE;IACnB,2CAA2C;;IAE3C,2CAA2C;eAChC,OAAO;IAClB,uCAAuC;kBACzB,MAAM;IACpB,8BAA8B;eACnB,OAAO;IAClB,oCAAoC;kBACtB,OAAO;IAC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ACjB,OAAO;IAC9B,gCAAgC;iBACnB,OAAO;IACpB,wCAAwC;oBACxB,OAAO;IACvB,sDAAsD;uBACnC,OAAO;IAC1B,mDAAmD;wBAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;IAC3C,mDAAmD;wBAC/B,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;IAC3C,0CAA0C;kBAC5B,OAAO;;;;;;;cA0oBT,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;EAYtC,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-776dfdde"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -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-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AA4LA,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,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;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
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__ */
|
|
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__ */
|
|
10
|
+
props: /* @__PURE__ */ S({
|
|
11
11
|
sidebarState: {},
|
|
12
12
|
layout: {},
|
|
13
13
|
activeWorkspace: {},
|
|
@@ -21,54 +21,55 @@ 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__ */
|
|
24
|
+
emits: /* @__PURE__ */ S(["selectItem", "select:workspace", "create:workspace", "reorder", "navigate:to:settings"], ["update:sidebarWidth"]),
|
|
25
25
|
setup(a, { emit: x }) {
|
|
26
|
-
const
|
|
27
|
-
|
|
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:
|
|
31
|
-
"onUpdate:width": t[
|
|
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(() => [
|
|
35
35
|
y(r(U), {
|
|
36
|
-
class: "flex w-auto flex-1 pt-2",
|
|
36
|
+
class: "mac:pt-10 flex w-auto flex-1 pt-2",
|
|
37
37
|
indent: 20,
|
|
38
38
|
isDraggable: a.layout !== "modal",
|
|
39
39
|
isDroppable: a.isDroppable,
|
|
40
40
|
isExpanded: a.sidebarState.isExpanded,
|
|
41
41
|
isSelected: a.sidebarState.isSelected,
|
|
42
|
-
items:
|
|
42
|
+
items: I.value,
|
|
43
43
|
layout: "client",
|
|
44
|
-
onReorder: t[
|
|
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
|
-
|
|
49
|
-
|
|
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) =>
|
|
55
|
-
"
|
|
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(),
|
|
62
|
-
y(r(
|
|
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[
|
|
66
|
+
onClick: t[3] || (t[3] = (e) => d.value = !d.value)
|
|
66
67
|
}, null, 8, ["icon"])
|
|
67
68
|
]),
|
|
68
|
-
|
|
69
|
+
d.value ? (l(), u(r(F), {
|
|
69
70
|
key: 0,
|
|
70
71
|
modelValue: r(c),
|
|
71
|
-
"onUpdate:modelValue": t[
|
|
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 ||
|
|
81
|
-
|
|
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":"
|
|
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
|
|
2
|
-
import { ScalarMenu as S, ScalarMenuSection as f, ScalarMenuWorkspacePicker as w, ScalarMenuLink as M, ScalarMenuResources as
|
|
3
|
-
import { ScalarIconGear as
|
|
4
|
-
|
|
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(
|
|
13
|
-
const
|
|
14
|
-
return (c, e) => (k(), u(
|
|
15
|
-
products:
|
|
16
|
-
sections:
|
|
17
|
-
|
|
18
|
-
default:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
modelValue:
|
|
22
|
-
workspaceOptions:
|
|
23
|
-
onCreateWorkspace: e[0] || (e[0] = (s) =>
|
|
24
|
-
"onUpdate:modelValue": e[1] || (e[1] = (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
|
-
|
|
27
|
-
is:
|
|
28
|
-
icon:
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
o(t(M), {
|
|
26
|
+
is: "button",
|
|
27
|
+
icon: t(C),
|
|
28
|
+
onClick: () => {
|
|
29
|
+
l(), a("navigate:to:settings");
|
|
30
|
+
}
|
|
31
31
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
32
|
+
default: r(() => [...e[3] || (e[3] = [
|
|
33
|
+
m(" Settings ", -1)
|
|
34
34
|
])]),
|
|
35
35
|
_: 1
|
|
36
|
-
}, 8, ["
|
|
36
|
+
}, 8, ["icon", "onClick"])
|
|
37
37
|
])
|
|
38
38
|
]),
|
|
39
39
|
_: 2
|
|
40
40
|
}, 1024),
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
o(t(g)),
|
|
42
|
+
o(t(v))
|
|
43
43
|
]),
|
|
44
44
|
_: 3
|
|
45
45
|
}));
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
export {
|
|
49
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAsPA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAY3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAA;AAIxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAK3C;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;YAER,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;mBACT,KAAK,EAAE;wBACF,MAAM;iBACb,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;;;YALzC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;mBACT,KAAK,EAAE;wBACF,MAAM;iBACb,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;IAajD;;;OAGG;4BACqB,MAAM,OAAO;IACrC;;;OAGG;yBACkB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO;EAqU9D,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|