@scalar/api-client 2.0.46 → 2.0.48
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 +44 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +77 -71
- package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +49 -44
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -106
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +1 -1
- package/dist/components/Search/SearchModal.vue2.js +43 -41
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +22 -19
- package/dist/components/Sidebar/Sidebar.vue.d.ts +24 -3
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +57 -19
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +46 -43
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/layouts/App/ApiClientApp.vue.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +56 -46
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +20 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +112 -92
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +56 -46
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/{command-palette.d.ts → command-palette-bus.d.ts} +1 -1
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/{execute-requestBus.d.ts → execute-request-bus.d.ts} +1 -1
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts +33 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-keys-bus.js +33 -0
- package/dist/libs/event-busses/index.d.ts +3 -3
- package/dist/libs/event-busses/index.d.ts.map +1 -1
- package/dist/libs/event-busses/index.js +3 -3
- package/dist/libs/index.js +3 -3
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +15 -30
- package/dist/router.d.ts +2 -2
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +3 -3
- package/dist/store/workspace.d.ts +112 -92
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +140 -137
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -15
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +114 -55
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +21 -20
- 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 +132 -128
- 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 +253 -139
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +27 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +83 -158
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +214 -70
- package/package.json +6 -6
- package/dist/libs/event-busses/command-palette.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-requestBus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-key.d.ts +0 -34
- package/dist/libs/event-busses/hot-key.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-key.js +0 -25
- /package/dist/libs/event-busses/{command-palette.js → command-palette-bus.js} +0 -0
- /package/dist/libs/event-busses/{execute-requestBus.js → execute-request-bus.js} +0 -0
|
@@ -1,168 +1,93 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { useModal as I, ScalarDropdown as L, ScalarDropdownItem as v, ScalarIcon as u, ScalarButton as h, ScalarModal as N, ScalarTextField as O } from "@scalar/components";
|
|
6
|
-
import { useRouter as Q } from "vue-router";
|
|
7
|
-
import { commandPaletteBus as X } from "../../libs/event-busses/command-palette.js";
|
|
8
|
-
const x = (o) => (j("data-v-52248ee9"), o = o(), G(), o), Y = /* @__PURE__ */ x(() => /* @__PURE__ */ d("span", null, "Add Example", -1)), Z = /* @__PURE__ */ x(() => /* @__PURE__ */ d("span", null, "Rename", -1)), ee = /* @__PURE__ */ x(() => /* @__PURE__ */ d("span", null, "Delete", -1)), te = { class: "flex gap-3" }, me = /* @__PURE__ */ V({
|
|
1
|
+
import { defineComponent as _, computed as g, openBlock as u, createBlock as f, unref as e, withCtx as o, createVNode as t, createCommentVNode as C, pushScopeId as S, popScopeId as v, createElementVNode as c } from "vue";
|
|
2
|
+
import { ScalarDropdown as y, ScalarDropdownItem as r, ScalarIcon as i, ScalarButton as z } from "@scalar/components";
|
|
3
|
+
import { commandPaletteBus as E } from "../../libs/event-busses/command-palette-bus.js";
|
|
4
|
+
const m = (a) => (S("data-v-5686fba5"), a = a(), v(), a), I = /* @__PURE__ */ m(() => /* @__PURE__ */ c("span", null, "Add Example", -1)), b = /* @__PURE__ */ m(() => /* @__PURE__ */ c("span", null, "Rename", -1)), B = /* @__PURE__ */ m(() => /* @__PURE__ */ c("span", null, "Delete", -1)), N = /* @__PURE__ */ _({
|
|
9
5
|
__name: "RequestSidebarItemMenu",
|
|
10
6
|
props: {
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
item: {},
|
|
8
|
+
resourceTitle: {},
|
|
9
|
+
static: { type: Boolean, default: !1 }
|
|
13
10
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
activeRouterParams: g,
|
|
18
|
-
collectionMutators: _,
|
|
19
|
-
folderMutators: w,
|
|
20
|
-
requestMutators: y,
|
|
21
|
-
requestExampleMutators: C
|
|
22
|
-
} = J(), { replace: q } = Q(), U = () => X.emit({
|
|
11
|
+
emits: ["delete", "rename"],
|
|
12
|
+
setup(a, { emit: x }) {
|
|
13
|
+
const l = a, d = x, h = () => E.emit({
|
|
23
14
|
commandName: "Add Example",
|
|
24
|
-
metaData:
|
|
25
|
-
}),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
i(t(L), { teleport: "#scalar-client" }, {
|
|
43
|
-
items: l(() => [
|
|
44
|
-
$.value ? (b(), P(t(v), {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: "flex !gap-2",
|
|
47
|
-
onClick: U
|
|
48
|
-
}, {
|
|
49
|
-
default: l(() => [
|
|
50
|
-
i(t(u), {
|
|
51
|
-
class: "inline-flex",
|
|
52
|
-
icon: "Add",
|
|
53
|
-
size: "sm",
|
|
54
|
-
thickness: "1.5"
|
|
55
|
-
}),
|
|
56
|
-
Y
|
|
57
|
-
]),
|
|
58
|
-
_: 1
|
|
59
|
-
})) : T("", !0),
|
|
60
|
-
i(t(v), {
|
|
61
|
-
class: "flex !gap-2",
|
|
62
|
-
onClick: z
|
|
63
|
-
}, {
|
|
64
|
-
default: l(() => [
|
|
65
|
-
i(t(u), {
|
|
66
|
-
class: "inline-flex",
|
|
67
|
-
icon: "Edit",
|
|
68
|
-
size: "sm",
|
|
69
|
-
thickness: "1.5"
|
|
70
|
-
}),
|
|
71
|
-
Z
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
}),
|
|
75
|
-
i(t(v), {
|
|
76
|
-
class: "flex !gap-2",
|
|
77
|
-
onClick: a[1] || (a[1] = (n) => t(c).show())
|
|
78
|
-
}, {
|
|
79
|
-
default: l(() => [
|
|
80
|
-
i(t(u), {
|
|
81
|
-
class: "inline-flex",
|
|
82
|
-
icon: "Trash",
|
|
83
|
-
size: "sm",
|
|
84
|
-
thickness: "1.5"
|
|
85
|
-
}),
|
|
86
|
-
ee
|
|
87
|
-
]),
|
|
88
|
-
_: 1
|
|
89
|
-
})
|
|
90
|
-
]),
|
|
91
|
-
default: l(() => [
|
|
92
|
-
i(t(h), {
|
|
93
|
-
class: "px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex ui-open:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit",
|
|
94
|
-
size: "sm",
|
|
95
|
-
variant: "ghost",
|
|
96
|
-
onClick: a[0] || (a[0] = (n) => {
|
|
97
|
-
(r.value === "Collection" || r.value === "Folder") && n.stopPropagation();
|
|
98
|
-
})
|
|
99
|
-
}, {
|
|
100
|
-
default: l(() => [
|
|
101
|
-
i(t(u), {
|
|
102
|
-
icon: "Ellipses",
|
|
103
|
-
size: "sm"
|
|
104
|
-
})
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
})
|
|
108
|
-
]),
|
|
109
|
-
_: 1
|
|
110
|
-
}),
|
|
111
|
-
i(t(N), {
|
|
112
|
-
size: "sm",
|
|
113
|
-
state: t(c),
|
|
114
|
-
title: `Delete ${r.value}`
|
|
115
|
-
}, {
|
|
116
|
-
default: l(() => [
|
|
117
|
-
i(H, {
|
|
118
|
-
variableName: M.value,
|
|
119
|
-
warningMessage: "Warning: Deleting this will delete all items inside of this",
|
|
120
|
-
onClose: a[2] || (a[2] = (n) => t(c).hide()),
|
|
121
|
-
onDelete: D
|
|
122
|
-
}, null, 8, ["variableName"])
|
|
123
|
-
]),
|
|
124
|
-
_: 1
|
|
125
|
-
}, 8, ["state", "title"]),
|
|
126
|
-
i(t(N), {
|
|
127
|
-
state: t(m),
|
|
128
|
-
title: `Rename ${r.value}`
|
|
129
|
-
}, {
|
|
130
|
-
default: l(() => [
|
|
131
|
-
i(t(O), {
|
|
132
|
-
modelValue: s.value,
|
|
133
|
-
"onUpdate:modelValue": a[3] || (a[3] = (n) => s.value = n),
|
|
134
|
-
label: r.value,
|
|
135
|
-
labelShadowColor: "var(--scalar-background-1)",
|
|
136
|
-
onKeydown: K(W(S, ["prevent"]), ["enter"])
|
|
137
|
-
}, null, 8, ["modelValue", "label", "onKeydown"]),
|
|
138
|
-
d("div", te, [
|
|
139
|
-
i(t(h), {
|
|
140
|
-
class: "flex-1",
|
|
141
|
-
variant: "outlined",
|
|
142
|
-
onClick: a[4] || (a[4] = (n) => t(m).hide())
|
|
143
|
-
}, {
|
|
144
|
-
default: l(() => [
|
|
145
|
-
E(" Cancel ")
|
|
146
|
-
]),
|
|
147
|
-
_: 1
|
|
15
|
+
metaData: l.item.uid
|
|
16
|
+
}), k = g(() => "summary" in l.item);
|
|
17
|
+
return (p, s) => (u(), f(e(y), {
|
|
18
|
+
static: p.static,
|
|
19
|
+
teleport: !p.static
|
|
20
|
+
}, {
|
|
21
|
+
items: o(() => [
|
|
22
|
+
k.value ? (u(), f(e(r), {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "flex !gap-2",
|
|
25
|
+
onClick: h
|
|
26
|
+
}, {
|
|
27
|
+
default: o(() => [
|
|
28
|
+
t(e(i), {
|
|
29
|
+
class: "inline-flex",
|
|
30
|
+
icon: "Add",
|
|
31
|
+
size: "sm",
|
|
32
|
+
thickness: "1.5"
|
|
148
33
|
}),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
34
|
+
I
|
|
35
|
+
]),
|
|
36
|
+
_: 1
|
|
37
|
+
})) : C("", !0),
|
|
38
|
+
t(e(r), {
|
|
39
|
+
class: "flex !gap-2",
|
|
40
|
+
onClick: s[1] || (s[1] = (n) => d("rename"))
|
|
41
|
+
}, {
|
|
42
|
+
default: o(() => [
|
|
43
|
+
t(e(i), {
|
|
44
|
+
class: "inline-flex",
|
|
45
|
+
icon: "Edit",
|
|
46
|
+
size: "sm",
|
|
47
|
+
thickness: "1.5"
|
|
48
|
+
}),
|
|
49
|
+
b
|
|
50
|
+
]),
|
|
51
|
+
_: 1
|
|
52
|
+
}),
|
|
53
|
+
t(e(r), {
|
|
54
|
+
class: "flex !gap-2",
|
|
55
|
+
onClick: s[2] || (s[2] = (n) => d("delete"))
|
|
56
|
+
}, {
|
|
57
|
+
default: o(() => [
|
|
58
|
+
t(e(i), {
|
|
59
|
+
class: "inline-flex",
|
|
60
|
+
icon: "Trash",
|
|
61
|
+
size: "sm",
|
|
62
|
+
thickness: "1.5"
|
|
63
|
+
}),
|
|
64
|
+
B
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
})
|
|
68
|
+
]),
|
|
69
|
+
default: o(() => [
|
|
70
|
+
t(e(z), {
|
|
71
|
+
class: "px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex ui-open:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit",
|
|
72
|
+
size: "sm",
|
|
73
|
+
variant: "ghost",
|
|
74
|
+
onClick: s[0] || (s[0] = (n) => {
|
|
75
|
+
(l.resourceTitle === "Collection" || l.resourceTitle === "Folder") && n.stopPropagation();
|
|
76
|
+
})
|
|
77
|
+
}, {
|
|
78
|
+
default: o(() => [
|
|
79
|
+
t(e(i), {
|
|
80
|
+
icon: "Ellipses",
|
|
81
|
+
size: "sm"
|
|
158
82
|
})
|
|
159
|
-
])
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
})
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["static", "teleport"]));
|
|
164
89
|
}
|
|
165
90
|
});
|
|
166
91
|
export {
|
|
167
|
-
|
|
92
|
+
N as default
|
|
168
93
|
};
|
|
@@ -3,7 +3,7 @@ import h from "../../../assets/computer.ascii.js";
|
|
|
3
3
|
import x from "../../../components/ScalarAsciiArt.vue.js";
|
|
4
4
|
import i from "../../../components/ScalarHotkey.vue.js";
|
|
5
5
|
import { useWorkspace as k } from "../../../store/workspace.js";
|
|
6
|
-
import { executeRequestBus as v } from "../../../libs/event-busses/execute-
|
|
6
|
+
import { executeRequestBus as v } from "../../../libs/event-busses/execute-request-bus.js";
|
|
7
7
|
const p = (t) => (_("data-v-84b69d7e"), t = t(), f(), t), y = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, b = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, R = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "scalar-version-number"
|
|
@@ -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":";AAq7BA,wBAKG"}
|
|
@@ -1,80 +1,224 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as K, computed as O, ref as W, openBlock as p, createElementBlock as D, Fragment as S, createElementVNode as a, createVNode as t, unref as e, withCtx as s, renderList as U, createBlock as x, withModifiers as h, normalizeClass as A, createTextVNode as k, toDisplayString as z, withKeys as F } from "vue";
|
|
2
|
+
import I from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import { useWorkspace as L } from "../../../store/workspace.js";
|
|
4
|
+
import { useModal as $, ScalarDropdown as N, ScalarContextMenu as P, ScalarDropdownItem as m, ScalarIcon as c, ScalarTooltip as q, ScalarDropdownDivider as G, ScalarButton as _, ScalarModal as V, ScalarTextField as H } from "@scalar/components";
|
|
5
|
+
import { useRouter as J } from "vue-router";
|
|
6
|
+
import { commandPaletteBus as Q } from "../../../libs/event-busses/command-palette-bus.js";
|
|
7
|
+
const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm" }, Y = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Z = /* @__PURE__ */ a("span", null, "Rename", -1), ee = /* @__PURE__ */ a("span", null, "Delete", -1), te = /* @__PURE__ */ a("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
8
|
+
/* @__PURE__ */ a("div", { class: "flex items-center text-c-2" }, [
|
|
9
|
+
/* @__PURE__ */ a("span", null, "Only workspace cannot be deleted.")
|
|
10
|
+
])
|
|
11
|
+
], -1), se = /* @__PURE__ */ a("span", null, "Delete", -1), ae = { class: "flex items-center justify-center h-4 w-4" }, le = /* @__PURE__ */ a("span", null, "Create new workspace", -1), ne = { class: "flex gap-3" }, me = /* @__PURE__ */ K({
|
|
7
12
|
__name: "WorkspaceDropdown",
|
|
8
|
-
setup(
|
|
9
|
-
const { activeWorkspace:
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
setup(oe) {
|
|
14
|
+
const { activeWorkspace: f, workspaces: d, workspaceMutators: g } = L(), { push: b } = J(), j = (l) => {
|
|
15
|
+
l !== f.value.uid && b(`/workspace/${l}`);
|
|
16
|
+
}, y = O(() => Object.keys(d).length === 1), B = () => Q.emit({ commandName: "Create Workspace" }), o = W(""), i = W(""), v = $(), w = $(), R = (l) => {
|
|
17
|
+
o.value = d[l].name, i.value = l, v.show();
|
|
18
|
+
}, C = () => {
|
|
19
|
+
o.value.trim() && (g.rename(i.value, o.value.trim()), v.hide());
|
|
20
|
+
}, T = (l) => {
|
|
21
|
+
o.value = d[l].name, i.value = l, w.show();
|
|
22
|
+
}, E = async () => {
|
|
23
|
+
if (!y.value) {
|
|
24
|
+
const l = f.value.uid === i.value, n = { ...d };
|
|
25
|
+
if (delete n[i.value], g.delete(i.value), l) {
|
|
26
|
+
const r = Object.keys(n)[0];
|
|
27
|
+
await b(`/workspace/${r}/`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
w.hide();
|
|
31
|
+
};
|
|
32
|
+
return (l, n) => (p(), D(S, null, [
|
|
33
|
+
a("div", X, [
|
|
34
|
+
t(e(N), null, {
|
|
35
|
+
items: s(() => [
|
|
36
|
+
(p(!0), D(S, null, U(e(d), (r, u) => (p(), x(e(P), { key: u }, {
|
|
37
|
+
trigger: s(() => [
|
|
38
|
+
t(e(m), {
|
|
39
|
+
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
40
|
+
onClick: h((M) => j(u), ["stop"])
|
|
41
|
+
}, {
|
|
42
|
+
default: s(() => [
|
|
43
|
+
a("div", {
|
|
44
|
+
class: A([
|
|
45
|
+
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
46
|
+
e(f).uid === u ? "bg-blue text-b-1" : "text-transparent"
|
|
47
|
+
])
|
|
48
|
+
}, [
|
|
49
|
+
t(e(c), {
|
|
50
|
+
class: "size-2.5",
|
|
51
|
+
icon: "Checkmark",
|
|
52
|
+
thickness: "3.5"
|
|
53
|
+
})
|
|
54
|
+
], 2),
|
|
55
|
+
k(" " + z(r.name), 1)
|
|
56
|
+
]),
|
|
57
|
+
_: 2
|
|
58
|
+
}, 1032, ["onClick"])
|
|
59
|
+
]),
|
|
60
|
+
content: s(() => [
|
|
61
|
+
t(e(N), { static: "" }, {
|
|
62
|
+
items: s(() => [
|
|
63
|
+
t(e(m), {
|
|
64
|
+
class: "flex !gap-2",
|
|
65
|
+
onMousedown: (M) => R(u)
|
|
66
|
+
}, {
|
|
67
|
+
default: s(() => [
|
|
68
|
+
t(e(c), {
|
|
69
|
+
class: "inline-flex",
|
|
70
|
+
icon: "Edit",
|
|
71
|
+
size: "sm",
|
|
72
|
+
thickness: "1.5"
|
|
73
|
+
}),
|
|
74
|
+
Z
|
|
75
|
+
]),
|
|
76
|
+
_: 2
|
|
77
|
+
}, 1032, ["onMousedown"]),
|
|
78
|
+
y.value ? (p(), x(e(q), {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: "z-10",
|
|
81
|
+
side: "bottom"
|
|
82
|
+
}, {
|
|
83
|
+
trigger: s(() => [
|
|
84
|
+
t(e(m), {
|
|
85
|
+
class: "flex w-full",
|
|
86
|
+
disabled: "",
|
|
87
|
+
onMousedown: n[0] || (n[0] = h(() => {
|
|
88
|
+
}, ["prevent"]))
|
|
89
|
+
}, {
|
|
90
|
+
default: s(() => [
|
|
91
|
+
t(e(c), {
|
|
92
|
+
class: "inline-flex",
|
|
93
|
+
icon: "Trash",
|
|
94
|
+
size: "sm",
|
|
95
|
+
thickness: "1.5"
|
|
96
|
+
}),
|
|
97
|
+
ee
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
101
|
+
]),
|
|
102
|
+
content: s(() => [
|
|
103
|
+
te
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
})) : (p(), x(e(m), {
|
|
107
|
+
key: 1,
|
|
108
|
+
class: "flex !gap-2",
|
|
109
|
+
onMousedown: h((M) => T(u), ["prevent"])
|
|
110
|
+
}, {
|
|
111
|
+
default: s(() => [
|
|
112
|
+
t(e(c), {
|
|
113
|
+
class: "inline-flex",
|
|
114
|
+
icon: "Trash",
|
|
115
|
+
size: "sm",
|
|
116
|
+
thickness: "1.5"
|
|
117
|
+
}),
|
|
118
|
+
se
|
|
119
|
+
]),
|
|
120
|
+
_: 2
|
|
121
|
+
}, 1032, ["onMousedown"]))
|
|
122
|
+
]),
|
|
123
|
+
_: 2
|
|
124
|
+
}, 1024)
|
|
125
|
+
]),
|
|
126
|
+
_: 2
|
|
127
|
+
}, 1024))), 128)),
|
|
128
|
+
t(e(G)),
|
|
129
|
+
t(e(m), {
|
|
130
|
+
class: "flex items-center gap-1.5",
|
|
131
|
+
onClick: B
|
|
132
|
+
}, {
|
|
133
|
+
default: s(() => [
|
|
134
|
+
a("div", ae, [
|
|
135
|
+
t(e(c), {
|
|
136
|
+
class: "h-2.5",
|
|
137
|
+
icon: "Add"
|
|
138
|
+
})
|
|
139
|
+
]),
|
|
140
|
+
le
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
})
|
|
144
|
+
]),
|
|
145
|
+
default: s(() => [
|
|
146
|
+
t(e(_), {
|
|
147
|
+
class: "font-normal h-full justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
148
|
+
fullWidth: "",
|
|
149
|
+
variant: "ghost"
|
|
150
|
+
}, {
|
|
151
|
+
default: s(() => [
|
|
152
|
+
a("h2", Y, [
|
|
153
|
+
k(z(e(f).name) + " ", 1),
|
|
154
|
+
t(e(c), {
|
|
155
|
+
class: "size-2.5",
|
|
156
|
+
icon: "ChevronDown",
|
|
157
|
+
thickness: "3.5"
|
|
158
|
+
})
|
|
25
159
|
])
|
|
26
|
-
}, [
|
|
27
|
-
t(e(l), {
|
|
28
|
-
class: "size-2.5",
|
|
29
|
-
icon: "Checkmark",
|
|
30
|
-
thickness: "3.5"
|
|
31
|
-
})
|
|
32
|
-
], 2),
|
|
33
|
-
m(" " + p(_.name), 1)
|
|
34
|
-
]),
|
|
35
|
-
_: 2
|
|
36
|
-
}, 1032, ["onClick"]))), 128)),
|
|
37
|
-
t(e(S)),
|
|
38
|
-
t(e(d), {
|
|
39
|
-
class: "flex items-center gap-1.5",
|
|
40
|
-
onClick: x
|
|
41
|
-
}, {
|
|
42
|
-
default: o(() => [
|
|
43
|
-
r("div", V, [
|
|
44
|
-
t(e(l), {
|
|
45
|
-
class: "h-2.5",
|
|
46
|
-
icon: "Add"
|
|
47
|
-
})
|
|
48
160
|
]),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
161
|
+
_: 1
|
|
162
|
+
})
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
})
|
|
166
|
+
]),
|
|
167
|
+
t(e(V), {
|
|
168
|
+
size: "sm",
|
|
169
|
+
state: e(w),
|
|
170
|
+
title: `Delete ${o.value}`
|
|
171
|
+
}, {
|
|
172
|
+
default: s(() => [
|
|
173
|
+
t(I, {
|
|
174
|
+
variableName: o.value,
|
|
175
|
+
warningMessage: "Warning: Deleting this will delete all items inside of this",
|
|
176
|
+
onClose: n[1] || (n[1] = (r) => e(w).hide()),
|
|
177
|
+
onDelete: E
|
|
178
|
+
}, null, 8, ["variableName"])
|
|
53
179
|
]),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
180
|
+
_: 1
|
|
181
|
+
}, 8, ["state", "title"]),
|
|
182
|
+
t(e(V), {
|
|
183
|
+
state: e(v),
|
|
184
|
+
title: "Rename Workspace"
|
|
185
|
+
}, {
|
|
186
|
+
default: s(() => [
|
|
187
|
+
t(e(H), {
|
|
188
|
+
modelValue: o.value,
|
|
189
|
+
"onUpdate:modelValue": n[2] || (n[2] = (r) => o.value = r),
|
|
190
|
+
label: "Workspace",
|
|
191
|
+
labelShadowColor: "var(--scalar-background-1)",
|
|
192
|
+
onKeydown: F(h(C, ["prevent"]), ["enter"])
|
|
193
|
+
}, null, 8, ["modelValue", "onKeydown"]),
|
|
194
|
+
a("div", ne, [
|
|
195
|
+
t(e(_), {
|
|
196
|
+
class: "flex-1",
|
|
197
|
+
variant: "outlined",
|
|
198
|
+
onClick: n[3] || (n[3] = (r) => e(v).hide())
|
|
199
|
+
}, {
|
|
200
|
+
default: s(() => [
|
|
201
|
+
k(" Cancel ")
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}),
|
|
205
|
+
t(e(_), {
|
|
206
|
+
class: "flex-1",
|
|
207
|
+
type: "submit",
|
|
208
|
+
onClick: C
|
|
209
|
+
}, {
|
|
210
|
+
default: s(() => [
|
|
211
|
+
k(" Save ")
|
|
212
|
+
]),
|
|
213
|
+
_: 1
|
|
214
|
+
})
|
|
215
|
+
])
|
|
72
216
|
]),
|
|
73
217
|
_: 1
|
|
74
|
-
})
|
|
75
|
-
]));
|
|
218
|
+
}, 8, ["state"])
|
|
219
|
+
], 64));
|
|
76
220
|
}
|
|
77
221
|
});
|
|
78
222
|
export {
|
|
79
|
-
|
|
223
|
+
me as default
|
|
80
224
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.48",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -127,13 +127,13 @@
|
|
|
127
127
|
"vue-router": "^4.3.0",
|
|
128
128
|
"whatwg-mimetype": "^4.0.0",
|
|
129
129
|
"zod": "^3.22.4",
|
|
130
|
-
"@scalar/components": "0.12.
|
|
130
|
+
"@scalar/components": "0.12.30",
|
|
131
131
|
"@scalar/draggable": "0.1.4",
|
|
132
|
-
"@scalar/object-utils": "1.1.
|
|
133
|
-
"@scalar/themes": "0.9.
|
|
134
|
-
"@scalar/oas-utils": "0.2.27",
|
|
132
|
+
"@scalar/object-utils": "1.1.7",
|
|
133
|
+
"@scalar/themes": "0.9.22",
|
|
135
134
|
"@scalar/use-codemirror": "0.11.10",
|
|
136
|
-
"@scalar/use-toasts": "0.7.
|
|
135
|
+
"@scalar/use-toasts": "0.7.5",
|
|
136
|
+
"@scalar/oas-utils": "0.2.29",
|
|
137
137
|
"@scalar/use-tooltip": "1.0.2"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/libs/event-busses/command-palette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAA;AAGrF,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAGD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,oEAAiC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execute-requestBus.d.ts","sourceRoot":"","sources":["../../../src/libs/event-busses/execute-requestBus.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,qDAAoC,CAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { HotKeyConfig } from '@scalar/oas-utils/entities/workspace';
|
|
2
|
-
import type { HotkeyEventName } from '@scalar/oas-utils/entities/workspace/consts';
|
|
3
|
-
type HotKeyEvents = Record<HotkeyEventName, KeyboardEvent>;
|
|
4
|
-
/** Event bus for hot keys */
|
|
5
|
-
export declare const hotKeyBus: import("@vueuse/core").UseEventBusReturn<HotKeyEvents, any>;
|
|
6
|
-
/**
|
|
7
|
-
* Default set of keybindings
|
|
8
|
-
*
|
|
9
|
-
* Passing an empty object for hotkeys will disable them
|
|
10
|
-
*
|
|
11
|
-
* TODO we can add a merge or overwrite option
|
|
12
|
-
* TODO need a way to switch between web + electron
|
|
13
|
-
*
|
|
14
|
-
* The modifier can be set by the user but defaults to ctrl for windows/linux and meta for macos
|
|
15
|
-
*
|
|
16
|
-
* For the modifier key:
|
|
17
|
-
* - if you leave it blank it can be true or false
|
|
18
|
-
* - if you explicitly set it, the event must match ex: modifier false will not trigger if the modifier was pressed
|
|
19
|
-
*/
|
|
20
|
-
export declare const DEFAULT_HOTKEYS: HotKeyConfig;
|
|
21
|
-
/**
|
|
22
|
-
* Global keydown handler for hotkeys
|
|
23
|
-
*
|
|
24
|
-
* This is the brain of the operation, we turn keybindings -> events
|
|
25
|
-
*/
|
|
26
|
-
export declare const handleHotKeyDown: (ev: KeyboardEvent, { hotkeys, modifier }?: {
|
|
27
|
-
hotkeys?: Partial<Record<"" | "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "/" | "0" | "1" | "Backspace" | "2" | "n" | "d" | "Enter" | "Space" | "Tab" | "Escape" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "c" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "o" | "r" | "t" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "-" | "." | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "[" | "\\" | "]", {
|
|
28
|
-
event: "closeModal";
|
|
29
|
-
modifier?: boolean | undefined;
|
|
30
|
-
}>> | undefined;
|
|
31
|
-
modifier?: "default" | "Meta" | "Control" | "Shift" | "Alt" | undefined;
|
|
32
|
-
}) => void;
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=hot-key.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hot-key.d.ts","sourceRoot":"","sources":["../../../src/libs/event-busses/hot-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,6CAA6C,CAAA;AAIpD,KAAK,YAAY,GAAG,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;AAG1D,6BAA6B;AAC7B,eAAO,MAAM,SAAS,6DAA4B,CAAA;AAElD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,EAAE,YAG7B,CAAA;AAuBD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,OACvB,aAAa;;;;;;UAyBlB,CAAA"}
|