@scalar/api-client 2.0.6 → 2.0.8
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/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +42 -40
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +1 -0
- package/dist/store/workspace.d.ts +146 -29
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +36 -33
- package/dist/style.css +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 +60 -66
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts +17 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +45 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +4 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +0 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +8 -9
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ba3f5cb: feat: address bar history item infos
|
|
8
|
+
- 0b6e3aa: fix: address bar history item infos
|
|
9
|
+
- d58841b: feat: request table tooltip component
|
|
10
|
+
- Updated dependencies [d58841b]
|
|
11
|
+
- Updated dependencies [d58841b]
|
|
12
|
+
- @scalar/oas-utils@0.2.10
|
|
13
|
+
- @scalar/components@0.12.9
|
|
14
|
+
|
|
15
|
+
## 2.0.7
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- f2e3b0e: fix(#2351): global css import bug
|
|
20
|
+
- Updated dependencies [4250fe2]
|
|
21
|
+
- @scalar/themes@0.9.11
|
|
22
|
+
- @scalar/components@0.12.8
|
|
23
|
+
|
|
3
24
|
## 2.0.6
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -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":";UA6HQ,OAAO;;UAAP,OAAO;;AAqPf,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,70 +1,72 @@
|
|
|
1
|
-
import { defineComponent as U, openBlock as n, createElementBlock as
|
|
1
|
+
import { defineComponent as U, openBlock as n, createElementBlock as f, Fragment as d, unref as t, createBlock as i, withCtx as m, createVNode as x, createCommentVNode as b, createElementVNode as o, normalizeClass as g, renderList as k, toDisplayString as c } from "vue";
|
|
2
|
+
import { formatMs as w } from "../../libs/formatters.js";
|
|
2
3
|
import { useWorkspace as y } from "../../store/workspace.js";
|
|
3
|
-
import { ListboxButton as
|
|
4
|
-
import { ScalarIcon as
|
|
5
|
-
import { httpStatusCodes as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import
|
|
8
|
-
import { getStatusCodeColor as
|
|
9
|
-
const
|
|
4
|
+
import { ListboxButton as C, ListboxOptions as L, ListboxOption as R } from "@headlessui/vue";
|
|
5
|
+
import { ScalarIcon as B } from "@scalar/components";
|
|
6
|
+
import { httpStatusCodes as S } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { useRouter as H } from "vue-router";
|
|
8
|
+
import P from "../HttpMethod/HttpMethod.vue.js";
|
|
9
|
+
import { getStatusCodeColor as z } from "./httpStatusCodeColors.js";
|
|
10
|
+
const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = { class: "text-c-2 gap-0" }, V = { class: "font-code text-c-3 flex flex-row items-center gap-1.5 text-sm font-medium" }, Q = /* @__PURE__ */ U({
|
|
10
11
|
__name: "AddressBarHistory",
|
|
11
12
|
props: {
|
|
12
13
|
open: { type: Boolean }
|
|
13
14
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const { requestsHistory:
|
|
16
|
-
function
|
|
17
|
-
const e = new URL(a.responseURL),
|
|
18
|
-
return
|
|
15
|
+
setup($) {
|
|
16
|
+
const { requestsHistory: u, activeRequest: h, requestExampleMutators: _ } = y(), v = H();
|
|
17
|
+
function p(a, r) {
|
|
18
|
+
const e = new URL(a.responseURL), s = new URLSearchParams(e.search).get("scalar_url");
|
|
19
|
+
return s ? new URL(s)[r].toString() : e.origin;
|
|
19
20
|
}
|
|
20
21
|
function q(a) {
|
|
21
|
-
const r =
|
|
22
|
-
|
|
22
|
+
const r = u.value[a];
|
|
23
|
+
h.value.uid !== r.request.requestUid && v.push(`/request/${r.request.requestUid}`), _.set(r.request);
|
|
23
24
|
}
|
|
24
|
-
return (a, r) => (n(), d
|
|
25
|
-
t(
|
|
25
|
+
return (a, r) => (n(), f(d, null, [
|
|
26
|
+
t(u).length ? (n(), i(t(C), {
|
|
26
27
|
key: 0,
|
|
27
28
|
class: "hover:bg-b-2 mr-1 rounded p-1.5"
|
|
28
29
|
}, {
|
|
29
|
-
default:
|
|
30
|
-
|
|
30
|
+
default: m(() => [
|
|
31
|
+
x(t(B), {
|
|
31
32
|
class: "text-c-3",
|
|
32
33
|
icon: "History",
|
|
33
34
|
size: "xs"
|
|
34
35
|
})
|
|
35
36
|
]),
|
|
36
37
|
_: 1
|
|
37
|
-
})) :
|
|
38
|
-
|
|
39
|
-
class:
|
|
38
|
+
})) : b("", !0),
|
|
39
|
+
o("div", {
|
|
40
|
+
class: g([
|
|
40
41
|
"absolute left-0 top-[33px] w-full rounded before:pointer-events-none before:absolute before:left-0 before:top-[-33px] before:h-[calc(100%+33px)] before:w-full before:rounded z-50",
|
|
41
42
|
{ "before:shadow-lg": a.open }
|
|
42
43
|
])
|
|
43
44
|
}, [
|
|
44
|
-
|
|
45
|
-
default:
|
|
46
|
-
(n(!0), d
|
|
45
|
+
x(t(L), { class: "bg-b-1 custom-scroll bg-mix-transparent bg-mix-amount-30 max-h-[300px] rounded-b p-[3px] pt-0 backdrop-blur" }, {
|
|
46
|
+
default: m(() => [
|
|
47
|
+
(n(!0), f(d, null, k(t(u), ({ response: e }, l) => (n(), i(t(R), {
|
|
47
48
|
key: l,
|
|
48
49
|
class: "ui-active:bg-b-2 text-c-1 ui-active:text-c-1 flex cursor-pointer flex-row gap-2.5 rounded py-1.5 pr-3",
|
|
49
50
|
value: l,
|
|
50
|
-
onClick: (
|
|
51
|
+
onClick: (s) => q(l)
|
|
51
52
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
var
|
|
53
|
+
default: m(() => {
|
|
54
|
+
var s;
|
|
54
55
|
return [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class: h(["mr-[1px] min-w-[44px] pr-2 text-right", [t(P)(e.status).color]])
|
|
58
|
-
}, m(e.status), 3),
|
|
59
|
-
s("span", E, m(f(e.request, "origin") + f(e.request, "pathname")), 1)
|
|
60
|
-
]),
|
|
61
|
-
s("div", N, [
|
|
62
|
-
s("span", null, m((o = t(B)[e.status]) == null ? void 0 : o.name), 1),
|
|
63
|
-
e.config.method ? (n(), u(H, {
|
|
56
|
+
o("div", E, [
|
|
57
|
+
e.config.method ? (n(), i(P, {
|
|
64
58
|
key: 0,
|
|
65
|
-
class: "
|
|
59
|
+
class: "text-[11px] min-w-[44px]",
|
|
66
60
|
method: e.config.method
|
|
67
|
-
}, null, 8, ["method"])) :
|
|
61
|
+
}, null, 8, ["method"])) : b("", !0),
|
|
62
|
+
o("span", N, c(p(e.request, "origin") + p(e.request, "pathname")), 1)
|
|
63
|
+
]),
|
|
64
|
+
o("div", V, [
|
|
65
|
+
o("span", null, c(t(w)(e.duration)), 1),
|
|
66
|
+
o("span", {
|
|
67
|
+
class: g([t(z)(e.status).color])
|
|
68
|
+
}, c(e.status), 3),
|
|
69
|
+
o("span", null, c((s = t(S)[e.status]) == null ? void 0 : s.name), 1)
|
|
68
70
|
])
|
|
69
71
|
];
|
|
70
72
|
}),
|
|
@@ -78,5 +80,5 @@ const z = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, E = {
|
|
|
78
80
|
}
|
|
79
81
|
});
|
|
80
82
|
export {
|
|
81
|
-
|
|
83
|
+
Q as default
|
|
82
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA2HA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;;aAM3B,MAAM;YACP,OAAO;;;;;aADN,MAAM;YACP,OAAO;;;;;AAqJnB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNavItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-095ab46d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|