@scalar/api-client 2.1.13 → 2.1.14
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 +8 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +4 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +29 -24
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +90 -49
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +25 -20
- package/dist/libs/getOpenApiDocumentVersion.d.ts +8 -0
- package/dist/libs/getOpenApiDocumentVersion.d.ts.map +1 -0
- package/dist/libs/getOpenApiDocumentVersion.js +20 -0
- package/dist/libs/index.d.ts +3 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +29 -23
- package/dist/libs/isDocument.d.ts +3 -0
- package/dist/libs/isDocument.d.ts.map +1 -0
- package/dist/libs/isDocument.js +7 -0
- package/dist/libs/isUrl.d.ts +3 -0
- package/dist/libs/isUrl.d.ts.map +1 -0
- package/dist/libs/isUrl.js +6 -0
- package/dist/libs/send-request.js +41 -41
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +49 -50
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAoVe,OAAO;gBACR,OAAO;;;;cAMkB,MAAM;aAAO,MAAM;;;iBAP3C,OAAO;gBACR,OAAO;;;cAMkB,MAAM;aAAO,MAAM;;;;AAgmB1D,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
|
-
import
|
|
1
|
+
import e from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-8ce3ee0b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as l, unref as e, normalizeClass as b, createSlots as te, withCtx as n, createElementVNode as i, isRef as oe, withKeys as v, withModifiers as c, createBlock as d, renderList as
|
|
1
|
+
import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as l, unref as e, normalizeClass as b, createSlots as te, withCtx as n, createElementVNode as i, isRef as oe, withKeys as v, withModifiers as c, createBlock as d, renderList as C, createTextVNode as D, toDisplayString as re, createCommentVNode as $, vShow as se, pushScopeId as ae, popScopeId as ie } from "vue";
|
|
2
2
|
import ne from "../../assets/rabbit.ascii.js";
|
|
3
3
|
import le from "../../assets/rabbitjump.ascii.js";
|
|
4
4
|
import de from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { useSearch as
|
|
7
|
-
import
|
|
5
|
+
import B from "../../components/ScalarAsciiArt.vue.js";
|
|
6
|
+
import { useSearch as me } from "../../components/Search/useSearch.js";
|
|
7
|
+
import pe from "../../components/Sidebar/SidebarButton.vue.js";
|
|
8
8
|
import ue from "./RequestSidebarItemMenu.vue.js";
|
|
9
9
|
import { dragHandlerFactory as ce } from "./handle-drag.js";
|
|
10
|
-
import { ScalarSearchInput as fe, ScalarSearchResultList as be, ScalarSearchResultItem as he, ScalarIcon as
|
|
10
|
+
import { ScalarSearchInput as fe, ScalarSearchResultList as be, ScalarSearchResultItem as he, ScalarIcon as V } from "@scalar/components";
|
|
11
11
|
import { LibraryIcon as Se } from "@scalar/icons";
|
|
12
12
|
import ve from "./RequestSidebarItem.vue.js";
|
|
13
13
|
import Re from "../../components/Sidebar/Sidebar.vue.js";
|
|
14
14
|
import we from "./components/WorkspaceDropdown.vue.js";
|
|
15
15
|
import { useSidebar as ye } from "../../hooks/useSidebar.js";
|
|
16
16
|
import { useWorkspace as ke } from "../../store/store.js";
|
|
17
|
-
import { hotKeyBus as
|
|
18
|
-
import { commandPaletteBus as
|
|
19
|
-
const ge = (
|
|
17
|
+
import { hotKeyBus as q } from "../../libs/event-busses/hot-keys-bus.js";
|
|
18
|
+
import { commandPaletteBus as E } from "../../libs/event-busses/command-palette-bus.js";
|
|
19
|
+
const ge = (p) => (ae("data-v-8ce3ee0b"), p = p(), ie(), p), 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__ */ ge(() => /* @__PURE__ */ i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
|
|
20
20
|
/* @__PURE__ */ i("b", { class: "font-medium" }, "Let's Get Started"),
|
|
21
21
|
/* @__PURE__ */ i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
|
|
22
22
|
], -1)), je = /* @__PURE__ */ Q({
|
|
@@ -26,18 +26,18 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
26
26
|
isReadonly: { type: Boolean }
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:showSidebar", "newTab"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
activeWorkspaceCollections:
|
|
32
|
-
activeRequest:
|
|
33
|
-
activeWorkspaceRequests:
|
|
34
|
-
findRequestParents:
|
|
35
|
-
isReadOnly:
|
|
29
|
+
setup(p, { emit: F }) {
|
|
30
|
+
const M = p, R = F, w = ke(), {
|
|
31
|
+
activeWorkspaceCollections: O,
|
|
32
|
+
activeRequest: P,
|
|
33
|
+
activeWorkspaceRequests: N,
|
|
34
|
+
findRequestParents: T,
|
|
35
|
+
isReadOnly: z
|
|
36
36
|
} = w, { handleDragEnd: A, isDroppable: K } = ce(w), { collapsedSidebarFolders: L, setCollapsedSidebarFolder: U } = ye(), u = X({ open: !1 });
|
|
37
37
|
Y(
|
|
38
|
-
|
|
38
|
+
P,
|
|
39
39
|
(r) => {
|
|
40
|
-
r &&
|
|
40
|
+
r && T(r).forEach(
|
|
41
41
|
(t) => U(t, !0)
|
|
42
42
|
);
|
|
43
43
|
},
|
|
@@ -45,20 +45,20 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
45
45
|
);
|
|
46
46
|
const {
|
|
47
47
|
searchText: f,
|
|
48
|
-
searchResultsWithPlaceholderResults:
|
|
49
|
-
selectedSearchResult:
|
|
48
|
+
searchResultsWithPlaceholderResults: y,
|
|
49
|
+
selectedSearchResult: k,
|
|
50
50
|
onSearchResultClick: W,
|
|
51
51
|
fuseSearch: H,
|
|
52
|
-
searchInputRef:
|
|
52
|
+
searchInputRef: g,
|
|
53
53
|
searchResultRefs: j,
|
|
54
|
-
navigateSearchResults:
|
|
54
|
+
navigateSearchResults: I,
|
|
55
55
|
selectSearchResult: G
|
|
56
|
-
} =
|
|
56
|
+
} = me(), x = (r) => {
|
|
57
57
|
var t;
|
|
58
|
-
r.toggleSidebar && R("update:showSidebar",
|
|
58
|
+
r.toggleSidebar && R("update:showSidebar", M.showSidebar), r.openCommandPalette && (r.openCommandPalette.preventDefault(), E.emit()), r.focusRequestSearch && ((t = g.value) == null || t.focus());
|
|
59
59
|
};
|
|
60
|
-
return Z(() =>
|
|
61
|
-
|
|
60
|
+
return Z(() => q.on(x)), _(() => {
|
|
61
|
+
q.off(x);
|
|
62
62
|
}), (r, t) => (a(), h(S, null, [
|
|
63
63
|
ee(l(e(Re), {
|
|
64
64
|
class: b([r.showSidebar ? "sidebar-active-width" : ""]),
|
|
@@ -69,15 +69,15 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
69
69
|
i("div", Ie, [
|
|
70
70
|
l(e(fe), {
|
|
71
71
|
ref_key: "searchInputRef",
|
|
72
|
-
ref:
|
|
72
|
+
ref: g,
|
|
73
73
|
modelValue: e(f),
|
|
74
74
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => oe(f) ? f.value = o : null),
|
|
75
75
|
sidebar: "",
|
|
76
76
|
onInput: e(H),
|
|
77
77
|
onKeydown: [
|
|
78
|
-
t[1] || (t[1] = v(c((o) => e(
|
|
78
|
+
t[1] || (t[1] = v(c((o) => e(I)("down"), ["stop"]), ["down"])),
|
|
79
79
|
t[2] || (t[2] = v(c((o) => e(G)(), ["stop"]), ["enter"])),
|
|
80
|
-
t[3] || (t[3] = v(c((o) => e(
|
|
80
|
+
t[3] || (t[3] = v(c((o) => e(I)("up"), ["stop"]), ["up"]))
|
|
81
81
|
]
|
|
82
82
|
}, null, 8, ["modelValue", "onInput"])
|
|
83
83
|
]),
|
|
@@ -93,18 +93,18 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
93
93
|
e(f) ? (a(), d(e(be), {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "gap-px custom-scroll",
|
|
96
|
-
noResults: !e(
|
|
96
|
+
noResults: !e(y).length
|
|
97
97
|
}, {
|
|
98
98
|
default: n(() => [
|
|
99
|
-
(a(!0), h(S, null,
|
|
99
|
+
(a(!0), h(S, null, C(e(y), (o, m) => (a(), d(e(he), {
|
|
100
100
|
id: `#search-input-${o.item.id}`,
|
|
101
101
|
key: o.refIndex,
|
|
102
102
|
ref_for: !0,
|
|
103
|
-
ref: (s) => e(j)[
|
|
104
|
-
active: e(
|
|
103
|
+
ref: (s) => e(j)[m] = s,
|
|
104
|
+
active: e(k) === m,
|
|
105
105
|
class: "px-2",
|
|
106
106
|
onClick: (s) => e(W)(o),
|
|
107
|
-
onFocus: (s) =>
|
|
107
|
+
onFocus: (s) => k.value = m
|
|
108
108
|
}, {
|
|
109
109
|
addon: n(() => [
|
|
110
110
|
l(de, {
|
|
@@ -113,17 +113,17 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
113
113
|
}, null, 8, ["method"])
|
|
114
114
|
]),
|
|
115
115
|
default: n(() => [
|
|
116
|
-
|
|
116
|
+
D(re(o.item.title) + " ", 1)
|
|
117
117
|
]),
|
|
118
118
|
_: 2
|
|
119
119
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
120
120
|
]),
|
|
121
121
|
_: 1
|
|
122
|
-
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 },
|
|
123
|
-
var
|
|
122
|
+
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, C(e(O), (o) => {
|
|
123
|
+
var m;
|
|
124
124
|
return a(), d(ve, {
|
|
125
125
|
key: o.uid,
|
|
126
|
-
isDraggable: !r.isReadonly && ((
|
|
126
|
+
isDraggable: !r.isReadonly && ((m = o.info) == null ? void 0 : m.title) !== "Drafts",
|
|
127
127
|
isDroppable: e(K),
|
|
128
128
|
menuItem: u,
|
|
129
129
|
parentUids: [],
|
|
@@ -135,7 +135,7 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
135
135
|
leftIcon: n(() => {
|
|
136
136
|
var s;
|
|
137
137
|
return [
|
|
138
|
-
((s = o.info) == null ? void 0 : s.title) === "Drafts" ? (a(), d(e(
|
|
138
|
+
((s = o.info) == null ? void 0 : s.title) === "Drafts" ? (a(), d(e(V), {
|
|
139
139
|
key: 0,
|
|
140
140
|
class: "text-sidebar-c-2 group-hover:hidden",
|
|
141
141
|
icon: "Scribble",
|
|
@@ -150,7 +150,7 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
150
150
|
"rotate-90": e(L)[o.uid]
|
|
151
151
|
})
|
|
152
152
|
}, [
|
|
153
|
-
l(e(
|
|
153
|
+
l(e(V), {
|
|
154
154
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
155
155
|
icon: "ChevronRight",
|
|
156
156
|
size: "sm"
|
|
@@ -165,30 +165,29 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
165
165
|
]),
|
|
166
166
|
button: n(() => [
|
|
167
167
|
i("div", {
|
|
168
|
-
class: b(
|
|
169
|
-
"empty-sidebar-item": e(
|
|
170
|
-
|
|
171
|
-
}])
|
|
168
|
+
class: b({
|
|
169
|
+
"empty-sidebar-item": e(N).length <= 1
|
|
170
|
+
})
|
|
172
171
|
}, [
|
|
173
172
|
i("div", xe, [
|
|
174
173
|
i("div", Ce, [
|
|
175
|
-
l(
|
|
174
|
+
l(B, {
|
|
176
175
|
art: e(ne),
|
|
177
176
|
class: "font-bold rabbitsit"
|
|
178
177
|
}, null, 8, ["art"]),
|
|
179
|
-
l(
|
|
178
|
+
l(B, {
|
|
180
179
|
art: e(le),
|
|
181
180
|
class: "font-bold absolute top-0 left-0 rabbitjump"
|
|
182
181
|
}, null, 8, ["art"])
|
|
183
182
|
]),
|
|
184
183
|
De
|
|
185
184
|
]),
|
|
186
|
-
r.isReadonly ?
|
|
185
|
+
r.isReadonly ? $("", !0) : (a(), d(pe, {
|
|
187
186
|
key: 0,
|
|
188
|
-
click: e(
|
|
187
|
+
click: e(E).emit
|
|
189
188
|
}, {
|
|
190
189
|
title: n(() => [
|
|
191
|
-
|
|
190
|
+
D("Add Item")
|
|
192
191
|
]),
|
|
193
192
|
_: 1
|
|
194
193
|
}, 8, ["click"]))
|
|
@@ -206,11 +205,11 @@ const ge = (m) => (ae("data-v-e83264ab"), m = m(), ie(), m), Ie = { class: "sear
|
|
|
206
205
|
]), 1032, ["class", "showSidebar"]), [
|
|
207
206
|
[se, r.showSidebar]
|
|
208
207
|
]),
|
|
209
|
-
!e(
|
|
208
|
+
!e(z) && u ? (a(), d(ue, {
|
|
210
209
|
key: 0,
|
|
211
210
|
menuItem: u,
|
|
212
211
|
onCloseMenu: t[9] || (t[9] = (o) => u.open = !1)
|
|
213
|
-
}, null, 8, ["menuItem"])) :
|
|
212
|
+
}, null, 8, ["menuItem"])) : $("", !0)
|
|
214
213
|
], 64));
|
|
215
214
|
}
|
|
216
215
|
});
|
|
@@ -21,7 +21,7 @@ const f = (o) => (g("data-v-43fc1968"), o = o(), b(), o), V = { class: "relative
|
|
|
21
21
|
q.emit({ commandName: "Create Request" });
|
|
22
22
|
}, i = (l) => {
|
|
23
23
|
l.openCommandPaletteRequest && r();
|
|
24
|
-
}, x = "2.1.
|
|
24
|
+
}, x = "2.1.14";
|
|
25
25
|
return k(() => d.on(i)), R(() => d.off(i)), (l, m) => (a(), c("div", V, [
|
|
26
26
|
e("div", w, [
|
|
27
27
|
t(h).isReadOnly ? p("", !0) : (a(), c("div", E, [
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.14",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -132,16 +132,16 @@
|
|
|
132
132
|
"zod": "^3.23.8",
|
|
133
133
|
"@scalar/components": "0.12.50",
|
|
134
134
|
"@scalar/draggable": "0.1.5",
|
|
135
|
-
"@scalar/icons": "0.1.0",
|
|
136
135
|
"@scalar/oas-utils": "0.2.51",
|
|
136
|
+
"@scalar/icons": "0.1.0",
|
|
137
137
|
"@scalar/object-utils": "1.1.9",
|
|
138
|
-
"@scalar/openapi-types": "0.1.1",
|
|
139
138
|
"@scalar/openapi-parser": "0.8.5",
|
|
139
|
+
"@scalar/openapi-types": "0.1.1",
|
|
140
|
+
"@scalar/types": "0.0.12",
|
|
140
141
|
"@scalar/themes": "0.9.33",
|
|
141
142
|
"@scalar/use-codemirror": "0.11.16",
|
|
142
|
-
"@scalar/
|
|
143
|
-
"@scalar/use-tooltip": "1.0.2"
|
|
144
|
-
"@scalar/use-toasts": "0.7.6"
|
|
143
|
+
"@scalar/use-toasts": "0.7.6",
|
|
144
|
+
"@scalar/use-tooltip": "1.0.2"
|
|
145
145
|
},
|
|
146
146
|
"devDependencies": {
|
|
147
147
|
"@types/content-type": "^1.1.8",
|