@scalar/api-reference 1.43.11 → 1.43.13
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 +53 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
- package/dist/browser/standalone.js +14433 -14507
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +19 -23
- package/dist/components/Content/Content.vue.d.ts +1 -3
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +16 -5
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -1
- package/dist/components/LoadingSkeleton.vue.d.ts.map +1 -1
- package/dist/components/OperationPath.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +19 -4
- package/dist/features/example-responses/has-response-content.d.ts +7 -0
- package/dist/features/example-responses/has-response-content.d.ts.map +1 -0
- package/dist/features/example-responses/has-response-content.js +19 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +0 -2
- package/dist/style.css +105 -96
- package/package.json +14 -14
- package/dist/helpers/map-configuration.d.ts +0 -67
- package/dist/helpers/map-configuration.d.ts.map +0 -1
- package/dist/helpers/map-configuration.js +0 -54
- package/dist/helpers/map-hidden-clients-config.d.ts +0 -8
- package/dist/helpers/map-hidden-clients-config.d.ts.map +0 -1
- package/dist/helpers/map-hidden-clients-config.js +0 -47
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
/**
|
|
3
|
-
* Maps a partial ApiReferenceConfigurationWithMultipleSources object to a DocumentConfiguration
|
|
4
|
-
* for use in the API Reference. This function transforms configuration options
|
|
5
|
-
* into the expected structure for the 'x-scalar-reference-config' property.
|
|
6
|
-
*
|
|
7
|
-
* @param config - Partial configuration object for the API Reference
|
|
8
|
-
* @returns DocumentConfiguration object with mapped settings
|
|
9
|
-
*/
|
|
10
|
-
export declare const mapConfiguration: (config: Partial<ApiReferenceConfiguration>) => {
|
|
11
|
-
'x-scalar-reference-config': {
|
|
12
|
-
title: string | undefined;
|
|
13
|
-
slug: string | undefined;
|
|
14
|
-
features: {
|
|
15
|
-
showModels: boolean;
|
|
16
|
-
expandAllTagSections: boolean | undefined;
|
|
17
|
-
persistAuthenticationState: boolean | undefined;
|
|
18
|
-
showDarkModeToggle: boolean;
|
|
19
|
-
showDownload: boolean;
|
|
20
|
-
showSearch: boolean;
|
|
21
|
-
showSidebar: boolean | undefined;
|
|
22
|
-
showTestRequestButton: boolean;
|
|
23
|
-
};
|
|
24
|
-
appearance: {
|
|
25
|
-
css: string | undefined;
|
|
26
|
-
favicon: string | undefined;
|
|
27
|
-
forceColorMode: "light" | "dark" | undefined;
|
|
28
|
-
initialColorMode: "dark" | undefined;
|
|
29
|
-
layout: "modern" | "classic" | undefined;
|
|
30
|
-
loadDefaultFonts: boolean | undefined;
|
|
31
|
-
theme: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined;
|
|
32
|
-
};
|
|
33
|
-
httpClients: ("c/libcurl" | "c/clj_http" | "c/httpclient" | "c/restsharp" | "c/http" | "c/native" | "c/http1.1" | "c/asynchttp" | "c/nethttp" | "c/okhttp" | "c/unirest" | "c/axios" | "c/fetch" | "c/jquery" | "c/ofetch" | "c/xhr" | "c/undici" | "c/nsurlsession" | "c/cohttp" | "c/curl" | "c/guzzle" | "c/restmethod" | "c/webrequest" | "c/python3" | "c/requests" | "c/httpx_sync" | "c/httpx_async" | "c/httr" | "c/reqwest" | "c/httpie" | "c/wget" | "r/libcurl" | "r/clj_http" | "r/httpclient" | "r/restsharp" | "r/http" | "r/native" | "r/http1.1" | "r/asynchttp" | "r/nethttp" | "r/okhttp" | "r/unirest" | "r/axios" | "r/fetch" | "r/jquery" | "r/ofetch" | "r/xhr" | "r/undici" | "r/nsurlsession" | "r/cohttp" | "r/curl" | "r/guzzle" | "r/restmethod" | "r/webrequest" | "r/python3" | "r/requests" | "r/httpx_sync" | "r/httpx_async" | "r/httr" | "r/reqwest" | "r/httpie" | "r/wget" | "go/libcurl" | "go/clj_http" | "go/httpclient" | "go/restsharp" | "go/http" | "go/native" | "go/http1.1" | "go/asynchttp" | "go/nethttp" | "go/okhttp" | "go/unirest" | "go/axios" | "go/fetch" | "go/jquery" | "go/ofetch" | "go/xhr" | "go/undici" | "go/nsurlsession" | "go/cohttp" | "go/curl" | "go/guzzle" | "go/restmethod" | "go/webrequest" | "go/python3" | "go/requests" | "go/httpx_sync" | "go/httpx_async" | "go/httr" | "go/reqwest" | "go/httpie" | "go/wget" | "rust/libcurl" | "rust/clj_http" | "rust/httpclient" | "rust/restsharp" | "rust/http" | "rust/native" | "rust/http1.1" | "rust/asynchttp" | "rust/nethttp" | "rust/okhttp" | "rust/unirest" | "rust/axios" | "rust/fetch" | "rust/jquery" | "rust/ofetch" | "rust/xhr" | "rust/undici" | "rust/nsurlsession" | "rust/cohttp" | "rust/curl" | "rust/guzzle" | "rust/restmethod" | "rust/webrequest" | "rust/python3" | "rust/requests" | "rust/httpx_sync" | "rust/httpx_async" | "rust/httr" | "rust/reqwest" | "rust/httpie" | "rust/wget" | "http/libcurl" | "http/clj_http" | "http/httpclient" | "http/restsharp" | "http/http" | "http/native" | "http/http1.1" | "http/asynchttp" | "http/nethttp" | "http/okhttp" | "http/unirest" | "http/axios" | "http/fetch" | "http/jquery" | "http/ofetch" | "http/xhr" | "http/undici" | "http/nsurlsession" | "http/cohttp" | "http/curl" | "http/guzzle" | "http/restmethod" | "http/webrequest" | "http/python3" | "http/requests" | "http/httpx_sync" | "http/httpx_async" | "http/httr" | "http/reqwest" | "http/httpie" | "http/wget" | "clojure/libcurl" | "clojure/clj_http" | "clojure/httpclient" | "clojure/restsharp" | "clojure/http" | "clojure/native" | "clojure/http1.1" | "clojure/asynchttp" | "clojure/nethttp" | "clojure/okhttp" | "clojure/unirest" | "clojure/axios" | "clojure/fetch" | "clojure/jquery" | "clojure/ofetch" | "clojure/xhr" | "clojure/undici" | "clojure/nsurlsession" | "clojure/cohttp" | "clojure/curl" | "clojure/guzzle" | "clojure/restmethod" | "clojure/webrequest" | "clojure/python3" | "clojure/requests" | "clojure/httpx_sync" | "clojure/httpx_async" | "clojure/httr" | "clojure/reqwest" | "clojure/httpie" | "clojure/wget" | "csharp/libcurl" | "csharp/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "csharp/http" | "csharp/native" | "csharp/http1.1" | "csharp/asynchttp" | "csharp/nethttp" | "csharp/okhttp" | "csharp/unirest" | "csharp/axios" | "csharp/fetch" | "csharp/jquery" | "csharp/ofetch" | "csharp/xhr" | "csharp/undici" | "csharp/nsurlsession" | "csharp/cohttp" | "csharp/curl" | "csharp/guzzle" | "csharp/restmethod" | "csharp/webrequest" | "csharp/python3" | "csharp/requests" | "csharp/httpx_sync" | "csharp/httpx_async" | "csharp/httr" | "csharp/reqwest" | "csharp/httpie" | "csharp/wget" | "dart/libcurl" | "dart/clj_http" | "dart/httpclient" | "dart/restsharp" | "dart/http" | "dart/native" | "dart/http1.1" | "dart/asynchttp" | "dart/nethttp" | "dart/okhttp" | "dart/unirest" | "dart/axios" | "dart/fetch" | "dart/jquery" | "dart/ofetch" | "dart/xhr" | "dart/undici" | "dart/nsurlsession" | "dart/cohttp" | "dart/curl" | "dart/guzzle" | "dart/restmethod" | "dart/webrequest" | "dart/python3" | "dart/requests" | "dart/httpx_sync" | "dart/httpx_async" | "dart/httr" | "dart/reqwest" | "dart/httpie" | "dart/wget" | "fsharp/libcurl" | "fsharp/clj_http" | "fsharp/httpclient" | "fsharp/restsharp" | "fsharp/http" | "fsharp/native" | "fsharp/http1.1" | "fsharp/asynchttp" | "fsharp/nethttp" | "fsharp/okhttp" | "fsharp/unirest" | "fsharp/axios" | "fsharp/fetch" | "fsharp/jquery" | "fsharp/ofetch" | "fsharp/xhr" | "fsharp/undici" | "fsharp/nsurlsession" | "fsharp/cohttp" | "fsharp/curl" | "fsharp/guzzle" | "fsharp/restmethod" | "fsharp/webrequest" | "fsharp/python3" | "fsharp/requests" | "fsharp/httpx_sync" | "fsharp/httpx_async" | "fsharp/httr" | "fsharp/reqwest" | "fsharp/httpie" | "fsharp/wget" | "java/libcurl" | "java/clj_http" | "java/httpclient" | "java/restsharp" | "java/http" | "java/native" | "java/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "java/axios" | "java/fetch" | "java/jquery" | "java/ofetch" | "java/xhr" | "java/undici" | "java/nsurlsession" | "java/cohttp" | "java/curl" | "java/guzzle" | "java/restmethod" | "java/webrequest" | "java/python3" | "java/requests" | "java/httpx_sync" | "java/httpx_async" | "java/httr" | "java/reqwest" | "java/httpie" | "java/wget" | "js/libcurl" | "js/clj_http" | "js/httpclient" | "js/restsharp" | "js/http" | "js/native" | "js/http1.1" | "js/asynchttp" | "js/nethttp" | "js/okhttp" | "js/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "js/undici" | "js/nsurlsession" | "js/cohttp" | "js/curl" | "js/guzzle" | "js/restmethod" | "js/webrequest" | "js/python3" | "js/requests" | "js/httpx_sync" | "js/httpx_async" | "js/httr" | "js/reqwest" | "js/httpie" | "js/wget" | "kotlin/libcurl" | "kotlin/clj_http" | "kotlin/httpclient" | "kotlin/restsharp" | "kotlin/http" | "kotlin/native" | "kotlin/http1.1" | "kotlin/asynchttp" | "kotlin/nethttp" | "kotlin/okhttp" | "kotlin/unirest" | "kotlin/axios" | "kotlin/fetch" | "kotlin/jquery" | "kotlin/ofetch" | "kotlin/xhr" | "kotlin/undici" | "kotlin/nsurlsession" | "kotlin/cohttp" | "kotlin/curl" | "kotlin/guzzle" | "kotlin/restmethod" | "kotlin/webrequest" | "kotlin/python3" | "kotlin/requests" | "kotlin/httpx_sync" | "kotlin/httpx_async" | "kotlin/httr" | "kotlin/reqwest" | "kotlin/httpie" | "kotlin/wget" | "node/libcurl" | "node/clj_http" | "node/httpclient" | "node/restsharp" | "node/http" | "node/native" | "node/http1.1" | "node/asynchttp" | "node/nethttp" | "node/okhttp" | "node/unirest" | "node/axios" | "node/fetch" | "node/jquery" | "node/ofetch" | "node/xhr" | "node/undici" | "node/nsurlsession" | "node/cohttp" | "node/curl" | "node/guzzle" | "node/restmethod" | "node/webrequest" | "node/python3" | "node/requests" | "node/httpx_sync" | "node/httpx_async" | "node/httr" | "node/reqwest" | "node/httpie" | "node/wget" | "objc/libcurl" | "objc/clj_http" | "objc/httpclient" | "objc/restsharp" | "objc/http" | "objc/native" | "objc/http1.1" | "objc/asynchttp" | "objc/nethttp" | "objc/okhttp" | "objc/unirest" | "objc/axios" | "objc/fetch" | "objc/jquery" | "objc/ofetch" | "objc/xhr" | "objc/undici" | "objc/nsurlsession" | "objc/cohttp" | "objc/curl" | "objc/guzzle" | "objc/restmethod" | "objc/webrequest" | "objc/python3" | "objc/requests" | "objc/httpx_sync" | "objc/httpx_async" | "objc/httr" | "objc/reqwest" | "objc/httpie" | "objc/wget" | "ocaml/libcurl" | "ocaml/clj_http" | "ocaml/httpclient" | "ocaml/restsharp" | "ocaml/http" | "ocaml/native" | "ocaml/http1.1" | "ocaml/asynchttp" | "ocaml/nethttp" | "ocaml/okhttp" | "ocaml/unirest" | "ocaml/axios" | "ocaml/fetch" | "ocaml/jquery" | "ocaml/ofetch" | "ocaml/xhr" | "ocaml/undici" | "ocaml/nsurlsession" | "ocaml/cohttp" | "ocaml/curl" | "ocaml/guzzle" | "ocaml/restmethod" | "ocaml/webrequest" | "ocaml/python3" | "ocaml/requests" | "ocaml/httpx_sync" | "ocaml/httpx_async" | "ocaml/httr" | "ocaml/reqwest" | "ocaml/httpie" | "ocaml/wget" | "php/libcurl" | "php/clj_http" | "php/httpclient" | "php/restsharp" | "php/http" | "php/native" | "php/http1.1" | "php/asynchttp" | "php/nethttp" | "php/okhttp" | "php/unirest" | "php/axios" | "php/fetch" | "php/jquery" | "php/ofetch" | "php/xhr" | "php/undici" | "php/nsurlsession" | "php/cohttp" | "php/curl" | "php/guzzle" | "php/restmethod" | "php/webrequest" | "php/python3" | "php/requests" | "php/httpx_sync" | "php/httpx_async" | "php/httr" | "php/reqwest" | "php/httpie" | "php/wget" | "powershell/libcurl" | "powershell/clj_http" | "powershell/httpclient" | "powershell/restsharp" | "powershell/http" | "powershell/native" | "powershell/http1.1" | "powershell/asynchttp" | "powershell/nethttp" | "powershell/okhttp" | "powershell/unirest" | "powershell/axios" | "powershell/fetch" | "powershell/jquery" | "powershell/ofetch" | "powershell/xhr" | "powershell/undici" | "powershell/nsurlsession" | "powershell/cohttp" | "powershell/curl" | "powershell/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "powershell/python3" | "powershell/requests" | "powershell/httpx_sync" | "powershell/httpx_async" | "powershell/httr" | "powershell/reqwest" | "powershell/httpie" | "powershell/wget" | "python/libcurl" | "python/clj_http" | "python/httpclient" | "python/restsharp" | "python/http" | "python/native" | "python/http1.1" | "python/asynchttp" | "python/nethttp" | "python/okhttp" | "python/unirest" | "python/axios" | "python/fetch" | "python/jquery" | "python/ofetch" | "python/xhr" | "python/undici" | "python/nsurlsession" | "python/cohttp" | "python/curl" | "python/guzzle" | "python/restmethod" | "python/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "python/httr" | "python/reqwest" | "python/httpie" | "python/wget" | "ruby/libcurl" | "ruby/clj_http" | "ruby/httpclient" | "ruby/restsharp" | "ruby/http" | "ruby/native" | "ruby/http1.1" | "ruby/asynchttp" | "ruby/nethttp" | "ruby/okhttp" | "ruby/unirest" | "ruby/axios" | "ruby/fetch" | "ruby/jquery" | "ruby/ofetch" | "ruby/xhr" | "ruby/undici" | "ruby/nsurlsession" | "ruby/cohttp" | "ruby/curl" | "ruby/guzzle" | "ruby/restmethod" | "ruby/webrequest" | "ruby/python3" | "ruby/requests" | "ruby/httpx_sync" | "ruby/httpx_async" | "ruby/httr" | "ruby/reqwest" | "ruby/httpie" | "ruby/wget" | "shell/libcurl" | "shell/clj_http" | "shell/httpclient" | "shell/restsharp" | "shell/http" | "shell/native" | "shell/http1.1" | "shell/asynchttp" | "shell/nethttp" | "shell/okhttp" | "shell/unirest" | "shell/axios" | "shell/fetch" | "shell/jquery" | "shell/ofetch" | "shell/xhr" | "shell/undici" | "shell/nsurlsession" | "shell/cohttp" | "shell/curl" | "shell/guzzle" | "shell/restmethod" | "shell/webrequest" | "shell/python3" | "shell/requests" | "shell/httpx_sync" | "shell/httpx_async" | "shell/httr" | "shell/reqwest" | "shell/httpie" | "shell/wget" | "swift/libcurl" | "swift/clj_http" | "swift/httpclient" | "swift/restsharp" | "swift/http" | "swift/native" | "swift/http1.1" | "swift/asynchttp" | "swift/nethttp" | "swift/okhttp" | "swift/unirest" | "swift/axios" | "swift/fetch" | "swift/jquery" | "swift/ofetch" | "swift/xhr" | "swift/undici" | "swift/nsurlsession" | "swift/cohttp" | "swift/curl" | "swift/guzzle" | "swift/restmethod" | "swift/webrequest" | "swift/python3" | "swift/requests" | "swift/httpx_sync" | "swift/httpx_async" | "swift/httr" | "swift/reqwest" | "swift/httpie" | "swift/wget")[];
|
|
34
|
-
routing: {
|
|
35
|
-
basePath: string | undefined;
|
|
36
|
-
};
|
|
37
|
-
settings: {
|
|
38
|
-
proxyUrl: string | undefined;
|
|
39
|
-
searchKey: "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "c" | "r" | "x" | "y" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "n" | "o" | "t" | "v" | "w" | "z" | undefined;
|
|
40
|
-
baseServerUrl: string | undefined;
|
|
41
|
-
servers: any[] | undefined;
|
|
42
|
-
};
|
|
43
|
-
meta: any;
|
|
44
|
-
tagSort: "alpha" | import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodAny, import("zod").ZodAny], null>, import("zod").ZodNumber> | undefined;
|
|
45
|
-
operationsSorter: "alpha" | import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodAny, import("zod").ZodAny], null>, import("zod").ZodNumber> | "method" | undefined;
|
|
46
|
-
generateHeadingSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
|
|
47
|
-
slug: import("zod").ZodDefault<import("zod").ZodString>;
|
|
48
|
-
}, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
|
|
49
|
-
generateModelSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
|
|
50
|
-
name: import("zod").ZodDefault<import("zod").ZodString>;
|
|
51
|
-
}, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
|
|
52
|
-
generateOperationSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
|
|
53
|
-
path: import("zod").ZodString;
|
|
54
|
-
operationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
-
method: import("zod").ZodString;
|
|
56
|
-
summary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
-
}, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
|
|
58
|
-
generateTagSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
|
|
59
|
-
name: import("zod").ZodDefault<import("zod").ZodString>;
|
|
60
|
-
}, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
|
|
61
|
-
generateWebhookSlug: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
|
|
62
|
-
name: import("zod").ZodString;
|
|
63
|
-
method: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
-
}, import("zod/v4/core").$strip>], null>, import("zod").ZodString> | undefined;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=map-configuration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../src/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAK5E;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD1E,CAAA"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { mapHiddenClientsConfig } from "./map-hidden-clients-config.js";
|
|
2
|
-
const mapConfiguration = (config) => {
|
|
3
|
-
return {
|
|
4
|
-
"x-scalar-reference-config": {
|
|
5
|
-
title: config.title,
|
|
6
|
-
slug: config.slug,
|
|
7
|
-
features: {
|
|
8
|
-
// Feature toggles for UI elements and behaviors
|
|
9
|
-
showModels: !config.hideModels,
|
|
10
|
-
expandAllTagSections: config.defaultOpenAllTags,
|
|
11
|
-
persistAuthenticationState: config.persistAuth,
|
|
12
|
-
showDarkModeToggle: !config.hideDarkModeToggle,
|
|
13
|
-
showDownload: !config.hideDownloadButton,
|
|
14
|
-
showSearch: !config.hideSearch,
|
|
15
|
-
showSidebar: config.showSidebar,
|
|
16
|
-
showTestRequestButton: !config.hideTestRequestButton
|
|
17
|
-
},
|
|
18
|
-
appearance: {
|
|
19
|
-
// Appearance-related configuration
|
|
20
|
-
css: config.customCss,
|
|
21
|
-
favicon: config.favicon,
|
|
22
|
-
forceColorMode: config.forceDarkModeState,
|
|
23
|
-
initialColorMode: config.darkMode ? "dark" : void 0,
|
|
24
|
-
layout: config.layout,
|
|
25
|
-
loadDefaultFonts: config.withDefaultFonts,
|
|
26
|
-
theme: config.theme
|
|
27
|
-
},
|
|
28
|
-
httpClients: mapHiddenClientsConfig(config.hiddenClients),
|
|
29
|
-
routing: {
|
|
30
|
-
// Routing configuration
|
|
31
|
-
basePath: config.pathRouting?.basePath
|
|
32
|
-
},
|
|
33
|
-
settings: {
|
|
34
|
-
// Miscellaneous settings
|
|
35
|
-
proxyUrl: config.proxyUrl,
|
|
36
|
-
searchKey: config.searchHotKey,
|
|
37
|
-
baseServerUrl: config.baseServerURL,
|
|
38
|
-
servers: config.servers
|
|
39
|
-
},
|
|
40
|
-
meta: config.metaData,
|
|
41
|
-
// In memory configuration
|
|
42
|
-
tagSort: config.tagsSorter,
|
|
43
|
-
operationsSorter: config.operationsSorter,
|
|
44
|
-
generateHeadingSlug: config.generateHeadingSlug,
|
|
45
|
-
generateModelSlug: config.generateModelSlug,
|
|
46
|
-
generateOperationSlug: config.generateOperationSlug,
|
|
47
|
-
generateTagSlug: config.generateTagSlug,
|
|
48
|
-
generateWebhookSlug: config.generateWebhookSlug
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
mapConfiguration
|
|
54
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
import { type AvailableClients } from '@scalar/types/snippetz';
|
|
3
|
-
/**
|
|
4
|
-
* Map the old hiddenClients config to the new httpClients config.
|
|
5
|
-
* Filters out clients based on the configuration and returns the remaining clients.
|
|
6
|
-
*/
|
|
7
|
-
export declare const mapHiddenClientsConfig: (hiddenClients: ApiReferenceConfiguration["hiddenClients"]) => AvailableClients;
|
|
8
|
-
//# sourceMappingURL=map-hidden-clients-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-hidden-clients-config.d.ts","sourceRoot":"","sources":["../../src/helpers/map-hidden-clients-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAqB,KAAK,gBAAgB,EAAmB,MAAM,wBAAwB,CAAA;AAElG;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,eAAe,yBAAyB,CAAC,eAAe,CAAC,KAAG,gBAgElG,CAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { objectKeys } from "@scalar/helpers/object/object-keys";
|
|
2
|
-
import { AVAILABLE_CLIENTS, GROUPED_CLIENTS } from "@scalar/types/snippetz";
|
|
3
|
-
const mapHiddenClientsConfig = (hiddenClients) => {
|
|
4
|
-
if (hiddenClients === true) {
|
|
5
|
-
return [];
|
|
6
|
-
}
|
|
7
|
-
if (!hiddenClients || Array.isArray(hiddenClients) && hiddenClients.length === 0) {
|
|
8
|
-
return AVAILABLE_CLIENTS;
|
|
9
|
-
}
|
|
10
|
-
const visibleClientsSet = new Set(AVAILABLE_CLIENTS);
|
|
11
|
-
if (Array.isArray(hiddenClients)) {
|
|
12
|
-
for (const item of hiddenClients) {
|
|
13
|
-
const group = GROUPED_CLIENTS[item];
|
|
14
|
-
if (group) {
|
|
15
|
-
for (const client of group) {
|
|
16
|
-
visibleClientsSet.delete(`${item}/${client}`);
|
|
17
|
-
}
|
|
18
|
-
} else if (item.includes("/")) {
|
|
19
|
-
visibleClientsSet.delete(item);
|
|
20
|
-
} else {
|
|
21
|
-
for (const language of objectKeys(GROUPED_CLIENTS)) {
|
|
22
|
-
visibleClientsSet.delete(`${language}/${item}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
} else if (typeof hiddenClients === "object") {
|
|
27
|
-
for (const [targetId, clients] of Object.entries(hiddenClients)) {
|
|
28
|
-
if (clients === true) {
|
|
29
|
-
const group = GROUPED_CLIENTS[targetId];
|
|
30
|
-
if (group) {
|
|
31
|
-
for (const client of group) {
|
|
32
|
-
visibleClientsSet.delete(`${targetId}/${client}`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
} else if (Array.isArray(clients)) {
|
|
36
|
-
for (const client of clients) {
|
|
37
|
-
visibleClientsSet.delete(client);
|
|
38
|
-
visibleClientsSet.delete(`${targetId}/${client}`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return Array.from(visibleClientsSet);
|
|
44
|
-
};
|
|
45
|
-
export {
|
|
46
|
-
mapHiddenClientsConfig
|
|
47
|
-
};
|