@scalar/api-reference 1.28.5 → 1.28.7
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 +41 -0
- package/dist/browser/standalone.js +6284 -6218
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +26 -15
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +128 -129
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +57 -55
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Description.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +24 -24
- package/dist/components/Content/Lazy/Lazy.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +4 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +18 -17
- package/dist/components/Content/Schema/Schema.vue.d.ts +1 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +4 -4
- package/dist/components/Content/Schema/Schema.vue2.js +79 -67
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +12 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +109 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue2.js +26 -31
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +143 -141
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +83 -99
- package/dist/components/Content/Tag/OperationsList.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsList.vue2.js +3 -3
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +41 -36
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +38 -36
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +3 -3
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +2 -1
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +40 -39
- package/dist/esm.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +2 -4
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +2 -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 +2 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +6 -8
- package/dist/features/Operation/Operation.vue.d.ts +2 -0
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +13 -10
- package/dist/features/Operation/Webhooks.vue.d.ts.map +1 -1
- package/dist/features/Operation/Webhooks.vue.js +2 -2
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +4 -4
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -0
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +15 -13
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +2 -2
- package/dist/features/Operation/components/ParameterList.vue2.js +14 -12
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +20 -18
- package/dist/features/Operation/components/RequestBody.vue.d.ts +2 -0
- 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/components/RequestBody.vue2.js +20 -18
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +2 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +2 -0
- 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 +29 -24
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +66 -56
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +2 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +9 -9
- package/dist/helpers/index.d.ts +4 -4
- package/dist/helpers/scrollToId.d.ts.map +1 -1
- package/dist/helpers/specHelpers.js +15 -14
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.d.ts +7 -2
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +43 -33
- package/dist/hooks/useNavState.d.ts +13 -4
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +52 -47
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +3 -2
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -76
- package/dist/libs/operation.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.d.ts +4 -4
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -10
- package/dist/helpers/getVariableNames.js +0 -7
- package/dist/helpers/hasSecuritySchemes.js +0 -7
- package/dist/helpers/mapFromObject.js +0 -7
- package/dist/helpers/mergeAllObjects.js +0 -7
- package/dist/hooks/useClientStore.d.ts +0 -2
- package/dist/hooks/useClientStore.d.ts.map +0 -1
- package/dist/hooks/useClientStore.js +0 -5
- package/dist/hooks/useRefOnMount.d.ts +0 -6
- package/dist/hooks/useRefOnMount.d.ts.map +0 -1
- package/dist/hooks/useRefOnMount.js +0 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
3
|
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
id?: string;
|
|
@@ -7,6 +8,7 @@ type __VLS_Props = {
|
|
|
7
8
|
operation: Operation;
|
|
8
9
|
/** @deprecated Use `operation` instead */
|
|
9
10
|
transformedOperation: TransformedOperation;
|
|
11
|
+
schemas?: OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject> | Record<string, OpenAPIV3_1.SchemaObject> | unknown;
|
|
10
12
|
};
|
|
11
13
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
14
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAiUA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAwBhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;AA2QF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClassicLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7af92164"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as C, computed as b, openBlock as
|
|
2
|
-
import { ScalarIcon as
|
|
1
|
+
import { defineComponent as C, computed as b, openBlock as r, createBlock as s, unref as e, createSlots as k, withCtx as a, createElementVNode as t, createVNode as i, toDisplayString as m, normalizeClass as O, createTextVNode as g, createCommentVNode as f, withModifiers as S } from "vue";
|
|
2
|
+
import { ScalarIcon as _, ScalarIconButton as B, ScalarMarkdown as R } from "@scalar/components";
|
|
3
3
|
import { useClipboard as w } from "@scalar/use-hooks/useClipboard";
|
|
4
4
|
import I from "../../../components/OperationPath.vue.js";
|
|
5
5
|
import { useConfig as N } from "../../../hooks/useConfig.js";
|
|
6
|
-
import { isOperationDeprecated as T, getOperationStability as
|
|
6
|
+
import { isOperationDeprecated as T, getOperationStability as h, getOperationStabilityColor as V } from "../../../libs/operation.js";
|
|
7
7
|
import $ from "../components/OperationParameters.vue.js";
|
|
8
8
|
import q from "../components/OperationResponses.vue.js";
|
|
9
9
|
import E from "../../../components/Section/SectionAccordion.vue.js";
|
|
@@ -20,18 +20,19 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
|
|
|
20
20
|
collection: {},
|
|
21
21
|
server: {},
|
|
22
22
|
operation: {},
|
|
23
|
-
transformedOperation: {}
|
|
23
|
+
transformedOperation: {},
|
|
24
|
+
schemas: {}
|
|
24
25
|
},
|
|
25
26
|
setup(p) {
|
|
26
|
-
const { copyToClipboard:
|
|
27
|
+
const { copyToClipboard: u } = w(), v = N(), y = b(() => p.operation.summary || p.operation.path);
|
|
27
28
|
return (o, l) => {
|
|
28
29
|
var d;
|
|
29
|
-
return
|
|
30
|
+
return r(), s(e(E), {
|
|
30
31
|
id: o.id,
|
|
31
32
|
class: "reference-endpoint",
|
|
32
33
|
transparent: ""
|
|
33
|
-
},
|
|
34
|
-
title:
|
|
34
|
+
}, k({
|
|
35
|
+
title: a(() => [
|
|
35
36
|
t("div", U, [
|
|
36
37
|
t("div", j, [
|
|
37
38
|
i(e(z), {
|
|
@@ -43,7 +44,7 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
|
|
|
43
44
|
id: o.id ?? "",
|
|
44
45
|
class: "endpoint-anchor"
|
|
45
46
|
}, {
|
|
46
|
-
default:
|
|
47
|
+
default: a(() => [
|
|
47
48
|
t("h3", F, [
|
|
48
49
|
t("div", G, [
|
|
49
50
|
i(I, {
|
|
@@ -52,12 +53,12 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
|
|
|
52
53
|
}, null, 8, ["deprecated", "path"])
|
|
53
54
|
]),
|
|
54
55
|
t("div", H, m(y.value), 1),
|
|
55
|
-
e(
|
|
56
|
+
e(h)(o.operation) ? (r(), s(e(D), {
|
|
56
57
|
key: 0,
|
|
57
|
-
class:
|
|
58
|
+
class: O(e(V)(o.operation))
|
|
58
59
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
60
|
+
default: a(() => [
|
|
61
|
+
g(m(e(h)(o.operation)), 1)
|
|
61
62
|
]),
|
|
62
63
|
_: 1
|
|
63
64
|
}, 8, ["class"])) : f("", !0)
|
|
@@ -68,13 +69,13 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
|
|
|
68
69
|
])
|
|
69
70
|
])
|
|
70
71
|
]),
|
|
71
|
-
actions:
|
|
72
|
+
actions: a(({ active: n }) => {
|
|
72
73
|
var c;
|
|
73
74
|
return [
|
|
74
|
-
|
|
75
|
+
n ? (r(), s(e(L), {
|
|
75
76
|
key: 0,
|
|
76
77
|
operation: o.operation
|
|
77
|
-
}, null, 8, ["operation"])) : (c = e(v)) != null && c.hideTestRequestButton ? f("", !0) : (
|
|
78
|
+
}, null, 8, ["operation"])) : (c = e(v)) != null && c.hideTestRequestButton ? f("", !0) : (r(), s(e(_), {
|
|
78
79
|
key: 1,
|
|
79
80
|
class: "endpoint-try-hint",
|
|
80
81
|
icon: "Play",
|
|
@@ -86,21 +87,25 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
|
|
|
86
87
|
label: "Copy endpoint URL",
|
|
87
88
|
size: "xs",
|
|
88
89
|
variant: "ghost",
|
|
89
|
-
onClick: l[0] || (l[0] =
|
|
90
|
+
onClick: l[0] || (l[0] = S((X) => e(u)(o.operation.path), ["stop"]))
|
|
90
91
|
})
|
|
91
92
|
];
|
|
92
93
|
}),
|
|
93
|
-
default:
|
|
94
|
+
default: a(() => [
|
|
94
95
|
t("div", J, [
|
|
95
96
|
t("div", K, [
|
|
96
97
|
t("div", Q, [
|
|
97
|
-
i($, {
|
|
98
|
+
i($, {
|
|
99
|
+
operation: o.operation,
|
|
100
|
+
schemas: o.schemas
|
|
101
|
+
}, null, 8, ["operation", "schemas"])
|
|
98
102
|
]),
|
|
99
103
|
t("div", W, [
|
|
100
104
|
i(q, {
|
|
101
105
|
collapsableItems: !1,
|
|
102
|
-
operation: o.transformedOperation
|
|
103
|
-
|
|
106
|
+
operation: o.transformedOperation,
|
|
107
|
+
schemas: o.schemas
|
|
108
|
+
}, null, 8, ["operation", "schemas"])
|
|
104
109
|
])
|
|
105
110
|
]),
|
|
106
111
|
i(e(M), {
|
|
@@ -118,11 +123,11 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
|
|
|
118
123
|
}, [
|
|
119
124
|
(d = o.operation) != null && d.description ? {
|
|
120
125
|
name: "description",
|
|
121
|
-
fn:
|
|
122
|
-
var
|
|
126
|
+
fn: a(() => {
|
|
127
|
+
var n;
|
|
123
128
|
return [
|
|
124
129
|
i(e(R), {
|
|
125
|
-
value: (
|
|
130
|
+
value: (n = o.operation) == null ? void 0 : n.description,
|
|
126
131
|
withImages: ""
|
|
127
132
|
}, null, 8, ["value"])
|
|
128
133
|
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
3
|
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
id?: string;
|
|
@@ -7,6 +8,7 @@ type __VLS_Props = {
|
|
|
7
8
|
operation: Operation;
|
|
8
9
|
/** @deprecated Use `operation` instead */
|
|
9
10
|
transformedOperation: TransformedOperation;
|
|
11
|
+
schemas?: OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject> | Record<string, OpenAPIV3_1.SchemaObject> | unknown;
|
|
10
12
|
};
|
|
11
13
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
14
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAiJA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AA6BhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;AA2OF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModernLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-795f44b1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,63 +1,67 @@
|
|
|
1
|
-
import { defineComponent as b, useId as O, computed as S, openBlock as
|
|
1
|
+
import { defineComponent as b, useId as O, computed as S, openBlock as p, createBlock as m, unref as e, withCtx as a, createVNode as r, normalizeClass as d, createTextVNode as f, toDisplayString as u, createCommentVNode as y, createElementVNode as t } from "vue";
|
|
2
2
|
import { ScalarMarkdown as C, ScalarErrorBoundary as c } from "@scalar/components";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import M from "../../
|
|
18
|
-
|
|
3
|
+
import k from "../../../components/OperationPath.vue.js";
|
|
4
|
+
import { useConfig as B } from "../../../hooks/useConfig.js";
|
|
5
|
+
import { getOperationStability as h, getOperationStabilityColor as _, isOperationDeprecated as E } from "../../../libs/operation.js";
|
|
6
|
+
import N from "../components/OperationParameters.vue.js";
|
|
7
|
+
import V from "../components/OperationResponses.vue.js";
|
|
8
|
+
import w from "../../../components/Section/Section.vue.js";
|
|
9
|
+
import I from "../../../components/Section/SectionContent.vue.js";
|
|
10
|
+
import R from "../../../components/Badge/Badge.vue.js";
|
|
11
|
+
import T from "../../../components/Section/SectionHeader.vue.js";
|
|
12
|
+
import q from "../../../components/Anchor/Anchor.vue.js";
|
|
13
|
+
import D from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
14
|
+
import H from "../../../components/Section/SectionColumns.vue.js";
|
|
15
|
+
import g from "../../../components/Section/SectionColumn.vue.js";
|
|
16
|
+
import L from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
17
|
+
import M from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
18
|
+
import $ from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
19
|
+
const z = { class: "operation-details" }, A = { class: "examples" }, ie = /* @__PURE__ */ b({
|
|
19
20
|
__name: "ModernLayout",
|
|
20
21
|
props: {
|
|
21
22
|
id: {},
|
|
22
23
|
collection: {},
|
|
23
24
|
server: {},
|
|
24
25
|
operation: {},
|
|
25
|
-
transformedOperation: {}
|
|
26
|
+
transformedOperation: {},
|
|
27
|
+
schemas: {}
|
|
26
28
|
},
|
|
27
29
|
setup(n) {
|
|
28
|
-
const i = O(), l = S(() => n.operation.summary || n.operation.path);
|
|
29
|
-
return (o,
|
|
30
|
+
const i = O(), v = B(), l = S(() => n.operation.summary || n.operation.path);
|
|
31
|
+
return (o, P) => (p(), m(e(w), {
|
|
30
32
|
id: o.id,
|
|
31
33
|
"aria-labelledby": e(i),
|
|
32
34
|
label: l.value,
|
|
33
35
|
tabindex: "-1"
|
|
34
36
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
r(e(
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
default: a(() => [
|
|
38
|
+
r(e(I), {
|
|
39
|
+
loading: e(v).isLoading
|
|
40
|
+
}, {
|
|
41
|
+
default: a(() => [
|
|
42
|
+
e(h)(o.operation) ? (p(), m(e(R), {
|
|
39
43
|
key: 0,
|
|
40
|
-
class:
|
|
44
|
+
class: d(e(_)(o.operation))
|
|
41
45
|
}, {
|
|
42
|
-
default:
|
|
46
|
+
default: a(() => [
|
|
43
47
|
f(u(e(h)(o.operation)), 1)
|
|
44
48
|
]),
|
|
45
49
|
_: 1
|
|
46
50
|
}, 8, ["class"])) : y("", !0),
|
|
47
|
-
|
|
48
|
-
class:
|
|
51
|
+
t("div", {
|
|
52
|
+
class: d(e(E)(o.operation) ? "deprecated" : "")
|
|
49
53
|
}, [
|
|
50
|
-
r(e(
|
|
51
|
-
default:
|
|
52
|
-
r(e(
|
|
54
|
+
r(e(T), null, {
|
|
55
|
+
default: a(() => [
|
|
56
|
+
r(e(q), {
|
|
53
57
|
id: o.id ?? ""
|
|
54
58
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
r(e(
|
|
59
|
+
default: a(() => [
|
|
60
|
+
r(e(D), {
|
|
57
61
|
id: e(i),
|
|
58
62
|
level: 3
|
|
59
63
|
}, {
|
|
60
|
-
default:
|
|
64
|
+
default: a(() => [
|
|
61
65
|
f(u(l.value), 1)
|
|
62
66
|
]),
|
|
63
67
|
_: 1
|
|
@@ -69,45 +73,51 @@ const $ = { class: "operation-details" }, z = { class: "examples" }, te = /* @__
|
|
|
69
73
|
_: 1
|
|
70
74
|
})
|
|
71
75
|
], 2),
|
|
72
|
-
r(e(
|
|
73
|
-
default:
|
|
74
|
-
r(e(
|
|
75
|
-
default:
|
|
76
|
-
|
|
76
|
+
r(e(H), null, {
|
|
77
|
+
default: a(() => [
|
|
78
|
+
r(e(g), null, {
|
|
79
|
+
default: a(() => [
|
|
80
|
+
t("div", z, [
|
|
77
81
|
r(e(C), {
|
|
78
82
|
value: o.operation.description,
|
|
79
83
|
withImages: ""
|
|
80
84
|
}, null, 8, ["value"]),
|
|
81
|
-
r(
|
|
82
|
-
|
|
85
|
+
r(N, {
|
|
86
|
+
operation: o.operation,
|
|
87
|
+
schemas: o.schemas
|
|
88
|
+
}, null, 8, ["operation", "schemas"]),
|
|
89
|
+
r(V, {
|
|
90
|
+
operation: o.transformedOperation,
|
|
91
|
+
schemas: o.schemas
|
|
92
|
+
}, null, 8, ["operation", "schemas"])
|
|
83
93
|
])
|
|
84
94
|
]),
|
|
85
95
|
_: 1
|
|
86
96
|
}),
|
|
87
|
-
r(e(
|
|
88
|
-
default:
|
|
89
|
-
|
|
97
|
+
r(e(g), null, {
|
|
98
|
+
default: a(() => [
|
|
99
|
+
t("div", A, [
|
|
90
100
|
r(e(c), null, {
|
|
91
|
-
default:
|
|
92
|
-
r(e(
|
|
101
|
+
default: a(() => [
|
|
102
|
+
r(e(L), {
|
|
93
103
|
collection: o.collection,
|
|
94
104
|
fallback: "",
|
|
95
105
|
operation: o.operation,
|
|
96
106
|
server: o.server,
|
|
97
107
|
transformedOperation: o.transformedOperation
|
|
98
108
|
}, {
|
|
99
|
-
header:
|
|
100
|
-
var
|
|
109
|
+
header: a(() => {
|
|
110
|
+
var s;
|
|
101
111
|
return [
|
|
102
|
-
r(
|
|
112
|
+
r(k, {
|
|
103
113
|
class: "example-path",
|
|
104
|
-
deprecated: (
|
|
114
|
+
deprecated: (s = o.transformedOperation.information) == null ? void 0 : s.deprecated,
|
|
105
115
|
path: o.transformedOperation.path
|
|
106
116
|
}, null, 8, ["deprecated", "path"])
|
|
107
117
|
];
|
|
108
118
|
}),
|
|
109
|
-
footer:
|
|
110
|
-
r(e(
|
|
119
|
+
footer: a(() => [
|
|
120
|
+
r(e(M), { operation: o.operation }, null, 8, ["operation"])
|
|
111
121
|
]),
|
|
112
122
|
_: 1
|
|
113
123
|
}, 8, ["collection", "operation", "server", "transformedOperation"])
|
|
@@ -115,8 +125,8 @@ const $ = { class: "operation-details" }, z = { class: "examples" }, te = /* @__
|
|
|
115
125
|
_: 1
|
|
116
126
|
}),
|
|
117
127
|
r(e(c), null, {
|
|
118
|
-
default:
|
|
119
|
-
r(e(
|
|
128
|
+
default: a(() => [
|
|
129
|
+
r(e($), {
|
|
120
130
|
responses: o.operation.responses,
|
|
121
131
|
style: { "margin-top": "12px" }
|
|
122
132
|
}, null, 8, ["responses"])
|
|
@@ -132,12 +142,12 @@ const $ = { class: "operation-details" }, z = { class: "examples" }, te = /* @__
|
|
|
132
142
|
})
|
|
133
143
|
]),
|
|
134
144
|
_: 1
|
|
135
|
-
})
|
|
145
|
+
}, 8, ["loading"])
|
|
136
146
|
]),
|
|
137
147
|
_: 1
|
|
138
148
|
}, 8, ["id", "aria-labelledby", "label"]));
|
|
139
149
|
}
|
|
140
150
|
});
|
|
141
151
|
export {
|
|
142
|
-
|
|
152
|
+
ie as default
|
|
143
153
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchModal.vue"],"names":[],"mappings":"AAqSA,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAahD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AAmZF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SearchModal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1f1d816c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -66,7 +66,8 @@ const ie = { class: "sr-only" }, ce = { class: "sr-only" }, ve = /* @__PURE__ */
|
|
|
66
66
|
});
|
|
67
67
|
const K = _(() => {
|
|
68
68
|
const o = c.value;
|
|
69
|
-
if (!o.length)
|
|
69
|
+
if (!o.length)
|
|
70
|
+
return "No results found";
|
|
70
71
|
const t = o[l.value].item, e = p.value.length ? `${o.length} result${o.length === 1 ? "" : "s"} found, ` : "", s = t.type === "tag" ? "" : t.type === "req" ? `, HTTP Method ${t.httpVerb}, Path ${t.path}` : `, ${t.description}`, r = `${$[t.type]} ${t.title} ${s}`;
|
|
71
72
|
return `${e}Selected: ${r}`;
|
|
72
73
|
}), T = (o) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,aAAa,CAAA;AAElF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;
|
|
1
|
+
{"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAIpD,OAAO,EAAE,KAAK,QAAQ,EAAyC,MAAM,aAAa,CAAA;AAElF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA0ByB,IAAI;sBAbL,IAAI;;;;EAmK5B"}
|
|
@@ -2,14 +2,14 @@ import N from "fuse.js";
|
|
|
2
2
|
import { ref as h, watch as R, computed as V } from "vue";
|
|
3
3
|
import { extractRequestBody as A } from "../../helpers/specHelpers.js";
|
|
4
4
|
import { useOperation as B } from "../../hooks/useOperation.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useSidebar as P } from "../../hooks/useSidebar.js";
|
|
6
|
+
import { useNavState as z } from "../../hooks/useNavState.js";
|
|
7
7
|
import { getHeadingsFromMarkdown as G } from "../../helpers/getHeadingsFromMarkdown.js";
|
|
8
8
|
import { getModels as J } from "../../helpers/getModels.js";
|
|
9
9
|
function te({
|
|
10
10
|
specification: a
|
|
11
11
|
}) {
|
|
12
|
-
const {
|
|
12
|
+
const { hideModels: T } = P(), { getHeadingId: j, getWebhookId: L, getModelId: W, getOperationId: q, getTagId: C } = z(), o = h([]), r = h([]), d = h(0), s = h(""), i = new N(o.value, {
|
|
13
13
|
keys: ["title", "description", "body"]
|
|
14
14
|
}), p = () => {
|
|
15
15
|
d.value = 0, r.value = i.search(s.value);
|
|
@@ -37,14 +37,14 @@ function te({
|
|
|
37
37
|
type: "heading",
|
|
38
38
|
title: `Info > ${e.value}`,
|
|
39
39
|
description: "",
|
|
40
|
-
href: `#${
|
|
40
|
+
href: `#${j(e)}`,
|
|
41
41
|
tag: e.slug,
|
|
42
42
|
body: ""
|
|
43
43
|
});
|
|
44
44
|
}), o.value = o.value.concat(l)), ($ = (D = a.value) == null ? void 0 : D.tags) == null || $.forEach((e) => {
|
|
45
45
|
const S = {
|
|
46
46
|
title: e["x-displayName"] ?? e.name,
|
|
47
|
-
href: `#${
|
|
47
|
+
href: `#${C(e)}`,
|
|
48
48
|
description: e.description,
|
|
49
49
|
type: "tag",
|
|
50
50
|
tag: e.name,
|
|
@@ -57,7 +57,7 @@ function te({
|
|
|
57
57
|
const O = {
|
|
58
58
|
type: "req",
|
|
59
59
|
title: t.name ?? t.path,
|
|
60
|
-
href: `#${
|
|
60
|
+
href: `#${q(t, e)}`,
|
|
61
61
|
operationId: t.operationId,
|
|
62
62
|
description: t.description ?? "",
|
|
63
63
|
httpVerb: t.httpVerb,
|
|
@@ -75,7 +75,7 @@ function te({
|
|
|
75
75
|
m.push({
|
|
76
76
|
type: "webhook",
|
|
77
77
|
title: "Webhook",
|
|
78
|
-
href: `#${
|
|
78
|
+
href: `#${L({ name: e, method: t })}`,
|
|
79
79
|
description: `${(c = n[e][t]) == null ? void 0 : c.name}`,
|
|
80
80
|
httpVerb: t,
|
|
81
81
|
tag: e,
|
|
@@ -83,12 +83,12 @@ function te({
|
|
|
83
83
|
});
|
|
84
84
|
}), o.value = o.value.concat(m);
|
|
85
85
|
});
|
|
86
|
-
const v =
|
|
86
|
+
const v = T.value ? {} : J(a.value), b = [];
|
|
87
87
|
v && (Object.keys(v).forEach((e) => {
|
|
88
88
|
b.push({
|
|
89
89
|
type: "model",
|
|
90
90
|
title: "Model",
|
|
91
|
-
href: `#${
|
|
91
|
+
href: `#${W({ name: e })}`,
|
|
92
92
|
description: v[e].title ?? e,
|
|
93
93
|
tag: e,
|
|
94
94
|
body: ""
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ export * from './deepMerge.js';
|
|
|
3
3
|
export * from './getHeadingsFromMarkdown.js';
|
|
4
4
|
export * from './getLowestHeadingLevel.js';
|
|
5
5
|
export * from './getModels.js';
|
|
6
|
-
export * from './getVariableNames
|
|
6
|
+
export * from './getVariableNames';
|
|
7
7
|
export * from './hasModels.js';
|
|
8
|
-
export * from './hasSecuritySchemes
|
|
8
|
+
export * from './hasSecuritySchemes';
|
|
9
9
|
export * from './hasWebhooks.js';
|
|
10
10
|
export * from './isMacOs.js';
|
|
11
|
-
export * from './mapFromObject
|
|
12
|
-
export * from './mergeAllObjects
|
|
11
|
+
export * from './mapFromObject';
|
|
12
|
+
export * from './mergeAllObjects';
|
|
13
13
|
export * from './parse.js';
|
|
14
14
|
export * from './scrollToId.js';
|
|
15
15
|
export * from './sleep.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollToId.d.ts","sourceRoot":"","sources":["../../src/helpers/scrollToId.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,OAAc,MAAM,UAAU,OAAO,
|
|
1
|
+
{"version":3,"file":"scrollToId.d.ts","sourceRoot":"","sources":["../../src/helpers/scrollToId.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,OAAc,MAAM,UAAU,OAAO,kBAS3D,CAAA"}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
function u(e, r) {
|
|
2
|
+
var s;
|
|
2
3
|
let t = e;
|
|
3
|
-
const s = r.required
|
|
4
|
-
return t +=
|
|
4
|
+
const i = (s = r.required) == null ? void 0 : s.includes(e);
|
|
5
|
+
return t += i ? " REQUIRED " : " optional ", r.properties[e] && (t += r.properties[e].type, r.properties[e].description && (t += " " + r.properties[e].description)), t;
|
|
5
6
|
}
|
|
6
7
|
function f(e) {
|
|
7
|
-
var
|
|
8
|
-
const r = ["Body"], t = (
|
|
9
|
-
return t && Object.keys(t).forEach((
|
|
8
|
+
var i;
|
|
9
|
+
const r = ["Body"], t = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
|
|
10
|
+
return t && Object.keys(t).forEach((s) => {
|
|
10
11
|
if (!e.schema)
|
|
11
12
|
return;
|
|
12
|
-
r.push(u(
|
|
13
|
-
const p = t[
|
|
14
|
-
p.type === "object" && !!p.properties && p.properties && Object.keys(p.properties).forEach((
|
|
15
|
-
var
|
|
16
|
-
r.push(`${
|
|
13
|
+
r.push(u(s, e.schema));
|
|
14
|
+
const p = t[s];
|
|
15
|
+
p.type === "object" && !!p.properties && p.properties && Object.keys(p.properties).forEach((o) => {
|
|
16
|
+
var c, n;
|
|
17
|
+
r.push(`${o} ${(n = (c = p.properties) == null ? void 0 : c[o]) == null ? void 0 : n.type}`);
|
|
17
18
|
});
|
|
18
19
|
}), r;
|
|
19
20
|
}
|
|
20
21
|
function a(e) {
|
|
21
|
-
var r, t,
|
|
22
|
+
var r, t, i;
|
|
22
23
|
try {
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
24
|
+
const s = (i = (t = (r = e == null ? void 0 : e.information) == null ? void 0 : r.requestBody) == null ? void 0 : t.content) == null ? void 0 : i["application/json"];
|
|
25
|
+
if (!s)
|
|
25
26
|
throw new Error("Body not found");
|
|
26
|
-
return f(
|
|
27
|
+
return f(s);
|
|
27
28
|
} catch {
|
|
28
29
|
return !1;
|
|
29
30
|
}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NavState } from '../hooks/useNavState.js';
|
|
1
2
|
import { type ApiReferenceConfiguration, type ApiReferenceConfigurationWithSources } from '@scalar/types/api-reference';
|
|
2
3
|
import { type Ref } from 'vue';
|
|
3
4
|
type UseMultipleDocumentsProps = {
|
|
@@ -8,14 +9,15 @@ type UseMultipleDocumentsProps = {
|
|
|
8
9
|
configuration: Ref<Partial<ApiReferenceConfiguration> | Partial<ApiReferenceConfiguration>[] | Partial<ApiReferenceConfigurationWithSources> | undefined>;
|
|
9
10
|
/** The initial index to pre-select a document, if there is no query parameter available */
|
|
10
11
|
initialIndex?: number;
|
|
11
|
-
};
|
|
12
|
-
export declare const useMultipleDocuments: ({ configuration, initialIndex }: UseMultipleDocumentsProps) => {
|
|
12
|
+
} & NavState;
|
|
13
|
+
export declare const useMultipleDocuments: ({ configuration, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
|
|
13
14
|
selectedConfiguration: import("vue").ComputedRef<{
|
|
14
15
|
hideClientButton: boolean;
|
|
15
16
|
showSidebar: boolean;
|
|
16
17
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
|
|
17
18
|
layout: "modern" | "classic";
|
|
18
19
|
isEditable: boolean;
|
|
20
|
+
isLoading: boolean;
|
|
19
21
|
hideModels: boolean;
|
|
20
22
|
hideDownloadButton: boolean;
|
|
21
23
|
hideTestRequestButton: boolean;
|
|
@@ -86,6 +88,9 @@ export declare const useMultipleDocuments: ({ configuration, initialIndex }: Use
|
|
|
86
88
|
slug?: string | undefined;
|
|
87
89
|
}[]>;
|
|
88
90
|
selectedDocumentIndex: Ref<number, number>;
|
|
91
|
+
isIntersectionEnabled: Ref<boolean, boolean>;
|
|
92
|
+
hash: Ref<string, string>;
|
|
93
|
+
hashPrefix: Ref<string, string>;
|
|
89
94
|
};
|
|
90
95
|
export {};
|
|
91
96
|
//# sourceMappingURL=useMultipleDocuments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EAI1C,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAKpD,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CACd,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,yBAAyB,CAAC,EAAE,GACpC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,SAAS,CACZ,CAAA;IACD,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,QAAQ,CAAA;AAsCZ,eAAO,MAAM,oBAAoB,8EAM9B,yBAAyB;;;;;;;;;;;;;;;mDAgI63xB,GAAG;;;;eAAoJ,CAAC;mBAAqC,CAAC,mCAAmC,GAAG;iBAA0E,CAAC;gBAAkC,CAAC;;;;;;;;;;;;;;;;;;;yCAAwsC,GAAI;2CAA6E,GAAI;;;;;gBAA0J,CAAC;WAA4B,GAAI;;gBAAyF,CAAC;WAA4B,GAAI;;gBAAuF,CAAC;WAA4B,GAAI;;;;uBAAkJ,CAAC;mBAAqC,CAAC;WAA4B,GAAI;;;kBAAmH,CAAC;WAA4B,GAAI;qBAA0D,GAAG;qCAAuE,GAAI;;2DAAgK,GAAI;4EAAgH,GAAI;;;;mDA9H3q3B,GAAE;;;;;;;;CA6HxB,CAAA"}
|