@scalar/api-client 2.2.29 → 2.2.31
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 +33 -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 +81 -87
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +3 -3
- package/dist/components/DataTable/index.js +16 -16
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +5 -5
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +2 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +11 -11
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +22 -22
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +11 -11
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +21 -21
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +53 -0
- package/dist/libs/find-request.d.ts.map +1 -0
- package/dist/libs/find-request.js +22 -0
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/hot-keys.js +3 -2
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/importers/index.d.ts.map +1 -1
- package/dist/libs/index.d.ts +1 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -29
- package/dist/libs/parse-curl.d.ts +4 -1
- package/dist/libs/parse-curl.d.ts.map +1 -1
- package/dist/libs/parse-curl.js +55 -69
- package/dist/libs/send-request/send-request.js +1 -1
- package/dist/store/active-entities.d.ts +19 -15
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +30 -27
- package/dist/store/events.d.ts +1 -1
- package/dist/store/store.d.ts +11 -11
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +10 -10
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +67 -66
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +100 -60
- 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 +1 -1
- package/dist/views/Request/RequestSection/index.d.ts +2 -0
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/index.js +4 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +4 -4
- package/dist/views/Request/RequestSidebar.vue2.js +123 -121
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +9 -9
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
- package/dist/views/Request/ResponseSection/index.d.ts +2 -0
- package/dist/views/Request/ResponseSection/index.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/index.js +4 -0
- package/package.json +19 -9
|
@@ -1,178 +1,180 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useSearch as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useActiveEntities as
|
|
11
|
-
import { createInitialRequest as
|
|
12
|
-
import
|
|
13
|
-
import { dragHandlerFactory as
|
|
14
|
-
import { ScalarIcon as q, ScalarSearchInput as
|
|
15
|
-
import { LibraryIcon as
|
|
16
|
-
import { useToasts as
|
|
17
|
-
import { useRouter as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { useLayout as
|
|
22
|
-
import { useWorkspace as
|
|
23
|
-
import { useSidebar as
|
|
24
|
-
const
|
|
1
|
+
import { defineComponent as me, useId as fe, reactive as be, ref as ve, watch as K, onMounted as he, onBeforeUnmount as Se, computed as ke, openBlock as r, createElementBlock as g, Fragment as O, withDirectives as N, createVNode as m, unref as t, normalizeClass as f, createSlots as ge, withCtx as c, createElementVNode as n, createBlock as d, createCommentVNode as b, isRef as Re, withKeys as $, withModifiers as v, vShow as L, renderList as U, createTextVNode as D, toDisplayString as ye, nextTick as we } from "vue";
|
|
2
|
+
import xe from "../../assets/rabbit.ascii.js";
|
|
3
|
+
import Ie from "../../assets/rabbitjump.ascii.js";
|
|
4
|
+
import Ce from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
5
|
+
import Oe from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
6
|
+
import H from "../../components/ScalarAsciiArt.vue.js";
|
|
7
|
+
import { useSearch as $e } from "../../components/Search/useSearch.js";
|
|
8
|
+
import De from "../../components/Sidebar/SidebarButton.vue.js";
|
|
9
|
+
import qe from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
10
|
+
import { useActiveEntities as Me } from "../../store/active-entities.js";
|
|
11
|
+
import { createInitialRequest as Ve } from "../../store/requests.js";
|
|
12
|
+
import Te from "./RequestSidebarItemMenu.vue.js";
|
|
13
|
+
import { dragHandlerFactory as Pe } from "./handle-drag.js";
|
|
14
|
+
import { ScalarIcon as q, ScalarSearchInput as Ee, ScalarSearchResultList as We, ScalarSearchResultItem as ze, ScalarButton as Ae } from "@scalar/components";
|
|
15
|
+
import { LibraryIcon as Be } from "@scalar/icons";
|
|
16
|
+
import { useToasts as Fe } from "@scalar/use-toasts";
|
|
17
|
+
import { useRouter as Ke } from "vue-router";
|
|
18
|
+
import Ne from "./RequestSidebarItem.vue.js";
|
|
19
|
+
import Le from "../../components/Sidebar/Sidebar.vue.js";
|
|
20
|
+
import Ue from "./components/WorkspaceDropdown.vue.js";
|
|
21
|
+
import { useLayout as He } from "../../hooks/useLayout.js";
|
|
22
|
+
import { useWorkspace as je } from "../../store/store.js";
|
|
23
|
+
import { useSidebar as Ge } from "../../hooks/useSidebar.js";
|
|
24
|
+
const Je = { class: "flex items-center h-12 px-3 top-0 bg-b-1 sticky z-20" }, Qe = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "text-c-3"
|
|
27
|
-
},
|
|
28
|
-
class: "search-button-fade sticky px-3 py-2.5 z-10 pt-0 top-
|
|
27
|
+
}, Xe = {
|
|
28
|
+
class: "search-button-fade sticky px-3 py-2.5 z-10 pt-0 top-12 focus-within:z-20",
|
|
29
29
|
role: "search"
|
|
30
|
-
},
|
|
30
|
+
}, Ye = {
|
|
31
31
|
key: 1,
|
|
32
32
|
class: "contents"
|
|
33
|
-
},
|
|
33
|
+
}, Ze = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, _e = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, wt = /* @__PURE__ */ me({
|
|
34
34
|
__name: "RequestSidebar",
|
|
35
35
|
props: {
|
|
36
36
|
isSidebarOpen: { type: Boolean }
|
|
37
37
|
},
|
|
38
38
|
emits: ["update:modelValue", "update:isSidebarOpen", "newTab", "clearDrafts"],
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
activeWorkspaceCollections:
|
|
42
|
-
activeRequest:
|
|
39
|
+
setup(j, { emit: G }) {
|
|
40
|
+
const J = j, M = G, { layout: Q } = He(), V = je(), {
|
|
41
|
+
activeWorkspaceCollections: p,
|
|
42
|
+
activeRequest: X,
|
|
43
43
|
activeWorkspaceRequests: y,
|
|
44
|
-
activeWorkspace:
|
|
45
|
-
} =
|
|
46
|
-
|
|
44
|
+
activeWorkspace: w
|
|
45
|
+
} = Me(), { findRequestParents: Y, isReadOnly: l, events: R, requestMutators: T, requests: P } = V, { handleDragEnd: Z, isDroppable: _ } = Pe(
|
|
46
|
+
w,
|
|
47
47
|
V
|
|
48
|
-
), { collapsedSidebarFolders:
|
|
48
|
+
), { collapsedSidebarFolders: ee, setCollapsedSidebarFolder: te } = Ge(), { replace: E } = Ke(), se = () => {
|
|
49
49
|
R.commandPalette.emit({
|
|
50
50
|
commandName: "Import from OpenAPI/Swagger/Postman"
|
|
51
51
|
});
|
|
52
|
-
}, W =
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
}, W = fe(), { toast: oe } = Fe(), h = be({ open: !1 }), S = ve(!1);
|
|
53
|
+
K(
|
|
54
|
+
X,
|
|
55
55
|
(s) => {
|
|
56
|
-
s &&
|
|
57
|
-
(e) =>
|
|
56
|
+
s && Y(s).forEach(
|
|
57
|
+
(e) => te(e, !0)
|
|
58
58
|
);
|
|
59
59
|
},
|
|
60
60
|
{ immediate: !0 }
|
|
61
61
|
);
|
|
62
62
|
const {
|
|
63
63
|
searchText: k,
|
|
64
|
-
searchResultsWithPlaceholderResults:
|
|
64
|
+
searchResultsWithPlaceholderResults: x,
|
|
65
65
|
selectedSearchResult: I,
|
|
66
|
-
onSearchResultClick:
|
|
67
|
-
fuseSearch:
|
|
66
|
+
onSearchResultClick: ae,
|
|
67
|
+
fuseSearch: re,
|
|
68
68
|
searchInputRef: C,
|
|
69
|
-
searchResultRefs:
|
|
69
|
+
searchResultRefs: ie,
|
|
70
70
|
navigateSearchResults: z,
|
|
71
|
-
selectSearchResult:
|
|
72
|
-
} =
|
|
71
|
+
selectSearchResult: ne
|
|
72
|
+
} = $e(), A = (s) => {
|
|
73
73
|
var e;
|
|
74
|
-
s && (s.toggleSidebar && M("update:isSidebarOpen",
|
|
74
|
+
s && (s.toggleSidebar && M("update:isSidebarOpen", J.isSidebarOpen), s.focusRequestSearch && ((e = C.value) == null || e.focus()));
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
he(() => R.hotKeys.on(A)), Se(() => {
|
|
77
77
|
R.hotKeys.off(A);
|
|
78
78
|
});
|
|
79
|
-
const
|
|
79
|
+
const le = (s) => {
|
|
80
80
|
if (s != null && s.documentUrl) {
|
|
81
81
|
s.watchMode = !s.watchMode;
|
|
82
|
-
const e =
|
|
82
|
+
const e = p.value.find(
|
|
83
83
|
(o) => o.uid === s.entity.uid
|
|
84
84
|
);
|
|
85
85
|
e && (e.watchMode = s.watchMode);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
|
|
89
|
-
() =>
|
|
88
|
+
K(
|
|
89
|
+
() => p.value.map(
|
|
90
|
+
(s) => s.watchMode
|
|
91
|
+
),
|
|
90
92
|
(s, e) => {
|
|
91
93
|
s.forEach((o, i) => {
|
|
92
|
-
var a;
|
|
93
|
-
if (!l && o !== e[i]) {
|
|
94
|
-
const
|
|
95
|
-
if (!
|
|
96
|
-
const
|
|
97
|
-
|
|
94
|
+
var a, u, B;
|
|
95
|
+
if (!l && o !== e[i] && ((u = (a = p.value[i]) == null ? void 0 : a.info) == null ? void 0 : u.title) !== "Drafts" && p.value[i]) {
|
|
96
|
+
const F = p.value[i];
|
|
97
|
+
if (!F) return;
|
|
98
|
+
const pe = `${(B = F.info) == null ? void 0 : B.title}: Watch Mode ${o ? "enabled" : "disabled"}`;
|
|
99
|
+
oe(pe, "info");
|
|
98
100
|
}
|
|
99
101
|
});
|
|
100
102
|
}
|
|
101
103
|
);
|
|
102
|
-
const
|
|
104
|
+
const ue = ke(() => {
|
|
103
105
|
var e;
|
|
104
|
-
const s =
|
|
106
|
+
const s = x.value[I.value];
|
|
105
107
|
return (e = s == null ? void 0 : s.item) != null && e.id ? `#search-input-${s.item.id}` : void 0;
|
|
106
|
-
}),
|
|
108
|
+
}), de = () => {
|
|
107
109
|
var o, i;
|
|
108
|
-
const s =
|
|
110
|
+
const s = p.value.find(
|
|
109
111
|
(a) => {
|
|
110
|
-
var
|
|
111
|
-
return ((
|
|
112
|
+
var u;
|
|
113
|
+
return ((u = a.info) == null ? void 0 : u.title) === "Drafts";
|
|
112
114
|
}
|
|
113
115
|
);
|
|
114
116
|
if (s && s.requests.forEach((a) => {
|
|
115
117
|
P[a] && T.delete(P[a], s.uid);
|
|
116
118
|
}), y.value.length) {
|
|
117
|
-
const a =
|
|
118
|
-
|
|
119
|
-
`/workspace/${(i =
|
|
119
|
+
const a = p.value[0], u = a == null ? void 0 : a.requests[0];
|
|
120
|
+
u && E(
|
|
121
|
+
`/workspace/${(i = w.value) == null ? void 0 : i.uid}/request/${u}`
|
|
120
122
|
);
|
|
121
123
|
} else {
|
|
122
|
-
const { request: a } =
|
|
123
|
-
s && (T.add(a, s.uid), E(`/workspace/${(o =
|
|
124
|
+
const { request: a } = Ve();
|
|
125
|
+
s && (T.add(a, s.uid), E(`/workspace/${(o = w.value) == null ? void 0 : o.uid}/request/${a.uid}`));
|
|
124
126
|
}
|
|
125
|
-
},
|
|
126
|
-
S.value
|
|
127
|
+
}, ce = () => {
|
|
128
|
+
S.value || (k.value = ""), S.value && we(() => {
|
|
127
129
|
var s;
|
|
128
130
|
(s = C.value) == null || s.focus();
|
|
129
|
-
});
|
|
131
|
+
}), S.value = !S.value;
|
|
130
132
|
};
|
|
131
133
|
return (s, e) => (r(), g(O, null, [
|
|
132
|
-
|
|
134
|
+
N(m(t(Le), {
|
|
133
135
|
class: f([s.isSidebarOpen ? "sidebar-active-width" : ""]),
|
|
134
136
|
isSidebarOpen: s.isSidebarOpen,
|
|
135
137
|
"onUpdate:isSidebarOpen": e[9] || (e[9] = (o) => s.$emit("update:isSidebarOpen", o))
|
|
136
|
-
},
|
|
138
|
+
}, ge({
|
|
137
139
|
content: c(() => [
|
|
138
|
-
n("div",
|
|
139
|
-
|
|
140
|
-
class: f(["xl:hidden", [{ "!flex": t(
|
|
140
|
+
n("div", Je, [
|
|
141
|
+
m(qe, {
|
|
142
|
+
class: f(["xl:hidden", [{ "!flex": t(Q) === "modal" }]]),
|
|
141
143
|
modelValue: s.isSidebarOpen,
|
|
142
144
|
"onUpdate:modelValue": e[0] || (e[0] = (o) => s.$emit("update:isSidebarOpen", o))
|
|
143
145
|
}, null, 8, ["class", "modelValue"]),
|
|
144
|
-
t(l) ? b("", !0) : (r(),
|
|
145
|
-
t(l) ? b("", !0) : (r(), g("span",
|
|
146
|
-
t(l) ? b("", !0) : (r(),
|
|
146
|
+
t(l) ? b("", !0) : (r(), d(t(Ue), { key: 0 })),
|
|
147
|
+
t(l) ? b("", !0) : (r(), g("span", Qe, " / ")),
|
|
148
|
+
t(l) ? b("", !0) : (r(), d(Ce, { key: 2 })),
|
|
147
149
|
n("button", {
|
|
148
150
|
class: "ml-auto",
|
|
149
151
|
type: "button",
|
|
150
|
-
onClick:
|
|
152
|
+
onClick: ce
|
|
151
153
|
}, [
|
|
152
|
-
|
|
154
|
+
m(t(q), {
|
|
153
155
|
class: "text-c-3 text-sm hover:bg-b-2 p-1.75 rounded-lg max-w-8 max-h-8",
|
|
154
156
|
icon: "Search"
|
|
155
157
|
})
|
|
156
158
|
])
|
|
157
159
|
]),
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
N(n("div", Xe, [
|
|
161
|
+
m(t(Ee), {
|
|
160
162
|
ref_key: "searchInputRef",
|
|
161
163
|
ref: C,
|
|
162
164
|
modelValue: t(k),
|
|
163
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) =>
|
|
164
|
-
"aria-activedescendant":
|
|
165
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => Re(k) ? k.value = o : null),
|
|
166
|
+
"aria-activedescendant": ue.value,
|
|
165
167
|
"aria-controls": t(W),
|
|
166
168
|
sidebar: "",
|
|
167
|
-
onInput: t(
|
|
169
|
+
onInput: t(re),
|
|
168
170
|
onKeydown: [
|
|
169
171
|
e[2] || (e[2] = $(v((o) => t(z)("down"), ["stop"]), ["down"])),
|
|
170
|
-
e[3] || (e[3] = $(v((o) => t(
|
|
172
|
+
e[3] || (e[3] = $(v((o) => t(ne)(), ["stop"]), ["enter"])),
|
|
171
173
|
e[4] || (e[4] = $(v((o) => t(z)("up"), ["stop"]), ["up"]))
|
|
172
174
|
]
|
|
173
175
|
}, null, 8, ["modelValue", "aria-activedescendant", "aria-controls", "onInput"])
|
|
174
176
|
], 512), [
|
|
175
|
-
[
|
|
177
|
+
[L, S.value]
|
|
176
178
|
]),
|
|
177
179
|
n("div", {
|
|
178
180
|
class: f(["flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
@@ -183,72 +185,72 @@ const je = { class: "flex items-center h-[48px] px-3 top-0 bg-b-1 sticky z-20" }
|
|
|
183
185
|
onDragover: e[8] || (e[8] = v(() => {
|
|
184
186
|
}, ["prevent"]))
|
|
185
187
|
}, [
|
|
186
|
-
t(k) ? (r(),
|
|
188
|
+
t(k) ? (r(), d(t(We), {
|
|
187
189
|
key: 0,
|
|
188
190
|
id: t(W),
|
|
189
191
|
"aria-label": "Search Results",
|
|
190
192
|
class: "gap-px",
|
|
191
|
-
noResults: !t(
|
|
193
|
+
noResults: !t(x).length
|
|
192
194
|
}, {
|
|
193
195
|
default: c(() => [
|
|
194
|
-
(r(!0), g(O, null,
|
|
196
|
+
(r(!0), g(O, null, U(t(x), (o, i) => (r(), d(t(ze), {
|
|
195
197
|
id: `#search-input-${o.item.id}`,
|
|
196
198
|
key: o.refIndex,
|
|
197
199
|
ref_for: !0,
|
|
198
|
-
ref: (a) => t(
|
|
200
|
+
ref: (a) => t(ie)[i] = a,
|
|
199
201
|
active: t(I) === i,
|
|
200
202
|
class: "px-2",
|
|
201
203
|
href: o.item.link,
|
|
202
|
-
onClick: v((a) => t(
|
|
204
|
+
onClick: v((a) => t(ae)(o), ["prevent"]),
|
|
203
205
|
onFocus: (a) => I.value = i
|
|
204
206
|
}, {
|
|
205
207
|
addon: c(() => [
|
|
206
208
|
e[11] || (e[11] = n("span", { class: "sr-only" }, "HTTP Method:", -1)),
|
|
207
|
-
|
|
209
|
+
m(Oe, {
|
|
208
210
|
class: "font-bold",
|
|
209
211
|
method: o.item.httpVerb ?? "get"
|
|
210
212
|
}, null, 8, ["method"])
|
|
211
213
|
]),
|
|
212
214
|
default: c(() => [
|
|
213
|
-
D(
|
|
215
|
+
D(ye(o.item.title) + " ", 1)
|
|
214
216
|
]),
|
|
215
217
|
_: 2
|
|
216
218
|
}, 1032, ["id", "active", "href", "onClick", "onFocus"]))), 128))
|
|
217
219
|
]),
|
|
218
220
|
_: 1
|
|
219
|
-
}, 8, ["id", "noResults"])) : (r(), g("nav",
|
|
220
|
-
(r(!0), g(O, null,
|
|
221
|
+
}, 8, ["id", "noResults"])) : (r(), g("nav", Ye, [
|
|
222
|
+
(r(!0), g(O, null, U(t(p), (o) => {
|
|
221
223
|
var i;
|
|
222
|
-
return r(),
|
|
224
|
+
return r(), d(Ne, {
|
|
223
225
|
key: o.uid,
|
|
224
226
|
isDraggable: !t(l) && ((i = o.info) == null ? void 0 : i.title) !== "Drafts",
|
|
225
|
-
isDroppable: t(
|
|
227
|
+
isDroppable: t(_),
|
|
226
228
|
menuItem: h,
|
|
227
229
|
parentUids: [],
|
|
228
230
|
uid: o.uid,
|
|
229
|
-
onNewTab: e[5] || (e[5] = (a,
|
|
230
|
-
onOnDragEnd: t(
|
|
231
|
+
onNewTab: e[5] || (e[5] = (a, u) => M("newTab", { name: a, uid: u })),
|
|
232
|
+
onOnDragEnd: t(Z),
|
|
231
233
|
onOpenMenu: e[6] || (e[6] = (a) => Object.assign(h, a))
|
|
232
234
|
}, {
|
|
233
235
|
leftIcon: c(() => {
|
|
234
236
|
var a;
|
|
235
237
|
return [
|
|
236
|
-
((a = o.info) == null ? void 0 : a.title) === "Drafts" ? (r(),
|
|
238
|
+
((a = o.info) == null ? void 0 : a.title) === "Drafts" ? (r(), d(t(q), {
|
|
237
239
|
key: 0,
|
|
238
240
|
class: "text-sidebar-c-2 group-hover:hidden",
|
|
239
241
|
icon: "Scribble",
|
|
240
242
|
thickness: "2.25"
|
|
241
|
-
})) : (r(),
|
|
243
|
+
})) : (r(), d(t(Be), {
|
|
242
244
|
key: 1,
|
|
243
245
|
class: "min-w-3.5 text-sidebar-c-2 size-3.5 stroke-2 group-hover:hidden",
|
|
244
246
|
src: o["x-scalar-icon"] || "interface-content-folder"
|
|
245
247
|
}, null, 8, ["src"])),
|
|
246
248
|
n("div", {
|
|
247
249
|
class: f({
|
|
248
|
-
"rotate-90": t(
|
|
250
|
+
"rotate-90": t(ee)[o.uid]
|
|
249
251
|
})
|
|
250
252
|
}, [
|
|
251
|
-
|
|
253
|
+
m(t(q), {
|
|
252
254
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
253
255
|
icon: "ChevronRight",
|
|
254
256
|
size: "md"
|
|
@@ -268,14 +270,14 @@ const je = { class: "flex items-center h-[48px] px-3 top-0 bg-b-1 sticky z-20" }
|
|
|
268
270
|
"empty-sidebar-item": t(y).length <= 1
|
|
269
271
|
})
|
|
270
272
|
}, [
|
|
271
|
-
n("div",
|
|
272
|
-
n("div",
|
|
273
|
-
|
|
274
|
-
art: t(
|
|
273
|
+
n("div", Ze, [
|
|
274
|
+
n("div", _e, [
|
|
275
|
+
m(H, {
|
|
276
|
+
art: t(xe),
|
|
275
277
|
class: "font-bold rabbitsit"
|
|
276
278
|
}, null, 8, ["art"]),
|
|
277
|
-
|
|
278
|
-
art: t(
|
|
279
|
+
m(H, {
|
|
280
|
+
art: t(Ie),
|
|
279
281
|
class: "font-bold absolute top-0 left-0 rabbitjump"
|
|
280
282
|
}, null, 8, ["art"])
|
|
281
283
|
]),
|
|
@@ -284,19 +286,19 @@ const je = { class: "flex items-center h-[48px] px-3 top-0 bg-b-1 sticky z-20" }
|
|
|
284
286
|
n("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
285
287
|
], -1))
|
|
286
288
|
]),
|
|
287
|
-
t(l) ? b("", !0) : (r(),
|
|
289
|
+
t(l) ? b("", !0) : (r(), d(t(Ae), {
|
|
288
290
|
key: 0,
|
|
289
291
|
class: f(["mb-1.5 w-full h-fit hidden opacity-0 p-1.5", {
|
|
290
292
|
"flex opacity-100": t(y).length <= 1
|
|
291
293
|
}]),
|
|
292
|
-
onClick:
|
|
294
|
+
onClick: se
|
|
293
295
|
}, {
|
|
294
296
|
default: c(() => e[13] || (e[13] = [
|
|
295
297
|
D(" Import Collection ")
|
|
296
298
|
])),
|
|
297
299
|
_: 1
|
|
298
300
|
}, 8, ["class"])),
|
|
299
|
-
t(l) ? b("", !0) : (r(),
|
|
301
|
+
t(l) ? b("", !0) : (r(), d(De, {
|
|
300
302
|
key: 1,
|
|
301
303
|
click: t(R).commandPalette.emit,
|
|
302
304
|
hotkey: "K"
|
|
@@ -316,18 +318,18 @@ const je = { class: "flex items-center h-[48px] px-3 top-0 bg-b-1 sticky z-20" }
|
|
|
316
318
|
key: "0"
|
|
317
319
|
}
|
|
318
320
|
]), 1032, ["class", "isSidebarOpen"]), [
|
|
319
|
-
[
|
|
321
|
+
[L, s.isSidebarOpen]
|
|
320
322
|
]),
|
|
321
|
-
!t(l) && h ? (r(),
|
|
323
|
+
!t(l) && h ? (r(), d(Te, {
|
|
322
324
|
key: 0,
|
|
323
325
|
menuItem: h,
|
|
324
|
-
onClearDrafts:
|
|
326
|
+
onClearDrafts: de,
|
|
325
327
|
onCloseMenu: e[10] || (e[10] = (o) => h.open = !1),
|
|
326
|
-
onToggleWatchMode:
|
|
328
|
+
onToggleWatchMode: le
|
|
327
329
|
}, null, 8, ["menuItem"])) : b("", !0)
|
|
328
330
|
], 64));
|
|
329
331
|
}
|
|
330
332
|
});
|
|
331
333
|
export {
|
|
332
|
-
|
|
334
|
+
wt as default
|
|
333
335
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./RequestSubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-8291fd64"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -7,7 +7,7 @@ import { useRouter as B } from "vue-router";
|
|
|
7
7
|
import $ from "../../components/OpenApiClientButton.vue.js";
|
|
8
8
|
import { useWorkspace as R } from "../../store/store.js";
|
|
9
9
|
import { useLayout as S } from "../../hooks/useLayout.js";
|
|
10
|
-
const z = { class: "lg:min-h-client-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, A = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-2 lg:flex-1 w-
|
|
10
|
+
const z = { class: "lg:min-h-client-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, A = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-2 lg:flex-1 w-1/2" }, E = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-1/2" }, D = /* @__PURE__ */ V({
|
|
11
11
|
__name: "RequestSubpageHeader",
|
|
12
12
|
props: {
|
|
13
13
|
modelValue: { type: Boolean }
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as s, computed as
|
|
1
|
+
import { defineComponent as s, computed as a, openBlock as l, createBlock as i, withCtx as t, createTextVNode as c, createElementVNode as d, createVNode as p, unref as m } from "vue";
|
|
2
2
|
import x from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
3
|
import { ScalarVirtualText as u } from "@scalar/components";
|
|
4
4
|
import { formatJsonOrYamlString as f } from "@scalar/oas-utils/helpers";
|
|
5
|
-
const
|
|
5
|
+
const w = /* @__PURE__ */ s({
|
|
6
6
|
__name: "ResponseBodyVirtual",
|
|
7
7
|
props: {
|
|
8
8
|
content: {}
|
|
9
9
|
},
|
|
10
10
|
setup(o) {
|
|
11
|
-
const r = o, n =
|
|
12
|
-
return (b, e) => (
|
|
11
|
+
const r = o, n = a(() => f(r.content));
|
|
12
|
+
return (b, e) => (l(), i(x, { class: "!max-h-100% overflow-x-auto response-body-virtual" }, {
|
|
13
13
|
title: t(() => e[0] || (e[0] = [
|
|
14
14
|
c("Body")
|
|
15
15
|
])),
|
|
16
16
|
default: t(() => [
|
|
17
|
-
e[1] || (e[1] = d("div", { class: "
|
|
18
|
-
m(
|
|
19
|
-
containerClass: "custom-scroll scalar-code-block border-1/2 rounded-b flex flex-1
|
|
20
|
-
contentClass: "
|
|
17
|
+
e[1] || (e[1] = d("div", { class: "py-1.5 px-2.5 font-code text-xxs border-1/2 rounded-t border-b-0" }, " This response body is massive! Syntax highlighting won’t work here. ", -1)),
|
|
18
|
+
p(m(u), {
|
|
19
|
+
containerClass: "custom-scroll scalar-code-block border-1/2 rounded-b flex flex-1",
|
|
20
|
+
contentClass: "language-plaintext whitespace-pre font-code text-base",
|
|
21
21
|
lineHeight: 20,
|
|
22
22
|
text: n.value
|
|
23
23
|
}, null, 8, ["text"])
|
|
@@ -27,5 +27,5 @@ const V = /* @__PURE__ */ s({
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
w as default
|
|
31
31
|
};
|
|
@@ -17,7 +17,7 @@ const K = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, A = {
|
|
|
17
17
|
a.commandPalette.emit({ commandName: "Create Request" });
|
|
18
18
|
}, y = (i) => {
|
|
19
19
|
i != null && i.createNew && v.name === "request" && f();
|
|
20
|
-
}, h = "2.2.
|
|
20
|
+
}, h = "2.2.31";
|
|
21
21
|
return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (r(), l("div", K, [
|
|
22
22
|
o("div", {
|
|
23
23
|
class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -7,7 +7,7 @@ import k from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
|
7
7
|
import { httpHeaders as g } from "../../../data/httpHeaders.js";
|
|
8
8
|
const w = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "border-t-1/2 border-b-1/
|
|
10
|
+
class: "border-t-1/2 border-b-1/2 max-h-[calc(100%-32px)] overflow-y-auto"
|
|
11
11
|
}, C = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.31",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -50,6 +50,16 @@
|
|
|
50
50
|
"types": "./dist/views/Request/components/index.d.ts",
|
|
51
51
|
"default": "./dist/views/Request/components/index.js"
|
|
52
52
|
},
|
|
53
|
+
"./views/Request/ResponseSection": {
|
|
54
|
+
"import": "./dist/views/Request/ResponseSection/index.js",
|
|
55
|
+
"types": "./dist/views/Request/ResponseSection/index.d.ts",
|
|
56
|
+
"default": "./dist/views/Request/ResponseSection/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./views/Request/RequestSection": {
|
|
59
|
+
"import": "./dist/views/Request/RequestSection/index.js",
|
|
60
|
+
"types": "./dist/views/Request/RequestSection/index.d.ts",
|
|
61
|
+
"default": "./dist/views/Request/RequestSection/index.js"
|
|
62
|
+
},
|
|
53
63
|
"./views/Request/RequestSection/RequestAuth": {
|
|
54
64
|
"import": "./dist/views/Request/RequestSection/RequestAuth/index.js",
|
|
55
65
|
"types": "./dist/views/Request/RequestSection/RequestAuth/index.d.ts",
|
|
@@ -169,19 +179,19 @@
|
|
|
169
179
|
"whatwg-mimetype": "^4.0.0",
|
|
170
180
|
"yaml": "^2.4.5",
|
|
171
181
|
"zod": "^3.23.8",
|
|
182
|
+
"@scalar/components": "0.13.13",
|
|
172
183
|
"@scalar/draggable": "0.1.8",
|
|
173
|
-
"@scalar/components": "0.13.12",
|
|
174
|
-
"@scalar/import": "0.2.15",
|
|
175
184
|
"@scalar/icons": "0.1.2",
|
|
176
|
-
"@scalar/
|
|
185
|
+
"@scalar/import": "0.2.16",
|
|
186
|
+
"@scalar/oas-utils": "0.2.96",
|
|
177
187
|
"@scalar/object-utils": "1.1.12",
|
|
178
|
-
"@scalar/openapi-parser": "0.10.2",
|
|
179
188
|
"@scalar/openapi-types": "0.1.5",
|
|
180
|
-
"@scalar/
|
|
181
|
-
"@scalar/themes": "0.9.
|
|
189
|
+
"@scalar/openapi-parser": "0.10.3",
|
|
190
|
+
"@scalar/themes": "0.9.59",
|
|
191
|
+
"@scalar/postman-to-openapi": "0.1.19",
|
|
182
192
|
"@scalar/types": "0.0.25",
|
|
183
|
-
"@scalar/use-hooks": "0.1.
|
|
184
|
-
"@scalar/use-codemirror": "0.11.
|
|
193
|
+
"@scalar/use-hooks": "0.1.13",
|
|
194
|
+
"@scalar/use-codemirror": "0.11.57",
|
|
185
195
|
"@scalar/use-toasts": "0.7.8",
|
|
186
196
|
"@scalar/use-tooltip": "1.0.5"
|
|
187
197
|
},
|