@scalar/api-reference 1.33.0 → 1.34.0
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 +29 -0
- package/dist/browser/standalone.js +13260 -13196
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +24 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.js +4 -0
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +46 -0
- package/dist/components/Anchor/index.d.ts +1 -0
- package/dist/components/Anchor/index.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +184 -201
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +1 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +34 -32
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +33 -29
- package/dist/components/Content/Operations/get-current-index.d.ts +4 -0
- package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -0
- package/dist/components/Content/Operations/get-current-index.js +16 -0
- package/dist/components/Content/Schema/Schema.preview.d.ts +28 -0
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +2 -0
- 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 +164 -157
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +58 -53
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +52 -40
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +100 -87
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +4 -1
- package/dist/components/Lazy/Lazy.vue.d.ts +1 -0
- package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
- package/dist/components/Lazy/Lazy.vue2.js +12 -11
- package/dist/components/Lazy/lazyBus.d.ts +5 -3
- package/dist/components/Lazy/lazyBus.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +4 -4
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +49 -43
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -0
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +4 -3
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +1 -0
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
- package/dist/features/Operation/components/ParameterHeaders.vue2.js +28 -26
- package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -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 +17 -15
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -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 +17 -16
- package/dist/features/Operation/components/RequestBody.vue.d.ts +2 -2
- 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 +47 -39
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -0
- 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.vue2.js +12 -11
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
- 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 +63 -61
- package/dist/features/Search/{SearchButton.vue.d.ts → components/SearchButton.vue.d.ts} +0 -2
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -0
- package/dist/features/Search/components/SearchButton.vue.js +65 -0
- package/dist/features/Search/{SearchModal.vue.d.ts → components/SearchModal.vue.d.ts} +0 -2
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -0
- package/dist/features/Search/components/SearchModal.vue.js +7 -0
- package/dist/features/Search/components/SearchModal.vue2.js +199 -0
- package/dist/features/Search/helpers/create-fuse-instance.d.ts +9 -0
- package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -0
- package/dist/features/Search/helpers/create-fuse-instance.js +46 -0
- package/dist/features/Search/helpers/create-search-index.d.ts +7 -0
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -0
- package/dist/features/Search/helpers/create-search-index.js +109 -0
- package/dist/features/Search/hooks/useSearchIndex.d.ts +14 -0
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -0
- package/dist/features/Search/hooks/useSearchIndex.js +46 -0
- package/dist/features/Search/index.d.ts +2 -2
- package/dist/features/Search/index.d.ts.map +1 -1
- package/dist/features/Search/types.d.ts +15 -0
- package/dist/features/Search/types.d.ts.map +1 -0
- package/dist/features/api-client-modal/useApiClient.d.ts +14 -14
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +3 -1
- 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-schemas.js +18 -18
- 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 +10 -6
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/helpers/test-utils.d.ts +9 -0
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +4 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -19
- package/dist/libs/openapi.d.ts +11 -8
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +34 -55
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +120 -111
- package/dist/v2/helpers/get-document-name.d.ts +13 -0
- package/dist/v2/helpers/get-document-name.d.ts.map +1 -0
- package/dist/v2/helpers/get-document-name.js +15 -0
- package/dist/v2/helpers/normalize-content.d.ts +3 -0
- package/dist/v2/helpers/normalize-content.d.ts.map +1 -0
- package/dist/v2/helpers/normalize-content.js +8 -0
- package/package.json +14 -8
- package/dist/features/Search/SearchButton.vue.d.ts.map +0 -1
- package/dist/features/Search/SearchButton.vue.js +0 -66
- package/dist/features/Search/SearchModal.vue.d.ts.map +0 -1
- package/dist/features/Search/SearchModal.vue.js +0 -7
- package/dist/features/Search/SearchModal.vue2.js +0 -207
- package/dist/features/Search/useSearchIndex.d.ts +0 -32
- package/dist/features/Search/useSearchIndex.d.ts.map +0 -1
- package/dist/features/Search/useSearchIndex.js +0 -170
- package/dist/helpers/parse.d.ts +0 -10
- package/dist/helpers/parse.d.ts.map +0 -1
- package/dist/helpers/parse.js +0 -81
- /package/dist/features/Search/{SearchButton.vue2.js → components/SearchButton.vue2.js} +0 -0
- /package/dist/features/Search/{SearchModal.vue3.js → components/SearchModal.vue3.js} +0 -0
|
@@ -1,109 +1,117 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as P, computed as f, ref as S, createElementBlock as a, createCommentVNode as d, openBlock as u, createElementVNode as V, createVNode as l, renderSlot as j, unref as c } from "vue";
|
|
2
|
+
import { ScalarMarkdown as C } from "@scalar/components";
|
|
3
|
+
import R from "./ContentTypeSelect.vue.js";
|
|
4
|
+
import b from "../../../components/Content/Schema/Schema.vue.js";
|
|
5
|
+
const O = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "request-body"
|
|
8
|
-
},
|
|
8
|
+
}, T = { class: "request-body-header" }, _ = { class: "request-body-title" }, g = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "request-body-required"
|
|
11
|
-
},
|
|
11
|
+
}, I = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "request-body-description"
|
|
14
|
-
},
|
|
14
|
+
}, M = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "request-body-schema"
|
|
17
|
-
},
|
|
17
|
+
}, N = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "request-body-schema"
|
|
20
|
-
},
|
|
20
|
+
}, y = 12, D = /* @__PURE__ */ P({
|
|
21
21
|
__name: "RequestBody",
|
|
22
22
|
props: {
|
|
23
|
+
breadcrumb: {},
|
|
23
24
|
requestBody: {},
|
|
24
25
|
schemas: {}
|
|
25
26
|
},
|
|
26
27
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
+
setup(i, { emit: k }) {
|
|
28
29
|
var q;
|
|
29
|
-
const
|
|
30
|
+
const E = k, v = f(
|
|
30
31
|
() => {
|
|
31
32
|
var e;
|
|
32
|
-
return Object.keys(((e =
|
|
33
|
+
return Object.keys(((e = i.requestBody) == null ? void 0 : e.content) ?? {});
|
|
33
34
|
}
|
|
34
|
-
), t =
|
|
35
|
-
(q =
|
|
35
|
+
), t = S("application/json");
|
|
36
|
+
(q = i.requestBody) != null && q.content && v.value.length > 0 && (t.value = v.value[0]);
|
|
36
37
|
const m = f(() => {
|
|
37
|
-
var r,
|
|
38
|
-
const e = (B = (
|
|
38
|
+
var r, n, B;
|
|
39
|
+
const e = (B = (n = (r = i.requestBody) == null ? void 0 : r.content) == null ? void 0 : n[t.value]) == null ? void 0 : B.schema;
|
|
39
40
|
if ((e == null ? void 0 : e.type) !== "object" || !e.properties)
|
|
40
41
|
return null;
|
|
41
42
|
const s = Object.entries(e.properties);
|
|
42
|
-
if (s.length
|
|
43
|
+
if (s.length <= y)
|
|
43
44
|
return null;
|
|
44
45
|
const { properties: p, ...o } = e;
|
|
45
46
|
return {
|
|
46
47
|
visibleProperties: {
|
|
47
48
|
...o,
|
|
48
|
-
properties: Object.fromEntries(
|
|
49
|
+
properties: Object.fromEntries(
|
|
50
|
+
s.slice(0, y)
|
|
51
|
+
)
|
|
49
52
|
},
|
|
50
53
|
collapsedProperties: {
|
|
51
54
|
...o,
|
|
52
|
-
properties: Object.fromEntries(
|
|
55
|
+
properties: Object.fromEntries(
|
|
56
|
+
s.slice(y)
|
|
57
|
+
)
|
|
53
58
|
}
|
|
54
59
|
};
|
|
55
60
|
}), h = (e) => {
|
|
56
|
-
|
|
61
|
+
E("update:modelValue", e);
|
|
57
62
|
};
|
|
58
63
|
return (e, s) => {
|
|
59
64
|
var p, o, r;
|
|
60
|
-
return e.requestBody ? (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
e.requestBody.required ? (
|
|
65
|
+
return e.requestBody ? (u(), a("div", O, [
|
|
66
|
+
V("div", T, [
|
|
67
|
+
V("span", _, [
|
|
68
|
+
j(e.$slots, "title", {}, void 0, !0),
|
|
69
|
+
e.requestBody.required ? (u(), a("div", g, " required ")) : d("", !0)
|
|
65
70
|
]),
|
|
66
|
-
|
|
71
|
+
l(R, {
|
|
67
72
|
defaultValue: t.value,
|
|
68
73
|
requestBody: e.requestBody,
|
|
69
|
-
onSelectContentType: s[0] || (s[0] = ({ contentType:
|
|
74
|
+
onSelectContentType: s[0] || (s[0] = ({ contentType: n }) => t.value = n)
|
|
70
75
|
}, null, 8, ["defaultValue", "requestBody"]),
|
|
71
|
-
e.requestBody.description ? (
|
|
72
|
-
|
|
76
|
+
e.requestBody.description ? (u(), a("div", I, [
|
|
77
|
+
l(c(C), {
|
|
73
78
|
value: e.requestBody.description
|
|
74
79
|
}, null, 8, ["value"])
|
|
75
80
|
])) : d("", !0)
|
|
76
81
|
]),
|
|
77
|
-
m.value ? (
|
|
78
|
-
|
|
82
|
+
m.value ? (u(), a("div", M, [
|
|
83
|
+
l(c(b), {
|
|
79
84
|
compact: "",
|
|
80
85
|
name: "Request Body",
|
|
81
86
|
noncollapsible: "",
|
|
87
|
+
breadcrumb: e.breadcrumb,
|
|
82
88
|
schemas: e.schemas,
|
|
83
89
|
value: m.value.visibleProperties,
|
|
84
90
|
"onUpdate:modelValue": h
|
|
85
|
-
}, null, 8, ["schemas", "value"]),
|
|
86
|
-
|
|
91
|
+
}, null, 8, ["breadcrumb", "schemas", "value"]),
|
|
92
|
+
l(c(b), {
|
|
87
93
|
additionalProperties: "",
|
|
88
94
|
compact: "",
|
|
89
95
|
name: "Request Body",
|
|
96
|
+
breadcrumb: e.breadcrumb,
|
|
90
97
|
schemas: e.schemas,
|
|
91
98
|
value: m.value.collapsedProperties
|
|
92
|
-
}, null, 8, ["schemas", "value"])
|
|
93
|
-
])) : (p = e.requestBody.content) != null && p[t.value] ? (
|
|
94
|
-
|
|
99
|
+
}, null, 8, ["breadcrumb", "schemas", "value"])
|
|
100
|
+
])) : (p = e.requestBody.content) != null && p[t.value] ? (u(), a("div", N, [
|
|
101
|
+
l(c(b), {
|
|
102
|
+
breadcrumb: e.breadcrumb,
|
|
95
103
|
compact: "",
|
|
96
104
|
name: "Request Body",
|
|
97
105
|
noncollapsible: "",
|
|
98
106
|
schemas: e.schemas,
|
|
99
107
|
value: (r = (o = e.requestBody.content) == null ? void 0 : o[t.value]) == null ? void 0 : r.schema,
|
|
100
108
|
"onUpdate:modelValue": h
|
|
101
|
-
}, null, 8, ["schemas", "value"])
|
|
109
|
+
}, null, 8, ["breadcrumb", "schemas", "value"])
|
|
102
110
|
])) : d("", !0)
|
|
103
111
|
])) : d("", !0);
|
|
104
112
|
};
|
|
105
113
|
}
|
|
106
114
|
});
|
|
107
115
|
export {
|
|
108
|
-
|
|
116
|
+
D as default
|
|
109
117
|
};
|
|
@@ -10,6 +10,7 @@ type __VLS_Props = {
|
|
|
10
10
|
name: string;
|
|
11
11
|
schemas?: Schemas;
|
|
12
12
|
url: string;
|
|
13
|
+
breadcrumb?: string[];
|
|
13
14
|
};
|
|
14
15
|
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, {}, HTMLDetailsElement>;
|
|
15
16
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAKlF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACtC,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,cAAc,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAyJF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Callback.vue2.js";
|
|
2
2
|
import "./Callback.vue3.js";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-782d5e21"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as r, createElementBlock as l, openBlock as c, createElementVNode as s, createVNode as
|
|
1
|
+
import { defineComponent as r, createElementBlock as l, openBlock as c, createElementVNode as s, createVNode as a, unref as t, createTextVNode as n, toDisplayString as o } from "vue";
|
|
2
2
|
import { ScalarIconCaretRight as m } from "@scalar/icons";
|
|
3
3
|
import i from "../OperationParameters.vue.js";
|
|
4
4
|
import p from "../OperationResponses.vue.js";
|
|
5
5
|
import d from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
6
|
-
const
|
|
6
|
+
const u = { class: "group callback-list-item" }, f = { class: "font-code bg-b-1 callback-sticky-offset callback-list-item-title sticky flex cursor-pointer flex-row items-start gap-2 border-t py-3 text-sm group-open:flex-wrap" }, h = { class: "text-c-1 min-w-0 flex-1 truncate leading-3 group-open:whitespace-normal" }, b = { class: "text-c-2" }, _ = { class: "callback-operation-container flex flex-col gap-2" }, v = /* @__PURE__ */ r({
|
|
7
7
|
__name: "Callback",
|
|
8
8
|
props: {
|
|
9
9
|
callback: {},
|
|
@@ -12,29 +12,30 @@ const f = { class: "group callback-list-item" }, u = { class: "font-code bg-b-1
|
|
|
12
12
|
operationMethod: {},
|
|
13
13
|
name: {},
|
|
14
14
|
schemas: {},
|
|
15
|
-
url: {}
|
|
15
|
+
url: {},
|
|
16
|
+
breadcrumb: {}
|
|
16
17
|
},
|
|
17
18
|
setup(k) {
|
|
18
|
-
return (e, g) => (c(), l("details",
|
|
19
|
-
s("summary",
|
|
20
|
-
t(
|
|
21
|
-
t(
|
|
19
|
+
return (e, g) => (c(), l("details", u, [
|
|
20
|
+
s("summary", f, [
|
|
21
|
+
a(t(m), { class: "callback-list-item-icon text-c-3 group-hover:text-c-1 absolute top-3.5 -left-5 size-4 transition-transform duration-100 group-open:rotate-90" }),
|
|
22
|
+
a(t(d), {
|
|
22
23
|
as: "span",
|
|
23
24
|
class: "request-method py-0.75",
|
|
24
25
|
method: e.method
|
|
25
26
|
}, null, 8, ["method"]),
|
|
26
27
|
s("div", h, [
|
|
27
28
|
n(o(e.name) + " ", 1),
|
|
28
|
-
s("span",
|
|
29
|
+
s("span", b, o(e.url), 1)
|
|
29
30
|
])
|
|
30
31
|
]),
|
|
31
|
-
s("div",
|
|
32
|
-
|
|
32
|
+
s("div", _, [
|
|
33
|
+
a(i, {
|
|
33
34
|
requestBody: e.callback.requestBody,
|
|
34
35
|
parameters: e.callback.parameters,
|
|
35
36
|
schemas: e.schemas
|
|
36
37
|
}, null, 8, ["requestBody", "parameters", "schemas"]),
|
|
37
|
-
|
|
38
|
+
a(p, {
|
|
38
39
|
collapsableItems: !1,
|
|
39
40
|
responses: e.callback.responses,
|
|
40
41
|
schemas: e.schemas
|
|
@@ -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":"AAkNA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,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;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAoBlF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAIvF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC,YAAY,EAAE,WAAW,CAAC,eAAe,CAAA;IACzC,UAAU,EAAE,eAAe,EAAE,CAAA;IAE7B,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;;;;;;AAmVF,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 c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8ffb0fcc"]]);
|
|
5
5
|
export {
|
|
6
6
|
c as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, computed as V, useId as w, createBlock as r, openBlock as
|
|
1
|
+
import { defineComponent as B, computed as V, useId as w, createBlock as r, openBlock as i, unref as o, withCtx as t, createVNode as a, createCommentVNode as s, createElementVNode as l, normalizeClass as b, createTextVNode as n, toDisplayString as y, createSlots as q } from "vue";
|
|
2
2
|
import { ScalarMarkdown as D, ScalarErrorBoundary as m } from "@scalar/components";
|
|
3
3
|
import { ScalarIconWebhooksLogo as L } from "@scalar/icons";
|
|
4
4
|
import { getOperationStability as k, getOperationStabilityColor as T, isOperationDeprecated as W } from "@scalar/oas-utils/helpers";
|
|
@@ -16,11 +16,11 @@ import U from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
|
16
16
|
import j from "../../../components/Section/SectionColumns.vue.js";
|
|
17
17
|
import g from "../../../components/Section/SectionColumn.vue.js";
|
|
18
18
|
import A from "../../../components/LinkList/LinkList.vue.js";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
const
|
|
19
|
+
import F from "../../external-docs/ExternalDocs.vue.js";
|
|
20
|
+
import G from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
|
|
21
|
+
import J from "../../test-request-button/TestRequestButton.vue.js";
|
|
22
|
+
import K from "../../example-responses/ExampleResponses.vue.js";
|
|
23
|
+
const Q = { class: "operation-details" }, X = { class: "examples" }, ke = /* @__PURE__ */ B({
|
|
24
24
|
__name: "ModernLayout",
|
|
25
25
|
props: {
|
|
26
26
|
id: {},
|
|
@@ -37,54 +37,54 @@ const K = { class: "operation-details" }, Q = { class: "examples" }, ke = /* @__
|
|
|
37
37
|
store: {}
|
|
38
38
|
},
|
|
39
39
|
emits: ["update:modelValue"],
|
|
40
|
-
setup(
|
|
41
|
-
const
|
|
40
|
+
setup(d, { emit: v }) {
|
|
41
|
+
const p = V(() => d.operation.summary || d.path || ""), C = v, u = w(), O = P(), c = (e) => {
|
|
42
42
|
C("update:modelValue", e);
|
|
43
43
|
};
|
|
44
|
-
return (e, f) => (
|
|
44
|
+
return (e, f) => (i(), r(o(R), {
|
|
45
45
|
id: e.id,
|
|
46
46
|
"aria-labelledby": o(u),
|
|
47
|
-
label:
|
|
47
|
+
label: p.value,
|
|
48
48
|
tabindex: "-1"
|
|
49
49
|
}, {
|
|
50
|
-
default:
|
|
51
|
-
|
|
50
|
+
default: t(() => [
|
|
51
|
+
a(o(z), {
|
|
52
52
|
loading: o(O).isLoading
|
|
53
53
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
o(k)(e.operation) ? (
|
|
54
|
+
default: t(() => [
|
|
55
|
+
o(k)(e.operation) ? (i(), r(o(S), {
|
|
56
56
|
key: 0,
|
|
57
|
-
class:
|
|
57
|
+
class: b(["capitalize", o(T)(e.operation)])
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
n(
|
|
59
|
+
default: t(() => [
|
|
60
|
+
n(y(o(k)(e.operation)), 1)
|
|
61
61
|
]),
|
|
62
62
|
_: 1
|
|
63
|
-
}, 8, ["class"])) :
|
|
64
|
-
e.isWebhook ? (
|
|
63
|
+
}, 8, ["class"])) : s("", !0),
|
|
64
|
+
e.isWebhook ? (i(), r(o(S), {
|
|
65
65
|
key: 1,
|
|
66
66
|
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
67
67
|
}, {
|
|
68
|
-
default:
|
|
69
|
-
|
|
68
|
+
default: t(() => [
|
|
69
|
+
a(o(L), { weight: "bold" }),
|
|
70
70
|
f[0] || (f[0] = n("Webhook "))
|
|
71
71
|
]),
|
|
72
72
|
_: 1,
|
|
73
73
|
__: [0]
|
|
74
|
-
})) :
|
|
74
|
+
})) : s("", !0),
|
|
75
75
|
l("div", {
|
|
76
|
-
class:
|
|
76
|
+
class: b(o(W)(e.operation) ? "deprecated" : "")
|
|
77
77
|
}, [
|
|
78
|
-
|
|
79
|
-
default:
|
|
80
|
-
|
|
81
|
-
default:
|
|
82
|
-
|
|
78
|
+
a(o(H), null, {
|
|
79
|
+
default: t(() => [
|
|
80
|
+
a(o(M), { id: e.id }, {
|
|
81
|
+
default: t(() => [
|
|
82
|
+
a(o(U), {
|
|
83
83
|
id: o(u),
|
|
84
84
|
level: 3
|
|
85
85
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
n(
|
|
86
|
+
default: t(() => [
|
|
87
|
+
n(y(p.value), 1)
|
|
88
88
|
]),
|
|
89
89
|
_: 1
|
|
90
90
|
}, 8, ["id"])
|
|
@@ -95,38 +95,40 @@ const K = { class: "operation-details" }, Q = { class: "examples" }, ke = /* @__
|
|
|
95
95
|
_: 1
|
|
96
96
|
})
|
|
97
97
|
], 2),
|
|
98
|
-
|
|
99
|
-
default:
|
|
100
|
-
|
|
101
|
-
default:
|
|
102
|
-
l("div",
|
|
103
|
-
|
|
98
|
+
a(o(j), null, {
|
|
99
|
+
default: t(() => [
|
|
100
|
+
a(o(g), null, {
|
|
101
|
+
default: t(() => [
|
|
102
|
+
l("div", Q, [
|
|
103
|
+
a(o(D), {
|
|
104
104
|
value: e.operation.description,
|
|
105
105
|
withImages: "",
|
|
106
106
|
withAnchors: "",
|
|
107
107
|
transformType: "heading",
|
|
108
108
|
anchorPrefix: e.id
|
|
109
109
|
}, null, 8, ["value", "anchorPrefix"]),
|
|
110
|
-
|
|
110
|
+
a(I, {
|
|
111
|
+
breadcrumb: [e.id],
|
|
111
112
|
parameters: e.parameters,
|
|
112
113
|
requestBody: e.oldOperation.requestBody,
|
|
113
114
|
schemas: e.schemas,
|
|
114
115
|
"onUpdate:modelValue": c
|
|
115
|
-
}, null, 8, ["parameters", "requestBody", "schemas"]),
|
|
116
|
-
|
|
116
|
+
}, null, 8, ["breadcrumb", "parameters", "requestBody", "schemas"]),
|
|
117
|
+
a(N, {
|
|
118
|
+
breadcrumb: [e.id],
|
|
117
119
|
responses: e.oldOperation.responses,
|
|
118
120
|
schemas: e.schemas
|
|
119
|
-
}, null, 8, ["responses", "schemas"]),
|
|
120
|
-
|
|
121
|
-
default:
|
|
122
|
-
e.operation.callbacks ? (
|
|
121
|
+
}, null, 8, ["breadcrumb", "responses", "schemas"]),
|
|
122
|
+
a(o(m), null, {
|
|
123
|
+
default: t(() => [
|
|
124
|
+
e.operation.callbacks ? (i(), r(E, {
|
|
123
125
|
key: 0,
|
|
124
126
|
class: "mt-6",
|
|
125
127
|
path: e.path,
|
|
126
128
|
callbacks: e.operation.callbacks,
|
|
127
129
|
method: e.method,
|
|
128
130
|
schemas: e.schemas
|
|
129
|
-
}, null, 8, ["path", "callbacks", "method", "schemas"])) :
|
|
131
|
+
}, null, 8, ["path", "callbacks", "method", "schemas"])) : s("", !0)
|
|
130
132
|
]),
|
|
131
133
|
_: 1
|
|
132
134
|
})
|
|
@@ -134,20 +136,20 @@ const K = { class: "operation-details" }, Q = { class: "examples" }, ke = /* @__
|
|
|
134
136
|
]),
|
|
135
137
|
_: 1
|
|
136
138
|
}),
|
|
137
|
-
|
|
138
|
-
default:
|
|
139
|
-
l("div",
|
|
140
|
-
e.operation.externalDocs ? (
|
|
141
|
-
default:
|
|
142
|
-
|
|
139
|
+
a(o(g), null, {
|
|
140
|
+
default: t(() => [
|
|
141
|
+
l("div", X, [
|
|
142
|
+
e.operation.externalDocs ? (i(), r(o(A), { key: 0 }, {
|
|
143
|
+
default: t(() => [
|
|
144
|
+
a(o(F), {
|
|
143
145
|
value: e.operation.externalDocs
|
|
144
146
|
}, null, 8, ["value"])
|
|
145
147
|
]),
|
|
146
148
|
_: 1
|
|
147
|
-
})) :
|
|
148
|
-
|
|
149
|
-
default:
|
|
150
|
-
|
|
149
|
+
})) : s("", !0),
|
|
150
|
+
a(o(m), null, {
|
|
151
|
+
default: t(() => [
|
|
152
|
+
a(o(G), {
|
|
151
153
|
method: e.method,
|
|
152
154
|
selectedServer: e.server,
|
|
153
155
|
clientOptions: e.clientOptions,
|
|
@@ -158,10 +160,10 @@ const K = { class: "operation-details" }, Q = { class: "examples" }, ke = /* @__
|
|
|
158
160
|
operation: e.operation,
|
|
159
161
|
"onUpdate:modelValue": c
|
|
160
162
|
}, q({
|
|
161
|
-
header:
|
|
163
|
+
header: t(() => {
|
|
162
164
|
var h;
|
|
163
165
|
return [
|
|
164
|
-
|
|
166
|
+
a($, {
|
|
165
167
|
class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
|
|
166
168
|
deprecated: (h = e.operation) == null ? void 0 : h.deprecated,
|
|
167
169
|
path: e.path
|
|
@@ -172,8 +174,8 @@ const K = { class: "operation-details" }, Q = { class: "examples" }, ke = /* @__
|
|
|
172
174
|
}, [
|
|
173
175
|
e.isWebhook ? void 0 : {
|
|
174
176
|
name: "footer",
|
|
175
|
-
fn:
|
|
176
|
-
|
|
177
|
+
fn: t(() => [
|
|
178
|
+
a(o(J), {
|
|
177
179
|
method: e.method,
|
|
178
180
|
path: e.path
|
|
179
181
|
}, null, 8, ["method", "path"])
|
|
@@ -184,9 +186,9 @@ const K = { class: "operation-details" }, Q = { class: "examples" }, ke = /* @__
|
|
|
184
186
|
]),
|
|
185
187
|
_: 1
|
|
186
188
|
}),
|
|
187
|
-
|
|
188
|
-
default:
|
|
189
|
-
|
|
189
|
+
a(o(m), null, {
|
|
190
|
+
default: t(() => [
|
|
191
|
+
a(o(K), {
|
|
190
192
|
responses: e.operation.responses,
|
|
191
193
|
style: { "margin-top": "12px" }
|
|
192
194
|
}, null, 8, ["responses"])
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchButton.vue"],"names":[],"mappings":"AA4FA,KAAK,WAAW,GAAG;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;;AAoJF,wBAMG"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineComponent as S, ref as k, watch as w, nextTick as C, onMounted as M, onBeforeUnmount as v, createElementBlock as a, openBlock as r, Fragment as s, createVNode as u, unref as l, normalizeClass as B, withCtx as m, createElementVNode as n, createTextVNode as K, toDisplayString as b } from "vue";
|
|
2
|
+
import { useModal as E, ScalarSidebarSearchButton as H } from "@scalar/components";
|
|
3
|
+
import { isMacOS as f } from "@scalar/helpers/general/is-mac-os";
|
|
4
|
+
import g from "./SearchModal.vue.js";
|
|
5
|
+
import { useApiClient as L } from "../../api-client-modal/useApiClient.js";
|
|
6
|
+
const O = /* @__PURE__ */ S({
|
|
7
|
+
__name: "SearchButton",
|
|
8
|
+
props: {
|
|
9
|
+
searchHotKey: { default: "k" },
|
|
10
|
+
hideModels: { type: Boolean, default: !1 }
|
|
11
|
+
},
|
|
12
|
+
setup(y) {
|
|
13
|
+
const d = k(), t = E(), { client: c } = L(), i = (o) => {
|
|
14
|
+
var e;
|
|
15
|
+
(f() ? o.metaKey : o.ctrlKey) && o.key === y.searchHotKey && !((e = c.value) != null && e.modalState.open) && (o.preventDefault(), o.stopPropagation(), t.open ? t.hide() : t.show());
|
|
16
|
+
};
|
|
17
|
+
w(
|
|
18
|
+
() => t.open,
|
|
19
|
+
(o, e) => {
|
|
20
|
+
!o && e && C(() => {
|
|
21
|
+
var p;
|
|
22
|
+
(p = d.value) == null || p.$el.focus();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
), M(() => window.addEventListener("keydown", i)), v(() => window.removeEventListener("keydown", i));
|
|
26
|
+
function h() {
|
|
27
|
+
t.show();
|
|
28
|
+
}
|
|
29
|
+
return (o, e) => (r(), a(s, null, [
|
|
30
|
+
u(l(H), {
|
|
31
|
+
ref_key: "button",
|
|
32
|
+
ref: d,
|
|
33
|
+
class: B(["w-full", o.$attrs.class]),
|
|
34
|
+
onClick: h
|
|
35
|
+
}, {
|
|
36
|
+
shortcut: m(() => [
|
|
37
|
+
l(f)() ? (r(), a(s, { key: 0 }, [
|
|
38
|
+
e[0] || (e[0] = n("span", { class: "sr-only" }, "Command", -1)),
|
|
39
|
+
e[1] || (e[1] = n("span", { "aria-hidden": "true" }, "⌘", -1))
|
|
40
|
+
], 64)) : (r(), a(s, { key: 1 }, [
|
|
41
|
+
e[2] || (e[2] = n("span", { class: "sr-only" }, "CTRL", -1)),
|
|
42
|
+
e[3] || (e[3] = n("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
43
|
+
], 64)),
|
|
44
|
+
K(" " + b(o.searchHotKey), 1)
|
|
45
|
+
]),
|
|
46
|
+
default: m(() => [
|
|
47
|
+
e[4] || (e[4] = n("span", { class: "sr-only" }, "Open Search", -1)),
|
|
48
|
+
e[5] || (e[5] = n("span", {
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
class: "sidebar-search-placeholder"
|
|
51
|
+
}, " Search ", -1))
|
|
52
|
+
]),
|
|
53
|
+
_: 1,
|
|
54
|
+
__: [4, 5]
|
|
55
|
+
}, 8, ["class"]),
|
|
56
|
+
u(g, {
|
|
57
|
+
modalState: l(t),
|
|
58
|
+
hideModels: o.hideModels
|
|
59
|
+
}, null, 8, ["modalState", "hideModels"])
|
|
60
|
+
], 64));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
O as default
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchModal.vue"],"names":[],"mappings":"AAmTA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAwB3B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;AA2ZF,wBAOG"}
|