@scalar/api-reference 1.32.7 → 1.32.8
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 +32 -0
- package/dist/browser/standalone.js +16286 -16092
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue2.js +2 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +164 -176
- 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 +20 -20
- package/dist/components/Content/Models/Models.vue2.js +5 -4
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -1
- package/dist/components/Content/Schema/Schema.vue2.js +2 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +14 -7
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +18 -22
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +33 -34
- package/dist/components/Content/Tag/Tag.vue.js +2 -1
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue2.js +8 -6
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +28 -29
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/Section/SectionContainerAccordion.vue2.js +17 -18
- package/dist/features/Operation/Operation.vue.d.ts +6 -6
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +50 -49
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +8 -7
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +21 -28
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +33 -18
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -12
- 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 +168 -154
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -13
- 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 +113 -117
- package/dist/features/Search/SearchButton.vue.js +2 -1
- 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 +16 -16
- package/dist/features/api-client-modal/useApiClient.d.ts +5338 -5258
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/download-link/DownloadLink.vue2.js +4 -2
- package/dist/{components/Card/CardTab.vue.d.ts → features/example-responses/ExampleResponseTab.vue.d.ts} +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js +7 -0
- package/dist/{components/Card/CardTab.vue2.js → features/example-responses/ExampleResponseTab.vue2.js} +6 -6
- package/dist/{components/Card/CardTabHeader.vue.d.ts → features/example-responses/ExampleResponseTabList.vue.d.ts} +3 -3
- package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +7 -0
- package/dist/{components/Card/CardTabHeader.vue2.js → features/example-responses/ExampleResponseTabList.vue2.js} +9 -9
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +89 -96
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue2.js +26 -24
- package/dist/helpers/convert-security-scheme.js +23 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -29
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +3 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +113 -86
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +4 -0
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +64 -0
- 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 +7 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +212 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +20 -3
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +35 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
- package/dist/v2/events/definitions.js +7 -0
- package/dist/v2/events/index.d.ts +1 -1
- package/dist/v2/events/listeners.d.ts +1 -1
- package/dist/v2/hooks/useStore.js +14 -0
- package/package.json +26 -26
- package/dist/blocks/constants.js +0 -6
- package/dist/blocks/helpers/getPointer.js +0 -12
- package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
- package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
- package/dist/blocks/hooks/useBlockProps.js +0 -24
- package/dist/components/Card/Card.vue.d.ts +0 -18
- package/dist/components/Card/Card.vue.d.ts.map +0 -1
- package/dist/components/Card/Card.vue.js +0 -13
- package/dist/components/Card/CardContent.vue.d.ts +0 -19
- package/dist/components/Card/CardContent.vue.d.ts.map +0 -1
- package/dist/components/Card/CardContent.vue.js +0 -7
- package/dist/components/Card/CardContent.vue2.js +0 -27
- package/dist/components/Card/CardFooter.vue.d.ts +0 -19
- package/dist/components/Card/CardFooter.vue.d.ts.map +0 -1
- package/dist/components/Card/CardFooter.vue.js +0 -7
- package/dist/components/Card/CardFooter.vue2.js +0 -24
- package/dist/components/Card/CardHeader.vue.d.ts +0 -20
- package/dist/components/Card/CardHeader.vue.d.ts.map +0 -1
- package/dist/components/Card/CardHeader.vue.js +0 -7
- package/dist/components/Card/CardHeader.vue2.js +0 -31
- package/dist/components/Card/CardTab.vue.d.ts.map +0 -1
- package/dist/components/Card/CardTab.vue.js +0 -7
- package/dist/components/Card/CardTabHeader.vue.d.ts.map +0 -1
- package/dist/components/Card/CardTabHeader.vue.js +0 -7
- package/dist/components/Card/index.d.ts +0 -7
- package/dist/components/Card/index.d.ts.map +0 -1
- package/dist/components/Card/types.d.ts +0 -8
- package/dist/components/Card/types.d.ts.map +0 -1
- package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
- package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExamplePicker.vue.js +0 -7
- package/dist/features/example-request/ExamplePicker.vue2.js +0 -56
- package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -79
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExampleRequest.vue.js +0 -7
- package/dist/features/example-request/ExampleRequest.vue2.js +0 -361
- package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
- package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
- package/dist/features/example-request/TextSelect.vue.js +0 -48
- package/dist/features/example-request/TextSelect.vue3.js +0 -5
- package/dist/features/example-request/index.d.ts +0 -3
- package/dist/features/example-request/index.d.ts.map +0 -1
|
@@ -1,87 +1,86 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import { ScalarIconWebhooksLogo as
|
|
4
|
-
import { getOperationStability as
|
|
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
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
1
|
+
import { defineComponent as V, computed as w, useId as q, createBlock as r, openBlock as s, unref as o, withCtx as t, createVNode as a, createCommentVNode as l, createElementVNode as i, normalizeClass as y, createTextVNode as n, toDisplayString as b, createSlots as T } from "vue";
|
|
2
|
+
import { ScalarMarkdown as W, ScalarErrorBoundary as m } from "@scalar/components";
|
|
3
|
+
import { ScalarIconWebhooksLogo as E } from "@scalar/icons";
|
|
4
|
+
import { getOperationStability as S, getOperationStabilityColor as I, isOperationDeprecated as N } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import D from "../../../components/OperationPath.vue.js";
|
|
6
|
+
import L from "../components/callbacks/Callbacks.vue.js";
|
|
7
|
+
import P from "../components/OperationParameters.vue.js";
|
|
8
|
+
import R from "../components/OperationResponses.vue.js";
|
|
9
|
+
import { useConfig as $ } from "../../../hooks/useConfig.js";
|
|
10
|
+
import { useStore as z } from "../../../v2/hooks/useStore.js";
|
|
11
|
+
import A from "../../../components/Section/Section.vue.js";
|
|
12
|
+
import H from "../../../components/Section/SectionContent.vue.js";
|
|
13
|
+
import g from "../../../components/Badge/Badge.vue.js";
|
|
14
|
+
import M from "../../../components/Section/SectionHeader.vue.js";
|
|
15
|
+
import U from "../../../components/Anchor/Anchor.vue.js";
|
|
16
|
+
import j from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
17
|
+
import F from "../../../components/Section/SectionColumns.vue.js";
|
|
18
|
+
import k from "../../../components/Section/SectionColumn.vue.js";
|
|
19
|
+
import G from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
|
|
20
|
+
import J from "../../test-request-button/TestRequestButton.vue.js";
|
|
21
|
+
import K from "../../example-responses/ExampleResponses.vue.js";
|
|
22
|
+
const Q = { class: "operation-details" }, X = { class: "examples" }, be = /* @__PURE__ */ V({
|
|
22
23
|
__name: "ModernLayout",
|
|
23
24
|
props: {
|
|
24
25
|
id: {},
|
|
25
26
|
path: {},
|
|
26
27
|
method: {},
|
|
27
28
|
operation: {},
|
|
29
|
+
oldOperation: {},
|
|
28
30
|
isWebhook: { type: Boolean },
|
|
29
|
-
|
|
31
|
+
securitySchemes: {},
|
|
30
32
|
server: {},
|
|
31
|
-
request: {},
|
|
32
33
|
schemas: {}
|
|
33
34
|
},
|
|
34
35
|
emits: ["update:modelValue"],
|
|
35
|
-
setup(d, { emit:
|
|
36
|
-
const u =
|
|
37
|
-
|
|
38
|
-
return ((e = d.operation) == null ? void 0 : e.summary) || d.path || "";
|
|
39
|
-
}), T = w, c = O(), E = z(), f = (e) => {
|
|
40
|
-
T("update:modelValue", e);
|
|
36
|
+
setup(d, { emit: v }) {
|
|
37
|
+
const p = w(() => d.operation.summary || d.path || ""), C = v, u = q(), { workspace: B } = z(), O = $(), c = (e) => {
|
|
38
|
+
C("update:modelValue", e);
|
|
41
39
|
};
|
|
42
|
-
return (e, h) => (s(),
|
|
40
|
+
return (e, h) => (s(), r(o(A), {
|
|
43
41
|
id: e.id,
|
|
44
|
-
"aria-labelledby": o(
|
|
45
|
-
label:
|
|
42
|
+
"aria-labelledby": o(u),
|
|
43
|
+
label: p.value,
|
|
46
44
|
tabindex: "-1"
|
|
47
45
|
}, {
|
|
48
46
|
default: t(() => [
|
|
49
|
-
a(o(
|
|
50
|
-
loading: o(
|
|
47
|
+
a(o(H), {
|
|
48
|
+
loading: o(O).isLoading
|
|
51
49
|
}, {
|
|
52
50
|
default: t(() => [
|
|
53
|
-
o(
|
|
51
|
+
o(S)(e.operation) ? (s(), r(o(g), {
|
|
54
52
|
key: 0,
|
|
55
|
-
class:
|
|
53
|
+
class: y(["capitalize", o(I)(e.operation)])
|
|
56
54
|
}, {
|
|
57
55
|
default: t(() => [
|
|
58
|
-
|
|
56
|
+
n(b(o(S)(e.operation)), 1)
|
|
59
57
|
]),
|
|
60
58
|
_: 1
|
|
61
|
-
}, 8, ["class"])) :
|
|
62
|
-
e.isWebhook ? (s(),
|
|
59
|
+
}, 8, ["class"])) : l("", !0),
|
|
60
|
+
e.isWebhook ? (s(), r(o(g), {
|
|
63
61
|
key: 1,
|
|
64
62
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
65
63
|
}, {
|
|
66
64
|
default: t(() => [
|
|
67
|
-
a(o(
|
|
68
|
-
h[0] || (h[0] =
|
|
65
|
+
a(o(E), { weight: "bold" }),
|
|
66
|
+
h[0] || (h[0] = n("Webhook "))
|
|
69
67
|
]),
|
|
70
|
-
_: 1
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
_: 1,
|
|
69
|
+
__: [0]
|
|
70
|
+
})) : l("", !0),
|
|
71
|
+
i("div", {
|
|
72
|
+
class: y(o(N)(e.operation) ? "deprecated" : "")
|
|
74
73
|
}, [
|
|
75
|
-
a(o(
|
|
74
|
+
a(o(M), null, {
|
|
76
75
|
default: t(() => [
|
|
77
|
-
a(o(
|
|
76
|
+
a(o(U), { id: e.id }, {
|
|
78
77
|
default: t(() => [
|
|
79
|
-
a(o(
|
|
80
|
-
id: o(
|
|
78
|
+
a(o(j), {
|
|
79
|
+
id: o(u),
|
|
81
80
|
level: 3
|
|
82
81
|
}, {
|
|
83
82
|
default: t(() => [
|
|
84
|
-
|
|
83
|
+
n(b(p.value), 1)
|
|
85
84
|
]),
|
|
86
85
|
_: 1
|
|
87
86
|
}, 8, ["id"])
|
|
@@ -92,97 +91,94 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
|
|
|
92
91
|
_: 1
|
|
93
92
|
})
|
|
94
93
|
], 2),
|
|
95
|
-
a(o(
|
|
94
|
+
a(o(F), null, {
|
|
96
95
|
default: t(() => [
|
|
97
|
-
a(o(
|
|
98
|
-
default: t(() =>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
})
|
|
133
|
-
])
|
|
134
|
-
];
|
|
135
|
-
}),
|
|
96
|
+
a(o(k), null, {
|
|
97
|
+
default: t(() => [
|
|
98
|
+
i("div", Q, [
|
|
99
|
+
a(o(W), {
|
|
100
|
+
value: e.operation.description,
|
|
101
|
+
withImages: "",
|
|
102
|
+
withAnchors: "",
|
|
103
|
+
transformType: "heading",
|
|
104
|
+
anchorPrefix: e.id
|
|
105
|
+
}, null, 8, ["value", "anchorPrefix"]),
|
|
106
|
+
a(P, {
|
|
107
|
+
parameters: e.oldOperation.parameters,
|
|
108
|
+
requestBody: e.oldOperation.requestBody,
|
|
109
|
+
schemas: e.schemas,
|
|
110
|
+
"onUpdate:modelValue": c
|
|
111
|
+
}, null, 8, ["parameters", "requestBody", "schemas"]),
|
|
112
|
+
a(R, {
|
|
113
|
+
responses: e.oldOperation.responses,
|
|
114
|
+
schemas: e.schemas
|
|
115
|
+
}, null, 8, ["responses", "schemas"]),
|
|
116
|
+
a(o(m), null, {
|
|
117
|
+
default: t(() => [
|
|
118
|
+
e.operation.callbacks ? (s(), r(L, {
|
|
119
|
+
key: 0,
|
|
120
|
+
class: "mt-6",
|
|
121
|
+
path: e.path,
|
|
122
|
+
callbacks: e.operation.callbacks,
|
|
123
|
+
method: e.method,
|
|
124
|
+
schemas: e.schemas
|
|
125
|
+
}, null, 8, ["path", "callbacks", "method", "schemas"])) : l("", !0)
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
})
|
|
129
|
+
])
|
|
130
|
+
]),
|
|
136
131
|
_: 1
|
|
137
132
|
}),
|
|
138
|
-
a(o(
|
|
133
|
+
a(o(k), null, {
|
|
139
134
|
default: t(() => [
|
|
140
|
-
|
|
141
|
-
a(o(
|
|
135
|
+
i("div", X, [
|
|
136
|
+
a(o(m), null, {
|
|
142
137
|
default: t(() => [
|
|
143
|
-
a(o(
|
|
144
|
-
request: e.request,
|
|
138
|
+
a(o(G), {
|
|
145
139
|
method: e.method,
|
|
146
|
-
|
|
140
|
+
selectedServer: e.server,
|
|
141
|
+
securitySchemes: e.securitySchemes,
|
|
142
|
+
selectedClient: o(B)["x-scalar-default-client"],
|
|
143
|
+
path: e.path,
|
|
147
144
|
fallback: "",
|
|
148
145
|
operation: e.operation,
|
|
149
|
-
server: e.server,
|
|
150
146
|
schemas: e.schemas,
|
|
151
|
-
"onUpdate:modelValue":
|
|
152
|
-
},
|
|
147
|
+
"onUpdate:modelValue": c
|
|
148
|
+
}, T({
|
|
153
149
|
header: t(() => {
|
|
154
|
-
var
|
|
150
|
+
var f;
|
|
155
151
|
return [
|
|
156
|
-
a(
|
|
152
|
+
a(D, {
|
|
157
153
|
class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
|
|
158
|
-
deprecated: (
|
|
154
|
+
deprecated: (f = e.operation) == null ? void 0 : f.deprecated,
|
|
159
155
|
path: e.path
|
|
160
156
|
}, null, 8, ["deprecated", "path"])
|
|
161
157
|
];
|
|
162
158
|
}),
|
|
163
159
|
_: 2
|
|
164
160
|
}, [
|
|
165
|
-
e.
|
|
161
|
+
e.isWebhook ? void 0 : {
|
|
166
162
|
name: "footer",
|
|
167
163
|
fn: t(() => [
|
|
168
|
-
a(o(
|
|
164
|
+
a(o(J), {
|
|
165
|
+
method: e.method,
|
|
166
|
+
path: e.path
|
|
167
|
+
}, null, 8, ["method", "path"])
|
|
169
168
|
]),
|
|
170
169
|
key: "0"
|
|
171
|
-
}
|
|
172
|
-
]), 1032, ["
|
|
170
|
+
}
|
|
171
|
+
]), 1032, ["method", "selectedServer", "securitySchemes", "selectedClient", "path", "operation", "schemas"])
|
|
173
172
|
]),
|
|
174
173
|
_: 1
|
|
175
174
|
}),
|
|
176
|
-
a(o(
|
|
177
|
-
default: t(() =>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}, null, 8, ["responses"])
|
|
184
|
-
];
|
|
185
|
-
}),
|
|
175
|
+
a(o(m), null, {
|
|
176
|
+
default: t(() => [
|
|
177
|
+
a(o(K), {
|
|
178
|
+
responses: e.operation.responses,
|
|
179
|
+
style: { "margin-top": "12px" }
|
|
180
|
+
}, null, 8, ["responses"])
|
|
181
|
+
]),
|
|
186
182
|
_: 1
|
|
187
183
|
})
|
|
188
184
|
])
|
|
@@ -201,5 +197,5 @@ const Z = { class: "operation-details" }, _ = { class: "examples" }, ke = /* @__
|
|
|
201
197
|
}
|
|
202
198
|
});
|
|
203
199
|
export {
|
|
204
|
-
|
|
200
|
+
be as default
|
|
205
201
|
};
|
|
@@ -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":"AAoTA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAU3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAgBhD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;AAoaF,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-6fcd2762"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -7,8 +7,8 @@ import { nanoid as le } from "nanoid";
|
|
|
7
7
|
import { lazyBus as ie } from "../../components/Content/Lazy/lazyBus.js";
|
|
8
8
|
import { useSearchIndex as ce } from "./useSearchIndex.js";
|
|
9
9
|
import de from "../sidebar/components/SidebarHttpBadge.vue.js";
|
|
10
|
-
import { useSidebar as
|
|
11
|
-
const
|
|
10
|
+
import { useSidebar as ue } from "../sidebar/hooks/useSidebar.js";
|
|
11
|
+
const me = { class: "sr-only" }, pe = { class: "inline-flex items-center gap-1" }, fe = { class: "sr-only" }, Be = /* @__PURE__ */ Y({
|
|
12
12
|
__name: "SearchModal",
|
|
13
13
|
props: {
|
|
14
14
|
parsedSpec: {},
|
|
@@ -16,16 +16,16 @@ const ue = { class: "sr-only" }, pe = { class: "inline-flex items-center gap-1"
|
|
|
16
16
|
hideModels: { type: Boolean }
|
|
17
17
|
},
|
|
18
18
|
setup(q) {
|
|
19
|
-
const
|
|
19
|
+
const u = q, D = _(u, "parsedSpec"), S = le(), k = `${S}-search-result`, x = `${S}-search-instructions`, v = (o) => `${S}${o}`, {
|
|
20
20
|
resetSearch: F,
|
|
21
21
|
fuseSearch: H,
|
|
22
22
|
selectedSearchIndex: r,
|
|
23
23
|
selectedSearchResult: B,
|
|
24
|
-
searchResultsWithPlaceholderResults:
|
|
24
|
+
searchResultsWithPlaceholderResults: m,
|
|
25
25
|
searchText: f
|
|
26
26
|
} = ce({
|
|
27
27
|
specification: D,
|
|
28
|
-
hideModels:
|
|
28
|
+
hideModels: u.hideModels
|
|
29
29
|
}), P = {
|
|
30
30
|
heading: re,
|
|
31
31
|
model: ne,
|
|
@@ -40,22 +40,22 @@ const ue = { class: "sr-only" }, pe = { class: "inline-flex items-center gap-1"
|
|
|
40
40
|
webhook: "Webhook"
|
|
41
41
|
}, K = j(null);
|
|
42
42
|
M(
|
|
43
|
-
() =>
|
|
43
|
+
() => u.modalState.open,
|
|
44
44
|
(o) => {
|
|
45
45
|
o && F();
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
const { setCollapsedSidebarItem: W } =
|
|
48
|
+
const { setCollapsedSidebarItem: W } = ue(), z = /#(tag\/[^/]*)/;
|
|
49
49
|
function T(o) {
|
|
50
50
|
let t = "models";
|
|
51
51
|
const e = o.item.href.match(z);
|
|
52
52
|
e != null && e.length && e.length > 1 && (t = e[1]), W(t, !0);
|
|
53
53
|
const s = o.item.href.replace("#", "");
|
|
54
54
|
if (document.getElementById(s))
|
|
55
|
-
N(s),
|
|
55
|
+
N(s), u.modalState.hide();
|
|
56
56
|
else {
|
|
57
57
|
const l = ie.on((h) => {
|
|
58
|
-
h.id === s && (N(s), l(),
|
|
58
|
+
h.id === s && (N(s), l(), u.modalState.hide());
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -63,14 +63,14 @@ const ue = { class: "sr-only" }, pe = { class: "inline-flex items-center gap-1"
|
|
|
63
63
|
var s;
|
|
64
64
|
if (typeof o != "number")
|
|
65
65
|
return;
|
|
66
|
-
const t =
|
|
66
|
+
const t = m.value[o], e = v(t == null ? void 0 : t.item.href);
|
|
67
67
|
(s = document.getElementById(e)) == null || s.scrollIntoView({
|
|
68
68
|
behavior: "smooth",
|
|
69
69
|
block: "nearest"
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
72
|
const V = (o) => {
|
|
73
|
-
const t = o === "up" ? -1 : 1, e =
|
|
73
|
+
const t = o === "up" ? -1 : 1, e = m.value.length;
|
|
74
74
|
if (typeof r.value == "number") {
|
|
75
75
|
const s = (r.value + t + e) % e;
|
|
76
76
|
r.value = s;
|
|
@@ -84,8 +84,8 @@ const ue = { class: "sr-only" }, pe = { class: "inline-flex items-center gap-1"
|
|
|
84
84
|
function O() {
|
|
85
85
|
if (!ae(r.value))
|
|
86
86
|
return;
|
|
87
|
-
const o =
|
|
88
|
-
T(o[r.value]);
|
|
87
|
+
const o = m.value;
|
|
88
|
+
o.length !== 0 && T(o[r.value]);
|
|
89
89
|
}
|
|
90
90
|
return (o, t) => (p(), $(n(Z), {
|
|
91
91
|
"aria-label": "Reference Search",
|
|
@@ -120,13 +120,13 @@ const ue = { class: "sr-only" }, pe = { class: "inline-flex items-center gap-1"
|
|
|
120
120
|
id: k,
|
|
121
121
|
"aria-label": "Reference Search Results",
|
|
122
122
|
class: "ref-search-results custom-scroll",
|
|
123
|
-
noResults: !n(
|
|
123
|
+
noResults: !n(m).length
|
|
124
124
|
}, {
|
|
125
125
|
query: i(() => [
|
|
126
126
|
c(d(n(f)), 1)
|
|
127
127
|
]),
|
|
128
128
|
default: i(() => [
|
|
129
|
-
(p(!0), R(w, null, J(n(
|
|
129
|
+
(p(!0), R(w, null, J(n(m), (e, s) => (p(), $(n(oe), {
|
|
130
130
|
id: v(e.item.href),
|
|
131
131
|
key: e.refIndex,
|
|
132
132
|
href: A(e.item.href),
|
|
@@ -143,7 +143,7 @@ const ue = { class: "sr-only" }, pe = { class: "inline-flex items-center gap-1"
|
|
|
143
143
|
deprecated: (h = (l = e.item.operation) == null ? void 0 : l.information) == null ? void 0 : h.deprecated
|
|
144
144
|
})
|
|
145
145
|
}, [
|
|
146
|
-
a("span",
|
|
146
|
+
a("span", me, [
|
|
147
147
|
c(d(U[e.item.type]) + ": ", 1),
|
|
148
148
|
(C = (y = e.item.operation) == null ? void 0 : y.information) != null && C.deprecated ? (p(), R(w, { key: 0 }, [
|
|
149
149
|
c(" (Deprecated) ")
|