@scalar/api-client 2.2.21 → 2.2.23
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 +16 -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 +70 -71
- package/dist/components/AddressBar/AddressBarServer.vue.js +26 -26
- 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 +46 -46
- package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +42 -38
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
- package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +22 -19
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +57 -49
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +16 -16
- 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 +38 -36
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +71 -64
- package/dist/layouts/App/ApiClientApp.vue.js +4 -1
- package/dist/layouts/App/create-api-client-app.d.ts +2 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +2 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +12 -11
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +54 -47
- package/dist/libs/extractAttachmentFilename.d.ts +3 -0
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +7 -7
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +18 -18
- package/dist/libs/normalize-headers.d.ts.map +1 -1
- package/dist/libs/normalize-headers.js +2 -2
- package/dist/libs/parse-curl.js +39 -36
- package/dist/store/active-entities.d.ts +4 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +88 -86
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +29 -29
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +27 -23
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +94 -77
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +27 -27
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +18 -18
- package/dist/store/store.d.ts +5 -5
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +53 -48
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +35 -33
- 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 -9
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +39 -37
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +94 -89
- 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 +118 -119
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
- 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 +76 -73
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
- package/dist/views/Request/RequestSidebar.vue.d.ts +3 -4
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +166 -164
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
- 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 +80 -80
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +44 -49
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +37 -31
- package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +147 -130
- package/dist/views/Request/types/sidebar-item.d.ts +4 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +38 -35
- package/dist/views/Servers/Servers.vue2.js +38 -35
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +15 -15
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
- package/package.json +6 -6
|
@@ -1,124 +1,131 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as W, ref as D, openBlock as d, createElementBlock as w, Fragment as k, createElementVNode as s, createVNode as o, unref as e, withCtx as r, renderList as N, createBlock as z, withModifiers as v, normalizeClass as M, toDisplayString as h, withDirectives as B, vModelText as V, createTextVNode as j } from "vue";
|
|
2
|
+
import { useActiveEntities as E } from "../../store/active-entities.js";
|
|
3
|
+
import { useModal as T, ScalarDropdown as $, ScalarDropdownItem as _, ScalarIcon as u, ScalarDropdownDivider as A, ScalarButton as b, ScalarModal as I } from "@scalar/components";
|
|
4
|
+
import { useToasts as F } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as L } from "vue-router";
|
|
6
|
+
import { useWorkspace as P } from "../../store/store.js";
|
|
7
|
+
const R = { class: "flex items-center text-sm w-[inherit]" }, U = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, q = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, G = { class: "text-ellipsis overflow-hidden" }, H = { class: "flex items-center justify-center h-4 w-4" }, ee = /* @__PURE__ */ W({
|
|
8
8
|
__name: "WorkspaceSelector",
|
|
9
|
-
setup(
|
|
10
|
-
const { activeWorkspace: i } =
|
|
11
|
-
|
|
9
|
+
setup(J) {
|
|
10
|
+
const { activeWorkspace: i } = E(), { workspaces: g, workspaceMutators: C } = P(), { push: f } = L(), c = T(), { toast: x } = F(), n = D(""), S = (l) => {
|
|
11
|
+
var t;
|
|
12
|
+
l !== ((t = i.value) == null ? void 0 : t.uid) && f({
|
|
12
13
|
name: "workspace",
|
|
13
14
|
params: {
|
|
14
|
-
workspace:
|
|
15
|
+
workspace: l
|
|
15
16
|
}
|
|
16
17
|
});
|
|
17
|
-
},
|
|
18
|
-
if (!
|
|
19
|
-
|
|
18
|
+
}, y = () => {
|
|
19
|
+
if (!n.value.trim()) {
|
|
20
|
+
x("Please enter a name before creating a workspace.", "error");
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
-
name:
|
|
23
|
+
const l = C.add({
|
|
24
|
+
name: n.value
|
|
24
25
|
});
|
|
25
|
-
|
|
26
|
+
x(`Created new workspace '${l.name}'`), f({
|
|
26
27
|
name: "workspace",
|
|
27
28
|
params: {
|
|
28
|
-
workspace:
|
|
29
|
+
workspace: l.uid
|
|
29
30
|
}
|
|
30
|
-
}),
|
|
31
|
+
}), n.value = "", c.hide();
|
|
31
32
|
};
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
items:
|
|
36
|
-
(
|
|
33
|
+
return (l, t) => (d(), w(k, null, [
|
|
34
|
+
s("div", R, [
|
|
35
|
+
o(e($), null, {
|
|
36
|
+
items: r(() => [
|
|
37
|
+
(d(!0), w(k, null, N(e(g), (a, p) => (d(), z(e(_), {
|
|
37
38
|
key: p,
|
|
38
39
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
39
|
-
onClick:
|
|
40
|
+
onClick: v((m) => S(p), ["stop"])
|
|
40
41
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
default: r(() => {
|
|
43
|
+
var m;
|
|
44
|
+
return [
|
|
45
|
+
s("div", {
|
|
46
|
+
class: M([
|
|
47
|
+
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
48
|
+
((m = e(i)) == null ? void 0 : m.uid) === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
49
|
+
])
|
|
50
|
+
}, [
|
|
51
|
+
o(e(u), {
|
|
52
|
+
class: "size-2.5",
|
|
53
|
+
icon: "Checkmark",
|
|
54
|
+
thickness: "3.5"
|
|
55
|
+
})
|
|
56
|
+
], 2),
|
|
57
|
+
s("span", G, h(a.name), 1)
|
|
58
|
+
];
|
|
59
|
+
}),
|
|
56
60
|
_: 2
|
|
57
61
|
}, 1032, ["onClick"]))), 128)),
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
o(e(A)),
|
|
63
|
+
o(e(_), {
|
|
60
64
|
class: "flex items-center gap-1.5",
|
|
61
|
-
onClick:
|
|
65
|
+
onClick: t[0] || (t[0] = (a) => e(c).show())
|
|
62
66
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
default: r(() => [
|
|
68
|
+
s("div", H, [
|
|
69
|
+
o(e(u), {
|
|
66
70
|
icon: "Add",
|
|
67
71
|
size: "sm"
|
|
68
72
|
})
|
|
69
73
|
]),
|
|
70
|
-
|
|
74
|
+
t[2] || (t[2] = s("span", null, "New Workspace", -1))
|
|
71
75
|
]),
|
|
72
76
|
_: 1
|
|
73
77
|
})
|
|
74
78
|
]),
|
|
75
|
-
default:
|
|
76
|
-
|
|
79
|
+
default: r(() => [
|
|
80
|
+
o(e(b), {
|
|
77
81
|
class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
|
|
78
82
|
fullWidth: "",
|
|
79
83
|
variant: "ghost"
|
|
80
84
|
}, {
|
|
81
|
-
default:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
s(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
default: r(() => {
|
|
86
|
+
var a;
|
|
87
|
+
return [
|
|
88
|
+
s("div", U, [
|
|
89
|
+
s("h2", q, h((a = e(i)) == null ? void 0 : a.name), 1),
|
|
90
|
+
o(e(u), {
|
|
91
|
+
icon: "ChevronDown",
|
|
92
|
+
size: "md"
|
|
93
|
+
})
|
|
94
|
+
])
|
|
95
|
+
];
|
|
96
|
+
}),
|
|
90
97
|
_: 1
|
|
91
98
|
})
|
|
92
99
|
]),
|
|
93
100
|
_: 1
|
|
94
101
|
})
|
|
95
102
|
]),
|
|
96
|
-
|
|
103
|
+
o(e(I), {
|
|
97
104
|
bodyClass: "!m-0 !p-1",
|
|
98
105
|
size: "xxs",
|
|
99
106
|
state: e(c),
|
|
100
107
|
variant: "form"
|
|
101
108
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
|
|
109
|
+
default: r(() => [
|
|
110
|
+
s("form", {
|
|
104
111
|
class: "flex gap-1 rounded",
|
|
105
|
-
onSubmit:
|
|
112
|
+
onSubmit: v(y, ["prevent"])
|
|
106
113
|
}, [
|
|
107
|
-
|
|
108
|
-
"onUpdate:modelValue":
|
|
114
|
+
B(s("input", {
|
|
115
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => n.value = a),
|
|
109
116
|
class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
|
|
110
117
|
placeholder: "New Workspace",
|
|
111
118
|
type: "text"
|
|
112
119
|
}, null, 512), [
|
|
113
|
-
[
|
|
120
|
+
[V, n.value]
|
|
114
121
|
]),
|
|
115
|
-
|
|
122
|
+
o(e(b), {
|
|
116
123
|
class: "max-h-8 text-xs p-0 px-3",
|
|
117
|
-
disabled: !
|
|
124
|
+
disabled: !n.value.trim(),
|
|
118
125
|
type: "submit"
|
|
119
126
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
127
|
+
default: r(() => t[3] || (t[3] = [
|
|
128
|
+
j(" Continue ")
|
|
122
129
|
])),
|
|
123
130
|
_: 1
|
|
124
131
|
}, 8, ["disabled"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ScalarAsciiArt.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0018c948"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as h, computed as f, openBlock as i, createElementBlock as l, normalizeClass as y, Fragment as v, renderList as x, normalizeStyle as m, createElementVNode as $, toDisplayString as k } from "vue";
|
|
2
|
+
const p = 500, o = 100, B = /* @__PURE__ */ h({
|
|
3
3
|
__name: "ScalarAsciiArt",
|
|
4
4
|
props: {
|
|
5
5
|
art: {},
|
|
6
6
|
animate: { type: Boolean }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
`)),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
setup(u) {
|
|
9
|
+
const d = u, n = f(() => d.art.split(`
|
|
10
|
+
`)), g = (a, s) => {
|
|
11
|
+
var e, t, r, c;
|
|
12
|
+
return {
|
|
13
|
+
animationDuration: `${a * o}ms, ${p}ms`,
|
|
14
|
+
animationTimingFunction: `steps(${a}), step-end`,
|
|
15
|
+
animationDelay: `${s * o}ms, 0ms`,
|
|
16
|
+
animationIterationCount: `1, ${((((e = n.value) == null ? void 0 : e.length) ?? 0) + (((c = (r = n.value) == null ? void 0 : r[((t = n.value) == null ? void 0 : t.length) - 1]) == null ? void 0 : c.length) ?? 0) + 5) * o / p}`
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
return (a, s) => (i(), l("div", {
|
|
20
|
+
class: y(["ascii-art font-code flex flex-col items-start text-[6px] leading-[7px]", { "ascii-art-animate": a.animate }])
|
|
18
21
|
}, [
|
|
19
|
-
(
|
|
20
|
-
key:
|
|
22
|
+
(i(!0), l(v, null, x(n.value, (e, t) => (i(), l("span", {
|
|
23
|
+
key: t,
|
|
21
24
|
class: "inline-block",
|
|
22
|
-
style:
|
|
25
|
+
style: m({ width: `calc(${e.length + 1}ch)` })
|
|
23
26
|
}, [
|
|
24
|
-
|
|
27
|
+
$("span", {
|
|
25
28
|
class: "inline-block whitespace-pre overflow-hidden",
|
|
26
|
-
style:
|
|
27
|
-
},
|
|
29
|
+
style: m(g(e.length, t))
|
|
30
|
+
}, k(e), 5)
|
|
28
31
|
], 4))), 128))
|
|
29
32
|
], 2));
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
35
|
export {
|
|
33
|
-
|
|
36
|
+
B as default
|
|
34
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAIA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCA4FsB,UAAU;eAjGrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MA4F0C;sBAxDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;EAyExD"}
|
|
@@ -1,68 +1,76 @@
|
|
|
1
|
-
import { useActiveEntities as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { useActiveEntities as x } from "../../store/active-entities.js";
|
|
2
|
+
import { isDefined as A } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import D from "fuse.js";
|
|
4
|
+
import { ref as a, watch as d, computed as R, nextTick as E } from "vue";
|
|
5
|
+
import { useRouter as I } from "vue-router";
|
|
6
|
+
import { useWorkspace as C } from "../../store/store.js";
|
|
7
|
+
function P() {
|
|
8
|
+
const k = I(), { activeWorkspace: S, activeWorkspaceRequests: i } = x(), { requests: b } = C(), u = a([]), c = a([]), s = a(0), l = a(""), n = a(null), v = a([]), h = new D(u.value, {
|
|
8
9
|
keys: ["title", "description", "body"]
|
|
9
|
-
}),
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
u.value = e.map((t) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
}), g = () => {
|
|
11
|
+
l.value = "", s.value = 0, c.value = [], n.value instanceof HTMLInputElement && n.value.blur();
|
|
12
|
+
}, y = (e) => {
|
|
13
|
+
u.value = e.map((t) => {
|
|
14
|
+
var o;
|
|
15
|
+
return {
|
|
16
|
+
id: t.uid,
|
|
17
|
+
title: t.summary ?? t.method,
|
|
18
|
+
description: t.description ?? "",
|
|
19
|
+
httpVerb: t.method,
|
|
20
|
+
path: t.path,
|
|
21
|
+
// TODO: Use router instead
|
|
22
|
+
link: `/workspace/${(o = S.value) == null ? void 0 : o.uid}/request/${t.uid}`
|
|
23
|
+
};
|
|
24
|
+
}), h.setCollection(u.value);
|
|
25
|
+
}, m = () => {
|
|
26
|
+
s.value = 0, c.value = h.search(l.value);
|
|
22
27
|
};
|
|
23
|
-
|
|
24
|
-
e.length ?
|
|
28
|
+
d(l, (e) => {
|
|
29
|
+
e.length ? m() : c.value = [];
|
|
25
30
|
});
|
|
26
|
-
const
|
|
27
|
-
const t = e === "up" ? -1 : 1,
|
|
28
|
-
s.value = (s.value + t +
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
+
const w = (e) => {
|
|
32
|
+
const t = e === "up" ? -1 : 1, o = r.value.length;
|
|
33
|
+
s.value = (s.value + t + o) % o, E(() => {
|
|
34
|
+
const f = v.value[s.value];
|
|
35
|
+
f instanceof HTMLElement && f.scrollIntoView({
|
|
31
36
|
behavior: "smooth",
|
|
32
37
|
block: "center"
|
|
33
38
|
});
|
|
34
39
|
});
|
|
35
|
-
},
|
|
36
|
-
s.value >= 0
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
}, T = () => {
|
|
41
|
+
if (s.value >= 0) {
|
|
42
|
+
const e = r.value[s.value];
|
|
43
|
+
e && p(e);
|
|
44
|
+
}
|
|
45
|
+
}, W = R(
|
|
46
|
+
() => i.value.map((e) => b[e]).filter(A)
|
|
47
|
+
);
|
|
48
|
+
d(
|
|
49
|
+
i,
|
|
50
|
+
() => {
|
|
51
|
+
y(W.value);
|
|
44
52
|
},
|
|
45
53
|
{ immediate: !0 }
|
|
46
54
|
);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
() =>
|
|
55
|
+
const p = (e) => {
|
|
56
|
+
k.push(e.item.id), g();
|
|
57
|
+
}, r = R(
|
|
58
|
+
() => l.value.length === 0 ? u.value.map((e) => ({
|
|
51
59
|
item: e
|
|
52
60
|
})) : c.value
|
|
53
61
|
);
|
|
54
62
|
return {
|
|
55
|
-
searchText:
|
|
56
|
-
searchResultsWithPlaceholderResults:
|
|
63
|
+
searchText: l,
|
|
64
|
+
searchResultsWithPlaceholderResults: r,
|
|
57
65
|
selectedSearchResult: s,
|
|
58
|
-
onSearchResultClick:
|
|
59
|
-
fuseSearch:
|
|
60
|
-
searchInputRef:
|
|
61
|
-
searchResultRefs:
|
|
62
|
-
navigateSearchResults:
|
|
63
|
-
selectSearchResult:
|
|
66
|
+
onSearchResultClick: p,
|
|
67
|
+
fuseSearch: m,
|
|
68
|
+
searchInputRef: n,
|
|
69
|
+
searchResultRefs: v,
|
|
70
|
+
navigateSearchResults: w,
|
|
71
|
+
selectSearchResult: T
|
|
64
72
|
};
|
|
65
73
|
}
|
|
66
74
|
export {
|
|
67
|
-
|
|
75
|
+
P as useSearch
|
|
68
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavRouterLink.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SideNavRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavRouterLink.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAK9C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,EAAE,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAUF,iBAAS,cAAc;WAyCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useActiveEntities as
|
|
4
|
-
import { RouterLink as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as n, openBlock as r, createBlock as a, unref as t, withCtx as c, renderSlot as s } from "vue";
|
|
2
|
+
import p from "./SideNavLink.vue.js";
|
|
3
|
+
import { useActiveEntities as m } from "../../store/active-entities.js";
|
|
4
|
+
import { RouterLink as f } from "vue-router";
|
|
5
|
+
const $ = /* @__PURE__ */ n({
|
|
6
6
|
__name: "SideNavRouterLink",
|
|
7
7
|
props: {
|
|
8
8
|
icon: {},
|
|
9
9
|
name: {},
|
|
10
10
|
active: { type: Boolean }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const { activeWorkspace:
|
|
14
|
-
return (e,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
setup(u) {
|
|
13
|
+
const { activeWorkspace: i } = m();
|
|
14
|
+
return (e, l) => {
|
|
15
|
+
var o;
|
|
16
|
+
return r(), a(p, {
|
|
17
|
+
is: t(f),
|
|
18
|
+
active: e.active,
|
|
19
|
+
icon: e.icon,
|
|
20
|
+
to: `/workspace/${(o = t(i)) == null ? void 0 : o.uid}/${e.name}`
|
|
21
|
+
}, {
|
|
22
|
+
default: c(() => [
|
|
23
|
+
s(e.$slots, "default")
|
|
24
|
+
]),
|
|
25
|
+
_: 3
|
|
26
|
+
}, 8, ["is", "active", "icon", "to"]);
|
|
27
|
+
};
|
|
25
28
|
}
|
|
26
29
|
});
|
|
27
30
|
export {
|
|
28
|
-
|
|
31
|
+
$ as default
|
|
29
32
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
title?: string;
|
|
3
|
-
|
|
3
|
+
isSidebarOpen?: boolean;
|
|
4
4
|
};
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
@@ -17,7 +17,7 @@ declare function __VLS_template(): {
|
|
|
17
17
|
};
|
|
18
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
19
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
-
|
|
20
|
+
isSidebarOpen: boolean;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLElement>;
|
|
22
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
23
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AAgJA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AAgJA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAC;AA8DJ,iBAAS,cAAc;WAmHT,OAAO,IAA6B;;wBAZtB,GAAG;wBACH,GAAG;wBAEH,GAAG;yBADF,GAAG;;;;;;EAe/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;mBAvMD,OAAO;qFA+MzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Sidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ba6d2e30"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as S, ref as
|
|
2
|
-
import { useBreakpoints as
|
|
3
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as S, ref as g, withDirectives as D, openBlock as l, createElementBlock as m, normalizeClass as h, normalizeStyle as _, unref as s, renderSlot as n, createElementVNode as r, toDisplayString as L, createCommentVNode as u, Fragment as W, vShow as $ } from "vue";
|
|
2
|
+
import { useBreakpoints as z } from "@scalar/use-hooks/useBreakpoints";
|
|
3
|
+
import { useWorkspace as B } from "../../store/store.js";
|
|
4
4
|
const C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "min-h-12 xl:min-h-client-header flex items-center justify-between px-3 py-1.5 md:px-4 md:py-2.5 text-sm"
|
|
7
|
-
}, I = { class: "font-medium m-0 text-sm whitespace-nowrap" },
|
|
7
|
+
}, I = { class: "font-medium m-0 text-sm whitespace-nowrap" }, O = { class: "relative z-10 pt-0 md:px-2.5 md:pb-2.5 sticky bottom-0 w-[inherit] has-[.empty-sidebar-item]:border-t-1/2" }, V = /* @__PURE__ */ S({
|
|
8
8
|
__name: "Sidebar",
|
|
9
9
|
props: {
|
|
10
10
|
title: {},
|
|
11
|
-
|
|
11
|
+
isSidebarOpen: { type: Boolean, default: !0 }
|
|
12
12
|
},
|
|
13
13
|
setup(y) {
|
|
14
|
-
const w = y, { isReadOnly: c, sidebarWidth: o, setSidebarWidth: i } =
|
|
14
|
+
const w = y, { isReadOnly: c, sidebarWidth: o, setSidebarWidth: i } = B(), a = g(!1), p = g(null), { breakpoints: d } = z(), k = (e) => {
|
|
15
15
|
e.preventDefault();
|
|
16
16
|
const f = e.clientX, x = parseInt(
|
|
17
17
|
getComputedStyle(p.value).width || o.value,
|
|
@@ -20,31 +20,31 @@ const C = {
|
|
|
20
20
|
a.value = !0, document.body.classList.add("dragging");
|
|
21
21
|
let t = x + E.clientX - f;
|
|
22
22
|
t > 420 && (t = 420 + (t - 420) * 0.2), t < 240 && (t = 240), i(`${t}px`);
|
|
23
|
-
},
|
|
24
|
-
a.value = !1, document.body.classList.remove("dragging"), document.documentElement.removeEventListener("mousemove", v, !1), document.documentElement.removeEventListener("mouseup",
|
|
23
|
+
}, b = () => {
|
|
24
|
+
a.value = !1, document.body.classList.remove("dragging"), document.documentElement.removeEventListener("mousemove", v, !1), document.documentElement.removeEventListener("mouseup", b, !1), parseInt(o.value, 10) > 420 ? i("360px") : parseInt(o.value, 10) < 240 && i("240px");
|
|
25
25
|
};
|
|
26
|
-
document.documentElement.addEventListener("mousemove", v, !1), document.documentElement.addEventListener("mouseup",
|
|
26
|
+
document.documentElement.addEventListener("mousemove", v, !1), document.documentElement.addEventListener("mouseup", b, !1);
|
|
27
27
|
};
|
|
28
28
|
return (e, f) => D((l(), m("aside", {
|
|
29
29
|
ref_key: "sidebarRef",
|
|
30
30
|
ref: p,
|
|
31
|
-
class:
|
|
31
|
+
class: h(["sidebar overflow-hidden relative flex flex-col flex-1 md:flex-none bg-b-1 md:border-b-0 md:border-r-1/2 min-w-full md:min-w-fit leading-3", { dragging: a.value }]),
|
|
32
32
|
style: _({ width: s(d).lg ? s(o) : "100%" })
|
|
33
33
|
}, [
|
|
34
34
|
n(e.$slots, "header", {}, void 0, !0),
|
|
35
35
|
!s(c) && e.title ? (l(), m("div", C, [
|
|
36
|
-
r("h2", I,
|
|
36
|
+
r("h2", I, L(e.title), 1),
|
|
37
37
|
s(d).lg ? u("", !0) : n(e.$slots, "button", { key: 0 }, void 0, !0)
|
|
38
38
|
])) : u("", !0),
|
|
39
39
|
r("div", {
|
|
40
|
-
class:
|
|
40
|
+
class: h(["custom-scroll sidebar-height pb-0 md:pb-[37px] w-[inherit]", {
|
|
41
41
|
"sidebar-mask": !s(c)
|
|
42
42
|
}])
|
|
43
43
|
}, [
|
|
44
44
|
n(e.$slots, "content", {}, void 0, !0)
|
|
45
45
|
], 2),
|
|
46
|
-
s(d).lg ? (l(), m(
|
|
47
|
-
r("div",
|
|
46
|
+
s(d).lg ? (l(), m(W, { key: 1 }, [
|
|
47
|
+
r("div", O, [
|
|
48
48
|
n(e.$slots, "button", {}, void 0, !0)
|
|
49
49
|
]),
|
|
50
50
|
r("div", {
|
|
@@ -53,10 +53,10 @@ const C = {
|
|
|
53
53
|
}, null, 32)
|
|
54
54
|
], 64)) : u("", !0)
|
|
55
55
|
], 6)), [
|
|
56
|
-
[
|
|
56
|
+
[$, w.isSidebarOpen]
|
|
57
57
|
]);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
V as default
|
|
62
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"AAqHA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,oBAAoB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAA;CAC3C,CAAC;;;;;;;;;;AAuNF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./SidebarListElement.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4713d7d0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|