@scalar/api-reference 1.25.127 → 1.25.130
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 +67 -0
- package/dist/browser/standalone.js +13272 -13158
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +40 -64
- package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +158 -159
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +69 -17
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +5 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientSelector.vue2.js +73 -94
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts +16 -0
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.d.ts.map +1 -0
- package/dist/components/Content/ClientLibraries/useFeaturedHttpClients.js +36 -0
- package/dist/components/Content/Lazy/Loading.vue.js +15 -15
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +4 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +143 -124
- package/dist/components/Content/Tag/{Endpoints.vue.d.ts → OperationsList.vue.d.ts} +1 -3
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -0
- package/dist/components/Content/Tag/OperationsList.vue.js +7 -0
- package/dist/components/Content/Tag/OperationsList.vue2.js +62 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +9 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.js +7 -0
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +66 -0
- package/dist/components/Content/Tag/Tag.vue.d.ts +4 -64
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +87 -5
- package/dist/components/Content/Tag/Tag.vue2.js +2 -63
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +11 -11
- package/dist/components/Content/Tag/TagSection.vue.d.ts +70 -0
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -0
- package/dist/components/Content/Tag/TagSection.vue.js +7 -0
- package/dist/components/Content/Tag/TagSection.vue2.js +65 -0
- package/dist/components/Content/Tag/index.d.ts +1 -2
- package/dist/components/Content/Tag/index.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/GettingStarted.vue2.js +13 -13
- package/dist/components/Layouts/ClassicLayout.vue.d.ts +3 -3
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/Layouts.vue.d.ts +3 -3
- package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.d.ts +3 -3
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +30 -29
- package/dist/esm.d.ts +5 -3
- package/dist/esm.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +386 -346
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +82 -74
- package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponse.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponse.vue2.js +11 -11
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +90 -78
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue2.js +29 -25
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +40 -47
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +54 -54
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +65 -67
- package/dist/helpers/get-request.d.ts +2 -1
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts +3 -3
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useConfig.js +5 -4
- package/dist/hooks/useReactiveSpec.d.ts +8 -8
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +126 -116
- package/dist/index.js +56 -62
- package/dist/libs/operation.d.ts +15 -0
- package/dist/libs/operation.d.ts.map +1 -0
- package/dist/libs/operation.js +16 -0
- package/dist/standalone/lib/html-api.d.ts +3 -3
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/stores/useHttpClientStore.d.ts +1 -1
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +20 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/Endpoints.vue.js +0 -7
- package/dist/components/Content/Tag/Endpoints.vue2.js +0 -161
- package/dist/helpers/operation.d.ts +0 -14
- package/dist/helpers/operation.d.ts.map +0 -1
- package/dist/helpers/operation.js +0 -18
- package/dist/hooks/useDeprecationWarnings.d.ts +0 -6
- package/dist/hooks/useDeprecationWarnings.d.ts.map +0 -1
- package/dist/hooks/useDeprecationWarnings.js +0 -20
- package/dist/standalone/lib/html-rendering.d.ts +0 -51
- package/dist/standalone/lib/html-rendering.d.ts.map +0 -1
- package/dist/standalone/lib/html-rendering.js +0 -54
package/dist/types.d.ts
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
|
-
import type { HarRequest } from '@scalar/snippetz/types';
|
|
2
1
|
import type { ThemeId } from '@scalar/themes';
|
|
2
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
3
3
|
import type { ContentType, ReferenceConfiguration, Spec } from '@scalar/types/legacy';
|
|
4
|
+
import type { HarRequest } from '@scalar/types/snippetz';
|
|
4
5
|
import type { Slot } from 'vue';
|
|
6
|
+
export type { ApiReferenceConfiguration };
|
|
5
7
|
export type { ReferenceConfiguration };
|
|
8
|
+
/**
|
|
9
|
+
* Props for the ApiReference components, coming from user input
|
|
10
|
+
*/
|
|
6
11
|
export type ReferenceProps = {
|
|
7
|
-
configuration?: ReferenceConfiguration;
|
|
12
|
+
configuration?: Partial<ApiReferenceConfiguration> | ReferenceConfiguration;
|
|
8
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Before the configuration is parsed, we can use the broader types.
|
|
16
|
+
*/
|
|
9
17
|
export type ReferenceLayoutProps = {
|
|
10
|
-
configuration: ReferenceConfiguration;
|
|
18
|
+
configuration: Partial<ApiReferenceConfiguration> | ReferenceConfiguration;
|
|
19
|
+
parsedSpec: Spec;
|
|
20
|
+
rawSpec: string;
|
|
21
|
+
isDark: boolean;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* After the configuration is parsed, we can use the stricter types.
|
|
25
|
+
*/
|
|
26
|
+
export type InternalReferenceProps = {
|
|
27
|
+
configuration: ApiReferenceConfiguration;
|
|
11
28
|
parsedSpec: Spec;
|
|
12
29
|
rawSpec: string;
|
|
13
30
|
isDark: boolean;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO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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.
|
|
23
|
+
"version": "1.25.130",
|
|
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",
|
|
@@ -55,17 +54,18 @@
|
|
|
55
54
|
"github-slugger": "^2.0.0",
|
|
56
55
|
"nanoid": "^5.0.9",
|
|
57
56
|
"vue": "^3.5.12",
|
|
58
|
-
"
|
|
57
|
+
"zod": "^3.23.8",
|
|
58
|
+
"@scalar/api-client": "2.2.59",
|
|
59
59
|
"@scalar/code-highlight": "0.0.23",
|
|
60
|
-
"@scalar/components": "0.13.
|
|
60
|
+
"@scalar/components": "0.13.31",
|
|
61
61
|
"@scalar/openapi-parser": "0.10.9",
|
|
62
|
+
"@scalar/oas-utils": "0.2.113",
|
|
63
|
+
"@scalar/snippetz": "0.2.16",
|
|
62
64
|
"@scalar/openapi-types": "0.1.9",
|
|
63
|
-
"@scalar/
|
|
64
|
-
"@scalar/
|
|
65
|
-
"@scalar/
|
|
66
|
-
"@scalar/
|
|
67
|
-
"@scalar/use-hooks": "0.1.25",
|
|
68
|
-
"@scalar/use-toasts": "0.7.9"
|
|
65
|
+
"@scalar/types": "0.0.39",
|
|
66
|
+
"@scalar/use-toasts": "0.7.9",
|
|
67
|
+
"@scalar/themes": "0.9.74",
|
|
68
|
+
"@scalar/use-hooks": "0.1.28"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"vite-plugin-banner": "^0.7.1",
|
|
80
80
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
81
81
|
"vitest": "^1.6.0",
|
|
82
|
-
"@scalar/
|
|
83
|
-
"@scalar/
|
|
82
|
+
"@scalar/galaxy": "0.2.24",
|
|
83
|
+
"@scalar/build-tooling": "0.1.16"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
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,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,6 +0,0 @@
|
|
|
1
|
-
import type { ReferenceConfiguration } from '@scalar/types/legacy';
|
|
2
|
-
/**
|
|
3
|
-
* Warns the user about deprecated configurations in the browser console.
|
|
4
|
-
*/
|
|
5
|
-
export declare function useDeprecationWarnings(configuration: ReferenceConfiguration): void;
|
|
6
|
-
//# sourceMappingURL=useDeprecationWarnings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDeprecationWarnings.d.ts","sourceRoot":"","sources":["../../src/hooks/useDeprecationWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,QA4B3E"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { watch as t } from "vue";
|
|
2
|
-
const o = "https://api.scalar.com/request-proxy", r = "https://proxy.scalar.com";
|
|
3
|
-
function p(e) {
|
|
4
|
-
t(
|
|
5
|
-
() => e,
|
|
6
|
-
() => {
|
|
7
|
-
e.proxy && console.warn(
|
|
8
|
-
"[DEPRECATED] You’re using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package."
|
|
9
|
-
), (e.proxyUrl || e.proxy) === o && (console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${o}).`), console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${r}) instead.`), delete e.proxy, e.proxyUrl = r, console.warn(
|
|
10
|
-
`[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${r}). Read more: https://github.com/scalar/scalar`
|
|
11
|
-
));
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
immediate: !0
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
p as useDeprecationWarnings
|
|
20
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { ReferenceConfiguration } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* The CDN configuration for the Scalar API Reference.
|
|
4
|
-
*/
|
|
5
|
-
export type CdnConfiguration = {
|
|
6
|
-
/**
|
|
7
|
-
* The URL to the Scalar API Reference JS CDN.
|
|
8
|
-
*
|
|
9
|
-
* Use this to pin a specific version of the Scalar API Reference.
|
|
10
|
-
*
|
|
11
|
-
* @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
|
|
12
|
-
*
|
|
13
|
-
* @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
|
|
14
|
-
*/
|
|
15
|
-
cdn?: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* The page title configuration for the Scalar API Reference.
|
|
19
|
-
*/
|
|
20
|
-
export type PageTitleConfiguration = {
|
|
21
|
-
/**
|
|
22
|
-
* The title of the page.
|
|
23
|
-
*/
|
|
24
|
-
pageTitle?: string;
|
|
25
|
-
};
|
|
26
|
-
export type HtmlRenderingConfiguration = ReferenceConfiguration & CdnConfiguration & PageTitleConfiguration;
|
|
27
|
-
/**
|
|
28
|
-
* The HTML document to render the Scalar API reference.
|
|
29
|
-
*/
|
|
30
|
-
export declare function getHtmlDocument(configuration: HtmlRenderingConfiguration, customTheme?: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* The script tags to load the @scalar/api-reference package from the CDN.
|
|
33
|
-
*/
|
|
34
|
-
export declare function getScriptTags(configuration: HtmlRenderingConfiguration): string;
|
|
35
|
-
/**
|
|
36
|
-
* The configuration to pass to the @scalar/api-reference package.
|
|
37
|
-
*/
|
|
38
|
-
export declare function getConfiguration(givenConfiguration: HtmlRenderingConfiguration): string;
|
|
39
|
-
/**
|
|
40
|
-
* The content to pass to the @scalar/api-reference package as the <script> tag content.
|
|
41
|
-
*/
|
|
42
|
-
export declare function getScriptTagContent(configuration: HtmlRenderingConfiguration): string;
|
|
43
|
-
/**
|
|
44
|
-
* The CDN URL to load the @scalar/api-reference package from.
|
|
45
|
-
*/
|
|
46
|
-
export declare function getCdnUrl(configuration: HtmlRenderingConfiguration): string;
|
|
47
|
-
/**
|
|
48
|
-
* The page title for the Scalar API Reference.
|
|
49
|
-
*/
|
|
50
|
-
export declare function getPageTitle(configuration: HtmlRenderingConfiguration): string;
|
|
51
|
-
//# 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,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,sBAAsB,CAAA;AAE3G;;GAEG;AACH,wBAAgB,eAAe,CAAC,aAAa,EAAE,0BAA0B,EAAE,WAAW,CAAC,EAAE,MAAM,UAmB9F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,0BAA0B,UAQtE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,kBAAkB,EAAE,0BAA0B,UAa9E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,0BAA0B,UAM5E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,aAAa,EAAE,0BAA0B,UAElE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,0BAA0B,UAErE"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
function o(t, e) {
|
|
2
|
-
return `
|
|
3
|
-
<!DOCTYPE html>
|
|
4
|
-
<html>
|
|
5
|
-
<head>
|
|
6
|
-
<title>${a(t)}</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<meta
|
|
9
|
-
name="viewport"
|
|
10
|
-
content="width=device-width, initial-scale=1" />
|
|
11
|
-
<style>
|
|
12
|
-
${t.theme ? null : e ?? ""}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
${r(t)}
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
19
|
-
`;
|
|
20
|
-
}
|
|
21
|
-
function r(t) {
|
|
22
|
-
return `
|
|
23
|
-
<script
|
|
24
|
-
id="api-reference"
|
|
25
|
-
type="application/json"
|
|
26
|
-
data-configuration="${s(t)}">${p(t)}<\/script>
|
|
27
|
-
<script src="${l(t)}"><\/script>
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
function s(t) {
|
|
31
|
-
var n, c, i;
|
|
32
|
-
const e = {
|
|
33
|
-
...t
|
|
34
|
-
};
|
|
35
|
-
return (n = e.spec) != null && n.url ? (c = e.spec) != null && c.content && ((i = e.spec) == null || delete i.content) : delete e.spec, JSON.stringify(e).split('"').join(""");
|
|
36
|
-
}
|
|
37
|
-
function p(t) {
|
|
38
|
-
var e, n, c, i;
|
|
39
|
-
return (e = t.spec) != null && e.content ? typeof ((n = t.spec) == null ? void 0 : n.content) == "function" ? JSON.stringify((c = t.spec) == null ? void 0 : c.content()) : JSON.stringify((i = t.spec) == null ? void 0 : i.content) : "";
|
|
40
|
-
}
|
|
41
|
-
function l(t) {
|
|
42
|
-
return t.cdn || "https://cdn.jsdelivr.net/npm/@scalar/api-reference";
|
|
43
|
-
}
|
|
44
|
-
function a(t) {
|
|
45
|
-
return t.pageTitle || "Scalar API Reference";
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
l as getCdnUrl,
|
|
49
|
-
s as getConfiguration,
|
|
50
|
-
o as getHtmlDocument,
|
|
51
|
-
a as getPageTitle,
|
|
52
|
-
p as getScriptTagContent,
|
|
53
|
-
r as getScriptTags
|
|
54
|
-
};
|