@scalar/api-client 2.0.21 → 2.0.24
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 +28 -0
- package/README.md +14 -17
- package/dist/Modal/api-client-modal.js +6 -6
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +11 -10
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +36 -29
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPalette.vue2.js +18 -17
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +7 -6
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -2
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -14
- package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchButton.vue.js +7 -6
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +17 -15
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +0 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +9 -10
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +36 -35
- package/dist/router.d.ts +20 -3
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +100 -68
- package/dist/store/workspace.d.ts +32 -32
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +49 -53
- package/dist/style.css +1 -1
- 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 +3 -3
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -4
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
- 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 +4 -3
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +68 -60
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +19 -19
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -5
- package/package.json +5 -5
- package/dist/views/Collection/Collection.vue.js +0 -4
- package/dist/views/Collection/Collection.vue2.js +0 -136
- package/dist/views/Components/Schemas/Schemas.vue.js +0 -4
- package/dist/views/Components/Schemas/Schemas.vue2.js +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.0.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7076725: feat(components): add outline icons
|
|
8
|
+
- 1e72b03: fix(components): polish history icon
|
|
9
|
+
- cbe984b: fix: adjust command palette icon thickness
|
|
10
|
+
- Updated dependencies [7076725]
|
|
11
|
+
- Updated dependencies [1e72b03]
|
|
12
|
+
- Updated dependencies [dd2a42e]
|
|
13
|
+
- @scalar/components@0.12.15
|
|
14
|
+
|
|
15
|
+
## 2.0.23
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 3928ac3: feat: add routing portion for multiple workspaces
|
|
20
|
+
- Updated dependencies [96e7106]
|
|
21
|
+
- @scalar/themes@0.9.14
|
|
22
|
+
- @scalar/components@0.12.14
|
|
23
|
+
- @scalar/oas-utils@0.2.14
|
|
24
|
+
|
|
25
|
+
## 2.0.22
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 45b956f: fix: only add body data if body data is not null
|
|
30
|
+
|
|
3
31
|
## 2.0.21
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -57,31 +57,28 @@ await createApiClientApp(document.getElementById('scalar-client'), {
|
|
|
57
57
|
Or you can mount a more compact version, which is living in a modal:
|
|
58
58
|
|
|
59
59
|
```ts
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const targetElement = document.getElementById('root')
|
|
60
|
+
// main.js
|
|
61
|
+
import { createApiClientApp } from '@/App'
|
|
63
62
|
|
|
64
63
|
// Initialize
|
|
65
|
-
const { open } = await
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
64
|
+
const { open } = await createApiClientApp(
|
|
65
|
+
document.getElementById('scalar-client'),
|
|
66
|
+
{
|
|
67
|
+
spec: {
|
|
68
|
+
url: 'https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.json',
|
|
69
|
+
},
|
|
70
|
+
proxyUrl: 'https://proxy.scalar.com',
|
|
73
71
|
},
|
|
74
|
-
|
|
75
|
-
})
|
|
72
|
+
)
|
|
76
73
|
|
|
77
74
|
// Open the API client right-away
|
|
78
75
|
open()
|
|
79
76
|
|
|
80
77
|
// Or: Open a specific operation
|
|
81
|
-
open({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})
|
|
78
|
+
// open({
|
|
79
|
+
// method: 'GET',
|
|
80
|
+
// path: '/me',
|
|
81
|
+
// })
|
|
85
82
|
```
|
|
86
83
|
|
|
87
84
|
## Configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { modalRouter as
|
|
1
|
+
import { modalRouter as k } from "../router.js";
|
|
2
2
|
import { useWorkspace as O } from "../store/workspace.js";
|
|
3
3
|
import { objectMerge as R } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import { getNestedValue as j } from "@scalar/object-utils/nested";
|
|
5
5
|
import { createApp as C } from "vue";
|
|
6
6
|
import q from "./ApiClientModal.vue.js";
|
|
7
|
-
const L = async (
|
|
7
|
+
const L = async (A, r, b = !0) => {
|
|
8
8
|
var h, w, v;
|
|
9
9
|
const {
|
|
10
10
|
activeCollection: n,
|
|
@@ -25,8 +25,8 @@ const L = async (b, r, k = !0) => {
|
|
|
25
25
|
"Read more: https://github.com/scalar/scalar/tree/main/packages/api-client-modal"
|
|
26
26
|
);
|
|
27
27
|
const u = C(q, { modalState: p });
|
|
28
|
-
u.use(
|
|
29
|
-
const f = (e =
|
|
28
|
+
u.use(k);
|
|
29
|
+
const f = (e = A) => {
|
|
30
30
|
if (!e) {
|
|
31
31
|
console.error(
|
|
32
32
|
"[@scalar/api-client-modal] Could not create the API client.",
|
|
@@ -37,7 +37,7 @@ const L = async (b, r, k = !0) => {
|
|
|
37
37
|
}
|
|
38
38
|
u.mount(e);
|
|
39
39
|
};
|
|
40
|
-
return a.value && (
|
|
40
|
+
return a.value && (b && f(), d.edit(a.value.uid, "isReadOnly", !0), r.proxyUrl && d.edit(
|
|
41
41
|
a.value.uid,
|
|
42
42
|
"proxyUrl",
|
|
43
43
|
r.proxyUrl
|
|
@@ -113,7 +113,7 @@ const L = async (b, r, k = !0) => {
|
|
|
113
113
|
!0
|
|
114
114
|
)
|
|
115
115
|
);
|
|
116
|
-
s &&
|
|
116
|
+
s && k.push(`/workspace/default/request/${s.uid}`), p.open = !0;
|
|
117
117
|
},
|
|
118
118
|
/** Mount the references to a given element */
|
|
119
119
|
mount: f,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAwpBA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-02983c4d"]]);
|
|
5
5
|
export {
|
|
6
6
|
d as default
|
|
7
7
|
};
|
|
@@ -9,7 +9,7 @@ import G from "../HttpMethod/HttpMethod.vue.js";
|
|
|
9
9
|
import J from "./AddressBarHistory.vue.js";
|
|
10
10
|
import X from "./AddressBarServer.vue.js";
|
|
11
11
|
import { executeRequestBus as m } from "../../libs/eventBusses/executeRequestBus.js";
|
|
12
|
-
const v = (d) => (K("data-v-
|
|
12
|
+
const v = (d) => (K("data-v-02983c4d"), d = d(), O(), d), Y = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "order-last lg:order-none lg:w-auto w-full"
|
|
15
15
|
}, Z = { class: "m-auto flex basis-1/2 flex-row items-center" }, ee = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, te = { class: "flex gap-1" }, oe = { class: "scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, le = /* @__PURE__ */ v(() => /* @__PURE__ */ l("div", { class: "fade-left" }, null, -1)), ne = ["contenteditable"], se = /* @__PURE__ */ v(() => /* @__PURE__ */ l("div", { class: "fade-right" }, null, -1)), ae = /* @__PURE__ */ v(() => /* @__PURE__ */ l("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), _e = /* @__PURE__ */ I({
|
|
@@ -115,7 +115,7 @@ const v = (d) => (K("data-v-1d480492"), d = d(), O(), d), Y = {
|
|
|
115
115
|
}, {
|
|
116
116
|
default: S(() => [
|
|
117
117
|
r(o(P), {
|
|
118
|
-
class: "relative z-10 shrink-0",
|
|
118
|
+
class: "relative z-10 shrink-0 fill-current",
|
|
119
119
|
icon: "Play",
|
|
120
120
|
size: "xs"
|
|
121
121
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";UA8HQ,OAAO;;UAAP,OAAO;;AAqPf,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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as q, openBlock as n, createElementBlock as f, Fragment as d, unref as t, createBlock as i, withCtx as m, createVNode as x, createCommentVNode as b, createElementVNode as o, normalizeClass as h, renderList as U, toDisplayString as c } from "vue";
|
|
2
2
|
import { formatMs as w } from "../../libs/formatters.js";
|
|
3
3
|
import { useWorkspace as y } from "../../store/workspace.js";
|
|
4
4
|
import { ListboxButton as C, ListboxOptions as L, ListboxOption as R } from "@headlessui/vue";
|
|
@@ -7,20 +7,20 @@ import { httpStatusCodes as S } from "@scalar/oas-utils/helpers";
|
|
|
7
7
|
import { useRouter as H } from "vue-router";
|
|
8
8
|
import P from "../HttpMethod/HttpMethod.vue.js";
|
|
9
9
|
import { getStatusCodeColor as z } from "./httpStatusCodeColors.js";
|
|
10
|
-
const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = { class: "text-c-2 gap-0" }, V = { class: "font-code text-c-3 flex flex-row items-center gap-1.5 text-sm font-medium" }, Q = /* @__PURE__ */
|
|
10
|
+
const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = { class: "text-c-2 gap-0" }, V = { class: "font-code text-c-3 flex flex-row items-center gap-1.5 text-sm font-medium" }, Q = /* @__PURE__ */ q({
|
|
11
11
|
__name: "AddressBarHistory",
|
|
12
12
|
props: {
|
|
13
13
|
open: { type: Boolean }
|
|
14
14
|
},
|
|
15
15
|
setup($) {
|
|
16
|
-
const { requestsHistory: u, activeRequest:
|
|
16
|
+
const { requestsHistory: u, activeRequest: g, requestExampleMutators: _ } = y(), v = H();
|
|
17
17
|
function p(a, r) {
|
|
18
18
|
const e = new URL(a.responseURL), s = new URLSearchParams(e.search).get("scalar_url");
|
|
19
19
|
return s ? new URL(s)[r].toString() : e.origin;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function k(a) {
|
|
22
22
|
const r = u.value[a];
|
|
23
|
-
|
|
23
|
+
g.value.uid !== r.request.requestUid && v.push(`/request/${r.request.requestUid}`), _.set(r.request);
|
|
24
24
|
}
|
|
25
25
|
return (a, r) => (n(), f(d, null, [
|
|
26
26
|
t(u).length ? (n(), i(t(C), {
|
|
@@ -31,24 +31,25 @@ const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = {
|
|
|
31
31
|
x(t(B), {
|
|
32
32
|
class: "text-c-3",
|
|
33
33
|
icon: "History",
|
|
34
|
-
size: "
|
|
34
|
+
size: "sm",
|
|
35
|
+
thickness: "2.25"
|
|
35
36
|
})
|
|
36
37
|
]),
|
|
37
38
|
_: 1
|
|
38
39
|
})) : b("", !0),
|
|
39
40
|
o("div", {
|
|
40
|
-
class:
|
|
41
|
+
class: h([
|
|
41
42
|
"absolute left-0 top-[33px] w-full rounded before:pointer-events-none before:absolute before:left-0 before:top-[-33px] before:h-[calc(100%+33px)] before:w-full before:rounded z-50",
|
|
42
43
|
{ "before:shadow-lg": a.open }
|
|
43
44
|
])
|
|
44
45
|
}, [
|
|
45
46
|
x(t(L), { class: "bg-b-1 custom-scroll bg-mix-transparent bg-mix-amount-30 max-h-[300px] rounded-b p-[3px] pt-0 backdrop-blur" }, {
|
|
46
47
|
default: m(() => [
|
|
47
|
-
(n(!0), f(d, null,
|
|
48
|
+
(n(!0), f(d, null, U(t(u), ({ response: e }, l) => (n(), i(t(R), {
|
|
48
49
|
key: l,
|
|
49
50
|
class: "ui-active:bg-b-2 text-c-1 ui-active:text-c-1 flex cursor-pointer flex-row gap-2.5 rounded py-1.5 pr-3",
|
|
50
51
|
value: l,
|
|
51
|
-
onClick: (s) =>
|
|
52
|
+
onClick: (s) => k(l)
|
|
52
53
|
}, {
|
|
53
54
|
default: m(() => {
|
|
54
55
|
var s;
|
|
@@ -64,7 +65,7 @@ const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = {
|
|
|
64
65
|
o("div", V, [
|
|
65
66
|
o("span", null, c(t(w)(e.duration)), 1),
|
|
66
67
|
o("span", {
|
|
67
|
-
class:
|
|
68
|
+
class: h([t(z)(e.status).color])
|
|
68
69
|
}, c(e.status), 3),
|
|
69
70
|
o("span", null, c((s = t(S)[e.status]) == null ? void 0 : s.name), 1)
|
|
70
71
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AA0ZA,wBAKG"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarDropdown as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as U, computed as h, resolveComponent as A, unref as s, openBlock as p, createBlock as k, withCtx as a, createElementBlock as S, Fragment as L, renderList as N, createElementVNode as d, normalizeClass as R, createVNode as i, toDisplayString as m, withModifiers as V, createCommentVNode as j } from "vue";
|
|
2
|
+
import { useWorkspace as E } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarDropdown as I, ScalarDropdownItem as g, ScalarIcon as C, ScalarDropdownDivider as M } from "@scalar/components";
|
|
4
|
+
const O = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, W = { class: "flex items-center justify-center h-4 w-4" }, $ = /* @__PURE__ */ d("span", null, "Add Server", -1), F = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "flex whitespace-nowrap items-center font-code lg:text-sm text-xs"
|
|
7
|
-
},
|
|
7
|
+
}, K = /* @__PURE__ */ U({
|
|
8
8
|
__name: "AddressBarServer",
|
|
9
|
-
setup(
|
|
10
|
-
const {
|
|
9
|
+
setup(q) {
|
|
10
|
+
const {
|
|
11
|
+
activeCollection: l,
|
|
12
|
+
activeWorkspace: y,
|
|
13
|
+
isReadOnly: b,
|
|
14
|
+
servers: f,
|
|
15
|
+
collectionMutators: z
|
|
16
|
+
} = E(), u = h(
|
|
11
17
|
() => {
|
|
12
18
|
var e, t;
|
|
13
19
|
return (t = (e = l.value) == null ? void 0 : e.spec.serverUids) == null ? void 0 : t.map((n) => ({
|
|
@@ -15,16 +21,16 @@ const M = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, O = { cl
|
|
|
15
21
|
label: f[n].url
|
|
16
22
|
}));
|
|
17
23
|
}
|
|
18
|
-
),
|
|
19
|
-
l.value &&
|
|
24
|
+
), B = (e) => {
|
|
25
|
+
l.value && z.edit(
|
|
20
26
|
l.value.uid,
|
|
21
27
|
"selectedServerUid",
|
|
22
28
|
e
|
|
23
29
|
);
|
|
24
|
-
},
|
|
30
|
+
}, D = (e) => {
|
|
25
31
|
var t;
|
|
26
32
|
return ((t = l.value) == null ? void 0 : t.selectedServerUid) === e;
|
|
27
|
-
},
|
|
33
|
+
}, v = h(() => {
|
|
28
34
|
var c;
|
|
29
35
|
const e = f[((c = l.value) == null ? void 0 : c.selectedServerUid) ?? ""], t = e == null ? void 0 : e.url, n = /{\s*([\w.-]+)\s*}/g;
|
|
30
36
|
return t == null ? void 0 : t.replace(n, (r, x) => {
|
|
@@ -35,8 +41,8 @@ const M = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, O = { cl
|
|
|
35
41
|
});
|
|
36
42
|
return (e, t) => {
|
|
37
43
|
var c;
|
|
38
|
-
const n =
|
|
39
|
-
return u.value && u.value.length > 0 && !s(
|
|
44
|
+
const n = A("RouterLink");
|
|
45
|
+
return u.value && u.value.length > 0 && !s(b) ? (p(), k(s(I), {
|
|
40
46
|
key: 0,
|
|
41
47
|
options: u.value,
|
|
42
48
|
resize: "",
|
|
@@ -44,46 +50,47 @@ const M = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, O = { cl
|
|
|
44
50
|
value: (c = s(l)) == null ? void 0 : c.selectedServerUid
|
|
45
51
|
}, {
|
|
46
52
|
items: a(() => [
|
|
47
|
-
(p(!0), S(
|
|
53
|
+
(p(!0), S(L, null, N(u.value, (r) => (p(), k(s(g), {
|
|
48
54
|
key: r.id,
|
|
49
55
|
class: "flex !gap-1.5 group font-code text-xxs whitespace-nowrap text-ellipsis overflow-hidden",
|
|
50
56
|
value: r.id,
|
|
51
|
-
onClick: (x) =>
|
|
57
|
+
onClick: (x) => B(r.id)
|
|
52
58
|
}, {
|
|
53
59
|
default: a(() => [
|
|
54
60
|
d("div", {
|
|
55
|
-
class:
|
|
61
|
+
class: R([
|
|
56
62
|
"flex size-4 items-center justify-center rounded-full p-[3px] group-hover:shadow-border",
|
|
57
|
-
|
|
63
|
+
D(r.id) ? "bg-blue text-b-1" : "text-transparent"
|
|
58
64
|
])
|
|
59
65
|
}, [
|
|
60
66
|
i(s(C), {
|
|
61
|
-
class: "relative top-[0.5px] size-2.5
|
|
62
|
-
icon: "Checkmark"
|
|
67
|
+
class: "relative top-[0.5px] size-2.5",
|
|
68
|
+
icon: "Checkmark",
|
|
69
|
+
thickness: "3.5"
|
|
63
70
|
})
|
|
64
71
|
], 2),
|
|
65
|
-
d("span",
|
|
72
|
+
d("span", O, m(r.label), 1)
|
|
66
73
|
]),
|
|
67
74
|
_: 2
|
|
68
75
|
}, 1032, ["value", "onClick"]))), 128)),
|
|
69
|
-
i(s(
|
|
76
|
+
i(s(M)),
|
|
70
77
|
i(s(g), null, {
|
|
71
78
|
default: a(() => [
|
|
72
79
|
i(n, {
|
|
73
80
|
class: "font-code text-xxs flex items-center gap-1.5",
|
|
74
|
-
to:
|
|
81
|
+
to: `/workspace/${s(y).uid}/servers`
|
|
75
82
|
}, {
|
|
76
83
|
default: a(() => [
|
|
77
|
-
d("div",
|
|
84
|
+
d("div", W, [
|
|
78
85
|
i(s(C), {
|
|
79
86
|
class: "h-2.5",
|
|
80
87
|
icon: "Add"
|
|
81
88
|
})
|
|
82
89
|
]),
|
|
83
|
-
|
|
90
|
+
$
|
|
84
91
|
]),
|
|
85
92
|
_: 1
|
|
86
|
-
})
|
|
93
|
+
}, 8, ["to"])
|
|
87
94
|
]),
|
|
88
95
|
_: 1
|
|
89
96
|
})
|
|
@@ -92,15 +99,15 @@ const M = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, O = { cl
|
|
|
92
99
|
d("button", {
|
|
93
100
|
class: "font-code lg:text-sm text-xs whitespace-nowrap border border-b-3 border-solid rounded px-1.5 text-c-2 z-[1]",
|
|
94
101
|
type: "button",
|
|
95
|
-
onClick: t[0] || (t[0] =
|
|
102
|
+
onClick: t[0] || (t[0] = V(() => {
|
|
96
103
|
}, ["stop"]))
|
|
97
|
-
}, v
|
|
104
|
+
}, m(v.value), 1)
|
|
98
105
|
]),
|
|
99
106
|
_: 1
|
|
100
|
-
}, 8, ["options", "value"])) :
|
|
107
|
+
}, 8, ["options", "value"])) : v.value ? (p(), S("div", F, m(v.value), 1)) : j("", !0);
|
|
101
108
|
};
|
|
102
109
|
}
|
|
103
110
|
});
|
|
104
111
|
export {
|
|
105
|
-
|
|
112
|
+
K as default
|
|
106
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPalette.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPalette.vue"],"names":[],"mappings":"AA4TA,OAAO,EAAa,KAAK,UAAU,EAAc,MAAM,oBAAoB,CAAA;;WAclE,UAAU;;WAAV,UAAU;;AAgYnB,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 "./CommandPalette.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5cb69a70"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as I, ref as f, computed as B, openBlock as r, createElementBlock as s, Fragment as m, withDirectives as p, createElementVNode as a, vShow as A, createVNode as y, unref as g, vModelText as D, renderList as $, toDisplayString as E, normalizeClass as F, createTextVNode as
|
|
1
|
+
import { defineComponent as I, ref as f, computed as B, openBlock as r, createElementBlock as s, Fragment as m, withDirectives as p, createElementVNode as a, vShow as A, createVNode as y, unref as g, vModelText as D, renderList as $, toDisplayString as E, normalizeClass as F, createTextVNode as q, createBlock as M, resolveDynamicComponent as N } from "vue";
|
|
2
2
|
import { ScalarIcon as L } from "@scalar/components";
|
|
3
3
|
import { useMagicKeys as P, whenever as C } from "@vueuse/core";
|
|
4
4
|
import { useRouter as T } from "vue-router";
|
|
@@ -13,13 +13,13 @@ const W = { class: "commandmenu" }, j = { class: "bg-b-2 flex items-center round
|
|
|
13
13
|
state: {}
|
|
14
14
|
},
|
|
15
15
|
setup(V) {
|
|
16
|
-
const i = V,
|
|
16
|
+
const i = V, h = T(), z = {
|
|
17
17
|
"Import Collection": K,
|
|
18
18
|
"Create Request": Q,
|
|
19
19
|
"Add Folder": H,
|
|
20
20
|
"Create Collection": U,
|
|
21
21
|
"Add Example": G
|
|
22
|
-
},
|
|
22
|
+
}, b = [
|
|
23
23
|
{
|
|
24
24
|
label: "Add to Request Sidebar",
|
|
25
25
|
commands: [
|
|
@@ -51,22 +51,22 @@ const W = { class: "commandmenu" }, j = { class: "bg-b-2 flex items-center round
|
|
|
51
51
|
{
|
|
52
52
|
name: "Add Server",
|
|
53
53
|
icon: "Brackets",
|
|
54
|
-
overloadAction: () =>
|
|
54
|
+
overloadAction: () => h.push("/servers")
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
name: "Add Environment",
|
|
58
58
|
icon: "Server",
|
|
59
|
-
overloadAction: () =>
|
|
59
|
+
overloadAction: () => h.push("/environment")
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
name: "Add Cookie",
|
|
63
63
|
icon: "Cookie",
|
|
64
|
-
overloadAction: () =>
|
|
64
|
+
overloadAction: () => h.push("/cookies")
|
|
65
65
|
}
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
], d = P(), c = f(""), u = f(""), t = f(0), w = f([]), k = B(
|
|
69
|
-
() =>
|
|
69
|
+
() => b.reduce((e, n) => {
|
|
70
70
|
const l = n.commands.filter(
|
|
71
71
|
(v) => v.name.toLowerCase().includes(c.value.toLowerCase())
|
|
72
72
|
);
|
|
@@ -112,19 +112,19 @@ const W = { class: "commandmenu" }, j = { class: "bg-b-2 flex items-center round
|
|
|
112
112
|
onClick: n[2] || (n[2] = (l) => u.value = "")
|
|
113
113
|
}, [
|
|
114
114
|
y(g(L), {
|
|
115
|
-
class: "!stroke-1.5",
|
|
116
115
|
icon: "ChevronLeft",
|
|
117
116
|
size: "sm"
|
|
118
117
|
})
|
|
119
118
|
]),
|
|
120
|
-
(r(),
|
|
119
|
+
(r(), M(N(z[u.value]), { onClose: S }, null, 32))
|
|
121
120
|
], 64)) : (r(), s(m, { key: 0 }, [
|
|
122
121
|
a("div", j, [
|
|
123
122
|
a("label", J, [
|
|
124
123
|
y(g(L), {
|
|
125
|
-
class: "text-c-1 mr-2.5
|
|
126
|
-
icon: "
|
|
127
|
-
size: "sm"
|
|
124
|
+
class: "text-c-1 mr-2.5",
|
|
125
|
+
icon: "Search",
|
|
126
|
+
size: "sm",
|
|
127
|
+
thickness: "1.5"
|
|
128
128
|
})
|
|
129
129
|
]),
|
|
130
130
|
p(a("input", {
|
|
@@ -137,7 +137,7 @@ const W = { class: "commandmenu" }, j = { class: "bg-b-2 flex items-center round
|
|
|
137
137
|
[D, c.value]
|
|
138
138
|
])
|
|
139
139
|
]),
|
|
140
|
-
(r(), s(m, null, $(
|
|
140
|
+
(r(), s(m, null, $(b, (l, v) => (r(), s(m, {
|
|
141
141
|
key: l.label
|
|
142
142
|
}, [
|
|
143
143
|
p(a("div", { class: "text-c-3 font-medium text-xs mt-2" }, E(l.label), 513), [
|
|
@@ -157,7 +157,7 @@ const W = { class: "commandmenu" }, j = { class: "bg-b-2 flex items-center round
|
|
|
157
157
|
x && (w.value[_] = x);
|
|
158
158
|
},
|
|
159
159
|
class: F(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
|
|
160
|
-
"bg-b-2": v > 0 ? t.value === _ +
|
|
160
|
+
"bg-b-2": v > 0 ? t.value === _ + b[v - 1].commands.length : t.value === _
|
|
161
161
|
}]),
|
|
162
162
|
onClick: (x) => {
|
|
163
163
|
var R;
|
|
@@ -165,11 +165,12 @@ const W = { class: "commandmenu" }, j = { class: "bg-b-2 flex items-center round
|
|
|
165
165
|
}
|
|
166
166
|
}, [
|
|
167
167
|
y(g(L), {
|
|
168
|
-
class: "text-c-1 mr-2.5
|
|
168
|
+
class: "text-c-1 mr-2.5",
|
|
169
169
|
icon: o.icon,
|
|
170
|
-
size: "md"
|
|
170
|
+
size: "md",
|
|
171
|
+
thickness: "1.5"
|
|
171
172
|
}, null, 8, ["icon"]),
|
|
172
|
-
|
|
173
|
+
q(" " + E(o.name), 1)
|
|
173
174
|
], 10, O))), 128))
|
|
174
175
|
], 64))), 64))
|
|
175
176
|
], 64))
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as c, openBlock as
|
|
1
|
+
import { defineComponent as c, openBlock as i, createElementBlock as l, unref as e, createVNode as r, withCtx as s, createTextVNode as p, toDisplayString as d } from "vue";
|
|
2
2
|
import m from "../ScreenReader.vue.js";
|
|
3
3
|
import { ScalarIcon as u } from "@scalar/components";
|
|
4
4
|
import { useDarkModeState as f } from "../../hooks/useDarkModeState.js";
|
|
5
|
-
const
|
|
5
|
+
const b = /* @__PURE__ */ c({
|
|
6
6
|
__name: "DarkModeIconToggle",
|
|
7
7
|
setup(g) {
|
|
8
8
|
const { toggleDarkMode: t, isDark: n } = f();
|
|
9
|
-
return (k, o) => (
|
|
9
|
+
return (k, o) => (i(), l("button", {
|
|
10
10
|
class: "w-[37px] hover:bg-b-2 flex items-center justify-center rounded-lg p-[7px]",
|
|
11
11
|
type: "button",
|
|
12
12
|
onClick: o[0] || (o[0] = //@ts-ignore
|
|
13
13
|
(...a) => e(t) && e(t)(...a))
|
|
14
14
|
}, [
|
|
15
15
|
r(e(u), {
|
|
16
|
-
class: "block h-6 w-6
|
|
17
|
-
icon: "LightDarkModeToggle"
|
|
16
|
+
class: "block h-6 w-6",
|
|
17
|
+
icon: "LightDarkModeToggle",
|
|
18
|
+
thickness: "1.5"
|
|
18
19
|
}),
|
|
19
20
|
r(m, null, {
|
|
20
21
|
default: s(() => [
|
|
@@ -26,5 +27,5 @@ const h = /* @__PURE__ */ c({
|
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
b as default
|
|
30
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCheckbox.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCheckbox.vue"],"names":[],"mappings":";gBAyCc,OAAO;eACR,OAAO;;;;gBADN,OAAO;eACR,OAAO;;;;AAoGpB,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
1
|
import { defineComponent as a, openBlock as l, createBlock as s, withCtx as n, createElementVNode as t, createVNode as c, unref as d } from "vue";
|
|
2
2
|
import { ScalarIcon as i } from "@scalar/components";
|
|
3
3
|
import f from "./DataTableCell.vue.js";
|
|
4
|
-
const p = ["checked", "disabled"], b = { class: "w-full h-full flex items-center justify-center centered text-border peer-checked:text-c-2 pointer-events-none absolute
|
|
4
|
+
const p = ["checked", "disabled"], b = { class: "w-full h-full flex items-center justify-center centered text-border peer-checked:text-c-2 pointer-events-none absolute before:absolute before:opacity-0 group-hover/cell:before:opacity-100 before:border before:rounded before:w-9/12 before:aspect-square before:top-1/2 before:left-1/2 before:transform before:-translate-x-1/2 before:-translate-y-1/2 before:border-[1px]" }, x = /* @__PURE__ */ a({
|
|
5
5
|
__name: "DataTableCheckbox",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: { type: Boolean },
|
|
@@ -22,7 +22,8 @@ const p = ["checked", "disabled"], b = { class: "w-full h-full flex items-center
|
|
|
22
22
|
t("div", b, [
|
|
23
23
|
c(d(i), {
|
|
24
24
|
icon: "Checkmark",
|
|
25
|
-
size: "xs"
|
|
25
|
+
size: "xs",
|
|
26
|
+
thickness: "2.5"
|
|
26
27
|
})
|
|
27
28
|
])
|
|
28
29
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputSelect.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputSelect.vue"],"names":[],"mappings":";gBA0Ic,MAAM,GAAG,MAAM;YACnB,MAAM,EAAE;;;;gBADJ,MAAM,GAAG,MAAM;YACnB,MAAM,EAAE;;;;AAyTlB,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"}
|