@scalar/api-client 2.0.24 → 2.0.26
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 +39 -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 +79 -83
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +38 -38
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +10 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +43 -38
- package/dist/components/CodeInput/codeDropdownWidget.d.ts +24 -0
- package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +1 -0
- package/dist/components/CodeInput/codeDropdownWidget.js +110 -0
- package/dist/components/CodeInput/codeVariableWidget.d.ts +8 -0
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -0
- package/dist/components/CodeInput/codeVariableWidget.js +124 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +51 -54
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +4 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +106 -92
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +68 -74
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -62
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +106 -99
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +7 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +57 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +4 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +50 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +9 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +198 -0
- package/dist/components/CommandPalette/index.d.ts +2 -0
- package/dist/components/CommandPalette/index.d.ts.map +1 -0
- package/dist/components/CommandPalette/index.js +4 -0
- package/dist/components/ContextBar.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +36 -49
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +26 -23
- package/dist/components/SideNav/SideNavLink.vue.d.ts +3 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +5 -5
- package/dist/components/Sidebar/Sidebar.vue.d.ts +15 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +14 -12
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +5 -5
- 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 +31 -28
- package/dist/components/TopNav/TopNavItem.vue.d.ts +7 -3
- 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 +16 -15
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +2 -1
- package/dist/constants.d.ts +13 -7
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -16
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -0
- package/dist/layouts/App/ApiClientApp.vue.js +72 -0
- package/dist/{App → layouts/App}/createApiClientApp.d.ts +1 -1
- package/dist/layouts/App/createApiClientApp.d.ts.map +1 -0
- package/dist/{App → layouts/App}/createApiClientApp.js +2 -2
- package/dist/layouts/App/index.d.ts.map +1 -0
- package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.d.ts +1 -0
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -0
- package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.js +2 -2
- package/dist/{Modal → layouts/Modal}/api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -0
- package/dist/{Modal → layouts/Modal}/api-client-modal.js +42 -42
- package/dist/layouts/Modal/index.d.ts.map +1 -0
- package/dist/libs/eventBusses/command-palette.d.ts +14 -0
- package/dist/libs/eventBusses/command-palette.d.ts.map +1 -0
- package/dist/libs/eventBusses/command-palette.js +5 -0
- 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 +19 -19
- package/dist/router.d.ts +5 -10
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +23 -19
- package/dist/store/topNav.d.ts +94 -82
- package/dist/store/topNav.d.ts.map +1 -1
- package/dist/store/topNav.js +21 -20
- package/dist/store/workspace.d.ts +348 -94
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +314 -221
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +27 -30
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +22 -25
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -47
- 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 +130 -109
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -4
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +19 -19
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +6 -5
- 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 +78 -81
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +60 -42
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +6 -5
- package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/components/OAuth2.vue.js +2 -0
- package/dist/{App.vue.d.ts → views/Request/components/WorkspaceDropdown.vue.d.ts} +1 -2
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -0
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -0
- package/dist/views/Request/components/WorkspaceDropdown.vue2.js +4 -0
- package/dist/views/Request/components/index.d.ts +1 -0
- package/dist/views/Request/components/index.d.ts.map +1 -1
- package/dist/views/Request/components/index.js +4 -2
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +12 -15
- package/package.json +22 -18
- package/dist/App/ApiClientApp.vue.d.ts.map +0 -1
- package/dist/App/ApiClientApp.vue.js +0 -56
- package/dist/App/createApiClientApp.d.ts.map +0 -1
- package/dist/App/index.d.ts.map +0 -1
- package/dist/App.vue.d.ts.map +0 -1
- package/dist/App.vue.js +0 -77
- package/dist/App.vue3.js +0 -5
- package/dist/Modal/ApiClientModal.vue.d.ts.map +0 -1
- package/dist/Modal/api-client-modal.d.ts.map +0 -1
- package/dist/Modal/index.d.ts.map +0 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +0 -113
- package/dist/components/AddressBar/AddressBarServer.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts +0 -17
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPalette.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPalette.vue2.js +0 -185
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
- /package/dist/{App → layouts/App}/ApiClientApp.vue.d.ts +0 -0
- /package/dist/{App → layouts/App}/ApiClientApp.vue3.js +0 -0
- /package/dist/{App → layouts/App}/index.d.ts +0 -0
- /package/dist/{App → layouts/App}/index.js +0 -0
- /package/dist/{Modal → layouts/Modal}/ApiClientModal.vue2.js +0 -0
- /package/dist/{Modal → layouts/Modal}/index.d.ts +0 -0
- /package/dist/{Modal → layouts/Modal}/index.js +0 -0
|
@@ -1,107 +1,121 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useWorkspace as
|
|
4
|
-
import { ScalarDropdown as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as N, ref as u, onMounted as B, openBlock as i, createElementBlock as f, withModifiers as I, createElementVNode as l, withDirectives as M, vModelText as R, createVNode as s, unref as n, withCtx as r, Fragment as V, renderList as q, createBlock as W, createTextVNode as c, toDisplayString as x } from "vue";
|
|
2
|
+
import v from "../HttpMethod/HttpMethod.vue.js";
|
|
3
|
+
import { useWorkspace as j } from "../../store/workspace.js";
|
|
4
|
+
import { ScalarDropdown as z, ScalarDropdownItem as T, ScalarButton as h, ScalarIcon as F } from "@scalar/components";
|
|
5
|
+
import { useRouter as L } from "vue-router";
|
|
6
|
+
const P = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, U = /* @__PURE__ */ l("label", {
|
|
6
7
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
7
8
|
for: "examplename"
|
|
8
|
-
}, null, -1),
|
|
9
|
+
}, null, -1), A = { class: "flex gap-2" }, G = { class: "flex flex-1 max-h-8" }, H = { class: "flex items-center gap-2" }, J = { class: "max-h-40 custom-scroll" }, ee = /* @__PURE__ */ N({
|
|
9
10
|
__name: "CommandPaletteExample",
|
|
10
11
|
props: {
|
|
11
|
-
|
|
12
|
+
metaData: {}
|
|
12
13
|
},
|
|
13
14
|
emits: ["close"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
69
|
-
variant: "outlined",
|
|
70
|
-
onClick: o[1] || (o[1] = (t) => f(r.value))
|
|
15
|
+
setup(_, { emit: b }) {
|
|
16
|
+
const w = _, k = b, { push: g } = L(), {
|
|
17
|
+
activeRequest: y,
|
|
18
|
+
activeWorkspace: C,
|
|
19
|
+
activeWorkspaceRequests: S,
|
|
20
|
+
requests: D,
|
|
21
|
+
requestExampleMutators: E
|
|
22
|
+
} = j(), m = u(""), a = u(
|
|
23
|
+
// Ensure we pre-select the correct request
|
|
24
|
+
D[w.metaData ?? ""] ?? y.value
|
|
25
|
+
), p = (e) => a.value = e, d = u(null);
|
|
26
|
+
B(() => {
|
|
27
|
+
var e;
|
|
28
|
+
return (e = d.value) == null ? void 0 : e.focus();
|
|
29
|
+
});
|
|
30
|
+
const $ = () => {
|
|
31
|
+
const e = E.add(
|
|
32
|
+
a.value,
|
|
33
|
+
m.value
|
|
34
|
+
);
|
|
35
|
+
e && g(
|
|
36
|
+
`/workspace/${C.value.uid}/request/${a.value.uid}/examples/${e.uid}`
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
return (e, o) => (i(), f("form", {
|
|
40
|
+
class: "flex w-full flex-col gap-3",
|
|
41
|
+
onSubmit: o[2] || (o[2] = I((t) => k("close"), ["prevent"]))
|
|
42
|
+
}, [
|
|
43
|
+
l("div", P, [
|
|
44
|
+
U,
|
|
45
|
+
M(l("input", {
|
|
46
|
+
id: "examplename",
|
|
47
|
+
ref_key: "exampleInput",
|
|
48
|
+
ref: d,
|
|
49
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => m.value = t),
|
|
50
|
+
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
51
|
+
label: "Example Name",
|
|
52
|
+
placeholder: "Example Name"
|
|
53
|
+
}, null, 512), [
|
|
54
|
+
[R, m.value]
|
|
55
|
+
])
|
|
56
|
+
]),
|
|
57
|
+
l("div", A, [
|
|
58
|
+
l("div", G, [
|
|
59
|
+
s(n(z), {
|
|
60
|
+
placement: "bottom",
|
|
61
|
+
resize: ""
|
|
62
|
+
}, {
|
|
63
|
+
items: r(() => [
|
|
64
|
+
l("div", J, [
|
|
65
|
+
(i(!0), f(V, null, q(n(S), (t) => (i(), W(n(T), {
|
|
66
|
+
key: t.uid,
|
|
67
|
+
class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
|
|
68
|
+
onClick: (K) => p(t)
|
|
71
69
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
c(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, null, 8, ["method"]),
|
|
78
|
-
a(s($), {
|
|
79
|
-
class: "text-c-3",
|
|
80
|
-
icon: "ChevronDown",
|
|
81
|
-
size: "xs"
|
|
82
|
-
})
|
|
83
|
-
])
|
|
70
|
+
default: r(() => [
|
|
71
|
+
c(x(t.summary) + " ", 1),
|
|
72
|
+
s(v, {
|
|
73
|
+
method: t.method
|
|
74
|
+
}, null, 8, ["method"])
|
|
84
75
|
]),
|
|
85
|
-
_:
|
|
86
|
-
})
|
|
87
|
-
])
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
_: 2
|
|
77
|
+
}, 1032, ["onClick"]))), 128))
|
|
78
|
+
])
|
|
79
|
+
]),
|
|
80
|
+
default: r(() => [
|
|
81
|
+
s(n(h), {
|
|
82
|
+
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
83
|
+
variant: "outlined",
|
|
84
|
+
onClick: o[1] || (o[1] = (t) => p(a.value))
|
|
85
|
+
}, {
|
|
86
|
+
default: r(() => [
|
|
87
|
+
c(x(a.value.summary) + " ", 1),
|
|
88
|
+
l("div", H, [
|
|
89
|
+
s(v, {
|
|
90
|
+
method: a.value.method
|
|
91
|
+
}, null, 8, ["method"]),
|
|
92
|
+
s(n(F), {
|
|
93
|
+
class: "text-c-3",
|
|
94
|
+
icon: "ChevronDown",
|
|
95
|
+
size: "xs"
|
|
96
|
+
})
|
|
97
|
+
])
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
97
101
|
]),
|
|
98
102
|
_: 1
|
|
99
103
|
})
|
|
100
|
-
])
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
]),
|
|
105
|
+
s(n(h), {
|
|
106
|
+
class: "max-h-8 text-xs p-0 px-3",
|
|
107
|
+
type: "submit",
|
|
108
|
+
onClick: $
|
|
109
|
+
}, {
|
|
110
|
+
default: r(() => [
|
|
111
|
+
c(" Create Example ")
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
})
|
|
115
|
+
])
|
|
116
|
+
], 32));
|
|
103
117
|
}
|
|
104
118
|
});
|
|
105
119
|
export {
|
|
106
|
-
|
|
120
|
+
ee as default
|
|
107
121
|
};
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
title: string;
|
|
3
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
2
|
close: () => void;
|
|
5
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
6
|
-
title: string;
|
|
7
|
-
}>>> & {
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
4
|
onClose?: (() => any) | undefined;
|
|
9
5
|
}, {}, {}>;
|
|
10
6
|
export default _default;
|
|
11
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
-
type __VLS_TypePropsToOption<T> = {
|
|
13
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
-
} : {
|
|
16
|
-
type: import('vue').PropType<T[K]>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
7
|
//# sourceMappingURL=CommandPaletteFolder.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteFolder.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteFolder.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteFolder.vue"],"names":[],"mappings":";;;;;AA2SA,wBAMG"}
|
|
@@ -1,104 +1,98 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarListbox as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as w, ref as r, computed as m, onMounted as C, openBlock as g, createElementBlock as S, withModifiers as V, createElementVNode as a, withDirectives as y, vModelText as N, createVNode as n, unref as i, withCtx as d, normalizeClass as k, toDisplayString as F, createTextVNode as I } from "vue";
|
|
2
|
+
import { useWorkspace as M } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarListbox as B, ScalarButton as p, ScalarIcon as D } from "@scalar/components";
|
|
4
|
+
const j = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, z = /* @__PURE__ */ a("label", {
|
|
5
5
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
6
6
|
for: "foldername"
|
|
7
|
-
}, null, -1),
|
|
7
|
+
}, null, -1), E = { class: "flex" }, T = { class: "flex flex-1 gap-2 max-h-8" }, W = /* @__PURE__ */ w({
|
|
8
8
|
__name: "CommandPaletteFolder",
|
|
9
|
-
props: {
|
|
10
|
-
title: {}
|
|
11
|
-
},
|
|
12
9
|
emits: ["close"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
() => Object.values(
|
|
16
|
-
var
|
|
10
|
+
setup(U, { emit: v }) {
|
|
11
|
+
const x = v, { collections: b, folderMutators: h } = M(), s = r(""), u = r(""), c = m(
|
|
12
|
+
() => Object.values(b).map((e) => {
|
|
13
|
+
var l, o;
|
|
17
14
|
return {
|
|
18
15
|
id: e.uid,
|
|
19
|
-
label: ((
|
|
16
|
+
label: ((o = (l = e.spec) == null ? void 0 : l.info) == null ? void 0 : o.title) ?? ""
|
|
20
17
|
};
|
|
21
18
|
})
|
|
22
|
-
),
|
|
19
|
+
), t = m({
|
|
23
20
|
get: () => c.value.find(
|
|
24
21
|
({ id: e }) => e === u.value
|
|
25
22
|
),
|
|
26
23
|
set: (e) => {
|
|
27
24
|
e != null && e.id && (u.value = e.id);
|
|
28
25
|
}
|
|
29
|
-
}),
|
|
30
|
-
s.value &&
|
|
26
|
+
}), _ = () => {
|
|
27
|
+
s.value && t.value && (h.add(
|
|
31
28
|
{
|
|
32
29
|
name: s.value
|
|
33
30
|
},
|
|
34
31
|
u.value
|
|
35
|
-
),
|
|
32
|
+
), x("close"));
|
|
36
33
|
}, f = r(null);
|
|
37
34
|
return C(() => {
|
|
38
35
|
var e;
|
|
39
36
|
(e = f.value) == null || e.focus();
|
|
40
|
-
}), (e,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => o.value = a),
|
|
65
|
-
options: c.value
|
|
66
|
-
}, {
|
|
67
|
-
default: d(() => [
|
|
68
|
-
n(i(v), {
|
|
69
|
-
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
70
|
-
variant: "outlined"
|
|
71
|
-
}, {
|
|
72
|
-
default: d(() => [
|
|
73
|
-
l("span", {
|
|
74
|
-
class: I(o.value ? "text-c-1" : "text-c-3")
|
|
75
|
-
}, p(o.value ? o.value.label : "Select Collection"), 3),
|
|
76
|
-
n(i(j), {
|
|
77
|
-
class: "text-c-3",
|
|
78
|
-
icon: "ChevronDown",
|
|
79
|
-
size: "xs"
|
|
80
|
-
})
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
})
|
|
84
|
-
]),
|
|
85
|
-
_: 1
|
|
86
|
-
}, 8, ["modelValue", "options"])
|
|
87
|
-
]),
|
|
88
|
-
n(i(v), {
|
|
89
|
-
class: "max-h-8 text-xs p-0 px-3",
|
|
90
|
-
type: "submit"
|
|
37
|
+
}), (e, l) => (g(), S("form", {
|
|
38
|
+
class: "flex w-full flex-col gap-3",
|
|
39
|
+
onSubmit: V(_, ["prevent"])
|
|
40
|
+
}, [
|
|
41
|
+
a("div", j, [
|
|
42
|
+
z,
|
|
43
|
+
y(a("input", {
|
|
44
|
+
id: "foldername",
|
|
45
|
+
ref_key: "folderInput",
|
|
46
|
+
ref: f,
|
|
47
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => s.value = o),
|
|
48
|
+
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
49
|
+
label: "Folder Name",
|
|
50
|
+
placeholder: "Folder Name"
|
|
51
|
+
}, null, 512), [
|
|
52
|
+
[N, s.value]
|
|
53
|
+
])
|
|
54
|
+
]),
|
|
55
|
+
a("div", E, [
|
|
56
|
+
a("div", T, [
|
|
57
|
+
n(i(B), {
|
|
58
|
+
modelValue: t.value,
|
|
59
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => t.value = o),
|
|
60
|
+
options: c.value
|
|
91
61
|
}, {
|
|
92
62
|
default: d(() => [
|
|
93
|
-
|
|
63
|
+
n(i(p), {
|
|
64
|
+
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
65
|
+
variant: "outlined"
|
|
66
|
+
}, {
|
|
67
|
+
default: d(() => [
|
|
68
|
+
a("span", {
|
|
69
|
+
class: k(t.value ? "text-c-1" : "text-c-3")
|
|
70
|
+
}, F(t.value ? t.value.label : "Select Collection"), 3),
|
|
71
|
+
n(i(D), {
|
|
72
|
+
class: "text-c-3",
|
|
73
|
+
icon: "ChevronDown",
|
|
74
|
+
size: "xs"
|
|
75
|
+
})
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
})
|
|
94
79
|
]),
|
|
95
80
|
_: 1
|
|
96
|
-
})
|
|
97
|
-
])
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
}, 8, ["modelValue", "options"])
|
|
82
|
+
]),
|
|
83
|
+
n(i(p), {
|
|
84
|
+
class: "max-h-8 text-xs p-0 px-3",
|
|
85
|
+
type: "submit"
|
|
86
|
+
}, {
|
|
87
|
+
default: d(() => [
|
|
88
|
+
I(" Create Folder ")
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
})
|
|
92
|
+
])
|
|
93
|
+
], 32));
|
|
100
94
|
}
|
|
101
95
|
});
|
|
102
96
|
export {
|
|
103
|
-
|
|
97
|
+
W as default
|
|
104
98
|
};
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
title: string;
|
|
3
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
2
|
close: () => void;
|
|
5
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
6
|
-
title: string;
|
|
7
|
-
}>>> & {
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
4
|
onClose?: (() => any) | undefined;
|
|
9
5
|
}, {}, {}>;
|
|
10
6
|
export default _default;
|
|
11
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
-
type __VLS_TypePropsToOption<T> = {
|
|
13
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
-
} : {
|
|
16
|
-
type: import('vue').PropType<T[K]>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
7
|
//# sourceMappingURL=CommandPaletteImport.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;AAgRA,wBAMG"}
|
|
@@ -1,86 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarButton as f, ScalarIcon as
|
|
4
|
-
import { useFileDialog as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as S, ref as m, onMounted as y, openBlock as F, createElementBlock as k, withModifiers as C, createElementVNode as t, createVNode as a, unref as o, withCtx as u, createTextVNode as d } from "vue";
|
|
2
|
+
import { useWorkspace as I } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarButton as f, ScalarIcon as N } from "@scalar/components";
|
|
4
|
+
import { useFileDialog as R } from "../../hooks/useFileDialog.js";
|
|
5
|
+
const U = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, A = /* @__PURE__ */ t("label", {
|
|
6
6
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
7
7
|
for: "requestimport"
|
|
8
|
-
}, null, -1),
|
|
8
|
+
}, null, -1), B = { class: "flex gap-2" }, L = { class: "flex flex-1 gap-2 max-h-8" }, E = /* @__PURE__ */ S({
|
|
9
9
|
__name: "CommandPaletteImport",
|
|
10
|
-
props: {
|
|
11
|
-
title: {}
|
|
12
|
-
},
|
|
13
10
|
emits: ["close"],
|
|
14
|
-
setup(M, { emit:
|
|
15
|
-
const s =
|
|
11
|
+
setup(M, { emit: x }) {
|
|
12
|
+
const s = x, { activeWorkspace: h, importSpecFile: _, importSpecFromUrl: g } = I(), r = m(""), { open: b } = R({
|
|
16
13
|
onChange: async (e) => {
|
|
17
14
|
const l = e == null ? void 0 : e[0];
|
|
18
15
|
if (l) {
|
|
19
|
-
const
|
|
20
|
-
|
|
16
|
+
const i = new FileReader();
|
|
17
|
+
i.onload = async (v) => {
|
|
21
18
|
var p;
|
|
22
|
-
const w = (p =
|
|
23
|
-
|
|
24
|
-
},
|
|
19
|
+
const w = (p = v.target) == null ? void 0 : p.result;
|
|
20
|
+
_(w, h.value.uid, !1), n(), s("close");
|
|
21
|
+
}, i.readAsText(l);
|
|
25
22
|
}
|
|
26
23
|
},
|
|
27
24
|
multiple: !1,
|
|
28
25
|
accept: ".json,.yaml,.yml"
|
|
29
26
|
}), n = async () => {
|
|
30
27
|
r.value && (await g(r.value), s("close"));
|
|
31
|
-
},
|
|
32
|
-
return
|
|
28
|
+
}, c = m(null);
|
|
29
|
+
return y(() => {
|
|
33
30
|
var e;
|
|
34
|
-
(e =
|
|
35
|
-
}), (e, l) => (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
t("
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
t("div", D, [
|
|
53
|
-
t("div", L, [
|
|
54
|
-
a(o(f), {
|
|
55
|
-
class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
|
|
56
|
-
variant: "outlined",
|
|
57
|
-
onClick: o(_)
|
|
58
|
-
}, {
|
|
59
|
-
default: u(() => [
|
|
60
|
-
d(" JSON, or YAML Files "),
|
|
61
|
-
a(o(R), {
|
|
62
|
-
class: "text-c-3 -rotate-90",
|
|
63
|
-
icon: "ArrowRight",
|
|
64
|
-
size: "sm"
|
|
65
|
-
})
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["onClick"])
|
|
69
|
-
]),
|
|
31
|
+
(e = c.value) == null || e.focus();
|
|
32
|
+
}), (e, l) => (F(), k("form", {
|
|
33
|
+
class: "flex w-full flex-col gap-3",
|
|
34
|
+
onSubmit: C(n, ["prevent"])
|
|
35
|
+
}, [
|
|
36
|
+
t("div", U, [
|
|
37
|
+
A,
|
|
38
|
+
t("input", {
|
|
39
|
+
id: "requestimport",
|
|
40
|
+
ref_key: "importInput",
|
|
41
|
+
ref: c,
|
|
42
|
+
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
43
|
+
label: "Paste Swagger File URL",
|
|
44
|
+
placeholder: "Paste Swagger File URL"
|
|
45
|
+
}, null, 512)
|
|
46
|
+
]),
|
|
47
|
+
t("div", B, [
|
|
48
|
+
t("div", L, [
|
|
70
49
|
a(o(f), {
|
|
71
|
-
class: "max-h-8 text-xs
|
|
72
|
-
|
|
50
|
+
class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
|
|
51
|
+
variant: "outlined",
|
|
52
|
+
onClick: o(b)
|
|
73
53
|
}, {
|
|
74
54
|
default: u(() => [
|
|
75
|
-
d("
|
|
55
|
+
d(" JSON, or YAML Files "),
|
|
56
|
+
a(o(N), {
|
|
57
|
+
class: "text-c-3 -rotate-90",
|
|
58
|
+
icon: "ArrowRight",
|
|
59
|
+
size: "sm"
|
|
60
|
+
})
|
|
76
61
|
]),
|
|
77
62
|
_: 1
|
|
78
|
-
})
|
|
79
|
-
])
|
|
80
|
-
|
|
81
|
-
|
|
63
|
+
}, 8, ["onClick"])
|
|
64
|
+
]),
|
|
65
|
+
a(o(f), {
|
|
66
|
+
class: "max-h-8 text-xs p-0 px-3",
|
|
67
|
+
type: "submit"
|
|
68
|
+
}, {
|
|
69
|
+
default: u(() => [
|
|
70
|
+
d(" Import Collection ")
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
})
|
|
74
|
+
])
|
|
75
|
+
], 32));
|
|
82
76
|
}
|
|
83
77
|
});
|
|
84
78
|
export {
|
|
85
|
-
|
|
79
|
+
E as default
|
|
86
80
|
};
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
-
title: string;
|
|
3
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
2
|
close: () => void;
|
|
5
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
6
|
-
title: string;
|
|
7
|
-
}>>> & {
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
8
4
|
onClose?: (() => any) | undefined;
|
|
9
5
|
}, {}, {}>;
|
|
10
6
|
export default _default;
|
|
11
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
-
type __VLS_TypePropsToOption<T> = {
|
|
13
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
-
} : {
|
|
16
|
-
type: import('vue').PropType<T[K]>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
7
|
//# sourceMappingURL=CommandPaletteRequest.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";;;;;AAuYA,wBAMG"}
|