@scalar/api-client 2.0.29 → 2.0.31
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 +19 -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 +23 -23
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +2 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +63 -48
- package/dist/components/CodeInput/codeDropdownWidget.d.ts +9 -1
- package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeDropdownWidget.js +62 -51
- package/dist/components/CodeInput/codeVariableWidget.d.ts +10 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +63 -56
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +1 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +1 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +5 -5
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +5 -43
- package/dist/components/SideNav/SideNav.vue2.js +44 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -0
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +29 -20
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +65 -34
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -11
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +9 -9
- package/dist/layouts/App/create-api-client-app.d.ts +2966 -0
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -0
- package/dist/layouts/App/create-api-client-app.js +18 -0
- package/dist/layouts/App/index.d.ts +1 -1
- package/dist/layouts/App/index.d.ts.map +1 -1
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -17
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +20 -24
- package/dist/layouts/Modal/api-client-modal.d.ts +5905 -57
- package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/api-client-modal.js +27 -129
- package/dist/libs/create-client.d.ts +3025 -0
- package/dist/libs/create-client.d.ts.map +1 -0
- package/dist/libs/create-client.js +147 -0
- package/dist/libs/index.d.ts +1 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +11 -9
- package/dist/router.d.ts +7 -17
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +28 -40
- package/dist/store/index.d.ts +2 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +5 -0
- package/dist/store/workspace.d.ts +3028 -603
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +454 -432
- package/dist/style.css +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +8 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +32 -31
- 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 +11 -11
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +13 -13
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- 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 +2 -2
- 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 +24 -23
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +26 -20
- package/package.json +11 -7
- package/dist/layouts/App/createApiClientApp.d.ts +0 -16
- package/dist/layouts/App/createApiClientApp.d.ts.map +0 -1
- package/dist/layouts/App/createApiClientApp.js +0 -62
- package/dist/store/topNav.d.ts +0 -445
- package/dist/store/topNav.d.ts.map +0 -1
- package/dist/store/topNav.js +0 -53
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
var u = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
constructor(t) {
|
|
2
|
+
var h = (n, e, t) => e in n ? u(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var r = (n, e, t) => h(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { ScalarButton as f, ScalarIcon as g, ScalarTooltip as b } from "@scalar/components";
|
|
5
|
+
import { ViewPlugin as x, RangeSetBuilder as w, Decoration as y, EditorView as N, WidgetType as E } from "@scalar/use-codemirror";
|
|
6
|
+
import { defineComponent as C, h as a, createApp as S } from "vue";
|
|
7
|
+
const k = (n, e) => "_scalarEnvId" in n ? `bg-${e[n._scalarEnvId].color}` : "bg-grey";
|
|
8
|
+
class d extends E {
|
|
9
|
+
constructor(t, i, s, o) {
|
|
11
10
|
super();
|
|
12
|
-
|
|
13
|
-
this
|
|
11
|
+
r(this, "app");
|
|
12
|
+
r(this, "environments");
|
|
13
|
+
r(this, "activeParsedEnvironments");
|
|
14
|
+
r(this, "isReadOnly");
|
|
15
|
+
this.variableName = t, this.variableName = t, this.environments = i, this.activeParsedEnvironments = s, this.isReadOnly = o;
|
|
14
16
|
}
|
|
15
17
|
toDOM() {
|
|
16
18
|
const t = document.createElement("span");
|
|
17
19
|
t.className = "cm-pill", t.textContent = `${this.variableName}`;
|
|
18
|
-
const
|
|
19
|
-
props:
|
|
20
|
-
render() {
|
|
21
|
-
const
|
|
22
|
-
(
|
|
20
|
+
const i = C({
|
|
21
|
+
props: { variableName: { type: String, default: null } },
|
|
22
|
+
render: () => {
|
|
23
|
+
const s = this.activeParsedEnvironments.value.find(
|
|
24
|
+
(c) => c.key === this.variableName
|
|
23
25
|
);
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
!
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
s && (t.className += ` ${k(s, this.environments)}`);
|
|
27
|
+
const o = s ? a("div", { class: "p-2" }, s.value) : a("div", { class: "divide-y divide-1/2 grid" }, [
|
|
28
|
+
a("span", { class: "p-2" }, "Variable not found"),
|
|
29
|
+
!this.isReadOnly && a("div", { class: "p-1" }, [
|
|
30
|
+
a(
|
|
31
|
+
f,
|
|
30
32
|
{
|
|
31
33
|
class: "gap-1.5 justify-start font-normal px-1 py-1.5 h-auto transition-colors rounded no-underline text-xxs w-full hover:bg-b-2",
|
|
32
34
|
variant: "ghost",
|
|
@@ -35,14 +37,14 @@ class l extends C {
|
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
[
|
|
38
|
-
|
|
40
|
+
a(g, { class: "w-2", icon: "Add", size: "xs" }),
|
|
39
41
|
"Add variable"
|
|
40
42
|
]
|
|
41
43
|
)
|
|
42
44
|
])
|
|
43
45
|
]);
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
+
return a(
|
|
47
|
+
b,
|
|
46
48
|
{
|
|
47
49
|
align: "start",
|
|
48
50
|
class: "bg-b-1 w-full",
|
|
@@ -51,76 +53,81 @@ class l extends C {
|
|
|
51
53
|
sideOffset: 6
|
|
52
54
|
},
|
|
53
55
|
{
|
|
54
|
-
trigger: () =>
|
|
55
|
-
content: () =>
|
|
56
|
+
trigger: () => a("span", `${this.variableName}`),
|
|
57
|
+
content: () => a(
|
|
56
58
|
"div",
|
|
57
59
|
{
|
|
58
60
|
class: "w-content shadow-lg rounded bg-b-1 text-xxs leading-5 text-c-1"
|
|
59
61
|
},
|
|
60
|
-
|
|
62
|
+
o
|
|
61
63
|
)
|
|
62
64
|
}
|
|
63
65
|
);
|
|
64
66
|
}
|
|
65
67
|
});
|
|
66
|
-
return this.app =
|
|
68
|
+
return this.app = S(i, { variableName: this.variableName }), this.app.mount(t), t;
|
|
67
69
|
}
|
|
68
70
|
destroy() {
|
|
69
71
|
this.app && this.app.unmount();
|
|
70
72
|
}
|
|
71
73
|
eq(t) {
|
|
72
|
-
return t instanceof
|
|
74
|
+
return t instanceof d && t.variableName === this.variableName;
|
|
73
75
|
}
|
|
74
|
-
ignoreEvent(
|
|
76
|
+
ignoreEvent() {
|
|
75
77
|
return !1;
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
const
|
|
80
|
+
const $ = (n) => x.fromClass(
|
|
79
81
|
class {
|
|
80
82
|
constructor(e) {
|
|
81
|
-
|
|
83
|
+
r(this, "decorations");
|
|
82
84
|
this.decorations = this.buildDecorations(e);
|
|
83
85
|
}
|
|
84
86
|
update(e) {
|
|
85
87
|
(e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
|
|
86
88
|
}
|
|
87
89
|
buildDecorations(e) {
|
|
88
|
-
const
|
|
89
|
-
for (const { from:
|
|
90
|
-
const o = e.state.doc.sliceString(
|
|
91
|
-
let
|
|
92
|
-
for (; (
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
widget: new
|
|
90
|
+
const t = new w();
|
|
91
|
+
for (const { from: i, to: s } of e.visibleRanges) {
|
|
92
|
+
const o = e.state.doc.sliceString(i, s), c = /{{(.*?)}}/g;
|
|
93
|
+
let l;
|
|
94
|
+
for (; (l = c.exec(o)) !== null; ) {
|
|
95
|
+
const m = i + l.index, v = m + l[0].length, p = l[1];
|
|
96
|
+
t.add(
|
|
97
|
+
m,
|
|
98
|
+
v,
|
|
99
|
+
y.widget({
|
|
100
|
+
widget: new d(
|
|
101
|
+
p,
|
|
102
|
+
n.environments,
|
|
103
|
+
n.activeParsedEnvironments,
|
|
104
|
+
n.isReadOnly
|
|
105
|
+
),
|
|
99
106
|
side: 1
|
|
100
107
|
})
|
|
101
108
|
);
|
|
102
109
|
}
|
|
103
110
|
}
|
|
104
|
-
return
|
|
111
|
+
return t.finish();
|
|
105
112
|
}
|
|
106
113
|
},
|
|
107
114
|
{
|
|
108
115
|
decorations: (e) => e.decorations
|
|
109
116
|
}
|
|
110
|
-
),
|
|
111
|
-
keydown(
|
|
112
|
-
if (
|
|
113
|
-
const { state: t } =
|
|
114
|
-
if (
|
|
115
|
-
return
|
|
116
|
-
changes: { from:
|
|
117
|
-
selection: { anchor:
|
|
118
|
-
}),
|
|
117
|
+
), A = N.domEventHandlers({
|
|
118
|
+
keydown(n, e) {
|
|
119
|
+
if (n.key === "Backspace") {
|
|
120
|
+
const { state: t } = e, { from: i, to: s } = t.selection.main;
|
|
121
|
+
if (i === s && i > 0 && t.doc.sliceString(i - 2, i) === "}}")
|
|
122
|
+
return e.dispatch({
|
|
123
|
+
changes: { from: i - 2, to: s },
|
|
124
|
+
selection: { anchor: i - 2 }
|
|
125
|
+
}), n.preventDefault(), !0;
|
|
119
126
|
}
|
|
120
127
|
return !1;
|
|
121
128
|
}
|
|
122
129
|
});
|
|
123
130
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
A as backspaceCommand,
|
|
132
|
+
$ as pillPlugin
|
|
126
133
|
};
|
|
@@ -17,7 +17,7 @@ const U = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow
|
|
|
17
17
|
i.onload = async (v) => {
|
|
18
18
|
var p;
|
|
19
19
|
const w = (p = v.target) == null ? void 0 : p.result;
|
|
20
|
-
_(w, h.value.uid
|
|
20
|
+
_(w, h.value.uid), n(), s("close");
|
|
21
21
|
}, i.readAsText(l);
|
|
22
22
|
}
|
|
23
23
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DarkModeIconToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DarkModeToggle/DarkModeIconToggle.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DarkModeIconToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DarkModeToggle/DarkModeIconToggle.vue"],"names":[],"mappings":";AAwGA,wBAKG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as c, openBlock as i, createElementBlock as l, unref as e, createVNode as r, withCtx as s, createTextVNode as p, toDisplayString as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as c, openBlock as i, createElementBlock as l, unref as e, createVNode as r, withCtx as s, createTextVNode as p, toDisplayString as m } from "vue";
|
|
2
|
+
import d from "../ScreenReader.vue.js";
|
|
3
3
|
import { ScalarIcon as u } from "@scalar/components";
|
|
4
4
|
import { useDarkModeState as f } from "../../hooks/useDarkModeState.js";
|
|
5
5
|
const b = /* @__PURE__ */ c({
|
|
@@ -7,7 +7,7 @@ const b = /* @__PURE__ */ c({
|
|
|
7
7
|
setup(g) {
|
|
8
8
|
const { toggleDarkMode: t, isDark: n } = f();
|
|
9
9
|
return (k, o) => (i(), l("button", {
|
|
10
|
-
class: "w-[37px] hover:bg-b-2 flex items-center justify-center rounded-lg p-[7px]",
|
|
10
|
+
class: "min-w-[37px] max-w-[42px] hover:bg-b-2 flex items-center justify-center rounded-lg p-[7px]",
|
|
11
11
|
type: "button",
|
|
12
12
|
onClick: o[0] || (o[0] = //@ts-ignore
|
|
13
13
|
(...a) => e(t) && e(t)(...a))
|
|
@@ -17,9 +17,9 @@ const b = /* @__PURE__ */ c({
|
|
|
17
17
|
icon: "LightDarkModeToggle",
|
|
18
18
|
thickness: "1.5"
|
|
19
19
|
}),
|
|
20
|
-
r(
|
|
20
|
+
r(d, null, {
|
|
21
21
|
default: s(() => [
|
|
22
|
-
p(" Switch to " +
|
|
22
|
+
p(" Switch to " + m(e(n) ? "Light" : "Dark") + " Mode ", 1)
|
|
23
23
|
]),
|
|
24
24
|
_: 1
|
|
25
25
|
})
|
|
@@ -7,7 +7,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
7
7
|
isDisable: boolean;
|
|
8
8
|
isEditable: boolean;
|
|
9
9
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
change: (value: "
|
|
10
|
+
change: (value: "CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "TRACE") => void;
|
|
11
11
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
12
12
|
isSquare?: boolean;
|
|
13
13
|
method: string;
|
|
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
17
17
|
isDisable: boolean;
|
|
18
18
|
isEditable: boolean;
|
|
19
19
|
}>>> & {
|
|
20
|
-
onChange?: ((value: "
|
|
20
|
+
onChange?: ((value: "CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "TRACE") => any) | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
isSquare: boolean;
|
|
23
23
|
isEditable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAkJA,wBAKG"}
|
|
@@ -1,45 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import g from "./SideNavLink.vue.js";
|
|
6
|
-
import N from "./WorkspaceProfileIcon.vue.js";
|
|
7
|
-
/* empty css */
|
|
8
|
-
const y = {
|
|
9
|
-
"aria-label": "Side Navigation",
|
|
10
|
-
class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav",
|
|
11
|
-
role: "navigation"
|
|
12
|
-
}, S = { class: "mt-3.5 flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col gap-2 py-1.5" }, E = { class: "flex items-center" }, L = /* @__PURE__ */ m({
|
|
13
|
-
__name: "SideNav",
|
|
14
|
-
setup(R) {
|
|
15
|
-
const { currentRoute: n } = v();
|
|
16
|
-
return (V, $) => (t(), o("nav", y, [
|
|
17
|
-
r(N),
|
|
18
|
-
a("ul", S, [
|
|
19
|
-
(t(!0), o(_, null, f(c(h), ({ icon: s, name: e }, l) => {
|
|
20
|
-
var i;
|
|
21
|
-
return t(), o("li", { key: l }, [
|
|
22
|
-
r(g, {
|
|
23
|
-
active: (i = c(n).name) == null ? void 0 : i.startsWith(e),
|
|
24
|
-
icon: s,
|
|
25
|
-
name: e
|
|
26
|
-
}, {
|
|
27
|
-
default: p(() => [
|
|
28
|
-
u(d(e), 1)
|
|
29
|
-
]),
|
|
30
|
-
_: 2
|
|
31
|
-
}, 1032, ["active", "icon", "name"])
|
|
32
|
-
]);
|
|
33
|
-
}), 128))
|
|
34
|
-
]),
|
|
35
|
-
a("ul", k, [
|
|
36
|
-
a("li", E, [
|
|
37
|
-
r(x)
|
|
38
|
-
])
|
|
39
|
-
])
|
|
40
|
-
]));
|
|
41
|
-
}
|
|
42
|
-
});
|
|
1
|
+
import o from "./SideNav.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-10f3a9af"]]);
|
|
43
5
|
export {
|
|
44
|
-
|
|
6
|
+
m as default
|
|
45
7
|
};
|
|
@@ -1,4 +1,46 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as _, openBlock as t, createElementBlock as o, createVNode as r, createElementVNode as a, Fragment as f, renderList as p, unref as c, withCtx as u, createTextVNode as d, toDisplayString as x } from "vue";
|
|
2
|
+
import v from "../DarkModeToggle/DarkModeIconToggle.vue.js";
|
|
3
|
+
import { ROUTES as h } from "../../constants.js";
|
|
4
|
+
import { useRouter as g } from "vue-router";
|
|
5
|
+
import N from "./SideNavLink.vue.js";
|
|
6
|
+
import y from "./WorkspaceProfileIcon.vue.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
const S = {
|
|
9
|
+
"aria-label": "Side Navigation",
|
|
10
|
+
class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative",
|
|
11
|
+
role: "navigation"
|
|
12
|
+
}, k = { class: "mt-3.5 flex flex-col gap-1.5" }, E = { class: "mt-auto flex flex-col gap-2 py-1.5" }, R = { class: "flex items-center" }, O = /* @__PURE__ */ _({
|
|
13
|
+
__name: "SideNav",
|
|
14
|
+
setup(V) {
|
|
15
|
+
const { currentRoute: n } = g();
|
|
16
|
+
return ($, w) => (t(), o("nav", S, [
|
|
17
|
+
r(y),
|
|
18
|
+
a("ul", k, [
|
|
19
|
+
(t(!0), o(f, null, p(c(h), ({ icon: s, name: e, prettyName: l }, m) => {
|
|
20
|
+
var i;
|
|
21
|
+
return t(), o("li", { key: m }, [
|
|
22
|
+
r(N, {
|
|
23
|
+
active: (i = c(n).name) == null ? void 0 : i.startsWith(e),
|
|
24
|
+
icon: s,
|
|
25
|
+
name: e,
|
|
26
|
+
prettyName: l
|
|
27
|
+
}, {
|
|
28
|
+
default: u(() => [
|
|
29
|
+
d(x(e), 1)
|
|
30
|
+
]),
|
|
31
|
+
_: 2
|
|
32
|
+
}, 1032, ["active", "icon", "name", "prettyName"])
|
|
33
|
+
]);
|
|
34
|
+
}), 128))
|
|
35
|
+
]),
|
|
36
|
+
a("ul", E, [
|
|
37
|
+
a("li", R, [
|
|
38
|
+
r(v)
|
|
39
|
+
])
|
|
40
|
+
])
|
|
41
|
+
]));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
2
44
|
export {
|
|
3
|
-
|
|
45
|
+
O as default
|
|
4
46
|
};
|
|
@@ -7,10 +7,12 @@ declare function __VLS_template(): {
|
|
|
7
7
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
8
8
|
icon: IconProps["icon"];
|
|
9
9
|
name: (typeof ROUTES)[number]["name"];
|
|
10
|
+
prettyName: (typeof ROUTES)[number]["prettyName"];
|
|
10
11
|
active?: boolean;
|
|
11
12
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
12
13
|
icon: IconProps["icon"];
|
|
13
14
|
name: (typeof ROUTES)[number]["name"];
|
|
15
|
+
prettyName: (typeof ROUTES)[number]["prettyName"];
|
|
14
16
|
active?: boolean;
|
|
15
17
|
}>>>, {}, {}>;
|
|
16
18
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavLink.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SideNavLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavLink.vue"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAK/C,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAA;AAmB1D,iBAAS,cAAc;qBA8EO,GAAG;EAgBhC;AACD,QAAA,MAAM,eAAe;UA/Gb,SAAS,CAAC,MAAM,CAAC;UACjB,CAAC,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC;gBACzB,CAAC,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC,YAAY,CAAC;aACxC,OAAO;;UAHV,SAAS,CAAC,MAAM,CAAC;UACjB,CAAC,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC;gBACzB,CAAC,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC,YAAY,CAAC;aACxC,OAAO;aAkHhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarIcon as
|
|
4
|
-
|
|
1
|
+
import { defineComponent as a, resolveComponent as s, openBlock as i, createBlock as c, unref as t, withCtx as p, createElementVNode as o, normalizeClass as l, createVNode as m, toDisplayString as u, renderSlot as d } from "vue";
|
|
2
|
+
import { useWorkspace as f } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarIcon as v } from "@scalar/components";
|
|
4
|
+
import { useRouter as _ } from "vue-router";
|
|
5
|
+
const k = { class: "no-underline font-medium text-[11px] hidden scalar-app-show capitalize" }, g = { class: "sr-only" }, b = /* @__PURE__ */ a({
|
|
5
6
|
__name: "SideNavLink",
|
|
6
7
|
props: {
|
|
7
8
|
icon: {},
|
|
8
9
|
name: {},
|
|
10
|
+
prettyName: {},
|
|
9
11
|
active: { type: Boolean }
|
|
10
12
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const { activeWorkspace:
|
|
13
|
-
return (e,
|
|
14
|
-
const
|
|
15
|
-
return
|
|
13
|
+
setup(h) {
|
|
14
|
+
const { activeWorkspace: n } = f();
|
|
15
|
+
return _(), (e, x) => {
|
|
16
|
+
const r = s("router-link");
|
|
17
|
+
return i(), c(r, {
|
|
16
18
|
activeClass: "active-link",
|
|
17
|
-
class:
|
|
18
|
-
to: `/workspace/${
|
|
19
|
+
class: "flex flex-col items-center gap-1 group no-underline",
|
|
20
|
+
to: `/workspace/${t(n).uid}/${e.name}/default`
|
|
19
21
|
}, {
|
|
20
|
-
default:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
m(
|
|
22
|
+
default: p(() => [
|
|
23
|
+
o("div", {
|
|
24
|
+
class: l(["min-w-[37px] max-w-[42px] group-hover:bg-b-2 active:text-c-1 flex items-center justify-center rounded-lg p-[7px] scalar-app-nav-padding", {
|
|
25
|
+
"bg-b-2 transition-none group-hover:cursor-auto text-c-1": e.active
|
|
26
|
+
}])
|
|
27
|
+
}, [
|
|
28
|
+
m(t(v), {
|
|
29
|
+
icon: e.icon,
|
|
30
|
+
thickness: "1.5"
|
|
31
|
+
}, null, 8, ["icon"])
|
|
32
|
+
], 2),
|
|
33
|
+
o("div", k, u(e.prettyName), 1),
|
|
34
|
+
o("span", g, [
|
|
35
|
+
d(e.$slots, "default")
|
|
27
36
|
])
|
|
28
37
|
]),
|
|
29
38
|
_: 3
|
|
30
|
-
}, 8, ["
|
|
39
|
+
}, 8, ["to"]);
|
|
31
40
|
};
|
|
32
41
|
}
|
|
33
42
|
});
|
|
34
43
|
export {
|
|
35
|
-
|
|
44
|
+
b as default
|
|
36
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceProfileIcon.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/WorkspaceProfileIcon.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceProfileIcon.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/WorkspaceProfileIcon.vue"],"names":[],"mappings":";iBAsGe;QACX,WAAW,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB;;iBAHY;QACX,WAAW,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB;;AAwEH,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/SubpageHeader.vue"],"names":[],"mappings":"AA+BA,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"SubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/SubpageHeader.vue"],"names":[],"mappings":"AA+BA,iBAAS,cAAc;qBA4EO,GAAG;EAchC;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as r, resolveComponent as l, openBlock as s, createElementBlock as c, createElementVNode as t, createVNode as e, withCtx as a, unref as d, renderSlot as i } from "vue";
|
|
2
2
|
import { ScalarIcon as u } from "@scalar/components";
|
|
3
|
-
const p = { class: "flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full bg-b-2" }, m = { class: "lg:min-h-header items-center w-full p-1 t-app__top-container flex items-center" }, f = /* @__PURE__ */ t("span", null, "Back To Requests", -1), g = /* @__PURE__ */ r({
|
|
3
|
+
const p = { class: "flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full bg-b-2 relative" }, m = { class: "lg:min-h-header items-center w-full p-1 t-app__top-container flex items-center" }, f = /* @__PURE__ */ t("span", null, "Back To Requests", -1), g = /* @__PURE__ */ r({
|
|
4
4
|
__name: "SubpageHeader",
|
|
5
5
|
setup(_) {
|
|
6
6
|
return (o, h) => {
|
|
@@ -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":";AAyXA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-868c07b1"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,46 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { ScalarIcon as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as N, reactive as y, ref as x, watch as S, computed as C, openBlock as r, createElementBlock as u, createElementVNode as i, createVNode as v, unref as d, toDisplayString as w, Fragment as A, renderList as R, createBlock as z, pushScopeId as B, popScopeId as E } from "vue";
|
|
2
|
+
import { ROUTES as T } from "../../constants.js";
|
|
3
|
+
import { ScalarIcon as h } from "@scalar/components";
|
|
4
|
+
import { capitalize as V } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import j from "./TopNavItem.vue.js";
|
|
6
|
+
import { useWorkspace as q } from "../../store/workspace.js";
|
|
7
|
+
const L = (l) => (B("data-v-868c07b1"), l = l(), E(), l), $ = { class: "flex h-10 t-app__top-nav" }, D = /* @__PURE__ */ L(() => /* @__PURE__ */ i("div", { class: "t-app__top-nav-draggable" }, null, -1)), F = { class: "flex h-10 flex-1 items-center justify-center gap-1.5 text-sm font-medium relative" }, M = {
|
|
6
8
|
key: 0,
|
|
7
9
|
class: "flex items-center gap-1 w-full justify-center"
|
|
8
|
-
},
|
|
10
|
+
}, K = /* @__PURE__ */ N({
|
|
9
11
|
__name: "TopNav",
|
|
10
|
-
setup(
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
setup(l) {
|
|
13
|
+
const { activeRequest: f, router: n } = q(), t = y([{ label: "", path: "", icon: "Add" }]), a = x(0);
|
|
14
|
+
function p() {
|
|
15
|
+
var s;
|
|
16
|
+
const e = T.find((c) => n.currentRoute.value.name == c.name);
|
|
17
|
+
e && ((e == null ? void 0 : e.name) === "request" ? t[a.value] = {
|
|
18
|
+
label: ((s = f.value) == null ? void 0 : s.summary) || "",
|
|
19
|
+
path: n.currentRoute.value.path,
|
|
20
|
+
icon: e.icon
|
|
21
|
+
} : t[a.value] = {
|
|
22
|
+
label: V(e == null ? void 0 : e.name) || "",
|
|
23
|
+
path: n.currentRoute.value.path,
|
|
24
|
+
icon: e.icon
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function m() {
|
|
28
|
+
n.push(t[a.value].path);
|
|
29
|
+
}
|
|
30
|
+
function _() {
|
|
31
|
+
t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, p();
|
|
32
|
+
}
|
|
33
|
+
function b(e) {
|
|
34
|
+
a.value = e, m();
|
|
35
|
+
}
|
|
36
|
+
S(
|
|
37
|
+
() => n.currentRoute.value.path,
|
|
38
|
+
() => {
|
|
39
|
+
p();
|
|
40
|
+
},
|
|
41
|
+
{ immediate: !0 }
|
|
42
|
+
);
|
|
43
|
+
function k(e) {
|
|
44
|
+
t.splice(e, 1), a.value = Math.min(
|
|
45
|
+
a.value,
|
|
46
|
+
t.length - 1
|
|
47
|
+
), m();
|
|
48
|
+
}
|
|
49
|
+
const g = C(() => a.value);
|
|
50
|
+
return (e, s) => (r(), u("nav", $, [
|
|
51
|
+
D,
|
|
52
|
+
i("div", F, [
|
|
53
|
+
t.length === 1 ? (r(), u("div", M, [
|
|
54
|
+
v(d(h), {
|
|
55
|
+
icon: t[0].icon,
|
|
24
56
|
size: "xs",
|
|
25
57
|
thickness: "2.5"
|
|
26
58
|
}, null, 8, ["icon"]),
|
|
27
|
-
|
|
28
|
-
])) : (
|
|
29
|
-
key:
|
|
30
|
-
active:
|
|
31
|
-
hotkey: (
|
|
32
|
-
icon:
|
|
33
|
-
label:
|
|
34
|
-
onClick: (
|
|
35
|
-
onClose: (
|
|
59
|
+
i("div", null, w(t[0].label), 1)
|
|
60
|
+
])) : (r(!0), u(A, { key: 1 }, R(t, (c, o) => (r(), z(j, {
|
|
61
|
+
key: o,
|
|
62
|
+
active: o === g.value,
|
|
63
|
+
hotkey: (o + 1).toString(),
|
|
64
|
+
icon: c.icon,
|
|
65
|
+
label: c.label,
|
|
66
|
+
onClick: (I) => b(o),
|
|
67
|
+
onClose: (I) => k(o)
|
|
36
68
|
}, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose"]))), 128)),
|
|
37
|
-
|
|
69
|
+
i("button", {
|
|
38
70
|
class: "text-c-3 hover:bg-b-2 p-1.5 rounded-lg webkit-app-no-drag",
|
|
39
71
|
type: "button",
|
|
40
|
-
onClick:
|
|
41
|
-
(...a) => e(i) && e(i)(...a))
|
|
72
|
+
onClick: _
|
|
42
73
|
}, [
|
|
43
|
-
|
|
74
|
+
v(d(h), {
|
|
44
75
|
icon: "Add",
|
|
45
76
|
size: "xs",
|
|
46
77
|
thickness: "2.5"
|
|
@@ -51,5 +82,5 @@ const w = (o) => (x("data-v-31a24876"), o = o(), y(), o), B = { class: "flex h-1
|
|
|
51
82
|
}
|
|
52
83
|
});
|
|
53
84
|
export {
|
|
54
|
-
|
|
85
|
+
K as default
|
|
55
86
|
};
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export declare const ROUTES: readonly [{
|
|
2
|
+
readonly prettyName: "Request";
|
|
2
3
|
readonly name: "request";
|
|
3
4
|
readonly icon: "ExternalLink";
|
|
4
5
|
}, {
|
|
6
|
+
readonly prettyName: "Cookies";
|
|
5
7
|
readonly name: "cookies";
|
|
6
8
|
readonly icon: "Cookie";
|
|
7
9
|
}, {
|
|
10
|
+
readonly prettyName: "Env Vars";
|
|
8
11
|
readonly name: "environment";
|
|
9
12
|
readonly icon: "Brackets";
|
|
10
13
|
}, {
|
|
14
|
+
readonly prettyName: "Servers";
|
|
11
15
|
readonly name: "servers";
|
|
12
16
|
readonly icon: "Server";
|
|
13
17
|
}];
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;EAMT,CAAA"}
|