@scalar/api-reference 1.25.128 → 1.26.0

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/browser/standalone.js +7981 -7915
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  5. package/dist/components/ApiReferenceLayout.vue2.js +1 -1
  6. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  7. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  8. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  9. package/dist/components/Content/Introduction/Introduction.vue2.js +45 -42
  10. package/dist/components/Content/Lazy/Loading.vue.js +15 -15
  11. package/dist/components/Content/Tag/{Endpoints.vue.d.ts → OperationsList.vue.d.ts} +1 -3
  12. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -0
  13. package/dist/components/Content/Tag/OperationsList.vue.js +7 -0
  14. package/dist/components/Content/Tag/OperationsList.vue2.js +62 -0
  15. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +9 -0
  16. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -0
  17. package/dist/components/Content/Tag/OperationsListItem.vue.js +7 -0
  18. package/dist/components/Content/Tag/OperationsListItem.vue2.js +66 -0
  19. package/dist/components/Content/Tag/Tag.vue.d.ts +4 -64
  20. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Tag/Tag.vue.js +87 -5
  22. package/dist/components/Content/Tag/Tag.vue2.js +2 -63
  23. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Tag/TagList.vue.js +11 -11
  25. package/dist/components/Content/Tag/TagSection.vue.d.ts +70 -0
  26. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -0
  27. package/dist/components/Content/Tag/TagSection.vue.js +7 -0
  28. package/dist/components/Content/Tag/TagSection.vue2.js +65 -0
  29. package/dist/components/Content/Tag/index.d.ts +1 -2
  30. package/dist/components/Content/Tag/index.d.ts.map +1 -1
  31. package/dist/features/ApiClientModal/useApiClient.d.ts +30 -10
  32. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  33. package/dist/features/BaseUrl/BaseUrl.vue.js +31 -30
  34. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  35. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  38. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +54 -54
  39. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  40. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  41. package/dist/features/Operation/layouts/ModernLayout.vue2.js +65 -67
  42. package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
  43. package/dist/features/TestRequestButton/TestRequestButton.vue2.js +16 -14
  44. package/dist/helpers/get-request.d.ts +1 -0
  45. package/dist/helpers/get-request.d.ts.map +1 -1
  46. package/dist/helpers/index.d.ts +0 -1
  47. package/dist/helpers/index.d.ts.map +1 -1
  48. package/dist/hooks/useConfig.d.ts +3 -3
  49. package/dist/hooks/useConfig.d.ts.map +1 -1
  50. package/dist/hooks/useConfig.js +7 -4
  51. package/dist/hooks/useNavState.js +38 -38
  52. package/dist/hooks/useReactiveSpec.d.ts +8 -8
  53. package/dist/hooks/useSidebar.d.ts.map +1 -1
  54. package/dist/hooks/useSidebar.js +126 -116
  55. package/dist/index.js +55 -59
  56. package/dist/libs/operation.d.ts +15 -0
  57. package/dist/libs/operation.d.ts.map +1 -0
  58. package/dist/libs/operation.js +16 -0
  59. package/dist/stores/useHttpClientStore.d.ts +1 -1
  60. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  61. package/dist/style.css +1 -1
  62. package/dist/types.d.ts +1 -1
  63. package/dist/types.d.ts.map +1 -1
  64. package/package.json +13 -14
  65. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +0 -1
  66. package/dist/components/Content/Tag/Endpoints.vue.js +0 -7
  67. package/dist/components/Content/Tag/Endpoints.vue2.js +0 -161
  68. package/dist/helpers/operation.d.ts +0 -14
  69. package/dist/helpers/operation.d.ts.map +0 -1
  70. package/dist/helpers/operation.js +0 -18
  71. package/dist/standalone/lib/html-rendering.d.ts +0 -50
  72. package/dist/standalone/lib/html-rendering.d.ts.map +0 -1
  73. package/dist/standalone/lib/html-rendering.js +0 -64
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { HarRequest } from '@scalar/snippetz/types';
2
1
  import type { ThemeId } from '@scalar/themes';
3
2
  import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
4
3
  import type { ContentType, ReferenceConfiguration, Spec } from '@scalar/types/legacy';
