@scalar/api-client 2.2.59 → 2.2.61
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 +34 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +88 -80
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/IconSelector.vue.js +1 -0
- package/dist/components/SectionFilter.vue.d.ts +23 -0
- package/dist/components/SectionFilter.vue.d.ts.map +1 -0
- package/dist/components/SectionFilter.vue.js +7 -0
- package/dist/components/SectionFilter.vue2.js +67 -0
- package/dist/components/SectionFilterButton.vue.d.ts +22 -0
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -0
- package/dist/components/SectionFilterButton.vue.js +23 -0
- package/dist/components/SectionFilterButton.vue2.js +4 -0
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +1 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +62 -44
- package/dist/layouts/App/create-api-client-app.d.ts +2 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +2 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +3 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/events.d.ts +4 -0
- package/dist/store/events.d.ts.map +1 -1
- package/dist/store/events.js +4 -0
- package/dist/store/store.d.ts +1 -0
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +10 -10
- 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 +88 -83
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +36 -36
- 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 +103 -83
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -1
- 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 +81 -81
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +9 -9
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -21
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +80 -65
- package/package.json +14 -14
- package/dist/components/ContextBar.vue.d.ts +0 -11
- package/dist/components/ContextBar.vue.d.ts.map +0 -1
- package/dist/components/ContextBar.vue.js +0 -7
- package/dist/components/ContextBar.vue2.js +0 -47
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { defineComponent as j, computed as d, ref as T, useId as g, openBlock as l, createBlock as i, withCtx as v, createElementVNode as u, normalizeClass as y, createCommentVNode as c, createVNode as h, createElementBlock as k, Fragment as A } from "vue";
|
|
2
|
+
import I from "../../../components/SectionFilter.vue.js";
|
|
3
|
+
import V from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import H from "./ResponseBody.vue.js";
|
|
5
|
+
import q from "./ResponseEmpty.vue.js";
|
|
6
|
+
import E from "./ResponseLoadingOverlay.vue.js";
|
|
7
|
+
import O from "./ResponseMetaInformation.vue.js";
|
|
8
|
+
import $ from "./ResponseBodyVirtual.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
10
|
+
import w from "./ResponseCookies.vue.js";
|
|
11
|
+
import z from "./ResponseHeaders.vue.js";
|
|
12
|
+
const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], x = 2e5, J = /* @__PURE__ */ j({
|
|
13
13
|
__name: "ResponseSection",
|
|
14
14
|
props: {
|
|
15
15
|
numWorkspaceRequests: {},
|
|
16
16
|
response: {}
|
|
17
17
|
},
|
|
18
18
|
setup(n) {
|
|
19
|
-
const m =
|
|
20
|
-
var
|
|
21
|
-
const e = (
|
|
22
|
-
return e ? Object.keys(e).map((
|
|
23
|
-
name:
|
|
24
|
-
value: e[
|
|
19
|
+
const m = d(() => {
|
|
20
|
+
var o;
|
|
21
|
+
const e = (o = n.response) == null ? void 0 : o.headers;
|
|
22
|
+
return e ? Object.keys(e).map((a) => ({
|
|
23
|
+
name: a,
|
|
24
|
+
value: e[a] ?? "",
|
|
25
25
|
required: !1
|
|
26
26
|
})).filter(
|
|
27
|
-
(
|
|
27
|
+
(a) => ![
|
|
28
28
|
"rest-api-client-content-length",
|
|
29
29
|
"X-API-Client-Content-Length"
|
|
30
|
-
].includes(
|
|
30
|
+
].includes(a.name)
|
|
31
31
|
) : [];
|
|
32
|
-
}),
|
|
32
|
+
}), B = d(
|
|
33
33
|
() => {
|
|
34
34
|
var e;
|
|
35
|
-
return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((
|
|
36
|
-
var
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
name:
|
|
40
|
-
value:
|
|
35
|
+
return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
|
|
36
|
+
var t, r;
|
|
37
|
+
const a = (r = (t = n.response) == null ? void 0 : t.headers) == null ? void 0 : r[o];
|
|
38
|
+
return a ? {
|
|
39
|
+
name: o,
|
|
40
|
+
value: a,
|
|
41
41
|
required: !1
|
|
42
42
|
} : [];
|
|
43
43
|
})) ?? [];
|
|
44
44
|
}
|
|
45
|
-
),
|
|
46
|
-
|
|
45
|
+
), b = ["Cookies", "Headers", "Body"], s = T("All"), f = d(() => ["All", ...b]), p = d(
|
|
46
|
+
() => Object.fromEntries(
|
|
47
|
+
f.value.map((e) => [e, g()])
|
|
48
|
+
)
|
|
49
|
+
), R = d(() => {
|
|
50
|
+
var t, r;
|
|
47
51
|
if (!n.response) return !1;
|
|
48
|
-
const e = ((
|
|
49
|
-
return !e || (n.response.size ?? 0) <=
|
|
52
|
+
const e = ((t = n.response.headers) == null ? void 0 : t["content-type"]) || ((r = n.response.headers) == null ? void 0 : r["Content-Type"]);
|
|
53
|
+
return !e || (n.response.size ?? 0) <= x || e.includes("text/html") ? !1 : [
|
|
50
54
|
// Text types
|
|
51
55
|
"text/",
|
|
52
56
|
// JSON types
|
|
@@ -73,66 +77,77 @@ const z = { class: "flex h-8 flex-1 items-center" }, k = 2e5, U = /* @__PURE__ *
|
|
|
73
77
|
"application/x-java-source",
|
|
74
78
|
// Form data
|
|
75
79
|
"application/x-www-form-urlencoded"
|
|
76
|
-
].some((C) => e.includes(C)) && (n.response.size ?? 0) >
|
|
80
|
+
].some((C) => e.includes(C)) && (n.response.size ?? 0) > x;
|
|
77
81
|
});
|
|
78
|
-
return (e,
|
|
79
|
-
title:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
return (e, o) => (l(), i(V, { "aria-label": "Response" }, {
|
|
83
|
+
title: v(() => [
|
|
84
|
+
u("div", L, [
|
|
85
|
+
u("div", {
|
|
82
86
|
"aria-live": "polite",
|
|
83
|
-
class:
|
|
87
|
+
class: y(["flex items-center", { "animate-response-heading": e.response }])
|
|
84
88
|
}, [
|
|
85
|
-
|
|
86
|
-
e.response ? (
|
|
89
|
+
o[1] || (o[1] = u("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
|
|
90
|
+
e.response ? (l(), i(O, {
|
|
87
91
|
key: 0,
|
|
88
92
|
class: "animate-response-children",
|
|
89
93
|
response: e.response
|
|
90
94
|
}, null, 8, ["response"])) : c("", !0)
|
|
91
95
|
], 2),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
h(I, {
|
|
97
|
+
modelValue: s.value,
|
|
98
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => s.value = a),
|
|
99
|
+
filterIds: p.value,
|
|
100
|
+
filters: f.value
|
|
101
|
+
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
97
102
|
])
|
|
98
103
|
]),
|
|
99
|
-
default:
|
|
100
|
-
var
|
|
104
|
+
default: v(() => {
|
|
105
|
+
var a, t, r;
|
|
101
106
|
return [
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
u("div", {
|
|
108
|
+
id: p.value.All,
|
|
109
|
+
class: y(["custom-scroll relative grid h-full justify-stretch divide-y", {
|
|
104
110
|
"content-start": e.response
|
|
105
|
-
}])
|
|
111
|
+
}]),
|
|
112
|
+
role: s.value === "All" && e.response ? "tabpanel" : "none"
|
|
106
113
|
}, [
|
|
107
|
-
e.response ? (
|
|
108
|
-
|
|
114
|
+
e.response ? (l(), k(A, { key: 1 }, [
|
|
115
|
+
s.value === "All" || s.value === "Cookies" ? (l(), i(w, {
|
|
109
116
|
key: 0,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
id: p.value.Cookies,
|
|
118
|
+
cookies: B.value,
|
|
119
|
+
role: s.value === "All" ? "none" : "tabpanel"
|
|
120
|
+
}, null, 8, ["id", "cookies", "role"])) : c("", !0),
|
|
121
|
+
s.value === "All" || s.value === "Headers" ? (l(), i(z, {
|
|
113
122
|
key: 1,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
123
|
+
id: p.value.Headers,
|
|
124
|
+
headers: m.value,
|
|
125
|
+
role: s.value === "All" ? "none" : "tabpanel"
|
|
126
|
+
}, null, 8, ["id", "headers", "role"])) : c("", !0),
|
|
127
|
+
s.value === "All" || s.value === "Body" ? (l(), k(A, { key: 2 }, [
|
|
128
|
+
R.value && typeof ((a = e.response) == null ? void 0 : a.data) == "string" ? (l(), i($, {
|
|
118
129
|
key: 0,
|
|
130
|
+
id: p.value.Body,
|
|
119
131
|
content: e.response.data,
|
|
120
|
-
data: (
|
|
121
|
-
headers: m.value
|
|
122
|
-
|
|
132
|
+
data: (t = e.response) == null ? void 0 : t.data,
|
|
133
|
+
headers: m.value,
|
|
134
|
+
role: s.value === "All" ? "none" : "tabpanel"
|
|
135
|
+
}, null, 8, ["id", "content", "data", "headers", "role"])) : (l(), i(H, {
|
|
123
136
|
key: 1,
|
|
137
|
+
id: p.value.Body,
|
|
124
138
|
active: !0,
|
|
125
139
|
data: (r = e.response) == null ? void 0 : r.data,
|
|
126
140
|
headers: m.value,
|
|
141
|
+
role: s.value === "All" ? "none" : "tabpanel",
|
|
127
142
|
title: "Body"
|
|
128
|
-
}, null, 8, ["data", "headers"]))
|
|
143
|
+
}, null, 8, ["id", "data", "headers", "role"]))
|
|
129
144
|
], 64)) : c("", !0)
|
|
130
|
-
], 64)) : (
|
|
145
|
+
], 64)) : (l(), i(q, {
|
|
131
146
|
key: 0,
|
|
132
147
|
numWorkspaceRequests: e.numWorkspaceRequests
|
|
133
148
|
}, null, 8, ["numWorkspaceRequests"])),
|
|
134
|
-
|
|
135
|
-
],
|
|
149
|
+
h(E)
|
|
150
|
+
], 10, N)
|
|
136
151
|
];
|
|
137
152
|
}),
|
|
138
153
|
_: 1
|
|
@@ -140,5 +155,5 @@ const z = { class: "flex h-8 flex-1 items-center" }, k = 2e5, U = /* @__PURE__ *
|
|
|
140
155
|
}
|
|
141
156
|
});
|
|
142
157
|
export {
|
|
143
|
-
|
|
158
|
+
J as default
|
|
144
159
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.61",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -188,22 +188,22 @@
|
|
|
188
188
|
"whatwg-mimetype": "^4.0.0",
|
|
189
189
|
"yaml": "^2.4.5",
|
|
190
190
|
"zod": "^3.23.8",
|
|
191
|
-
"@scalar/
|
|
191
|
+
"@scalar/draggable": "0.1.11",
|
|
192
|
+
"@scalar/components": "0.13.33",
|
|
193
|
+
"@scalar/import": "0.2.35",
|
|
192
194
|
"@scalar/icons": "0.1.3",
|
|
193
|
-
"@scalar/
|
|
194
|
-
"@scalar/oas-utils": "0.2.113",
|
|
195
|
+
"@scalar/oas-utils": "0.2.115",
|
|
195
196
|
"@scalar/object-utils": "1.1.13",
|
|
196
|
-
"@scalar/
|
|
197
|
-
"@scalar/openapi-parser": "0.10.9",
|
|
197
|
+
"@scalar/openapi-parser": "0.10.10",
|
|
198
198
|
"@scalar/openapi-types": "0.1.9",
|
|
199
|
+
"@scalar/postman-to-openapi": "0.1.38",
|
|
200
|
+
"@scalar/types": "0.0.40",
|
|
201
|
+
"@scalar/themes": "0.9.75",
|
|
199
202
|
"@scalar/snippetz": "0.2.16",
|
|
200
|
-
"@scalar/
|
|
201
|
-
"@scalar/
|
|
202
|
-
"@scalar/types": "0.0.39",
|
|
203
|
-
"@scalar/use-hooks": "0.1.28",
|
|
203
|
+
"@scalar/use-codemirror": "0.11.78",
|
|
204
|
+
"@scalar/use-hooks": "0.1.29",
|
|
204
205
|
"@scalar/use-toasts": "0.7.9",
|
|
205
|
-
"@scalar/use-tooltip": "1.0.6"
|
|
206
|
-
"@scalar/use-codemirror": "0.11.76"
|
|
206
|
+
"@scalar/use-tooltip": "1.0.6"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
209
209
|
"@types/shell-quote": "^1.7.5",
|
|
@@ -219,8 +219,8 @@
|
|
|
219
219
|
"vite": "^5.4.10",
|
|
220
220
|
"vite-svg-loader": "^5.1.0",
|
|
221
221
|
"vitest": "^1.6.0",
|
|
222
|
-
"@scalar/
|
|
223
|
-
"@scalar/
|
|
222
|
+
"@scalar/galaxy": "0.2.24",
|
|
223
|
+
"@scalar/build-tooling": "0.1.17"
|
|
224
224
|
},
|
|
225
225
|
"scripts": {
|
|
226
226
|
"build": "scalar-build-vite",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
sections: string[];
|
|
3
|
-
activeSection: string;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
-
setActiveSection: (value: string) => any;
|
|
7
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
onSetActiveSection?: (value: string) => any;
|
|
9
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFieldSetElement>;
|
|
10
|
-
export default _default;
|
|
11
|
-
//# sourceMappingURL=ContextBar.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":"AAgJA,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC;;;;;;AAsKF,wBAQG"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, useId as f, computed as h, openBlock as r, createElementBlock as i, createElementVNode as e, Fragment as g, renderList as _, normalizeClass as b, createTextVNode as y, toDisplayString as l, withDirectives as S, unref as a, vModelRadio as w, createVNode as k } from "vue";
|
|
2
|
-
import { ScalarIcon as V } from "@scalar/components";
|
|
3
|
-
const q = { class: "filter-hover context-bar-group ml-auto hidden lg:flex lg:w-[120px]" }, B = { class: "request-section-content request-section-content-filter fade-request-section-content text-c-3 pointer-events-auto relative hidden w-full justify-end gap-[1.5px] rounded py-2 text-xs xl:flex" }, C = ["name", "value"], F = { class: "context-bar-group-hover:text-c-1 absolute -right-[30px] top-1/2 flex -translate-y-1/2 items-center" }, N = { class: "context-bar-group-hover:hidden mr-1.5" }, D = /* @__PURE__ */ x({
|
|
4
|
-
__name: "ContextBar",
|
|
5
|
-
props: {
|
|
6
|
-
sections: {},
|
|
7
|
-
activeSection: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["setActiveSection"],
|
|
10
|
-
setup(c, { emit: d }) {
|
|
11
|
-
const u = c, p = d, m = f(), t = h({
|
|
12
|
-
get: () => u.activeSection,
|
|
13
|
-
set: (s) => p("setActiveSection", s)
|
|
14
|
-
});
|
|
15
|
-
return (s, o) => (r(), i("fieldset", q, [
|
|
16
|
-
o[1] || (o[1] = e("legend", { class: "sr-only" }, "Filter Sections", -1)),
|
|
17
|
-
e("div", B, [
|
|
18
|
-
(r(!0), i(g, null, _(s.sections, (n) => (r(), i("label", {
|
|
19
|
-
key: n,
|
|
20
|
-
class: b(["filter-hover-item hover:bg-b-2 flex w-fit cursor-pointer items-center whitespace-nowrap rounded p-1 px-2 text-center font-medium has-[:focus-visible]:outline", [t.value === n ? "text-c-1 pointer-events-none" : ""]])
|
|
21
|
-
}, [
|
|
22
|
-
y(l(n) + " ", 1),
|
|
23
|
-
S(e("input", {
|
|
24
|
-
"onUpdate:modelValue": o[0] || (o[0] = (v) => t.value = v),
|
|
25
|
-
class: "sr-only",
|
|
26
|
-
name: a(m),
|
|
27
|
-
type: "radio",
|
|
28
|
-
value: n
|
|
29
|
-
}, null, 8, C), [
|
|
30
|
-
[w, t.value]
|
|
31
|
-
])
|
|
32
|
-
], 2))), 128)),
|
|
33
|
-
e("div", F, [
|
|
34
|
-
e("span", N, l(t.value), 1),
|
|
35
|
-
k(a(V), {
|
|
36
|
-
icon: "FilterList",
|
|
37
|
-
size: "md",
|
|
38
|
-
thickness: "2"
|
|
39
|
-
})
|
|
40
|
-
])
|
|
41
|
-
])
|
|
42
|
-
]));
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
export {
|
|
46
|
-
D as default
|
|
47
|
-
};
|