@scalar/api-client 2.22.2 → 2.22.3
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 +21 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +9 -9
- 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 +100 -91
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +2 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +43 -37
- package/dist/v2/components/layout/ValueEmitter.vue.d.ts +6 -2
- package/dist/v2/components/layout/ValueEmitter.vue.d.ts.map +1 -1
- package/dist/v2/components/layout/ValueEmitter.vue.js +10 -10
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +2 -0
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js +48 -42
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +48 -46
- package/dist/v2/features/app/app-state.d.ts +23 -12
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +194 -163
- package/dist/v2/features/app/helpers/routes.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +7 -7
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-default-headers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-default-headers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAanG;;;GAGG;AACH,KAAK,aAAa,GAAG;IACnB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAAI,yDAK/B;IACD,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,KAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"get-default-headers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-default-headers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAanG;;;GAGG;AACH,KAAK,aAAa,GAAG;IACnB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAAI,yDAK/B;IACD,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,KAAG,aAAa,EAsChB,CAAA"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { canMethodHaveBody as p } from "@scalar/helpers/http/can-method-have-body";
|
|
2
2
|
import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { isElectron as u } from "../../../../libs/electron.js";
|
|
4
|
-
const i = "2.22.
|
|
4
|
+
const i = "2.22.3", m = "application/json", h = "*/*", c = (r, t, o) => ({
|
|
5
5
|
name: r,
|
|
6
6
|
defaultValue: t,
|
|
7
|
-
isOverridden:
|
|
7
|
+
isOverridden: o.has(r.toLowerCase())
|
|
8
8
|
}), y = ({
|
|
9
9
|
method: r,
|
|
10
10
|
operation: t,
|
|
11
|
-
exampleKey:
|
|
12
|
-
hideDisabledHeaders:
|
|
11
|
+
exampleKey: o,
|
|
12
|
+
hideDisabledHeaders: f = !1
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
14
|
+
const a = new Set(
|
|
15
15
|
t.parameters?.filter((e) => n(e).in === "header").map((e) => n(e).name.toLowerCase()) ?? []
|
|
16
|
-
),
|
|
16
|
+
), l = t["x-scalar-disable-parameters"]?.["default-headers"]?.[o] ?? {}, s = [], d = n(t.requestBody);
|
|
17
17
|
if (p(r)) {
|
|
18
|
-
const e = d?.["x-scalar-selected-content-type"]?.[
|
|
19
|
-
s.push(c("Content-Type", e,
|
|
18
|
+
const e = d?.["x-scalar-selected-content-type"]?.[o] ?? Object.keys(d?.content ?? {})[0] ?? m;
|
|
19
|
+
e !== "none" && s.push(c("Content-Type", e, a));
|
|
20
20
|
}
|
|
21
|
-
return s.push(c("Accept", h,
|
|
21
|
+
return s.push(c("Accept", h, a)), u() && i && s.push(c("User-Agent", `Scalar/${i}`, a)), f ? s.filter((e) => l[e.name.toLowerCase()] !== !0) : s;
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
24
|
y as getDefaultHeaders
|
|
@@ -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":"AA4bA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,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;AAWhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAM3C,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,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;;;;;eAkB6C,MAAM;;;;;;eAAN,MAAM;;;AAqlBrD,wBAQG"}
|
|
@@ -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 e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-791e0491"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { REQUEST_METHODS as
|
|
4
|
-
import { ScalarIconCopy as
|
|
5
|
-
import { useClipboard as
|
|
6
|
-
import { getResolvedUrl as
|
|
7
|
-
import { useLoadingAnimation as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as P, useId as K, computed as x, ref as v, useTemplateRef as E, onMounted as Q, onBeforeUnmount as j, createElementBlock as $, openBlock as b, unref as s, createElementVNode as l, normalizeClass as V, createVNode as a, createCommentVNode as q, normalizeStyle as G, createBlock as J, withCtx as T, createTextVNode as g, toDisplayString as f } from "vue";
|
|
2
|
+
import { ScalarButton as z, ScalarWrappingText as X, ScalarIcon as Y } from "@scalar/components";
|
|
3
|
+
import { REQUEST_METHODS as Z } from "@scalar/helpers/http/http-info";
|
|
4
|
+
import { ScalarIconCopy as _, ScalarIconWarningCircle as ee } from "@scalar/icons";
|
|
5
|
+
import { useClipboard as te } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import { getResolvedUrl as ne } from "../../operation-block/helpers/get-resolved-url.js";
|
|
7
|
+
import { useLoadingAnimation as oe } from "../hooks/use-loading-animation.js";
|
|
8
|
+
import le from "./AddressBarHistory.vue.js";
|
|
9
|
+
import se from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
10
|
+
import ae from "../../../components/server/ServerDropdown.vue.js";
|
|
11
|
+
import re from "../../../components/code-input/CodeInput.vue.js";
|
|
12
|
+
const ie = ["id"], de = { class: "flex gap-1" }, ue = { class: "scroll-timeline-x scroll-timeline-x-hidden relative flex w-full bg-blend-normal" }, me = {
|
|
13
13
|
key: 0,
|
|
14
|
-
class: "
|
|
15
|
-
},
|
|
14
|
+
class: "absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
|
|
15
|
+
}, ve = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" }, fe = { class: "min-w-0 flex-1" }, ce = {
|
|
16
16
|
"aria-hidden": "true",
|
|
17
17
|
class: "inline-flex items-center gap-1"
|
|
18
|
-
},
|
|
18
|
+
}, he = { class: "sr-only" }, Re = /* @__PURE__ */ P({
|
|
19
19
|
__name: "AddressBar",
|
|
20
20
|
props: {
|
|
21
21
|
path: {},
|
|
@@ -28,84 +28,92 @@ const se = ["id"], ae = { class: "pointer-events-none absolute top-0 left-0 bloc
|
|
|
28
28
|
environment: {}
|
|
29
29
|
},
|
|
30
30
|
emits: ["execute", "update:servers", "select:history:item"],
|
|
31
|
-
setup(e, { expose:
|
|
32
|
-
const d =
|
|
33
|
-
backgroundColor: `color-mix(in srgb, transparent 90%, ${
|
|
34
|
-
transform: `translate3d(-${
|
|
35
|
-
})), i =
|
|
36
|
-
const
|
|
31
|
+
setup(e, { expose: D, emit: I }) {
|
|
32
|
+
const d = I, c = K(), { percentage: L, startLoading: y, stopLoading: h, isLoading: A } = oe(), M = x(() => ({
|
|
33
|
+
backgroundColor: `color-mix(in srgb, transparent 90%, ${Z[e.method].colorVar})`,
|
|
34
|
+
transform: `translate3d(-${L.value}%,0,0)`
|
|
35
|
+
})), i = v(null), r = v(null), B = x(() => r.value || i.value), p = (n, t, o) => {
|
|
36
|
+
const W = u.value?.cursorPosition();
|
|
37
37
|
e.eventBus.emit(
|
|
38
38
|
"operation:update:pathMethod",
|
|
39
39
|
{
|
|
40
40
|
meta: { method: e.method, path: e.path },
|
|
41
41
|
payload: { method: n, path: t },
|
|
42
42
|
callback: (m) => {
|
|
43
|
-
(m === "success" || m === "no-change") && (r.value = null, i.value = null), m === "success" ? e.eventBus.emit("ui:focus:address-bar", { position:
|
|
43
|
+
(m === "success" || m === "no-change") && (r.value = null, i.value = null), m === "success" ? e.eventBus.emit("ui:focus:address-bar", { position: W }) : m === "conflict" && (n !== e.method && (r.value = n), t !== e.path && (i.value = t));
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
o
|
|
47
47
|
);
|
|
48
|
-
},
|
|
48
|
+
}, O = (n) => p(n, i.value ?? e.path), H = (n) => {
|
|
49
49
|
const t = n.startsWith("/") ? n : `/${n}`;
|
|
50
|
-
|
|
50
|
+
p(r.value ?? e.method, t, {
|
|
51
51
|
debounceKey: `operation:update:pathMethod-${e.path}-${e.method}`
|
|
52
52
|
});
|
|
53
|
-
},
|
|
53
|
+
}, C = E("sendButtonRef"), u = E("addressBarRef"), w = () => C.value?.$el?.focus(), k = (n) => {
|
|
54
54
|
if (u.value?.isFocused && e.layout !== "desktop")
|
|
55
55
|
return;
|
|
56
56
|
const t = n && "position" in n ? n.position : "end";
|
|
57
57
|
u.value?.focus(t), n && "event" in n && n.event.preventDefault();
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
e.eventBus.on("ui:focus:address-bar",
|
|
61
|
-
}),
|
|
62
|
-
e.eventBus.off("ui:focus:address-bar",
|
|
59
|
+
Q(() => {
|
|
60
|
+
e.eventBus.on("ui:focus:address-bar", k), e.eventBus.on("ui:focus:send-button", w), e.eventBus.on("hooks:on:request:sent", y), e.eventBus.on("hooks:on:request:complete", h);
|
|
61
|
+
}), j(() => {
|
|
62
|
+
e.eventBus.off("ui:focus:address-bar", k), e.eventBus.off("ui:focus:send-button", w), e.eventBus.off("hooks:on:request:sent", y), e.eventBus.off("hooks:on:request:complete", h), h();
|
|
63
63
|
});
|
|
64
|
-
const { copyToClipboard:
|
|
65
|
-
await
|
|
66
|
-
|
|
64
|
+
const { copyToClipboard: N } = te(), F = async () => {
|
|
65
|
+
await N(
|
|
66
|
+
ne({ environment: e.environment, server: e.server, path: e.path, pathVariables: {} })
|
|
67
67
|
);
|
|
68
|
-
}
|
|
69
|
-
|
|
68
|
+
}, S = v(!1), U = v(!1), R = x(
|
|
69
|
+
() => S.value || U.value
|
|
70
|
+
);
|
|
71
|
+
return D({
|
|
70
72
|
methodConflict: r,
|
|
71
73
|
pathConflict: i
|
|
72
|
-
}), (n, t) => (
|
|
73
|
-
id:
|
|
74
|
-
class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-
|
|
74
|
+
}), (n, t) => (b(), $("div", {
|
|
75
|
+
id: s(c),
|
|
76
|
+
class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-0 lg:w-auto"
|
|
75
77
|
}, [
|
|
76
|
-
|
|
77
|
-
class:
|
|
78
|
-
"outline-c-danger outline":
|
|
78
|
+
l("div", {
|
|
79
|
+
class: V(["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]", {
|
|
80
|
+
"outline-c-danger outline": B.value,
|
|
81
|
+
"rounded-b-none": R.value
|
|
79
82
|
}])
|
|
80
83
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
l("div", {
|
|
85
|
+
class: V(["pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border", {
|
|
86
|
+
"rounded-b-none": R.value
|
|
87
|
+
}])
|
|
88
|
+
}, [
|
|
89
|
+
l("div", {
|
|
90
|
+
class: "absolute top-0 left-0 h-full w-full",
|
|
91
|
+
style: G(M.value)
|
|
85
92
|
}, null, 4)
|
|
86
|
-
]),
|
|
87
|
-
|
|
88
|
-
a(
|
|
93
|
+
], 2),
|
|
94
|
+
l("div", de, [
|
|
95
|
+
a(s(se), {
|
|
89
96
|
isEditable: e.layout !== "modal",
|
|
90
97
|
isSquare: "",
|
|
91
98
|
method: r.value ?? e.method,
|
|
92
99
|
teleport: "",
|
|
93
|
-
onChange:
|
|
100
|
+
onChange: O
|
|
94
101
|
}, null, 8, ["isEditable", "method"])
|
|
95
102
|
]),
|
|
96
|
-
|
|
97
|
-
e.servers.length ? (
|
|
103
|
+
l("div", ue, [
|
|
104
|
+
e.servers.length ? (b(), J(s(ae), {
|
|
98
105
|
key: 0,
|
|
99
106
|
layout: e.layout,
|
|
100
107
|
server: e.server,
|
|
101
108
|
servers: e.servers,
|
|
102
|
-
target:
|
|
103
|
-
"onUpdate:
|
|
104
|
-
"onUpdate:
|
|
105
|
-
"onUpdate:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
target: s(c),
|
|
110
|
+
"onUpdate:open": t[0] || (t[0] = (o) => S.value = o),
|
|
111
|
+
"onUpdate:selectedServer": t[1] || (t[1] = (o) => e.eventBus.emit("server:update:selected", o)),
|
|
112
|
+
"onUpdate:servers": t[2] || (t[2] = (o) => d("update:servers")),
|
|
113
|
+
"onUpdate:variable": t[3] || (t[3] = (o) => e.eventBus.emit("server:update:variables", o))
|
|
114
|
+
}, null, 8, ["layout", "server", "servers", "target"])) : q("", !0),
|
|
115
|
+
t[8] || (t[8] = l("div", { class: "fade-left" }, null, -1)),
|
|
116
|
+
a(s(re), {
|
|
109
117
|
ref_key: "addressBarRef",
|
|
110
118
|
ref: u,
|
|
111
119
|
alwaysEmitChange: "",
|
|
@@ -122,66 +130,67 @@ const se = ["id"], ae = { class: "pointer-events-none absolute top-0 left-0 bloc
|
|
|
122
130
|
modelValue: e.path,
|
|
123
131
|
placeholder: e.server ? "" : "Enter a URL",
|
|
124
132
|
server: "",
|
|
125
|
-
onSubmit: t[
|
|
126
|
-
"onUpdate:modelValue":
|
|
133
|
+
onSubmit: t[4] || (t[4] = (o) => d("execute")),
|
|
134
|
+
"onUpdate:modelValue": H
|
|
127
135
|
}, null, 8, ["disabled", "environment", "layout", "modelValue", "placeholder"]),
|
|
128
|
-
t[
|
|
136
|
+
t[9] || (t[9] = l("div", { class: "fade-right" }, null, -1))
|
|
129
137
|
]),
|
|
130
|
-
a(
|
|
138
|
+
a(s(z), {
|
|
131
139
|
class: "hover:bg-b-3 mx-1",
|
|
132
140
|
size: "xs",
|
|
133
141
|
variant: "ghost",
|
|
134
|
-
onClick:
|
|
142
|
+
onClick: F
|
|
135
143
|
}, {
|
|
136
|
-
default:
|
|
137
|
-
a(
|
|
138
|
-
t[
|
|
144
|
+
default: T(() => [
|
|
145
|
+
a(s(_)),
|
|
146
|
+
t[10] || (t[10] = l("span", { class: "sr-only" }, "Copy URL", -1))
|
|
139
147
|
]),
|
|
140
148
|
_: 1
|
|
141
149
|
}),
|
|
142
|
-
a(
|
|
150
|
+
a(le, {
|
|
143
151
|
history: e.history,
|
|
144
|
-
target:
|
|
145
|
-
"onSelect:history:item": t[
|
|
152
|
+
target: s(c),
|
|
153
|
+
"onSelect:history:item": t[5] || (t[5] = (o) => d("select:history:item", o)),
|
|
154
|
+
"onUpdate:open": t[6] || (t[6] = (o) => U.value = o)
|
|
146
155
|
}, null, 8, ["history", "target"]),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
a(
|
|
150
|
-
|
|
151
|
-
t[
|
|
152
|
-
|
|
153
|
-
t[
|
|
154
|
-
a(
|
|
156
|
+
B.value ? (b(), $("div", me, [
|
|
157
|
+
l("div", ve, [
|
|
158
|
+
a(s(ee), { size: "sm" }),
|
|
159
|
+
l("div", fe, [
|
|
160
|
+
t[11] || (t[11] = g(" A ", -1)),
|
|
161
|
+
l("em", null, f(r.value?.toUpperCase() ?? e.method.toUpperCase()), 1),
|
|
162
|
+
t[12] || (t[12] = g(" request to ", -1)),
|
|
163
|
+
a(s(X), {
|
|
155
164
|
text: i.value ?? e.path
|
|
156
165
|
}, null, 8, ["text"]),
|
|
157
|
-
t[
|
|
166
|
+
t[13] || (t[13] = g(" already exists in this document ", -1))
|
|
158
167
|
])
|
|
159
168
|
])
|
|
160
|
-
])) :
|
|
161
|
-
a(
|
|
169
|
+
])) : q("", !0),
|
|
170
|
+
a(s(z), {
|
|
162
171
|
ref_key: "sendButtonRef",
|
|
163
|
-
ref:
|
|
164
|
-
class: "
|
|
165
|
-
disabled:
|
|
166
|
-
onClick: t[
|
|
172
|
+
ref: C,
|
|
173
|
+
class: "relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
|
|
174
|
+
disabled: s(A),
|
|
175
|
+
onClick: t[7] || (t[7] = (o) => d("execute"))
|
|
167
176
|
}, {
|
|
168
|
-
default:
|
|
169
|
-
|
|
170
|
-
a(
|
|
177
|
+
default: T(() => [
|
|
178
|
+
l("span", ce, [
|
|
179
|
+
a(s(Y), {
|
|
171
180
|
class: "relative shrink-0 fill-current",
|
|
172
181
|
icon: "Play",
|
|
173
182
|
size: "xs"
|
|
174
183
|
}),
|
|
175
|
-
t[
|
|
184
|
+
t[14] || (t[14] = l("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
|
|
176
185
|
]),
|
|
177
|
-
|
|
186
|
+
l("span", he, " Send " + f(e.method) + " request to " + f(e.server?.url ?? "") + f(e.path), 1)
|
|
178
187
|
]),
|
|
179
188
|
_: 1
|
|
180
189
|
}, 8, ["disabled"])
|
|
181
190
|
], 2)
|
|
182
|
-
], 8,
|
|
191
|
+
], 8, ie));
|
|
183
192
|
}
|
|
184
193
|
});
|
|
185
194
|
export {
|
|
186
|
-
|
|
195
|
+
Re as default
|
|
187
196
|
};
|
|
@@ -12,10 +12,12 @@ type __VLS_Props = {
|
|
|
12
12
|
history: History[];
|
|
13
13
|
};
|
|
14
14
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
|
+
"update:open": (value: boolean) => any;
|
|
15
16
|
"select:history:item": (payload: {
|
|
16
17
|
index: number;
|
|
17
18
|
}) => any;
|
|
18
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
19
21
|
"onSelect:history:item"?: ((payload: {
|
|
20
22
|
index: number;
|
|
21
23
|
}) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AASrF,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,OAAO,EAAE,OAAO,EAAE,CAAA;CACnB,CAAC;;;;eAK6C,MAAM;;;;;eAAN,MAAM;;;AAiQrD,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 c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c15c6573"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,80 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, createBlock as c, openBlock as l, unref as t, withCtx as s, createVNode as r, createSlots as h, createCommentVNode as v, createElementVNode as n, normalizeStyle as x, createElementBlock as y, Fragment as k, renderList as C, toDisplayString as i, normalizeClass as _ } from "vue";
|
|
2
2
|
import { Menu as S, MenuButton as b, MenuItems as B, MenuItem as M } from "@headlessui/vue";
|
|
3
3
|
import { ScalarFloating as z, ScalarIcon as H, ScalarFloatingBackdrop as w } from "@scalar/components";
|
|
4
4
|
import { httpStatusCodes as F } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import { formatMs as I } from "../../../../libs/formatters.js";
|
|
6
|
-
import
|
|
7
|
-
import V from "
|
|
8
|
-
|
|
6
|
+
import N from "../../../components/layout/ValueEmitter.vue.js";
|
|
7
|
+
import { getStatusCodeColor as V } from "./httpStatusCodeColors.js";
|
|
8
|
+
import $ from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
9
|
+
const E = { class: "min-w-0" }, q = { class: "text-c-1 min-w-0 truncate" }, P = /* @__PURE__ */ g({
|
|
9
10
|
__name: "AddressBarHistory",
|
|
10
11
|
props: {
|
|
11
12
|
target: {},
|
|
12
13
|
history: {}
|
|
13
14
|
},
|
|
14
|
-
emits: ["select:history:item"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
return (A,
|
|
18
|
-
default:
|
|
15
|
+
emits: ["select:history:item", "update:open"],
|
|
16
|
+
setup(u, { emit: p }) {
|
|
17
|
+
const m = p;
|
|
18
|
+
return (A, e) => (l(), c(t(S), { as: "div" }, {
|
|
19
|
+
default: s(({ open: f }) => [
|
|
20
|
+
r(N, {
|
|
21
|
+
value: f,
|
|
22
|
+
onChange: e[0] || (e[0] = (a) => m("update:open", a)),
|
|
23
|
+
onUnmount: e[1] || (e[1] = (a) => m("update:open", !1))
|
|
24
|
+
}, null, 8, ["value"]),
|
|
19
25
|
r(t(z), {
|
|
20
26
|
offset: 0,
|
|
21
27
|
resize: "",
|
|
22
|
-
target:
|
|
23
|
-
},
|
|
24
|
-
default:
|
|
25
|
-
|
|
28
|
+
target: u.target
|
|
29
|
+
}, h({
|
|
30
|
+
default: s(() => [
|
|
31
|
+
u.history.length ? (l(), c(t(b), {
|
|
26
32
|
key: 0,
|
|
27
|
-
class: "address-bar-history-button
|
|
33
|
+
class: "address-bar-history-button text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5"
|
|
28
34
|
}, {
|
|
29
|
-
default:
|
|
35
|
+
default: s(() => [
|
|
30
36
|
r(t(H), {
|
|
31
37
|
icon: "History",
|
|
32
38
|
size: "sm",
|
|
33
39
|
thickness: "2.25"
|
|
34
40
|
}),
|
|
35
|
-
|
|
41
|
+
e[2] || (e[2] = n("span", { class: "sr-only" }, "Request History", -1))
|
|
36
42
|
]),
|
|
37
43
|
_: 1
|
|
38
|
-
})) :
|
|
44
|
+
})) : v("", !0)
|
|
39
45
|
]),
|
|
40
46
|
_: 2
|
|
41
47
|
}, [
|
|
42
48
|
f ? {
|
|
43
49
|
name: "floating",
|
|
44
|
-
fn:
|
|
50
|
+
fn: s(({ width: a }) => [
|
|
45
51
|
r(t(B), {
|
|
46
|
-
class: "custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center
|
|
52
|
+
class: "custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center p-0.75",
|
|
47
53
|
static: "",
|
|
48
|
-
style:
|
|
54
|
+
style: x({ width: a })
|
|
49
55
|
}, {
|
|
50
|
-
default:
|
|
51
|
-
(
|
|
52
|
-
key:
|
|
56
|
+
default: s(() => [
|
|
57
|
+
(l(!0), y(k, null, C(u.history, (o, d) => (l(), c(t(M), {
|
|
58
|
+
key: d,
|
|
53
59
|
as: "button",
|
|
54
60
|
class: "font-code ui-active:*:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 *:first:rounded-l *:last:rounded-r",
|
|
55
|
-
value:
|
|
56
|
-
onClick: (D) =>
|
|
61
|
+
value: d,
|
|
62
|
+
onClick: (D) => m("select:history:item", { index: d })
|
|
57
63
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
r(t(
|
|
64
|
+
default: s(() => [
|
|
65
|
+
r(t($), {
|
|
60
66
|
class: "text-[11px]",
|
|
61
|
-
method:
|
|
67
|
+
method: o.method
|
|
62
68
|
}, null, 8, ["method"]),
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
n("div", E, [
|
|
70
|
+
n("div", q, i(o.path), 1)
|
|
65
71
|
]),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class:
|
|
69
|
-
},
|
|
70
|
-
|
|
72
|
+
n("div", null, i(t(I)(o.duration)), 1),
|
|
73
|
+
n("div", {
|
|
74
|
+
class: _([t(V)(o.status).color])
|
|
75
|
+
}, i(o.status), 3),
|
|
76
|
+
n("div", null, i(t(F)[o.status]?.name), 1)
|
|
71
77
|
]),
|
|
72
78
|
_: 2
|
|
73
79
|
}, 1032, ["value", "onClick"]))), 128))
|
|
74
80
|
]),
|
|
75
81
|
_: 1
|
|
76
82
|
}, 8, ["style"]),
|
|
77
|
-
r(t(w), { class: "-
|
|
83
|
+
r(t(w), { class: "inset-x-px rounded-none rounded-b-lg" })
|
|
78
84
|
]),
|
|
79
85
|
key: "0"
|
|
80
86
|
} : void 0
|
|
@@ -85,5 +91,5 @@ const E = { class: "min-w-0" }, q = { class: "text-c-1 min-w-0 truncate" }, O =
|
|
|
85
91
|
}
|
|
86
92
|
});
|
|
87
93
|
export {
|
|
88
|
-
|
|
94
|
+
P as default
|
|
89
95
|
};
|
|
@@ -6,13 +6,17 @@
|
|
|
6
6
|
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
7
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
8
8
|
readonly onChange?: ((value: T) => any) | undefined;
|
|
9
|
-
|
|
9
|
+
readonly onUnmount?: (() => any) | undefined;
|
|
10
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUnmount"> & {
|
|
10
11
|
value: T;
|
|
11
12
|
} & Partial<{}>> & import("vue").PublicProps;
|
|
12
13
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
13
14
|
attrs: any;
|
|
14
15
|
slots: {};
|
|
15
|
-
emit:
|
|
16
|
+
emit: {
|
|
17
|
+
(e: "change", value: T): void;
|
|
18
|
+
(e: "unmount"): void;
|
|
19
|
+
};
|
|
16
20
|
}>) => import("vue").VNode & {
|
|
17
21
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueEmitter.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/layout/ValueEmitter.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ValueEmitter.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/layout/ValueEmitter.vue"],"names":[],"mappings":"AAsCA;;;;GAIG;yBACc,CAAC,EACjB,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAoDO,mBAAmB,CAAC;;;;eAnDA,CAAC;QAmDoC,OAAO,IAAsB,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;YAlDL,QAAQ,SAAS,CAAC,GAAG,IAAI;YACzB,SAAS,GAAG,IAAI;;EAqDlB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA/DzE,wBAgEC;AACD,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as m, watch as
|
|
1
|
+
import { defineComponent as m, watch as o, onBeforeUnmount as a } from "vue";
|
|
2
2
|
const r = {
|
|
3
3
|
name: "ValueEmitter"
|
|
4
|
-
},
|
|
4
|
+
}, s = /* @__PURE__ */ m({
|
|
5
5
|
...r,
|
|
6
6
|
props: {
|
|
7
7
|
value: {}
|
|
8
8
|
},
|
|
9
|
-
emits: ["change"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
() =>
|
|
14
|
-
(
|
|
9
|
+
emits: ["change", "unmount"],
|
|
10
|
+
setup(n, { emit: u }) {
|
|
11
|
+
const e = u;
|
|
12
|
+
return o(
|
|
13
|
+
() => n.value,
|
|
14
|
+
(t) => e("change", t),
|
|
15
15
|
{ immediate: !0 }
|
|
16
|
-
), (e,
|
|
16
|
+
), a(() => e("unmount")), (t, c) => null;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
s as default
|
|
21
21
|
};
|
|
@@ -20,6 +20,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
20
20
|
url: string;
|
|
21
21
|
}) => any;
|
|
22
22
|
"update:servers": () => any;
|
|
23
|
+
"update:open": (value: boolean) => any;
|
|
23
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
25
|
"onUpdate:variable"?: ((payload: {
|
|
25
26
|
index: number;
|
|
@@ -30,6 +31,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
30
31
|
url: string;
|
|
31
32
|
}) => any) | undefined;
|
|
32
33
|
"onUpdate:servers"?: (() => any) | undefined;
|
|
34
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
33
35
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
36
|
export default _default;
|
|
35
37
|
//# sourceMappingURL=ServerDropdown.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/server/ServerDropdown.vue"],"names":[],"mappings":"AAkIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C,KAAK,WAAW,GAAG;IACjB,0EAA0E;IAC1E,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;IACd,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;CACrB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;AA2QF,wBAOG"}
|