4
+ import type { HarRequest } from '@scalar/types/snippetz';
5
5
  import type { Slot } from 'vue';
6
6
  export type { ApiReferenceConfiguration };
7
7
  export type { ReferenceConfiguration };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AACrF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/B,YAAY,EAAE,yBAAyB,EAAE,CAAA;AAEzC,YAAY,EAAE,sBAAsB,EAAE,CAAA;AAEtC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,aA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AAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC5C,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEtD,yDAAyD;AACzD,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAA;AAEpC,MAAM,MAAM,cAAc,GAAG;KAE1B,CAAC,IAAI,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAClD,CAAA;AAED,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,aAAa,GACb,eAAe,GACf,aAAa,CAAA;AAEjB,MAAM,MAAM,oBAAoB,GAAG;KAChC,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;IACxC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACzC,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5B,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5B,CAAC,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC5B,CAAA"}
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.25.128",
23
+ "version": "1.26.0",
24
24
  "engines": {
25
25
  "node": ">=18"
26
26
  },
@@ -30,8 +30,7 @@
30
30
  "exports": {
31
31
  ".": "./dist/index.js",
32
32
  "./style.css": "./dist/style.css",
33
- "./browser/standalone.js": "./dist/browser/standalone.js",
34
- "./lib/html-rendering": "./dist/standalone/lib/html-rendering.js"
33
+ "./browser/standalone.js": "./dist/browser/standalone.js"
35
34
  },
36
35
  "files": [
37
36
  "dist",
@@ -56,16 +55,16 @@
56
55
  "nanoid": "^5.0.9",
57
56
  "vue": "^3.5.12",
58
57
  "zod": "^3.23.8",
59
- "@scalar/code-highlight": "0.0.23",
60
- "@scalar/api-client": "2.2.57",
61
- "@scalar/components": "0.13.29",
62
- "@scalar/openapi-types": "0.1.9",
58
+ "@scalar/components": "0.13.32",
59
+ "@scalar/api-client": "2.2.60",
60
+ "@scalar/code-highlight": "0.0.24",
61
+ "@scalar/oas-utils": "0.2.114",
62
+ "@scalar/snippetz": "0.2.16",
63
63
  "@scalar/openapi-parser": "0.10.9",
64
- "@scalar/snippetz": "0.2.15",
65
- "@scalar/oas-utils": "0.2.111",
66
- "@scalar/themes": "0.9.72",
67
- "@scalar/use-hooks": "0.1.26",
68
- "@scalar/types": "0.0.37",
64
+ "@scalar/openapi-types": "0.1.9",
65
+ "@scalar/themes": "0.9.74",
66
+ "@scalar/types": "0.0.39",
67
+ "@scalar/use-hooks": "0.1.28",
69
68
  "@scalar/use-toasts": "0.7.9"
70
69
  },
71
70
  "devDependencies": {
@@ -80,8 +79,8 @@
80
79
  "vite-plugin-banner": "^0.7.1",
81
80
  "vite-plugin-css-injected-by-js": "^3.4.0",
82
81
  "vitest": "^1.6.0",
83
- "@scalar/galaxy": "0.2.23",
84
- "@scalar/build-tooling": "0.1.16"
82
+ "@scalar/galaxy": "0.2.24",
83
+ "@scalar/build-tooling": "0.1.17"
85
84
  },
