@scalar/api-client 2.12.0 → 2.13.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 +42 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +14 -14
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +38 -38
- package/dist/components/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/EmptyState.vue.js +2 -2
- package/dist/components/EmptyState.vue2.js +27 -16
- package/dist/components/TopNav/TopNav.vue.js +33 -33
- package/dist/layouts/App/create-api-client-app.d.ts +28 -28
- package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
- package/dist/libs/create-client.d.ts +28 -28
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/send-request/create-fetch-body.d.ts +2 -2
- package/dist/store/active-entities.d.ts +2 -2
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +8 -8
- package/dist/store/request-example.d.ts +12 -12
- package/dist/store/store.d.ts +28 -28
- package/dist/store/workspace.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +9 -8
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +14 -11
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +22 -22
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +18 -15
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +17 -17
- 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 +17 -12
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +52 -52
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +126 -103
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -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 +56 -53
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +26 -0
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/DesktopTab.vue.js +7 -0
- package/dist/v2/features/app/components/DesktopTab.vue2.js +134 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +9 -4
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +47 -13
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +2 -4
- package/dist/v2/features/app/components/SplashScreen.vue.js +2 -2
- package/dist/v2/features/app/components/SplashScreen.vue2.js +2 -2
- package/dist/v2/features/app/helpers/routes.js +1 -1
- package/dist/v2/features/collection/components/Settings.vue2.js +3 -3
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +61 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +48 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +52 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts +36 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.js +78 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +30 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +169 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +34 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +175 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +43 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +115 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +213 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +38 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +89 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts +41 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +7 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +172 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +33 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +40 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/index.d.ts +2 -0
- package/dist/v2/features/command-palette/components/index.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/index.js +4 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +31 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +13 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +12 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +26 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +70 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +18 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts +11 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +11 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +202 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +109 -0
- package/dist/v2/features/command-palette/types.d.ts +82 -0
- package/dist/v2/features/command-palette/types.d.ts.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +24 -20
- package/dist/v2/helpers/drag-handle-factory.d.ts +1 -2
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
- package/dist/v2/helpers/drag-handle-factory.js +74 -90
- package/dist/v2/helpers/get-tab-details.d.ts +43 -0
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -0
- package/dist/v2/helpers/get-tab-details.js +34 -0
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/is-url.d.ts +2 -0
- package/dist/v2/helpers/is-url.d.ts.map +1 -0
- package/dist/v2/helpers/is-url.js +5 -0
- package/dist/v2/helpers/remove-circular.d.ts +15 -0
- package/dist/v2/helpers/remove-circular.d.ts.map +1 -0
- package/dist/v2/helpers/remove-circular.js +18 -0
- package/dist/v2/helpers/storage.d.ts +4 -6
- package/dist/v2/helpers/storage.d.ts.map +1 -1
- package/dist/v2/helpers/storage.js +8 -12
- package/dist/v2/hooks/use-sidebar-state.d.ts +12 -19
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
- package/dist/v2/hooks/use-sidebar-state.js +20 -18
- package/dist/v2/hooks/use-sync-path.d.ts +11 -0
- package/dist/v2/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/hooks/use-sync-path.js +51 -0
- package/dist/v2/hooks/use-tabs.d.ts +31 -0
- package/dist/v2/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/hooks/use-tabs.js +44 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts +5 -2
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +91 -36
- package/dist/v2/hooks/use-workspace-selector.d.ts +16 -6
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-selector.js +58 -64
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +78 -78
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +19 -19
- package/package.json +136 -46
|
@@ -3,9 +3,8 @@ import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
|
3
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
4
|
import type { AuthMeta } from '@scalar/workspace-store/mutators';
|
|
5
5
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
6
|
-
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
6
|
+
import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
7
7
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
|
|
8
|
-
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
9
8
|
import type { ClientLayout } from '../../../hooks/index.js';
|
|
10
9
|
import { type History } from '../../../v2/blocks/scalar-address-bar-block/index.js';
|
|
11
10
|
import type { ClientPlugin } from '../../../v2/plugins';
|
|
@@ -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":"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"}
|
|
@@ -5,10 +5,10 @@ import { createStoreEvents as c } from "../../../store/events.js";
|
|
|
5
5
|
import B from "./components/Header.vue.js";
|
|
6
6
|
import g from "../request-block/RequestBlock.vue.js";
|
|
7
7
|
import S from "../response-block/ResponseBlock.vue.js";
|
|
8
|
-
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" },
|
|
8
|
+
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" }, K = {
|
|
9
9
|
name: "OperationBlock"
|
|
10
10
|
}, M = /* @__PURE__ */ m({
|
|
11
|
-
...
|
|
11
|
+
...K,
|
|
12
12
|
props: {
|
|
13
13
|
eventBus: {},
|
|
14
14
|
appVersion: {},
|
|
@@ -39,12 +39,13 @@ const q = { class: "bg-b-1 flex h-full flex-col" }, b = { class: "lg:min-h-heade
|
|
|
39
39
|
},
|
|
40
40
|
emits: ["update:servers"],
|
|
41
41
|
setup(t, { emit: i }) {
|
|
42
|
-
const u = i,
|
|
42
|
+
const u = i, a = () => t.eventBus.emit("operation:send:request", {
|
|
43
43
|
meta: { path: t.path, method: t.method, exampleKey: t.exampleKey }
|
|
44
44
|
}), l = (e) => t.eventBus.emit("operation:update:method", {
|
|
45
45
|
meta: {
|
|
46
46
|
method: t.method,
|
|
47
|
-
path: t.path
|
|
47
|
+
path: t.path,
|
|
48
|
+
exampleKey: t.exampleKey
|
|
48
49
|
},
|
|
49
50
|
payload: {
|
|
50
51
|
method: e.value
|
|
@@ -62,7 +63,7 @@ const q = { class: "bg-b-1 flex h-full flex-col" }, b = { class: "lg:min-h-heade
|
|
|
62
63
|
},
|
|
63
64
|
{ debounceKey: "operation-update-path" }
|
|
64
65
|
);
|
|
65
|
-
return (e,
|
|
66
|
+
return (e, r) => (h(), p("div", q, [
|
|
66
67
|
y("div", b, [
|
|
67
68
|
o(B, {
|
|
68
69
|
documentUrl: e.documentUrl,
|
|
@@ -80,10 +81,10 @@ const q = { class: "bg-b-1 flex h-full flex-col" }, b = { class: "lg:min-h-heade
|
|
|
80
81
|
servers: e.servers,
|
|
81
82
|
showSidebar: e.showSidebar,
|
|
82
83
|
source: e.source,
|
|
83
|
-
onExecute:
|
|
84
|
+
onExecute: a,
|
|
84
85
|
"onUpdate:method": l,
|
|
85
86
|
"onUpdate:path": d,
|
|
86
|
-
"onUpdate:servers":
|
|
87
|
+
"onUpdate:servers": r[0] || (r[0] = (U) => u("update:servers"))
|
|
87
88
|
}, null, 8, ["documentUrl", "environment", "eventBus", "hideClientButton", "history", "integration", "isSidebarOpen", "layout", "method", "path", "percentage", "server", "servers", "showSidebar", "source"])
|
|
88
89
|
]),
|
|
89
90
|
o(v, null, {
|
|
@@ -113,7 +114,7 @@ const q = { class: "bg-b-1 flex h-full flex-col" }, b = { class: "lg:min-h-heade
|
|
|
113
114
|
request: e.request,
|
|
114
115
|
response: e.response,
|
|
115
116
|
totalPerformedRequests: e.totalPerformedRequests,
|
|
116
|
-
onSendRequest:
|
|
117
|
+
onSendRequest: a
|
|
117
118
|
}, null, 8, ["appVersion", "eventBus", "events", "layout", "plugins", "request", "response", "totalPerformedRequests"])
|
|
118
119
|
]),
|
|
119
120
|
_: 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
3
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
4
|
-
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/
|
|
4
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
5
|
import type { ClientLayout } from '../../../../hooks/index.js';
|
|
6
6
|
import { type History } from '../../../../v2/blocks/scalar-address-bar-block/index.js';
|
|
7
7
|
type __VLS_Props = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"names":[],"mappings":"AA+JA,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,
|
|
1
|
+
{"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"names":[],"mappings":"AA+JA,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,8DAA8D,CAAA;AAGhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,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;IACpB,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;IACpC,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;;eAQW,MAAM;;;eAMN,UAAU;;;;;;eANV,MAAM;;;eAMN,UAAU;;;AAsOvB,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Header.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-e6a4ba62"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/response-block/ResponseBlock.vue"],"names":[],"mappings":"AAoSA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAUvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,KAAK,WAAW,GAAG;IACjB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAElB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IAExB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAmCF,QAAA,MAAM,gBAAgB,yCAA0C,CAAA;AAChE,KAAK,MAAM,GAAG,KAAK,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAmZvD,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseBlock.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0a5d9028"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as I, computed as i, ref as
|
|
1
|
+
import { defineComponent as I, computed as i, ref as S, useId as E, createBlock as r, openBlock as n, withCtx as u, createElementVNode as m, normalizeClass as B, createElementBlock as c, createVNode as h, Fragment as y, createCommentVNode as d, createTextVNode as A, renderList as O, unref as z, withDirectives as N, resolveDynamicComponent as P, vShow as L } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as j } from "@scalar/components";
|
|
3
3
|
import w from "../../../components/SectionFilter.vue.js";
|
|
4
4
|
import D from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
@@ -40,16 +40,16 @@ const W = { class: "flex h-8 flex-1 items-center" }, X = ["id", "role"], b = 2e5
|
|
|
40
40
|
value: s
|
|
41
41
|
} : [];
|
|
42
42
|
}) ?? []
|
|
43
|
-
), $ = ["Cookies", "Headers", "Body"], o =
|
|
43
|
+
), $ = ["Cookies", "Headers", "Body"], o = S("All"), v = i(() => ["All", ...$]), a = i(
|
|
44
44
|
() => Object.fromEntries(
|
|
45
|
-
v.value.map((e) => [e,
|
|
45
|
+
v.value.map((e) => [e, E()])
|
|
46
46
|
)
|
|
47
|
-
),
|
|
47
|
+
), q = i(() => {
|
|
48
48
|
if (!t.response || !("size" in t.response))
|
|
49
49
|
return !1;
|
|
50
50
|
const e = t.response.headers?.["content-type"] || t.response.headers?.["Content-Type"];
|
|
51
51
|
return !e || (t.response.size ?? 0) <= b || e.includes("text/html") ? !1 : Q.some((l) => e.includes(l)) && (t.response.size ?? 0) > b;
|
|
52
|
-
}),
|
|
52
|
+
}), R = i(
|
|
53
53
|
() => t.request?.headers ? [...t.request.headers].map((e) => ({
|
|
54
54
|
name: e[0],
|
|
55
55
|
value: e[1],
|
|
@@ -59,8 +59,8 @@ const W = { class: "flex h-8 flex-1 items-center" }, X = ["id", "role"], b = 2e5
|
|
|
59
59
|
return H({
|
|
60
60
|
responseHeaders: p,
|
|
61
61
|
responseCookies: k,
|
|
62
|
-
requestHeaders:
|
|
63
|
-
shouldVirtualize:
|
|
62
|
+
requestHeaders: R,
|
|
63
|
+
shouldVirtualize: q,
|
|
64
64
|
activeFilter: o,
|
|
65
65
|
filters: v
|
|
66
66
|
}), (e, s) => (n(), r(D, { "aria-label": "Response" }, {
|
|
@@ -106,7 +106,7 @@ const W = { class: "flex h-8 flex-1 items-center" }, X = ["id", "role"], b = 2e5
|
|
|
106
106
|
key: 1,
|
|
107
107
|
id: a.value.Headers,
|
|
108
108
|
class: "response-section-content-headers",
|
|
109
|
-
headers:
|
|
109
|
+
headers: R.value,
|
|
110
110
|
role: o.value === "All" ? "none" : "tabpanel"
|
|
111
111
|
}, {
|
|
112
112
|
title: u(() => [...s[5] || (s[5] = [
|
|
@@ -126,7 +126,7 @@ const W = { class: "flex h-8 flex-1 items-center" }, X = ["id", "role"], b = 2e5
|
|
|
126
126
|
])]),
|
|
127
127
|
_: 1
|
|
128
128
|
}, 8, ["id", "headers", "role"])) : d("", !0),
|
|
129
|
-
(n(!0), c(y, null,
|
|
129
|
+
(n(!0), c(y, null, O(e.plugins, (l, g) => (n(), r(z(j), { key: g }, {
|
|
130
130
|
default: u(() => [
|
|
131
131
|
l.components?.response ? N((n(), r(P(l.components.response), {
|
|
132
132
|
key: 0,
|
|
@@ -144,7 +144,7 @@ const W = { class: "flex h-8 flex-1 items-center" }, X = ["id", "role"], b = 2e5
|
|
|
144
144
|
id: a.value.Body,
|
|
145
145
|
class: "response-section-content-body",
|
|
146
146
|
reader: e.response.reader
|
|
147
|
-
}, null, 8, ["id", "reader"])) :
|
|
147
|
+
}, null, 8, ["id", "reader"])) : q.value && typeof e.response?.data == "string" ? (n(), r(U, {
|
|
148
148
|
key: 1,
|
|
149
149
|
id: a.value.Body,
|
|
150
150
|
content: e.response.data,
|
|
@@ -169,7 +169,10 @@ const W = { class: "flex h-8 flex-1 items-center" }, X = ["id", "role"], b = 2e5
|
|
|
169
169
|
events: e.events,
|
|
170
170
|
layout: e.layout,
|
|
171
171
|
totalPerformedRequests: e.totalPerformedRequests,
|
|
172
|
-
onAddRequest: s[1] || (s[1] = (l) => e.eventBus.emit("ui:open:command-palette", {
|
|
172
|
+
onAddRequest: s[1] || (s[1] = (l) => e.eventBus.emit("ui:open:command-palette", {
|
|
173
|
+
action: "create-request",
|
|
174
|
+
payload: void 0
|
|
175
|
+
})),
|
|
173
176
|
onOpenCommandPalette: s[2] || (s[2] = (l) => e.eventBus.emit("ui:open:command-palette")),
|
|
174
177
|
onSendRequest: s[3] || (s[3] = (l) => T("sendRequest"))
|
|
175
178
|
}, null, 8, ["appVersion", "events", "layout", "totalPerformedRequests"])),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as y, ref as
|
|
2
|
-
import { useLoadingState as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as y, ref as c, watch as _, nextTick as w, onMounted as h, onBeforeUnmount as k, createBlock as B, openBlock as l, unref as s, withCtx as v, createElementVNode as i, createElementBlock as d, createCommentVNode as u, toDisplayString as p, createVNode as S } from "vue";
|
|
2
|
+
import { useLoadingState as b, ScalarLoading as C } from "@scalar/components";
|
|
3
|
+
import L from "../../../components/layout/CollapsibleSection.vue.js";
|
|
4
4
|
const T = { class: "flex w-full items-center justify-between" }, E = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mr-2 flex items-center gap-2"
|
|
@@ -16,53 +16,53 @@ const T = { class: "flex w-full items-center justify-between" }, E = {
|
|
|
16
16
|
reader: {}
|
|
17
17
|
},
|
|
18
18
|
setup(f) {
|
|
19
|
-
const e =
|
|
20
|
-
|
|
19
|
+
const e = b(), o = c(""), n = c(null), m = new TextDecoder(), a = c(null), g = () => {
|
|
20
|
+
a.value && (a.value.scrollTop = a.value.scrollHeight);
|
|
21
21
|
};
|
|
22
22
|
_(o, () => {
|
|
23
|
-
w(
|
|
23
|
+
w(g);
|
|
24
24
|
});
|
|
25
25
|
async function x() {
|
|
26
26
|
try {
|
|
27
27
|
for (; e.isLoading; ) {
|
|
28
|
-
const { done:
|
|
29
|
-
if (
|
|
30
|
-
e.
|
|
28
|
+
const { done: r, value: t } = await f.reader.read();
|
|
29
|
+
if (r) {
|
|
30
|
+
e.clear();
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
t && (o.value += m.decode(t, { stream: !0 }));
|
|
34
34
|
}
|
|
35
|
-
} catch (
|
|
36
|
-
console.error("Error reading stream:",
|
|
35
|
+
} catch (r) {
|
|
36
|
+
console.error("Error reading stream:", r), e.clear(), n.value = r;
|
|
37
37
|
} finally {
|
|
38
38
|
o.value += m.decode();
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return h(() => {
|
|
42
|
-
e.
|
|
42
|
+
e.start(), x(), n.value = null;
|
|
43
43
|
}), k(() => {
|
|
44
|
-
f.reader.cancel(), e.
|
|
45
|
-
}), (
|
|
46
|
-
title:
|
|
44
|
+
f.reader.cancel(), e.clear();
|
|
45
|
+
}), (r, t) => (l(), B(s(L), { class: "max-h-content overflow-y-hidden" }, {
|
|
46
|
+
title: v(() => [
|
|
47
47
|
i("div", T, [
|
|
48
48
|
t[1] || (t[1] = i("div", null, "Body", -1)),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
loadingState:
|
|
49
|
+
s(e).isLoading ? (l(), d("div", E, [
|
|
50
|
+
S(s(C), {
|
|
51
|
+
loadingState: s(e),
|
|
52
52
|
size: "xs"
|
|
53
53
|
}, null, 8, ["loadingState"]),
|
|
54
54
|
t[0] || (t[0] = i("span", { class: "text-c-2" }, " Listening… ", -1))
|
|
55
55
|
])) : u("", !0)
|
|
56
56
|
])
|
|
57
57
|
]),
|
|
58
|
-
default:
|
|
58
|
+
default: v(() => [
|
|
59
59
|
i("div", {
|
|
60
60
|
ref_key: "contentContainer",
|
|
61
|
-
ref:
|
|
61
|
+
ref: a,
|
|
62
62
|
class: "text-xxs font-code h-full overflow-auto leading-2 whitespace-pre-wrap"
|
|
63
63
|
}, [
|
|
64
|
-
|
|
65
|
-
o.value ? (
|
|
64
|
+
n.value ? (l(), d("div", N, p(n.value.message), 1)) : u("", !0),
|
|
65
|
+
o.value ? (l(), d("div", V, p(o.value), 1)) : u("", !0)
|
|
66
66
|
], 512)
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
@@ -11,12 +11,12 @@ type __VLS_Props = {
|
|
|
11
11
|
events: ReturnType<typeof createStoreEvents>;
|
|
12
12
|
};
|
|
13
13
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
openCommandPalette: () => any;
|
|
15
14
|
sendRequest: () => any;
|
|
15
|
+
openCommandPalette: () => any;
|
|
16
16
|
addRequest: () => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
-
onOpenCommandPalette?: (() => any) | undefined;
|
|
19
18
|
onSendRequest?: (() => any) | undefined;
|
|
19
|
+
onOpenCommandPalette?: (() => any) | undefined;
|
|
20
20
|
onAddRequest?: (() => any) | undefined;
|
|
21
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"AAmJA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,KAAK,WAAW,GAAG;IACjB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAC7C,CAAC;;;;;;;;;;AAqNF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseEmpty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-159bd9b3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as k, onMounted as v, onBeforeUnmount as b, createElementBlock as s, openBlock as a, createElementVNode as o, createCommentVNode as
|
|
1
|
+
import { defineComponent as k, onMounted as v, onBeforeUnmount as b, createElementBlock as s, openBlock as a, createElementVNode as o, createCommentVNode as n, normalizeClass as y, createVNode as l, createTextVNode as i, toDisplayString as x, unref as m } from "vue";
|
|
2
2
|
import { ScalarHotkey as d } from "@scalar/components";
|
|
3
3
|
import R from "../../../../assets/computer.ascii.js";
|
|
4
4
|
import g from "../../../../components/EmptyState.vue.js";
|
|
5
5
|
import q from "../../../../components/ScalarAsciiArt.vue.js";
|
|
6
|
-
const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" },
|
|
6
|
+
const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, S = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "scalar-version-number"
|
|
9
|
-
},
|
|
9
|
+
}, w = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, E = /* @__PURE__ */ k({
|
|
10
10
|
__name: "ResponseEmpty",
|
|
11
11
|
props: {
|
|
12
12
|
layout: {},
|
|
@@ -16,8 +16,8 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["addRequest", "sendRequest", "openCommandPalette"],
|
|
18
18
|
setup(u, { emit: c }) {
|
|
19
|
-
const
|
|
20
|
-
t?.createNew &&
|
|
19
|
+
const r = c, p = (t) => {
|
|
20
|
+
t?.createNew && r("addRequest");
|
|
21
21
|
};
|
|
22
22
|
return v(() => u.events.hotKeys.on(p)), b(() => u.events.hotKeys.off(p)), (t, e) => (a(), s("div", C, [
|
|
23
23
|
o("div", {
|
|
@@ -25,7 +25,7 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
25
25
|
"hidden opacity-0": t.totalPerformedRequests < 1 && t.layout !== "modal"
|
|
26
26
|
}])
|
|
27
27
|
}, [
|
|
28
|
-
t.layout !== "modal" ? (a(), s("div",
|
|
28
|
+
t.layout !== "modal" ? (a(), s("div", S, [
|
|
29
29
|
i(" Scalar App V" + x(t.appVersion) + " Beta ", 1),
|
|
30
30
|
e[3] || (e[3] = o("div", { class: "mt-2" }, [
|
|
31
31
|
o("a", {
|
|
@@ -33,7 +33,7 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
33
33
|
target: "_blank"
|
|
34
34
|
}, " Roadmap ")
|
|
35
35
|
], -1))
|
|
36
|
-
])) :
|
|
36
|
+
])) : n("", !0),
|
|
37
37
|
e[4] || (e[4] = o("a", {
|
|
38
38
|
class: "gitbook-show scalar-version-number",
|
|
39
39
|
href: "https://www.scalar.com",
|
|
@@ -51,30 +51,33 @@ const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
51
51
|
}])
|
|
52
52
|
}, [
|
|
53
53
|
l(g)
|
|
54
|
-
], 2)) :
|
|
55
|
-
o("div",
|
|
54
|
+
], 2)) : n("", !0),
|
|
55
|
+
o("div", w, [
|
|
56
56
|
t.layout !== "modal" ? (a(), s("button", {
|
|
57
57
|
key: 0,
|
|
58
58
|
class: "flex items-center gap-1.5",
|
|
59
59
|
type: "button",
|
|
60
|
-
onClick: e[0] || (e[0] = (f) =>
|
|
60
|
+
onClick: e[0] || (e[0] = (f) => r("openCommandPalette"))
|
|
61
61
|
}, [
|
|
62
62
|
e[5] || (e[5] = i(" Get Started ", -1)),
|
|
63
|
-
l(m(d), {
|
|
64
|
-
|
|
63
|
+
l(m(d), {
|
|
64
|
+
hotkey: "p",
|
|
65
|
+
modifier: ["default", "Shift"]
|
|
66
|
+
})
|
|
67
|
+
])) : n("", !0),
|
|
65
68
|
t.layout === "desktop" ? (a(), s("button", {
|
|
66
69
|
key: 1,
|
|
67
70
|
class: "flex items-center gap-1.5",
|
|
68
71
|
type: "button",
|
|
69
|
-
onClick: e[1] || (e[1] = (f) =>
|
|
72
|
+
onClick: e[1] || (e[1] = (f) => r("addRequest"))
|
|
70
73
|
}, [
|
|
71
74
|
e[6] || (e[6] = i(" New Request ", -1)),
|
|
72
75
|
l(m(d), { hotkey: "N" })
|
|
73
|
-
])) :
|
|
76
|
+
])) : n("", !0),
|
|
74
77
|
o("button", {
|
|
75
78
|
class: "flex items-center gap-1.5",
|
|
76
79
|
type: "button",
|
|
77
|
-
onClick: e[2] || (e[2] = (f) =>
|
|
80
|
+
onClick: e[2] || (e[2] = (f) => r("sendRequest"))
|
|
78
81
|
}, [
|
|
79
82
|
e[7] || (e[7] = i(" Send Request ", -1)),
|
|
80
83
|
l(m(d), { hotkey: "↵" })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseLoadingOverlay.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const p = /* @__PURE__ */
|
|
3
|
+
import a from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-57ced68a"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useLoadingState as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as c, ref as u, createBlock as d, openBlock as s, Transition as m, withCtx as l, createElementBlock as f, createCommentVNode as v, unref as a, createVNode as r, createTextVNode as p } from "vue";
|
|
2
|
+
import { useLoadingState as x, ScalarLoading as g, ScalarButton as k } from "@scalar/components";
|
|
3
|
+
const y = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
|
|
6
|
-
},
|
|
6
|
+
}, S = /* @__PURE__ */ c({
|
|
7
7
|
__name: "ResponseLoadingOverlay",
|
|
8
8
|
props: {
|
|
9
9
|
events: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const e =
|
|
13
|
-
return
|
|
14
|
-
n === "start" ?
|
|
11
|
+
setup(i) {
|
|
12
|
+
const e = x(), o = u();
|
|
13
|
+
return i.events.requestStatus.on(async (n) => {
|
|
14
|
+
n === "start" ? o.value = setTimeout(() => e.start(), 1e3) : (clearTimeout(o.value), o.value = void 0, await e.clear());
|
|
15
15
|
}), (n, t) => (s(), d(m, null, {
|
|
16
16
|
default: l(() => [
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
a(e).isActive ? (s(), f("div", y, [
|
|
18
|
+
r(a(g), {
|
|
19
19
|
class: "text-c-3",
|
|
20
|
-
|
|
20
|
+
loader: a(e),
|
|
21
21
|
size: "3xl"
|
|
22
|
-
}, null, 8, ["
|
|
23
|
-
|
|
22
|
+
}, null, 8, ["loader"]),
|
|
23
|
+
r(a(k), {
|
|
24
24
|
variant: "ghost",
|
|
25
|
-
onClick: t[0] || (t[0] = (
|
|
25
|
+
onClick: t[0] || (t[0] = (C) => n.events.cancelRequest.emit())
|
|
26
26
|
}, {
|
|
27
27
|
default: l(() => [...t[1] || (t[1] = [
|
|
28
|
-
|
|
28
|
+
p(" Cancel ", -1)
|
|
29
29
|
])]),
|
|
30
30
|
_: 1
|
|
31
31
|
})
|
|
32
|
-
])) :
|
|
32
|
+
])) : v("", !0)
|
|
33
33
|
]),
|
|
34
34
|
_: 1
|
|
35
35
|
}));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
S as default
|
|
40
40
|
};
|
|
@@ -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":"AAqUA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAUhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,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,IAAI,CAAA;IAC3B,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,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;;eAkBW,MAAM;;;eAMN,cAAc;;;;;;eANd,MAAM;;;eAMN,cAAc;;;AAkZ3B,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 d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a74c279d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, useId as B, computed as y, useTemplateRef as v, onMounted as x, onBeforeUnmount as w, createElementBlock as k, openBlock as b, unref as l, createElementVNode as r, createVNode as a, normalizeStyle as S, createBlock as C, createCommentVNode as R, withCtx as E, toDisplayString as u } from "vue";
|
|
2
2
|
import { ScalarButton as U, ScalarIcon as V } from "@scalar/components";
|
|
3
3
|
import { REQUEST_METHODS as $ } from "@scalar/helpers/http/http-info";
|
|
4
4
|
import z from "./AddressBarHistory.vue.js";
|
|
@@ -8,7 +8,7 @@ import A from "../../../components/code-input/CodeInput.vue.js";
|
|
|
8
8
|
const D = ["id"], F = { 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]" }, H = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, M = { class: "z-context-plus flex gap-1" }, N = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, q = {
|
|
9
9
|
"aria-hidden": "true",
|
|
10
10
|
class: "inline-flex items-center gap-1"
|
|
11
|
-
}, L = { class: "sr-only" }, W = /* @__PURE__ */
|
|
11
|
+
}, L = { class: "sr-only" }, W = /* @__PURE__ */ g({
|
|
12
12
|
__name: "AddressBar",
|
|
13
13
|
props: {
|
|
14
14
|
path: {},
|
|
@@ -22,19 +22,19 @@ const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
22
22
|
environment: {}
|
|
23
23
|
},
|
|
24
24
|
emits: ["execute", "update:path", "update:method", "update:servers"],
|
|
25
|
-
setup(o, { emit:
|
|
26
|
-
const n =
|
|
25
|
+
setup(o, { emit: c }) {
|
|
26
|
+
const n = c, d = B(), h = y(() => ({
|
|
27
27
|
backgroundColor: `color-mix(in srgb, transparent 90%, ${$[o.method].colorVar})`,
|
|
28
28
|
transform: `translate3d(-${o.percentage}%,0,0)`
|
|
29
|
-
})), m =
|
|
29
|
+
})), m = v("sendButtonRef"), i = v("addressBarRef"), f = () => m.value?.$el?.focus(), p = ({
|
|
30
30
|
event: t
|
|
31
31
|
}) => {
|
|
32
|
-
|
|
32
|
+
i.value?.isFocused && o.layout !== "desktop" || (i.value?.focus(), t.preventDefault());
|
|
33
33
|
};
|
|
34
34
|
return x(() => {
|
|
35
|
-
o.eventBus.on("ui:focus:address-bar",
|
|
35
|
+
o.eventBus.on("ui:focus:address-bar", p), o.eventBus.on("ui:focus:send-button", f);
|
|
36
36
|
}), w(() => {
|
|
37
|
-
o.eventBus.off("ui:focus:address-bar",
|
|
37
|
+
o.eventBus.off("ui:focus:address-bar", p), o.eventBus.off("ui:focus:send-button", f);
|
|
38
38
|
}), (t, e) => (b(), k("div", {
|
|
39
39
|
id: l(d),
|
|
40
40
|
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"
|
|
@@ -43,7 +43,7 @@ const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
43
43
|
r("div", H, [
|
|
44
44
|
r("div", {
|
|
45
45
|
class: "absolute top-0 left-0 z-[1002] h-full w-full",
|
|
46
|
-
style: S(
|
|
46
|
+
style: S(h.value)
|
|
47
47
|
}, null, 4)
|
|
48
48
|
]),
|
|
49
49
|
r("div", M, [
|
|
@@ -69,7 +69,7 @@ const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
69
69
|
e[8] || (e[8] = r("div", { class: "fade-left" }, null, -1)),
|
|
70
70
|
a(l(A), {
|
|
71
71
|
ref_key: "addressBarRef",
|
|
72
|
-
ref:
|
|
72
|
+
ref: i,
|
|
73
73
|
"aria-label": "Path",
|
|
74
74
|
class: "min-w-fit outline-none",
|
|
75
75
|
disableCloseBrackets: "",
|
|
@@ -82,7 +82,12 @@ const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
82
82
|
modelValue: t.path,
|
|
83
83
|
placeholder: t.server ? "" : "Enter a URL or cURL command",
|
|
84
84
|
server: "",
|
|
85
|
-
onCurl: e[4] || (e[4] = (s) => t.eventBus.emit("
|
|
85
|
+
onCurl: e[4] || (e[4] = (s) => t.eventBus.emit("ui:open:command-palette", {
|
|
86
|
+
action: "import-curl-command",
|
|
87
|
+
payload: {
|
|
88
|
+
curl: s
|
|
89
|
+
}
|
|
90
|
+
})),
|
|
86
91
|
onSubmit: e[5] || (e[5] = (s) => n("execute")),
|
|
87
92
|
"onUpdate:modelValue": e[6] || (e[6] = (s) => n("update:path", { value: s }))
|
|
88
93
|
}, null, 8, ["disabled", "environment", "modelValue", "placeholder"]),
|
|
@@ -108,7 +113,7 @@ const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
108
113
|
}),
|
|
109
114
|
e[10] || (e[10] = r("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
|
|
110
115
|
]),
|
|
111
|
-
r("span", L, " Send " +
|
|
116
|
+
r("span", L, " Send " + u(t.method) + " request to " + u(t.server?.url ?? "") + u(t.path), 1)
|
|
112
117
|
]),
|
|
113
118
|
_: 1
|
|
114
119
|
}, 8, ["disabled"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/scalar-address-bar-block/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/scalar-address-bar-block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACnE,YAAY,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA"}
|