@scalar/api-client 2.2.37 → 2.2.38
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 +39 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +107 -116
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +95 -75
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts +5 -1
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +92 -86
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +7 -10
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +5 -52
- package/dist/components/AddressBar/AddressBarServerItem.vue2.js +75 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +2 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +72 -64
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +83 -51
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +22 -21
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +14 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.js +47 -0
- package/dist/components/Server/ServerVariablesForm.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +12 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesSelect.vue.js +54 -0
- package/dist/components/Server/ServerVariablesSelect.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +11 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.js +29 -0
- package/dist/components/Server/ServerVariablesTextbox.vue2.js +4 -0
- package/dist/components/Server/types.d.ts +9 -0
- package/dist/components/Server/types.d.ts.map +1 -0
- package/dist/components/SideNav/SideHelp.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +11 -10
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue2.js +10 -9
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +95 -26
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +190 -52
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +95 -26
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +106 -32
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +86 -81
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +4 -4
- package/dist/store/active-entities.d.ts +13 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +52 -2
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +2 -2
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/servers.d.ts +40 -20
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +95 -28
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +51 -53
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +1 -1
- package/dist/views/Environment/Environment.vue2.js +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +88 -89
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +87 -88
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +16 -17
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +57 -74
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +39 -38
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +8 -7
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +5 -5
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +143 -143
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +71 -71
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -27
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +27 -26
- package/dist/views/Request/hooks/useOpenApiWatcher.js +1 -1
- package/dist/views/Request/libs/{live-sync.d.ts → watch-mode.d.ts} +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -0
- package/dist/views/Request/libs/{live-sync.js → watch-mode.js} +6 -6
- package/dist/views/Servers/Servers.vue2.js +29 -29
- package/package.json +14 -14
- package/dist/views/Request/libs/live-sync.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.2.38
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7a18a2d: feat: favors layout hook over isReadOnly
|
|
8
|
+
- 12e7232: feat: adds parameter examples support
|
|
9
|
+
- b0d5511: fix: addressbar stylel in modal
|
|
10
|
+
- 974234f: fix: server variable type mismatch
|
|
11
|
+
- 6400bfc: feat: revamps address bar server menu
|
|
12
|
+
- 901970f: fix: removes application/json content type as default
|
|
13
|
+
- 6400bfc: feat: removes server from request variables table
|
|
14
|
+
- a4ec7fa: refactor: use request entity for TestRequestButton
|
|
15
|
+
- 5ab0663: feat: adds request example array multiselect
|
|
16
|
+
- 917214a: chore: update Scalar support email
|
|
17
|
+
- 42b58bf: fix: updates address bar ui
|
|
18
|
+
- 2ed681b: fix: updates markup in unordered list
|
|
19
|
+
- Updated dependencies [12e7232]
|
|
20
|
+
- Updated dependencies [8b5d905]
|
|
21
|
+
- Updated dependencies [776a4e2]
|
|
22
|
+
- Updated dependencies [2ed681b]
|
|
23
|
+
- Updated dependencies [8665004]
|
|
24
|
+
- Updated dependencies [4f12fe4]
|
|
25
|
+
- Updated dependencies [702c386]
|
|
26
|
+
- Updated dependencies [901970f]
|
|
27
|
+
- Updated dependencies [5ab0663]
|
|
28
|
+
- Updated dependencies [f1f39b0]
|
|
29
|
+
- Updated dependencies [917214a]
|
|
30
|
+
- Updated dependencies [f1f39b0]
|
|
31
|
+
- Updated dependencies [776a4e2]
|
|
32
|
+
- @scalar/oas-utils@0.2.100
|
|
33
|
+
- @scalar/components@0.13.17
|
|
34
|
+
- @scalar/themes@0.9.62
|
|
35
|
+
- @scalar/types@0.0.28
|
|
36
|
+
- @scalar/import@0.2.20
|
|
37
|
+
- @scalar/postman-to-openapi@0.1.23
|
|
38
|
+
- @scalar/use-codemirror@0.11.62
|
|
39
|
+
- @scalar/use-hooks@0.1.16
|
|
40
|
+
- @scalar/openapi-parser@0.10.4
|
|
41
|
+
|
|
3
42
|
## 2.2.37
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";;;;;AA0vBA,wBAMG"}
|
|
@@ -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 a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-893bff81"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,151 +1,142 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useActiveEntities as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
const le = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "scalar-address-bar order-last lg:order-none lg:w-auto w-full"
|
|
14
|
-
}, te = { class: "m-auto flex flex-row items-center" }, ae = { class: "pointer-events-none absolute left-0 top-0 block h-full w-full overflow-hidden" }, re = { class: "flex gap-1" }, oe = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, se = {
|
|
1
|
+
import { defineComponent as M, useId as H, ref as n, watch as N, unref as l, openBlock as q, createElementBlock as T, createElementVNode as r, normalizeClass as $, normalizeStyle as O, createVNode as u, createBlock as P, createCommentVNode as y, withCtx as D } from "vue";
|
|
2
|
+
import K from "../CodeInput/CodeInput.vue.js";
|
|
3
|
+
import { useActiveEntities as Q } from "../../store/active-entities.js";
|
|
4
|
+
import { ScalarButton as W, ScalarIcon as j } from "@scalar/components";
|
|
5
|
+
import { REQUEST_METHODS as F } from "@scalar/oas-utils/helpers";
|
|
6
|
+
import G from "../HttpMethod/HttpMethod.vue.js";
|
|
7
|
+
import J from "./AddressBarHistory.vue.js";
|
|
8
|
+
import X from "./AddressBarServer.vue.js";
|
|
9
|
+
import { useWorkspace as Y } from "../../store/store.js";
|
|
10
|
+
import { useLayout as Z } from "../../hooks/useLayout.js";
|
|
11
|
+
const ee = ["id"], te = { class: "m-auto flex flex-row items-center" }, le = { class: "addressbar-bg-states group text-xxs relative flex w-full xl:min-w-[720px] xl:max-w-[720px] lg:min-w-[580px] lg:max-w-[580px] order-last lg:order-none flex-1 flex-row items-stretch rounded-lg p-0.75 max-w-[calc(100dvw-24px)]" }, ae = { class: "border rounded-lg pointer-events-none absolute left-0 top-0 block h-full w-full overflow-hidden" }, re = { class: "flex gap-1 z-context-plus" }, oe = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full" }, se = {
|
|
15
12
|
"aria-hidden": "true",
|
|
16
13
|
class: "inline-flex gap-1 items-center"
|
|
17
|
-
},
|
|
14
|
+
}, ge = /* @__PURE__ */ M({
|
|
18
15
|
__name: "AddressBar",
|
|
19
16
|
emits: ["importCurl"],
|
|
20
17
|
setup(ie) {
|
|
21
|
-
const { activeRequest:
|
|
22
|
-
!
|
|
18
|
+
const d = H(), { activeRequest: t, activeExample: B, activeServer: v, activeCollection: p } = Q(), { requestMutators: c, events: f } = Y(), { layout: x } = Z(), h = n(null), E = (e) => {
|
|
19
|
+
!t.value || t.value.path === e || c.edit(t.value.uid, "path", e);
|
|
23
20
|
};
|
|
24
|
-
|
|
21
|
+
N(
|
|
25
22
|
() => {
|
|
26
23
|
var e;
|
|
27
|
-
return (e =
|
|
24
|
+
return (e = t.value) == null ? void 0 : e.path;
|
|
28
25
|
},
|
|
29
26
|
(e) => {
|
|
30
|
-
!
|
|
27
|
+
!t.value || !e || E(e);
|
|
31
28
|
}
|
|
32
29
|
);
|
|
33
30
|
const o = n(100), g = n(0), s = n(!1), i = n();
|
|
34
|
-
function
|
|
31
|
+
function R() {
|
|
35
32
|
s.value ? o.value -= (o.value - 15) / 60 : o.value -= g.value / 20, o.value <= 0 && (clearInterval(i.value), i.value = void 0, o.value = 100, s.value = !1);
|
|
36
33
|
}
|
|
37
|
-
function
|
|
38
|
-
i.value || (s.value = !0, i.value = setInterval(
|
|
34
|
+
function S() {
|
|
35
|
+
i.value || (s.value = !0, i.value = setInterval(R, 20));
|
|
39
36
|
}
|
|
40
37
|
function z() {
|
|
41
38
|
g.value = o.value, s.value = !1;
|
|
42
39
|
}
|
|
43
|
-
function
|
|
40
|
+
function I() {
|
|
44
41
|
clearInterval(i.value), i.value = void 0, o.value = 100, s.value = !1;
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
e === "start" &&
|
|
43
|
+
f.requestStatus.on((e) => {
|
|
44
|
+
e === "start" && S(), e === "stop" && z(), e === "abort" && I();
|
|
48
45
|
});
|
|
49
|
-
function
|
|
50
|
-
|
|
46
|
+
function V(e) {
|
|
47
|
+
t.value && c.edit(t.value.uid, "method", e);
|
|
51
48
|
}
|
|
52
|
-
function
|
|
53
|
-
if (!
|
|
54
|
-
const { method: e } =
|
|
55
|
-
return
|
|
49
|
+
function L() {
|
|
50
|
+
if (!t.value) return;
|
|
51
|
+
const { method: e } = t.value;
|
|
52
|
+
return F[e].backgroundColor;
|
|
56
53
|
}
|
|
57
54
|
function m() {
|
|
58
55
|
var e;
|
|
59
|
-
s.value || (s.value = !0,
|
|
56
|
+
s.value || (s.value = !0, f.executeRequest.emit({ requestUid: (e = t.value) == null ? void 0 : e.uid }));
|
|
60
57
|
}
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
e != null && e.focusAddressBar && ((
|
|
58
|
+
f.hotKeys.on((e) => {
|
|
59
|
+
var a;
|
|
60
|
+
e != null && e.focusAddressBar && ((a = h.value) == null || a.focus()), e != null && e.executeRequest && m();
|
|
64
61
|
});
|
|
65
|
-
function
|
|
66
|
-
|
|
62
|
+
function U(e) {
|
|
63
|
+
t.value && c.edit(t.value.uid, "path", e);
|
|
67
64
|
}
|
|
68
|
-
return (e,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
return (e, a) => {
|
|
66
|
+
var b, w, C, _, k;
|
|
67
|
+
return l(t) && l(B) ? (q(), T("div", {
|
|
68
|
+
key: 0,
|
|
69
|
+
id: l(d),
|
|
70
|
+
class: "scalar-address-bar order-last lg:order-none lg:w-auto w-full [--scalar-address-bar-height:32px] h-[--scalar-address-bar-height]"
|
|
71
|
+
}, [
|
|
72
|
+
r("div", te, [
|
|
73
|
+
r("div", le, [
|
|
74
|
+
r("div", ae, [
|
|
77
75
|
r("div", {
|
|
78
|
-
class:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
class: $(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full z-context", L()]),
|
|
77
|
+
style: O({ transform: `translate3d(-${o.value}%,0,0)` })
|
|
78
|
+
}, null, 6)
|
|
79
|
+
]),
|
|
80
|
+
r("div", re, [
|
|
81
|
+
u(G, {
|
|
82
|
+
isEditable: l(x) !== "modal",
|
|
83
|
+
isSquare: "",
|
|
84
|
+
method: l(t).method,
|
|
85
|
+
teleport: "",
|
|
86
|
+
onChange: V
|
|
87
|
+
}, null, 8, ["isEditable", "method"])
|
|
88
|
+
]),
|
|
89
|
+
r("div", oe, [
|
|
90
|
+
(w = (b = l(p)) == null ? void 0 : b.servers) != null && w.length ? (q(), P(X, {
|
|
91
|
+
key: 0,
|
|
92
|
+
target: l(d)
|
|
93
|
+
}, null, 8, ["target"])) : y("", !0),
|
|
94
|
+
a[1] || (a[1] = r("div", { class: "fade-left" }, null, -1)),
|
|
95
|
+
u(K, {
|
|
96
|
+
ref_key: "addressBarRef",
|
|
97
|
+
ref: h,
|
|
98
|
+
"aria-label": "Path",
|
|
99
|
+
class: "outline-none min-w-fit",
|
|
100
|
+
disableCloseBrackets: "",
|
|
101
|
+
disabled: l(x) === "modal",
|
|
102
|
+
disableEnter: "",
|
|
103
|
+
disableTabIndent: "",
|
|
104
|
+
emitOnBlur: !1,
|
|
105
|
+
importCurl: "",
|
|
106
|
+
modelValue: l(t).path,
|
|
107
|
+
placeholder: (C = l(v)) != null && C.uid && ((k = (_ = l(p)) == null ? void 0 : _.servers) != null && k.includes(l(v).uid)) ? "" : "Enter a URL or cURL command",
|
|
108
|
+
server: "",
|
|
109
|
+
onCurl: a[0] || (a[0] = (A) => e.$emit("importCurl", A)),
|
|
110
|
+
onSubmit: m,
|
|
111
|
+
"onUpdate:modelValue": U
|
|
112
|
+
}, null, 8, ["disabled", "modelValue", "placeholder"]),
|
|
113
|
+
a[2] || (a[2] = r("div", { class: "fade-right" }, null, -1))
|
|
114
|
+
]),
|
|
115
|
+
u(J, { target: l(d) }, null, 8, ["target"]),
|
|
116
|
+
u(l(W), {
|
|
117
|
+
class: "relative h-auto shrink-0 z-context-plus overflow-hidden pl-2 pr-2.5 py-1 font-bold",
|
|
118
|
+
disabled: s.value,
|
|
119
|
+
onClick: m
|
|
120
|
+
}, {
|
|
121
|
+
default: D(() => [
|
|
122
|
+
r("span", se, [
|
|
123
|
+
u(l(j), {
|
|
124
|
+
class: "relative shrink-0 fill-current",
|
|
125
|
+
icon: "Play",
|
|
126
|
+
size: "xs"
|
|
127
|
+
}),
|
|
128
|
+
a[3] || (a[3] = r("span", { class: "text-xxs lg:flex hidden" }, "Send", -1))
|
|
97
129
|
]),
|
|
98
|
-
r("
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
disableCloseBrackets: "",
|
|
107
|
-
disabled: a(x),
|
|
108
|
-
disableEnter: "",
|
|
109
|
-
disableTabIndent: "",
|
|
110
|
-
emitOnBlur: !1,
|
|
111
|
-
importCurl: "",
|
|
112
|
-
modelValue: a(l).path,
|
|
113
|
-
placeholder: (k = a(v)) != null && k.uid && ((R = (q = a(p)) == null ? void 0 : q.servers) != null && R.includes(a(v).uid)) ? "" : "Enter a URL or cURL command",
|
|
114
|
-
server: "",
|
|
115
|
-
onCurl: t[0] || (t[0] = (O) => e.$emit("importCurl", O)),
|
|
116
|
-
onSubmit: m,
|
|
117
|
-
"onUpdate:modelValue": N
|
|
118
|
-
}, null, 8, ["disabled", "modelValue", "placeholder"]),
|
|
119
|
-
t[3] || (t[3] = r("div", { class: "fade-right" }, null, -1))
|
|
120
|
-
]),
|
|
121
|
-
u(Y, { open: d }, null, 8, ["open"]),
|
|
122
|
-
u(a(F), {
|
|
123
|
-
class: "relative h-auto shrink-0 overflow-hidden !pl-2 !pr-2.5 !py-1 font-bold",
|
|
124
|
-
disabled: s.value,
|
|
125
|
-
onClick: m
|
|
126
|
-
}, {
|
|
127
|
-
default: y(() => [
|
|
128
|
-
r("span", se, [
|
|
129
|
-
u(a(G), {
|
|
130
|
-
class: "relative shrink-0 fill-current",
|
|
131
|
-
icon: "Play",
|
|
132
|
-
size: "xs"
|
|
133
|
-
}),
|
|
134
|
-
t[4] || (t[4] = r("span", { class: "text-xxs lg:flex hidden" }, "Send", -1))
|
|
135
|
-
]),
|
|
136
|
-
t[5] || (t[5] = r("span", { class: "sr-only" }, " Send Request ", -1))
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["disabled"])
|
|
140
|
-
], 2)
|
|
141
|
-
];
|
|
142
|
-
}),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 8, ["modelValue"])
|
|
145
|
-
])
|
|
146
|
-
])) : E("", !0);
|
|
130
|
+
a[4] || (a[4] = r("span", { class: "sr-only" }, " Send Request ", -1))
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 8, ["disabled"])
|
|
134
|
+
])
|
|
135
|
+
])
|
|
136
|
+
], 8, ee)) : y("", !0);
|
|
137
|
+
};
|
|
147
138
|
}
|
|
148
139
|
});
|
|
149
140
|
export {
|
|
150
|
-
|
|
141
|
+
ge as default
|
|
151
142
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
2
|
+
/** The id of the target to use for the popover (e.g. address bar) */
|
|
3
|
+
target: string;
|
|
3
4
|
};
|
|
4
5
|
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>;
|
|
5
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"AAiLA,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAmQF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBarHistory.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-f70f1917"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,90 +1,110 @@
|
|
|
1
|
-
import { defineComponent as C, computed as
|
|
2
|
-
import { formatMs as
|
|
1
|
+
import { defineComponent as q, ref as C, computed as y, openBlock as n, createBlock as i, unref as e, withCtx as a, createVNode as d, createSlots as S, createElementVNode as l, createCommentVNode as h, normalizeStyle as w, createElementBlock as B, Fragment as H, renderList as V, toDisplayString as c, normalizeClass as z } from "vue";
|
|
2
|
+
import { formatMs as L } from "../../libs/formatters.js";
|
|
3
3
|
import { useActiveEntities as E } from "../../store/active-entities.js";
|
|
4
|
-
import { ListboxButton as
|
|
5
|
-
import { ScalarIcon as
|
|
6
|
-
import { httpStatusCodes as
|
|
7
|
-
import { useRouter as
|
|
8
|
-
import
|
|
9
|
-
import { getStatusCodeColor as
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const
|
|
4
|
+
import { Listbox as U, ListboxButton as F, ListboxOptions as M, ListboxOption as N } from "@headlessui/vue";
|
|
5
|
+
import { ScalarFloating as R, ScalarIcon as $, ScalarFloatingBackdrop as A } from "@scalar/components";
|
|
6
|
+
import { httpStatusCodes as I } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { useRouter as O } from "vue-router";
|
|
8
|
+
import D from "../HttpMethod/HttpMethod.vue.js";
|
|
9
|
+
import { getStatusCodeColor as W } from "./httpStatusCodeColors.js";
|
|
10
|
+
import { useWorkspace as j } from "../../store/store.js";
|
|
11
|
+
const G = { class: "min-w-0" }, J = { class: "min-w-0 truncate text-c-1" }, re = /* @__PURE__ */ q({
|
|
12
12
|
__name: "AddressBarHistory",
|
|
13
13
|
props: {
|
|
14
|
-
|
|
14
|
+
target: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const { activeRequest:
|
|
18
|
-
() =>
|
|
19
|
-
var
|
|
20
|
-
return
|
|
16
|
+
setup(K) {
|
|
17
|
+
const { activeRequest: p } = E(), { requestHistory: f, requestExampleMutators: k } = j(), v = O(), x = C(f[0]), g = y(
|
|
18
|
+
() => f.filter((o) => {
|
|
19
|
+
var t;
|
|
20
|
+
return o.request.requestUid === ((t = p.value) == null ? void 0 : t.uid);
|
|
21
21
|
}).slice().reverse()
|
|
22
22
|
);
|
|
23
|
-
function _(
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
((
|
|
27
|
-
`/workspace/${
|
|
28
|
-
), k.set({ ...
|
|
23
|
+
function _(o) {
|
|
24
|
+
var r;
|
|
25
|
+
const t = v.currentRoute.value.params.workspace;
|
|
26
|
+
((r = p.value) == null ? void 0 : r.uid) !== o.request.requestUid && v.push(
|
|
27
|
+
`/workspace/${t}/request/${o.request.requestUid}`
|
|
28
|
+
), k.set({ ...o.request });
|
|
29
29
|
}
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
return (o, t) => (n(), i(e(U), {
|
|
31
|
+
modelValue: x.value,
|
|
32
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => x.value = r)
|
|
33
|
+
}, {
|
|
34
|
+
default: a(({ open: r }) => [
|
|
35
|
+
d(e(R), {
|
|
36
|
+
offset: 0,
|
|
37
|
+
resize: "",
|
|
38
|
+
target: o.target
|
|
39
|
+
}, S({
|
|
40
|
+
default: a(() => {
|
|
41
|
+
var u;
|
|
42
|
+
return [
|
|
43
|
+
(u = g.value) != null && u.length ? (n(), i(e(F), {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "addressbar-history-button z-context-plus mr-1 rounded-lg p-1.5 text-c-3 focus:text-c-1"
|
|
46
|
+
}, {
|
|
47
|
+
default: a(() => [
|
|
48
|
+
d(e($), {
|
|
49
|
+
icon: "History",
|
|
50
|
+
size: "sm",
|
|
51
|
+
thickness: "2.25"
|
|
52
|
+
}),
|
|
53
|
+
t[1] || (t[1] = l("span", { class: "sr-only" }, "Request History", -1))
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
})) : h("", !0)
|
|
57
|
+
];
|
|
58
|
+
}),
|
|
59
|
+
_: 2
|
|
51
60
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
class: "
|
|
57
|
-
|
|
58
|
-
onClick: (a) => _(e)
|
|
61
|
+
r ? {
|
|
62
|
+
name: "floating",
|
|
63
|
+
fn: a(({ width: u }) => [
|
|
64
|
+
d(e(M), {
|
|
65
|
+
class: "address-bg-states border-t custom-scroll max-h-[inherit] p-0.75 grid grid-cols-[44px,1fr,repeat(3,auto)] items-center",
|
|
66
|
+
style: w({ width: u })
|
|
59
67
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
default: a(() => [
|
|
69
|
+
(n(!0), B(H, null, V(g.value, (s, b) => (n(), i(e(N), {
|
|
70
|
+
key: s.timestamp,
|
|
71
|
+
class: "contents font-code text-sm *:rounded-none first:*:rounded-l last:*:rounded-r *:h-8 *:ui-active:bg-b-2 *:flex *:items-center *:cursor-pointer *:px-1.5 text-c-2 font-medium",
|
|
72
|
+
value: b,
|
|
73
|
+
onClick: (m) => _(s)
|
|
74
|
+
}, {
|
|
75
|
+
default: a(() => {
|
|
76
|
+
var m;
|
|
77
|
+
return [
|
|
78
|
+
s.response.method ? (n(), i(D, {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: "text-[11px]",
|
|
81
|
+
method: s.response.method
|
|
82
|
+
}, null, 8, ["method"])) : h("", !0),
|
|
83
|
+
l("div", G, [
|
|
84
|
+
l("div", J, c(s.response.path), 1)
|
|
85
|
+
]),
|
|
86
|
+
l("div", null, c(e(L)(s.response.duration)), 1),
|
|
87
|
+
l("div", {
|
|
88
|
+
class: z([e(W)(s.response.status).color])
|
|
89
|
+
}, c(s.response.status), 3),
|
|
90
|
+
l("div", null, c((m = e(I)[s.response.status]) == null ? void 0 : m.name), 1)
|
|
91
|
+
];
|
|
92
|
+
}),
|
|
93
|
+
_: 2
|
|
94
|
+
}, 1032, ["value", "onClick"]))), 128))
|
|
95
|
+
]),
|
|
78
96
|
_: 2
|
|
79
|
-
}, 1032, ["
|
|
97
|
+
}, 1032, ["style"]),
|
|
98
|
+
d(e(A), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
|
|
80
99
|
]),
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
],
|
|
85
|
-
|
|
100
|
+
key: "0"
|
|
101
|
+
} : void 0
|
|
102
|
+
]), 1032, ["target"])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["modelValue"]));
|
|
86
106
|
}
|
|
87
107
|
});
|
|
88
108
|
export {
|
|
89
|
-
|
|
109
|
+
re as default
|
|
90
110
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The id of the target to use for the popover (e.g. address bar) */
|
|
3
|
+
target: string;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
2
6
|
export default _default;
|
|
3
7
|
//# sourceMappingURL=AddressBarServer.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":"AAmJA,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAoOF,wBAOG"}
|