@scalar/api-client 2.2.7 → 2.2.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 +6 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +108 -106
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +12 -12
- package/dist/libs/index.d.ts +1 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +28 -24
- package/dist/libs/postman.d.ts +11 -0
- package/dist/libs/postman.d.ts.map +1 -0
- package/dist/libs/postman.js +39 -0
- package/dist/style.css +1 -1
- 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 +32 -30
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +4 -3
|
@@ -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":"AAiaA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAioB1D,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2a60e0fa"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as se, useId as re, reactive as ae, watch as ne, onMounted as ie, onBeforeUnmount as le, computed as de, openBlock as a, createElementBlock as h, Fragment as g, withDirectives as ue, createVNode as u, unref as s, normalizeClass as p, createSlots as
|
|
1
|
+
import { defineComponent as se, useId as re, reactive as ae, watch as ne, onMounted as ie, onBeforeUnmount as le, computed as de, openBlock as a, createElementBlock as h, Fragment as g, withDirectives as ue, createVNode as u, unref as s, normalizeClass as p, createSlots as me, withCtx as l, createElementVNode as i, isRef as ce, withKeys as y, withModifiers as m, createBlock as d, renderList as V, createTextVNode as I, toDisplayString as pe, createCommentVNode as q, vShow as fe } from "vue";
|
|
2
2
|
import be from "../../assets/rabbit.ascii.js";
|
|
3
3
|
import he from "../../assets/rabbitjump.ascii.js";
|
|
4
4
|
import ve from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
@@ -13,9 +13,9 @@ import { ScalarSearchInput as Ie, ScalarSearchResultList as qe, ScalarSearchResu
|
|
|
13
13
|
import { LibraryIcon as xe } from "@scalar/icons";
|
|
14
14
|
import { useRouter as $e } from "vue-router";
|
|
15
15
|
import Me from "./RequestSidebarItem.vue.js";
|
|
16
|
-
import
|
|
17
|
-
import { useWorkspace as
|
|
18
|
-
import { useSidebar as
|
|
16
|
+
import Pe from "../../components/Sidebar/Sidebar.vue.js";
|
|
17
|
+
import { useWorkspace as Te } from "../../store/store.js";
|
|
18
|
+
import { useSidebar as Ee } from "../../hooks/useSidebar.js";
|
|
19
19
|
const Ve = {
|
|
20
20
|
class: "search-button-fade sticky px-3 py-2.5 top-0 z-10",
|
|
21
21
|
role: "search"
|
|
@@ -30,7 +30,7 @@ const Ve = {
|
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:showSidebar", "newTab", "clearDrafts"],
|
|
32
32
|
setup(W, { emit: A }) {
|
|
33
|
-
const F = W, C = A, D =
|
|
33
|
+
const F = W, C = A, D = Te(), {
|
|
34
34
|
activeWorkspaceCollections: v,
|
|
35
35
|
activeRequest: K,
|
|
36
36
|
activeWorkspaceRequests: S,
|
|
@@ -38,9 +38,11 @@ const Ve = {
|
|
|
38
38
|
} = we(), { findRequestParents: N, isReadOnly: U, events: f, requestMutators: x, requests: z } = D, { handleDragEnd: H, isDroppable: L } = ye(
|
|
39
39
|
R,
|
|
40
40
|
D
|
|
41
|
-
), { collapsedSidebarFolders: j, setCollapsedSidebarFolder: G } =
|
|
42
|
-
f.commandPalette.emit({
|
|
43
|
-
|
|
41
|
+
), { collapsedSidebarFolders: j, setCollapsedSidebarFolder: G } = Ee(), { replace: $ } = $e(), J = () => {
|
|
42
|
+
f.commandPalette.emit({
|
|
43
|
+
commandName: "Import from OpenAPI/Swagger/Postman"
|
|
44
|
+
});
|
|
45
|
+
}, M = re(), c = ae({ open: !1 });
|
|
44
46
|
ne(
|
|
45
47
|
K,
|
|
46
48
|
(t) => {
|
|
@@ -56,16 +58,16 @@ const Ve = {
|
|
|
56
58
|
selectedSearchResult: k,
|
|
57
59
|
onSearchResultClick: Q,
|
|
58
60
|
fuseSearch: X,
|
|
59
|
-
searchInputRef:
|
|
61
|
+
searchInputRef: P,
|
|
60
62
|
searchResultRefs: Y,
|
|
61
|
-
navigateSearchResults:
|
|
63
|
+
navigateSearchResults: T,
|
|
62
64
|
selectSearchResult: Z
|
|
63
|
-
} = Se(),
|
|
65
|
+
} = Se(), E = (t) => {
|
|
64
66
|
var e;
|
|
65
|
-
t && (t.toggleSidebar && C("update:showSidebar", F.showSidebar), t.focusRequestSearch && ((e =
|
|
67
|
+
t && (t.toggleSidebar && C("update:showSidebar", F.showSidebar), t.focusRequestSearch && ((e = P.value) == null || e.focus()));
|
|
66
68
|
};
|
|
67
|
-
ie(() => f.hotKeys.on(
|
|
68
|
-
f.hotKeys.off(
|
|
69
|
+
ie(() => f.hotKeys.on(E)), le(() => {
|
|
70
|
+
f.hotKeys.off(E);
|
|
69
71
|
});
|
|
70
72
|
const _ = (t) => {
|
|
71
73
|
t != null && t.documentUrl && (t.watchMode = !t.watchMode);
|
|
@@ -91,26 +93,26 @@ const Ve = {
|
|
|
91
93
|
}
|
|
92
94
|
};
|
|
93
95
|
return (t, e) => (a(), h(g, null, [
|
|
94
|
-
ue(u(s(
|
|
96
|
+
ue(u(s(Pe), {
|
|
95
97
|
class: p([t.showSidebar ? "sidebar-active-width" : ""]),
|
|
96
98
|
showSidebar: t.showSidebar,
|
|
97
99
|
"onUpdate:showSidebar": e[8] || (e[8] = (o) => t.$emit("update:showSidebar", o))
|
|
98
|
-
},
|
|
100
|
+
}, me({
|
|
99
101
|
content: l(() => [
|
|
100
102
|
i("div", Ve, [
|
|
101
103
|
u(s(Ie), {
|
|
102
104
|
ref_key: "searchInputRef",
|
|
103
|
-
ref:
|
|
105
|
+
ref: P,
|
|
104
106
|
modelValue: s(b),
|
|
105
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) =>
|
|
107
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => ce(b) ? b.value = o : null),
|
|
106
108
|
"aria-activedescendant": ee.value,
|
|
107
109
|
"aria-controls": s(M),
|
|
108
110
|
sidebar: "",
|
|
109
111
|
onInput: s(X),
|
|
110
112
|
onKeydown: [
|
|
111
|
-
e[1] || (e[1] = y(
|
|
112
|
-
e[2] || (e[2] = y(
|
|
113
|
-
e[3] || (e[3] = y(
|
|
113
|
+
e[1] || (e[1] = y(m((o) => s(T)("down"), ["stop"]), ["down"])),
|
|
114
|
+
e[2] || (e[2] = y(m((o) => s(Z)(), ["stop"]), ["enter"])),
|
|
115
|
+
e[3] || (e[3] = y(m((o) => s(T)("up"), ["stop"]), ["up"]))
|
|
114
116
|
]
|
|
115
117
|
}, null, 8, ["modelValue", "aria-activedescendant", "aria-controls", "onInput"])
|
|
116
118
|
]),
|
|
@@ -118,9 +120,9 @@ const Ve = {
|
|
|
118
120
|
class: p(["flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
119
121
|
"pb-14": !t.isReadonly
|
|
120
122
|
}]),
|
|
121
|
-
onDragenter: e[6] || (e[6] =
|
|
123
|
+
onDragenter: e[6] || (e[6] = m(() => {
|
|
122
124
|
}, ["prevent"])),
|
|
123
|
-
onDragover: e[7] || (e[7] =
|
|
125
|
+
onDragover: e[7] || (e[7] = m(() => {
|
|
124
126
|
}, ["prevent"]))
|
|
125
127
|
}, [
|
|
126
128
|
s(b) ? (a(), d(s(qe), {
|
|
@@ -139,7 +141,7 @@ const Ve = {
|
|
|
139
141
|
active: s(k) === r,
|
|
140
142
|
class: "px-2",
|
|
141
143
|
href: o.item.link,
|
|
142
|
-
onClick:
|
|
144
|
+
onClick: m((n) => s(Q)(o), ["prevent"]),
|
|
143
145
|
onFocus: (n) => k.value = r
|
|
144
146
|
}, {
|
|
145
147
|
addon: l(() => [
|
|
@@ -163,12 +165,12 @@ const Ve = {
|
|
|
163
165
|
key: o.uid,
|
|
164
166
|
isDraggable: !t.isReadonly && ((r = o.info) == null ? void 0 : r.title) !== "Drafts",
|
|
165
167
|
isDroppable: s(L),
|
|
166
|
-
menuItem:
|
|
168
|
+
menuItem: c,
|
|
167
169
|
parentUids: [],
|
|
168
170
|
uid: o.uid,
|
|
169
171
|
onNewTab: e[4] || (e[4] = (n, oe) => C("newTab", { name: n, uid: oe })),
|
|
170
172
|
onOnDragEnd: s(H),
|
|
171
|
-
onOpenMenu: e[5] || (e[5] = (n) => Object.assign(
|
|
173
|
+
onOpenMenu: e[5] || (e[5] = (n) => Object.assign(c, n))
|
|
172
174
|
}, {
|
|
173
175
|
leftIcon: l(() => {
|
|
174
176
|
var n;
|
|
@@ -221,7 +223,7 @@ const Ve = {
|
|
|
221
223
|
]),
|
|
222
224
|
e[11] || (e[11] = i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
|
|
223
225
|
i("b", { class: "font-medium" }, "Let's Get Started"),
|
|
224
|
-
i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI
|
|
226
|
+
i("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
225
227
|
], -1))
|
|
226
228
|
]),
|
|
227
229
|
t.isReadonly ? q("", !0) : (a(), d(s(De), {
|
|
@@ -258,11 +260,11 @@ const Ve = {
|
|
|
258
260
|
]), 1032, ["class", "showSidebar"]), [
|
|
259
261
|
[fe, t.showSidebar]
|
|
260
262
|
]),
|
|
261
|
-
!s(U) &&
|
|
263
|
+
!s(U) && c ? (a(), d(ge, {
|
|
262
264
|
key: 0,
|
|
263
|
-
menuItem:
|
|
265
|
+
menuItem: c,
|
|
264
266
|
onClearDrafts: te,
|
|
265
|
-
onCloseMenu: e[9] || (e[9] = (o) =>
|
|
267
|
+
onCloseMenu: e[9] || (e[9] = (o) => c.open = !1),
|
|
266
268
|
onToggleWatchMode: _
|
|
267
269
|
}, null, 8, ["menuItem"])) : q("", !0)
|
|
268
270
|
], 64));
|
|
@@ -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.8";
|
|
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", {
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.8",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -160,16 +160,17 @@
|
|
|
160
160
|
"yaml": "^2.4.5",
|
|
161
161
|
"zod": "^3.23.8",
|
|
162
162
|
"@scalar/components": "0.13.2",
|
|
163
|
+
"@scalar/draggable": "0.1.7",
|
|
163
164
|
"@scalar/icons": "0.1.2",
|
|
164
165
|
"@scalar/import": "0.2.3",
|
|
165
166
|
"@scalar/oas-utils": "0.2.85",
|
|
166
167
|
"@scalar/object-utils": "1.1.12",
|
|
167
|
-
"@scalar/draggable": "0.1.7",
|
|
168
168
|
"@scalar/openapi-parser": "0.8.10",
|
|
169
169
|
"@scalar/openapi-types": "0.1.5",
|
|
170
170
|
"@scalar/themes": "0.9.54",
|
|
171
|
-
"@scalar/use-codemirror": "0.11.46",
|
|
172
171
|
"@scalar/types": "0.0.23",
|
|
172
|
+
"@scalar/use-codemirror": "0.11.46",
|
|
173
|
+
"@scalar/postman-to-openapi": "0.1.8",
|
|
173
174
|
"@scalar/use-hooks": "0.1.7",
|
|
174
175
|
"@scalar/use-toasts": "0.7.7",
|
|
175
176
|
"@scalar/use-tooltip": "1.0.4"
|