@scalar/api-reference 1.25.72 → 1.25.75
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 +65 -0
- package/dist/browser/standalone.js +12636 -12567
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +2 -2
- 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 +3 -3
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +32 -32
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +10 -11
- 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 +12 -12
- package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +19 -19
- package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue2.js +30 -29
- package/dist/components/Section/CompactSection.vue.js +2 -2
- package/dist/components/Section/CompactSection.vue2.js +9 -8
- package/dist/components/Section/SectionColumn.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionColumn.vue.js +4 -4
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/Section/SectionHeader.vue.d.ts +2 -2
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue2.js +16 -14
- package/dist/components/ShowMoreButton.vue.js +2 -2
- 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 +3 -2
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +76 -74
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +3 -3
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +5 -5
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +2 -2
- package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +3 -3
- package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +7 -7
- 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 +3 -4
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts.map +1 -1
- 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/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +95 -95
- package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/features/Search/SearchButton.vue2.js +25 -28
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +51 -48
- package/dist/helpers/getExampleCode.d.ts +1 -1
- package/dist/helpers/getExampleCode.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.js +0 -1
- package/dist/index.js +1 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +2 -2
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +3 -3
- package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f, openBlock as e, createBlock as m, unref as a, withCtx as c, createElementVNode as p, normalizeClass as o, createVNode as d, createElementBlock as l, Fragment as
|
|
1
|
+
import { defineComponent as f, openBlock as e, createBlock as m, unref as a, withCtx as c, createElementVNode as p, normalizeClass as o, createVNode as d, createElementBlock as l, Fragment as i, createTextVNode as u, renderList as _ } from "vue";
|
|
2
2
|
import v from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
3
3
|
import { Disclosure as k, DisclosureButton as B, DisclosurePanel as H } from "@headlessui/vue";
|
|
4
4
|
import { ScalarIcon as S } from "@scalar/components";
|
|
@@ -29,11 +29,11 @@ const V = /* @__PURE__ */ f({
|
|
|
29
29
|
d(a(S), {
|
|
30
30
|
class: o(["headers-card-title-icon", { "headers-card-title-icon--open": r }]),
|
|
31
31
|
icon: "Add",
|
|
32
|
-
|
|
32
|
+
size: "sm"
|
|
33
33
|
}, null, 8, ["class"]),
|
|
34
|
-
r ? (e(), l(
|
|
34
|
+
r ? (e(), l(i, { key: 0 }, [
|
|
35
35
|
u(" Hide Headers ")
|
|
36
|
-
], 64)) : (e(), l(
|
|
36
|
+
], 64)) : (e(), l(i, { key: 1 }, [
|
|
37
37
|
u(" Show Headers ")
|
|
38
38
|
], 64))
|
|
39
39
|
]),
|
|
@@ -41,10 +41,10 @@ const V = /* @__PURE__ */ f({
|
|
|
41
41
|
}, 1024),
|
|
42
42
|
d(a(H), null, {
|
|
43
43
|
default: c(() => [
|
|
44
|
-
(e(!0), l(
|
|
45
|
-
key:
|
|
44
|
+
(e(!0), l(i, null, _(t.headers, (s, n) => (e(), m(v, {
|
|
45
|
+
key: n,
|
|
46
46
|
description: s.description,
|
|
47
|
-
name: `${
|
|
47
|
+
name: `${n}`,
|
|
48
48
|
value: h(s) ? s.schema : void 0
|
|
49
49
|
}, null, 8, ["description", "name", "value"]))), 128))
|
|
50
50
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParameterListItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/ParameterListItem.vue"],"names":[],"mappings":"AAmOA,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAQlE,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,SAAS,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;kBAFe,OAAO;sBACH,OAAO;;AA6O9B,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ParameterListItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const e = /* @__PURE__ */
|
|
3
|
+
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9508a2d2"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -5,7 +5,7 @@ import { ScalarIcon as T } from "@scalar/components";
|
|
|
5
5
|
import _ from "./ContentTypeSelect.vue.js";
|
|
6
6
|
import I from "./ParameterHeaders.vue.js";
|
|
7
7
|
import N from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
8
|
-
const P = { class: "parameter-item" }, j = { class: "parameter-item-name" }, E = { class: "parameter-item-type" },
|
|
8
|
+
const P = { class: "parameter-item" }, j = { class: "parameter-item-name" }, E = { class: "parameter-item-type" }, R = { class: "absolute right-0" }, J = /* @__PURE__ */ k({
|
|
9
9
|
__name: "ParameterListItem",
|
|
10
10
|
props: {
|
|
11
11
|
parameter: {},
|
|
@@ -29,8 +29,7 @@ const P = { class: "parameter-item" }, j = { class: "parameter-item-name" }, E =
|
|
|
29
29
|
r(n(T), {
|
|
30
30
|
class: "parameter-item-icon",
|
|
31
31
|
icon: p ? "ChevronDown" : "ChevronRight",
|
|
32
|
-
|
|
33
|
-
thickness: "1.75"
|
|
32
|
+
thickness: "1.5"
|
|
34
33
|
}, null, 8, ["icon"]),
|
|
35
34
|
r(V, null, {
|
|
36
35
|
default: m(() => [
|
|
@@ -40,7 +39,7 @@ const P = { class: "parameter-item" }, j = { class: "parameter-item-name" }, E =
|
|
|
40
39
|
}, 1024),
|
|
41
40
|
u("span", j, c(e.parameter.name), 1),
|
|
42
41
|
u("span", E, c(e.parameter.description), 1),
|
|
43
|
-
u("div",
|
|
42
|
+
u("div", R, [
|
|
44
43
|
a.value && t.parameter.content ? (s(), i(_, {
|
|
45
44
|
key: 0,
|
|
46
45
|
class: "parameter-item-content-type",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBodyPropertiesChild.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBodyPropertiesChild.vue"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAKhD,KAAK,WAAW,GAAG;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"RequestBodyPropertiesChild.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBodyPropertiesChild.vue"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAKhD,KAAK,WAAW,GAAG;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE,CAAC;;AAqF5D,wBAMG"}
|
|
@@ -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":"AAkSA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAShE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,oBAAoB,CAAA;CAChC,CAAC;;AAuPF,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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5753de10"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-aec31ba9"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import g from "../../../components/Section/SectionColumns.vue.js";
|
|
9
|
-
import f from "../../../components/Section/SectionColumn.vue.js";
|
|
1
|
+
import { defineComponent as c, openBlock as m, createBlock as d, unref as r, withCtx as t, createVNode as e, createTextVNode as u, createCommentVNode as _, createElementVNode as a, normalizeClass as h, toDisplayString as S } from "vue";
|
|
2
|
+
import C from "../../../components/OperationPath.vue.js";
|
|
3
|
+
import { ScalarMarkdown as v, ScalarErrorBoundary as f } from "@scalar/components";
|
|
4
|
+
import k from "../components/OperationParameters.vue.js";
|
|
5
|
+
import y from "../components/OperationResponses.vue.js";
|
|
6
|
+
import B from "../../../components/Section/Section.vue.js";
|
|
7
|
+
import g from "../../../components/Section/SectionContent.vue.js";
|
|
10
8
|
import E from "../../../components/Badge/Badge.vue.js";
|
|
11
9
|
import N from "../../../components/Section/SectionHeader.vue.js";
|
|
12
10
|
import V from "../../../components/Anchor/Anchor.vue.js";
|
|
13
|
-
import b from "
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
11
|
+
import b from "../../../components/Section/SectionColumns.vue.js";
|
|
12
|
+
import s from "../../../components/Section/SectionColumn.vue.js";
|
|
13
|
+
import w from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
14
|
+
import R from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
15
|
+
import q from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
16
|
+
const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__PURE__ */ c({
|
|
17
17
|
__name: "ModernLayout",
|
|
18
18
|
props: {
|
|
19
19
|
id: {},
|
|
20
20
|
operation: {}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
return (o,
|
|
22
|
+
setup(T) {
|
|
23
|
+
return (o, n) => (m(), d(r(B), {
|
|
24
24
|
id: o.id,
|
|
25
25
|
label: o.operation.name
|
|
26
26
|
}, {
|
|
27
27
|
default: t(() => [
|
|
28
|
-
e(r(
|
|
29
|
-
default: t(() =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
e(r(g), null, {
|
|
29
|
+
default: t(() => {
|
|
30
|
+
var i, p;
|
|
31
|
+
return [
|
|
32
|
+
(i = o.operation.information) != null && i.deprecated ? (m(), d(r(E), { key: 0 }, {
|
|
33
|
+
default: t(() => n[0] || (n[0] = [
|
|
34
|
+
u(" Deprecated ")
|
|
35
|
+
])),
|
|
36
|
+
_: 1
|
|
37
|
+
})) : _("", !0),
|
|
38
|
+
a("div", {
|
|
39
|
+
class: h((p = o.operation.information) != null && p.deprecated ? "deprecated" : "")
|
|
40
|
+
}, [
|
|
41
|
+
e(r(N), { level: 3 }, {
|
|
42
|
+
default: t(() => [
|
|
43
|
+
e(r(V), {
|
|
44
|
+
id: o.id ?? ""
|
|
45
|
+
}, {
|
|
46
|
+
default: t(() => [
|
|
47
|
+
u(S(o.operation.name), 1)
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 8, ["id"])
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
})
|
|
54
|
+
], 2),
|
|
55
|
+
e(r(b), null, {
|
|
56
|
+
default: t(() => [
|
|
57
|
+
e(r(s), null, {
|
|
58
|
+
default: t(() => [
|
|
59
|
+
a("div", D, [
|
|
60
|
+
e(r(v), {
|
|
61
|
+
value: o.operation.description,
|
|
62
|
+
withImages: ""
|
|
63
|
+
}, null, 8, ["value"]),
|
|
64
|
+
e(k, { operation: o.operation }, null, 8, ["operation"]),
|
|
65
|
+
e(y, { operation: o.operation }, null, 8, ["operation"])
|
|
66
|
+
])
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
}),
|
|
70
|
+
e(r(s), null, {
|
|
71
|
+
default: t(() => [
|
|
72
|
+
a("div", M, [
|
|
73
|
+
e(r(f), null, {
|
|
46
74
|
default: t(() => [
|
|
47
|
-
e(r(
|
|
48
|
-
|
|
75
|
+
e(r(w), {
|
|
76
|
+
fallback: "",
|
|
77
|
+
operation: o.operation
|
|
49
78
|
}, {
|
|
50
|
-
|
|
51
|
-
|
|
79
|
+
header: t(() => {
|
|
80
|
+
var l;
|
|
81
|
+
return [
|
|
82
|
+
e(C, {
|
|
83
|
+
class: "example-path",
|
|
84
|
+
deprecated: (l = o.operation.information) == null ? void 0 : l.deprecated,
|
|
85
|
+
path: o.operation.path
|
|
86
|
+
}, null, 8, ["deprecated", "path"])
|
|
87
|
+
];
|
|
88
|
+
}),
|
|
89
|
+
footer: t(() => [
|
|
90
|
+
e(r(R), { operation: o.operation }, null, 8, ["operation"])
|
|
52
91
|
]),
|
|
53
92
|
_: 1
|
|
54
|
-
}, 8, ["
|
|
93
|
+
}, 8, ["operation"])
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
}),
|
|
97
|
+
e(r(f), null, {
|
|
98
|
+
default: t(() => [
|
|
99
|
+
e(r(q), {
|
|
100
|
+
operation: o.operation,
|
|
101
|
+
style: { "margin-top": "12px" }
|
|
102
|
+
}, null, 8, ["operation"])
|
|
55
103
|
]),
|
|
56
104
|
_: 1
|
|
57
105
|
})
|
|
58
|
-
], 2),
|
|
59
|
-
n("div", q, [
|
|
60
|
-
e(r(C), {
|
|
61
|
-
value: o.operation.description,
|
|
62
|
-
withImages: ""
|
|
63
|
-
}, null, 8, ["value"]),
|
|
64
|
-
e(v, { operation: o.operation }, null, 8, ["operation"]),
|
|
65
|
-
e(k, { operation: o.operation }, null, 8, ["operation"])
|
|
66
106
|
])
|
|
67
|
-
]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
default: t(() => [
|
|
76
|
-
e(r(b), {
|
|
77
|
-
fallback: "",
|
|
78
|
-
operation: o.operation
|
|
79
|
-
}, {
|
|
80
|
-
header: t(() => {
|
|
81
|
-
var a;
|
|
82
|
-
return [
|
|
83
|
-
e(S, {
|
|
84
|
-
class: "example-path",
|
|
85
|
-
deprecated: (a = o.operation.information) == null ? void 0 : a.deprecated,
|
|
86
|
-
path: o.operation.path
|
|
87
|
-
}, null, 8, ["deprecated", "path"])
|
|
88
|
-
];
|
|
89
|
-
}),
|
|
90
|
-
footer: t(() => [
|
|
91
|
-
e(r(w), { operation: o.operation }, null, 8, ["operation"])
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
}, 8, ["operation"])
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
}),
|
|
98
|
-
e(r(u), null, {
|
|
99
|
-
default: t(() => [
|
|
100
|
-
e(r(R), {
|
|
101
|
-
operation: o.operation,
|
|
102
|
-
style: { "margin-top": "12px" }
|
|
103
|
-
}, null, 8, ["operation"])
|
|
104
|
-
]),
|
|
105
|
-
_: 1
|
|
106
|
-
})
|
|
107
|
-
])
|
|
108
|
-
]),
|
|
109
|
-
_: 1
|
|
110
|
-
})
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
})
|
|
114
|
-
]),
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
})
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})
|
|
113
|
+
];
|
|
114
|
+
}),
|
|
115
115
|
_: 1
|
|
116
116
|
})
|
|
117
117
|
]),
|
|
@@ -120,5 +120,5 @@ const q = { class: "operation-details" }, D = { class: "examples" }, U = /* @__P
|
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
export {
|
|
123
|
-
|
|
123
|
+
W as default
|
|
124
124
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Search/SearchButton.vue"],"names":[],"mappings":"AAyHA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAShD,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;kBADe,MAAM;;AA2HzB,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SearchButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ce119e9f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,57 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { useMagicKeys as
|
|
1
|
+
import { defineComponent as u, openBlock as h, createElementBlock as f, Fragment as y, createElementVNode as t, normalizeClass as S, unref as a, createVNode as l, toDisplayString as c } from "vue";
|
|
2
|
+
import { useModal as k, ScalarIcon as b } from "@scalar/components";
|
|
3
|
+
import { useMagicKeys as v, useEventListener as K } from "@vueuse/core";
|
|
4
4
|
import g from "./SearchModal.vue.js";
|
|
5
5
|
import { isMacOs as r } from "../../helpers/isMacOs.js";
|
|
6
6
|
import { useApiClient as w } from "../ApiClientModal/useApiClient.js";
|
|
7
|
-
const C = { class: "sidebar-search-input" },
|
|
7
|
+
const C = { class: "sidebar-search-input" }, E = { class: "sidebar-search-shortcut" }, M = { class: "sidebar-search-key" }, O = /* @__PURE__ */ u({
|
|
8
8
|
__name: "SearchButton",
|
|
9
9
|
props: {
|
|
10
10
|
spec: {},
|
|
11
11
|
searchHotKey: { default: "k" }
|
|
12
12
|
},
|
|
13
13
|
setup(i) {
|
|
14
|
-
const
|
|
14
|
+
const p = i, o = k(), { client: d } = w(), n = v({
|
|
15
15
|
passive: !1,
|
|
16
|
-
onEventFired(
|
|
17
|
-
!r() &&
|
|
16
|
+
onEventFired(s) {
|
|
17
|
+
!r() && s.ctrlKey && s.key === p.searchHotKey && (s.preventDefault(), s.stopPropagation());
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
), (e, s) => (u(), f(y, null, [
|
|
27
|
-
o("button", {
|
|
28
|
-
class: S(["sidebar-search", e.$attrs.class]),
|
|
20
|
+
return K(document, "keydown", (s) => {
|
|
21
|
+
var e;
|
|
22
|
+
(r() ? n.meta.value : n.ctrl.value) && s.key === "k" && ((e = d.value) != null && e.modalState.open || (o.open ? o.hide() : o.show()));
|
|
23
|
+
}), (s, e) => (h(), f(y, null, [
|
|
24
|
+
t("button", {
|
|
25
|
+
class: S(["sidebar-search", s.$attrs.class]),
|
|
29
26
|
type: "button",
|
|
30
|
-
onClick:
|
|
31
|
-
(...m) => a(
|
|
27
|
+
onClick: e[0] || (e[0] = //@ts-ignore
|
|
28
|
+
(...m) => a(o).show && a(o).show(...m))
|
|
32
29
|
}, [
|
|
33
|
-
l(a(
|
|
30
|
+
l(a(b), {
|
|
34
31
|
class: "scalar-search-icon",
|
|
35
32
|
icon: "Search",
|
|
36
33
|
size: "sm",
|
|
37
34
|
thickness: "2.5"
|
|
38
35
|
}),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
t("div", C, [
|
|
37
|
+
e[2] || (e[2] = t("span", { class: "sr-only" }, "Open ", -1)),
|
|
38
|
+
e[3] || (e[3] = t("span", { class: "sidebar-search-placeholder" }, "Search", -1)),
|
|
39
|
+
t("span", E, [
|
|
40
|
+
e[1] || (e[1] = t("span", { class: "sr-only" }, "(Keyboard Shortcut)", -1)),
|
|
41
|
+
t("kbd", M, c(a(r)() ? "⌘" : "⌃") + c(s.searchHotKey), 1)
|
|
45
42
|
])
|
|
46
43
|
])
|
|
47
44
|
], 2),
|
|
48
45
|
l(g, {
|
|
49
|
-
modalState: a(
|
|
50
|
-
parsedSpec:
|
|
46
|
+
modalState: a(o),
|
|
47
|
+
parsedSpec: s.spec
|
|
51
48
|
}, null, 8, ["modalState", "parsedSpec"])
|
|
52
49
|
], 64));
|
|
53
50
|
}
|
|
54
51
|
});
|
|
55
52
|
export {
|
|
56
|
-
|
|
53
|
+
O as default
|
|
57
54
|
};
|
|
@@ -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,EACL,KAAK,QAAQ,EAId,MAAM,aAAa,CAAA;AAEpB,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,EACL,KAAK,QAAQ,EAId,MAAM,aAAa,CAAA;AAEpB,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;uBA4ByB,IAAI;sBAbL,IAAI;;;;EA4K5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ref as
|
|
1
|
+
import N from "fuse.js";
|
|
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 { useSidebar as B } from "../../hooks/useSidebar.js";
|
|
5
5
|
import { getHeadingsFromMarkdown as P } from "../../helpers/getHeadingsFromMarkdown.js";
|
|
@@ -9,56 +9,59 @@ import { useNavState as J } from "../../hooks/useNavState.js";
|
|
|
9
9
|
function te({
|
|
10
10
|
specification: a
|
|
11
11
|
}) {
|
|
12
|
-
const { getHeadingId:
|
|
12
|
+
const { getHeadingId: T, getWebhookId: j, getModelId: L, getOperationId: W, getTagId: q } = J(), { hideModels: C } = B(), o = h([]), r = h([]), d = h(0), s = h(""), i = new N(o.value, {
|
|
13
13
|
keys: ["title", "description", "body"]
|
|
14
|
-
}),
|
|
15
|
-
|
|
14
|
+
}), p = () => {
|
|
15
|
+
d.value = 0, r.value = i.search(s.value);
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
R(s, (l) => {
|
|
18
|
+
l.length ? p() : r.value = [];
|
|
19
|
+
});
|
|
20
|
+
function F() {
|
|
21
|
+
s.value = "", d.value = 0, r.value = [];
|
|
19
22
|
}
|
|
20
|
-
const
|
|
21
|
-
() => s.value.length === 0 ? o.value.slice(0, 25).map((
|
|
22
|
-
item:
|
|
23
|
-
})) :
|
|
23
|
+
const H = V(
|
|
24
|
+
() => s.value.length === 0 ? o.value.slice(0, 25).map((u) => ({
|
|
25
|
+
item: u
|
|
26
|
+
})) : r.value.slice(0, 25)
|
|
24
27
|
);
|
|
25
|
-
return
|
|
28
|
+
return R(
|
|
26
29
|
a.value,
|
|
27
30
|
async () => {
|
|
28
|
-
var
|
|
29
|
-
if (o.value = [], !((
|
|
30
|
-
|
|
31
|
+
var y, g, I, k, M, w, D, $, E;
|
|
32
|
+
if (o.value = [], !((g = (y = a.value) == null ? void 0 : y.tags) != null && g.length) && !((k = (I = a.value) == null ? void 0 : I.webhooks) != null && k.length)) {
|
|
33
|
+
i.setCollection([]);
|
|
31
34
|
return;
|
|
32
35
|
}
|
|
33
|
-
const
|
|
34
|
-
((
|
|
36
|
+
const l = [], u = P(
|
|
37
|
+
((w = (M = a.value) == null ? void 0 : M.info) == null ? void 0 : w.description) ?? ""
|
|
35
38
|
);
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
u.length && (u.forEach((e) => {
|
|
40
|
+
l.push({
|
|
38
41
|
type: "heading",
|
|
39
42
|
title: `Info > ${e.value}`,
|
|
40
43
|
description: "",
|
|
41
|
-
href: `#${
|
|
44
|
+
href: `#${T(e)}`,
|
|
42
45
|
tag: e.slug,
|
|
43
46
|
body: ""
|
|
44
47
|
});
|
|
45
|
-
}), o.value = o.value.concat(
|
|
46
|
-
const
|
|
48
|
+
}), o.value = o.value.concat(l)), ($ = (D = a.value) == null ? void 0 : D.tags) == null || $.forEach((e) => {
|
|
49
|
+
const S = {
|
|
47
50
|
title: e["x-displayName"] ?? e.name,
|
|
48
|
-
href: `#${
|
|
51
|
+
href: `#${q(e)}`,
|
|
49
52
|
description: e.description,
|
|
50
53
|
type: "tag",
|
|
51
54
|
tag: e.name,
|
|
52
55
|
body: ""
|
|
53
56
|
};
|
|
54
|
-
o.value.push(
|
|
55
|
-
const { parameterMap:
|
|
56
|
-
let
|
|
57
|
-
typeof
|
|
58
|
-
const
|
|
57
|
+
o.value.push(S), e.operations && e.operations.forEach((t) => {
|
|
58
|
+
const { parameterMap: n } = z(t), x = A(t) || n.value;
|
|
59
|
+
let f = null;
|
|
60
|
+
typeof x != "boolean" && (f = x);
|
|
61
|
+
const O = {
|
|
59
62
|
type: "req",
|
|
60
63
|
title: t.name ?? t.path,
|
|
61
|
-
href: `#${
|
|
64
|
+
href: `#${W(t, e)}`,
|
|
62
65
|
operationId: t.operationId,
|
|
63
66
|
description: t.description ?? "",
|
|
64
67
|
httpVerb: t.httpVerb,
|
|
@@ -66,44 +69,44 @@ function te({
|
|
|
66
69
|
tag: e.name,
|
|
67
70
|
operation: t
|
|
68
71
|
};
|
|
69
|
-
|
|
72
|
+
f && (O.body = f), o.value.push(O);
|
|
70
73
|
});
|
|
71
74
|
});
|
|
72
|
-
const
|
|
73
|
-
|
|
75
|
+
const c = (E = a.value) == null ? void 0 : E.webhooks, m = [];
|
|
76
|
+
c && Object.keys(c).forEach((e) => {
|
|
74
77
|
Object.keys(
|
|
75
|
-
|
|
78
|
+
c[e]
|
|
76
79
|
).forEach((t) => {
|
|
77
|
-
var
|
|
78
|
-
|
|
80
|
+
var n;
|
|
81
|
+
m.push({
|
|
79
82
|
type: "webhook",
|
|
80
|
-
title: `Webhook: ${(
|
|
81
|
-
href: `#${
|
|
83
|
+
title: `Webhook: ${(n = c[e][t]) == null ? void 0 : n.name}`,
|
|
84
|
+
href: `#${j(e, t)}`,
|
|
82
85
|
description: e,
|
|
83
86
|
httpVerb: t,
|
|
84
87
|
tag: e,
|
|
85
88
|
body: ""
|
|
86
89
|
});
|
|
87
|
-
}), o.value = o.value.concat(
|
|
90
|
+
}), o.value = o.value.concat(m);
|
|
88
91
|
});
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
const v = C.value ? {} : G(a.value), b = [];
|
|
93
|
+
v && (Object.keys(v).forEach((e) => {
|
|
94
|
+
b.push({
|
|
92
95
|
type: "model",
|
|
93
96
|
title: "Model",
|
|
94
|
-
href: `#${
|
|
95
|
-
description:
|
|
97
|
+
href: `#${L(e)}`,
|
|
98
|
+
description: v[e].title ?? e,
|
|
96
99
|
tag: e,
|
|
97
100
|
body: ""
|
|
98
101
|
});
|
|
99
|
-
}), o.value = o.value.concat(
|
|
102
|
+
}), o.value = o.value.concat(b)), i.setCollection(o.value);
|
|
100
103
|
},
|
|
101
104
|
{ immediate: !0 }
|
|
102
105
|
), {
|
|
103
|
-
resetSearch:
|
|
104
|
-
fuseSearch:
|
|
105
|
-
selectedSearchResult:
|
|
106
|
-
searchResultsWithPlaceholderResults:
|
|
106
|
+
resetSearch: F,
|
|
107
|
+
fuseSearch: p,
|
|
108
|
+
selectedSearchResult: d,
|
|
109
|
+
searchResultsWithPlaceholderResults: H,
|
|
107
110
|
searchText: s
|
|
108
111
|
};
|
|
109
112
|
}
|
|
@@ -5,5 +5,5 @@ export type ClientId<T extends SnippetzTargetId> = HttpSnippetLiteClientId | Sni
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns a code example for given HAR request
|
|
7
7
|
*/
|
|
8
|
-
export declare function getExampleCode<T extends SnippetzTargetId>(request: Request, target: TargetId, client: ClientId<T>): Promise<string>;
|
|
8
|
+
export declare function getExampleCode<T extends SnippetzTargetId>(request: Request, target: TargetId, client: ClientId<T>): Promise<string | undefined>;
|
|
9
9
|
//# sourceMappingURL=getExampleCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,gBAAgB,IAC3C,uBAAuB,GACvB,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEvB;;GAEG;AACH,wBAAsB,cAAc,CAAC,CAAC,SAAS,gBAAgB,EAC7D,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,gBAAgB,IAC3C,uBAAuB,GACvB,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEvB;;GAEG;AACH,wBAAsB,cAAc,CAAC,CAAC,SAAS,gBAAgB,EAC7D,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,+BAyCpB"}
|