@scalar/api-client 2.2.53 → 2.2.55
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 +24 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +121 -106
- package/dist/components/{ImportCurl/ImportCurlModal.vue.d.ts → CommandPalette/CommandPaletteImportCurl.vue.d.ts} +9 -17
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +141 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +98 -1
- 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 +128 -113
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +2 -2
- package/dist/components/Server/ServerSelector.vue.d.ts +5 -1
- package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerSelector.vue.js +48 -43
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +122 -94
- package/dist/components/TopNav/TopNavItem.vue.d.ts +1 -0
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue2.js +49 -42
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +10 -9
- package/dist/layouts/App/create-api-client-app.d.ts +12 -12
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +24 -24
- package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
- package/dist/libs/create-client.d.ts +12 -12
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -115
- package/dist/libs/get-request-uid-by-path-method.d.ts +7 -0
- package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -0
- package/dist/libs/get-request-uid-by-path-method.js +10 -0
- package/dist/libs/get-request-uid-by-path-method.test.d.ts +2 -0
- package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/validate-parameters.d.ts +6 -0
- package/dist/libs/validate-parameters.d.ts.map +1 -0
- package/dist/libs/validate-parameters.js +12 -0
- package/dist/libs/validate-parameters.test.d.ts +2 -0
- package/dist/libs/validate-parameters.test.d.ts.map +1 -0
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/store.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +6 -3
- 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 +96 -145
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue2.js +68 -57
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +34 -31
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +35 -33
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -0
- 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 +59 -54
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
- 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 +29 -27
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +23 -23
- 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 +4 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/libs/request.js +1 -2
- package/package.json +11 -11
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +0 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +0 -7
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +0 -125
|
@@ -1,70 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { useWorkspace as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as h, computed as a, watch as y, openBlock as m, createBlock as k, unref as n, withCtx as f, createVNode as S, createElementVNode as g, createTextVNode as p, toDisplayString as x, createElementBlock as U } from "vue";
|
|
2
|
+
import { ScalarListbox as V, ScalarButton as b, ScalarIcon as B } from "@scalar/components";
|
|
3
|
+
import { useWorkspace as N } from "../../store/store.js";
|
|
4
|
+
const W = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "gap-0.75 text-c-1 h-6.5 flex w-full items-center whitespace-nowrap rounded-b-lg px-3 py-1.5 text-xs lg:text-sm"
|
|
7
|
-
},
|
|
7
|
+
}, E = /* @__PURE__ */ h({
|
|
8
8
|
__name: "ServerSelector",
|
|
9
9
|
props: {
|
|
10
10
|
collection: {},
|
|
11
11
|
server: {},
|
|
12
12
|
target: {}
|
|
13
13
|
},
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
emits: ["updateServer"],
|
|
15
|
+
setup(l, { emit: w }) {
|
|
16
|
+
const i = w, { servers: s, collectionMutators: c } = N(), o = a(
|
|
16
17
|
() => {
|
|
17
|
-
var
|
|
18
|
-
return (
|
|
19
|
-
var
|
|
18
|
+
var t;
|
|
19
|
+
return (t = l.collection) == null ? void 0 : t.servers.map((e) => {
|
|
20
|
+
var r;
|
|
20
21
|
return {
|
|
21
|
-
id:
|
|
22
|
-
label: ((
|
|
22
|
+
id: e,
|
|
23
|
+
label: ((r = s[e]) == null ? void 0 : r.url) ?? "Unknown server"
|
|
23
24
|
};
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
|
-
),
|
|
27
|
-
get: () =>
|
|
28
|
-
set: (
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
), u = a({
|
|
28
|
+
get: () => l.server ? o.value.find((t) => t.id === l.server.uid) : void 0,
|
|
29
|
+
set: (t) => {
|
|
30
|
+
var r;
|
|
31
|
+
if (!t) return;
|
|
32
|
+
c.edit(
|
|
33
|
+
l.collection.uid,
|
|
31
34
|
"selectedServerUid",
|
|
32
|
-
|
|
35
|
+
t.id
|
|
33
36
|
);
|
|
37
|
+
const e = (r = s[t.id]) == null ? void 0 : r.url;
|
|
38
|
+
e && i("updateServer", e);
|
|
34
39
|
}
|
|
35
40
|
});
|
|
36
|
-
|
|
37
|
-
() =>
|
|
38
|
-
(
|
|
39
|
-
var
|
|
40
|
-
if (!
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
y(
|
|
42
|
+
() => l.collection,
|
|
43
|
+
(t) => {
|
|
44
|
+
var r, v;
|
|
45
|
+
if (!t || t.selectedServerUid) return;
|
|
46
|
+
const e = (r = l.collection.servers) == null ? void 0 : r[0];
|
|
47
|
+
e && (c.edit(l.collection.uid, "selectedServerUid", e), (v = s[e]) != null && v.url && i("updateServer", s[e].url));
|
|
43
48
|
}
|
|
44
49
|
);
|
|
45
|
-
const
|
|
46
|
-
var
|
|
47
|
-
return (
|
|
50
|
+
const d = a(() => {
|
|
51
|
+
var t, e, r;
|
|
52
|
+
return (e = (t = l.server) == null ? void 0 : t.url) != null && e.endsWith("/") ? l.server.url.slice(0, -1) : ((r = l.server) == null ? void 0 : r.url) || "";
|
|
48
53
|
});
|
|
49
|
-
return (
|
|
54
|
+
return (t, e) => o.value.length > 1 ? (m(), k(n(V), {
|
|
50
55
|
key: 0,
|
|
51
|
-
modelValue:
|
|
52
|
-
"onUpdate:modelValue":
|
|
56
|
+
modelValue: u.value,
|
|
57
|
+
"onUpdate:modelValue": e[0] || (e[0] = (r) => u.value = r),
|
|
53
58
|
options: o.value,
|
|
54
59
|
placement: "bottom-start",
|
|
55
60
|
resize: "",
|
|
56
|
-
target:
|
|
57
|
-
teleport: `#${
|
|
61
|
+
target: t.target,
|
|
62
|
+
teleport: `#${t.target}`
|
|
58
63
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
64
|
+
default: f(() => [
|
|
65
|
+
S(n(b), {
|
|
61
66
|
class: "gap-0.75 text-c-1 h-6.5 w-full justify-start whitespace-nowrap rounded-b-lg px-3 py-1.5 text-xs font-normal -outline-offset-1 lg:text-sm",
|
|
62
67
|
variant: "ghost"
|
|
63
68
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
default: f(() => [
|
|
70
|
+
e[1] || (e[1] = g("span", { class: "sr-only" }, "Server:", -1)),
|
|
71
|
+
p(" " + x(d.value) + " ", 1),
|
|
72
|
+
S(n(B), {
|
|
68
73
|
class: "text-c-2",
|
|
69
74
|
icon: "ChevronDown",
|
|
70
75
|
size: "sm"
|
|
@@ -74,12 +79,12 @@ const U = {
|
|
|
74
79
|
})
|
|
75
80
|
]),
|
|
76
81
|
_: 1
|
|
77
|
-
}, 8, ["modelValue", "options", "target", "teleport"])) : (
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
}, 8, ["modelValue", "options", "target", "teleport"])) : (m(), U("div", W, [
|
|
83
|
+
e[2] || (e[2] = g("span", { class: "sr-only" }, "Server:", -1)),
|
|
84
|
+
p(" " + x(d.value), 1)
|
|
80
85
|
]));
|
|
81
86
|
}
|
|
82
87
|
});
|
|
83
88
|
export {
|
|
84
|
-
|
|
89
|
+
E as default
|
|
85
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAqTA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AA+eF,wBAOG"}
|
|
@@ -1,158 +1,182 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarContextMenu as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
1
|
+
import { defineComponent as O, reactive as W, ref as D, computed as L, watch as I, onMounted as K, onBeforeUnmount as q, openBlock as p, createElementBlock as g, createElementVNode as h, createVNode as r, unref as i, withCtx as m, createBlock as k, createCommentVNode as F, toDisplayString as H, createTextVNode as U, Fragment as G, renderList as J } from "vue";
|
|
2
|
+
import { ScalarContextMenu as P, ScalarIcon as C, ScalarFloating as Q, ScalarDropdownMenu as X, ScalarDropdownButton as A } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as Y } from "@scalar/icons";
|
|
4
|
+
import { useClipboard as Z } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
import { useRouter as ee } from "vue-router";
|
|
6
|
+
import te from "../ScalarHotkey.vue.js";
|
|
7
|
+
import { ROUTES as oe } from "../../constants.js";
|
|
8
|
+
import { useActiveEntities as le } from "../../store/active-entities.js";
|
|
9
|
+
import ae from "./TopNavItem.vue.js";
|
|
10
|
+
import { useWorkspace as ne } from "../../store/store.js";
|
|
11
|
+
const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se = { class: "relative flex h-10 flex-1 items-center gap-1.5 overflow-hidden pr-2.5 text-sm font-medium" }, re = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "h-full w-full overflow-hidden"
|
|
13
|
-
},
|
|
14
|
+
}, ge = /* @__PURE__ */ O({
|
|
14
15
|
__name: "TopNav",
|
|
15
16
|
props: {
|
|
16
17
|
openNewTab: {}
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
setup(E) {
|
|
20
|
+
const M = E, { activeRequest: $, activeCollection: v } = le(), c = ee(), { events: T } = ne(), { copyToClipboard: z } = Z(), t = W([
|
|
21
|
+
{
|
|
22
|
+
label: "",
|
|
23
|
+
path: "",
|
|
24
|
+
icon: "Add",
|
|
25
|
+
isCollection: !1
|
|
26
|
+
}
|
|
27
|
+
]), a = D(0), y = L(() => a.value), N = L(() => {
|
|
28
|
+
var e;
|
|
29
|
+
return (e = c.currentRoute.value.name) == null ? void 0 : e.toString().startsWith("collection.");
|
|
30
|
+
});
|
|
31
|
+
function x() {
|
|
32
|
+
var o, l, n, u, s;
|
|
33
|
+
if (N.value) {
|
|
23
34
|
t[a.value] = {
|
|
24
|
-
label: ((l = (
|
|
35
|
+
label: ((l = (o = v.value) == null ? void 0 : o.info) == null ? void 0 : l.title) || "Untitled Collection",
|
|
25
36
|
path: c.currentRoute.value.path,
|
|
26
|
-
icon: "Collection"
|
|
37
|
+
icon: ((n = v.value) == null ? void 0 : n["x-scalar-icon"]) || "Collection",
|
|
38
|
+
isCollection: !0
|
|
27
39
|
};
|
|
28
40
|
return;
|
|
29
41
|
}
|
|
30
|
-
if ((
|
|
42
|
+
if ((u = c.currentRoute.value.name) != null && u.toString().startsWith("request")) {
|
|
31
43
|
t[a.value] = {
|
|
32
|
-
label: ((
|
|
44
|
+
label: ((s = $.value) == null ? void 0 : s.summary) || "",
|
|
33
45
|
path: c.currentRoute.value.path,
|
|
34
|
-
icon: "ExternalLink"
|
|
46
|
+
icon: "ExternalLink",
|
|
47
|
+
isCollection: !1
|
|
35
48
|
};
|
|
36
49
|
return;
|
|
37
50
|
}
|
|
38
|
-
const e =
|
|
39
|
-
var
|
|
40
|
-
return
|
|
41
|
-
((
|
|
51
|
+
const e = oe.find((j) => {
|
|
52
|
+
var S;
|
|
53
|
+
return j.to.name.startsWith(
|
|
54
|
+
((S = c.currentRoute.value.name) == null ? void 0 : S.toString()) ?? ""
|
|
42
55
|
);
|
|
43
56
|
});
|
|
44
57
|
if (e) {
|
|
45
58
|
t[a.value] = {
|
|
46
59
|
label: e.displayName,
|
|
47
60
|
path: c.currentRoute.value.path,
|
|
48
|
-
icon: e.icon
|
|
61
|
+
icon: e.icon,
|
|
62
|
+
isCollection: !1
|
|
49
63
|
};
|
|
50
64
|
return;
|
|
51
65
|
}
|
|
52
66
|
}
|
|
53
|
-
function
|
|
67
|
+
function b() {
|
|
54
68
|
var o;
|
|
55
69
|
const e = (o = t[a.value]) == null ? void 0 : o.path;
|
|
56
70
|
e && c.push(e);
|
|
57
71
|
}
|
|
58
|
-
function
|
|
59
|
-
t.push({
|
|
72
|
+
function d() {
|
|
73
|
+
t.push({
|
|
74
|
+
label: "",
|
|
75
|
+
path: "",
|
|
76
|
+
icon: "Add",
|
|
77
|
+
isCollection: !1
|
|
78
|
+
}), a.value = t.length - 1, x();
|
|
60
79
|
}
|
|
61
|
-
function
|
|
62
|
-
a.value = e,
|
|
80
|
+
function f(e) {
|
|
81
|
+
a.value = e, b();
|
|
63
82
|
}
|
|
64
|
-
|
|
83
|
+
I(
|
|
65
84
|
() => c.currentRoute.value.path,
|
|
66
85
|
() => {
|
|
67
|
-
|
|
86
|
+
x();
|
|
68
87
|
},
|
|
69
88
|
{ immediate: !0 }
|
|
70
89
|
);
|
|
71
|
-
function
|
|
90
|
+
function w(e) {
|
|
72
91
|
t.splice(e, 1), a.value = Math.min(
|
|
73
92
|
a.value,
|
|
74
93
|
t.length - 1
|
|
75
|
-
),
|
|
94
|
+
), b();
|
|
76
95
|
}
|
|
77
|
-
const
|
|
78
|
-
var
|
|
79
|
-
if (!((
|
|
96
|
+
const R = (e) => {
|
|
97
|
+
var l;
|
|
98
|
+
if (!((l = t[e]) != null && l.path)) return;
|
|
80
99
|
const o = new URL(window.location.href);
|
|
81
|
-
o.pathname = t[e].path,
|
|
82
|
-
},
|
|
83
|
-
t.splice(0, e), t.splice(1), a.value = 0,
|
|
84
|
-
},
|
|
100
|
+
o.pathname = t[e].path, z(o.toString());
|
|
101
|
+
}, B = (e) => {
|
|
102
|
+
t.splice(0, e), t.splice(1), a.value = 0, b();
|
|
103
|
+
}, _ = (e) => {
|
|
85
104
|
if (e) {
|
|
86
|
-
if (e.addTopNav &&
|
|
105
|
+
if (e.addTopNav && d(), e.closeTopNav && w(a.value), e.navigateTopNavLeft && f(Math.max(a.value - 1, 0)), e.navigateTopNavRight && f(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
|
|
87
106
|
const o = Number(e.jumpToTab.key) - 1;
|
|
88
|
-
o >= 0 && o < t.length &&
|
|
107
|
+
o >= 0 && o < t.length && f(o);
|
|
89
108
|
}
|
|
90
|
-
e.jumpToLastTab &&
|
|
109
|
+
e.jumpToLastTab && f(t.length - 1);
|
|
91
110
|
}
|
|
92
|
-
},
|
|
111
|
+
}, V = (e) => {
|
|
93
112
|
t.push({
|
|
94
113
|
label: e.name,
|
|
95
114
|
path: e.uid,
|
|
96
|
-
icon: "ExternalLink"
|
|
115
|
+
icon: "ExternalLink",
|
|
116
|
+
isCollection: !1
|
|
97
117
|
});
|
|
98
118
|
};
|
|
99
|
-
return
|
|
100
|
-
() =>
|
|
119
|
+
return I(
|
|
120
|
+
() => M.openNewTab,
|
|
101
121
|
(e) => {
|
|
102
|
-
e &&
|
|
122
|
+
e && V(e);
|
|
103
123
|
},
|
|
104
124
|
{ immediate: !0 }
|
|
105
|
-
),
|
|
106
|
-
o[3] || (o[3] =
|
|
107
|
-
|
|
108
|
-
t.length === 1 ? (
|
|
109
|
-
r(
|
|
110
|
-
trigger:
|
|
111
|
-
var n,
|
|
125
|
+
), K(() => T.hotKeys.on(_)), q(() => T.hotKeys.off(_)), (e, o) => (p(), g("nav", ie, [
|
|
126
|
+
o[3] || (o[3] = h("div", { class: "app-drag-region absolute inset-0" }, null, -1)),
|
|
127
|
+
h("div", se, [
|
|
128
|
+
t.length === 1 ? (p(), g("div", re, [
|
|
129
|
+
r(i(P), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
|
|
130
|
+
trigger: m(() => {
|
|
131
|
+
var l, n, u, s;
|
|
112
132
|
return [
|
|
113
|
-
|
|
133
|
+
N.value ? (p(), k(i(Y), {
|
|
114
134
|
key: 0,
|
|
115
|
-
|
|
135
|
+
class: "size-3.5 min-w-3.5 stroke-2",
|
|
136
|
+
src: ((l = i(v)) == null ? void 0 : l["x-scalar-icon"]) || "Collection"
|
|
137
|
+
}, null, 8, ["src"])) : (n = t[0]) != null && n.icon ? (p(), k(i(C), {
|
|
138
|
+
key: 1,
|
|
139
|
+
icon: (u = t[0]) == null ? void 0 : u.icon,
|
|
116
140
|
size: "xs",
|
|
117
141
|
thickness: "2.5"
|
|
118
|
-
}, null, 8, ["icon"])) :
|
|
119
|
-
|
|
142
|
+
}, null, 8, ["icon"])) : F("", !0),
|
|
143
|
+
h("span", null, H((s = t[0]) == null ? void 0 : s.label), 1)
|
|
120
144
|
];
|
|
121
145
|
}),
|
|
122
|
-
content:
|
|
123
|
-
r(
|
|
124
|
-
floating:
|
|
125
|
-
r(
|
|
126
|
-
default:
|
|
127
|
-
r(
|
|
146
|
+
content: m(() => [
|
|
147
|
+
r(i(Q), { placement: "right-start" }, {
|
|
148
|
+
floating: m(() => [
|
|
149
|
+
r(i(X), { class: "scalar-app scalar-client" }, {
|
|
150
|
+
default: m(() => [
|
|
151
|
+
r(i(A), {
|
|
128
152
|
class: "flex items-center gap-1.5",
|
|
129
|
-
onClick:
|
|
153
|
+
onClick: d
|
|
130
154
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
r(
|
|
155
|
+
default: m(() => [
|
|
156
|
+
r(i(C), {
|
|
133
157
|
icon: "AddTab",
|
|
134
158
|
size: "sm",
|
|
135
159
|
thickness: "1.5"
|
|
136
160
|
}),
|
|
137
|
-
o[1] || (o[1] =
|
|
138
|
-
r(
|
|
161
|
+
o[1] || (o[1] = U(" New Tab ")),
|
|
162
|
+
r(te, {
|
|
139
163
|
class: "bg-b-2 ml-auto",
|
|
140
164
|
hotkey: "T"
|
|
141
165
|
})
|
|
142
166
|
]),
|
|
143
167
|
_: 1
|
|
144
168
|
}),
|
|
145
|
-
r(
|
|
169
|
+
r(i(A), {
|
|
146
170
|
class: "flex items-center gap-1.5",
|
|
147
|
-
onClick: o[0] || (o[0] = (
|
|
171
|
+
onClick: o[0] || (o[0] = (l) => R(y.value))
|
|
148
172
|
}, {
|
|
149
|
-
default:
|
|
150
|
-
r(
|
|
173
|
+
default: m(() => [
|
|
174
|
+
r(i(C), {
|
|
151
175
|
icon: "Link",
|
|
152
176
|
size: "sm",
|
|
153
177
|
thickness: "1.5"
|
|
154
178
|
}),
|
|
155
|
-
o[2] || (o[2] =
|
|
179
|
+
o[2] || (o[2] = U(" Copy URL "))
|
|
156
180
|
]),
|
|
157
181
|
_: 1
|
|
158
182
|
})
|
|
@@ -165,26 +189,30 @@ const ne = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, le
|
|
|
165
189
|
]),
|
|
166
190
|
_: 1
|
|
167
191
|
})
|
|
168
|
-
])) : (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
192
|
+
])) : (p(!0), g(G, { key: 1 }, J(t, (l, n) => {
|
|
193
|
+
var u;
|
|
194
|
+
return p(), k(ae, {
|
|
195
|
+
key: l.path,
|
|
196
|
+
active: n === y.value,
|
|
197
|
+
hotkey: (n + 1).toString(),
|
|
198
|
+
icon: l.isCollection ? ((u = i(v)) == null ? void 0 : u["x-scalar-icon"]) || "Collection" : l.icon,
|
|
199
|
+
label: l.label,
|
|
200
|
+
isCollection: l.isCollection || !1,
|
|
201
|
+
onClick: (s) => f(n),
|
|
202
|
+
onClose: (s) => w(n),
|
|
203
|
+
onCloseOtherTabs: (s) => B(n),
|
|
204
|
+
onCopyUrl: (s) => R(n),
|
|
205
|
+
onNewTab: d
|
|
206
|
+
}, null, 8, ["active", "hotkey", "icon", "label", "isCollection", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]);
|
|
207
|
+
}), 128)),
|
|
208
|
+
h("button", {
|
|
181
209
|
class: "text-c-3 hover:bg-b-3 app-no-drag-region rounded p-1.5",
|
|
182
210
|
type: "button",
|
|
183
|
-
onClick:
|
|
211
|
+
onClick: d
|
|
184
212
|
}, [
|
|
185
|
-
r(
|
|
213
|
+
r(i(C), {
|
|
186
214
|
icon: "Add",
|
|
187
|
-
size: "
|
|
215
|
+
size: "sm",
|
|
188
216
|
thickness: "2.5"
|
|
189
217
|
})
|
|
190
218
|
])
|
|
@@ -193,5 +221,5 @@ const ne = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, le
|
|
|
193
221
|
}
|
|
194
222
|
});
|
|
195
223
|
export {
|
|
196
|
-
|
|
224
|
+
ge as default
|
|
197
225
|
};
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
active: boolean;
|
|
5
5
|
label: string;
|
|
6
6
|
icon: Icon;
|
|
7
|
+
isCollection?: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
10
|
click: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA+MA,OAAO,EAQL,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAA;AAO3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;;;;;;;;;;;;;AAyVF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNavItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3f2a2c71"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|