@scalar/api-client 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +6 -6
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +14 -13
- package/dist/hooks/useClientConfig.d.ts +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
- package/dist/libs/create-client.d.ts +1 -1
- package/dist/store/store.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -6
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +24 -27
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +3 -6
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -12
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +11 -10
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +45 -47
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +11 -9
- 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 +179 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +2 -179
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +201 -198
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +11 -6
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +82 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +2 -85
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +3 -13
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +16 -18
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +133 -142
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +2 -16
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +202 -229
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +3 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +81 -85
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +32 -34
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +31 -33
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +2 -5
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +42 -45
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +9 -9
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +18 -18
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +14 -14
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +12 -12
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +13 -13
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.js +4 -4
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +5 -7
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
- package/dist/v2/components/data-table/DataTableInput.vue2.js +32 -36
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts +25 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.js +7 -0
- package/dist/v2/components/forms/ConfirmationForm.vue2.js +45 -0
- package/dist/v2/components/forms/index.d.ts +2 -0
- package/dist/v2/components/forms/index.d.ts.map +1 -0
- package/dist/v2/components/forms/index.js +4 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts +43 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.js +89 -0
- package/dist/v2/components/layout/CollapsibleSection.vue2.js +4 -0
- package/dist/v2/components/layout/ValueEmitter.vue.d.ts +23 -0
- package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -0
- package/dist/v2/components/layout/ValueEmitter.vue.js +21 -0
- package/dist/v2/components/layout/ValueEmitter.vue2.js +4 -0
- package/dist/v2/components/layout/index.d.ts +2 -0
- package/dist/v2/components/layout/index.d.ts.map +1 -0
- package/dist/v2/components/layout/index.js +4 -0
- package/dist/v2/components/modals/DeleteModal.vue.d.ts +15 -0
- package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -0
- package/dist/v2/components/modals/DeleteModal.vue.js +31 -0
- package/dist/v2/components/modals/DeleteModal.vue2.js +4 -0
- package/dist/v2/components/modals/index.d.ts +2 -0
- package/dist/v2/components/modals/index.d.ts.map +1 -0
- package/dist/v2/components/modals/index.js +4 -0
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +4 -2
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js +31 -31
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +2 -6
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue.js +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +16 -16
- package/dist/v2/components/server/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +6 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +45 -55
- package/dist/v2/features/app/App.vue.d.ts +2 -2
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +89 -74
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +6 -2
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +50 -47
- package/dist/v2/features/app/helpers/routes.d.ts +0 -10
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue2.js +75 -73
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +13 -25
- 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 +47 -35
- package/dist/v2/features/collection/components/Form.vue.d.ts +3 -7
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Form.vue.js +28 -33
- package/dist/v2/features/collection/components/Servers.vue.d.ts +13 -31
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue2.js +103 -82
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +3 -3
- package/dist/v2/features/modal/Modal.vue2.js +40 -32
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +22 -28
- package/dist/v2/hooks/use-sidebar-state.d.ts +47 -0
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -0
- package/dist/v2/hooks/use-sidebar-state.js +112 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +75 -107
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -17
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +0 -45
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +0 -29
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts +0 -29
- package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts.map +0 -1
|
@@ -12,16 +12,15 @@
|
|
|
12
12
|
* draft overrides for the UI when present.
|
|
13
13
|
*/
|
|
14
14
|
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
15
|
-
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
16
15
|
import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
17
16
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
18
17
|
import type { AuthMeta } from '@scalar/workspace-store/mutators';
|
|
18
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
19
19
|
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
20
20
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
|
|
21
21
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
22
22
|
import type { ClientLayout } from '../../../hooks/index.js';
|
|
23
|
-
import type
|
|
24
|
-
import { createStoreEvents } from '../../../store/events.js';
|
|
23
|
+
import { type createStoreEvents } from '../../../store/events.js';
|
|
25
24
|
import { type History } from '../../../v2/blocks/scalar-address-bar-block/index.js';
|
|
26
25
|
import type { ClientPlugin } from '../../../v2/plugins';
|
|
27
26
|
type __VLS_Props = {
|
|
@@ -80,9 +79,8 @@ type __VLS_Props = {
|
|
|
80
79
|
/** Event bus */
|
|
81
80
|
events: ReturnType<typeof createStoreEvents>;
|
|
82
81
|
plugins?: ClientPlugin[];
|
|
83
|
-
/**
|
|
84
|
-
environment:
|
|
85
|
-
envVariables: EnvVariable[];
|
|
82
|
+
/** For environment variables in the inputs */
|
|
83
|
+
environment: XScalarEnvironment;
|
|
86
84
|
};
|
|
87
85
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
88
86
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AAoMA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAKtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAGnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAIhD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,iBAAiB,CAAA;IAE3B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAElB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IAEpB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IAEvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,yBAAyB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAoB;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,eAAe,CAAA;IAEpC,uBAAuB;IACvB,SAAS,EAAE,eAAe,CAAA;IAC1B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAElB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,wCAAwC;IACxC,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,4DAA4D;IAC5D,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,mDAAmD;IACnD,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5C,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,8CAA8C;IAC9C,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;AAqOF,wBAMG"}
|
|
@@ -3,8 +3,8 @@ import y from "../../../components/ViewLayout/ViewLayout.vue.js";
|
|
|
3
3
|
import f from "../../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
4
4
|
import B from "./components/Header.vue.js";
|
|
5
5
|
import g from "../scalar-operation-block/components/OperationBlock.vue.js";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import S from "../scalar-response-block/components/ResponseBlock.vue.js";
|
|
7
|
+
const q = { class: "bg-b-1 flex h-full flex-col" }, b = { class: "lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-1" }, R = /* @__PURE__ */ m({
|
|
8
8
|
__name: "OperationBlock",
|
|
9
9
|
props: {
|
|
10
10
|
eventBus: {},
|
|
@@ -33,33 +33,31 @@ const S = { class: "bg-b-1 flex h-full flex-col" }, V = { class: "lg:min-h-heade
|
|
|
33
33
|
security: {},
|
|
34
34
|
events: {},
|
|
35
35
|
plugins: {},
|
|
36
|
-
environment: {}
|
|
37
|
-
envVariables: {}
|
|
36
|
+
environment: {}
|
|
38
37
|
},
|
|
39
38
|
setup(u) {
|
|
40
|
-
const n = u,
|
|
39
|
+
const n = u, p = s(
|
|
41
40
|
() => n.operation["x-scalar-method"] ?? n.method
|
|
42
|
-
),
|
|
43
|
-
return (e, t) => (h(), d("div",
|
|
44
|
-
v("div",
|
|
41
|
+
), l = s(() => n.operation["x-scalar-path"] ?? n.path);
|
|
42
|
+
return (e, t) => (h(), d("div", q, [
|
|
43
|
+
v("div", b, [
|
|
45
44
|
o(B, {
|
|
46
|
-
|
|
45
|
+
documentUrl: e.documentUrl,
|
|
47
46
|
environment: e.environment,
|
|
47
|
+
eventBus: e.eventBus,
|
|
48
48
|
events: e.events,
|
|
49
|
+
hideClientButton: e.hideClientButton,
|
|
49
50
|
history: e.history,
|
|
51
|
+
integration: e.integration,
|
|
52
|
+
isSidebarOpen: e.isSidebarOpen,
|
|
50
53
|
layout: e.layout,
|
|
51
|
-
method:
|
|
52
|
-
path:
|
|
54
|
+
method: p.value,
|
|
55
|
+
path: l.value,
|
|
53
56
|
percentage: e.requestLoadingPercentage,
|
|
54
57
|
server: e.server,
|
|
55
58
|
servers: e.servers,
|
|
56
|
-
isSidebarOpen: e.isSidebarOpen,
|
|
57
59
|
showSidebar: e.showSidebar,
|
|
58
|
-
hideClientButton: e.hideClientButton,
|
|
59
|
-
integration: e.integration,
|
|
60
|
-
documentUrl: e.documentUrl,
|
|
61
60
|
source: e.source,
|
|
62
|
-
eventBus: e.eventBus,
|
|
63
61
|
onExecute: t[0] || (t[0] = () => e.eventBus.emit("operation:send:request", {
|
|
64
62
|
meta: { path: e.path, method: e.method, exampleKey: e.exampleKey }
|
|
65
63
|
})),
|
|
@@ -81,40 +79,39 @@ const S = { class: "bg-b-1 flex h-full flex-col" }, V = { class: "lg:min-h-heade
|
|
|
81
79
|
path: r.value
|
|
82
80
|
}
|
|
83
81
|
}))
|
|
84
|
-
}, null, 8, ["
|
|
82
|
+
}, null, 8, ["documentUrl", "environment", "eventBus", "events", "hideClientButton", "history", "integration", "isSidebarOpen", "layout", "method", "path", "percentage", "server", "servers", "showSidebar", "source"])
|
|
85
83
|
]),
|
|
86
84
|
o(y, null, {
|
|
87
85
|
default: a(() => [
|
|
88
86
|
o(f, { class: "flex flex-1" }, {
|
|
89
87
|
default: a(() => [
|
|
90
88
|
o(i(g), {
|
|
91
|
-
|
|
89
|
+
authMeta: e.authMeta,
|
|
92
90
|
environment: e.environment,
|
|
91
|
+
eventBus: e.eventBus,
|
|
93
92
|
exampleKey: e.exampleKey,
|
|
94
93
|
layout: e.layout,
|
|
95
94
|
method: e.method,
|
|
96
95
|
operation: e.operation,
|
|
97
96
|
path: e.path,
|
|
98
|
-
|
|
97
|
+
plugins: e.plugins,
|
|
99
98
|
security: e.security,
|
|
100
|
-
eventBus: e.eventBus,
|
|
101
99
|
securitySchemes: e.securitySchemes,
|
|
102
|
-
selectedSecurity: e.selectedSecurity
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
o(i(b), {
|
|
100
|
+
selectedSecurity: e.selectedSecurity
|
|
101
|
+
}, null, 8, ["authMeta", "environment", "eventBus", "exampleKey", "layout", "method", "operation", "path", "plugins", "security", "securitySchemes", "selectedSecurity"]),
|
|
102
|
+
o(i(S), {
|
|
106
103
|
appVersion: e.appVersion,
|
|
104
|
+
eventBus: e.eventBus,
|
|
107
105
|
events: e.events,
|
|
108
106
|
layout: e.layout,
|
|
107
|
+
plugins: e.plugins,
|
|
109
108
|
request: e.request,
|
|
110
109
|
response: e.response,
|
|
111
|
-
plugins: e.plugins,
|
|
112
|
-
eventBus: e.eventBus,
|
|
113
110
|
totalPerformedRequests: e.totalPerformedRequests,
|
|
114
111
|
onSendRequest: t[3] || (t[3] = (r) => e.eventBus.emit("operation:send:request", {
|
|
115
112
|
meta: { path: e.path, method: e.method, exampleKey: e.exampleKey }
|
|
116
113
|
}))
|
|
117
|
-
}, null, 8, ["appVersion", "
|
|
114
|
+
}, null, 8, ["appVersion", "eventBus", "events", "layout", "plugins", "request", "response", "totalPerformedRequests"])
|
|
118
115
|
]),
|
|
119
116
|
_: 1
|
|
120
117
|
})
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
-
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
4
4
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
5
5
|
import type { ClientLayout } from '../../../../hooks/index.js';
|
|
6
|
-
import type { EnvVariable } from '../../../../store/index.js';
|
|
7
6
|
import type { createStoreEvents } from '../../../../store/events.js';
|
|
8
7
|
import { type History } from '../../../../v2/blocks/scalar-address-bar-block/index.js';
|
|
9
8
|
type __VLS_Props = {
|
|
@@ -39,11 +38,9 @@ type __VLS_Props = {
|
|
|
39
38
|
*/
|
|
40
39
|
requestLoadingPercentage?: number;
|
|
41
40
|
/** Event bus */
|
|
42
|
-
events: ReturnType<typeof createStoreEvents>;
|
|
43
41
|
eventBus: WorkspaceEventBus;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
envVariables: EnvVariable[];
|
|
42
|
+
environment: XScalarEnvironment;
|
|
43
|
+
events: ReturnType<typeof createStoreEvents>;
|
|
47
44
|
};
|
|
48
45
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
49
46
|
execute: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"names":[],"mappings":"AAuKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAGtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAE/E,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,UAAU,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IAEpB,yBAAyB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAoB;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,eAAe,CAAA;IAEpC,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IAEvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;IAEjC,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;IAE/B,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAC7C,CAAC;;;;eAQW,MAAM;;;eAMN,UAAU;;;;;eANV,MAAM;;;eAMN,UAAU;;;AAoOvB,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Header.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0b45d144"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as m, createElementBlock as r, openBlock as n, createEl
|
|
|
2
2
|
import { ScalarIcon as u } from "@scalar/components";
|
|
3
3
|
import f from "../../scalar-address-bar-block/components/AddressBar.vue.js";
|
|
4
4
|
import y from "../../../../components/OpenApiClientButton.vue.js";
|
|
5
|
-
const
|
|
5
|
+
const h = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center border-b p-2 pt-2 lg:p-1 lg:pt-1" }, b = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, B = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, S = /* @__PURE__ */ m({
|
|
6
6
|
__name: "Header",
|
|
7
7
|
props: {
|
|
8
8
|
path: {},
|
|
@@ -18,26 +18,23 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
|
|
|
18
18
|
servers: {},
|
|
19
19
|
history: {},
|
|
20
20
|
requestLoadingPercentage: {},
|
|
21
|
-
events: {},
|
|
22
21
|
eventBus: {},
|
|
23
22
|
environment: {},
|
|
24
|
-
|
|
23
|
+
events: {}
|
|
25
24
|
},
|
|
26
25
|
emits: ["execute", "update:path", "update:method"],
|
|
27
26
|
setup(C, { emit: p }) {
|
|
28
27
|
const a = p;
|
|
29
|
-
return (e, t) => (n(), r("div",
|
|
30
|
-
s("div",
|
|
28
|
+
return (e, t) => (n(), r("div", h, [
|
|
29
|
+
s("div", b, [
|
|
31
30
|
e.showSidebar ? (n(), r("div", {
|
|
32
31
|
key: 0,
|
|
33
32
|
class: v(["size-8", { hidden: e.layout === "modal" && !e.isSidebarOpen }])
|
|
34
33
|
}, null, 2)) : l("", !0)
|
|
35
34
|
]),
|
|
36
35
|
d(i(f), {
|
|
37
|
-
"onUpdate:method": t[0] || (t[0] = (o) => a("update:method", o)),
|
|
38
|
-
"onUpdate:path": t[1] || (t[1] = (o) => a("update:path", o)),
|
|
39
|
-
envVariables: e.envVariables,
|
|
40
36
|
environment: e.environment,
|
|
37
|
+
eventBus: e.eventBus,
|
|
41
38
|
events: e.events,
|
|
42
39
|
history: e.history,
|
|
43
40
|
layout: e.layout,
|
|
@@ -46,9 +43,10 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
|
|
|
46
43
|
percentage: e.requestLoadingPercentage,
|
|
47
44
|
server: e.server,
|
|
48
45
|
servers: e.servers,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
onExecute: t[0] || (t[0] = (o) => a("execute")),
|
|
47
|
+
"onUpdate:method": t[1] || (t[1] = (o) => a("update:method", o)),
|
|
48
|
+
"onUpdate:path": t[2] || (t[2] = (o) => a("update:path", o))
|
|
49
|
+
}, null, 8, ["environment", "eventBus", "events", "history", "layout", "method", "path", "percentage", "server", "servers"]),
|
|
52
50
|
s("div", B, [
|
|
53
51
|
e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (n(), g(i(y), {
|
|
54
52
|
key: 0,
|
|
@@ -89,5 +87,5 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
|
|
|
89
87
|
}
|
|
90
88
|
});
|
|
91
89
|
export {
|
|
92
|
-
|
|
90
|
+
S as default
|
|
93
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/ExamplePicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/ExamplePicker.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CACvC,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;;;;;;AA0GF,wBAOG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as u, mergeModels as
|
|
1
|
+
import { defineComponent as u, mergeModels as p, useModel as c, computed as m, createBlock as f, openBlock as x, unref as l, withCtx as n, createVNode as i, createElementVNode as v, toDisplayString as w } from "vue";
|
|
2
2
|
import { ScalarListbox as V, ScalarButton as b } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as g } from "@scalar/icons";
|
|
4
4
|
const _ = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
|
|
5
5
|
__name: "ExamplePicker",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ p({
|
|
7
7
|
examples: { default: () => ({}) }
|
|
8
8
|
}, {
|
|
9
9
|
modelValue: {
|
|
@@ -13,29 +13,30 @@ const _ = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
|
|
|
13
13
|
}),
|
|
14
14
|
emits: ["update:modelValue"],
|
|
15
15
|
setup(o) {
|
|
16
|
-
const
|
|
16
|
+
const r = c(o, "modelValue"), s = m(
|
|
17
17
|
() => Object.entries(o.examples).map(([e, t]) => ({
|
|
18
18
|
id: e,
|
|
19
19
|
label: t?.summary ?? e
|
|
20
20
|
}))
|
|
21
|
-
), a =
|
|
22
|
-
get: () =>
|
|
23
|
-
set: (e) =>
|
|
21
|
+
), a = m({
|
|
22
|
+
get: () => s.value.find(({ id: e }) => e === r.value),
|
|
23
|
+
set: (e) => r.value = e?.id ?? ""
|
|
24
24
|
});
|
|
25
25
|
return (e, t) => (x(), f(l(V), {
|
|
26
26
|
modelValue: a.value,
|
|
27
27
|
"onUpdate:modelValue": t[0] || (t[0] = (d) => a.value = d),
|
|
28
28
|
class: "w-fit min-w-32",
|
|
29
|
-
options:
|
|
30
|
-
placement: "bottom-start"
|
|
29
|
+
options: s.value,
|
|
30
|
+
placement: "bottom-start",
|
|
31
|
+
teleport: ""
|
|
31
32
|
}, {
|
|
32
|
-
default:
|
|
33
|
+
default: n(() => [
|
|
33
34
|
i(l(b), {
|
|
34
35
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit min-w-0 gap-1.5 px-1.5 py-0.75 text-base font-normal",
|
|
35
36
|
"data-testid": "example-picker",
|
|
36
37
|
variant: "ghost"
|
|
37
38
|
}, {
|
|
38
|
-
default:
|
|
39
|
+
default: n(() => [
|
|
39
40
|
v("div", _, w(a.value?.label ?? "Select an example"), 1),
|
|
40
41
|
i(l(g), {
|
|
41
42
|
class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
2
|
-
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
4
4
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
5
|
import { type ClientLayout } from '../../../../hooks/index.js';
|
|
6
|
-
import type { EnvVariable } from '../../../../store/active-entities.js';
|
|
7
6
|
import type { createStoreEvents } from '../../../../store/events.js';
|
|
8
7
|
import { type History } from './AddressBarHistory.vue.js';
|
|
9
8
|
type __VLS_Props = {
|
|
@@ -24,9 +23,7 @@ type __VLS_Props = {
|
|
|
24
23
|
/** Event bus */
|
|
25
24
|
events: ReturnType<typeof createStoreEvents>;
|
|
26
25
|
eventBus: WorkspaceEventBus;
|
|
27
|
-
|
|
28
|
-
environment: Environment;
|
|
29
|
-
envVariables: EnvVariable[];
|
|
26
|
+
environment: XScalarEnvironment;
|
|
30
27
|
};
|
|
31
28
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
32
29
|
execute: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AA4SA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAIvD,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;eAkBW,MAAM;;;eAMN,cAAc;;;;;eANd,MAAM;;;eAMN,cAAc;;;AAmY3B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-79f90dcf"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { REQUEST_METHODS as
|
|
4
|
-
import E from "
|
|
5
|
-
import R from "
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as b, useId as h, ref as f, createElementBlock as y, openBlock as p, unref as s, createElementVNode as l, createVNode as o, normalizeStyle as B, createBlock as c, createCommentVNode as x, withCtx as w, toDisplayString as u } from "vue";
|
|
2
|
+
import { ScalarButton as k, ScalarIcon as S } from "@scalar/components";
|
|
3
|
+
import { REQUEST_METHODS as C } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import E from "./AddressBarHistory.vue.js";
|
|
5
|
+
import R from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
6
|
+
import V from "../../../components/server/ServerDropdown.vue.js";
|
|
7
|
+
import $ from "../../../components/code-input/CodeInput.vue.js";
|
|
8
|
+
const z = ["id"], U = { class: "address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]" }, A = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, I = { class: "z-context-plus flex gap-1" }, H = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, N = {
|
|
9
9
|
"aria-hidden": "true",
|
|
10
10
|
class: "inline-flex items-center gap-1"
|
|
11
|
-
},
|
|
11
|
+
}, T = { class: "sr-only" }, Q = /* @__PURE__ */ b({
|
|
12
12
|
__name: "AddressBar",
|
|
13
13
|
props: {
|
|
14
14
|
path: {},
|
|
@@ -20,55 +20,54 @@ const U = ["id"], A = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
20
20
|
percentage: { default: 100 },
|
|
21
21
|
events: {},
|
|
22
22
|
eventBus: {},
|
|
23
|
-
environment: {}
|
|
24
|
-
envVariables: {}
|
|
23
|
+
environment: {}
|
|
25
24
|
},
|
|
26
25
|
emits: ["execute", "update:path", "update:method"],
|
|
27
|
-
setup(n, { emit:
|
|
28
|
-
const a =
|
|
29
|
-
function
|
|
30
|
-
return
|
|
26
|
+
setup(n, { emit: v }) {
|
|
27
|
+
const a = v, d = h(), i = f(null), m = f(null);
|
|
28
|
+
function g() {
|
|
29
|
+
return C[n.method].colorVar;
|
|
31
30
|
}
|
|
32
31
|
return n.events.hotKeys.on((e) => {
|
|
33
32
|
e?.focusAddressBar && i.value?.focus();
|
|
34
33
|
}), n.events.focusAddressBar.on(() => {
|
|
35
34
|
n.layout === "modal" ? m.value?.$el?.focus() : i.value?.focus();
|
|
36
|
-
}), (e, t) => (
|
|
35
|
+
}), (e, t) => (p(), y("div", {
|
|
37
36
|
id: s(d),
|
|
38
37
|
class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-none lg:w-auto"
|
|
39
38
|
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
l("div", U, [
|
|
40
|
+
l("div", A, [
|
|
41
|
+
l("div", {
|
|
43
42
|
class: "absolute top-0 left-0 z-[1002] h-full w-full",
|
|
44
|
-
style:
|
|
45
|
-
backgroundColor: `color-mix(in srgb, transparent 90%, ${
|
|
43
|
+
style: B({
|
|
44
|
+
backgroundColor: `color-mix(in srgb, transparent 90%, ${g()})`,
|
|
46
45
|
transform: `translate3d(-${e.percentage}%,0,0)`
|
|
47
46
|
})
|
|
48
47
|
}, null, 4)
|
|
49
48
|
]),
|
|
50
|
-
|
|
51
|
-
o(s(
|
|
49
|
+
l("div", I, [
|
|
50
|
+
o(s(R), {
|
|
52
51
|
isEditable: e.layout !== "modal",
|
|
53
52
|
isSquare: "",
|
|
54
53
|
method: e.method,
|
|
55
54
|
teleport: "",
|
|
56
|
-
onChange: t[0] || (t[0] = (
|
|
55
|
+
onChange: t[0] || (t[0] = (r) => a("update:method", { value: r }))
|
|
57
56
|
}, null, 8, ["isEditable", "method"])
|
|
58
57
|
]),
|
|
59
|
-
|
|
60
|
-
e.servers.length ? (
|
|
58
|
+
l("div", H, [
|
|
59
|
+
e.servers.length ? (p(), c(s(V), {
|
|
61
60
|
key: 0,
|
|
62
61
|
layout: e.layout,
|
|
63
62
|
server: e.server,
|
|
64
63
|
servers: e.servers,
|
|
65
64
|
target: s(d),
|
|
66
|
-
onAddServer: t[1] || (t[1] = (
|
|
67
|
-
"onUpdate:selectedServer": t[2] || (t[2] = (
|
|
68
|
-
"onUpdate:variable": t[3] || (t[3] = (
|
|
65
|
+
onAddServer: t[1] || (t[1] = (r) => e.eventBus.emit("open:command-palette", "addServer")),
|
|
66
|
+
"onUpdate:selectedServer": t[2] || (t[2] = (r) => e.eventBus.emit("server:update:selected", r)),
|
|
67
|
+
"onUpdate:variable": t[3] || (t[3] = (r) => e.eventBus.emit("server:update:variables", r))
|
|
69
68
|
}, null, 8, ["layout", "server", "servers", "target"])) : x("", !0),
|
|
70
|
-
t[8] || (t[8] =
|
|
71
|
-
o(
|
|
69
|
+
t[8] || (t[8] = l("div", { class: "fade-left" }, null, -1)),
|
|
70
|
+
o(s($), {
|
|
72
71
|
ref_key: "addressBarRef",
|
|
73
72
|
ref: i,
|
|
74
73
|
"aria-label": "Path",
|
|
@@ -78,46 +77,45 @@ const U = ["id"], A = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
78
77
|
disableEnter: "",
|
|
79
78
|
disableTabIndent: "",
|
|
80
79
|
emitOnBlur: !1,
|
|
81
|
-
envVariables: e.envVariables,
|
|
82
80
|
environment: e.environment,
|
|
83
81
|
importCurl: "",
|
|
84
82
|
modelValue: e.path,
|
|
85
83
|
placeholder: e.server ? "" : "Enter a URL or cURL command",
|
|
86
84
|
server: "",
|
|
87
|
-
onCurl: t[4] || (t[4] = (
|
|
88
|
-
onSubmit: t[5] || (t[5] = (
|
|
89
|
-
"onUpdate:modelValue": t[6] || (t[6] = (
|
|
90
|
-
}, null, 8, ["disabled", "
|
|
91
|
-
t[9] || (t[9] =
|
|
85
|
+
onCurl: t[4] || (t[4] = (r) => e.eventBus.emit("import:curl", { value: r })),
|
|
86
|
+
onSubmit: t[5] || (t[5] = (r) => a("execute")),
|
|
87
|
+
"onUpdate:modelValue": t[6] || (t[6] = (r) => a("update:path", { value: r }))
|
|
88
|
+
}, null, 8, ["disabled", "environment", "modelValue", "placeholder"]),
|
|
89
|
+
t[9] || (t[9] = l("div", { class: "fade-right" }, null, -1))
|
|
92
90
|
]),
|
|
93
|
-
o(
|
|
91
|
+
o(E, {
|
|
94
92
|
history: e.history,
|
|
95
93
|
target: s(d)
|
|
96
94
|
}, null, 8, ["history", "target"]),
|
|
97
|
-
o(s(
|
|
95
|
+
o(s(k), {
|
|
98
96
|
ref_key: "sendButtonRef",
|
|
99
97
|
ref: m,
|
|
100
98
|
class: "z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
|
|
101
99
|
disabled: e.percentage < 100,
|
|
102
|
-
onClick: t[7] || (t[7] = (
|
|
100
|
+
onClick: t[7] || (t[7] = (r) => a("execute"))
|
|
103
101
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
|
|
106
|
-
o(s(
|
|
102
|
+
default: w(() => [
|
|
103
|
+
l("span", N, [
|
|
104
|
+
o(s(S), {
|
|
107
105
|
class: "relative shrink-0 fill-current",
|
|
108
106
|
icon: "Play",
|
|
109
107
|
size: "xs"
|
|
110
108
|
}),
|
|
111
|
-
t[10] || (t[10] =
|
|
109
|
+
t[10] || (t[10] = l("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
|
|
112
110
|
]),
|
|
113
|
-
|
|
111
|
+
l("span", T, " Send " + u(e.method) + " request to " + u(e.server?.url ?? "") + u(e.path), 1)
|
|
114
112
|
]),
|
|
115
113
|
_: 1
|
|
116
114
|
}, 8, ["disabled"])
|
|
117
115
|
])
|
|
118
|
-
], 8,
|
|
116
|
+
], 8, z));
|
|
119
117
|
}
|
|
120
118
|
});
|
|
121
119
|
export {
|
|
122
|
-
|
|
120
|
+
Q as default
|
|
123
121
|
};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Icon } from '@scalar/components';
|
|
2
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
3
|
import type { AuthMeta } from '@scalar/workspace-store/mutators';
|
|
4
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
4
5
|
import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
|
-
import { type EnvVariable } from '../../../../store/index.js';
|
|
6
6
|
import { type SecuritySchemeOption } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js';
|
|
7
7
|
type __VLS_Props = {
|
|
8
|
-
environment:
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
environment: XScalarEnvironment;
|
|
9
|
+
eventBus: WorkspaceEventBus;
|
|
10
|
+
/** Whether we can add or delete auth schemes */
|
|
11
|
+
isReadOnly?: boolean;
|
|
12
|
+
/** Creates a static disclosure that cannot be collapsed */
|
|
13
|
+
isStatic?: boolean;
|
|
14
|
+
meta: AuthMeta;
|
|
11
15
|
security: OpenApiDocument['security'];
|
|
12
|
-
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
13
16
|
securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
|
|
17
|
+
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
14
18
|
server: ServerObject | undefined;
|
|
15
19
|
title: string;
|
|
16
|
-
eventBus: WorkspaceEventBus;
|
|
17
|
-
meta: AuthMeta;
|
|
18
20
|
};
|
|
19
21
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
20
22
|
authIndicator: import("vue").ComputedRef<{
|
|
21
|
-
icon:
|
|
23
|
+
icon: Icon;
|
|
22
24
|
text: string;
|
|
23
25
|
} | null>;
|
|
24
26
|
selectedSchemeOptions: import("vue").ComputedRef<SecuritySchemeOption[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAiTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAIrE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;cA8BqC,IAAI;cAAQ,MAAM;;;;;AA+bzD,wBAOG"}
|