@scalar/api-client 2.1.31 → 2.1.33
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 +21 -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 +3 -3
- 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 +104 -92
- package/dist/components/CodeInput/codeVariableWidget.js +3 -3
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +110 -95
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +5 -5
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +22 -22
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +4 -4
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +37 -42
- package/dist/layouts/App/MainLayout.vue.d.ts +12 -0
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -0
- package/dist/layouts/App/MainLayout.vue.js +18 -0
- package/dist/layouts/App/MainLayout.vue2.js +4 -0
- package/dist/layouts/App/create-api-client-app.d.ts +6 -5
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +12 -10
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +26 -31
- package/dist/layouts/Web/create-api-client-web.d.ts +6 -5
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- 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 +21 -18
- package/dist/store/store.d.ts +28 -13
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +112 -108
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +4 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +61 -48
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -384
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +384 -2
- package/dist/views/Request/RequestSection/RequestSection.vue.js +15 -15
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +90 -65
- package/package.json +6 -6
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { themeLabels as
|
|
4
|
-
import
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as S, openBlock as o, createElementBlock as y, createElementVNode as t, createStaticVNode as j, createVNode as d, unref as e, normalizeClass as u, withCtx as p, createBlock as n, createCommentVNode as c, createTextVNode as b, toDisplayString as v, Fragment as z, renderList as B, normalizeStyle as g } from "vue";
|
|
2
|
+
import { ScalarButton as m, ScalarIcon as k } from "@scalar/components";
|
|
3
|
+
import { themeLabels as N } from "@scalar/themes";
|
|
4
|
+
import P from "./SettingsGeneralMode.vue.js";
|
|
5
|
+
import { useWorkspace as U } from "../../store/store.js";
|
|
6
|
+
const V = { class: "bg-b-1 w-full h-full overflow-auto" }, $ = { class: "flex flex-col px-5 py-5 max-w-[720px] ml-auto mr-auto w-full" }, T = { class: "gap-2 mt-4 mb-8 flex flex-col" }, W = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, E = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, G = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, L = { class: "flex flex-col gap-2" }, O = { class: "grid grid-cols-2 gap-2" }, R = { class: "flex items-center gap-2" }, q = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, D = { class: "flex items-center gap-1" }, X = /* @__PURE__ */ S({
|
|
7
7
|
__name: "SettingsGeneral",
|
|
8
|
-
setup(
|
|
9
|
-
const {
|
|
8
|
+
setup(F) {
|
|
9
|
+
const {
|
|
10
|
+
activeWorkspace: i,
|
|
11
|
+
workspaceMutators: w,
|
|
12
|
+
proxyUrl: l,
|
|
13
|
+
setProxyUrl: x,
|
|
14
|
+
defaultProxyUrl: a
|
|
15
|
+
} = U(), _ = [
|
|
10
16
|
"default",
|
|
11
17
|
"alternate",
|
|
12
18
|
"moon",
|
|
@@ -17,7 +23,7 @@ const P = { class: "bg-b-1 w-full h-full overflow-auto" }, T = { class: "flex fl
|
|
|
17
23
|
"kepler",
|
|
18
24
|
"mars",
|
|
19
25
|
"deepSpace"
|
|
20
|
-
],
|
|
26
|
+
], h = (f) => ({
|
|
21
27
|
default: { light: "#fff", dark: "#0f0f0f", accent: "#0099ff" },
|
|
22
28
|
alternate: { light: "#f9f9f9", dark: "#131313", accent: "#e7e7e7" },
|
|
23
29
|
moon: { light: "#ccc9b3", dark: "#313332", accent: "#645b0f" },
|
|
@@ -29,102 +35,121 @@ const P = { class: "bg-b-1 w-full h-full overflow-auto" }, T = { class: "flex fl
|
|
|
29
35
|
mars: { light: "#f2efe8", dark: "#321116", accent: "#c75549" },
|
|
30
36
|
deepSpace: { light: "#f4f4f5", dark: "#09090b", accent: "#8ab4f8" },
|
|
31
37
|
none: { light: "#ffffff", dark: "#000000", accent: "#3b82f6" }
|
|
32
|
-
})[
|
|
33
|
-
|
|
38
|
+
})[f] || { light: "#ffffff", dark: "#000000", accent: "#3b82f6" }, C = (f) => {
|
|
39
|
+
w.edit(i.value.uid, "themeId", f);
|
|
34
40
|
};
|
|
35
|
-
return (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
r[
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class:
|
|
43
|
-
variant:
|
|
44
|
-
onClick: r[0] || (r[0] = (s) =>
|
|
41
|
+
return (f, r) => (o(), y("div", V, [
|
|
42
|
+
t("div", $, [
|
|
43
|
+
t("div", null, [
|
|
44
|
+
t("div", null, [
|
|
45
|
+
r[5] || (r[5] = j('<h2 class="font-bold text-xl mb-5 mt-10">Settings</h2><h3 class="font-bold mb-1">CORS Proxy</h3><p class="text-c-2 mb-2 leading-[21px]"> Browsers block cross-origin requests for security. We provide a public proxy to <a class="hover:text-c-1 underline-offset-2" href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_blank">bypass CORS issues</a>. Check the <a class="hover:text-c-1 underline-offset-2" href="https://github.com/scalar/scalar/tree/main/examples/proxy-server" target="_blank">source code on GitHub</a>. </p>', 3)),
|
|
46
|
+
t("div", T, [
|
|
47
|
+
d(e(m), {
|
|
48
|
+
class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-2 border-1/2", { "bg-b-1 text-c-1": e(l) }]),
|
|
49
|
+
variant: e(l) ? "primary" : "secondary",
|
|
50
|
+
onClick: r[0] || (r[0] = (s) => e(x)("https://proxy.scalar.com"))
|
|
45
51
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
default: p(() => [
|
|
53
|
+
t("div", W, [
|
|
54
|
+
e(l) === "https://proxy.scalar.com" ? (o(), n(e(k), {
|
|
49
55
|
key: 0,
|
|
50
56
|
icon: "Checkmark",
|
|
51
57
|
size: "xs",
|
|
52
58
|
thickness: "3.5"
|
|
53
|
-
})) :
|
|
59
|
+
})) : c("", !0)
|
|
54
60
|
]),
|
|
55
|
-
r[
|
|
61
|
+
r[3] || (r[3] = b(" Use proxy.scalar.com (default) "))
|
|
56
62
|
]),
|
|
57
63
|
_: 1
|
|
58
64
|
}, 8, ["class", "variant"]),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
e(a) && e(a) !== "https://proxy.scalar.com" ? (o(), n(e(m), {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2",
|
|
68
|
+
variant: "primary",
|
|
69
|
+
onClick: r[1] || (r[1] = (s) => e(x)(e(a)))
|
|
63
70
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
default: p(() => [
|
|
72
|
+
t("div", E, [
|
|
73
|
+
e(l) === e(a) ? (o(), n(e(k), {
|
|
74
|
+
key: 0,
|
|
75
|
+
icon: "Checkmark",
|
|
76
|
+
size: "xs",
|
|
77
|
+
thickness: "3.5"
|
|
78
|
+
})) : c("", !0)
|
|
79
|
+
]),
|
|
80
|
+
b(" Use custom proxy (" + v(e(a)) + ") ", 1)
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
})) : c("", !0),
|
|
84
|
+
d(e(m), {
|
|
85
|
+
class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-2 border-1/2", { "bg-b-1 text-c-1": !e(l) }]),
|
|
86
|
+
variant: e(l) ? "secondary" : "primary",
|
|
87
|
+
onClick: r[2] || (r[2] = (s) => e(x)(""))
|
|
88
|
+
}, {
|
|
89
|
+
default: p(() => [
|
|
90
|
+
t("div", G, [
|
|
91
|
+
e(l) ? c("", !0) : (o(), n(e(k), {
|
|
67
92
|
key: 0,
|
|
68
93
|
icon: "Checkmark",
|
|
69
94
|
size: "xs",
|
|
70
95
|
thickness: "3.5"
|
|
71
96
|
}))
|
|
72
97
|
]),
|
|
73
|
-
r[
|
|
98
|
+
r[4] || (r[4] = b(" Skip the proxy "))
|
|
74
99
|
]),
|
|
75
100
|
_: 1
|
|
76
101
|
}, 8, ["class", "variant"])
|
|
77
102
|
])
|
|
78
103
|
]),
|
|
79
|
-
|
|
80
|
-
r[
|
|
81
|
-
r[
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
(o(),
|
|
104
|
+
t("div", null, [
|
|
105
|
+
r[6] || (r[6] = t("h3", { class: "font-bold mb-1" }, "Theme", -1)),
|
|
106
|
+
r[7] || (r[7] = t("p", { class: "text-c-2 mb-4 leading-[21px]" }, " We’ve got a whole rainbow of themes for you to play with: ", -1)),
|
|
107
|
+
t("div", L, [
|
|
108
|
+
t("div", O, [
|
|
109
|
+
(o(), y(z, null, B(_, (s) => d(e(m), {
|
|
85
110
|
key: s,
|
|
86
|
-
class:
|
|
111
|
+
class: u(["px-2", [
|
|
87
112
|
"flex items-center justify-between gap-2 text-c-1 border-1/2",
|
|
88
|
-
|
|
113
|
+
e(i).themeId === s ? "bg-b-1" : "bg-b-2"
|
|
89
114
|
]]),
|
|
90
115
|
variant: "ghost",
|
|
91
|
-
onClick: (
|
|
116
|
+
onClick: (H) => C(s)
|
|
92
117
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
class:
|
|
97
|
-
"bg-primary":
|
|
118
|
+
default: p(() => [
|
|
119
|
+
t("div", R, [
|
|
120
|
+
t("div", {
|
|
121
|
+
class: u(["flex items-center justify-center w-5 h-5 rounded-full border-2 border-c-3", {
|
|
122
|
+
"bg-primary": e(i).themeId === s
|
|
98
123
|
}])
|
|
99
124
|
}, [
|
|
100
|
-
|
|
101
|
-
|
|
125
|
+
t("div", q, [
|
|
126
|
+
e(i).themeId === s ? (o(), n(e(k), {
|
|
102
127
|
key: 0,
|
|
103
128
|
icon: "Checkmark",
|
|
104
129
|
size: "xs",
|
|
105
130
|
thickness: "3.5"
|
|
106
|
-
})) :
|
|
131
|
+
})) : c("", !0)
|
|
107
132
|
])
|
|
108
133
|
], 2),
|
|
109
|
-
b(" " +
|
|
134
|
+
b(" " + v(e(N)[s]), 1)
|
|
110
135
|
]),
|
|
111
|
-
|
|
112
|
-
|
|
136
|
+
t("div", D, [
|
|
137
|
+
t("span", {
|
|
113
138
|
class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
|
|
114
|
-
style:
|
|
115
|
-
backgroundColor:
|
|
139
|
+
style: g({
|
|
140
|
+
backgroundColor: h(s).light
|
|
116
141
|
})
|
|
117
142
|
}, null, 4),
|
|
118
|
-
|
|
143
|
+
t("span", {
|
|
119
144
|
class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
|
|
120
|
-
style:
|
|
121
|
-
backgroundColor:
|
|
145
|
+
style: g({
|
|
146
|
+
backgroundColor: h(s).dark
|
|
122
147
|
})
|
|
123
148
|
}, null, 4),
|
|
124
|
-
|
|
149
|
+
t("span", {
|
|
125
150
|
class: "inline-block w-5 h-5 rounded-full border-c-3",
|
|
126
|
-
style:
|
|
127
|
-
backgroundColor:
|
|
151
|
+
style: g({
|
|
152
|
+
backgroundColor: h(s).accent
|
|
128
153
|
})
|
|
129
154
|
}, null, 4)
|
|
130
155
|
])
|
|
@@ -134,8 +159,8 @@ const P = { class: "bg-b-1 w-full h-full overflow-auto" }, T = { class: "flex fl
|
|
|
134
159
|
])
|
|
135
160
|
])
|
|
136
161
|
]),
|
|
137
|
-
|
|
138
|
-
|
|
162
|
+
t("div", null, [
|
|
163
|
+
d(P)
|
|
139
164
|
])
|
|
140
165
|
])
|
|
141
166
|
])
|
|
@@ -143,5 +168,5 @@ const P = { class: "bg-b-1 w-full h-full overflow-auto" }, T = { class: "flex fl
|
|
|
143
168
|
}
|
|
144
169
|
});
|
|
145
170
|
export {
|
|
146
|
-
|
|
171
|
+
X as default
|
|
147
172
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.33",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -153,17 +153,17 @@
|
|
|
153
153
|
"whatwg-mimetype": "^4.0.0",
|
|
154
154
|
"yaml": "^2.4.5",
|
|
155
155
|
"zod": "^3.23.8",
|
|
156
|
-
"@scalar/components": "0.12.
|
|
156
|
+
"@scalar/components": "0.12.59",
|
|
157
|
+
"@scalar/draggable": "0.1.6",
|
|
157
158
|
"@scalar/icons": "0.1.1",
|
|
158
|
-
"@scalar/oas-utils": "0.2.60",
|
|
159
159
|
"@scalar/object-utils": "1.1.10",
|
|
160
|
-
"@scalar/
|
|
160
|
+
"@scalar/oas-utils": "0.2.60",
|
|
161
161
|
"@scalar/openapi-parser": "0.8.7",
|
|
162
162
|
"@scalar/openapi-types": "0.1.4",
|
|
163
|
-
"@scalar/themes": "0.9.41",
|
|
164
|
-
"@scalar/use-codemirror": "0.11.25",
|
|
165
163
|
"@scalar/types": "0.0.17",
|
|
164
|
+
"@scalar/themes": "0.9.41",
|
|
166
165
|
"@scalar/use-toasts": "0.7.7",
|
|
166
|
+
"@scalar/use-codemirror": "0.11.26",
|
|
167
167
|
"@scalar/use-tooltip": "1.0.3"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|