@scalar/api-client 2.26.1 → 2.27.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 +102 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +48 -43
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -10
- 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/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +101 -100
- 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 +62 -69
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +36 -2
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +38 -3
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +68 -69
- 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-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +35 -41
- 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 +37 -41
- 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 +107 -87
- 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 +1 -2
- 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 +29 -37
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +2 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue2.js +45 -42
- 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 +6 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +48 -46
- package/dist/v2/features/app/app-events.d.ts +1 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +95 -56
- 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 +111 -105
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +12 -2
- 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 +3 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- 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/app/index.d.ts +0 -1
- package/dist/v2/features/app/index.d.ts.map +1 -1
- 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.js +13 -12
- 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/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/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 +1 -1
- 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/modal/helpers/create-api-client-modal.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +31 -34
- 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/helpers/index.d.ts +0 -1
- package/dist/v2/helpers/index.d.ts.map +1 -1
- 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 +10 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +139 -155
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +104 -101
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +20 -18
- package/dist/v2/helpers/plugins.d.ts +0 -65
- package/dist/v2/helpers/plugins.d.ts.map +0 -1
- package/dist/v2/helpers/plugins.js +0 -11
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as f, computed as n, toValue as
|
|
1
|
+
import { defineComponent as f, computed as n, toValue as o, createBlock as k, createElementBlock as g, openBlock as i, unref as l, createElementVNode as x } from "vue";
|
|
2
2
|
import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
-
import { mapHiddenClientsConfig as
|
|
4
|
-
import { combineParams as
|
|
5
|
-
import { getSelectedServer as
|
|
6
|
-
import { getServers as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
3
|
+
import { mapHiddenClientsConfig as w } from "../modal/helpers/map-hidden-clients-config.js";
|
|
4
|
+
import { combineParams as C } from "./helpers/combine-params.js";
|
|
5
|
+
import { getSelectedServer as B } from "./helpers/get-selected-server.js";
|
|
6
|
+
import { getServers as U } from "../../helpers/get-servers.js";
|
|
7
|
+
import b from "../../blocks/operation-block/OperationBlock.vue.js";
|
|
8
|
+
const N = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "flex h-full w-full items-center justify-center"
|
|
11
|
-
},
|
|
12
|
-
...
|
|
11
|
+
}, E = {}, I = /* @__PURE__ */ f({
|
|
12
|
+
...E,
|
|
13
13
|
__name: "Operation",
|
|
14
14
|
props: {
|
|
15
15
|
documentSlug: {},
|
|
@@ -24,19 +24,20 @@ const E = {
|
|
|
24
24
|
workspaceStore: {},
|
|
25
25
|
activeWorkspace: {},
|
|
26
26
|
plugins: {},
|
|
27
|
+
customThemes: {},
|
|
27
28
|
options: {}
|
|
28
29
|
},
|
|
29
30
|
setup(e) {
|
|
30
|
-
const
|
|
31
|
+
const r = n(() => e.path ? m(e.document?.paths?.[e.path]) : null), c = n(() => {
|
|
31
32
|
if (!e.path || !e.method)
|
|
32
33
|
return null;
|
|
33
34
|
const t = m(e.document?.paths?.[e.path]?.[e.method]);
|
|
34
35
|
if (!t)
|
|
35
36
|
return null;
|
|
36
|
-
if (!
|
|
37
|
+
if (!r.value)
|
|
37
38
|
return t;
|
|
38
|
-
const a =
|
|
39
|
-
|
|
39
|
+
const a = C(
|
|
40
|
+
r.value.parameters,
|
|
40
41
|
t.parameters
|
|
41
42
|
);
|
|
42
43
|
return { ...t, parameters: a };
|
|
@@ -49,19 +50,15 @@ const E = {
|
|
|
49
50
|
...t,
|
|
50
51
|
location: "document"
|
|
51
52
|
}))
|
|
52
|
-
]),
|
|
53
|
-
const t =
|
|
54
|
-
return
|
|
55
|
-
baseServerUrl:
|
|
53
|
+
]), u = n(() => {
|
|
54
|
+
const t = o(e.options)?.servers ?? c.value?.servers ?? r.value?.servers ?? e.document?.servers;
|
|
55
|
+
return U(t, {
|
|
56
|
+
baseServerUrl: o(e.options)?.baseServerURL,
|
|
56
57
|
documentUrl: e.document?.["x-scalar-original-source-url"]
|
|
57
58
|
});
|
|
58
59
|
}), d = n(
|
|
59
|
-
() =>
|
|
60
|
-
)
|
|
61
|
-
k(() => {
|
|
62
|
-
typeof e.document?.["x-scalar-selected-server"] > "u" && o.value?.[0]?.url && e.eventBus.emit("server:update:selected", { url: o.value[0].url });
|
|
63
|
-
});
|
|
64
|
-
const v = n(() => e.document?.["x-scalar-set-operation-security"] ? {
|
|
60
|
+
() => B(e.document, u.value)
|
|
61
|
+
), v = n(() => e.document?.["x-scalar-set-operation-security"] ? {
|
|
65
62
|
type: "operation",
|
|
66
63
|
path: e.path ?? "",
|
|
67
64
|
method: e.method ?? "get"
|
|
@@ -75,12 +72,12 @@ const E = {
|
|
|
75
72
|
})
|
|
76
73
|
)
|
|
77
74
|
)), S = n(
|
|
78
|
-
() =>
|
|
79
|
-
), y = "2.
|
|
80
|
-
return (t, a) => e.path && e.method && e.exampleName &&
|
|
75
|
+
() => w(o(e.options)?.hiddenClients)
|
|
76
|
+
), y = "2.27.1";
|
|
77
|
+
return (t, a) => e.path && e.method && e.exampleName && c.value ? (i(), k(l(b), {
|
|
81
78
|
key: 0,
|
|
82
79
|
activeEnvironment: e.workspaceStore.workspace["x-scalar-active-environment"],
|
|
83
|
-
appVersion:
|
|
80
|
+
appVersion: l(y),
|
|
84
81
|
authMeta: v.value,
|
|
85
82
|
documentSecurity: e.document?.security ?? [],
|
|
86
83
|
documentSelectedSecurity: e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
@@ -93,12 +90,12 @@ const E = {
|
|
|
93
90
|
eventBus: e.eventBus,
|
|
94
91
|
exampleKey: e.exampleName,
|
|
95
92
|
globalCookies: s.value,
|
|
96
|
-
hideClientButton:
|
|
93
|
+
hideClientButton: o(e.options)?.hideClientButton ?? !1,
|
|
97
94
|
history: e.workspaceStore.history.getHistory(e.documentSlug, e.path, e.method),
|
|
98
95
|
httpClients: S.value,
|
|
99
96
|
layout: e.layout,
|
|
100
97
|
method: e.method,
|
|
101
|
-
operation:
|
|
98
|
+
operation: c.value,
|
|
102
99
|
operationSelectedSecurity: e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
103
100
|
type: "operation",
|
|
104
101
|
documentName: e.documentSlug,
|
|
@@ -111,14 +108,14 @@ const E = {
|
|
|
111
108
|
securitySchemes: e.securitySchemes,
|
|
112
109
|
selectedClient: e.workspaceStore.workspace["x-scalar-default-client"],
|
|
113
110
|
server: d.value,
|
|
114
|
-
servers:
|
|
111
|
+
servers: u.value,
|
|
115
112
|
setOperationSecurity: e.document?.["x-scalar-set-operation-security"] ?? !1,
|
|
116
|
-
"onUpdate:servers": a[0] || (a[0] = (
|
|
117
|
-
}, null, 8, ["activeEnvironment", "appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "environments", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "history", "httpClients", "layout", "method", "operation", "operationSelectedSecurity", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (
|
|
118
|
-
|
|
113
|
+
"onUpdate:servers": a[0] || (a[0] = (O) => e.eventBus.emit("ui:navigate", { page: "document", path: "servers" }))
|
|
114
|
+
}, null, 8, ["activeEnvironment", "appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "environments", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "history", "httpClients", "layout", "method", "operation", "operationSelectedSecurity", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (i(), g("div", N, [...a[1] || (a[1] = [
|
|
115
|
+
x("span", { class: "text-c-3" }, "Select an operation to view details", -1)
|
|
119
116
|
])]));
|
|
120
117
|
}
|
|
121
118
|
});
|
|
122
119
|
export {
|
|
123
|
-
|
|
120
|
+
I as default
|
|
124
121
|
};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Theme } from '@scalar/themes';
|
|
2
|
+
type ColorMode = 'system' | 'light' | 'dark';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
/** Currently active proxy URL, when set to null means no proxy */
|
|
4
5
|
activeProxyUrl?: string | null;
|
|
6
|
+
/** Custom themes available to the team */
|
|
7
|
+
customThemes?: Theme[];
|
|
5
8
|
/** Currently active theme ID */
|
|
6
|
-
|
|
9
|
+
activeThemeSlug?: string;
|
|
7
10
|
/** Currently active color mode */
|
|
8
|
-
colorMode:
|
|
11
|
+
colorMode: ColorMode;
|
|
9
12
|
};
|
|
10
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
-
"update:colorMode": (value:
|
|
14
|
+
"update:colorMode": (value: ColorMode) => any;
|
|
12
15
|
"update:proxyUrl": (value: string | null) => any;
|
|
13
|
-
"update:
|
|
16
|
+
"update:themeSlug": (value: string | undefined) => any;
|
|
14
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
-
"onUpdate:colorMode"?: ((value:
|
|
18
|
+
"onUpdate:colorMode"?: ((value: ColorMode) => any) | undefined;
|
|
16
19
|
"onUpdate:proxyUrl"?: ((value: string | null) => any) | undefined;
|
|
17
|
-
"onUpdate:
|
|
20
|
+
"onUpdate:themeSlug"?: ((value: string | undefined) => any) | undefined;
|
|
18
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
22
|
declare const _default: typeof __VLS_export;
|
|
20
23
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/CollectionSettings.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/CollectionSettings.vue"],"names":[],"mappings":"AAkTA,OAAO,EAIL,KAAK,KAAK,EAEX,MAAM,gBAAgB,CAAA;AASvB,KAAK,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;AAE5C,KAAK,WAAW,GAAG;IACjB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,0CAA0C;IAC1C,YAAY,CAAC,EAAE,KAAK,EAAE,CAAA;IACtB,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,kCAAkC;IAClC,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAgnBF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -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"}
|