86
85
  "scripts": {
87
86
  "analyze:default": "pnpm dlx vite-bundle-visualizer",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Endpoints.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/Endpoints.vue"],"names":[],"mappings":"AA6JA,OAAO,KAAK,EAAE,GAAG,EAAwB,MAAM,sBAAsB,CAAA;AAqBrE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA4PF,wBAOG"}
@@ -1,7 +0,0 @@
1
- import o from "./Endpoints.vue2.js";
2
- /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f24da23a"]]);
5
- export {
6
- f as default
7
- };
@@ -1,161 +0,0 @@
1
- import { defineComponent as b, computed as I, openBlock as n, createBlock as s, unref as e, withCtx as a, createVNode as o, createTextVNode as d, toDisplayString as i, createCommentVNode as f, createElementVNode as c, createElementBlock as C, Fragment as H, renderList as V, withModifiers as w, normalizeClass as B } from "vue";
2
- import { ScalarMarkdown as E } from "@scalar/components";
3
- import { isOperationDeprecated as T } from "../../../helpers/operation.js";
4
- import h from "../../ScreenReader.vue.js";
5
- import $ from "../../Section/Section.vue.js";
6
- import O from "../../Section/SectionHeader.vue.js";
7
- import D from "../../Anchor/Anchor.vue.js";
8
- import k from "../../Section/SectionHeaderTag.vue.js";
9
- import M from "../../Section/SectionContent.vue.js";
10
- import z from "../../Section/SectionColumns.vue.js";
11
- import S from "../../Section/SectionColumn.vue.js";
12
- import A from "../../Card/Card.vue.js";
13
- import F from "../../Card/CardHeader.vue.js";
14
- import L from "../../Card/CardContent.vue.js";
15
- import R from "../../HttpMethod/HttpMethod.vue.js";
16
- import { useNavState as U } from "../../../hooks/useNavState.js";
17
- import { useSidebar as j } from "../../../hooks/useSidebar.js";
18
- const q = ["aria-label"], G = ["href", "onClick"], ie = /* @__PURE__ */ b({
19
- __name: "Endpoints",
20
- props: {
21
- id: {},
22
- tag: {},
23
- headerId: {},
24
- isCollapsed: { type: Boolean }
25
- },
26
- setup(v) {
27
- const m = v, { getOperationId: p, getTagId: y } = U(), { scrollToOperation: _ } = j(), u = I(() => m.tag["x-displayName"] ?? m.tag.name), N = async (t) => {
28
- const r = p(t, m.tag);
29
- _(r);
30
- };
31
- return (t, r) => (n(), s(e($), {
32
- id: t.id,
33
- label: t.tag.name.toUpperCase(),
34
- role: "none"
35
- }, {
36
- default: a(() => [
37
- o(e(O), null, {
38
- default: a(() => [
39
- o(e(D), {
40
- id: e(y)(t.tag)
41
- }, {
42
- default: a(() => [
43
- o(e(k), {
44
- id: t.headerId,
45
- level: 2
46
- }, {
47
- default: a(() => [
48
- d(i(u.value) + " ", 1),
49
- t.isCollapsed ? (n(), s(h, { key: 0 }, {
50
- default: a(() => r[0] || (r[0] = [
51
- d(" (Collapsed)")
52
- ])),
53
- _: 1
54
- })) : f("", !0)
55
- ]),
56
- _: 1
57
- }, 8, ["id"])
58
- ]),
59
- _: 1
60
- }, 8, ["id"])
61
- ]),
62
- _: 1
63
- }),
64
- o(e(M), null, {
65
- default: a(() => [
66
- o(e(z), null, {
67
- default: a(() => [
68
- o(e(S), null, {
69
- default: a(() => [
70
- o(e(E), {
71
- clamp: t.isCollapsed ? "7" : !1,
72
- value: t.tag.description,
73
- withImages: ""
74
- }, null, 8, ["clamp", "value"])
75
- ]),
76
- _: 1
77
- }),
78
- o(e(S), null, {
79
- default: a(() => {
80
- var g;
81
- return [
82
- ((g = t.tag.operations) == null ? void 0 : g.length) > 0 ? (n(), s(e(A), {
83
- key: 0,
84
- class: "scalar-card-sticky"
85
- }, {
86
- default: a(() => [
87
- o(e(F), { muted: "" }, {
88
- default: a(() => [
89
- o(h, null, {
90
- default: a(() => [
91
- d(i(u.value), 1)
92
- ]),
93
- _: 1
94
- }),
95
- r[1] || (r[1] = d(" Endpoints "))
96
- ]),
97
- _: 1
98
- }),
99
- o(e(L), {
100
- class: "custom-scroll",
101
- muted: ""
102
- }, {
103
- default: a(() => [
104
- c("ul", {
105
- "aria-label": `${u.value} endpoints`,
106
- class: "endpoints"
107
- }, [
108
- (n(!0), C(H, null, V(t.tag.operations, (l) => (n(), C("li", {
109
- key: e(p)(l, t.tag),
110
- class: "contents"
111
- }, [
112
- t.isCollapsed ? (n(), s(e(k), {
113
- key: 0,
114
- class: "sr-only",
115
- level: 3
116
- }, {
117
- default: a(() => [
118
- d(i(l.name) + " (Hidden) ", 1)
119
- ]),
120
- _: 2
121
- }, 1024)) : f("", !0),
122
- c("a", {
123
- class: "endpoint",
124
- href: `#${e(p)(l, t.tag)}`,
125
- onClick: w((J) => N(l), ["prevent"])
126
- }, [
127
- o(e(R), {
128
- method: l.httpVerb
129
- }, null, 8, ["method"]),
130
- c("span", {
131
- class: B(["endpoint-path", {
132
- deprecated: e(T)(l)
133
- }])
134
- }, i(l.path), 3)
135
- ], 8, G)
136
- ]))), 128))
137
- ], 8, q)
138
- ]),
139
- _: 1
140
- })
141
- ]),
142
- _: 1
143
- })) : f("", !0)
144
- ];
145
- }),
146
- _: 1
147
- })
148
- ]),
149
- _: 1
150
- })
151
- ]),
152
- _: 1
153
- })
154
- ]),
155
- _: 1
156
- }, 8, ["id", "label"]));
157
- }
158
- });
159
- export {
160
- ie as default
161
- };
@@ -1,14 +0,0 @@
1
- import { type Operation, XScalarStability } from '@scalar/types/legacy';
2
- /**
3
- * Returns if an operation is considered deprecated.
4
- */
5
- export declare function isOperationDeprecated(operation: Operation): boolean;
6
- /**
7
- * Get operation stability.
8
- */
9
- export declare function getOperationStability(operation: Operation): XScalarStability | undefined;
10
- /**
11
- * Get Operation stability color
12
- */
13
- export declare function getOperationStabilityColor(operation: Operation): string;
14
- //# sourceMappingURL=operation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/helpers/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAQnE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAGxF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAMvE"}
@@ -1,18 +0,0 @@
1
- import { XScalarStability as i } from "@scalar/types/legacy";
2
- function f(t) {
3
- var e, r, a;
4
- return ((e = t.information) == null ? void 0 : e.deprecated) !== void 0 ? (r = t.information) == null ? void 0 : r.deprecated : !!((a = t.information) != null && a["x-scalar-stability"] && t.information["x-scalar-stability"] === i.Deprecated);
5
- }
6
- function n(t) {
7
- var e, r;
8
- return (e = t.information) != null && e.deprecated ? i.Deprecated : (r = t.information) == null ? void 0 : r["x-scalar-stability"];
9
- }
10
- function c(t) {
11
- const e = n(t);
12
- return e === i.Deprecated ? "text-red" : e === i.Experimental ? "text-orange" : e === i.Stable ? "text-green" : "";
13
- }
14
- export {
15
- n as getOperationStability,
16
- c as getOperationStabilityColor,
17
- f as isOperationDeprecated
18
- };
@@ -1,50 +0,0 @@
1
- import { type ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
- import { z } from 'zod';
3
- /**
4
- * Zod schema for HTML rendering configuration
5
- */
6
- export declare const htmlRenderingOptionsSchema: z.ZodObject<{
7
- /**
8
- * The URL to the Scalar API Reference JS CDN.
9
- *
10
- * Use this to pin a specific version of the Scalar API Reference.
11
- *
12
- * @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
13
- *
14
- * @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
15
- */
16
- cdn: z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
- /**
18
- * The title of the page.
19
- */
20
- pageTitle: z.ZodDefault<z.ZodOptional<z.ZodString>>;
21
- }, "strip", z.ZodTypeAny, {
22
- cdn: string;
23
- pageTitle: string;
24
- }, {
25
- cdn?: string | undefined;
26
- pageTitle?: string | undefined;
27
- }>;
28
- type HtmlRenderingOptions = z.infer<typeof htmlRenderingOptionsSchema>;
29
- export type HtmlRenderingConfiguration = ApiReferenceConfiguration & HtmlRenderingOptions;
30
- /**
31
- * The HTML document to render the Scalar API reference.
32
- *
33
- * We must check the passed in configuration and not the parsedConfig for the theme as the parsedConfig will have it
34
- * defaulted to 'default'
35
- */
36
- export declare const getHtmlDocument: (configuration: Partial<HtmlRenderingConfiguration>, customTheme?: string) => string;
37
- /**
38
- * The script tags to load the @scalar/api-reference package from the CDN.
39
- */
40
- export declare function getScriptTags(configuration: ApiReferenceConfiguration, cdn: string): string;
41
- /**
42
- * The configuration to pass to the @scalar/api-reference package.
43
- */
44
- export declare const getConfiguration: (givenConfiguration: ApiReferenceConfiguration) => string;
45
- /**
46
- * The content to pass to the @scalar/api-reference package as the <script> tag content.
47
- */
48
- export declare const getScriptTagContent: (configuration: ApiReferenceConfiguration) => string;
49
- export {};
50
- //# sourceMappingURL=html-rendering.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-rendering.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,0BAA0B;IACrC;;;;;;;;OAQG;;IAEH;;OAEG;;;;;;;;EAEH,CAAA;AACF,KAAK,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEtE,MAAM,MAAM,0BAA0B,GAAG,yBAAyB,GAAG,oBAAoB,CAAA;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,kBAAmB,OAAO,CAAC,0BAA0B,CAAC,iCAuBjF,CAAA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,UAQlF;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,uBAAwB,yBAAyB,WAa7E,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,kBAAmB,yBAAyB,WAKpE,CAAA"}
@@ -1,64 +0,0 @@
1
- import { apiReferenceConfigurationSchema as o } from "@scalar/types/api-reference";
2
- import { z as s } from "zod";
3
- const a = s.object({
4
- /**
5
- * The URL to the Scalar API Reference JS CDN.
6
- *
7
- * Use this to pin a specific version of the Scalar API Reference.
8
- *
9
- * @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
10
- *
11
- * @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
12
- */
13
- cdn: s.string().optional().default("https://cdn.jsdelivr.net/npm/@scalar/api-reference"),
14
- /**
15
- * The title of the page.
16
- */
17
- pageTitle: s.string().optional().default("Scalar API Reference")
18
- }), h = (e, t = "") => {
19
- const { cdn: n, pageTitle: c, ...i } = e, r = a.parse({ cdn: n, pageTitle: c, customTheme: t }), p = o.parse(i);
20
- return `
21
- <!DOCTYPE html>
22
- <html>
23
- <head>
24
- <title>${r.pageTitle}</title>
25
- <meta charset="utf-8" />
26
- <meta
27
- name="viewport"
28
- content="width=device-width, initial-scale=1" />
29
- <style>
30
- ${e.theme ? "" : t}
31
- </style>
32
- </head>
33
- <body>
34
- ${l(p, r.cdn)}
35
- </body>
36
- </html>
37
- `;
38
- };
39
- function l(e, t) {
40
- return `
41
- <script
42
- id="api-reference"
43
- type="application/json"
44
- data-configuration="${d(e)}">${f(e)}<\/script>
45
- <script src="${t}"><\/script>
46
- `;
47
- }
48
- const d = (e) => {
49
- var n, c, i;
50
- const t = {
51
- ...e
52
- };
53
- return (n = t.spec) != null && n.url ? (c = t.spec) != null && c.content && ((i = t.spec) == null || delete i.content) : delete t.spec, JSON.stringify(t).split('"').join("&quot;");
54
- }, f = (e) => {
55
- var t, n, c, i;
56
- return (t = e.spec) != null && t.content ? typeof ((n = e.spec) == null ? void 0 : n.content) == "function" ? JSON.stringify((c = e.spec) == null ? void 0 : c.content()) : JSON.stringify((i = e.spec) == null ? void 0 : i.content) : "";
57
- };
58
- export {
59
- d as getConfiguration,
60
- h as getHtmlDocument,
61
- f as getScriptTagContent,
62
- l as getScriptTags,
63
- a as htmlRenderingOptionsSchema
64
- };