@scalar/api-client 2.1.8 → 2.1.10
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 +18 -0
- package/dist/assets/rabbit.ascii.js +11 -0
- package/dist/assets/rabbitjump.ascii.js +11 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +7 -7
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +22 -13
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/IconSelector.vue.js +4 -3
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +10 -10
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue2.js +19 -22
- package/dist/components/SideNav/SideNavLink.vue.d.ts +0 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +19 -21
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +24 -26
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +2 -2
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +19 -17
- package/dist/libs/create-client.d.ts +7 -18
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +1 -1
- package/dist/store/import-spec.d.ts +3 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +34 -26
- package/dist/store/store.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +74 -80
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +86 -92
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +26 -26
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -80
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -45
- 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 +131 -108
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +14 -18
- 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 +8 -5
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +33 -33
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +48 -54
- package/package.json +3 -7
- package/dist/components/Search/SearchButton.vue.d.ts +0 -7
- package/dist/components/Search/SearchButton.vue.d.ts.map +0 -1
- package/dist/components/Search/SearchModal.vue.d.ts +0 -17
- package/dist/components/Search/SearchModal.vue.d.ts.map +0 -1
- package/dist/components/Search/SearchModal.vue.js +0 -7
- package/dist/components/Search/SearchModal.vue2.js +0 -142
- package/dist/components/Search/index.d.ts +0 -3
- package/dist/components/Search/index.d.ts.map +0 -1
- package/dist/components/Search/index.js +0 -4
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.js +0 -31
- package/dist/components/SideNav/WorkspaceProfileIcon.vue3.js +0 -5
- package/dist/components/SubpageHeader.vue.js +0 -7
- package/dist/components/SubpageHeader.vue2.js +0 -34
|
@@ -1,142 +1,148 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import ce from "
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
|
|
1
|
+
import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as i, unref as e, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as s, isRef as te, withKeys as v, withModifiers as u, createBlock as c, renderList as D, createTextVNode as $, toDisplayString as oe, createCommentVNode as B, vShow as re, pushScopeId as se, popScopeId as ae } from "vue";
|
|
2
|
+
import ie from "../../assets/rabbit.ascii.js";
|
|
3
|
+
import ne from "../../assets/rabbitjump.ascii.js";
|
|
4
|
+
import le from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
5
|
+
import V from "../../components/ScalarAsciiArt.vue.js";
|
|
6
|
+
import { useSearch as de } from "../../components/Search/useSearch.js";
|
|
7
|
+
import me from "../../components/Sidebar/SidebarButton.vue.js";
|
|
8
|
+
import pe from "./RequestSidebarItemMenu.vue.js";
|
|
9
|
+
import { dragHandlerFactory as ue } from "./handle-drag.js";
|
|
10
|
+
import { ScalarSearchInput as ce, ScalarSearchResultList as fe, ScalarSearchResultItem as be, ScalarIcon as he } from "@scalar/components";
|
|
11
|
+
import { LibraryIcon as Se } from "@scalar/icons";
|
|
12
|
+
import ve from "./RequestSidebarItem.vue.js";
|
|
13
|
+
import Re from "../../components/Sidebar/Sidebar.vue.js";
|
|
14
|
+
import we from "./components/WorkspaceDropdown.vue.js";
|
|
15
|
+
import { useSidebar as ye } from "../../hooks/useSidebar.js";
|
|
16
|
+
import { useWorkspace as ge } from "../../store/store.js";
|
|
17
|
+
import { hotKeyBus as q } from "../../libs/event-busses/hot-keys-bus.js";
|
|
18
|
+
import { commandPaletteBus as P } from "../../libs/event-busses/command-palette-bus.js";
|
|
19
|
+
const ke = (m) => (se("data-v-07523d65"), m = m(), ae(), m), Ie = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, xe = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, Ce = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, De = /* @__PURE__ */ ke(() => /* @__PURE__ */ s("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
|
|
20
|
+
/* @__PURE__ */ s("b", { class: "font-medium" }, "Let's Get Started"),
|
|
21
|
+
/* @__PURE__ */ s("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI, Postman or Insomnia ")
|
|
22
|
+
], -1)), je = /* @__PURE__ */ J({
|
|
17
23
|
__name: "RequestSidebar",
|
|
18
24
|
props: {
|
|
19
25
|
showSidebar: { type: Boolean },
|
|
20
26
|
isReadonly: { type: Boolean }
|
|
21
27
|
},
|
|
22
28
|
emits: ["update:showSidebar", "newTab"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
activeWorkspaceCollections:
|
|
26
|
-
activeRequest:
|
|
27
|
-
activeWorkspaceRequests:
|
|
28
|
-
findRequestParents:
|
|
29
|
-
isReadOnly:
|
|
30
|
-
} =
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
setup(m, { emit: E }) {
|
|
30
|
+
const F = m, R = E, w = ge(), {
|
|
31
|
+
activeWorkspaceCollections: M,
|
|
32
|
+
activeRequest: O,
|
|
33
|
+
activeWorkspaceRequests: y,
|
|
34
|
+
findRequestParents: z,
|
|
35
|
+
isReadOnly: N
|
|
36
|
+
} = w, { handleDragEnd: T, isDroppable: A } = ue(w), { collapsedSidebarFolders: K, setCollapsedSidebarFolder: L } = ye(), p = Q({ open: !1 });
|
|
37
|
+
X(
|
|
38
|
+
O,
|
|
33
39
|
(r) => {
|
|
34
|
-
r &&
|
|
35
|
-
(
|
|
40
|
+
r && z(r).forEach(
|
|
41
|
+
(t) => L(t, !0)
|
|
36
42
|
);
|
|
37
43
|
},
|
|
38
44
|
{ immediate: !0 }
|
|
39
45
|
);
|
|
40
46
|
const {
|
|
41
|
-
searchText:
|
|
42
|
-
searchResultsWithPlaceholderResults:
|
|
43
|
-
selectedSearchResult:
|
|
44
|
-
onSearchResultClick:
|
|
45
|
-
fuseSearch:
|
|
46
|
-
searchInputRef:
|
|
47
|
-
searchResultRefs:
|
|
48
|
-
navigateSearchResults:
|
|
47
|
+
searchText: f,
|
|
48
|
+
searchResultsWithPlaceholderResults: g,
|
|
49
|
+
selectedSearchResult: k,
|
|
50
|
+
onSearchResultClick: U,
|
|
51
|
+
fuseSearch: W,
|
|
52
|
+
searchInputRef: I,
|
|
53
|
+
searchResultRefs: H,
|
|
54
|
+
navigateSearchResults: x,
|
|
49
55
|
selectSearchResult: j
|
|
50
|
-
} =
|
|
51
|
-
var
|
|
52
|
-
r.toggleSidebar &&
|
|
56
|
+
} = de(), C = (r) => {
|
|
57
|
+
var t;
|
|
58
|
+
r.toggleSidebar && R("update:showSidebar", F.showSidebar), r.openCommandPalette && (r.openCommandPalette.preventDefault(), P.emit()), r.focusRequestSearch && ((t = I.value) == null || t.focus());
|
|
53
59
|
};
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
}), (r,
|
|
57
|
-
|
|
58
|
-
class:
|
|
60
|
+
return Y(() => q.on(C)), Z(() => {
|
|
61
|
+
q.off(C);
|
|
62
|
+
}), (r, t) => (a(), h(S, null, [
|
|
63
|
+
_(i(e(Re), {
|
|
64
|
+
class: b([r.showSidebar ? "sidebar-active-width" : ""]),
|
|
59
65
|
showSidebar: r.showSidebar,
|
|
60
|
-
"onUpdate:showSidebar":
|
|
61
|
-
},
|
|
62
|
-
content:
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
"onUpdate:showSidebar": t[8] || (t[8] = (o) => r.$emit("update:showSidebar", o))
|
|
67
|
+
}, ee({
|
|
68
|
+
content: n(() => [
|
|
69
|
+
s("div", Ie, [
|
|
70
|
+
i(e(ce), {
|
|
65
71
|
ref_key: "searchInputRef",
|
|
66
|
-
ref:
|
|
67
|
-
modelValue:
|
|
68
|
-
"onUpdate:modelValue":
|
|
72
|
+
ref: I,
|
|
73
|
+
modelValue: e(f),
|
|
74
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => te(f) ? f.value = o : null),
|
|
69
75
|
sidebar: "",
|
|
70
|
-
onInput:
|
|
76
|
+
onInput: e(W),
|
|
71
77
|
onKeydown: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
t[1] || (t[1] = v(u((o) => e(x)("down"), ["stop"]), ["down"])),
|
|
79
|
+
t[2] || (t[2] = v(u((o) => e(j)(), ["stop"]), ["enter"])),
|
|
80
|
+
t[3] || (t[3] = v(u((o) => e(x)("up"), ["stop"]), ["up"]))
|
|
75
81
|
]
|
|
76
82
|
}, null, 8, ["modelValue", "onInput"])
|
|
77
83
|
]),
|
|
78
|
-
|
|
79
|
-
class:
|
|
84
|
+
s("div", {
|
|
85
|
+
class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
80
86
|
"pb-14": !r.isReadonly
|
|
81
87
|
}]),
|
|
82
|
-
onDragenter:
|
|
88
|
+
onDragenter: t[6] || (t[6] = u(() => {
|
|
83
89
|
}, ["prevent"])),
|
|
84
|
-
onDragover:
|
|
90
|
+
onDragover: t[7] || (t[7] = u(() => {
|
|
85
91
|
}, ["prevent"]))
|
|
86
92
|
}, [
|
|
87
|
-
|
|
93
|
+
e(f) ? (a(), c(e(fe), {
|
|
88
94
|
key: 0,
|
|
89
95
|
class: "gap-px custom-scroll",
|
|
90
|
-
noResults: !
|
|
96
|
+
noResults: !e(g).length
|
|
91
97
|
}, {
|
|
92
|
-
default:
|
|
93
|
-
(
|
|
98
|
+
default: n(() => [
|
|
99
|
+
(a(!0), h(S, null, D(e(g), (o, d) => (a(), c(e(be), {
|
|
94
100
|
id: `#search-input-${o.item.id}`,
|
|
95
101
|
key: o.refIndex,
|
|
96
102
|
ref_for: !0,
|
|
97
|
-
ref: (
|
|
98
|
-
active:
|
|
103
|
+
ref: (l) => e(H)[d] = l,
|
|
104
|
+
active: e(k) === d,
|
|
99
105
|
class: "px-2",
|
|
100
|
-
onClick: (
|
|
101
|
-
onFocus: (
|
|
106
|
+
onClick: (l) => e(U)(o),
|
|
107
|
+
onFocus: (l) => k.value = d
|
|
102
108
|
}, {
|
|
103
|
-
addon:
|
|
104
|
-
|
|
109
|
+
addon: n(() => [
|
|
110
|
+
i(le, {
|
|
105
111
|
class: "font-bold",
|
|
106
112
|
method: o.item.httpVerb ?? "get"
|
|
107
113
|
}, null, 8, ["method"])
|
|
108
114
|
]),
|
|
109
|
-
default:
|
|
110
|
-
|
|
115
|
+
default: n(() => [
|
|
116
|
+
$(oe(o.item.title) + " ", 1)
|
|
111
117
|
]),
|
|
112
118
|
_: 2
|
|
113
119
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
114
120
|
]),
|
|
115
121
|
_: 1
|
|
116
|
-
}, 8, ["noResults"])) : (
|
|
117
|
-
var
|
|
118
|
-
return
|
|
122
|
+
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, D(e(M), (o) => {
|
|
123
|
+
var d;
|
|
124
|
+
return a(), c(ve, {
|
|
119
125
|
key: o.uid,
|
|
120
|
-
isDraggable: !r.isReadonly && ((
|
|
121
|
-
isDroppable:
|
|
122
|
-
menuItem:
|
|
126
|
+
isDraggable: !r.isReadonly && ((d = o.info) == null ? void 0 : d.title) !== "Drafts",
|
|
127
|
+
isDroppable: e(A),
|
|
128
|
+
menuItem: p,
|
|
123
129
|
parentUids: [],
|
|
124
130
|
uid: o.uid,
|
|
125
|
-
onNewTab:
|
|
126
|
-
onOnDragEnd:
|
|
127
|
-
onOpenMenu:
|
|
131
|
+
onNewTab: t[4] || (t[4] = (l, G) => R("newTab", { name: l, uid: G })),
|
|
132
|
+
onOnDragEnd: e(T),
|
|
133
|
+
onOpenMenu: t[5] || (t[5] = (l) => Object.assign(p, l))
|
|
128
134
|
}, {
|
|
129
|
-
leftIcon:
|
|
130
|
-
|
|
131
|
-
class: "text-sidebar-c-2 size-3.5 group-hover:hidden",
|
|
135
|
+
leftIcon: n(() => [
|
|
136
|
+
i(e(Se), {
|
|
137
|
+
class: "text-sidebar-c-2 size-3.5 stroke-[2.5] group-hover:hidden",
|
|
132
138
|
src: o["x-scalar-icon"] || "interface-content-folder"
|
|
133
139
|
}, null, 8, ["src"]),
|
|
134
|
-
|
|
135
|
-
class:
|
|
136
|
-
"rotate-90":
|
|
140
|
+
s("div", {
|
|
141
|
+
class: b({
|
|
142
|
+
"rotate-90": e(K)[o.uid]
|
|
137
143
|
})
|
|
138
144
|
}, [
|
|
139
|
-
|
|
145
|
+
i(e(he), {
|
|
140
146
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
141
147
|
icon: "ChevronRight",
|
|
142
148
|
size: "sm"
|
|
@@ -148,40 +154,57 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
148
154
|
}), 128))
|
|
149
155
|
], 34)
|
|
150
156
|
]),
|
|
151
|
-
button:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
button: n(() => [
|
|
158
|
+
s("div", {
|
|
159
|
+
class: b(["relative z-10 pt-0 md:px-2.5 md:pb-2.5 -translate-y-full w-[inherit]", {
|
|
160
|
+
"empty-sidebar-item": e(y).length <= 1,
|
|
161
|
+
"border-t-1/2": e(y).length <= 1
|
|
162
|
+
}])
|
|
163
|
+
}, [
|
|
164
|
+
s("div", xe, [
|
|
165
|
+
s("div", Ce, [
|
|
166
|
+
i(V, {
|
|
167
|
+
art: e(ie),
|
|
168
|
+
class: "font-bold rabbitsit"
|
|
169
|
+
}, null, 8, ["art"]),
|
|
170
|
+
i(V, {
|
|
171
|
+
art: e(ne),
|
|
172
|
+
class: "font-bold absolute top-0 left-0 rabbitjump"
|
|
173
|
+
}, null, 8, ["art"])
|
|
174
|
+
]),
|
|
175
|
+
De
|
|
161
176
|
]),
|
|
162
|
-
|
|
163
|
-
|
|
177
|
+
r.isReadonly ? B("", !0) : (a(), c(me, {
|
|
178
|
+
key: 0,
|
|
179
|
+
click: e(P).emit
|
|
180
|
+
}, {
|
|
181
|
+
title: n(() => [
|
|
182
|
+
$("Add Item")
|
|
183
|
+
]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, ["click"]))
|
|
186
|
+
], 2)
|
|
164
187
|
]),
|
|
165
188
|
_: 2
|
|
166
189
|
}, [
|
|
167
190
|
r.isReadonly ? void 0 : {
|
|
168
191
|
name: "header",
|
|
169
|
-
fn:
|
|
170
|
-
|
|
192
|
+
fn: n(() => [
|
|
193
|
+
i(e(we))
|
|
171
194
|
]),
|
|
172
195
|
key: "0"
|
|
173
196
|
}
|
|
174
197
|
]), 1032, ["class", "showSidebar"]), [
|
|
175
|
-
[
|
|
198
|
+
[re, r.showSidebar]
|
|
176
199
|
]),
|
|
177
|
-
!
|
|
200
|
+
!e(N) && p ? (a(), c(pe, {
|
|
178
201
|
key: 0,
|
|
179
|
-
menuItem:
|
|
180
|
-
onCloseMenu:
|
|
181
|
-
}, null, 8, ["menuItem"])) :
|
|
202
|
+
menuItem: p,
|
|
203
|
+
onCloseMenu: t[9] || (t[9] = (o) => p.open = !1)
|
|
204
|
+
}, null, 8, ["menuItem"])) : B("", !0)
|
|
182
205
|
], 64));
|
|
183
206
|
}
|
|
184
207
|
});
|
|
185
208
|
export {
|
|
186
|
-
|
|
209
|
+
je as default
|
|
187
210
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, ref as U, computed as
|
|
1
|
+
import { defineComponent as x, ref as U, computed as n, openBlock as r, createBlock as u, createSlots as L, withCtx as p, createTextVNode as w, toDisplayString as g, createElementBlock as V, createElementVNode as b, createCommentVNode as i, createVNode as j } from "vue";
|
|
2
2
|
import O from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
3
|
import T from "whatwg-mimetype";
|
|
4
4
|
import C from "./ResponseBodyDownload.vue.js";
|
|
@@ -18,51 +18,51 @@ const D = {
|
|
|
18
18
|
headers: {}
|
|
19
19
|
},
|
|
20
20
|
setup(h) {
|
|
21
|
-
const a = h, _ = (e) => e instanceof Blob,
|
|
21
|
+
const a = h, _ = (e) => e instanceof Blob, c = U(!0), m = n(
|
|
22
22
|
() => {
|
|
23
23
|
var e;
|
|
24
24
|
return !!((e = t.value) != null && e.raw && t.value.preview);
|
|
25
25
|
}
|
|
26
|
-
), B =
|
|
26
|
+
), B = n(() => c.value || !m.value), R = n(() => !c.value || !m.value), o = n(() => {
|
|
27
27
|
var s;
|
|
28
|
-
const e = ((s = a.headers.find((
|
|
28
|
+
const e = ((s = a.headers.find((d) => d.name.toLowerCase() === "content-type")) == null ? void 0 : s.value) ?? "";
|
|
29
29
|
return new T(e);
|
|
30
|
-
}), t =
|
|
30
|
+
}), t = n(() => E[o.value.essence]), l = n(() => _(a.data) ? URL.createObjectURL(a.data) : typeof a.data == "string" ? URL.createObjectURL(
|
|
31
31
|
new Blob([a.data], { type: o.value.toString() })
|
|
32
32
|
) : a.data instanceof Object && Object.keys(a.data).length ? URL.createObjectURL(
|
|
33
33
|
new Blob([JSON.stringify(a.data)], {
|
|
34
34
|
type: o.value.toString()
|
|
35
35
|
})
|
|
36
36
|
) : "");
|
|
37
|
-
return (e, s) => (
|
|
37
|
+
return (e, s) => (r(), u(O, null, L({
|
|
38
38
|
title: p(() => [
|
|
39
39
|
w(g(e.title), 1)
|
|
40
40
|
]),
|
|
41
41
|
default: p(() => {
|
|
42
|
-
var
|
|
42
|
+
var d, v, f, y;
|
|
43
43
|
return [
|
|
44
|
-
e.data ? (
|
|
44
|
+
e.data ? (r(), V("div", D, [
|
|
45
45
|
b("div", I, [
|
|
46
46
|
b("span", J, g(o.value.essence), 1),
|
|
47
|
-
m.value ? (
|
|
47
|
+
m.value ? (r(), u($, {
|
|
48
48
|
key: 0,
|
|
49
|
-
modelValue:
|
|
50
|
-
"onUpdate:modelValue": s[0] || (s[0] = (k) =>
|
|
49
|
+
modelValue: c.value,
|
|
50
|
+
"onUpdate:modelValue": s[0] || (s[0] = (k) => c.value = k)
|
|
51
51
|
}, null, 8, ["modelValue"])) : i("", !0)
|
|
52
52
|
]),
|
|
53
|
-
(
|
|
54
|
-
key:
|
|
55
|
-
|
|
53
|
+
(d = t.value) != null && d.raw && R.value ? (r(), u(P, {
|
|
54
|
+
key: l.value,
|
|
55
|
+
content: e.data,
|
|
56
56
|
language: t.value.language
|
|
57
|
-
}, null, 8, ["
|
|
58
|
-
(v = t.value) != null && v.preview && B.value ? (
|
|
59
|
-
key:
|
|
57
|
+
}, null, 8, ["content", "language"])) : i("", !0),
|
|
58
|
+
(v = t.value) != null && v.preview && B.value ? (r(), u(S, {
|
|
59
|
+
key: l.value,
|
|
60
60
|
alpha: t.value.alpha,
|
|
61
61
|
mode: t.value.preview,
|
|
62
|
-
src:
|
|
62
|
+
src: l.value,
|
|
63
63
|
type: o.value.essence
|
|
64
64
|
}, null, 8, ["alpha", "mode", "src", "type"])) : i("", !0),
|
|
65
|
-
!((f = t.value) != null && f.raw) && !((y = t.value) != null && y.preview) ? (
|
|
65
|
+
!((f = t.value) != null && f.raw) && !((y = t.value) != null && y.preview) ? (r(), u(N, { key: 2 }, {
|
|
66
66
|
default: p(() => [
|
|
67
67
|
w(" Binary file ")
|
|
68
68
|
]),
|
|
@@ -73,11 +73,11 @@ const D = {
|
|
|
73
73
|
}),
|
|
74
74
|
_: 2
|
|
75
75
|
}, [
|
|
76
|
-
e.data &&
|
|
76
|
+
e.data && l.value ? {
|
|
77
77
|
name: "actions",
|
|
78
78
|
fn: p(() => [
|
|
79
79
|
j(C, {
|
|
80
|
-
href:
|
|
80
|
+
href: l.value,
|
|
81
81
|
type: o.value.essence
|
|
82
82
|
}, null, 8, ["href", "type"])
|
|
83
83
|
]),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type CodeMirrorLanguage } from '@scalar/use-codemirror';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
-
|
|
3
|
+
content: any;
|
|
4
4
|
language?: CodeMirrorLanguage;
|
|
5
5
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
6
|
-
|
|
6
|
+
content: any;
|
|
7
7
|
language?: CodeMirrorLanguage;
|
|
8
8
|
}>>>, {}, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAuCA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,wBAAwB,CAAA;;aAMpE,GAAG;eACD,kBAAkB;;aADpB,GAAG;eACD,kBAAkB;;AAgE/B,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,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseBodyRaw.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b7d4ba6e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarCodeBlock as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const J = /* @__PURE__ */ a({
|
|
1
|
+
import { defineComponent as t, ref as a, openBlock as c, createBlock as l, unref as u } from "vue";
|
|
2
|
+
import { ScalarCodeBlock as p } from "@scalar/components";
|
|
3
|
+
import { useCodeMirror as s } from "@scalar/use-codemirror";
|
|
4
|
+
const d = /* @__PURE__ */ t({
|
|
6
5
|
__name: "ResponseBodyRaw",
|
|
7
6
|
props: {
|
|
8
|
-
|
|
7
|
+
content: {},
|
|
9
8
|
language: {}
|
|
10
9
|
},
|
|
11
10
|
setup(o) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
return m({
|
|
17
|
-
codeMirrorRef: t,
|
|
11
|
+
const e = o, r = a(null);
|
|
12
|
+
return s({
|
|
13
|
+
codeMirrorRef: r,
|
|
18
14
|
readOnly: !0,
|
|
19
15
|
lineNumbers: !0,
|
|
20
|
-
content:
|
|
21
|
-
language:
|
|
22
|
-
}), (
|
|
23
|
-
content:
|
|
24
|
-
lang:
|
|
16
|
+
content: e.content,
|
|
17
|
+
language: e.language
|
|
18
|
+
}), (n, g) => (c(), l(u(p), {
|
|
19
|
+
content: n.content,
|
|
20
|
+
lang: n.language
|
|
25
21
|
}, null, 8, ["content", "lang"]));
|
|
26
22
|
}
|
|
27
23
|
});
|
|
28
24
|
export {
|
|
29
|
-
|
|
25
|
+
d as default
|
|
30
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAmOA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseEmpty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-54db086c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -6,7 +6,7 @@ import { useWorkspace as g } from "../../../store/store.js";
|
|
|
6
6
|
import { hotKeyBus as d } from "../../../libs/event-busses/hot-keys-bus.js";
|
|
7
7
|
import { executeRequestBus as N } from "../../../libs/event-busses/execute-request-bus.js";
|
|
8
8
|
import { commandPaletteBus as q } from "../../../libs/event-busses/command-palette-bus.js";
|
|
9
|
-
const f = (t) => (R("data-v-
|
|
9
|
+
const f = (t) => (R("data-v-54db086c"), t = t(), v(), t), B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, S = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, V = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "scalar-version-number"
|
|
12
12
|
}, w = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Alpha", -1)), A = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
|
|
@@ -19,10 +19,10 @@ const f = (t) => (R("data-v-c180e370"), t = t(), v(), t), B = { class: "relative
|
|
|
19
19
|
setup(t) {
|
|
20
20
|
const { isReadOnly: _, activeWorkspace: h } = g(), r = () => {
|
|
21
21
|
q.emit({ commandName: "Create Request" });
|
|
22
|
-
},
|
|
23
|
-
|
|
22
|
+
}, l = (m) => {
|
|
23
|
+
m.openCommandPaletteRequest && r();
|
|
24
24
|
};
|
|
25
|
-
return y(() => d.on(
|
|
25
|
+
return y(() => d.on(l)), k(() => d.off(l)), (m, i) => (a(), c("div", B, [
|
|
26
26
|
e("div", S, [
|
|
27
27
|
o(h).isReadOnly ? p("", !0) : (a(), c("div", V, [
|
|
28
28
|
s(" Scalar V1.0.6 "),
|
|
@@ -30,7 +30,10 @@ const f = (t) => (R("data-v-c180e370"), t = t(), v(), t), B = { class: "relative
|
|
|
30
30
|
s(" Release "),
|
|
31
31
|
A
|
|
32
32
|
])),
|
|
33
|
-
n(C, {
|
|
33
|
+
n(C, {
|
|
34
|
+
art: o(b),
|
|
35
|
+
class: "text-c-3"
|
|
36
|
+
}, null, 8, ["art"])
|
|
34
37
|
]),
|
|
35
38
|
e("div", E, [
|
|
36
39
|
e("button", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAS3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAS3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AA4NxC,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"}
|