@scalar/api-client 2.2.3 → 2.2.6
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 +69 -0
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +15 -15
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +24 -24
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -5
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +5 -6
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -8
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +37 -47
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +16 -17
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +85 -84
- package/dist/components/ImportCollection/ImportNowButton.vue.js +3 -3
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +24 -26
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +6 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +28 -23
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +1 -1
- package/dist/components/OpenApiClientButton.vue2.js +16 -16
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +72 -70
- 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 +83 -81
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -6
- package/dist/layouts/App/create-api-client-app.d.ts +3 -2
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +6 -6
- package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -4
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +3 -2
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +4 -4
- package/dist/libs/create-client.d.ts +6 -5
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +38 -37
- package/dist/libs/index.d.ts +1 -2
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +20 -20
- package/dist/libs/send-request/index.d.ts +2 -0
- package/dist/libs/send-request/index.d.ts.map +1 -0
- package/dist/libs/send-request/index.js +9 -0
- package/dist/libs/{send-request.d.ts → send-request/send-request.d.ts} +6 -6
- package/dist/libs/send-request/send-request.d.ts.map +1 -0
- package/dist/libs/{send-request.js → send-request/send-request.js} +29 -29
- package/dist/store/events.d.ts +1 -1
- package/dist/store/import-spec.d.ts +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +1 -1
- package/dist/store/store.d.ts +6 -4
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +47 -45
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -20
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +76 -72
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +30 -30
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +20 -19
- 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 +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +245 -191
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +60 -61
- 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 +188 -196
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +153 -147
- 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 +24 -28
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +5 -5
- 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 +30 -25
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +41 -30
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +50 -58
- package/dist/views/Request/libs/oauth2.d.ts +6 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +43 -37
- package/package.json +18 -14
- package/dist/libs/send-request.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"AAmGA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;;AAyGF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./OpenApiClientButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3ceef301"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as a, computed as i, openBlock as c, createElementBlock as s, createVNode as m, unref as u, createTextVNode as l, createCommentVNode as f } from "vue";
|
|
2
2
|
import { ScalarIcon as p } from "@scalar/components";
|
|
3
|
-
import { makeUrlAbsolute as
|
|
4
|
-
const h = ["href"],
|
|
3
|
+
import { makeUrlAbsolute as d } from "@scalar/oas-utils/helpers";
|
|
4
|
+
const h = ["href"], P = /* @__PURE__ */ a({
|
|
5
5
|
__name: "OpenApiClientButton",
|
|
6
6
|
props: {
|
|
7
7
|
buttonSource: {},
|
|
@@ -9,31 +9,31 @@ const h = ["href"], v = /* @__PURE__ */ o({
|
|
|
9
9
|
integration: {},
|
|
10
10
|
url: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
if (!(
|
|
12
|
+
setup(n) {
|
|
13
|
+
const o = i(() => {
|
|
14
|
+
const r = n.url ?? (typeof window < "u" ? window.location.href : void 0), e = d(r);
|
|
15
|
+
if (!(e != null && e.length))
|
|
16
16
|
return;
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const t = new URL(
|
|
18
|
+
n.isDevelopment ? "http://localhost:5065" : "https://client.scalar.com"
|
|
19
19
|
);
|
|
20
|
-
return
|
|
20
|
+
return t.searchParams.set("url", e), n.integration !== null && t.searchParams.set("integration", n.integration ?? "vue"), t.searchParams.set("utm_source", "api-reference"), t.searchParams.set("utm_medium", "button"), t.searchParams.set("utm_campaign", n.buttonSource), t.toString();
|
|
21
21
|
});
|
|
22
|
-
return (
|
|
22
|
+
return (r, e) => o.value ? (c(), s("a", {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "open-api-client-button",
|
|
25
|
-
href:
|
|
25
|
+
href: o.value,
|
|
26
26
|
target: "_blank"
|
|
27
27
|
}, [
|
|
28
|
-
|
|
28
|
+
m(u(p), {
|
|
29
29
|
icon: "ExternalLink",
|
|
30
30
|
size: "xs",
|
|
31
31
|
thickness: "2.5"
|
|
32
32
|
}),
|
|
33
|
-
e[0] || (e[0] =
|
|
34
|
-
], 8, h)) :
|
|
33
|
+
e[0] || (e[0] = l(" Open API Client "))
|
|
34
|
+
], 8, h)) : f("", !0);
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
P as default
|
|
39
39
|
};
|
|
@@ -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":"AAwPA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AA0aF,wBAOG"}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as M, reactive as $, ref as z, computed as B, watch as w, onMounted as E, onBeforeUnmount as j, openBlock as m, createElementBlock as b, createElementVNode as f, createVNode as n, unref as l, withCtx as r, toDisplayString as O, createTextVNode as x, Fragment as V, renderList as D, createBlock as K } from "vue";
|
|
2
2
|
import q from "../ScalarHotkey.vue.js";
|
|
3
3
|
import { ROUTES as F } from "../../constants.js";
|
|
4
4
|
import { useActiveEntities as H } from "../../store/active-entities.js";
|
|
5
|
-
import { ScalarContextMenu as W, ScalarIcon as d,
|
|
6
|
-
import { capitalize as
|
|
7
|
-
import { useClipboard as
|
|
8
|
-
import
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
5
|
+
import { ScalarContextMenu as W, ScalarIcon as d, ScalarFloating as G, ScalarDropdownMenu as J, ScalarDropdownButton as _ } from "@scalar/components";
|
|
6
|
+
import { capitalize as P } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { useClipboard as Q } from "@scalar/use-hooks/useClipboard";
|
|
8
|
+
import X from "./TopNavItem.vue.js";
|
|
9
|
+
import { useWorkspace as Y } from "../../store/store.js";
|
|
10
|
+
const Z = { class: "flex relative h-10 pl-2 mac:pl-[72px] t-app__top-nav" }, ee = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-2.5 relative overflow-hidden" }, te = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "h-full w-full overflow-hidden"
|
|
13
|
-
},
|
|
13
|
+
}, pe = /* @__PURE__ */ M({
|
|
14
14
|
__name: "TopNav",
|
|
15
15
|
props: {
|
|
16
16
|
openNewTab: {}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
18
|
+
setup(I) {
|
|
19
|
+
const S = I, { activeRequest: L, router: s } = H(), { events: g } = Y(), { copyToClipboard: U } = Q(), t = $([{ label: "", path: "", icon: "Add" }]), a = z(0), T = B(() => a.value);
|
|
20
20
|
function k() {
|
|
21
21
|
var o;
|
|
22
|
-
const e = F.find((
|
|
22
|
+
const e = F.find((u) => s.currentRoute.value.name == u.name);
|
|
23
23
|
e && ((e == null ? void 0 : e.name) === "request" ? t[a.value] = {
|
|
24
|
-
label: ((o =
|
|
25
|
-
path:
|
|
24
|
+
label: ((o = L.value) == null ? void 0 : o.summary) || "",
|
|
25
|
+
path: s.currentRoute.value.path,
|
|
26
26
|
icon: e.icon
|
|
27
27
|
} : t[a.value] = {
|
|
28
|
-
label:
|
|
29
|
-
path:
|
|
28
|
+
label: P(e == null ? void 0 : e.name) || "",
|
|
29
|
+
path: s.currentRoute.value.path,
|
|
30
30
|
icon: e.icon
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
function v() {
|
|
34
|
-
|
|
34
|
+
s.push(t[a.value].path);
|
|
35
35
|
}
|
|
36
36
|
function p() {
|
|
37
37
|
t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, k();
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function c(e) {
|
|
40
40
|
a.value = e, v();
|
|
41
41
|
}
|
|
42
42
|
w(
|
|
43
|
-
() =>
|
|
43
|
+
() => s.currentRoute.value.path,
|
|
44
44
|
() => {
|
|
45
45
|
k();
|
|
46
46
|
},
|
|
@@ -59,11 +59,11 @@ const Y = { class: "flex relative h-10 pl-2 mac:pl-[72px] t-app__top-nav" }, Z =
|
|
|
59
59
|
t.splice(0, e), t.splice(1), a.value = 0, v();
|
|
60
60
|
}, C = (e) => {
|
|
61
61
|
if (e) {
|
|
62
|
-
if (e.addTopNav && p(), e.closeTopNav && N(a.value), e.navigateTopNavLeft &&
|
|
62
|
+
if (e.addTopNav && p(), e.closeTopNav && N(a.value), e.navigateTopNavLeft && c(Math.max(a.value - 1, 0)), e.navigateTopNavRight && c(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
|
|
63
63
|
const o = Number(e.jumpToTab.key) - 1;
|
|
64
|
-
o >= 0 && o < t.length &&
|
|
64
|
+
o >= 0 && o < t.length && c(o);
|
|
65
65
|
}
|
|
66
|
-
e.jumpToLastTab &&
|
|
66
|
+
e.jumpToLastTab && c(t.length - 1);
|
|
67
67
|
}
|
|
68
68
|
}, A = (e) => {
|
|
69
69
|
t.push({
|
|
@@ -73,17 +73,17 @@ const Y = { class: "flex relative h-10 pl-2 mac:pl-[72px] t-app__top-nav" }, Z =
|
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
75
|
return w(
|
|
76
|
-
() =>
|
|
76
|
+
() => S.openNewTab,
|
|
77
77
|
(e) => {
|
|
78
78
|
e && A(e);
|
|
79
79
|
},
|
|
80
80
|
{ immediate: !0 }
|
|
81
|
-
),
|
|
81
|
+
), E(() => g.hotKeys.on(C)), j(() => g.hotKeys.off(C)), (e, o) => (m(), b("nav", Z, [
|
|
82
82
|
o[3] || (o[3] = f("div", { class: "absolute inset-0 app-drag-region" }, null, -1)),
|
|
83
|
-
f("div",
|
|
84
|
-
t.length === 1 ? (m(), b("div",
|
|
83
|
+
f("div", ee, [
|
|
84
|
+
t.length === 1 ? (m(), b("div", te, [
|
|
85
85
|
n(l(W), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
|
|
86
|
-
trigger:
|
|
86
|
+
trigger: r(() => [
|
|
87
87
|
n(l(d), {
|
|
88
88
|
icon: t[0].icon,
|
|
89
89
|
size: "xs",
|
|
@@ -91,43 +91,45 @@ const Y = { class: "flex relative h-10 pl-2 mac:pl-[72px] t-app__top-nav" }, Z =
|
|
|
91
91
|
}, null, 8, ["icon"]),
|
|
92
92
|
f("span", null, O(t[0].label), 1)
|
|
93
93
|
]),
|
|
94
|
-
content:
|
|
95
|
-
n(l(G), {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
94
|
+
content: r(() => [
|
|
95
|
+
n(l(G), { placement: "right-start" }, {
|
|
96
|
+
floating: r(() => [
|
|
97
|
+
n(l(J), { class: "scalar-app scalar-client" }, {
|
|
98
|
+
default: r(() => [
|
|
99
|
+
n(l(_), {
|
|
100
|
+
class: "flex items-center gap-1.5",
|
|
101
|
+
onClick: p
|
|
102
|
+
}, {
|
|
103
|
+
default: r(() => [
|
|
104
|
+
n(l(d), {
|
|
105
|
+
icon: "AddTab",
|
|
106
|
+
size: "sm",
|
|
107
|
+
thickness: "1.5"
|
|
108
|
+
}),
|
|
109
|
+
o[1] || (o[1] = x(" New Tab ")),
|
|
110
|
+
n(q, {
|
|
111
|
+
class: "bg-b-2 ml-auto",
|
|
112
|
+
hotkey: "T"
|
|
113
|
+
})
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
109
116
|
}),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
n(l(_), {
|
|
118
|
+
class: "flex items-center gap-1.5",
|
|
119
|
+
onClick: o[0] || (o[0] = (u) => y(T.value))
|
|
120
|
+
}, {
|
|
121
|
+
default: r(() => [
|
|
122
|
+
n(l(d), {
|
|
123
|
+
icon: "Link",
|
|
124
|
+
size: "sm",
|
|
125
|
+
thickness: "1.5"
|
|
126
|
+
}),
|
|
127
|
+
o[2] || (o[2] = x(" Copy URL "))
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
114
130
|
})
|
|
115
131
|
]),
|
|
116
132
|
_: 1
|
|
117
|
-
}),
|
|
118
|
-
n(l(I), {
|
|
119
|
-
class: "flex items-center gap-1.5",
|
|
120
|
-
onClick: o[0] || (o[0] = (c) => y(T.value))
|
|
121
|
-
}, {
|
|
122
|
-
default: u(() => [
|
|
123
|
-
n(l(d), {
|
|
124
|
-
icon: "Link",
|
|
125
|
-
size: "sm",
|
|
126
|
-
thickness: "1.5"
|
|
127
|
-
}),
|
|
128
|
-
o[2] || (o[2] = x(" Copy URL "))
|
|
129
|
-
]),
|
|
130
|
-
_: 1
|
|
131
133
|
})
|
|
132
134
|
]),
|
|
133
135
|
_: 1
|
|
@@ -135,16 +137,16 @@ const Y = { class: "flex relative h-10 pl-2 mac:pl-[72px] t-app__top-nav" }, Z =
|
|
|
135
137
|
]),
|
|
136
138
|
_: 1
|
|
137
139
|
})
|
|
138
|
-
])) : (m(!0), b(V, { key: 1 }, D(t, (
|
|
139
|
-
key:
|
|
140
|
-
active:
|
|
141
|
-
hotkey: (
|
|
142
|
-
icon:
|
|
143
|
-
label:
|
|
144
|
-
onClick: (h) =>
|
|
145
|
-
onClose: (h) => N(
|
|
146
|
-
onCloseOtherTabs: (h) => R(
|
|
147
|
-
onCopyUrl: (h) => y(
|
|
140
|
+
])) : (m(!0), b(V, { key: 1 }, D(t, (u, i) => (m(), K(X, {
|
|
141
|
+
key: i,
|
|
142
|
+
active: i === T.value,
|
|
143
|
+
hotkey: (i + 1).toString(),
|
|
144
|
+
icon: u.icon,
|
|
145
|
+
label: u.label,
|
|
146
|
+
onClick: (h) => c(i),
|
|
147
|
+
onClose: (h) => N(i),
|
|
148
|
+
onCloseOtherTabs: (h) => R(i),
|
|
149
|
+
onCopyUrl: (h) => y(i),
|
|
148
150
|
onNewTab: p
|
|
149
151
|
}, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
|
|
150
152
|
f("button", {
|
|
@@ -163,5 +165,5 @@ const Y = { class: "flex relative h-10 pl-2 mac:pl-[72px] t-app__top-nav" }, Z =
|
|
|
163
165
|
}
|
|
164
166
|
});
|
|
165
167
|
export {
|
|
166
|
-
|
|
168
|
+
pe as default
|
|
167
169
|
};
|
|
@@ -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":"AAwMA,OAAO,EACL,KAAK,IAAI,EAQV,MAAM,oBAAoB,CAAA;AAI3B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;CACX,CAAC;;;;;;;;;;;;;;AA2UF,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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d56f12d9"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, openBlock as p, createBlock as d, unref as s, withCtx as l, createVNode as t, createElementVNode as a, normalizeClass as k, toDisplayString as u, createCommentVNode as g, createTextVNode as r } from "vue";
|
|
2
2
|
import c from "../ScalarHotkey.vue.js";
|
|
3
|
-
import { ScalarContextMenu as
|
|
4
|
-
const
|
|
3
|
+
import { ScalarContextMenu as b, ScalarTooltip as v, ScalarIcon as n, ScalarFloating as C, ScalarDropdownMenu as y, ScalarDropdownButton as m, ScalarDropdownDivider as T } from "@scalar/components";
|
|
4
|
+
const $ = { class: "nav-item-icon-copy flex flex-1 items-center justify-center gap-1.5" }, w = { class: "custom-scroll nav-item-copy text-xs" }, B = /* @__PURE__ */ f({
|
|
5
5
|
__name: "TopNavItem",
|
|
6
6
|
props: {
|
|
7
7
|
hotkey: {},
|
|
@@ -10,9 +10,9 @@ const T = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
|
|
|
10
10
|
icon: {}
|
|
11
11
|
},
|
|
12
12
|
emits: ["click", "close", "newTab", "copyUrl", "closeOtherTabs"],
|
|
13
|
-
setup(
|
|
14
|
-
return (o, e) => (p(), d(s(
|
|
15
|
-
trigger:
|
|
13
|
+
setup(S) {
|
|
14
|
+
return (o, e) => (p(), d(s(b), { triggerClass: "overflow-hidden w-full" }, {
|
|
15
|
+
trigger: l(() => [
|
|
16
16
|
t(s(v), {
|
|
17
17
|
class: "scalar-client",
|
|
18
18
|
delay: 500,
|
|
@@ -20,110 +20,112 @@ const T = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
|
|
|
20
20
|
resize: "",
|
|
21
21
|
sideOffset: 4
|
|
22
22
|
}, {
|
|
23
|
-
trigger:
|
|
23
|
+
trigger: l(() => [
|
|
24
24
|
a("div", {
|
|
25
|
-
class:
|
|
26
|
-
onClick: e[1] || (e[1] = (
|
|
25
|
+
class: k(["nav-item app-no-drag-region", { "nav-item__active": o.active }]),
|
|
26
|
+
onClick: e[1] || (e[1] = (i) => o.$emit("click"))
|
|
27
27
|
}, [
|
|
28
|
-
a("div",
|
|
29
|
-
t(s(
|
|
28
|
+
a("div", $, [
|
|
29
|
+
t(s(n), {
|
|
30
30
|
icon: o.icon,
|
|
31
31
|
size: "xs",
|
|
32
32
|
thickness: "2.5"
|
|
33
33
|
}, null, 8, ["icon"]),
|
|
34
|
-
a("span",
|
|
34
|
+
a("span", w, u(o.label), 1)
|
|
35
35
|
]),
|
|
36
36
|
a("button", {
|
|
37
37
|
class: "nav-item-close",
|
|
38
38
|
type: "button",
|
|
39
|
-
onClick: e[0] || (e[0] = (
|
|
39
|
+
onClick: e[0] || (e[0] = (i) => o.$emit("close"))
|
|
40
40
|
}, [
|
|
41
|
-
t(s(
|
|
41
|
+
t(s(n), {
|
|
42
42
|
icon: "Close",
|
|
43
43
|
thickness: "1.75"
|
|
44
44
|
})
|
|
45
45
|
])
|
|
46
46
|
], 2)
|
|
47
47
|
]),
|
|
48
|
-
content:
|
|
48
|
+
content: l(() => [
|
|
49
49
|
o.hotkey ? (p(), d(c, {
|
|
50
50
|
key: 0,
|
|
51
51
|
hotkey: o.hotkey
|
|
52
|
-
}, null, 8, ["hotkey"])) :
|
|
52
|
+
}, null, 8, ["hotkey"])) : g("", !0)
|
|
53
53
|
]),
|
|
54
54
|
_: 1
|
|
55
55
|
})
|
|
56
56
|
]),
|
|
57
|
-
content:
|
|
58
|
-
t(s(C), {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
content: l(() => [
|
|
58
|
+
t(s(C), { placement: "right-start" }, {
|
|
59
|
+
floating: l(() => [
|
|
60
|
+
t(s(y), { class: "scalar-app scalar-client" }, {
|
|
61
|
+
default: l(() => [
|
|
62
|
+
t(s(m), {
|
|
63
|
+
class: "flex items-center gap-1.5",
|
|
64
|
+
onClick: e[2] || (e[2] = (i) => o.$emit("newTab"))
|
|
65
|
+
}, {
|
|
66
|
+
default: l(() => [
|
|
67
|
+
t(s(n), {
|
|
68
|
+
icon: "AddTab",
|
|
69
|
+
size: "sm",
|
|
70
|
+
thickness: "1.5"
|
|
71
|
+
}),
|
|
72
|
+
e[6] || (e[6] = r(" New Tab ")),
|
|
73
|
+
t(c, {
|
|
74
|
+
class: "bg-b-2 ml-auto",
|
|
75
|
+
hotkey: "T"
|
|
76
|
+
})
|
|
77
|
+
]),
|
|
78
|
+
_: 1
|
|
72
79
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
t(s(l), {
|
|
87
|
-
icon: "Link",
|
|
88
|
-
size: "sm",
|
|
89
|
-
thickness: "1.5"
|
|
80
|
+
t(s(m), {
|
|
81
|
+
class: "flex items-center gap-1.5",
|
|
82
|
+
onClick: e[3] || (e[3] = (i) => o.$emit("copyUrl"))
|
|
83
|
+
}, {
|
|
84
|
+
default: l(() => [
|
|
85
|
+
t(s(n), {
|
|
86
|
+
icon: "Link",
|
|
87
|
+
size: "sm",
|
|
88
|
+
thickness: "1.5"
|
|
89
|
+
}),
|
|
90
|
+
e[7] || (e[7] = r(" Copy URL "))
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
90
93
|
}),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
94
|
+
t(s(T)),
|
|
95
|
+
t(s(m), {
|
|
96
|
+
class: "flex items-center gap-1.5",
|
|
97
|
+
onClick: e[4] || (e[4] = (i) => o.$emit("close"))
|
|
98
|
+
}, {
|
|
99
|
+
default: l(() => [
|
|
100
|
+
t(s(n), {
|
|
101
|
+
icon: "CloseTab",
|
|
102
|
+
size: "sm",
|
|
103
|
+
thickness: "1.5"
|
|
104
|
+
}),
|
|
105
|
+
e[8] || (e[8] = r(" Close Tab ")),
|
|
106
|
+
t(c, {
|
|
107
|
+
class: "bg-b-2 ml-auto",
|
|
108
|
+
hotkey: "W"
|
|
109
|
+
})
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
105
112
|
}),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
t(s(m), {
|
|
114
|
+
class: "flex items-center gap-1.5",
|
|
115
|
+
onClick: e[5] || (e[5] = (i) => o.$emit("closeOtherTabs"))
|
|
116
|
+
}, {
|
|
117
|
+
default: l(() => [
|
|
118
|
+
t(s(n), {
|
|
119
|
+
icon: "CloseTabs",
|
|
120
|
+
size: "sm",
|
|
121
|
+
thickness: "1.5"
|
|
122
|
+
}),
|
|
123
|
+
e[9] || (e[9] = r(" Close Other Tabs "))
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
110
126
|
})
|
|
111
127
|
]),
|
|
112
128
|
_: 1
|
|
113
|
-
}),
|
|
114
|
-
t(s(m), {
|
|
115
|
-
class: "flex items-center gap-1.5",
|
|
116
|
-
onClick: e[5] || (e[5] = (n) => o.$emit("closeOtherTabs"))
|
|
117
|
-
}, {
|
|
118
|
-
default: i(() => [
|
|
119
|
-
t(s(l), {
|
|
120
|
-
icon: "CloseTabs",
|
|
121
|
-
size: "sm",
|
|
122
|
-
thickness: "1.5"
|
|
123
|
-
}),
|
|
124
|
-
e[9] || (e[9] = r(" Close Other Tabs "))
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
129
|
})
|
|
128
130
|
]),
|
|
129
131
|
_: 1
|
|
@@ -134,5 +136,5 @@ const T = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
|
|
|
134
136
|
}
|
|
135
137
|
});
|
|
136
138
|
export {
|
|
137
|
-
|
|
139
|
+
B as default
|
|
138
140
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AA+DA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WA2IT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAlLH,OAAO;eACT,MAAM;6EAyLpB,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,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, openBlock as s, createBlock as d, unref as o, withCtx as n, createElementVNode as r, createVNode as i, renderSlot as l, createElementBlock as u, toDisplayString as p, createCommentVNode as a, mergeProps as f } from "vue";
|
|
2
|
-
import { Disclosure as m, DisclosureButton as
|
|
2
|
+
import { Disclosure as m, DisclosureButton as x, DisclosurePanel as h } from "@headlessui/vue";
|
|
3
3
|
import { ScalarIcon as b } from "@scalar/components";
|
|
4
4
|
const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, _ = {
|
|
5
5
|
key: 0,
|
|
@@ -14,20 +14,19 @@ const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center
|
|
|
14
14
|
itemCount: { default: 0 }
|
|
15
15
|
},
|
|
16
16
|
setup(y) {
|
|
17
|
-
return (e,
|
|
17
|
+
return (e, w) => (s(), d(o(m), {
|
|
18
18
|
as: "div",
|
|
19
19
|
class: "focus-within:bg-b-2 ui-not-open:hover:bg-b-2 focus-within:text-c-1 text-c-2 rounded request-item ui-not-open:bg-transparent ui-open:[&:not(:last-child)]:mb-2.5 ui-not-open:mb-[0.5px]",
|
|
20
20
|
defaultOpen: e.defaultOpen
|
|
21
21
|
}, {
|
|
22
22
|
default: n(({ open: t }) => [
|
|
23
23
|
r("div", g, [
|
|
24
|
-
i(o(
|
|
24
|
+
i(o(x), { class: "group hover:text-c-1 flex flex-1 items-center gap-2.5 overflow-hidden py-1.5 text-sm font-medium px-1 md:px-1.5 xl:px-2 outline-none" }, {
|
|
25
25
|
default: n(() => [
|
|
26
26
|
i(o(b), {
|
|
27
27
|
class: "text-c-3 group-hover:text-c-1 group-focus-visible:outline ui-open:rotate-90 ui-not-open:rotate-0 rounded-[1px] outline-offset-2",
|
|
28
28
|
icon: "ChevronRight",
|
|
29
|
-
size: "
|
|
30
|
-
thickness: "2.5"
|
|
29
|
+
size: "md"
|
|
31
30
|
}),
|
|
32
31
|
r("div", v, [
|
|
33
32
|
l(e.$slots, "title", { open: t }),
|
|
@@ -40,7 +39,7 @@ const g = { class: "flex items-center" }, v = { class: "flex flex-1 items-center
|
|
|
40
39
|
l(e.$slots, "actions", { open: t })
|
|
41
40
|
])) : a("", !0)
|
|
42
41
|
]),
|
|
43
|
-
i(o(
|
|
42
|
+
i(o(h), f(e.$attrs, { class: "h-full max-h-fit rounded-b diclosure-panel" }), {
|
|
44
43
|
default: n(() => [
|
|
45
44
|
l(e.$slots, "default", { open: t })
|
|
46
45
|
]),
|
|
@@ -362,6 +362,7 @@ export declare const createApiClientApp: (el: HTMLElement | null, configuration?
|
|
|
362
362
|
sidebarWidth: import("vue").Ref<string, string>;
|
|
363
363
|
setSidebarWidth: (width: string) => void;
|
|
364
364
|
isReadOnly: boolean;
|
|
365
|
+
hideClientButton: boolean | undefined;
|
|
365
366
|
importSpecFile: (_spec: string | Record<string, any>, workspaceUid: string, options?: Pick<{
|
|
366
367
|
type?: "collection" | undefined;
|
|
367
368
|
uid?: string | undefined;
|
|
@@ -473,7 +474,7 @@ export declare const createApiClientApp: (el: HTMLElement | null, configuration?
|
|
|
473
474
|
documentUrl?: string | undefined;
|
|
474
475
|
integration?: string | null | undefined;
|
|
475
476
|
} | undefined>;
|
|
476
|
-
importSpecFromUrl: (url: string, workspaceUid: string, {
|
|
477
|
+
importSpecFromUrl: (url: string, workspaceUid: string, { proxyUrl, ...options }?: Omit<Pick<{
|
|
477
478
|
type?: "collection" | undefined;
|
|
478
479
|
uid?: string | undefined;
|
|
479
480
|
externalDocs?: {
|
|
@@ -529,7 +530,7 @@ export declare const createApiClientApp: (el: HTMLElement | null, configuration?
|
|
|
529
530
|
watchModeStatus?: "IDLE" | "WATCHING" | "ERROR" | undefined;
|
|
530
531
|
}, "documentUrl" | "watchMode"> & Pick<import("@scalar/types").ReferenceConfiguration, "servers" | "authentication" | "baseServerURL"> & {
|
|
531
532
|
setCollectionSecurity?: boolean;
|
|
532
|
-
} & Pick<import("@scalar/types").ReferenceConfiguration, "servers">, "documentUrl"> & Pick<import("@scalar/types").ReferenceConfiguration, "
|
|
533
|
+
} & Pick<import("@scalar/types").ReferenceConfiguration, "servers">, "documentUrl"> & Pick<import("@scalar/types").ReferenceConfiguration, "proxyUrl">) => Promise<import("../../libs/index.js").ErrorResponse<Awaited<ReturnType<(_spec: string | Record<string, any>, workspaceUid: string, options?: Pick<{
|
|
533
534
|
type?: "collection" | undefined;
|
|
534
535
|
uid?: string | undefined;
|
|
535
536
|
externalDocs?: {
|