@scalar/api-client 2.3.34 → 2.4.2
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 +67 -0
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +74 -89
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +4 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +2 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +19 -18
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +3 -3
- package/dist/components/TopNav/TopNavItem.vue2.js +46 -54
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/hooks/useClientConfig.d.ts +72 -6
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +45 -40
- package/dist/layouts/App/create-api-client-app.d.ts +72 -52
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +144 -104
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +49 -44
- package/dist/layouts/Web/create-api-client-web.d.ts +72 -52
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +72 -52
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +53 -49
- package/dist/libs/electron.d.ts +5 -0
- package/dist/libs/electron.d.ts.map +1 -0
- package/dist/libs/electron.js +4 -0
- package/dist/libs/find-request.d.ts +2 -0
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts +10 -3
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.js +28 -6
- package/dist/libs/send-request/create-request-operation.d.ts +3 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +91 -87
- package/dist/libs/send-request/create-request-operation.test.d.ts +2 -0
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +8 -0
- package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -0
- package/dist/plugins/hooks/usePluginManager.js +10 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +7 -0
- package/dist/plugins/plugin-manager.d.ts +28 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -0
- package/dist/plugins/plugin-manager.js +24 -0
- package/dist/store/active-entities.d.ts +2 -0
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +26 -4
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +24 -24
- package/dist/store/store.d.ts +72 -52
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +47 -45
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +37 -34
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +61 -70
- 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 +92 -77
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +59 -65
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +34 -35
- package/dist/views/Request/RequestSection/types/post-response.d.ts +7 -0
- package/dist/views/Request/RequestSection/types/post-response.d.ts.map +1 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItem.vue2.js +132 -134
- 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 +82 -70
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -114
- package/package.json +25 -20
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as j, computed as c, ref as w, useId as T, createBlock as l, openBlock as a, withCtx as v, createElementVNode as m, normalizeClass as b, createElementBlock as y, createVNode as A, Fragment as k, createCommentVNode as d, renderList as x, unref as B, withDirectives as I, resolveDynamicComponent as S, mergeProps as $, vShow as E } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as z } from "@scalar/components";
|
|
3
|
+
import O from "../../../components/SectionFilter.vue.js";
|
|
4
|
+
import L from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
5
|
+
import M from "./RequestHeaders.vue.js";
|
|
6
|
+
import N from "./ResponseBody.vue.js";
|
|
7
|
+
import W from "./ResponseBodyStreaming.vue.js";
|
|
8
|
+
import D from "./ResponseBodyVirtual.vue.js";
|
|
8
9
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
10
|
+
import F from "./ResponseCookies.vue.js";
|
|
11
|
+
import P from "./ResponseEmpty.vue.js";
|
|
12
|
+
import U from "./ResponseHeaders.vue.js";
|
|
13
|
+
import K from "./ResponseLoadingOverlay.vue.js";
|
|
14
|
+
import Z from "./ResponseMetaInformation.vue.js";
|
|
15
|
+
import { usePluginManager as G } from "../../../plugins/hooks/usePluginManager.js";
|
|
16
|
+
const J = { class: "flex h-8 flex-1 items-center" }, Q = ["id", "role"], g = 2e5, me = /* @__PURE__ */ j({
|
|
15
17
|
__name: "ResponseSection",
|
|
16
18
|
props: {
|
|
17
19
|
collection: {},
|
|
@@ -21,38 +23,38 @@ const F = { class: "flex h-8 flex-1 items-center" }, L = ["id", "role"], A = 2e5
|
|
|
21
23
|
response: {},
|
|
22
24
|
requestResult: {}
|
|
23
25
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
+
setup(r) {
|
|
27
|
+
const R = G().getViewComponents("response.section"), f = c(() => {
|
|
26
28
|
var o;
|
|
27
|
-
const e = (o =
|
|
28
|
-
return e ? Object.keys(e).map((
|
|
29
|
-
name:
|
|
30
|
-
value: e[
|
|
29
|
+
const e = (o = r.response) == null ? void 0 : o.headers;
|
|
30
|
+
return e ? Object.keys(e).map((n) => ({
|
|
31
|
+
name: n,
|
|
32
|
+
value: e[n] ?? "",
|
|
31
33
|
required: !1
|
|
32
34
|
})) : [];
|
|
33
|
-
}),
|
|
35
|
+
}), q = c(
|
|
34
36
|
() => {
|
|
35
37
|
var e;
|
|
36
|
-
return ((e =
|
|
38
|
+
return ((e = r.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
|
|
37
39
|
var i, p;
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
+
const n = (p = (i = r.response) == null ? void 0 : i.headers) == null ? void 0 : p[o];
|
|
41
|
+
return n ? {
|
|
40
42
|
name: o,
|
|
41
|
-
value:
|
|
43
|
+
value: n,
|
|
42
44
|
required: !1
|
|
43
45
|
} : [];
|
|
44
46
|
})) ?? [];
|
|
45
47
|
}
|
|
46
|
-
),
|
|
48
|
+
), C = ["Cookies", "Headers", "Body"], s = w("All"), h = c(() => ["All", ...C]), t = c(
|
|
47
49
|
() => Object.fromEntries(
|
|
48
|
-
|
|
50
|
+
h.value.map((e) => [e, T()])
|
|
49
51
|
)
|
|
50
|
-
),
|
|
52
|
+
), H = c(() => {
|
|
51
53
|
var i, p;
|
|
52
|
-
if (!
|
|
54
|
+
if (!r.response || !("size" in r.response))
|
|
53
55
|
return !1;
|
|
54
|
-
const e = ((i =
|
|
55
|
-
return !e || (
|
|
56
|
+
const e = ((i = r.response.headers) == null ? void 0 : i["content-type"]) || ((p = r.response.headers) == null ? void 0 : p["Content-Type"]);
|
|
57
|
+
return !e || (r.response.size ?? 0) <= g || e.includes("text/html") ? !1 : [
|
|
56
58
|
// Text types
|
|
57
59
|
"text/",
|
|
58
60
|
// JSON types
|
|
@@ -79,105 +81,115 @@ const F = { class: "flex h-8 flex-1 items-center" }, L = ["id", "role"], A = 2e5
|
|
|
79
81
|
"application/x-java-source",
|
|
80
82
|
// Form data
|
|
81
83
|
"application/x-www-form-urlencoded"
|
|
82
|
-
].some((
|
|
83
|
-
}),
|
|
84
|
+
].some((u) => e.includes(u)) && (r.response.size ?? 0) > g;
|
|
85
|
+
}), V = c(
|
|
84
86
|
() => {
|
|
85
87
|
var e;
|
|
86
|
-
return ((e =
|
|
88
|
+
return ((e = r.requestResult) == null ? void 0 : e.request.parameters.headers.filter((o) => o.enabled).map((o) => ({
|
|
87
89
|
name: o.key,
|
|
88
90
|
value: o.value,
|
|
89
91
|
required: !0
|
|
90
92
|
}))) ?? [];
|
|
91
93
|
}
|
|
92
94
|
);
|
|
93
|
-
return (e, o) => (
|
|
95
|
+
return (e, o) => (a(), l(L, { "aria-label": "Response" }, {
|
|
94
96
|
title: v(() => [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
m("div", J, [
|
|
98
|
+
m("div", {
|
|
97
99
|
"aria-live": "polite",
|
|
98
|
-
class:
|
|
100
|
+
class: b(["flex items-center", { "animate-response-heading": e.response }])
|
|
99
101
|
}, [
|
|
100
|
-
o[1] || (o[1] =
|
|
101
|
-
e.response ? (
|
|
102
|
+
o[1] || (o[1] = m("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
|
|
103
|
+
e.response ? (a(), l(Z, {
|
|
102
104
|
key: 0,
|
|
103
105
|
class: "animate-response-children",
|
|
104
106
|
response: e.response
|
|
105
107
|
}, null, 8, ["response"])) : d("", !0)
|
|
106
108
|
], 2),
|
|
107
|
-
|
|
109
|
+
A(O, {
|
|
108
110
|
modelValue: s.value,
|
|
109
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
110
|
-
filterIds:
|
|
111
|
-
filters:
|
|
111
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => s.value = n),
|
|
112
|
+
filterIds: t.value,
|
|
113
|
+
filters: h.value
|
|
112
114
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
113
115
|
])
|
|
114
116
|
]),
|
|
115
117
|
default: v(() => {
|
|
116
|
-
var
|
|
118
|
+
var n, i, p;
|
|
117
119
|
return [
|
|
118
|
-
|
|
119
|
-
id:
|
|
120
|
-
class:
|
|
120
|
+
m("div", {
|
|
121
|
+
id: t.value.All,
|
|
122
|
+
class: b(["custom-scroll response-section-content relative grid h-full justify-stretch", {
|
|
121
123
|
"content-start": e.response
|
|
122
124
|
}]),
|
|
123
125
|
role: s.value === "All" && e.response ? "tabpanel" : "none"
|
|
124
126
|
}, [
|
|
125
|
-
e.response ? (
|
|
126
|
-
s.value === "All" || s.value === "Cookies" ? (
|
|
127
|
+
e.response ? (a(), y(k, { key: 1 }, [
|
|
128
|
+
s.value === "All" || s.value === "Cookies" ? (a(), l(F, {
|
|
127
129
|
key: 0,
|
|
128
130
|
class: "response-section-content-cookies",
|
|
129
|
-
id:
|
|
130
|
-
cookies:
|
|
131
|
+
id: t.value.Cookies,
|
|
132
|
+
cookies: q.value,
|
|
131
133
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
132
134
|
}, null, 8, ["id", "cookies", "role"])) : d("", !0),
|
|
133
|
-
s.value === "All" || s.value === "Headers" ? (
|
|
135
|
+
s.value === "All" || s.value === "Headers" ? (a(), l(M, {
|
|
134
136
|
key: 1,
|
|
135
137
|
class: "response-section-content-headers",
|
|
136
|
-
id:
|
|
137
|
-
headers:
|
|
138
|
+
id: t.value.Headers,
|
|
139
|
+
headers: V.value,
|
|
138
140
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
139
141
|
}, null, 8, ["id", "headers", "role"])) : d("", !0),
|
|
140
|
-
s.value === "All" || s.value === "Headers" ? (
|
|
142
|
+
s.value === "All" || s.value === "Headers" ? (a(), l(U, {
|
|
141
143
|
key: 2,
|
|
142
144
|
class: "response-section-content-headers",
|
|
143
|
-
id:
|
|
144
|
-
headers:
|
|
145
|
+
id: t.value.Headers,
|
|
146
|
+
headers: f.value,
|
|
145
147
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
146
148
|
}, null, 8, ["id", "headers", "role"])) : d("", !0),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
(a(!0), y(k, null, x(B(R), (u) => (a(), l(B(z), {
|
|
150
|
+
key: u.component
|
|
151
|
+
}, {
|
|
152
|
+
default: v(() => [
|
|
153
|
+
I((a(), l(S(u.component), $({ ref_for: !0 }, u.props ?? {}), null, 16)), [
|
|
154
|
+
[E, s.value === "All" || s.value === u.title]
|
|
155
|
+
])
|
|
156
|
+
]),
|
|
157
|
+
_: 2
|
|
158
|
+
}, 1024))), 128)),
|
|
159
|
+
s.value === "All" || s.value === "Body" ? (a(), y(k, { key: 3 }, [
|
|
160
|
+
"reader" in e.response ? (a(), l(W, {
|
|
149
161
|
key: 0,
|
|
150
162
|
class: "response-section-content-body",
|
|
151
|
-
id:
|
|
163
|
+
id: t.value.Body,
|
|
152
164
|
reader: e.response.reader
|
|
153
|
-
}, null, 8, ["id", "reader"])) :
|
|
165
|
+
}, null, 8, ["id", "reader"])) : H.value && typeof ((n = e.response) == null ? void 0 : n.data) == "string" ? (a(), l(D, {
|
|
154
166
|
key: 1,
|
|
155
|
-
id:
|
|
167
|
+
id: t.value.Body,
|
|
156
168
|
content: e.response.data,
|
|
157
169
|
data: (i = e.response) == null ? void 0 : i.data,
|
|
158
|
-
headers:
|
|
170
|
+
headers: f.value,
|
|
159
171
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
160
|
-
}, null, 8, ["id", "content", "data", "headers", "role"])) : (
|
|
172
|
+
}, null, 8, ["id", "content", "data", "headers", "role"])) : (a(), l(N, {
|
|
161
173
|
key: 2,
|
|
162
174
|
class: "response-section-content-body",
|
|
163
|
-
id:
|
|
175
|
+
id: t.value.Body,
|
|
164
176
|
layout: "client",
|
|
165
177
|
active: !0,
|
|
166
178
|
data: (p = e.response) == null ? void 0 : p.data,
|
|
167
|
-
headers:
|
|
179
|
+
headers: f.value,
|
|
168
180
|
role: s.value === "All" ? "none" : "tabpanel",
|
|
169
181
|
title: "Body"
|
|
170
182
|
}, null, 8, ["id", "data", "headers", "role"]))
|
|
171
183
|
], 64)) : d("", !0)
|
|
172
|
-
], 64)) : (
|
|
184
|
+
], 64)) : (a(), l(P, {
|
|
173
185
|
key: 0,
|
|
174
186
|
collection: e.collection,
|
|
175
187
|
operation: e.operation,
|
|
176
188
|
workspace: e.workspace,
|
|
177
189
|
numWorkspaceRequests: e.numWorkspaceRequests
|
|
178
190
|
}, null, 8, ["collection", "operation", "workspace", "numWorkspaceRequests"])),
|
|
179
|
-
|
|
180
|
-
], 10,
|
|
191
|
+
A(K)
|
|
192
|
+
], 10, Q)
|
|
181
193
|
];
|
|
182
194
|
}),
|
|
183
195
|
_: 1
|
|
@@ -185,5 +197,5 @@ const F = { class: "flex h-8 flex-1 items-center" }, L = ["id", "role"], A = 2e5
|
|
|
185
197
|
}
|
|
186
198
|
});
|
|
187
199
|
export {
|
|
188
|
-
|
|
200
|
+
me as default
|
|
189
201
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA+sBA,wBAMG"}
|
|
@@ -1,143 +1,109 @@
|
|
|
1
|
-
import { defineComponent as L, computed as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as L, computed as V, ref as y, createElementBlock as C, openBlock as f, createElementVNode as l, createVNode as s, unref as e, withCtx as a, toDisplayString as D, Fragment as I, renderList as O, createBlock as S, withModifiers as v, createCommentVNode as U } from "vue";
|
|
2
|
+
import { useModal as $, ScalarDropdown as N, ScalarButton as z, ScalarDropdownItem as h, ScalarListboxCheckbox as q, ScalarIcon as k, ScalarDropdownDivider as F, ScalarModal as E } from "@scalar/components";
|
|
3
3
|
import { useRouter as P } from "vue-router";
|
|
4
4
|
import Y from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
5
5
|
import G from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
6
6
|
import { useActiveEntities as H } from "../../../store/active-entities.js";
|
|
7
7
|
import { useWorkspace as J } from "../../../store/store.js";
|
|
8
|
-
const K = { class: "flex w-[inherit] items-center text-sm" }, Q = { class: "m-0 flex items-center gap-1.5 font-bold" }, X = { class: "line-clamp-1 text-left" }, Z = { class: "overflow-hidden text-ellipsis" }, ee = { class: "flex h-4 w-4 items-center justify-center" },
|
|
8
|
+
const K = { class: "flex w-[inherit] items-center text-sm" }, Q = { class: "m-0 flex items-center gap-1.5 font-bold" }, X = { class: "line-clamp-1 text-left" }, Z = { class: "overflow-hidden text-ellipsis" }, ee = { class: "flex h-4 w-4 items-center justify-center" }, ce = /* @__PURE__ */ L({
|
|
9
9
|
__name: "WorkspaceDropdown",
|
|
10
10
|
setup(te) {
|
|
11
|
-
const { activeWorkspace:
|
|
12
|
-
var
|
|
13
|
-
|
|
11
|
+
const { activeWorkspace: c } = H(), { workspaces: r, workspaceMutators: _, events: T } = J(), { push: g } = P(), j = (o) => {
|
|
12
|
+
var t;
|
|
13
|
+
o !== ((t = c.value) == null ? void 0 : t.uid) && g({
|
|
14
14
|
name: "workspace",
|
|
15
15
|
params: {
|
|
16
|
-
workspace:
|
|
16
|
+
workspace: o
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
}, R = (
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
const
|
|
26
|
-
|
|
19
|
+
}, b = V(() => Object.keys(r).length === 1), B = () => T.commandPalette.emit({ commandName: "Create Workspace" }), d = y(""), i = y(""), u = $(), p = $(), W = (o) => {
|
|
20
|
+
const t = r[o];
|
|
21
|
+
t && (d.value = t.name, i.value = o, u.show());
|
|
22
|
+
}, R = (o) => {
|
|
23
|
+
o.trim() && (_.edit(i.value, "name", o.trim()), u.hide());
|
|
24
|
+
}, M = (o) => {
|
|
25
|
+
const t = r[o];
|
|
26
|
+
t && (d.value = t.name, i.value = o, p.show());
|
|
27
27
|
}, A = async () => {
|
|
28
|
-
var
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
31
|
-
if (delete
|
|
32
|
-
const
|
|
33
|
-
await
|
|
28
|
+
var o;
|
|
29
|
+
if (!b.value) {
|
|
30
|
+
const t = ((o = c.value) == null ? void 0 : o.uid) === i.value, n = { ...r };
|
|
31
|
+
if (delete n[i.value], _.delete(i.value), t) {
|
|
32
|
+
const m = Object.keys(n)[0];
|
|
33
|
+
await g({
|
|
34
34
|
name: "workspace",
|
|
35
35
|
params: {
|
|
36
|
-
workspace:
|
|
36
|
+
workspace: m
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
p.hide();
|
|
42
42
|
};
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
items:
|
|
47
|
-
(
|
|
48
|
-
key:
|
|
43
|
+
return (o, t) => (f(), C("div", null, [
|
|
44
|
+
l("div", K, [
|
|
45
|
+
s(e(N), null, {
|
|
46
|
+
items: a(() => [
|
|
47
|
+
(f(!0), C(I, null, O(e(r), (n, m) => (f(), S(e(h), {
|
|
48
|
+
key: m,
|
|
49
49
|
class: "group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
50
|
-
onClick:
|
|
50
|
+
onClick: v((w) => j(n.uid), ["stop"])
|
|
51
51
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
var
|
|
52
|
+
default: a(() => {
|
|
53
|
+
var w;
|
|
54
54
|
return [
|
|
55
|
-
|
|
56
|
-
selected: ((
|
|
55
|
+
s(e(q), {
|
|
56
|
+
selected: ((w = e(c)) == null ? void 0 : w.uid) === m
|
|
57
57
|
}, null, 8, ["selected"]),
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
l("span", Z, D(n.name), 1),
|
|
59
|
+
s(e(N), {
|
|
60
60
|
placement: "right-start",
|
|
61
61
|
teleport: ""
|
|
62
62
|
}, {
|
|
63
|
-
items:
|
|
64
|
-
|
|
63
|
+
items: a(() => [
|
|
64
|
+
s(e(h), {
|
|
65
65
|
class: "flex gap-2",
|
|
66
|
-
onMousedown: (
|
|
67
|
-
onTouchend:
|
|
66
|
+
onMousedown: (x) => W(n.uid),
|
|
67
|
+
onTouchend: v((x) => W(n.uid), ["prevent"])
|
|
68
68
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
|
|
69
|
+
default: a(() => [
|
|
70
|
+
s(e(k), {
|
|
71
71
|
class: "inline-flex",
|
|
72
72
|
icon: "Edit",
|
|
73
73
|
size: "md",
|
|
74
74
|
thickness: "1.5"
|
|
75
75
|
}),
|
|
76
|
-
|
|
76
|
+
t[2] || (t[2] = l("span", null, "Rename", -1))
|
|
77
77
|
]),
|
|
78
78
|
_: 2
|
|
79
79
|
}, 1032, ["onMousedown", "onTouchend"]),
|
|
80
|
-
|
|
80
|
+
b.value ? U("", !0) : (f(), S(e(h), {
|
|
81
81
|
key: 0,
|
|
82
|
-
class: "
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
trigger: o(() => [
|
|
86
|
-
n(t(u), {
|
|
87
|
-
class: "flex w-full gap-2",
|
|
88
|
-
disabled: "",
|
|
89
|
-
onMousedown: e[0] || (e[0] = r(() => {
|
|
90
|
-
}, ["prevent"])),
|
|
91
|
-
onTouchend: e[1] || (e[1] = r(() => {
|
|
92
|
-
}, ["prevent"]))
|
|
93
|
-
}, {
|
|
94
|
-
default: o(() => [
|
|
95
|
-
n(t(p), {
|
|
96
|
-
class: "inline-flex",
|
|
97
|
-
icon: "Delete",
|
|
98
|
-
size: "md",
|
|
99
|
-
thickness: "1.5"
|
|
100
|
-
}),
|
|
101
|
-
e[5] || (e[5] = a("span", null, "Delete", -1))
|
|
102
|
-
]),
|
|
103
|
-
_: 1
|
|
104
|
-
})
|
|
105
|
-
]),
|
|
106
|
-
content: o(() => e[6] || (e[6] = [
|
|
107
|
-
a("div", { class: "w-content bg-b-1 text-xxs text-c-1 pointer-events-none z-10 grid min-w-48 gap-1.5 rounded p-2 leading-5 shadow-lg" }, [
|
|
108
|
-
a("div", { class: "text-c-2 flex items-center" }, [
|
|
109
|
-
a("span", null, "Only workspace cannot be deleted.")
|
|
110
|
-
])
|
|
111
|
-
], -1)
|
|
112
|
-
])),
|
|
113
|
-
_: 1
|
|
114
|
-
})) : (c(), g(t(u), {
|
|
115
|
-
key: 1,
|
|
116
|
-
class: "flex !gap-2",
|
|
117
|
-
onMousedown: r((h) => W(l.uid), ["prevent"]),
|
|
118
|
-
onTouchend: r((h) => W(l.uid), ["prevent"])
|
|
82
|
+
class: "flex gap-2",
|
|
83
|
+
onMousedown: v((x) => M(n.uid), ["prevent"]),
|
|
84
|
+
onTouchend: v((x) => M(n.uid), ["prevent"])
|
|
119
85
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
86
|
+
default: a(() => [
|
|
87
|
+
s(e(k), {
|
|
122
88
|
class: "inline-flex",
|
|
123
89
|
icon: "Delete",
|
|
124
|
-
size: "
|
|
90
|
+
size: "md",
|
|
125
91
|
thickness: "1.5"
|
|
126
92
|
}),
|
|
127
|
-
|
|
93
|
+
t[3] || (t[3] = l("span", null, "Delete", -1))
|
|
128
94
|
]),
|
|
129
95
|
_: 2
|
|
130
96
|
}, 1032, ["onMousedown", "onTouchend"]))
|
|
131
97
|
]),
|
|
132
|
-
default:
|
|
133
|
-
|
|
98
|
+
default: a(() => [
|
|
99
|
+
s(e(z), {
|
|
134
100
|
class: "hover:bg-b-3 -mr-1 ml-auto aspect-square h-fit px-0.5 py-0 group-hover/item:flex",
|
|
135
101
|
size: "sm",
|
|
136
102
|
type: "button",
|
|
137
103
|
variant: "ghost"
|
|
138
104
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
105
|
+
default: a(() => [
|
|
106
|
+
s(e(k), {
|
|
141
107
|
icon: "Ellipses",
|
|
142
108
|
size: "sm"
|
|
143
109
|
})
|
|
@@ -151,34 +117,34 @@ const K = { class: "flex w-[inherit] items-center text-sm" }, Q = { class: "m-0
|
|
|
151
117
|
}),
|
|
152
118
|
_: 2
|
|
153
119
|
}, 1032, ["onClick"]))), 128)),
|
|
154
|
-
|
|
155
|
-
|
|
120
|
+
s(e(F)),
|
|
121
|
+
s(e(h), {
|
|
156
122
|
class: "flex items-center gap-1.5",
|
|
157
123
|
onClick: B
|
|
158
124
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
|
|
161
|
-
|
|
125
|
+
default: a(() => [
|
|
126
|
+
l("div", ee, [
|
|
127
|
+
s(e(k), {
|
|
162
128
|
icon: "Add",
|
|
163
129
|
size: "sm"
|
|
164
130
|
})
|
|
165
131
|
]),
|
|
166
|
-
|
|
132
|
+
t[4] || (t[4] = l("span", null, "Create Workspace", -1))
|
|
167
133
|
]),
|
|
168
134
|
_: 1
|
|
169
135
|
})
|
|
170
136
|
]),
|
|
171
|
-
default:
|
|
172
|
-
|
|
137
|
+
default: a(() => [
|
|
138
|
+
s(e(z), {
|
|
173
139
|
class: "text-c-1 hover:bg-b-2 line-clamp-1 h-full w-fit justify-start px-1.5 py-1.5 font-normal",
|
|
174
140
|
fullWidth: "",
|
|
175
141
|
variant: "ghost"
|
|
176
142
|
}, {
|
|
177
|
-
default:
|
|
178
|
-
var
|
|
143
|
+
default: a(() => {
|
|
144
|
+
var n;
|
|
179
145
|
return [
|
|
180
|
-
|
|
181
|
-
|
|
146
|
+
l("div", Q, [
|
|
147
|
+
l("h2", X, D((n = e(c)) == null ? void 0 : n.name), 1)
|
|
182
148
|
])
|
|
183
149
|
];
|
|
184
150
|
}),
|
|
@@ -188,30 +154,30 @@ const K = { class: "flex w-[inherit] items-center text-sm" }, Q = { class: "m-0
|
|
|
188
154
|
_: 1
|
|
189
155
|
})
|
|
190
156
|
]),
|
|
191
|
-
|
|
157
|
+
s(e(E), {
|
|
192
158
|
size: "xxs",
|
|
193
|
-
state:
|
|
159
|
+
state: e(p),
|
|
194
160
|
title: "Delete workspace"
|
|
195
161
|
}, {
|
|
196
|
-
default:
|
|
197
|
-
|
|
198
|
-
variableName:
|
|
162
|
+
default: a(() => [
|
|
163
|
+
s(Y, {
|
|
164
|
+
variableName: d.value,
|
|
199
165
|
warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
|
|
200
|
-
onClose:
|
|
166
|
+
onClose: t[0] || (t[0] = (n) => e(p).hide()),
|
|
201
167
|
onDelete: A
|
|
202
168
|
}, null, 8, ["variableName"])
|
|
203
169
|
]),
|
|
204
170
|
_: 1
|
|
205
171
|
}, 8, ["state"]),
|
|
206
|
-
|
|
172
|
+
s(e(E), {
|
|
207
173
|
size: "xxs",
|
|
208
|
-
state:
|
|
174
|
+
state: e(u),
|
|
209
175
|
title: "Rename Workspace"
|
|
210
176
|
}, {
|
|
211
|
-
default:
|
|
212
|
-
|
|
213
|
-
name:
|
|
214
|
-
onClose:
|
|
177
|
+
default: a(() => [
|
|
178
|
+
s(G, {
|
|
179
|
+
name: d.value,
|
|
180
|
+
onClose: t[1] || (t[1] = (n) => e(u).hide()),
|
|
215
181
|
onEdit: R
|
|
216
182
|
}, null, 8, ["name"])
|
|
217
183
|
]),
|
|
@@ -221,5 +187,5 @@ const K = { class: "flex w-[inherit] items-center text-sm" }, Q = { class: "m-0
|
|
|
221
187
|
}
|
|
222
188
|
});
|
|
223
189
|
export {
|
|
224
|
-
|
|
190
|
+
ce as default
|
|
225
191
|
};
|
package/package.json
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.
|
|
21
|
+
"version": "2.4.2",
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">=20"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
26
|
"main": "dist/index.js",
|
|
@@ -125,6 +125,11 @@
|
|
|
125
125
|
"types": "./dist/libs/send-request/index.d.ts",
|
|
126
126
|
"default": "./dist/libs/send-request/index.js"
|
|
127
127
|
},
|
|
128
|
+
"./plugins": {
|
|
129
|
+
"import": "./dist/plugins/index.js",
|
|
130
|
+
"types": "./dist/plugins/index.d.ts",
|
|
131
|
+
"default": "./dist/plugins/index.js"
|
|
132
|
+
},
|
|
128
133
|
"./store": {
|
|
129
134
|
"import": "./dist/store/index.js",
|
|
130
135
|
"types": "./dist/store/index.d.ts",
|
|
@@ -199,22 +204,22 @@
|
|
|
199
204
|
"whatwg-mimetype": "^4.0.0",
|
|
200
205
|
"yaml": "^2.4.5",
|
|
201
206
|
"zod": "3.24.1",
|
|
202
|
-
"@scalar/components": "0.
|
|
203
|
-
"@scalar/draggable": "0.
|
|
204
|
-
"@scalar/icons": "0.
|
|
205
|
-
"@scalar/import": "0.
|
|
206
|
-
"@scalar/oas-utils": "0.
|
|
207
|
-
"@scalar/openapi-
|
|
208
|
-
"@scalar/
|
|
209
|
-
"@scalar/postman-to-openapi": "0.
|
|
210
|
-
"@scalar/
|
|
211
|
-
"@scalar/
|
|
212
|
-
"@scalar/types": "0.1
|
|
213
|
-
"@scalar/use-codemirror": "0.
|
|
214
|
-
"@scalar/
|
|
215
|
-
"@scalar/use-
|
|
216
|
-
"@scalar/use-
|
|
217
|
-
"@scalar/use-
|
|
207
|
+
"@scalar/components": "0.14.1",
|
|
208
|
+
"@scalar/draggable": "0.2.0",
|
|
209
|
+
"@scalar/icons": "0.4.1",
|
|
210
|
+
"@scalar/import": "0.4.2",
|
|
211
|
+
"@scalar/oas-utils": "0.3.1",
|
|
212
|
+
"@scalar/openapi-types": "0.3.1",
|
|
213
|
+
"@scalar/themes": "0.12.1",
|
|
214
|
+
"@scalar/postman-to-openapi": "0.3.1",
|
|
215
|
+
"@scalar/object-utils": "1.2.1",
|
|
216
|
+
"@scalar/openapi-parser": "0.11.1",
|
|
217
|
+
"@scalar/types": "0.2.1",
|
|
218
|
+
"@scalar/use-codemirror": "0.12.1",
|
|
219
|
+
"@scalar/snippetz": "0.3.0",
|
|
220
|
+
"@scalar/use-toasts": "0.8.0",
|
|
221
|
+
"@scalar/use-hooks": "0.2.1",
|
|
222
|
+
"@scalar/use-tooltip": "1.1.0"
|
|
218
223
|
},
|
|
219
224
|
"devDependencies": {
|
|
220
225
|
"@types/shell-quote": "^1.7.5",
|
|
@@ -229,8 +234,8 @@
|
|
|
229
234
|
"vite": "5.4.19",
|
|
230
235
|
"vite-svg-loader": "^5.1.0",
|
|
231
236
|
"vitest": "^1.6.0",
|
|
232
|
-
"@scalar/
|
|
233
|
-
"@scalar/
|
|
237
|
+
"@scalar/build-tooling": "0.2.0",
|
|
238
|
+
"@scalar/galaxy": "0.4.1"
|
|
234
239
|
},
|
|
235
240
|
"scripts": {
|
|
236
241
|
"build": "scalar-build-vite",
|