@scalar/api-client 2.26.2 → 2.29.1
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 +218 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/libs/local-storage.js +3 -3
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +26 -26
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +88 -103
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +52 -54
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +106 -86
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +4 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +32 -40
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +5 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +80 -78
- package/dist/v2/features/app/app-events.d.ts +2 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +89 -64
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +172 -151
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +99 -97
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +2 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +11 -11
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +41 -22
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
- package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -33
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +132 -115
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -16
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
|
@@ -1,27 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cva as
|
|
3
|
-
import { themeLabels as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { getThemeColors as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as L, computed as $, createElementBlock as h, openBlock as n, createVNode as d, createBlock as c, createCommentVNode as g, withCtx as o, createElementVNode as r, unref as s, normalizeClass as u, createTextVNode as a, Fragment as S, renderList as C, toDisplayString as w, normalizeStyle as U } from "vue";
|
|
2
|
+
import { cva as O, ScalarButton as y, cx as f, ScalarIcon as x } from "@scalar/components";
|
|
3
|
+
import { presets as F, themeLabels as V } from "@scalar/themes";
|
|
4
|
+
import H from "../../../components/ImportCollection/IntegrationLogo.vue.js";
|
|
5
|
+
import G from "./components/Appearance.vue.js";
|
|
6
|
+
import p from "./components/Section.vue.js";
|
|
7
|
+
import { getThemeColors as N } from "./helpers/get-theme-colors.js";
|
|
8
|
+
const W = { class: "flex flex-col gap-10" }, q = { class: "flex flex-col gap-2" }, I = { class: "grid grid-cols-2 gap-2" }, X = { class: "flex items-center gap-2" }, Y = { class: "flex items-center gap-1" }, J = { class: "grid grid-cols-2 gap-2" }, K = { class: "flex items-center gap-2" }, Q = { class: "flex items-center gap-1" }, Z = { class: "size-7 rounded-xl" }, _ = { class: "grid grid-cols-2 gap-2" }, ee = { class: "flex items-center gap-2" }, T = "https://proxy.scalar.com", ne = /* @__PURE__ */ L({
|
|
9
9
|
__name: "CollectionSettings",
|
|
10
10
|
props: {
|
|
11
11
|
activeProxyUrl: {},
|
|
12
|
-
|
|
12
|
+
customThemes: { default: () => [] },
|
|
13
|
+
activeThemeSlug: {},
|
|
13
14
|
colorMode: {}
|
|
14
15
|
},
|
|
15
|
-
emits: ["update:proxyUrl", "update:
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
16
|
+
emits: ["update:proxyUrl", "update:themeSlug", "update:colorMode"],
|
|
17
|
+
setup(l, { emit: A }) {
|
|
18
|
+
const m = A, B = [
|
|
19
|
+
"none",
|
|
18
20
|
"default",
|
|
19
21
|
"alternate",
|
|
20
22
|
"purple",
|
|
21
23
|
"solarized",
|
|
22
24
|
"saturn",
|
|
23
25
|
"kepler"
|
|
24
|
-
],
|
|
26
|
+
], R = ["elysiajs", "fastify"], z = B.map((i) => i === "none" ? {
|
|
27
|
+
slug: i,
|
|
28
|
+
name: "None",
|
|
29
|
+
description: "No theme",
|
|
30
|
+
theme: ""
|
|
31
|
+
} : F[i]), M = R.map((i) => ({
|
|
32
|
+
slug: i,
|
|
33
|
+
name: V[i],
|
|
34
|
+
description: V[i],
|
|
35
|
+
theme: ""
|
|
36
|
+
})), j = $(
|
|
37
|
+
() => new Set(l.customThemes.map((i) => i.slug))
|
|
38
|
+
), v = O({
|
|
25
39
|
base: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",
|
|
26
40
|
variants: {
|
|
27
41
|
active: {
|
|
@@ -29,75 +43,73 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
29
43
|
false: "bg-b-1 hover:bg-b-2"
|
|
30
44
|
}
|
|
31
45
|
}
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
}), D = $(() => l.activeThemeSlug === void 0 || l.activeThemeSlug === "none" ? !0 : !(j.value.has(l.activeThemeSlug) || z.some((e) => e.slug === l.activeThemeSlug) || M.some((e) => e.slug === l.activeThemeSlug))), P = (i) => i === "none", b = (i) => l.activeThemeSlug === i || P(i) && D.value, k = (i) => f(
|
|
47
|
+
"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",
|
|
48
|
+
i && "bg-c-accent text-b-1 border-transparent"
|
|
49
|
+
);
|
|
50
|
+
return (i, e) => (n(), h("div", W, [
|
|
51
|
+
d(p, null, {
|
|
52
|
+
title: o(() => [...e[3] || (e[3] = [
|
|
53
|
+
a("CORS Proxy", -1)
|
|
37
54
|
])]),
|
|
38
|
-
description:
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
description: o(() => [...e[4] || (e[4] = [
|
|
56
|
+
a(" Browsers block cross-origin requests for security. We provide a public proxy to ", -1),
|
|
57
|
+
r("a", {
|
|
41
58
|
class: "hover:text-c-1 underline-offset-2",
|
|
42
59
|
href: "https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",
|
|
43
60
|
target: "_blank"
|
|
44
61
|
}, " bypass CORS issues ", -1),
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
a(" . Check the ", -1),
|
|
63
|
+
r("a", {
|
|
47
64
|
class: "hover:text-c-1 underline-offset-2",
|
|
48
65
|
href: "https://github.com/scalar/scalar/tree/main/projects/proxy-scalar-com",
|
|
49
66
|
target: "_blank"
|
|
50
67
|
}, " source code on GitHub ", -1),
|
|
51
|
-
|
|
68
|
+
a(" . ", -1)
|
|
52
69
|
])]),
|
|
53
|
-
default:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
class:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
active:
|
|
70
|
+
default: o(() => [
|
|
71
|
+
r("div", q, [
|
|
72
|
+
d(s(y), {
|
|
73
|
+
class: u(
|
|
74
|
+
s(f)(
|
|
75
|
+
s(v)({
|
|
76
|
+
active: l.activeProxyUrl === T
|
|
60
77
|
})
|
|
61
78
|
)
|
|
62
79
|
),
|
|
63
|
-
onClick: e[0] || (e[0] = (t) =>
|
|
80
|
+
onClick: e[0] || (e[0] = (t) => m("update:proxyUrl", T))
|
|
64
81
|
}, {
|
|
65
|
-
default:
|
|
66
|
-
|
|
67
|
-
class:
|
|
68
|
-
"bg-c-accent text-b-1 border-transparent": i.activeProxyUrl === v
|
|
69
|
-
}])
|
|
82
|
+
default: o(() => [
|
|
83
|
+
r("div", {
|
|
84
|
+
class: u(k(l.activeProxyUrl === T))
|
|
70
85
|
}, [
|
|
71
|
-
|
|
86
|
+
l.activeProxyUrl === T ? (n(), c(s(x), {
|
|
72
87
|
key: 0,
|
|
73
88
|
icon: "Checkmark",
|
|
74
89
|
size: "xs",
|
|
75
90
|
thickness: "3.5"
|
|
76
|
-
})) :
|
|
91
|
+
})) : g("", !0)
|
|
77
92
|
], 2),
|
|
78
|
-
e[5] || (e[5] =
|
|
93
|
+
e[5] || (e[5] = a(" Use proxy.scalar.com (default) ", -1))
|
|
79
94
|
]),
|
|
80
95
|
_: 1
|
|
81
96
|
}, 8, ["class"]),
|
|
82
|
-
|
|
83
|
-
class:
|
|
84
|
-
onClick: e[1] || (e[1] = (t) =>
|
|
97
|
+
d(s(y), {
|
|
98
|
+
class: u(s(f)(s(v)({ active: !l.activeProxyUrl }))),
|
|
99
|
+
onClick: e[1] || (e[1] = (t) => m("update:proxyUrl", null))
|
|
85
100
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
|
|
88
|
-
class:
|
|
89
|
-
"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",
|
|
90
|
-
!i.activeProxyUrl && "bg-c-accent text-b-1 border-transparent"
|
|
91
|
-
])
|
|
101
|
+
default: o(() => [
|
|
102
|
+
r("div", {
|
|
103
|
+
class: u(k(!l.activeProxyUrl))
|
|
92
104
|
}, [
|
|
93
|
-
|
|
105
|
+
l.activeProxyUrl ? g("", !0) : (n(), c(s(x), {
|
|
94
106
|
key: 0,
|
|
95
107
|
icon: "Checkmark",
|
|
96
108
|
size: "xs",
|
|
97
109
|
thickness: "3.5"
|
|
98
110
|
}))
|
|
99
111
|
], 2),
|
|
100
|
-
e[6] || (e[6] =
|
|
112
|
+
e[6] || (e[6] = a(" Skip the proxy ", -1))
|
|
101
113
|
]),
|
|
102
114
|
_: 1
|
|
103
115
|
}, 8, ["class"])
|
|
@@ -105,130 +117,152 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
105
117
|
]),
|
|
106
118
|
_: 1
|
|
107
119
|
}),
|
|
108
|
-
|
|
109
|
-
title:
|
|
110
|
-
|
|
120
|
+
d(p, null, {
|
|
121
|
+
title: o(() => [...e[7] || (e[7] = [
|
|
122
|
+
a("Themes", -1)
|
|
111
123
|
])]),
|
|
112
|
-
description:
|
|
113
|
-
|
|
124
|
+
description: o(() => [...e[8] || (e[8] = [
|
|
125
|
+
a(" We've got a whole rainbow of themes for you to play with: ", -1)
|
|
114
126
|
])]),
|
|
115
|
-
default:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
icon: "Checkmark",
|
|
139
|
-
size: "xs",
|
|
140
|
-
thickness: "3.5"
|
|
141
|
-
})) : p("", !0)
|
|
142
|
-
], 2),
|
|
143
|
-
l(" " + U(r(T)[t]), 1)
|
|
144
|
-
]),
|
|
145
|
-
o("div", F, [
|
|
146
|
-
o("span", {
|
|
147
|
-
class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
|
|
148
|
-
style: g({
|
|
149
|
-
backgroundColor: r(h)(t).light
|
|
150
|
-
})
|
|
151
|
-
}, null, 4),
|
|
152
|
-
o("span", {
|
|
153
|
-
class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
|
|
154
|
-
style: g({
|
|
155
|
-
backgroundColor: r(h)(t).dark
|
|
156
|
-
})
|
|
157
|
-
}, null, 4),
|
|
158
|
-
o("span", {
|
|
159
|
-
class: "border-c-3 inline-block h-5 w-5 rounded-full",
|
|
160
|
-
style: g({
|
|
161
|
-
backgroundColor: r(h)(t).accent
|
|
162
|
-
})
|
|
163
|
-
}, null, 4)
|
|
164
|
-
])
|
|
127
|
+
default: o(() => [
|
|
128
|
+
r("div", I, [
|
|
129
|
+
(n(!0), h(S, null, C(s(z), (t) => (n(), c(s(y), {
|
|
130
|
+
key: t.slug,
|
|
131
|
+
class: u(s(f)(s(v)({ active: b(t.slug) }))),
|
|
132
|
+
onClick: (E) => m(
|
|
133
|
+
"update:themeSlug",
|
|
134
|
+
P(t.slug) ? void 0 : t.slug
|
|
135
|
+
)
|
|
136
|
+
}, {
|
|
137
|
+
default: o(() => [
|
|
138
|
+
r("div", X, [
|
|
139
|
+
r("div", {
|
|
140
|
+
class: u(k(b(t.slug)))
|
|
141
|
+
}, [
|
|
142
|
+
b(t.slug) ? (n(), c(s(x), {
|
|
143
|
+
key: 0,
|
|
144
|
+
icon: "Checkmark",
|
|
145
|
+
size: "xs",
|
|
146
|
+
thickness: "3.5"
|
|
147
|
+
})) : g("", !0)
|
|
148
|
+
], 2),
|
|
149
|
+
a(" " + w(t.name), 1)
|
|
165
150
|
]),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
151
|
+
r("div", Y, [
|
|
152
|
+
r("span", {
|
|
153
|
+
class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
|
|
154
|
+
style: U({
|
|
155
|
+
backgroundColor: s(N)(t.slug).light
|
|
156
|
+
})
|
|
157
|
+
}, null, 4),
|
|
158
|
+
r("span", {
|
|
159
|
+
class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
|
|
160
|
+
style: U({
|
|
161
|
+
backgroundColor: s(N)(t.slug).dark
|
|
162
|
+
})
|
|
163
|
+
}, null, 4),
|
|
164
|
+
r("span", {
|
|
165
|
+
class: "border-c-3 inline-block h-5 w-5 rounded-full",
|
|
166
|
+
style: U({
|
|
167
|
+
backgroundColor: s(N)(t.slug).accent
|
|
168
|
+
})
|
|
169
|
+
}, null, 4)
|
|
170
|
+
])
|
|
171
|
+
]),
|
|
172
|
+
_: 2
|
|
173
|
+
}, 1032, ["class", "onClick"]))), 128))
|
|
169
174
|
])
|
|
170
175
|
]),
|
|
171
176
|
_: 1
|
|
172
177
|
}),
|
|
173
|
-
|
|
174
|
-
title:
|
|
175
|
-
|
|
178
|
+
d(p, null, {
|
|
179
|
+
title: o(() => [...e[9] || (e[9] = [
|
|
180
|
+
a("Framework Themes", -1)
|
|
176
181
|
])]),
|
|
177
|
-
description:
|
|
178
|
-
|
|
182
|
+
description: o(() => [...e[10] || (e[10] = [
|
|
183
|
+
a(" Are you a real fan? Show your support by using your favorite framework's theme! ", -1)
|
|
179
184
|
])]),
|
|
180
|
-
default:
|
|
181
|
-
|
|
182
|
-
(
|
|
183
|
-
key: t,
|
|
184
|
-
class:
|
|
185
|
-
|
|
186
|
-
r(u)({
|
|
187
|
-
active: i.activeThemeId === t
|
|
188
|
-
})
|
|
189
|
-
)
|
|
190
|
-
),
|
|
191
|
-
onClick: (j) => d("update:themeId", t)
|
|
185
|
+
default: o(() => [
|
|
186
|
+
r("div", J, [
|
|
187
|
+
(n(!0), h(S, null, C(s(M), (t) => (n(), c(s(y), {
|
|
188
|
+
key: t.slug,
|
|
189
|
+
class: u(s(f)(s(v)({ active: l.activeThemeSlug === t.slug }))),
|
|
190
|
+
onClick: (E) => m("update:themeSlug", t.slug)
|
|
192
191
|
}, {
|
|
193
|
-
default:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
class:
|
|
197
|
-
"bg-c-accent text-b-1 border-transparent": i.activeThemeId === t
|
|
198
|
-
}])
|
|
192
|
+
default: o(() => [
|
|
193
|
+
r("div", K, [
|
|
194
|
+
r("div", {
|
|
195
|
+
class: u(k(l.activeThemeSlug === t.slug))
|
|
199
196
|
}, [
|
|
200
|
-
|
|
197
|
+
l.activeThemeSlug === t.slug ? (n(), c(s(x), {
|
|
201
198
|
key: 0,
|
|
202
199
|
icon: "Checkmark",
|
|
203
200
|
size: "xs",
|
|
204
201
|
thickness: "3.5"
|
|
205
|
-
})) :
|
|
202
|
+
})) : g("", !0)
|
|
206
203
|
], 2),
|
|
207
|
-
|
|
204
|
+
a(" " + w(t.name), 1)
|
|
208
205
|
]),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
r("div", Q, [
|
|
207
|
+
r("div", Z, [
|
|
208
|
+
d(H, {
|
|
209
|
+
integration: t.slug
|
|
210
|
+
}, null, 8, ["integration"])
|
|
212
211
|
])
|
|
213
212
|
])
|
|
214
213
|
]),
|
|
215
214
|
_: 2
|
|
216
|
-
}, 1032, ["class", "onClick"])),
|
|
215
|
+
}, 1032, ["class", "onClick"]))), 128))
|
|
217
216
|
])
|
|
218
217
|
]),
|
|
219
218
|
_: 1
|
|
220
219
|
}),
|
|
221
|
-
n(
|
|
222
|
-
title:
|
|
223
|
-
|
|
220
|
+
l.customThemes.length > 0 ? (n(), c(p, { key: 0 }, {
|
|
221
|
+
title: o(() => [...e[11] || (e[11] = [
|
|
222
|
+
a(" Custom Themes ", -1)
|
|
223
|
+
])]),
|
|
224
|
+
description: o(() => [...e[12] || (e[12] = [
|
|
225
|
+
a(" Team defined themes are available to all workspaces in the team. ", -1)
|
|
226
|
+
])]),
|
|
227
|
+
default: o(() => [
|
|
228
|
+
r("div", _, [
|
|
229
|
+
(n(!0), h(S, null, C(l.customThemes, (t) => (n(), c(s(y), {
|
|
230
|
+
key: t.slug,
|
|
231
|
+
class: u(s(f)(s(v)({ active: l.activeThemeSlug === t.slug }))),
|
|
232
|
+
onClick: (E) => m("update:themeSlug", t.slug)
|
|
233
|
+
}, {
|
|
234
|
+
default: o(() => [
|
|
235
|
+
r("div", ee, [
|
|
236
|
+
r("div", {
|
|
237
|
+
class: u(k(l.activeThemeSlug === t.slug))
|
|
238
|
+
}, [
|
|
239
|
+
l.activeThemeSlug === t.slug ? (n(), c(s(x), {
|
|
240
|
+
key: 0,
|
|
241
|
+
icon: "Checkmark",
|
|
242
|
+
size: "xs",
|
|
243
|
+
thickness: "3.5"
|
|
244
|
+
})) : g("", !0)
|
|
245
|
+
], 2),
|
|
246
|
+
a(" " + w(t.name), 1)
|
|
247
|
+
])
|
|
248
|
+
]),
|
|
249
|
+
_: 2
|
|
250
|
+
}, 1032, ["class", "onClick"]))), 128))
|
|
251
|
+
])
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
})) : g("", !0),
|
|
255
|
+
d(p, null, {
|
|
256
|
+
title: o(() => [...e[13] || (e[13] = [
|
|
257
|
+
a("Appearance", -1)
|
|
224
258
|
])]),
|
|
225
|
-
description:
|
|
226
|
-
|
|
259
|
+
description: o(() => [...e[14] || (e[14] = [
|
|
260
|
+
a(" Choose between light, dark, or system-based appearance for your workspace. ", -1)
|
|
227
261
|
])]),
|
|
228
|
-
default:
|
|
229
|
-
|
|
230
|
-
colorMode:
|
|
231
|
-
"onUpdate:colorMode": e[2] || (e[2] = (t) =>
|
|
262
|
+
default: o(() => [
|
|
263
|
+
d(G, {
|
|
264
|
+
colorMode: l.colorMode,
|
|
265
|
+
"onUpdate:colorMode": e[2] || (e[2] = (t) => m("update:colorMode", t))
|
|
232
266
|
}, null, 8, ["colorMode"])
|
|
233
267
|
]),
|
|
234
268
|
_: 1
|
|
@@ -237,5 +271,5 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
237
271
|
}
|
|
238
272
|
});
|
|
239
273
|
export {
|
|
240
|
-
|
|
274
|
+
ne as default
|
|
241
275
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/DocumentSettings.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/DocumentSettings.vue"],"names":[],"mappings":"AA4JA,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;AAyTF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as v, ScalarToggle as
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as w, createElementBlock as s, openBlock as r, Fragment as u, createElementVNode as t, createVNode as n, withCtx as d, unref as o, createTextVNode as i, toDisplayString as h } from "vue";
|
|
2
|
+
import { useModal as v, ScalarToggle as D, ScalarIcon as f, ScalarButton as y, ScalarModal as k } from "@scalar/components";
|
|
3
|
+
import M from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
4
|
+
import g from "./components/Section.vue.js";
|
|
5
|
+
const U = { class: "flex flex-col gap-12" }, C = { class: "bg-b-2 rounded-lg border text-sm" }, N = { class: "bg-b-1 flex items-center justify-between gap-4 rounded-t-lg p-3" }, S = { class: "text-c-1 flex items-center overflow-x-auto border-t py-1.5 whitespace-nowrap" }, B = { class: "flex items-center" }, V = ["href"], T = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, L = /* @__PURE__ */ w({
|
|
5
6
|
__name: "DocumentSettings",
|
|
6
7
|
props: {
|
|
7
8
|
documentUrl: {},
|
|
@@ -10,90 +11,98 @@ const M = { class: "flex flex-col gap-12" }, U = { class: "flex flex-col gap-2"
|
|
|
10
11
|
isDraftDocument: { type: Boolean, default: !1 }
|
|
11
12
|
},
|
|
12
13
|
emits: ["delete:document", "update:watchMode"],
|
|
13
|
-
setup(l, { emit:
|
|
14
|
-
const
|
|
15
|
-
l.isDraftDocument ||
|
|
16
|
-
},
|
|
17
|
-
|
|
14
|
+
setup(l, { emit: b }) {
|
|
15
|
+
const c = b, a = v(), p = () => {
|
|
16
|
+
l.isDraftDocument || a.show();
|
|
17
|
+
}, x = () => {
|
|
18
|
+
c("delete:document"), a.hide();
|
|
18
19
|
};
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
t
|
|
28
|
-
e("
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
return ($, e) => (r(), s(u, null, [
|
|
21
|
+
t("div", U, [
|
|
22
|
+
n(g, null, {
|
|
23
|
+
title: d(() => [...e[2] || (e[2] = [
|
|
24
|
+
i("Features", -1)
|
|
25
|
+
])]),
|
|
26
|
+
default: d(() => [
|
|
27
|
+
t("div", C, [
|
|
28
|
+
t("div", N, [
|
|
29
|
+
e[3] || (e[3] = t("div", null, [
|
|
30
|
+
t("h4", null, "Watch Mode"),
|
|
31
|
+
t("p", { class: "text-c-2 mt-1" }, " When enabled, the OpenAPI document will be polled for changes. The collection will be updated automatically. ")
|
|
32
|
+
], -1)),
|
|
33
|
+
n(o(D), {
|
|
34
|
+
class: "w-4",
|
|
35
|
+
disabled: !l.documentUrl,
|
|
36
|
+
modelValue: l.watchMode ?? !1,
|
|
37
|
+
"onUpdate:modelValue": e[0] || (e[0] = (m) => c("update:watchMode", m))
|
|
38
|
+
}, null, 8, ["disabled", "modelValue"])
|
|
39
|
+
]),
|
|
40
|
+
t("div", S, [
|
|
41
|
+
t("div", B, [
|
|
42
|
+
l.documentUrl ? (r(), s(u, { key: 0 }, [
|
|
43
|
+
e[4] || (e[4] = t("span", { class: "bg-b-2 sticky left-0 pr-2 pl-3" }, "Source", -1)),
|
|
44
|
+
t("a", {
|
|
45
|
+
class: "text-c-2 group rounded pr-3 no-underline hover:underline",
|
|
46
|
+
href: l.documentUrl,
|
|
47
|
+
target: "_blank"
|
|
48
|
+
}, [
|
|
49
|
+
i(h(l.documentUrl) + " ", 1),
|
|
50
|
+
n(o(f), {
|
|
51
|
+
class: "ml-1 hidden w-2.5 group-hover:inline",
|
|
52
|
+
icon: "ExternalLink"
|
|
53
|
+
})
|
|
54
|
+
], 8, V)
|
|
55
|
+
], 64)) : (r(), s(u, { key: 1 }, [
|
|
48
56
|
n(o(f), {
|
|
49
|
-
class: "
|
|
50
|
-
icon: "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
icon: "NotAllowed",
|
|
57
|
-
size: "sm"
|
|
58
|
-
}),
|
|
59
|
-
t[4] || (t[4] = e("span", { class: "text-c-2 pr-3" }, " No URL configured. Try importing an OpenAPI document from an URL. ", -1))
|
|
60
|
-
], 64))
|
|
57
|
+
class: "text-c-2 mr-2 ml-3 w-4",
|
|
58
|
+
icon: "NotAllowed",
|
|
59
|
+
size: "sm"
|
|
60
|
+
}),
|
|
61
|
+
e[5] || (e[5] = t("span", { class: "text-c-2 pr-3" }, " No URL configured. Try importing an OpenAPI document from an URL. ", -1))
|
|
62
|
+
], 64))
|
|
63
|
+
])
|
|
61
64
|
])
|
|
62
65
|
])
|
|
63
|
-
])
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
e(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}),
|
|
69
|
+
n(g, null, {
|
|
70
|
+
title: d(() => [...e[6] || (e[6] = [
|
|
71
|
+
i("Danger Zone", -1)
|
|
72
|
+
])]),
|
|
73
|
+
default: d(() => [
|
|
74
|
+
t("div", T, [
|
|
75
|
+
e[8] || (e[8] = t("div", null, [
|
|
76
|
+
t("h4", null, "Delete Collection"),
|
|
77
|
+
t("p", { class: "text-c-2 mt-1" }, " Be careful, my friend. Once deleted, there is no way to recover the collection. ")
|
|
78
|
+
], -1)),
|
|
79
|
+
n(o(y), {
|
|
80
|
+
disabled: l.isDraftDocument,
|
|
81
|
+
size: "sm",
|
|
82
|
+
variant: "danger",
|
|
83
|
+
onClick: p
|
|
84
|
+
}, {
|
|
85
|
+
default: d(() => [...e[7] || (e[7] = [
|
|
86
|
+
i(" Delete Collection ", -1)
|
|
87
|
+
])]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["disabled"])
|
|
90
|
+
])
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
})
|
|
85
94
|
]),
|
|
86
|
-
n(o(
|
|
95
|
+
n(o(k), {
|
|
87
96
|
size: "xxs",
|
|
88
|
-
state: o(
|
|
97
|
+
state: o(a),
|
|
89
98
|
title: `Delete ${l.title}`
|
|
90
99
|
}, {
|
|
91
|
-
default:
|
|
92
|
-
n(
|
|
100
|
+
default: d(() => [
|
|
101
|
+
n(M, {
|
|
93
102
|
variableName: l.title ?? "",
|
|
94
103
|
warningMessage: "This action cannot be undone.",
|
|
95
|
-
onClose:
|
|
96
|
-
onDelete:
|
|
104
|
+
onClose: e[1] || (e[1] = (m) => o(a).hide()),
|
|
105
|
+
onDelete: x
|
|
97
106
|
}, null, 8, ["variableName"])
|
|
98
107
|
]),
|
|
99
108
|
_: 1
|
|
@@ -102,5 +111,5 @@ const M = { class: "flex flex-col gap-12" }, U = { class: "flex flex-col gap-2"
|
|
|
102
111
|
}
|
|
103
112
|
});
|
|
104
113
|
export {
|
|
105
|
-
|
|
114
|
+
L as default
|
|
106
115
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
type __VLS_Slots = {
|
|
2
2
|
title?: () => string;
|
|
3
3
|
description?: () => string;
|
|
4
|
-
|
|
4
|
+
actions?: () => unknown;
|
|
5
|
+
default: () => unknown;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
8
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|