@scalar/api-client 2.2.37 → 2.2.39
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 +45 -0
- 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 +107 -116
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +95 -75
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts +5 -1
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +92 -86
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +7 -10
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +5 -52
- package/dist/components/AddressBar/AddressBarServerItem.vue2.js +75 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +2 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +72 -64
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +83 -51
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +22 -21
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +14 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.js +47 -0
- package/dist/components/Server/ServerVariablesForm.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +12 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesSelect.vue.js +54 -0
- package/dist/components/Server/ServerVariablesSelect.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +11 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.js +29 -0
- package/dist/components/Server/ServerVariablesTextbox.vue2.js +4 -0
- package/dist/components/Server/types.d.ts +9 -0
- package/dist/components/Server/types.d.ts.map +1 -0
- package/dist/components/SideNav/SideHelp.vue.js +16 -16
- 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 +11 -10
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue2.js +10 -9
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +24 -24
- package/dist/layouts/App/create-api-client-app.d.ts +95 -26
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +190 -52
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +20 -17
- package/dist/layouts/Web/create-api-client-web.d.ts +95 -26
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +106 -32
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +86 -81
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +4 -4
- package/dist/store/active-entities.d.ts +13 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +52 -2
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +2 -2
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/servers.d.ts +40 -20
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +95 -28
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +51 -53
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +1 -1
- package/dist/views/Environment/Environment.vue2.js +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +88 -89
- 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 +85 -85
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +16 -17
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +57 -74
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +39 -38
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +8 -7
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +5 -5
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +143 -143
- 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 +71 -71
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -27
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +27 -26
- package/dist/views/Request/hooks/useOpenApiWatcher.js +1 -1
- package/dist/views/Request/libs/{live-sync.d.ts → watch-mode.d.ts} +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -0
- package/dist/views/Request/libs/{live-sync.js → watch-mode.js} +6 -6
- package/dist/views/Servers/Servers.vue2.js +29 -29
- package/package.json +14 -14
- package/dist/views/Request/libs/live-sync.d.ts.map +0 -1
|
@@ -1,117 +1,123 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type: "button"
|
|
9
|
-
}, z = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "text-xxs text-c-2 px-2.5 py-1"
|
|
12
|
-
}, F = { class: "flex items-center justify-center h-4 w-4" }, J = /* @__PURE__ */ U({
|
|
1
|
+
import { defineComponent as D, computed as n, watch as U, openBlock as s, createBlock as v, unref as l, withCtx as i, createElementVNode as a, createElementBlock as c, Fragment as m, renderList as b, createVNode as d, createCommentVNode as k, createTextVNode as V, toDisplayString as z } from "vue";
|
|
2
|
+
import { useActiveEntities as E } from "../../store/active-entities.js";
|
|
3
|
+
import { ScalarPopover as L, ScalarDropdownDivider as W, ScalarIcon as F, ScalarFloatingBackdrop as I, ScalarButton as O } from "@scalar/components";
|
|
4
|
+
import y from "./AddressBarServerItem.vue.js";
|
|
5
|
+
import { useWorkspace as P } from "../../store/store.js";
|
|
6
|
+
import { useLayout as T } from "../../hooks/useLayout.js";
|
|
7
|
+
const j = { class: "custom-scroll flex border-t p-1 flex-col gap-1 max-h-[inherit]" }, M = { class: "flex items-center justify-center h-4 w-4" }, X = /* @__PURE__ */ D({
|
|
13
8
|
__name: "AddressBarServer",
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
props: {
|
|
10
|
+
target: {}
|
|
11
|
+
},
|
|
12
|
+
setup(R) {
|
|
13
|
+
const { activeRequest: u, activeCollection: f, activeServer: p } = E(), { servers: x, collectionMutators: w, events: A } = P(), { layout: B } = T(), S = n(
|
|
16
14
|
() => {
|
|
17
|
-
var
|
|
18
|
-
return (e = (
|
|
19
|
-
var
|
|
15
|
+
var t, e;
|
|
16
|
+
return (e = (t = u.value) == null ? void 0 : t.servers) == null ? void 0 : e.map((r) => {
|
|
17
|
+
var o;
|
|
20
18
|
return {
|
|
21
|
-
id:
|
|
22
|
-
label: ((
|
|
19
|
+
id: r,
|
|
20
|
+
label: ((o = x[r]) == null ? void 0 : o.url) ?? "Unknown server"
|
|
23
21
|
};
|
|
24
22
|
});
|
|
25
23
|
}
|
|
26
|
-
),
|
|
24
|
+
), g = n(
|
|
27
25
|
() => {
|
|
28
|
-
var
|
|
26
|
+
var t, e;
|
|
29
27
|
return (
|
|
30
28
|
// Filters out servers already present in the request
|
|
31
|
-
(e = (
|
|
32
|
-
(
|
|
33
|
-
var
|
|
34
|
-
return !((
|
|
29
|
+
(e = (t = f.value) == null ? void 0 : t.servers) == null ? void 0 : e.filter(
|
|
30
|
+
(r) => {
|
|
31
|
+
var o, h;
|
|
32
|
+
return !((h = (o = u.value) == null ? void 0 : o.servers) != null && h.includes(r));
|
|
35
33
|
}
|
|
36
|
-
).map((
|
|
37
|
-
var
|
|
34
|
+
).map((r) => {
|
|
35
|
+
var o;
|
|
38
36
|
return {
|
|
39
|
-
id:
|
|
40
|
-
label: ((
|
|
37
|
+
id: r,
|
|
38
|
+
label: ((o = x[r]) == null ? void 0 : o.url) ?? "Unknown server"
|
|
41
39
|
};
|
|
42
40
|
})
|
|
43
41
|
);
|
|
44
42
|
}
|
|
45
|
-
),
|
|
43
|
+
), C = n(
|
|
46
44
|
() => {
|
|
47
|
-
var
|
|
48
|
-
return ((
|
|
45
|
+
var t, e;
|
|
46
|
+
return ((t = S.value) == null ? void 0 : t.length) && ((e = g.value) == null ? void 0 : e.length);
|
|
49
47
|
}
|
|
50
48
|
);
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
if (!
|
|
49
|
+
U([f, u], ([t, e]) => {
|
|
50
|
+
var o;
|
|
51
|
+
if (!t || t.selectedServerUid || e != null && e.selectedServerUid)
|
|
54
52
|
return;
|
|
55
|
-
const
|
|
56
|
-
|
|
53
|
+
const r = (o = t.servers) == null ? void 0 : o[0];
|
|
54
|
+
r && w.edit(t.uid, "selectedServerUid", r);
|
|
57
55
|
});
|
|
58
|
-
const
|
|
56
|
+
const _ = () => A.commandPalette.emit({
|
|
59
57
|
commandName: "Add Server"
|
|
60
|
-
}),
|
|
61
|
-
var
|
|
62
|
-
return (e = (
|
|
58
|
+
}), N = n(() => {
|
|
59
|
+
var t, e, r;
|
|
60
|
+
return (e = (t = p.value) == null ? void 0 : t.url) != null && e.endsWith("/") ? p.value.url.slice(0, -1) : ((r = p.value) == null ? void 0 : r.url) || "";
|
|
63
61
|
});
|
|
64
|
-
return (
|
|
65
|
-
class: "
|
|
66
|
-
|
|
62
|
+
return (t, e) => (s(), v(l(L), {
|
|
63
|
+
class: "max-h-[inherit] p-0 text-sm",
|
|
64
|
+
offset: 0,
|
|
65
|
+
placement: "bottom-start",
|
|
66
|
+
resize: "",
|
|
67
|
+
target: t.target,
|
|
68
|
+
teleport: `#${t.target}`
|
|
67
69
|
}, {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
size: "sm"
|
|
96
|
-
})
|
|
97
|
-
]),
|
|
98
|
-
e[2] || (e[2] = n("span", null, "Add Server", -1))
|
|
99
|
-
])
|
|
70
|
+
popover: i(() => [
|
|
71
|
+
a("div", j, [
|
|
72
|
+
(s(!0), c(m, null, b(S.value, (r) => (s(), v(y, {
|
|
73
|
+
key: r.id,
|
|
74
|
+
serverOption: r,
|
|
75
|
+
type: "request"
|
|
76
|
+
}, null, 8, ["serverOption"]))), 128)),
|
|
77
|
+
C.value ? (s(), c(m, { key: 0 }, [
|
|
78
|
+
d(l(W)),
|
|
79
|
+
e[1] || (e[1] = a("div", { class: "text-xxs text-c-2 px-2.5 py-1" }, "Collection", -1))
|
|
80
|
+
], 64)) : k("", !0),
|
|
81
|
+
(s(!0), c(m, null, b(g.value, (r) => (s(), v(y, {
|
|
82
|
+
key: r.id,
|
|
83
|
+
serverOption: r,
|
|
84
|
+
type: "collection"
|
|
85
|
+
}, null, 8, ["serverOption"]))), 128)),
|
|
86
|
+
l(B) !== "modal" ? (s(), c("button", {
|
|
87
|
+
key: 1,
|
|
88
|
+
class: "rounded text-xxs flex items-center gap-1.5 p-1.75 hover:bg-b-2 cursor-pointer",
|
|
89
|
+
type: "button",
|
|
90
|
+
onClick: _
|
|
91
|
+
}, [
|
|
92
|
+
a("div", M, [
|
|
93
|
+
d(l(F), {
|
|
94
|
+
icon: "Add",
|
|
95
|
+
size: "sm"
|
|
96
|
+
})
|
|
100
97
|
]),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
], 64))
|
|
104
|
-
]),
|
|
105
|
-
default: m(() => [
|
|
106
|
-
n("button", j, [
|
|
107
|
-
e[0] || (e[0] = n("span", { class: "sr-only" }, "Server:", -1)),
|
|
108
|
-
E(" " + O(B.value), 1)
|
|
98
|
+
e[2] || (e[2] = a("span", null, "Add Server", -1))
|
|
99
|
+
])) : k("", !0)
|
|
109
100
|
])
|
|
110
101
|
]),
|
|
102
|
+
backdrop: i(() => [
|
|
103
|
+
d(l(I), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
|
|
104
|
+
]),
|
|
105
|
+
default: i(() => [
|
|
106
|
+
d(l(O), {
|
|
107
|
+
class: "font-code z-context-plus lg:text-sm text-xs whitespace-nowrap border ml-0.75 rounded px-1.5 h-6.5 text-c-2 hover:bg-b-2",
|
|
108
|
+
variant: "ghost"
|
|
109
|
+
}, {
|
|
110
|
+
default: i(() => [
|
|
111
|
+
e[0] || (e[0] = a("span", { class: "sr-only" }, "Server:", -1)),
|
|
112
|
+
V(" " + z(N.value), 1)
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
})
|
|
116
|
+
]),
|
|
111
117
|
_: 1
|
|
112
|
-
}));
|
|
118
|
+
}, 8, ["target", "teleport"]));
|
|
113
119
|
}
|
|
114
120
|
});
|
|
115
121
|
export {
|
|
116
|
-
|
|
122
|
+
X as default
|
|
117
123
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
serverOption: {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
type: 'collection' | 'request';
|
|
4
7
|
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<{
|
|
6
|
-
serverOption: ServerOption;
|
|
7
|
-
type: "collection" | "request";
|
|
8
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
9
|
-
serverOption: ServerOption;
|
|
10
|
-
type: "collection" | "request";
|
|
11
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
9
|
export default _default;
|
|
13
10
|
//# sourceMappingURL=AddressBarServerItem.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarServerItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServerItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBarServerItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServerItem.vue"],"names":[],"mappings":"AAkHA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,IAAI,EAAE,YAAY,GAAG,SAAS,CAAA;CAC/B,CAAC;;AA4LF,wBAOG"}
|
|
@@ -1,54 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const b = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, _ = /* @__PURE__ */ m({
|
|
6
|
-
__name: "AddressBarServerItem",
|
|
7
|
-
props: {
|
|
8
|
-
serverOption: {},
|
|
9
|
-
type: {}
|
|
10
|
-
},
|
|
11
|
-
setup(a) {
|
|
12
|
-
const i = a, { activeCollection: o, activeRequest: r, activeServer: c } = g(), { collectionMutators: p, requestMutators: d } = O(), u = (e) => {
|
|
13
|
-
var t, s;
|
|
14
|
-
i.type === "collection" && o.value ? ((s = (t = r.value) == null ? void 0 : t.servers) != null && s.length && (r.value.selectedServerUid = ""), p.edit(
|
|
15
|
-
o.value.uid,
|
|
16
|
-
"selectedServerUid",
|
|
17
|
-
e
|
|
18
|
-
)) : i.type === "request" && r.value && d.edit(
|
|
19
|
-
r.value.uid,
|
|
20
|
-
"selectedServerUid",
|
|
21
|
-
e
|
|
22
|
-
);
|
|
23
|
-
}, v = (e) => {
|
|
24
|
-
var t;
|
|
25
|
-
return ((t = c.value) == null ? void 0 : t.uid) === e;
|
|
26
|
-
};
|
|
27
|
-
return (e, t) => (f(), S(l(y), {
|
|
28
|
-
key: "serverOption.id",
|
|
29
|
-
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
30
|
-
value: e.serverOption.id,
|
|
31
|
-
onClick: t[0] || (t[0] = (s) => u(e.serverOption.id))
|
|
32
|
-
}, {
|
|
33
|
-
default: h(() => [
|
|
34
|
-
n("div", {
|
|
35
|
-
class: w([
|
|
36
|
-
"flex size-4 items-center justify-center p-0.75 text-b-1 rounded-full",
|
|
37
|
-
v(e.serverOption.id) ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
38
|
-
])
|
|
39
|
-
}, [
|
|
40
|
-
k(l(C), {
|
|
41
|
-
icon: "Checkmark",
|
|
42
|
-
size: "xs",
|
|
43
|
-
thickness: "2.5"
|
|
44
|
-
})
|
|
45
|
-
], 2),
|
|
46
|
-
n("span", b, x(e.serverOption.label), 1)
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
}, 8, ["value"]));
|
|
50
|
-
}
|
|
51
|
-
});
|
|
1
|
+
import r from "./AddressBarServerItem.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const s = /* @__PURE__ */ o(r, [["__scopeId", "data-v-7b0b0967"]]);
|
|
52
5
|
export {
|
|
53
|
-
|
|
6
|
+
s as default
|
|
54
7
|
};
|
|
@@ -1,4 +1,77 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as M, useId as O, computed as d, openBlock as c, createElementBlock as v, normalizeClass as h, createElementVNode as u, unref as i, withModifiers as V, createVNode as p, toDisplayString as E, createCommentVNode as _ } from "vue";
|
|
2
|
+
import q from "../Server/ServerVariablesForm.vue.js";
|
|
3
|
+
import { useActiveEntities as B } from "../../store/active-entities.js";
|
|
4
|
+
import { ScalarListboxCheckbox as I, ScalarMarkdown as N } from "@scalar/components";
|
|
5
|
+
import { useWorkspace as U } from "../../store/store.js";
|
|
6
|
+
const A = ["aria-controls", "aria-expanded"], $ = { class: "whitespace-nowrap text-ellipsis overflow-hidden" }, j = ["id"], z = { key: 0 }, D = { class: "description px-3 py-1.5 text-c-3" }, J = /* @__PURE__ */ M({
|
|
7
|
+
__name: "AddressBarServerItem",
|
|
8
|
+
props: {
|
|
9
|
+
serverOption: {},
|
|
10
|
+
type: {}
|
|
11
|
+
},
|
|
12
|
+
setup(x) {
|
|
13
|
+
const l = x, b = O(), { activeCollection: m, activeRequest: s, activeServer: t } = B(), { collectionMutators: S, requestMutators: y, serverMutators: g } = U(), k = (e) => {
|
|
14
|
+
var a, r;
|
|
15
|
+
l.type === "collection" && m.value ? ((r = (a = s.value) == null ? void 0 : a.servers) != null && r.length && (s.value.selectedServerUid = ""), S.edit(
|
|
16
|
+
m.value.uid,
|
|
17
|
+
"selectedServerUid",
|
|
18
|
+
e
|
|
19
|
+
)) : l.type === "request" && s.value && y.edit(
|
|
20
|
+
s.value.uid,
|
|
21
|
+
"selectedServerUid",
|
|
22
|
+
e
|
|
23
|
+
);
|
|
24
|
+
}, o = d(
|
|
25
|
+
() => {
|
|
26
|
+
var e;
|
|
27
|
+
return ((e = t.value) == null ? void 0 : e.uid) === l.serverOption.id;
|
|
28
|
+
}
|
|
29
|
+
), C = d(
|
|
30
|
+
() => {
|
|
31
|
+
var e;
|
|
32
|
+
return ((e = t.value) == null ? void 0 : e.variables) && Object.keys(t.value.variables).length > 0;
|
|
33
|
+
}
|
|
34
|
+
), n = d(() => o.value && C.value), w = (e, a) => {
|
|
35
|
+
if (!t.value) return;
|
|
36
|
+
const r = t.value.variables || {};
|
|
37
|
+
r[e] = { ...r[e], default: a }, g.edit(t.value.uid, "variables", r);
|
|
38
|
+
};
|
|
39
|
+
return (e, a) => {
|
|
40
|
+
var r, f;
|
|
41
|
+
return c(), v("div", {
|
|
42
|
+
class: h(["min-h-fit rounded flex flex-col border group/item", { "border-transparent": !o.value }])
|
|
43
|
+
}, [
|
|
44
|
+
u("button", {
|
|
45
|
+
"aria-controls": n.value ? i(b) : void 0,
|
|
46
|
+
"aria-expanded": n.value,
|
|
47
|
+
class: h(["cursor-pointer rounded flex items-center gap-1.5 min-h-8 px-1.5", o.value ? "text-c-1 bg-b-2" : "hover:bg-b-2"]),
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: a[0] || (a[0] = V((L) => k(e.serverOption.id), ["stop"]))
|
|
50
|
+
}, [
|
|
51
|
+
p(i(I), { selected: o.value }, null, 8, ["selected"]),
|
|
52
|
+
u("span", $, E(e.serverOption.label), 1)
|
|
53
|
+
], 10, A),
|
|
54
|
+
n.value ? (c(), v("div", {
|
|
55
|
+
key: 0,
|
|
56
|
+
id: i(b),
|
|
57
|
+
class: "bg-b-2 border-t divide divide-y *:pl-4 rounded-b"
|
|
58
|
+
}, [
|
|
59
|
+
p(q, {
|
|
60
|
+
variables: (r = i(t)) == null ? void 0 : r.variables,
|
|
61
|
+
"onUpdate:variable": w
|
|
62
|
+
}, null, 8, ["variables"]),
|
|
63
|
+
(f = i(t)) != null && f.description ? (c(), v("div", z, [
|
|
64
|
+
u("div", D, [
|
|
65
|
+
p(i(N), {
|
|
66
|
+
value: i(t).description
|
|
67
|
+
}, null, 8, ["value"])
|
|
68
|
+
])
|
|
69
|
+
])) : _("", !0)
|
|
70
|
+
], 8, j)) : _("", !0)
|
|
71
|
+
], 2);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
2
75
|
export {
|
|
3
|
-
|
|
76
|
+
J as default
|
|
4
77
|
};
|
|
@@ -16,6 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
16
16
|
disableEnter?: boolean;
|
|
17
17
|
disableCloseBrackets?: boolean;
|
|
18
18
|
enum?: string[];
|
|
19
|
+
examples?: string[];
|
|
19
20
|
type?: string;
|
|
20
21
|
nullable?: boolean;
|
|
21
22
|
withVariables?: boolean;
|
|
@@ -45,6 +46,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
45
46
|
disableEnter?: boolean;
|
|
46
47
|
disableCloseBrackets?: boolean;
|
|
47
48
|
enum?: string[];
|
|
49
|
+
examples?: string[];
|
|
48
50
|
type?: string;
|
|
49
51
|
nullable?: boolean;
|
|
50
52
|
withVariables?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA+dO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAkBb,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBAtBX,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;cArBd,OAAO;gBAGL,OAAO;iBAJN,OAAO;sBAOF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAInB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBA0cM,GAAG;kBACN,GAAG;;AAne9B,wBA+hBC;AAgBD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-63d3ce30"]]);
|
|
6
6
|
export {
|
|
7
7
|
_ as default
|
|
8
8
|
};
|