@scalar/api-reference 1.34.2 → 1.34.5
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 +108 -0
- package/README.md +1 -1
- package/dist/browser/standalone.js +15377 -14717
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Badge/Badge.vue.d.ts +4 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +5 -11
- package/dist/components/Badge/Badge.vue2.js +22 -2
- package/dist/components/Badge/Badge.vue3.js +4 -0
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +1 -1
- 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/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +30 -31
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +2 -0
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +39 -37
- package/dist/components/Content/Operations/TraversedEntry.vue.js +12 -12
- package/dist/components/Content/Tags/TagSection.vue.js +6 -6
- package/dist/components/GettingStarted.vue.js +3 -3
- package/dist/components/GettingStarted.vue2.js +21 -21
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue.d.ts +2 -0
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue2.js +30 -29
- package/dist/features/Operation/Operation.vue.d.ts +2 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +53 -52
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -2
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +16 -16
- package/dist/features/Operation/helpers/combine-params.d.ts +5 -0
- package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -0
- package/dist/features/Operation/helpers/combine-params.js +13 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -4
- 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 +59 -50
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -4
- 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 +94 -78
- package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.js +0 -3
- package/dist/features/api-client-modal/ApiClientModal.vue.js +9 -9
- package/dist/features/api-client-modal/useApiClient.d.ts +100 -100
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.js +16 -18
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.js +30 -33
- package/dist/features/example-responses/ExampleResponse.vue.d.ts +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponse.vue2.js +15 -13
- package/dist/features/example-responses/ExampleResponses.vue.d.ts +2 -3
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponses.vue2.js +73 -69
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts +26 -0
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +1 -0
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +29 -0
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue2.js +6 -6
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +13 -14
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +1 -2
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +11 -12
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/features/x-badges/XBadges.vue.d.ts +8 -0
- package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -0
- package/dist/features/x-badges/XBadges.vue.js +26 -0
- package/dist/features/x-badges/XBadges.vue2.js +4 -0
- package/dist/features/x-badges/index.d.ts +2 -0
- package/dist/features/x-badges/index.d.ts.map +1 -0
- package/dist/helpers/test-utils.d.ts +1 -1
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -2
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/libs/openapi.d.ts +4 -14
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +55 -36
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +64 -64
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +1 -2
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +2 -2
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +97 -100
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +1 -2
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +17 -20
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/helpers/map-configuration.d.ts +66 -0
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -0
- package/dist/v2/helpers/map-configuration.js +53 -0
- package/dist/vitest.setup.d.ts +2 -0
- package/dist/vitest.setup.d.ts.map +1 -0
- package/package.json +24 -19
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, computed as B, createBlock as r, openBlock as i, unref as o, createSlots as O, withCtx as s, createElementVNode as a, createCommentVNode as n, createElementBlock as w, createVNode as t, withModifiers as V, toDisplayString as h, normalizeClass as $, createTextVNode as u } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as q, ScalarIconButton as I, ScalarMarkdown as T } from "@scalar/components";
|
|
3
3
|
import { ScalarIconPlay as D, ScalarIconCopy as E, ScalarIconWebhooksLogo as L } from "@scalar/icons";
|
|
4
4
|
import { isOperationDeprecated as R, getOperationStability as f, getOperationStabilityColor as W } from "@scalar/oas-utils/helpers";
|
|
5
|
-
import { useClipboard as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useConfig as A } from "../../../hooks/useConfig.js";
|
|
5
|
+
import { useClipboard as z } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import N from "../../../components/OperationPath.vue.js";
|
|
7
|
+
import P from "../components/callbacks/Callbacks.vue.js";
|
|
8
|
+
import U from "../components/OperationParameters.vue.js";
|
|
9
|
+
import A from "../components/OperationResponses.vue.js";
|
|
11
10
|
import M from "../../../components/Section/SectionAccordion.vue.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
11
|
+
import _ from "../../example-responses/ExampleResponses.vue.js";
|
|
12
|
+
import j from "../../../components/LinkList/LinkList.vue.js";
|
|
13
|
+
import F from "../../external-docs/ExternalDocs.vue.js";
|
|
14
|
+
import G from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
|
|
15
|
+
import y from "../../x-badges/XBadges.vue.js";
|
|
16
|
+
import H from "../../test-request-button/TestRequestButton.vue.js";
|
|
17
|
+
import J from "../../../components/HttpMethod/HttpMethod.vue.js";
|
|
18
|
+
import K from "../../../components/Anchor/Anchor.vue.js";
|
|
19
|
+
import b from "../../../components/Badge/Badge.vue.js";
|
|
20
|
+
const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y = { class: "endpoint-label" }, Z = { class: "endpoint-label-path" }, x = { class: "endpoint-label-name" }, ee = { class: "endpoint-content" }, oe = { class: "operation-details-card" }, te = { class: "operation-details-card-item" }, ae = { class: "operation-details-card-item" }, se = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "operation-details-card-item"
|
|
23
|
-
},
|
|
23
|
+
}, we = /* @__PURE__ */ C({
|
|
24
24
|
__name: "ClassicLayout",
|
|
25
25
|
props: {
|
|
26
26
|
id: {},
|
|
27
27
|
path: {},
|
|
28
28
|
clientOptions: {},
|
|
29
29
|
method: {},
|
|
30
|
+
config: {},
|
|
30
31
|
operation: {},
|
|
31
32
|
oldOperation: {},
|
|
32
|
-
parameters: {},
|
|
33
33
|
isWebhook: { type: Boolean },
|
|
34
34
|
server: {},
|
|
35
35
|
securitySchemes: {},
|
|
@@ -38,8 +38,8 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
38
38
|
},
|
|
39
39
|
emits: ["update:modelValue"],
|
|
40
40
|
setup(d, { emit: k }) {
|
|
41
|
-
const v = B(() => d.operation.summary || d.path || ""), { copyToClipboard:
|
|
42
|
-
|
|
41
|
+
const v = B(() => d.operation.summary || d.path || ""), { copyToClipboard: g } = z(), S = k, m = (e) => {
|
|
42
|
+
S("update:modelValue", e);
|
|
43
43
|
};
|
|
44
44
|
return (e, l) => (i(), r(o(M), {
|
|
45
45
|
id: e.id,
|
|
@@ -47,36 +47,36 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
47
47
|
transparent: ""
|
|
48
48
|
}, O({
|
|
49
49
|
title: s(() => [
|
|
50
|
-
a("div",
|
|
51
|
-
a("div",
|
|
52
|
-
t(o(
|
|
50
|
+
a("div", Q, [
|
|
51
|
+
a("div", X, [
|
|
52
|
+
t(o(J), {
|
|
53
53
|
class: "endpoint-type",
|
|
54
54
|
method: e.method,
|
|
55
55
|
short: ""
|
|
56
56
|
}, null, 8, ["method"]),
|
|
57
|
-
t(o(
|
|
57
|
+
t(o(K), {
|
|
58
58
|
id: e.id,
|
|
59
59
|
class: "endpoint-anchor"
|
|
60
60
|
}, {
|
|
61
61
|
default: s(() => [
|
|
62
|
-
a("h3",
|
|
63
|
-
a("div",
|
|
64
|
-
t(
|
|
62
|
+
a("h3", Y, [
|
|
63
|
+
a("div", Z, [
|
|
64
|
+
t(N, {
|
|
65
65
|
deprecated: o(R)(e.operation),
|
|
66
66
|
path: e.path
|
|
67
67
|
}, null, 8, ["deprecated", "path"])
|
|
68
68
|
]),
|
|
69
|
-
a("div",
|
|
70
|
-
o(f)(e.operation) ? (i(), r(o(
|
|
69
|
+
a("div", x, h(v.value), 1),
|
|
70
|
+
o(f)(e.operation) ? (i(), r(o(b), {
|
|
71
71
|
key: 0,
|
|
72
|
-
class: $(o(W)(e.operation))
|
|
72
|
+
class: $(["capitalize", o(W)(e.operation)])
|
|
73
73
|
}, {
|
|
74
74
|
default: s(() => [
|
|
75
75
|
u(h(o(f)(e.operation)), 1)
|
|
76
76
|
]),
|
|
77
77
|
_: 1
|
|
78
78
|
}, 8, ["class"])) : n("", !0),
|
|
79
|
-
e.isWebhook ? (i(), r(o(
|
|
79
|
+
e.isWebhook ? (i(), r(o(b), {
|
|
80
80
|
key: 1,
|
|
81
81
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
82
82
|
}, {
|
|
@@ -86,7 +86,11 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
86
86
|
]),
|
|
87
87
|
_: 1,
|
|
88
88
|
__: [1]
|
|
89
|
-
})) : n("", !0)
|
|
89
|
+
})) : n("", !0),
|
|
90
|
+
t(o(y), {
|
|
91
|
+
badges: e.operation["x-badges"],
|
|
92
|
+
position: "before"
|
|
93
|
+
}, null, 8, ["badges"])
|
|
90
94
|
])
|
|
91
95
|
]),
|
|
92
96
|
_: 1
|
|
@@ -97,11 +101,15 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
97
101
|
actions: s(({ active: p }) => {
|
|
98
102
|
var c;
|
|
99
103
|
return [
|
|
100
|
-
|
|
104
|
+
t(o(y), {
|
|
105
|
+
badges: e.operation["x-badges"],
|
|
106
|
+
position: "after"
|
|
107
|
+
}, null, 8, ["badges"]),
|
|
108
|
+
p && !e.isWebhook ? (i(), r(o(H), {
|
|
101
109
|
key: 0,
|
|
102
110
|
method: e.method,
|
|
103
111
|
path: e.path
|
|
104
|
-
}, null, 8, ["method", "path"])) : (c =
|
|
112
|
+
}, null, 8, ["method", "path"])) : (c = e.config) != null && c.hideTestRequestButton ? n("", !0) : (i(), r(o(D), {
|
|
105
113
|
key: 1,
|
|
106
114
|
class: "endpoint-try-hint size-4.5"
|
|
107
115
|
})),
|
|
@@ -111,32 +119,32 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
111
119
|
label: "Copy endpoint URL",
|
|
112
120
|
size: "xs",
|
|
113
121
|
variant: "ghost",
|
|
114
|
-
onClick: l[0] || (l[0] = V((
|
|
122
|
+
onClick: l[0] || (l[0] = V((ie) => o(g)(e.path), ["stop"]))
|
|
115
123
|
}, null, 8, ["icon"])
|
|
116
124
|
];
|
|
117
125
|
}),
|
|
118
126
|
default: s(() => {
|
|
119
127
|
var p;
|
|
120
128
|
return [
|
|
121
|
-
a("div",
|
|
122
|
-
a("div",
|
|
123
|
-
a("div",
|
|
124
|
-
t(
|
|
129
|
+
a("div", ee, [
|
|
130
|
+
a("div", oe, [
|
|
131
|
+
a("div", te, [
|
|
132
|
+
t(U, {
|
|
125
133
|
requestBody: e.oldOperation.requestBody,
|
|
126
|
-
parameters: e.parameters,
|
|
134
|
+
parameters: e.operation.parameters,
|
|
127
135
|
schemas: e.schemas,
|
|
128
136
|
"onUpdate:modelValue": m
|
|
129
137
|
}, null, 8, ["requestBody", "parameters", "schemas"])
|
|
130
138
|
]),
|
|
131
|
-
a("div",
|
|
132
|
-
t(
|
|
139
|
+
a("div", ae, [
|
|
140
|
+
t(A, {
|
|
133
141
|
collapsableItems: !1,
|
|
134
142
|
responses: e.oldOperation.responses,
|
|
135
143
|
schemas: e.schemas
|
|
136
144
|
}, null, 8, ["responses", "schemas"])
|
|
137
145
|
]),
|
|
138
|
-
(p = e.operation) != null && p.callbacks ? (i(), w("div",
|
|
139
|
-
t(
|
|
146
|
+
(p = e.operation) != null && p.callbacks ? (i(), w("div", se, [
|
|
147
|
+
t(P, {
|
|
140
148
|
method: e.method,
|
|
141
149
|
path: e.path,
|
|
142
150
|
callbacks: e.operation.callbacks,
|
|
@@ -144,14 +152,15 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
144
152
|
}, null, 8, ["method", "path", "callbacks", "schemas"])
|
|
145
153
|
])) : n("", !0)
|
|
146
154
|
]),
|
|
147
|
-
|
|
155
|
+
e.operation.responses ? (i(), r(o(_), {
|
|
156
|
+
key: 0,
|
|
148
157
|
class: "operation-example-card",
|
|
149
158
|
responses: e.operation.responses
|
|
150
|
-
}, null, 8, ["responses"]),
|
|
159
|
+
}, null, 8, ["responses"])) : n("", !0),
|
|
151
160
|
a("div", null, [
|
|
152
|
-
e.operation.externalDocs ? (i(), r(o(
|
|
161
|
+
e.operation.externalDocs ? (i(), r(o(j), { key: 0 }, {
|
|
153
162
|
default: s(() => [
|
|
154
|
-
t(o(
|
|
163
|
+
t(o(F), {
|
|
155
164
|
value: e.operation.externalDocs
|
|
156
165
|
}, null, 8, ["value"])
|
|
157
166
|
]),
|
|
@@ -159,7 +168,7 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
159
168
|
})) : n("", !0),
|
|
160
169
|
t(o(q), null, {
|
|
161
170
|
default: s(() => [
|
|
162
|
-
t(o(
|
|
171
|
+
t(o(G), {
|
|
163
172
|
class: "operation-example-card",
|
|
164
173
|
method: e.method,
|
|
165
174
|
selectedServer: e.server,
|
|
@@ -197,5 +206,5 @@ const X = { class: "operation-title" }, Y = { class: "operation-details" }, Z =
|
|
|
197
206
|
}
|
|
198
207
|
});
|
|
199
208
|
export {
|
|
200
|
-
|
|
209
|
+
we as default
|
|
201
210
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
+
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
3
4
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
|
-
import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/parameter';
|
|
5
5
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
|
|
6
6
|
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
7
7
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
8
|
-
import type { Dereference } from '@scalar/workspace-store/schemas/v3.1/type-guard';
|
|
9
8
|
import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
10
9
|
import type { ClientOptionGroup } from '../../../v2/blocks/scalar-request-example-block/types';
|
|
11
10
|
type __VLS_Props = {
|
|
@@ -13,9 +12,9 @@ type __VLS_Props = {
|
|
|
13
12
|
path: string;
|
|
14
13
|
clientOptions: ClientOptionGroup[];
|
|
15
14
|
method: HttpMethodType;
|
|
16
|
-
|
|
15
|
+
config: ApiReferenceConfiguration;
|
|
16
|
+
operation: OperationObject;
|
|
17
17
|
oldOperation: OpenAPIV3_1.OperationObject;
|
|
18
|
-
parameters: ParameterObject[];
|
|
19
18
|
isWebhook: boolean;
|
|
20
19
|
securitySchemes: SecuritySchemeObject[];
|
|
21
20
|
server: ServerObject | undefined;
|
|
@@ -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":"AAoOA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAoBtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAIvF,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,yBAAyB,CAAA;IACjC,SAAS,EAAE,eAAe,CAAA;IAC1B,YAAY,EAAE,WAAW,CAAC,eAAe,CAAA;IAEzC,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;;;;AA2WJ,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModernLayout.vue2.js";
|
|
2
2
|
import "./ModernLayout.vue3.js";
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1152fe62"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { ScalarIconWebhooksLogo as
|
|
4
|
-
import { getOperationStability as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as w, computed as B, useId as V, createBlock as r, openBlock as s, unref as o, withCtx as t, createVNode as a, createElementVNode as i, createCommentVNode as l, normalizeClass as b, createTextVNode as n, toDisplayString as g, createSlots as I } from "vue";
|
|
2
|
+
import { ScalarMarkdown as $, ScalarErrorBoundary as d } from "@scalar/components";
|
|
3
|
+
import { ScalarIconWebhooksLogo as q } from "@scalar/icons";
|
|
4
|
+
import { getOperationStability as y, getOperationStabilityColor as D, isOperationDeprecated as L } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import T from "../../../components/OperationPath.vue.js";
|
|
6
|
+
import W from "../components/callbacks/Callbacks.vue.js";
|
|
7
|
+
import E from "../components/OperationParameters.vue.js";
|
|
8
8
|
import N from "../components/OperationResponses.vue.js";
|
|
9
|
-
import { useConfig as P } from "../../../hooks/useConfig.js";
|
|
10
9
|
import R from "../../../components/Section/Section.vue.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
10
|
+
import P from "../../../components/Section/SectionContent.vue.js";
|
|
11
|
+
import k from "../../../components/Badge/Badge.vue.js";
|
|
12
|
+
import S from "../../x-badges/XBadges.vue.js";
|
|
13
|
+
import j from "../../../components/Section/SectionHeader.vue.js";
|
|
14
|
+
import z from "../../../components/Anchor/Anchor.vue.js";
|
|
15
|
+
import A from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
16
|
+
import H from "../../../components/Section/SectionColumns.vue.js";
|
|
17
|
+
import v from "../../../components/Section/SectionColumn.vue.js";
|
|
18
|
+
import M from "../../../components/LinkList/LinkList.vue.js";
|
|
19
|
+
import U from "../../external-docs/ExternalDocs.vue.js";
|
|
20
|
+
import _ from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
|
|
21
|
+
import F from "../../test-request-button/TestRequestButton.vue.js";
|
|
22
|
+
import G from "../../example-responses/ExampleResponses.vue.js";
|
|
23
|
+
const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex gap-1" }, Q = { class: "flex gap-1" }, X = { class: "operation-details" }, Y = { class: "examples" }, Se = /* @__PURE__ */ w({
|
|
24
24
|
__name: "ModernLayout",
|
|
25
25
|
props: {
|
|
26
26
|
id: {},
|
|
27
27
|
path: {},
|
|
28
28
|
clientOptions: {},
|
|
29
29
|
method: {},
|
|
30
|
+
config: {},
|
|
30
31
|
operation: {},
|
|
31
32
|
oldOperation: {},
|
|
32
|
-
parameters: {},
|
|
33
33
|
isWebhook: { type: Boolean },
|
|
34
34
|
securitySchemes: {},
|
|
35
35
|
server: {},
|
|
@@ -37,54 +37,68 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
|
|
|
37
37
|
store: {}
|
|
38
38
|
},
|
|
39
39
|
emits: ["update:modelValue"],
|
|
40
|
-
setup(
|
|
41
|
-
const
|
|
42
|
-
|
|
40
|
+
setup(p, { emit: C }) {
|
|
41
|
+
const m = B(() => p.operation.summary || p.path || ""), O = C, u = V(), c = (e) => {
|
|
42
|
+
O("update:modelValue", e);
|
|
43
43
|
};
|
|
44
|
-
return (e, f) => (
|
|
44
|
+
return (e, f) => (s(), r(o(R), {
|
|
45
45
|
id: e.id,
|
|
46
46
|
"aria-labelledby": o(u),
|
|
47
|
-
label:
|
|
47
|
+
label: m.value,
|
|
48
48
|
tabindex: "-1"
|
|
49
49
|
}, {
|
|
50
50
|
default: t(() => [
|
|
51
|
-
a(o(
|
|
52
|
-
loading:
|
|
51
|
+
a(o(P), {
|
|
52
|
+
loading: e.config.isLoading
|
|
53
53
|
}, {
|
|
54
54
|
default: t(() => [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
i("div", J, [
|
|
56
|
+
i("div", K, [
|
|
57
|
+
o(y)(e.operation) ? (s(), r(o(k), {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: b(["capitalize", o(D)(e.operation)])
|
|
60
|
+
}, {
|
|
61
|
+
default: t(() => [
|
|
62
|
+
n(g(o(y)(e.operation)), 1)
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["class"])) : l("", !0),
|
|
66
|
+
e.isWebhook ? (s(), r(o(k), {
|
|
67
|
+
key: 1,
|
|
68
|
+
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
69
|
+
}, {
|
|
70
|
+
default: t(() => [
|
|
71
|
+
a(o(q), { weight: "bold" }),
|
|
72
|
+
f[0] || (f[0] = n("Webhook "))
|
|
73
|
+
]),
|
|
74
|
+
_: 1,
|
|
75
|
+
__: [0]
|
|
76
|
+
})) : l("", !0),
|
|
77
|
+
a(o(S), {
|
|
78
|
+
badges: e.operation["x-badges"],
|
|
79
|
+
position: "before"
|
|
80
|
+
}, null, 8, ["badges"])
|
|
71
81
|
]),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
i("div", Q, [
|
|
83
|
+
a(o(S), {
|
|
84
|
+
badges: e.operation["x-badges"],
|
|
85
|
+
position: "after"
|
|
86
|
+
}, null, 8, ["badges"])
|
|
87
|
+
])
|
|
88
|
+
]),
|
|
89
|
+
i("div", {
|
|
90
|
+
class: b(o(L)(e.operation) ? "deprecated" : "")
|
|
77
91
|
}, [
|
|
78
|
-
a(o(
|
|
92
|
+
a(o(j), null, {
|
|
79
93
|
default: t(() => [
|
|
80
|
-
a(o(
|
|
94
|
+
a(o(z), { id: e.id }, {
|
|
81
95
|
default: t(() => [
|
|
82
|
-
a(o(
|
|
96
|
+
a(o(A), {
|
|
83
97
|
id: o(u),
|
|
84
98
|
level: 3
|
|
85
99
|
}, {
|
|
86
100
|
default: t(() => [
|
|
87
|
-
n(
|
|
101
|
+
n(g(m.value), 1)
|
|
88
102
|
]),
|
|
89
103
|
_: 1
|
|
90
104
|
}, 8, ["id"])
|
|
@@ -95,40 +109,41 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
|
|
|
95
109
|
_: 1
|
|
96
110
|
})
|
|
97
111
|
], 2),
|
|
98
|
-
a(o(
|
|
112
|
+
a(o(H), null, {
|
|
99
113
|
default: t(() => [
|
|
100
|
-
a(o(
|
|
114
|
+
a(o(v), null, {
|
|
101
115
|
default: t(() => [
|
|
102
|
-
|
|
103
|
-
a(o(
|
|
116
|
+
i("div", X, [
|
|
117
|
+
a(o($), {
|
|
104
118
|
value: e.operation.description,
|
|
105
119
|
withImages: "",
|
|
106
120
|
withAnchors: "",
|
|
107
121
|
transformType: "heading",
|
|
108
122
|
anchorPrefix: e.id
|
|
109
123
|
}, null, 8, ["value", "anchorPrefix"]),
|
|
110
|
-
a(
|
|
124
|
+
a(E, {
|
|
111
125
|
breadcrumb: [e.id],
|
|
112
|
-
parameters: e.parameters,
|
|
126
|
+
parameters: e.operation.parameters,
|
|
113
127
|
requestBody: e.oldOperation.requestBody,
|
|
114
128
|
schemas: e.schemas,
|
|
115
129
|
"onUpdate:modelValue": c
|
|
116
130
|
}, null, 8, ["breadcrumb", "parameters", "requestBody", "schemas"]),
|
|
117
131
|
a(N, {
|
|
118
132
|
breadcrumb: [e.id],
|
|
133
|
+
collapsableItems: !e.config.expandAllResponses,
|
|
119
134
|
responses: e.oldOperation.responses,
|
|
120
135
|
schemas: e.schemas
|
|
121
|
-
}, null, 8, ["breadcrumb", "responses", "schemas"]),
|
|
122
|
-
a(o(
|
|
136
|
+
}, null, 8, ["breadcrumb", "collapsableItems", "responses", "schemas"]),
|
|
137
|
+
a(o(d), null, {
|
|
123
138
|
default: t(() => [
|
|
124
|
-
e.operation.callbacks ? (
|
|
139
|
+
e.operation.callbacks ? (s(), r(W, {
|
|
125
140
|
key: 0,
|
|
126
141
|
class: "mt-6",
|
|
127
142
|
path: e.path,
|
|
128
143
|
callbacks: e.operation.callbacks,
|
|
129
144
|
method: e.method,
|
|
130
145
|
schemas: e.schemas
|
|
131
|
-
}, null, 8, ["path", "callbacks", "method", "schemas"])) :
|
|
146
|
+
}, null, 8, ["path", "callbacks", "method", "schemas"])) : l("", !0)
|
|
132
147
|
]),
|
|
133
148
|
_: 1
|
|
134
149
|
})
|
|
@@ -136,20 +151,20 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
|
|
|
136
151
|
]),
|
|
137
152
|
_: 1
|
|
138
153
|
}),
|
|
139
|
-
a(o(
|
|
154
|
+
a(o(v), null, {
|
|
140
155
|
default: t(() => [
|
|
141
|
-
|
|
142
|
-
e.operation.externalDocs ? (
|
|
156
|
+
i("div", Y, [
|
|
157
|
+
e.operation.externalDocs ? (s(), r(o(M), { key: 0 }, {
|
|
143
158
|
default: t(() => [
|
|
144
|
-
a(o(
|
|
159
|
+
a(o(U), {
|
|
145
160
|
value: e.operation.externalDocs
|
|
146
161
|
}, null, 8, ["value"])
|
|
147
162
|
]),
|
|
148
163
|
_: 1
|
|
149
|
-
})) :
|
|
150
|
-
a(o(
|
|
164
|
+
})) : l("", !0),
|
|
165
|
+
a(o(d), null, {
|
|
151
166
|
default: t(() => [
|
|
152
|
-
a(o(
|
|
167
|
+
a(o(_), {
|
|
153
168
|
method: e.method,
|
|
154
169
|
selectedServer: e.server,
|
|
155
170
|
clientOptions: e.clientOptions,
|
|
@@ -159,11 +174,11 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
|
|
|
159
174
|
fallback: "",
|
|
160
175
|
operation: e.operation,
|
|
161
176
|
"onUpdate:modelValue": c
|
|
162
|
-
},
|
|
177
|
+
}, I({
|
|
163
178
|
header: t(() => {
|
|
164
179
|
var h;
|
|
165
180
|
return [
|
|
166
|
-
a(
|
|
181
|
+
a(T, {
|
|
167
182
|
class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
|
|
168
183
|
deprecated: (h = e.operation) == null ? void 0 : h.deprecated,
|
|
169
184
|
path: e.path
|
|
@@ -175,7 +190,7 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
|
|
|
175
190
|
e.isWebhook ? void 0 : {
|
|
176
191
|
name: "footer",
|
|
177
192
|
fn: t(() => [
|
|
178
|
-
a(o(
|
|
193
|
+
a(o(F), {
|
|
179
194
|
method: e.method,
|
|
180
195
|
path: e.path
|
|
181
196
|
}, null, 8, ["method", "path"])
|
|
@@ -186,12 +201,13 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
|
|
|
186
201
|
]),
|
|
187
202
|
_: 1
|
|
188
203
|
}),
|
|
189
|
-
a(o(
|
|
204
|
+
a(o(d), null, {
|
|
190
205
|
default: t(() => [
|
|
191
|
-
|
|
206
|
+
e.operation.responses ? (s(), r(o(G), {
|
|
207
|
+
key: 0,
|
|
192
208
|
responses: e.operation.responses,
|
|
193
209
|
style: { "margin-top": "12px" }
|
|
194
|
-
}, null, 8, ["responses"])
|
|
210
|
+
}, null, 8, ["responses"])) : l("", !0)
|
|
195
211
|
]),
|
|
196
212
|
_: 1
|
|
197
213
|
})
|
|
@@ -211,5 +227,5 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__
|
|
|
211
227
|
}
|
|
212
228
|
});
|
|
213
229
|
export {
|
|
214
|
-
|
|
230
|
+
Se as default
|
|
215
231
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-fuse-instance.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/helpers/create-fuse-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"create-fuse-instance.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/helpers/create-fuse-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAAC,QAAQ,CAAC,CA6CnD"}
|
|
@@ -28,9 +28,6 @@ function n() {
|
|
|
28
28
|
includeScore: !0,
|
|
29
29
|
// Include detailed match information showing which parts of the text matched
|
|
30
30
|
includeMatches: !0,
|
|
31
|
-
// Minimum number of characters that must match to be considered a result
|
|
32
|
-
// Prevents single-character matches that are usually noise
|
|
33
|
-
minMatchCharLength: 2,
|
|
34
31
|
// Don't require matches to be at the beginning of strings
|
|
35
32
|
// Makes search more flexible and user-friendly
|
|
36
33
|
ignoreLocation: !0,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as E, ref as B, onMounted as b, watch as R, onBeforeUnmount as k, createElementBlock as q, openBlock as x } from "vue";
|
|
2
2
|
import { useActiveEntities as D, useWorkspace as M } from "@scalar/api-client/store";
|
|
3
3
|
import { mutateSecuritySchemeDiff as U } from "@scalar/api-client/views/Request/libs";
|
|
4
|
-
import {
|
|
4
|
+
import { getServersFromDocument as C } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import { watchDebounced as v } from "@vueuse/core";
|
|
6
|
-
import
|
|
7
|
-
import { useNavState as
|
|
8
|
-
import { useApiClient as
|
|
6
|
+
import h from "microdiff";
|
|
7
|
+
import { useNavState as y } from "../../hooks/useNavState.js";
|
|
8
|
+
import { useApiClient as A } from "./useApiClient.js";
|
|
9
9
|
import { useExampleStore as L } from "../../legacy/stores/useExampleStore.js";
|
|
10
10
|
const z = /* @__PURE__ */ E({
|
|
11
11
|
__name: "ApiClientModal",
|
|
@@ -14,14 +14,14 @@ const z = /* @__PURE__ */ E({
|
|
|
14
14
|
dereferencedDocument: {}
|
|
15
15
|
},
|
|
16
16
|
setup(o) {
|
|
17
|
-
const l = B(null), { client: c, init:
|
|
17
|
+
const l = B(null), { client: c, init: p } = A(), { selectedExampleKey: S, operationId: m } = L(), a = D(), n = M(), { isIntersectionEnabled: d } = y(), g = () => ({
|
|
18
18
|
name: "on-before-request",
|
|
19
19
|
hooks: {
|
|
20
20
|
onBeforeRequest: o.configuration.onBeforeRequest
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
return b(() => {
|
|
24
|
-
l.value &&
|
|
24
|
+
l.value && p({
|
|
25
25
|
el: l.value,
|
|
26
26
|
configuration: {
|
|
27
27
|
...o.configuration,
|
|
@@ -36,7 +36,7 @@ const z = /* @__PURE__ */ E({
|
|
|
36
36
|
var i, s;
|
|
37
37
|
if (!e)
|
|
38
38
|
return;
|
|
39
|
-
const r =
|
|
39
|
+
const r = h(e, u || {});
|
|
40
40
|
r != null && r.length && (a.activeCollection.value && ((i = c.value) == null || i.resetStore()), n.importSpecFile(void 0, "default", {
|
|
41
41
|
dereferencedDocument: e,
|
|
42
42
|
shouldLoad: !1,
|
|
@@ -50,7 +50,7 @@ const z = /* @__PURE__ */ E({
|
|
|
50
50
|
(e, u) => {
|
|
51
51
|
if (!u || !a.activeCollection.value)
|
|
52
52
|
return;
|
|
53
|
-
const r = a.activeCollection.value, i =
|
|
53
|
+
const r = a.activeCollection.value, i = h(u, e);
|
|
54
54
|
if (!i.some(
|
|
55
55
|
(t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
|
|
56
56
|
)) {
|
|
@@ -60,7 +60,7 @@ const z = /* @__PURE__ */ E({
|
|
|
60
60
|
r.servers.forEach((f) => {
|
|
61
61
|
n.serverMutators.delete(f, r.uid);
|
|
62
62
|
});
|
|
63
|
-
const t =
|
|
63
|
+
const t = C(
|
|
64
64
|
e.servers ?? o.dereferencedDocument.servers,
|
|
65
65
|
{
|
|
66
66
|
baseServerURL: e.baseServerURL
|