@scalar/api-client 2.19.1 → 2.19.3
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 +46 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/hooks/useFileDialog.d.ts +4 -4
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +96 -48
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts +96 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +49 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +16 -17
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +109 -152
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +1 -1
- 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.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +0 -2
- 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 +19 -20
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +25 -14
- 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 +65 -45
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +2 -2
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +9 -10
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +1 -3
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
- 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 +2 -2
- package/dist/v2/features/modal/Modal.vue2.js +31 -31
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts +8 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +36 -0
- package/dist/v2/features/modal/index.d.ts +1 -0
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/modal/index.js +4 -2
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +48 -34
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts +2 -1
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-server.js +2 -2
- package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +0 -2
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +110 -135
- package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +1 -1
- package/dist/v2/helpers/get-servers.d.ts +23 -0
- package/dist/v2/helpers/get-servers.d.ts.map +1 -0
- package/dist/v2/helpers/get-servers.js +66 -0
- package/dist/v2/helpers/index.d.ts +1 -0
- package/dist/v2/helpers/index.d.ts.map +1 -1
- package/dist/v2/helpers/index.js +4 -2
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -1
- package/package.json +14 -14
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -15
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as y, computed as n, toValue as o, onMounted as S, createBlock as x, createElementBlock as k, openBlock as c, unref as i, createElementVNode as g } from "vue";
|
|
2
|
+
import { getResolvedRef as s } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { mapHiddenClientsConfig as C } from "../modal/helpers/map-hidden-clients-config.js";
|
|
4
|
+
import { combineParams as B } from "./helpers/combine-params.js";
|
|
5
|
+
import { getSelectedServer as w } from "./helpers/get-selected-server.js";
|
|
6
|
+
import { getServers as U } from "../../helpers/get-servers.js";
|
|
7
|
+
import p from "../../blocks/operation-block/OperationBlock.vue.js";
|
|
8
|
+
const b = {
|
|
7
9
|
key: 1,
|
|
8
10
|
class: "flex h-full w-full items-center justify-center"
|
|
9
|
-
},
|
|
10
|
-
...
|
|
11
|
+
}, N = {}, $ = /* @__PURE__ */ y({
|
|
12
|
+
...N,
|
|
11
13
|
__name: "Operation",
|
|
12
14
|
props: {
|
|
13
15
|
documentSlug: {},
|
|
@@ -22,21 +24,23 @@ const B = {
|
|
|
22
24
|
workspaceStore: {},
|
|
23
25
|
activeWorkspace: {},
|
|
24
26
|
plugins: {},
|
|
25
|
-
|
|
27
|
+
options: {}
|
|
26
28
|
},
|
|
27
29
|
setup(e) {
|
|
28
|
-
const
|
|
30
|
+
const u = n(() => e.path ? s(e.document?.paths?.[e.path]) : null), l = n(() => {
|
|
29
31
|
if (!e.path || !e.method)
|
|
30
32
|
return null;
|
|
31
|
-
const t =
|
|
33
|
+
const t = s(e.document?.paths?.[e.path]?.[e.method]);
|
|
32
34
|
if (!t)
|
|
33
35
|
return null;
|
|
34
|
-
|
|
35
|
-
if (!n)
|
|
36
|
+
if (!u.value)
|
|
36
37
|
return t;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const a = B(
|
|
39
|
+
u.value.parameters,
|
|
40
|
+
t.parameters
|
|
41
|
+
);
|
|
42
|
+
return { ...t, parameters: a };
|
|
43
|
+
}), m = n(() => [
|
|
40
44
|
...(e.workspaceStore.workspace?.["x-scalar-cookies"] ?? []).map((t) => ({
|
|
41
45
|
...t,
|
|
42
46
|
location: "workspace"
|
|
@@ -45,49 +49,59 @@ const B = {
|
|
|
45
49
|
...t,
|
|
46
50
|
location: "document"
|
|
47
51
|
}))
|
|
48
|
-
]),
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
]), r = n(() => {
|
|
53
|
+
const t = o(e.options)?.servers ?? l.value?.servers ?? u.value?.servers ?? e.document?.servers;
|
|
54
|
+
return U(t, {
|
|
55
|
+
baseServerUrl: o(e.options)?.baseServerURL,
|
|
56
|
+
documentUrl: e.document?.["x-scalar-original-source-url"]
|
|
57
|
+
});
|
|
58
|
+
}), d = n(
|
|
59
|
+
() => w(e.document, r.value)
|
|
60
|
+
);
|
|
61
|
+
S(() => {
|
|
62
|
+
typeof e.document?.["x-scalar-selected-server"] > "u" && r.value?.[0]?.url && e.eventBus.emit("server:update:selected", { url: r.value[0].url });
|
|
51
63
|
});
|
|
52
|
-
const
|
|
64
|
+
const v = n(() => e.document?.["x-scalar-set-operation-security"] ? {
|
|
53
65
|
type: "operation",
|
|
54
66
|
path: e.path ?? "",
|
|
55
67
|
method: e.method ?? "get"
|
|
56
68
|
} : {
|
|
57
69
|
type: "document"
|
|
58
|
-
}),
|
|
59
|
-
|
|
70
|
+
}), h = n(
|
|
71
|
+
() => C(o(e.options)?.hiddenClients)
|
|
72
|
+
), f = "2.19.3";
|
|
73
|
+
return (t, a) => e.path && e.method && e.exampleName && l.value ? (c(), x(i(p), {
|
|
60
74
|
key: 0,
|
|
61
|
-
appVersion:
|
|
62
|
-
authMeta:
|
|
75
|
+
appVersion: i(f),
|
|
76
|
+
authMeta: v.value,
|
|
63
77
|
documentSecurity: e.document?.security ?? [],
|
|
64
78
|
documentSelectedSecurity: e.document?.["x-scalar-selected-security"],
|
|
65
79
|
documentUrl: e.document?.["x-scalar-original-source-url"],
|
|
66
80
|
environment: e.environment,
|
|
67
81
|
eventBus: e.eventBus,
|
|
68
82
|
exampleKey: e.exampleName,
|
|
69
|
-
globalCookies:
|
|
70
|
-
hideClientButton: e.hideClientButton,
|
|
83
|
+
globalCookies: m.value,
|
|
84
|
+
hideClientButton: o(e.options)?.hideClientButton ?? !1,
|
|
71
85
|
history: [],
|
|
72
|
-
httpClients:
|
|
86
|
+
httpClients: h.value,
|
|
73
87
|
layout: e.layout,
|
|
74
88
|
method: e.method,
|
|
75
|
-
operation:
|
|
89
|
+
operation: l.value,
|
|
76
90
|
path: e.path,
|
|
77
91
|
plugins: e.plugins,
|
|
78
92
|
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
79
93
|
securitySchemes: e.securitySchemes,
|
|
80
94
|
selectedClient: e.workspaceStore.workspace["x-scalar-default-client"],
|
|
81
|
-
server:
|
|
82
|
-
servers:
|
|
95
|
+
server: d.value,
|
|
96
|
+
servers: r.value,
|
|
83
97
|
setOperationSecurity: e.document?.["x-scalar-set-operation-security"] ?? !1,
|
|
84
98
|
totalPerformedRequests: 0,
|
|
85
|
-
"onUpdate:servers":
|
|
86
|
-
}, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (c(),
|
|
87
|
-
|
|
99
|
+
"onUpdate:servers": a[0] || (a[0] = (R) => e.eventBus.emit("ui:route:page", { name: "document.servers" }))
|
|
100
|
+
}, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (c(), k("div", b, [...a[1] || (a[1] = [
|
|
101
|
+
g("span", { class: "text-c-3" }, "Select an operation to view details", -1)
|
|
88
102
|
])]));
|
|
89
103
|
}
|
|
90
104
|
});
|
|
91
105
|
export {
|
|
92
|
-
|
|
106
|
+
$ as default
|
|
93
107
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
1
2
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
2
3
|
/**
|
|
3
4
|
* Get the selected server for a document,
|
|
@@ -6,5 +7,5 @@ import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspac
|
|
|
6
7
|
* If x-scalar-selected-server is undefined we select the first server (this means the user has not selected a server yet)
|
|
7
8
|
* If the user has un-selected a server it would be an empty string
|
|
8
9
|
*/
|
|
9
|
-
export declare const getSelectedServer: (document: WorkspaceDocument | null) =>
|
|
10
|
+
export declare const getSelectedServer: (document: WorkspaceDocument | null, servers: ServerObject[] | null) => ServerObject | null;
|
|
10
11
|
//# sourceMappingURL=get-selected-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-selected-server.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/operation/helpers/get-selected-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,iBAAiB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get-selected-server.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/operation/helpers/get-selected-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,iBAAiB,GAAG,IAAI,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,wBAQnG,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l = (r, e) => typeof r?.["x-scalar-selected-server"] > "u" && e?.length ? e[0] : e?.find(({ url: t }) => t === r?.["x-scalar-selected-server"]) ?? null;
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
l as getSelectedServer
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAC;;
|
|
1
|
+
{"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAC;;AA+IF,wBAMG"}
|
|
@@ -2,8 +2,6 @@ import { type ThemeId } from '@scalar/themes';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** Currently active proxy URL, when set to null means no proxy */
|
|
4
4
|
activeProxyUrl?: string | null;
|
|
5
|
-
/** Custom proxy url, when set to null means no custom proxy */
|
|
6
|
-
customProxyUrl?: string | null;
|
|
7
5
|
/** Currently active theme ID */
|
|
8
6
|
activeThemeId: ThemeId;
|
|
9
7
|
/** Currently active color mode */
|
|
@@ -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":"AAsQA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAQvB,KAAK,WAAW,GAAG;IACjB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,gCAAgC;IAChC,aAAa,EAAE,OAAO,CAAA;IACtB,kCAAkC;IAClC,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;;;;;AA2fF,wBAOG"}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cva as
|
|
3
|
-
import { themeLabels as
|
|
1
|
+
import { defineComponent as M, createElementBlock as y, openBlock as c, createVNode as n, withCtx as s, createElementVNode as o, unref as r, normalizeClass as a, createTextVNode as l, createBlock as f, createCommentVNode as p, Fragment as C, renderList as w, toDisplayString as U, normalizeStyle as g } from "vue";
|
|
2
|
+
import { cva as $, ScalarButton as m, cx as x, ScalarIcon as b } from "@scalar/components";
|
|
3
|
+
import { themeLabels as T } from "@scalar/themes";
|
|
4
4
|
import B from "../../../components/ImportCollection/IntegrationLogo.vue.js";
|
|
5
5
|
import L from "./components/Appearance.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import { getThemeColors as
|
|
8
|
-
const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }, V = { class: "
|
|
6
|
+
import k from "./components/Section.vue.js";
|
|
7
|
+
import { getThemeColors as h } from "./helpers/get-theme-colors.js";
|
|
8
|
+
const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }, V = { class: "flex flex-col gap-2" }, A = { class: "grid grid-cols-2 gap-2" }, E = { class: "flex items-center gap-2" }, F = { class: "flex items-center gap-1" }, O = { class: "grid grid-cols-2 gap-2" }, D = { class: "flex items-center gap-2" }, W = { class: "flex items-center gap-1" }, q = { class: "size-7 rounded-xl" }, v = "https://proxy.scalar.com", I = /* @__PURE__ */ M({
|
|
9
9
|
__name: "CollectionSettings",
|
|
10
10
|
props: {
|
|
11
11
|
activeProxyUrl: {},
|
|
12
|
-
customProxyUrl: {},
|
|
13
12
|
activeThemeId: {},
|
|
14
13
|
colorMode: {}
|
|
15
14
|
},
|
|
16
15
|
emits: ["update:proxyUrl", "update:themeId", "update:colorMode"],
|
|
17
|
-
setup(
|
|
18
|
-
const d =
|
|
16
|
+
setup(i, { emit: S }) {
|
|
17
|
+
const d = S, P = [
|
|
19
18
|
"default",
|
|
20
19
|
"alternate",
|
|
21
20
|
"purple",
|
|
22
21
|
"solarized",
|
|
23
22
|
"saturn",
|
|
24
23
|
"kepler"
|
|
25
|
-
], z = ["elysiajs", "fastify"],
|
|
24
|
+
], z = ["elysiajs", "fastify"], u = $({
|
|
26
25
|
base: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",
|
|
27
26
|
variants: {
|
|
28
27
|
active: {
|
|
@@ -31,98 +30,74 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
|
-
return (
|
|
35
|
-
n(
|
|
36
|
-
title:
|
|
37
|
-
|
|
33
|
+
return (G, e) => (c(), y("div", N, [
|
|
34
|
+
n(k, null, {
|
|
35
|
+
title: s(() => [...e[3] || (e[3] = [
|
|
36
|
+
l(" CORS Proxy ", -1)
|
|
38
37
|
])]),
|
|
39
|
-
description:
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
description: s(() => [...e[4] || (e[4] = [
|
|
39
|
+
l(" Browsers block cross-origin requests for security. We provide a public proxy to ", -1),
|
|
40
|
+
o("a", {
|
|
42
41
|
class: "hover:text-c-1 underline-offset-2",
|
|
43
42
|
href: "https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",
|
|
44
43
|
target: "_blank"
|
|
45
44
|
}, " bypass CORS issues ", -1),
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
l(" . Check the ", -1),
|
|
46
|
+
o("a", {
|
|
48
47
|
class: "hover:text-c-1 underline-offset-2",
|
|
49
48
|
href: "https://github.com/scalar/scalar/tree/main/projects/proxy-scalar-com",
|
|
50
49
|
target: "_blank"
|
|
51
50
|
}, " source code on GitHub ", -1),
|
|
52
|
-
|
|
51
|
+
l(" . ", -1)
|
|
53
52
|
])]),
|
|
54
|
-
default:
|
|
55
|
-
|
|
56
|
-
n(
|
|
57
|
-
class:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
active:
|
|
53
|
+
default: s(() => [
|
|
54
|
+
o("div", R, [
|
|
55
|
+
n(r(m), {
|
|
56
|
+
class: a(
|
|
57
|
+
r(x)(
|
|
58
|
+
r(u)({
|
|
59
|
+
active: i.activeProxyUrl === v
|
|
61
60
|
})
|
|
62
61
|
)
|
|
63
62
|
),
|
|
64
|
-
onClick: e[0] || (e[0] = (
|
|
63
|
+
onClick: e[0] || (e[0] = (t) => d("update:proxyUrl", v))
|
|
65
64
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
68
|
-
class:
|
|
69
|
-
"bg-c-accent text-b-1 border-transparent":
|
|
65
|
+
default: s(() => [
|
|
66
|
+
o("div", {
|
|
67
|
+
class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
|
|
68
|
+
"bg-c-accent text-b-1 border-transparent": i.activeProxyUrl === v
|
|
70
69
|
}])
|
|
71
70
|
}, [
|
|
72
|
-
|
|
71
|
+
i.activeProxyUrl === v ? (c(), f(r(b), {
|
|
73
72
|
key: 0,
|
|
74
73
|
icon: "Checkmark",
|
|
75
74
|
size: "xs",
|
|
76
75
|
thickness: "3.5"
|
|
77
|
-
})) :
|
|
76
|
+
})) : p("", !0)
|
|
78
77
|
], 2),
|
|
79
|
-
e[
|
|
78
|
+
e[5] || (e[5] = l(" Use proxy.scalar.com (default) ", -1))
|
|
80
79
|
]),
|
|
81
80
|
_: 1
|
|
82
81
|
}, 8, ["class"]),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
t(y)(
|
|
87
|
-
t(m)({
|
|
88
|
-
active: o.activeProxyUrl === o.customProxyUrl
|
|
89
|
-
})
|
|
90
|
-
)
|
|
91
|
-
),
|
|
92
|
-
onClick: e[1] || (e[1] = (r) => d("update:proxyUrl", o.customProxyUrl))
|
|
93
|
-
}, {
|
|
94
|
-
default: l(() => [
|
|
95
|
-
s("div", V, [
|
|
96
|
-
o.customProxyUrl === o.activeProxyUrl ? (a(), u(t(k), {
|
|
97
|
-
key: 0,
|
|
98
|
-
icon: "Checkmark",
|
|
99
|
-
size: "xs",
|
|
100
|
-
thickness: "3.5"
|
|
101
|
-
})) : f("", !0)
|
|
102
|
-
]),
|
|
103
|
-
i(" Use custom proxy (" + g(o.customProxyUrl) + ") ", 1)
|
|
104
|
-
]),
|
|
105
|
-
_: 1
|
|
106
|
-
}, 8, ["class"])) : f("", !0),
|
|
107
|
-
n(t(x), {
|
|
108
|
-
class: c(t(y)(t(m)({ active: !o.activeProxyUrl }))),
|
|
109
|
-
onClick: e[2] || (e[2] = (r) => d("update:proxyUrl", null))
|
|
82
|
+
n(r(m), {
|
|
83
|
+
class: a(r(x)(r(u)({ active: !i.activeProxyUrl }))),
|
|
84
|
+
onClick: e[1] || (e[1] = (t) => d("update:proxyUrl", null))
|
|
110
85
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
113
|
-
class:
|
|
86
|
+
default: s(() => [
|
|
87
|
+
o("div", {
|
|
88
|
+
class: a([
|
|
114
89
|
"flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",
|
|
115
|
-
!
|
|
90
|
+
!i.activeProxyUrl && "bg-c-accent text-b-1 border-transparent"
|
|
116
91
|
])
|
|
117
92
|
}, [
|
|
118
|
-
|
|
93
|
+
i.activeProxyUrl ? p("", !0) : (c(), f(r(b), {
|
|
119
94
|
key: 0,
|
|
120
95
|
icon: "Checkmark",
|
|
121
96
|
size: "xs",
|
|
122
97
|
thickness: "3.5"
|
|
123
98
|
}))
|
|
124
99
|
], 2),
|
|
125
|
-
e[
|
|
100
|
+
e[6] || (e[6] = l(" Skip the proxy ", -1))
|
|
126
101
|
]),
|
|
127
102
|
_: 1
|
|
128
103
|
}, 8, ["class"])
|
|
@@ -130,60 +105,60 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
130
105
|
]),
|
|
131
106
|
_: 1
|
|
132
107
|
}),
|
|
133
|
-
n(
|
|
134
|
-
title:
|
|
135
|
-
|
|
108
|
+
n(k, null, {
|
|
109
|
+
title: s(() => [...e[7] || (e[7] = [
|
|
110
|
+
l(" Themes ", -1)
|
|
136
111
|
])]),
|
|
137
|
-
description:
|
|
138
|
-
|
|
112
|
+
description: s(() => [...e[8] || (e[8] = [
|
|
113
|
+
l(" We've got a whole rainbow of themes for you to play with: ", -1)
|
|
139
114
|
])]),
|
|
140
|
-
default:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
(
|
|
144
|
-
key:
|
|
145
|
-
class:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
active:
|
|
115
|
+
default: s(() => [
|
|
116
|
+
o("div", V, [
|
|
117
|
+
o("div", A, [
|
|
118
|
+
(c(), y(C, null, w(P, (t) => n(r(m), {
|
|
119
|
+
key: t,
|
|
120
|
+
class: a(
|
|
121
|
+
r(x)(
|
|
122
|
+
r(u)({
|
|
123
|
+
active: i.activeThemeId === t
|
|
149
124
|
})
|
|
150
125
|
)
|
|
151
126
|
),
|
|
152
|
-
onClick: (j) => d("update:themeId",
|
|
127
|
+
onClick: (j) => d("update:themeId", t)
|
|
153
128
|
}, {
|
|
154
|
-
default:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
class:
|
|
158
|
-
"bg-c-accent text-b-1 border-transparent":
|
|
129
|
+
default: s(() => [
|
|
130
|
+
o("div", E, [
|
|
131
|
+
o("div", {
|
|
132
|
+
class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
|
|
133
|
+
"bg-c-accent text-b-1 border-transparent": i.activeThemeId === t
|
|
159
134
|
}])
|
|
160
135
|
}, [
|
|
161
|
-
|
|
136
|
+
i.activeThemeId === t ? (c(), f(r(b), {
|
|
162
137
|
key: 0,
|
|
163
138
|
icon: "Checkmark",
|
|
164
139
|
size: "xs",
|
|
165
140
|
thickness: "3.5"
|
|
166
|
-
})) :
|
|
141
|
+
})) : p("", !0)
|
|
167
142
|
], 2),
|
|
168
|
-
|
|
143
|
+
l(" " + U(r(T)[t]), 1)
|
|
169
144
|
]),
|
|
170
|
-
|
|
171
|
-
|
|
145
|
+
o("div", F, [
|
|
146
|
+
o("span", {
|
|
172
147
|
class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
|
|
173
|
-
style:
|
|
174
|
-
backgroundColor:
|
|
148
|
+
style: g({
|
|
149
|
+
backgroundColor: r(h)(t).light
|
|
175
150
|
})
|
|
176
151
|
}, null, 4),
|
|
177
|
-
|
|
152
|
+
o("span", {
|
|
178
153
|
class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
|
|
179
|
-
style:
|
|
180
|
-
backgroundColor:
|
|
154
|
+
style: g({
|
|
155
|
+
backgroundColor: r(h)(t).dark
|
|
181
156
|
})
|
|
182
157
|
}, null, 4),
|
|
183
|
-
|
|
158
|
+
o("span", {
|
|
184
159
|
class: "border-c-3 inline-block h-5 w-5 rounded-full",
|
|
185
|
-
style:
|
|
186
|
-
backgroundColor:
|
|
160
|
+
style: g({
|
|
161
|
+
backgroundColor: r(h)(t).accent
|
|
187
162
|
})
|
|
188
163
|
}, null, 4)
|
|
189
164
|
])
|
|
@@ -195,45 +170,45 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
195
170
|
]),
|
|
196
171
|
_: 1
|
|
197
172
|
}),
|
|
198
|
-
n(
|
|
199
|
-
title:
|
|
200
|
-
|
|
173
|
+
n(k, null, {
|
|
174
|
+
title: s(() => [...e[9] || (e[9] = [
|
|
175
|
+
l(" Framework Themes ", -1)
|
|
201
176
|
])]),
|
|
202
|
-
description:
|
|
203
|
-
|
|
177
|
+
description: s(() => [...e[10] || (e[10] = [
|
|
178
|
+
l(" Are you a real fan? Show your support by using your favorite framework's theme! ", -1)
|
|
204
179
|
])]),
|
|
205
|
-
default:
|
|
206
|
-
|
|
207
|
-
(
|
|
208
|
-
key:
|
|
209
|
-
class:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
active:
|
|
180
|
+
default: s(() => [
|
|
181
|
+
o("div", O, [
|
|
182
|
+
(c(), y(C, null, w(z, (t) => n(r(m), {
|
|
183
|
+
key: t,
|
|
184
|
+
class: a(
|
|
185
|
+
r(x)(
|
|
186
|
+
r(u)({
|
|
187
|
+
active: i.activeThemeId === t
|
|
213
188
|
})
|
|
214
189
|
)
|
|
215
190
|
),
|
|
216
|
-
onClick: (j) => d("update:themeId",
|
|
191
|
+
onClick: (j) => d("update:themeId", t)
|
|
217
192
|
}, {
|
|
218
|
-
default:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
class:
|
|
222
|
-
"bg-c-accent text-b-1 border-transparent":
|
|
193
|
+
default: s(() => [
|
|
194
|
+
o("div", D, [
|
|
195
|
+
o("div", {
|
|
196
|
+
class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
|
|
197
|
+
"bg-c-accent text-b-1 border-transparent": i.activeThemeId === t
|
|
223
198
|
}])
|
|
224
199
|
}, [
|
|
225
|
-
|
|
200
|
+
i.activeThemeId === t ? (c(), f(r(b), {
|
|
226
201
|
key: 0,
|
|
227
202
|
icon: "Checkmark",
|
|
228
203
|
size: "xs",
|
|
229
204
|
thickness: "3.5"
|
|
230
|
-
})) :
|
|
205
|
+
})) : p("", !0)
|
|
231
206
|
], 2),
|
|
232
|
-
|
|
207
|
+
l(" " + U(r(T)[t]), 1)
|
|
233
208
|
]),
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
n(B, { integration:
|
|
209
|
+
o("div", W, [
|
|
210
|
+
o("div", q, [
|
|
211
|
+
n(B, { integration: t }, null, 8, ["integration"])
|
|
237
212
|
])
|
|
238
213
|
])
|
|
239
214
|
]),
|
|
@@ -243,17 +218,17 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
243
218
|
]),
|
|
244
219
|
_: 1
|
|
245
220
|
}),
|
|
246
|
-
n(
|
|
247
|
-
title:
|
|
248
|
-
|
|
221
|
+
n(k, null, {
|
|
222
|
+
title: s(() => [...e[11] || (e[11] = [
|
|
223
|
+
l(" Appearance ", -1)
|
|
249
224
|
])]),
|
|
250
|
-
description:
|
|
251
|
-
|
|
225
|
+
description: s(() => [...e[12] || (e[12] = [
|
|
226
|
+
l(" Choose between light, dark, or system-based appearance for your workspace. ", -1)
|
|
252
227
|
])]),
|
|
253
|
-
default:
|
|
228
|
+
default: s(() => [
|
|
254
229
|
n(L, {
|
|
255
|
-
colorMode:
|
|
256
|
-
"onUpdate:colorMode": e[
|
|
230
|
+
colorMode: i.colorMode,
|
|
231
|
+
"onUpdate:colorMode": e[2] || (e[2] = (t) => d("update:colorMode", t))
|
|
257
232
|
}, null, 8, ["colorMode"])
|
|
258
233
|
]),
|
|
259
234
|
_: 1
|
|
@@ -262,5 +237,5 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
|
|
|
262
237
|
}
|
|
263
238
|
});
|
|
264
239
|
export {
|
|
265
|
-
|
|
240
|
+
I as default
|
|
266
241
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Appearance.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/settings/components/Appearance.vue"],"names":[],"mappings":"AA6EA,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;
|
|
1
|
+
{"version":3,"file":"Appearance.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/settings/components/Appearance.vue"],"names":[],"mappings":"AA6EA,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;AA4MF,wBAOG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Server processing options containing base URLs for resolving relative server URLs.
|
|
4
|
+
*/
|
|
5
|
+
type ServerProcessingOptions = {
|
|
6
|
+
baseServerUrl?: string;
|
|
7
|
+
documentUrl?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves and processes servers from an OpenAPI document.
|
|
11
|
+
*
|
|
12
|
+
* This function handles several scenarios:
|
|
13
|
+
* 1. No servers provided - creates a default server from document URL or fallback
|
|
14
|
+
* 2. Invalid server configurations - filters them out with warnings
|
|
15
|
+
* 3. Relative URLs - resolves them to absolute URLs using available base URLs
|
|
16
|
+
*
|
|
17
|
+
* @param servers - Array of OpenAPI server objects from the document
|
|
18
|
+
* @param options - Configuration options for server processing
|
|
19
|
+
* @returns Array of validated Server entities
|
|
20
|
+
*/
|
|
21
|
+
export declare function getServers(servers: ServerObject[] | undefined, options?: ServerProcessingOptions): ServerObject[];
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=get-servers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-servers.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/get-servers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,KAAK,uBAAuB,GAAG;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,OAAO,GAAE,uBAA4B,GAAG,YAAY,EAAE,CAsBrH"}
|