@scalar/api-client 2.5.22 → 2.5.25
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 +80 -0
- package/README.md +2 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -3
- 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 +86 -106
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +55 -87
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EmptyState.vue2.js +12 -12
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +11 -12
- package/dist/components/TopNav/TopNav.vue.js +50 -51
- 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 +19 -20
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts +50 -50
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +100 -100
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +50 -50
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +50 -50
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.test.d.ts +5 -5
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +5 -5
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +50 -50
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/store.d.ts +50 -50
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.js +2 -2
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +14 -15
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +71 -65
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +80 -59
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +52 -52
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +5 -7
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +26 -13
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -37
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +9 -9
- package/package.json +16 -17
- package/dist/components/ScalarHotkey.test.d.ts +0 -2
- package/dist/components/ScalarHotkey.test.d.ts.map +0 -1
- package/dist/components/ScalarHotkey.vue.d.ts +0 -8
- package/dist/components/ScalarHotkey.vue.d.ts.map +0 -1
- package/dist/components/ScalarHotkey.vue.js +0 -44
- package/dist/components/ScalarHotkey.vue2.js +0 -4
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var r = (
|
|
4
|
-
import { getEnvColor as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var f = (o, t, e) => t in o ? u(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var r = (o, t, e) => f(o, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { getEnvColor as b } from "../../libs/env-helpers.js";
|
|
5
|
+
import { ScalarTooltip as v } from "@scalar/components";
|
|
6
|
+
import { ScalarIconGlobe as g } from "@scalar/icons";
|
|
7
|
+
import { REGEX as w } from "@scalar/oas-utils/helpers";
|
|
8
|
+
import { ViewPlugin as y, EditorView as N, RangeSetBuilder as E, Decoration as C, WidgetType as V } from "@scalar/use-codemirror";
|
|
9
|
+
import { defineComponent as k, h as m, createApp as x } from "vue";
|
|
10
|
+
import { nanoid as D } from "nanoid";
|
|
11
|
+
import { parseEnvVariables as R } from "../../libs/environment-parser.js";
|
|
12
|
+
class p extends V {
|
|
13
|
+
constructor(e, i, n, s, a) {
|
|
13
14
|
super();
|
|
14
15
|
r(this, "app");
|
|
15
16
|
r(this, "uid");
|
|
@@ -17,81 +18,48 @@ class u extends C {
|
|
|
17
18
|
r(this, "envVariables");
|
|
18
19
|
r(this, "workspace");
|
|
19
20
|
r(this, "isReadOnly");
|
|
20
|
-
this.variableName = e, this.variableName = e, this.environment =
|
|
21
|
+
this.variableName = e, this.variableName = e, this.environment = i, this.envVariables = n, this.workspace = s, this.isReadOnly = a ?? !1, this.uid = D();
|
|
21
22
|
}
|
|
22
23
|
toDOM() {
|
|
23
24
|
const e = document.createElement("span");
|
|
24
25
|
e.className = "cm-pill", e.textContent = `${this.variableName}`;
|
|
25
|
-
const
|
|
26
|
+
const i = k({
|
|
26
27
|
props: { variableName: { type: String, default: null } },
|
|
27
28
|
render: () => {
|
|
28
|
-
var
|
|
29
|
-
const
|
|
30
|
-
e.style.setProperty("--tw-bg-base", a), e.style.opacity =
|
|
31
|
-
const
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
]), p = i != null && i.value ? s("div", { class: "p-2" }, i.value) : s("div", { class: "divide-y divide-1/2 grid" }, [
|
|
35
|
-
s("span", { class: "p-2 opacity-25" }, "No value"),
|
|
36
|
-
!this.isReadOnly && s("div", { class: "p-1" }, [
|
|
37
|
-
s(
|
|
38
|
-
g,
|
|
39
|
-
{
|
|
40
|
-
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",
|
|
41
|
-
variant: "ghost",
|
|
42
|
-
onClick: () => {
|
|
43
|
-
var m;
|
|
44
|
-
window.location.href = `/workspace/${(m = this.workspace) == null ? void 0 : m.uid}/environment`;
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
default: () => [
|
|
49
|
-
s(h, {
|
|
50
|
-
class: "w-2",
|
|
51
|
-
icon: "Add",
|
|
52
|
-
size: "xs"
|
|
53
|
-
}),
|
|
54
|
-
"Add variable"
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
])
|
|
29
|
+
var c;
|
|
30
|
+
const n = this.envVariables ? R(this.envVariables).find((h) => h.key === this.variableName) : void 0, s = (n == null ? void 0 : n.source) === "global", a = s ? "var(--scalar-color-1)" : n && this.environment && this.environment.name !== "No Environment" ? b(this.environment) : "var(--scalar-color-1)";
|
|
31
|
+
e.style.setProperty("--tw-bg-base", a), e.style.opacity = n != null && n.value ? "1" : "0.5";
|
|
32
|
+
const l = (n == null ? void 0 : n.value) || "No value", d = m("div", { class: "flex items-center gap-1 whitespace-nowrap" }, [
|
|
33
|
+
(s || ((c = this.environment) == null ? void 0 : c.name) === "No Environment" && (n == null ? void 0 : n.value)) && m(g, { class: "size-3 -ml-1", icon: "Globe" }),
|
|
34
|
+
m("span", this.variableName)
|
|
59
35
|
]);
|
|
60
|
-
return
|
|
61
|
-
|
|
36
|
+
return m(
|
|
37
|
+
v,
|
|
62
38
|
{
|
|
63
|
-
|
|
64
|
-
class: "w-full",
|
|
39
|
+
content: l,
|
|
65
40
|
delay: 0,
|
|
66
|
-
|
|
67
|
-
|
|
41
|
+
placement: "bottom",
|
|
42
|
+
offset: 6
|
|
68
43
|
},
|
|
69
44
|
{
|
|
70
|
-
|
|
71
|
-
content: () => s(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
class: ["border w-content rounded bg-b-1 brightness-lifted text-xxs leading-5 text-c-1"]
|
|
75
|
-
},
|
|
76
|
-
p
|
|
77
|
-
)
|
|
45
|
+
default: () => d
|
|
78
46
|
}
|
|
79
47
|
);
|
|
80
48
|
}
|
|
81
49
|
});
|
|
82
|
-
return this.app =
|
|
50
|
+
return this.app = x(i, { variableName: this.variableName }), this.app.mount(e), e;
|
|
83
51
|
}
|
|
84
52
|
destroy() {
|
|
85
53
|
this.app && this.app.unmount();
|
|
86
54
|
}
|
|
87
55
|
eq(e) {
|
|
88
|
-
return e instanceof
|
|
56
|
+
return e instanceof p && e.variableName === this.variableName && e.uid === this.uid;
|
|
89
57
|
}
|
|
90
58
|
ignoreEvent() {
|
|
91
59
|
return !1;
|
|
92
60
|
}
|
|
93
61
|
}
|
|
94
|
-
const z = (
|
|
62
|
+
const z = (o) => y.fromClass(
|
|
95
63
|
class {
|
|
96
64
|
constructor(t) {
|
|
97
65
|
r(this, "decorations");
|
|
@@ -103,22 +71,22 @@ const z = (n) => x.fromClass(
|
|
|
103
71
|
});
|
|
104
72
|
}
|
|
105
73
|
buildDecorations(t) {
|
|
106
|
-
const e = new
|
|
107
|
-
for (const { from:
|
|
108
|
-
const
|
|
74
|
+
const e = new E();
|
|
75
|
+
for (const { from: i, to: n } of t.visibleRanges) {
|
|
76
|
+
const s = t.state.doc.sliceString(i, n);
|
|
109
77
|
let a;
|
|
110
|
-
for (; (a =
|
|
111
|
-
const
|
|
78
|
+
for (; (a = w.VARIABLES.exec(s)) !== null; ) {
|
|
79
|
+
const l = i + a.index, d = l + a[0].length, c = a[1] ?? "";
|
|
112
80
|
e.add(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
widget: new
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
81
|
+
l,
|
|
82
|
+
d,
|
|
83
|
+
C.widget({
|
|
84
|
+
widget: new p(
|
|
85
|
+
c,
|
|
86
|
+
o.environment,
|
|
87
|
+
o.envVariables,
|
|
88
|
+
o.workspace,
|
|
89
|
+
o.isReadOnly
|
|
122
90
|
),
|
|
123
91
|
side: 1
|
|
124
92
|
})
|
|
@@ -131,25 +99,25 @@ const z = (n) => x.fromClass(
|
|
|
131
99
|
{
|
|
132
100
|
decorations: (t) => t.decorations
|
|
133
101
|
}
|
|
134
|
-
),
|
|
135
|
-
keydown(
|
|
136
|
-
if (
|
|
137
|
-
const { state: e } = t, { from:
|
|
138
|
-
if (
|
|
102
|
+
), F = N.domEventHandlers({
|
|
103
|
+
keydown(o, t) {
|
|
104
|
+
if (o.key === "Backspace") {
|
|
105
|
+
const { state: e } = t, { from: i, to: n } = e.selection.main;
|
|
106
|
+
if (i === 0 && n === e.doc.length)
|
|
139
107
|
return t.dispatch({
|
|
140
108
|
changes: { from: 0, to: e.doc.length },
|
|
141
109
|
selection: { anchor: 0 }
|
|
142
|
-
}),
|
|
143
|
-
if (
|
|
110
|
+
}), o.preventDefault(), !0;
|
|
111
|
+
if (i === n && i > 0 && e.doc.sliceString(i - 2, i) === "}}")
|
|
144
112
|
return t.dispatch({
|
|
145
|
-
changes: { from:
|
|
146
|
-
selection: { anchor:
|
|
147
|
-
}),
|
|
113
|
+
changes: { from: i - 2, to: n },
|
|
114
|
+
selection: { anchor: i - 2 }
|
|
115
|
+
}), o.preventDefault(), !0;
|
|
148
116
|
}
|
|
149
117
|
return !1;
|
|
150
118
|
}
|
|
151
119
|
});
|
|
152
120
|
export {
|
|
153
|
-
|
|
121
|
+
F as backspaceCommand,
|
|
154
122
|
z as pillPlugin
|
|
155
123
|
};
|
|
@@ -55,7 +55,6 @@ declare function __VLS_template(): {
|
|
|
55
55
|
readonly nullable?: boolean | undefined;
|
|
56
56
|
readonly withVariables?: boolean | undefined;
|
|
57
57
|
readonly importCurl?: boolean | undefined;
|
|
58
|
-
readonly isCopyable?: boolean | undefined;
|
|
59
58
|
readonly default?: (string | number) | undefined;
|
|
60
59
|
readonly environment: Environment;
|
|
61
60
|
readonly envVariables: EnvVariable[];
|
|
@@ -103,7 +102,6 @@ declare function __VLS_template(): {
|
|
|
103
102
|
nullable?: boolean;
|
|
104
103
|
withVariables?: boolean;
|
|
105
104
|
importCurl?: boolean;
|
|
106
|
-
isCopyable?: boolean;
|
|
107
105
|
default?: string | number;
|
|
108
106
|
environment: Environment;
|
|
109
107
|
envVariables: EnvVariable[];
|
|
@@ -137,7 +135,6 @@ declare function __VLS_template(): {
|
|
|
137
135
|
disableEnter: boolean;
|
|
138
136
|
disableCloseBrackets: boolean;
|
|
139
137
|
withVariables: boolean;
|
|
140
|
-
isCopyable: boolean;
|
|
141
138
|
lineWrapping: boolean;
|
|
142
139
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
143
140
|
beforeCreate?: (() => void) | (() => void)[];
|
|
@@ -169,7 +166,6 @@ declare function __VLS_template(): {
|
|
|
169
166
|
disableEnter: boolean;
|
|
170
167
|
disableCloseBrackets: boolean;
|
|
171
168
|
withVariables: boolean;
|
|
172
|
-
isCopyable: boolean;
|
|
173
169
|
lineWrapping: boolean;
|
|
174
170
|
}> & Omit<Readonly<{
|
|
175
171
|
colorPicker?: boolean;
|
|
@@ -194,7 +190,6 @@ declare function __VLS_template(): {
|
|
|
194
190
|
nullable?: boolean;
|
|
195
191
|
withVariables?: boolean;
|
|
196
192
|
importCurl?: boolean;
|
|
197
|
-
isCopyable?: boolean;
|
|
198
193
|
default?: string | number;
|
|
199
194
|
environment: Environment;
|
|
200
195
|
envVariables: EnvVariable[];
|
|
@@ -205,7 +200,7 @@ declare function __VLS_template(): {
|
|
|
205
200
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
206
201
|
onBlur?: ((v: string) => any) | undefined;
|
|
207
202
|
onCurl?: ((v: string) => any) | undefined;
|
|
208
|
-
}>, "modelValue" | "handleBlur" | "focus" | "codeMirror" | "handleChange" | "handleSubmit" | "booleanOptions" | ("nullable" | "disabled" | "colorPicker" | "emitOnBlur" | "extensions" | "disableTabIndent" | "disableEnter" | "disableCloseBrackets" | "withVariables" | "
|
|
203
|
+
}>, "modelValue" | "handleBlur" | "focus" | "codeMirror" | "handleChange" | "handleSubmit" | "booleanOptions" | ("nullable" | "disabled" | "colorPicker" | "emitOnBlur" | "extensions" | "disableTabIndent" | "disableEnter" | "disableCloseBrackets" | "withVariables" | "lineWrapping")> & import("vue").ShallowUnwrapRef<{
|
|
209
204
|
focus: () => void;
|
|
210
205
|
handleChange: (value: string) => void | null;
|
|
211
206
|
handleSubmit: (value: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"AAsMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAO/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAsDJ,iBAAS,cAAc;WA6OT,OAAO,IAA6B;;yBAXrB,GAAG;yBACF,GAAG;sBACN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmEyrI,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EArD50I;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cA1UN,OAAO;cAIP,OAAO;kBAQH,OAAO;2BATE,OAAO;6EA+UjC,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,7 +1,7 @@
|
|
|
1
1
|
import t from "./DataTableInput.vue2.js";
|
|
2
2
|
import "./DataTableInput.vue3.js";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6764f087"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.vue.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EmptyState.vue.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.vue"],"names":[],"mappings":";AAmJA,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./EmptyState.vue2.js";
|
|
2
2
|
import "./EmptyState.vue3.js";
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-45a9fc44"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as s, createElementBlock as c, openBlock as n, createElementVNode as e, createVNode as t, unref as r } from "vue";
|
|
2
|
+
import { ScalarHotkey as i } from "@scalar/components";
|
|
2
3
|
import l from "../assets/keycap.ascii.js";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const p = { class: "flex-center flex w-full scale-75" }, m = { class: "relative" }, d = { class: "relative -ml-12" }, h = /* @__PURE__ */ o({
|
|
4
|
+
import o from "./ScalarAsciiArt.vue.js";
|
|
5
|
+
const p = { class: "flex-center flex w-full scale-75" }, m = { class: "relative" }, d = { class: "relative -ml-12" }, h = /* @__PURE__ */ s({
|
|
6
6
|
__name: "EmptyState",
|
|
7
7
|
setup(_) {
|
|
8
|
-
return (f,
|
|
8
|
+
return (f, a) => (n(), c("div", p, [
|
|
9
9
|
e("div", m, [
|
|
10
|
-
t(i, {
|
|
11
|
-
class: "keycap-hotkey right-14 border-transparent text-xl",
|
|
10
|
+
t(r(i), {
|
|
11
|
+
class: "keycap-hotkey right-14 border-transparent py-0 text-xl",
|
|
12
12
|
hotkey: ""
|
|
13
13
|
}),
|
|
14
|
-
t(
|
|
15
|
-
art:
|
|
14
|
+
t(o, {
|
|
15
|
+
art: r(l),
|
|
16
16
|
class: "text-c-3 !leading-[6px]"
|
|
17
17
|
}, null, 8, ["art"])
|
|
18
18
|
]),
|
|
19
19
|
e("div", d, [
|
|
20
|
-
|
|
21
|
-
t(
|
|
22
|
-
art:
|
|
20
|
+
a[0] || (a[0] = e("div", { class: "keycap-hotkey right-16 text-xl" }, "K", -1)),
|
|
21
|
+
t(o, {
|
|
22
|
+
art: r(l),
|
|
23
23
|
class: "keycap-n !leading-[6px]"
|
|
24
24
|
}, null, 8, ["art"])
|
|
25
25
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesTextbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"names":[],"mappings":"AAiCA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAC;;;;;;
|
|
1
|
+
{"version":3,"file":"ServerVariablesTextbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"names":[],"mappings":"AAiCA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAC;;;;;;AAyEF,wBAQG"}
|
|
@@ -15,7 +15,7 @@ const g = /* @__PURE__ */ p({
|
|
|
15
15
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s)
|
|
16
16
|
}, e.controls ? { ...e.$attrs, "aria-controls": e.controls } : {}, {
|
|
17
17
|
autocomplete: "off",
|
|
18
|
-
class: "text-c-1 w-full border-transparent px-1.5 -outline-offset-1 group-last/label:rounded-br-lg",
|
|
18
|
+
class: "text-c-1 w-full border-transparent px-1.5 py-1.25 -outline-offset-1 group-last/label:rounded-br-lg",
|
|
19
19
|
placeholder: "value",
|
|
20
20
|
spellcheck: "false",
|
|
21
21
|
type: "text"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarButton.vue"],"names":[],"mappings":"AAqCA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC;AAcF,iBAAS,cAAc;WAmFT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const g = /* @__PURE__ */ i({
|
|
1
|
+
import { defineComponent as u, createBlock as e, openBlock as r, unref as o, withCtx as i, renderSlot as p, createCommentVNode as s } from "vue";
|
|
2
|
+
import { ScalarButton as d, ScalarHotkey as k } from "@scalar/components";
|
|
3
|
+
import { useLayout as m } from "../../hooks/useLayout.js";
|
|
4
|
+
const g = /* @__PURE__ */ u({
|
|
6
5
|
__name: "SidebarButton",
|
|
7
6
|
props: {
|
|
8
7
|
click: { type: Function },
|
|
9
8
|
hotkey: {}
|
|
10
9
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
10
|
+
setup(a) {
|
|
11
|
+
const l = a, { layout: n } = m(), c = () => {
|
|
12
|
+
l.click();
|
|
14
13
|
};
|
|
15
|
-
return (t, h) => (
|
|
14
|
+
return (t, h) => (r(), e(o(d), {
|
|
16
15
|
class: "bg-b-1 text-c-1 hover:bg-b-2 group relative h-auto w-auto border px-2 py-1 md:w-full md:p-1.5",
|
|
17
16
|
icon: "Plus",
|
|
18
17
|
variant: "outlined",
|
|
19
|
-
onClick:
|
|
18
|
+
onClick: c
|
|
20
19
|
}, {
|
|
21
|
-
default:
|
|
20
|
+
default: i(() => [
|
|
22
21
|
p(t.$slots, "title"),
|
|
23
|
-
t.hotkey &&
|
|
22
|
+
t.hotkey && o(n) === "desktop" ? (r(), e(o(k), {
|
|
24
23
|
key: 0,
|
|
25
24
|
class: "text-c-2 add-item-hotkey absolute right-2 hidden group-hover:opacity-80 md:block",
|
|
26
25
|
hotkey: t.hotkey
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent as O, reactive as W, ref as D, computed as L, watch as I, onMounted as K, onBeforeUnmount as q, createElementBlock as g, openBlock as p, createElementVNode as h, createVNode as r, unref as
|
|
2
|
-
import { ScalarContextMenu as P, ScalarFloating as Q, ScalarDropdownMenu as X, ScalarDropdownButton as A, ScalarIcon as b } from "@scalar/components";
|
|
3
|
-
import { LibraryIcon as
|
|
4
|
-
import { useClipboard as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import te from "../ScalarHotkey.vue.js";
|
|
1
|
+
import { defineComponent as O, reactive as W, ref as D, computed as L, watch as I, onMounted as K, onBeforeUnmount as q, createElementBlock as g, openBlock as p, createElementVNode as h, createVNode as r, unref as n, withCtx as f, createTextVNode as U, createBlock as k, createCommentVNode as F, toDisplayString as H, Fragment as G, renderList as J } from "vue";
|
|
2
|
+
import { ScalarContextMenu as P, ScalarFloating as Q, ScalarDropdownMenu as X, ScalarDropdownButton as A, ScalarIcon as b, ScalarHotkey as Y } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as Z } from "@scalar/icons/library";
|
|
4
|
+
import { useClipboard as ee } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
import { useRouter as te } from "vue-router";
|
|
7
6
|
import { ROUTES as oe } from "../../constants.js";
|
|
8
7
|
import { useActiveEntities as le } from "../../store/active-entities.js";
|
|
9
8
|
import ae from "./TopNavItem.vue.js";
|
|
@@ -11,13 +10,13 @@ import { useWorkspace as ne } from "../../store/store.js";
|
|
|
11
10
|
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-base font-medium" }, re = {
|
|
12
11
|
key: 0,
|
|
13
12
|
class: "h-full w-full overflow-hidden"
|
|
14
|
-
},
|
|
13
|
+
}, Ce = /* @__PURE__ */ O({
|
|
15
14
|
__name: "TopNav",
|
|
16
15
|
props: {
|
|
17
16
|
openNewTab: {}
|
|
18
17
|
},
|
|
19
18
|
setup(E) {
|
|
20
|
-
const M = E, { activeRequest:
|
|
19
|
+
const M = E, { activeRequest: z, activeCollection: v } = le(), c = te(), { events: T } = ne(), { copyToClipboard: B } = ee(), t = W([
|
|
21
20
|
{
|
|
22
21
|
label: "",
|
|
23
22
|
path: "",
|
|
@@ -29,19 +28,19 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
29
28
|
return (e = c.currentRoute.value.name) == null ? void 0 : e.toString().startsWith("collection.");
|
|
30
29
|
});
|
|
31
30
|
function x() {
|
|
32
|
-
var o, l,
|
|
31
|
+
var o, l, i, u, s;
|
|
33
32
|
if (N.value) {
|
|
34
33
|
t[a.value] = {
|
|
35
34
|
label: ((l = (o = v.value) == null ? void 0 : o.info) == null ? void 0 : l.title) || "Untitled Collection",
|
|
36
35
|
path: c.currentRoute.value.path,
|
|
37
|
-
icon: ((
|
|
36
|
+
icon: ((i = v.value) == null ? void 0 : i["x-scalar-icon"]) || "Collection",
|
|
38
37
|
isCollection: !0
|
|
39
38
|
};
|
|
40
39
|
return;
|
|
41
40
|
}
|
|
42
41
|
if ((u = c.currentRoute.value.name) != null && u.toString().startsWith("request")) {
|
|
43
42
|
t[a.value] = {
|
|
44
|
-
label: ((s =
|
|
43
|
+
label: ((s = z.value) == null ? void 0 : s.summary) || "",
|
|
45
44
|
path: c.currentRoute.value.path,
|
|
46
45
|
icon: "ExternalLink",
|
|
47
46
|
isCollection: !1
|
|
@@ -77,7 +76,7 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
77
76
|
isCollection: !1
|
|
78
77
|
}), a.value = t.length - 1, x();
|
|
79
78
|
}
|
|
80
|
-
function
|
|
79
|
+
function m(e) {
|
|
81
80
|
a.value = e, C();
|
|
82
81
|
}
|
|
83
82
|
I(
|
|
@@ -93,23 +92,23 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
93
92
|
t.length - 1
|
|
94
93
|
), C();
|
|
95
94
|
}
|
|
96
|
-
const
|
|
95
|
+
const R = (e) => {
|
|
97
96
|
var l;
|
|
98
97
|
if (!((l = t[e]) != null && l.path))
|
|
99
98
|
return;
|
|
100
99
|
const o = new URL(window.location.href);
|
|
101
|
-
o.pathname = t[e].path,
|
|
102
|
-
},
|
|
100
|
+
o.pathname = t[e].path, B(o.toString());
|
|
101
|
+
}, V = (e) => {
|
|
103
102
|
t.splice(0, e), t.splice(1), a.value = 0, C();
|
|
104
|
-
},
|
|
103
|
+
}, _ = (e) => {
|
|
105
104
|
if (e) {
|
|
106
|
-
if (e.addTopNav && d(), e.closeTopNav && w(a.value), e.navigateTopNavLeft &&
|
|
105
|
+
if (e.addTopNav && d(), e.closeTopNav && w(a.value), e.navigateTopNavLeft && m(Math.max(a.value - 1, 0)), e.navigateTopNavRight && m(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
|
|
107
106
|
const o = Number(e.jumpToTab.key) - 1;
|
|
108
|
-
o >= 0 && o < t.length &&
|
|
107
|
+
o >= 0 && o < t.length && m(o);
|
|
109
108
|
}
|
|
110
|
-
e.jumpToLastTab &&
|
|
109
|
+
e.jumpToLastTab && m(t.length - 1);
|
|
111
110
|
}
|
|
112
|
-
},
|
|
111
|
+
}, $ = (e) => {
|
|
113
112
|
t.push({
|
|
114
113
|
label: e.name,
|
|
115
114
|
path: e.uid,
|
|
@@ -120,22 +119,22 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
120
119
|
return I(
|
|
121
120
|
() => M.openNewTab,
|
|
122
121
|
(e) => {
|
|
123
|
-
e &&
|
|
122
|
+
e && $(e);
|
|
124
123
|
},
|
|
125
124
|
{ immediate: !0 }
|
|
126
|
-
), K(() => T.hotKeys.on(
|
|
125
|
+
), K(() => T.hotKeys.on(_)), q(() => T.hotKeys.off(_)), (e, o) => (p(), g("nav", ie, [
|
|
127
126
|
o[3] || (o[3] = h("div", { class: "app-drag-region absolute inset-0" }, null, -1)),
|
|
128
127
|
h("div", se, [
|
|
129
128
|
t.length === 1 ? (p(), g("div", re, [
|
|
130
|
-
r(
|
|
131
|
-
trigger:
|
|
132
|
-
var l,
|
|
129
|
+
r(n(P), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
|
|
130
|
+
trigger: f(() => {
|
|
131
|
+
var l, i, u, s;
|
|
133
132
|
return [
|
|
134
|
-
N.value ? (p(), k(
|
|
133
|
+
N.value ? (p(), k(n(Z), {
|
|
135
134
|
key: 0,
|
|
136
135
|
class: "size-3.5 min-w-3.5 stroke-2",
|
|
137
|
-
src: ((l =
|
|
138
|
-
}, null, 8, ["src"])) : (
|
|
136
|
+
src: ((l = n(v)) == null ? void 0 : l["x-scalar-icon"]) || "Collection"
|
|
137
|
+
}, null, 8, ["src"])) : (i = t[0]) != null && i.icon ? (p(), k(n(b), {
|
|
139
138
|
key: 1,
|
|
140
139
|
icon: (u = t[0]) == null ? void 0 : u.icon,
|
|
141
140
|
size: "xs",
|
|
@@ -144,23 +143,23 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
144
143
|
h("span", null, H((s = t[0]) == null ? void 0 : s.label), 1)
|
|
145
144
|
];
|
|
146
145
|
}),
|
|
147
|
-
content:
|
|
148
|
-
r(
|
|
149
|
-
floating:
|
|
150
|
-
r(
|
|
151
|
-
default:
|
|
152
|
-
r(
|
|
146
|
+
content: f(() => [
|
|
147
|
+
r(n(Q), { placement: "right-start" }, {
|
|
148
|
+
floating: f(() => [
|
|
149
|
+
r(n(X), { class: "scalar-app scalar-client" }, {
|
|
150
|
+
default: f(() => [
|
|
151
|
+
r(n(A), {
|
|
153
152
|
class: "flex items-center gap-1.5",
|
|
154
153
|
onClick: d
|
|
155
154
|
}, {
|
|
156
|
-
default:
|
|
157
|
-
r(
|
|
155
|
+
default: f(() => [
|
|
156
|
+
r(n(b), {
|
|
158
157
|
icon: "AddTab",
|
|
159
158
|
size: "sm",
|
|
160
159
|
thickness: "1.5"
|
|
161
160
|
}),
|
|
162
161
|
o[1] || (o[1] = U(" New Tab ")),
|
|
163
|
-
r(
|
|
162
|
+
r(n(Y), {
|
|
164
163
|
class: "bg-b-2 ml-auto",
|
|
165
164
|
hotkey: "T"
|
|
166
165
|
})
|
|
@@ -168,12 +167,12 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
168
167
|
_: 1,
|
|
169
168
|
__: [1]
|
|
170
169
|
}),
|
|
171
|
-
r(
|
|
170
|
+
r(n(A), {
|
|
172
171
|
class: "flex items-center gap-1.5",
|
|
173
|
-
onClick: o[0] || (o[0] = (l) =>
|
|
172
|
+
onClick: o[0] || (o[0] = (l) => R(y.value))
|
|
174
173
|
}, {
|
|
175
|
-
default:
|
|
176
|
-
r(
|
|
174
|
+
default: f(() => [
|
|
175
|
+
r(n(b), {
|
|
177
176
|
icon: "Link",
|
|
178
177
|
size: "sm",
|
|
179
178
|
thickness: "1.5"
|
|
@@ -192,19 +191,19 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
192
191
|
]),
|
|
193
192
|
_: 1
|
|
194
193
|
})
|
|
195
|
-
])) : (p(!0), g(G, { key: 1 }, J(t, (l,
|
|
194
|
+
])) : (p(!0), g(G, { key: 1 }, J(t, (l, i) => {
|
|
196
195
|
var u;
|
|
197
196
|
return p(), k(ae, {
|
|
198
197
|
key: l.path,
|
|
199
|
-
active:
|
|
200
|
-
hotkey: (
|
|
201
|
-
icon: l.isCollection ? ((u =
|
|
198
|
+
active: i === y.value,
|
|
199
|
+
hotkey: (i + 1).toString(),
|
|
200
|
+
icon: l.isCollection ? ((u = n(v)) == null ? void 0 : u["x-scalar-icon"]) || "Collection" : l.icon,
|
|
202
201
|
isCollection: l.isCollection || !1,
|
|
203
202
|
label: l.label,
|
|
204
|
-
onClick: (s) =>
|
|
205
|
-
onClose: (s) => w(
|
|
206
|
-
onCloseOtherTabs: (s) =>
|
|
207
|
-
onCopyUrl: (s) =>
|
|
203
|
+
onClick: (s) => m(i),
|
|
204
|
+
onClose: (s) => w(i),
|
|
205
|
+
onCloseOtherTabs: (s) => V(i),
|
|
206
|
+
onCopyUrl: (s) => R(i),
|
|
208
207
|
onNewTab: d
|
|
209
208
|
}, null, 8, ["active", "hotkey", "icon", "isCollection", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]);
|
|
210
209
|
}), 128)),
|
|
@@ -213,7 +212,7 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
213
212
|
type: "button",
|
|
214
213
|
onClick: d
|
|
215
214
|
}, [
|
|
216
|
-
r(
|
|
215
|
+
r(n(b), {
|
|
217
216
|
icon: "Add",
|
|
218
217
|
size: "sm",
|
|
219
218
|
thickness: "2.5"
|
|
@@ -224,5 +223,5 @@ const ie = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, se
|
|
|
224
223
|
}
|
|
225
224
|
});
|
|
226
225
|
export {
|
|
227
|
-
|
|
226
|
+
Ce as default
|
|
228
227
|
};
|
|
@@ -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":"AAmMA,OAAO,EASL,KAAK,IAAI,EACV,MAAM,oBAAoB,CAAA;AAM3B,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;;;;;;;;;;;;;;AAyUF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNavItem.vue2.js";
|
|
2
2
|
import "./TopNavItem.vue3.js";
|
|
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-507381a3"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|