@scalar/api-reference 1.25.128 → 1.26.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 +54 -0
- package/dist/browser/standalone.js +7981 -7915
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +45 -42
- package/dist/components/Content/Lazy/Loading.vue.js +15 -15
- package/dist/components/Content/Tag/{Endpoints.vue.d.ts → OperationsList.vue.d.ts} +1 -3
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -0
- package/dist/components/Content/Tag/OperationsList.vue.js +7 -0
- package/dist/components/Content/Tag/OperationsList.vue2.js +62 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +9 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -0
- package/dist/components/Content/Tag/OperationsListItem.vue.js +7 -0
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +66 -0
- package/dist/components/Content/Tag/Tag.vue.d.ts +4 -64
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +87 -5
- package/dist/components/Content/Tag/Tag.vue2.js +2 -63
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +11 -11
- package/dist/components/Content/Tag/TagSection.vue.d.ts +70 -0
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -0
- package/dist/components/Content/Tag/TagSection.vue.js +7 -0
- package/dist/components/Content/Tag/TagSection.vue2.js +65 -0
- package/dist/components/Content/Tag/index.d.ts +1 -2
- package/dist/components/Content/Tag/index.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +30 -10
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +31 -30
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- 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 +54 -54
- 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 +65 -67
- package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
- package/dist/features/TestRequestButton/TestRequestButton.vue2.js +16 -14
- package/dist/helpers/get-request.d.ts +1 -0
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts +3 -3
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useConfig.js +7 -4
- package/dist/hooks/useNavState.js +38 -38
- package/dist/hooks/useReactiveSpec.d.ts +8 -8
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +126 -116
- package/dist/index.js +55 -59
- package/dist/libs/operation.d.ts +15 -0
- package/dist/libs/operation.d.ts.map +1 -0
- package/dist/libs/operation.js +16 -0
- package/dist/stores/useHttpClientStore.d.ts +1 -1
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -14
- package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +0 -1
- package/dist/components/Content/Tag/Endpoints.vue.js +0 -7
- package/dist/components/Content/Tag/Endpoints.vue2.js +0 -161
- package/dist/helpers/operation.d.ts +0 -14
- package/dist/helpers/operation.d.ts.map +0 -1
- package/dist/helpers/operation.js +0 -18
- package/dist/standalone/lib/html-rendering.d.ts +0 -50
- package/dist/standalone/lib/html-rendering.d.ts.map +0 -1
- package/dist/standalone/lib/html-rendering.js +0 -64
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as O, useId as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import
|
|
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
|
-
const
|
|
1
|
+
import { defineComponent as O, useId as S, computed as b, openBlock as m, createBlock as s, unref as e, withCtx as t, createVNode as r, normalizeClass as d, createTextVNode as f, toDisplayString as u, createCommentVNode as y, createElementVNode as a } from "vue";
|
|
2
|
+
import { ScalarMarkdown as C, ScalarErrorBoundary as c } from "@scalar/components";
|
|
3
|
+
import g from "../../../components/OperationPath.vue.js";
|
|
4
|
+
import { getOperationStability as h, getOperationStabilityColor as _, isOperationDeprecated as k } from "../../../libs/operation.js";
|
|
5
|
+
import B from "../components/OperationParameters.vue.js";
|
|
6
|
+
import E from "../components/OperationResponses.vue.js";
|
|
7
|
+
import N from "../../../components/Section/Section.vue.js";
|
|
8
|
+
import V from "../../../components/Section/SectionContent.vue.js";
|
|
9
|
+
import w from "../../../components/Badge/Badge.vue.js";
|
|
10
|
+
import I from "../../../components/Section/SectionHeader.vue.js";
|
|
11
|
+
import R from "../../../components/Anchor/Anchor.vue.js";
|
|
12
|
+
import T from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
13
|
+
import q from "../../../components/Section/SectionColumns.vue.js";
|
|
14
|
+
import v from "../../../components/Section/SectionColumn.vue.js";
|
|
15
|
+
import D from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
16
|
+
import H from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
17
|
+
import M from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
18
|
+
const $ = { class: "operation-details" }, z = { class: "examples" }, te = /* @__PURE__ */ O({
|
|
19
19
|
__name: "ModernLayout",
|
|
20
20
|
props: {
|
|
21
21
|
id: {},
|
|
@@ -24,42 +24,40 @@ const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__
|
|
|
24
24
|
operation: {},
|
|
25
25
|
transformedOperation: {}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
return (o,
|
|
27
|
+
setup(n) {
|
|
28
|
+
const i = S(), l = b(() => n.operation.summary || n.operation.path);
|
|
29
|
+
return (o, A) => (m(), s(e(N), {
|
|
30
30
|
id: o.id,
|
|
31
|
-
"aria-labelledby": e(
|
|
32
|
-
label:
|
|
31
|
+
"aria-labelledby": e(i),
|
|
32
|
+
label: l.value
|
|
33
33
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
r(e(
|
|
36
|
-
default:
|
|
37
|
-
e(
|
|
34
|
+
default: t(() => [
|
|
35
|
+
r(e(V), null, {
|
|
36
|
+
default: t(() => [
|
|
37
|
+
e(h)(o.operation) ? (m(), s(e(w), {
|
|
38
38
|
key: 0,
|
|
39
|
-
class:
|
|
39
|
+
class: d(e(_)(o.operation))
|
|
40
40
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
|
|
41
|
+
default: t(() => [
|
|
42
|
+
f(u(e(h)(o.operation)), 1)
|
|
43
43
|
]),
|
|
44
44
|
_: 1
|
|
45
|
-
}, 8, ["class"])) :
|
|
46
|
-
|
|
47
|
-
class:
|
|
48
|
-
e(_)(o.transformedOperation) ? "deprecated" : ""
|
|
49
|
-
)
|
|
45
|
+
}, 8, ["class"])) : y("", !0),
|
|
46
|
+
a("div", {
|
|
47
|
+
class: d(e(k)(o.operation) ? "deprecated" : "")
|
|
50
48
|
}, [
|
|
51
|
-
r(e(
|
|
52
|
-
default:
|
|
53
|
-
r(e(
|
|
49
|
+
r(e(I), null, {
|
|
50
|
+
default: t(() => [
|
|
51
|
+
r(e(R), {
|
|
54
52
|
id: o.id ?? ""
|
|
55
53
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
r(e(
|
|
58
|
-
id: e(
|
|
54
|
+
default: t(() => [
|
|
55
|
+
r(e(T), {
|
|
56
|
+
id: e(i),
|
|
59
57
|
level: 3
|
|
60
58
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
|
|
59
|
+
default: t(() => [
|
|
60
|
+
f(u(l.value), 1)
|
|
63
61
|
]),
|
|
64
62
|
_: 1
|
|
65
63
|
}, 8, ["id"])
|
|
@@ -70,54 +68,54 @@ const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__
|
|
|
70
68
|
_: 1
|
|
71
69
|
})
|
|
72
70
|
], 2),
|
|
73
|
-
r(e(
|
|
74
|
-
default:
|
|
75
|
-
r(e(
|
|
76
|
-
default:
|
|
77
|
-
|
|
78
|
-
r(e(
|
|
71
|
+
r(e(q), null, {
|
|
72
|
+
default: t(() => [
|
|
73
|
+
r(e(v), null, {
|
|
74
|
+
default: t(() => [
|
|
75
|
+
a("div", $, [
|
|
76
|
+
r(e(C), {
|
|
79
77
|
value: o.operation.description,
|
|
80
78
|
withImages: ""
|
|
81
79
|
}, null, 8, ["value"]),
|
|
82
|
-
r(
|
|
83
|
-
r(
|
|
80
|
+
r(B, { operation: o.operation }, null, 8, ["operation"]),
|
|
81
|
+
r(E, { operation: o.transformedOperation }, null, 8, ["operation"])
|
|
84
82
|
])
|
|
85
83
|
]),
|
|
86
84
|
_: 1
|
|
87
85
|
}),
|
|
88
|
-
r(e(
|
|
89
|
-
default:
|
|
90
|
-
|
|
91
|
-
r(e(
|
|
92
|
-
default:
|
|
93
|
-
r(e(
|
|
86
|
+
r(e(v), null, {
|
|
87
|
+
default: t(() => [
|
|
88
|
+
a("div", z, [
|
|
89
|
+
r(e(c), null, {
|
|
90
|
+
default: t(() => [
|
|
91
|
+
r(e(D), {
|
|
94
92
|
collection: o.collection,
|
|
95
93
|
fallback: "",
|
|
96
94
|
operation: o.operation,
|
|
97
95
|
server: o.server,
|
|
98
96
|
transformedOperation: o.transformedOperation
|
|
99
97
|
}, {
|
|
100
|
-
header:
|
|
101
|
-
var
|
|
98
|
+
header: t(() => {
|
|
99
|
+
var p;
|
|
102
100
|
return [
|
|
103
|
-
r(
|
|
101
|
+
r(g, {
|
|
104
102
|
class: "example-path",
|
|
105
|
-
deprecated: (
|
|
103
|
+
deprecated: (p = o.transformedOperation.information) == null ? void 0 : p.deprecated,
|
|
106
104
|
path: o.transformedOperation.path
|
|
107
105
|
}, null, 8, ["deprecated", "path"])
|
|
108
106
|
];
|
|
109
107
|
}),
|
|
110
|
-
footer:
|
|
111
|
-
r(e(
|
|
108
|
+
footer: t(() => [
|
|
109
|
+
r(e(H), { operation: o.operation }, null, 8, ["operation"])
|
|
112
110
|
]),
|
|
113
111
|
_: 1
|
|
114
112
|
}, 8, ["collection", "operation", "server", "transformedOperation"])
|
|
115
113
|
]),
|
|
116
114
|
_: 1
|
|
117
115
|
}),
|
|
118
|
-
r(e(
|
|
119
|
-
default:
|
|
120
|
-
r(e(
|
|
116
|
+
r(e(c), null, {
|
|
117
|
+
default: t(() => [
|
|
118
|
+
r(e(M), {
|
|
121
119
|
responses: o.operation.responses,
|
|
122
120
|
style: { "margin-top": "12px" }
|
|
123
121
|
}, null, 8, ["responses"])
|
|
@@ -140,5 +138,5 @@ const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__
|
|
|
140
138
|
}
|
|
141
139
|
});
|
|
142
140
|
export {
|
|
143
|
-
|
|
141
|
+
te as default
|
|
144
142
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./TestRequestButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4263a1c2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { defineComponent as d, computed as c, openBlock as i, createElementBlock as
|
|
1
|
+
import { defineComponent as d, computed as c, openBlock as i, createElementBlock as r, withModifiers as f, createVNode as a, unref as h, createElementVNode as k, withCtx as C, createTextVNode as s, toDisplayString as u, Fragment as y } from "vue";
|
|
2
2
|
import { ScalarIcon as B } from "@scalar/components";
|
|
3
3
|
import b from "../../components/ScreenReader.vue.js";
|
|
4
|
-
import { useConfig as
|
|
5
|
-
import { useApiClient as
|
|
6
|
-
const
|
|
4
|
+
import { useConfig as g } from "../../hooks/useConfig.js";
|
|
5
|
+
import { useApiClient as q } from "../ApiClientModal/useApiClient.js";
|
|
6
|
+
const v = ["method"], S = /* @__PURE__ */ d({
|
|
7
7
|
__name: "TestRequestButton",
|
|
8
8
|
props: {
|
|
9
9
|
operation: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const { client: t } =
|
|
11
|
+
setup(o) {
|
|
12
|
+
const { client: t } = q(), p = g(), l = c(
|
|
13
|
+
() => p.value.hideTestRequestButton !== !0
|
|
14
|
+
), m = () => {
|
|
13
15
|
var e;
|
|
14
|
-
|
|
15
|
-
requestUid:
|
|
16
|
+
o.operation && ((e = t == null ? void 0 : t.value) != null && e.open) && t.value.open({
|
|
17
|
+
requestUid: o.operation.uid
|
|
16
18
|
});
|
|
17
19
|
};
|
|
18
|
-
return (e,
|
|
20
|
+
return (e, n) => e.operation && l.value ? (i(), r("button", {
|
|
19
21
|
key: 0,
|
|
20
22
|
class: "show-api-client-button",
|
|
21
23
|
method: e.operation.method,
|
|
@@ -26,18 +28,18 @@ const T = ["method"], g = /* @__PURE__ */ d({
|
|
|
26
28
|
icon: "Play",
|
|
27
29
|
size: "sm"
|
|
28
30
|
}),
|
|
29
|
-
|
|
31
|
+
n[0] || (n[0] = k("span", null, "Test Request", -1)),
|
|
30
32
|
a(b, null, {
|
|
31
33
|
default: C(() => [
|
|
32
|
-
|
|
34
|
+
s("(" + u(e.operation.method) + " " + u(e.operation.path) + ")", 1)
|
|
33
35
|
]),
|
|
34
36
|
_: 1
|
|
35
37
|
})
|
|
36
|
-
], 8,
|
|
37
|
-
|
|
38
|
+
], 8, v)) : (i(), r(y, { key: 1 }, [
|
|
39
|
+
s(" ")
|
|
38
40
|
], 64));
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
43
|
export {
|
|
42
|
-
|
|
44
|
+
S as default
|
|
43
45
|
};
|
|
@@ -38,5 +38,6 @@ export declare const getRequest: (requests: WorkspaceStore["requests"], path: st
|
|
|
38
38
|
}[] | undefined;
|
|
39
39
|
requestBody?: any;
|
|
40
40
|
responses?: Record<string, any> | undefined;
|
|
41
|
+
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
41
42
|
} | undefined;
|
|
42
43
|
//# sourceMappingURL=get-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aAAc,cAAc,CAAC,UAAU,CAAC,QAAQ,MAAM,UAAU,MAAM;;;yBAEoyT,KAAK;kDAA4E,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;eAA0f,CAAC;mBAAkC,CAAC;cAAwC,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAoD,CAAC;mBAAkC,CAAC;;;;;
|
|
1
|
+
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aAAc,cAAc,CAAC,UAAU,CAAC,QAAQ,MAAM,UAAU,MAAM;;;yBAEoyT,KAAK;kDAA4E,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;eAA0f,CAAC;mBAAkC,CAAC;cAAwC,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAoD,CAAC;mBAAkC,CAAC;;;;;kCAAiM,eAAe;aADt7W,CAAA"}
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
import { type InjectionKey } from 'vue';
|
|
3
|
-
export declare const CONFIGURATION_SYMBOL: InjectionKey<ApiReferenceConfiguration
|
|
2
|
+
import { type ComputedRef, type InjectionKey } from 'vue';
|
|
3
|
+
export declare const CONFIGURATION_SYMBOL: InjectionKey<ComputedRef<ApiReferenceConfiguration>>;
|
|
4
4
|
/** Hook for easy access to the reference configuration */
|
|
5
|
-
export declare const useConfig: () => ApiReferenceConfiguration
|
|
5
|
+
export declare const useConfig: () => ComputedRef<ApiReferenceConfiguration>;
|
|
6
6
|
//# sourceMappingURL=useConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAoB,MAAM,KAAK,CAAA;AAE3E,eAAO,MAAM,oBAAoB,EAAe,YAAY,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAAA;AAEpG,0DAA0D;AAC1D,eAAO,MAAM,SAAS,8CAMrB,CAAA"}
|
package/dist/hooks/useConfig.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { apiReferenceConfigurationSchema as o } from "@scalar/types/api-reference";
|
|
2
|
-
import { inject as n } from "vue";
|
|
3
|
-
const
|
|
2
|
+
import { inject as e, computed as n } from "vue";
|
|
3
|
+
const r = Symbol(), f = () => e(
|
|
4
|
+
r,
|
|
5
|
+
n(() => o.parse({}))
|
|
6
|
+
);
|
|
4
7
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
r as CONFIGURATION_SYMBOL,
|
|
9
|
+
f as useConfig
|
|
7
10
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { useConfig as
|
|
2
|
-
import { ssrState as
|
|
1
|
+
import { useConfig as f } from "./useConfig.js";
|
|
2
|
+
import { ssrState as p, combineUrlAndPath as v } from "@scalar/oas-utils/helpers";
|
|
3
3
|
import { slug as c } from "github-slugger";
|
|
4
|
-
import { ref as
|
|
5
|
-
const
|
|
4
|
+
import { ref as s } from "vue";
|
|
5
|
+
const u = s(""), l = s(p.hash ?? ""), r = s(), m = s(!1), h = (t) => {
|
|
6
6
|
var n;
|
|
7
|
-
if (!
|
|
8
|
-
const
|
|
9
|
-
return decodeURIComponent(
|
|
10
|
-
},
|
|
7
|
+
if (!r.value) return "";
|
|
8
|
+
const a = new RegExp("^" + ((n = r.value) == null ? void 0 : n.basePath) + "/?");
|
|
9
|
+
return decodeURIComponent(t.replace(a, ""));
|
|
10
|
+
}, w = (t = l.value) => {
|
|
11
11
|
var i;
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
},
|
|
15
|
-
|
|
12
|
+
const a = (i = t.match(/(tag\/[^/]+)/)) == null ? void 0 : i[0], n = t.startsWith("model") ? "models" : "", o = t.startsWith("webhook") ? "webhooks" : "";
|
|
13
|
+
return a || n || o;
|
|
14
|
+
}, I = () => {
|
|
15
|
+
l.value = r.value ? h(window.location.pathname) : (
|
|
16
16
|
// Must remove the prefix from the hash as the internal hash value should be pure
|
|
17
|
-
decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(
|
|
17
|
+
decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(u.value.length)
|
|
18
18
|
);
|
|
19
|
-
}, $ = (
|
|
20
|
-
const n = new URL(
|
|
21
|
-
|
|
22
|
-
}, S = (
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
}, U = (
|
|
26
|
-
const
|
|
19
|
+
}, $ = (t, a = window.location.href) => {
|
|
20
|
+
const n = new URL(a);
|
|
21
|
+
r.value ? n.pathname = v(r.value.basePath, t) : n.hash = u.value + t, l.value = t, window.history.replaceState({}, "", n);
|
|
22
|
+
}, S = (t, a = window.location.href, n = window.location.search) => {
|
|
23
|
+
const o = new URL(a);
|
|
24
|
+
return o.hash = u.value + t, o.search = n, o.toString();
|
|
25
|
+
}, U = (t = l.value) => `${u.value}${t}`, b = () => decodeURIComponent(window.location.hash.replace(/^#/, "").slice(u.value.length)), x = () => {
|
|
26
|
+
const t = f(), a = (e) => typeof t.value.generateHeadingSlug == "function" ? `${t.value.generateHeadingSlug(e)}` : e.slug ? `description/${e.slug}` : "", n = (e) => e != null && e.name ? typeof t.value.generateModelSlug == "function" ? `model/${t.value.generateModelSlug(e)}` : `model/${c(e.name)}` : "models", o = (e) => typeof t.value.generateTagSlug == "function" ? `tag/${t.value.generateTagSlug(e)}` : `tag/${c(e.name)}`;
|
|
27
27
|
return {
|
|
28
|
-
hash:
|
|
28
|
+
hash: l,
|
|
29
29
|
/** Sets the prefix for the hash */
|
|
30
|
-
setHashPrefix: (
|
|
31
|
-
|
|
30
|
+
setHashPrefix: (e) => {
|
|
31
|
+
u.value = e;
|
|
32
32
|
},
|
|
33
33
|
/**
|
|
34
34
|
* Gets the full hash with the prefix
|
|
@@ -50,24 +50,24 @@ const s = l(""), u = l(m.hash ?? ""), o = l(), w = l(!1), h = (e) => {
|
|
|
50
50
|
replaceUrlState: $,
|
|
51
51
|
/** Gets the portion of the hash used by the references */
|
|
52
52
|
getReferenceHash: b,
|
|
53
|
-
getWebhookId: (
|
|
53
|
+
getWebhookId: (e) => e != null && e.name ? typeof t.value.generateWebhookSlug == "function" ? `webhook/${t.value.generateWebhookSlug(e)}` : `webhook/${e.method}/${c(e.name)}` : "webhooks",
|
|
54
54
|
getModelId: n,
|
|
55
|
-
getHeadingId:
|
|
56
|
-
getOperationId: (
|
|
55
|
+
getHeadingId: a,
|
|
56
|
+
getOperationId: (e, g) => {
|
|
57
57
|
var d;
|
|
58
|
-
return typeof
|
|
59
|
-
path:
|
|
60
|
-
operationId:
|
|
61
|
-
method:
|
|
62
|
-
summary: (d =
|
|
63
|
-
})}` : `${
|
|
58
|
+
return typeof t.value.generateOperationSlug == "function" ? `${o(g)}/${t.value.generateOperationSlug({
|
|
59
|
+
path: e.path,
|
|
60
|
+
operationId: e.operationId,
|
|
61
|
+
method: e.httpVerb,
|
|
62
|
+
summary: (d = e.information) == null ? void 0 : d.summary
|
|
63
|
+
})}` : `${o(g)}/${e.httpVerb}${e.path}`;
|
|
64
64
|
},
|
|
65
65
|
getPathRoutingId: h,
|
|
66
|
-
getSectionId:
|
|
67
|
-
getTagId:
|
|
68
|
-
isIntersectionEnabled:
|
|
69
|
-
pathRouting:
|
|
70
|
-
updateHash:
|
|
66
|
+
getSectionId: w,
|
|
67
|
+
getTagId: o,
|
|
68
|
+
isIntersectionEnabled: m,
|
|
69
|
+
pathRouting: r,
|
|
70
|
+
updateHash: I
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
export {
|
|
@@ -38,11 +38,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
38
38
|
default?: any;
|
|
39
39
|
format?: string | undefined;
|
|
40
40
|
description?: string | undefined;
|
|
41
|
-
properties?: Record<string, import("@scalar/types
|
|
41
|
+
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
42
42
|
} | undefined;
|
|
43
43
|
example?: any;
|
|
44
44
|
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
45
|
-
content?: import("@scalar/types
|
|
45
|
+
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
46
46
|
headers?: {
|
|
47
47
|
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
48
48
|
} | undefined;
|
|
@@ -52,7 +52,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
52
52
|
requestBody?: {
|
|
53
53
|
description?: string | undefined;
|
|
54
54
|
required?: boolean | undefined;
|
|
55
|
-
content?: import("@scalar/types
|
|
55
|
+
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
56
56
|
} | undefined;
|
|
57
57
|
summary?: string | undefined;
|
|
58
58
|
tags?: string[] | undefined;
|
|
@@ -67,7 +67,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
67
67
|
label: string;
|
|
68
68
|
source: string;
|
|
69
69
|
}[] | undefined;
|
|
70
|
-
'x-scalar-stability'?: import("@scalar/types
|
|
70
|
+
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
71
71
|
'x-codeSamples'?: {
|
|
72
72
|
lang: string;
|
|
73
73
|
label: string;
|
|
@@ -101,11 +101,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
101
101
|
default?: any;
|
|
102
102
|
format?: string | undefined;
|
|
103
103
|
description?: string | undefined;
|
|
104
|
-
properties?: Record<string, import("@scalar/types
|
|
104
|
+
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
105
105
|
} | undefined;
|
|
106
106
|
example?: any;
|
|
107
107
|
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
108
|
-
content?: import("@scalar/types
|
|
108
|
+
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
109
109
|
headers?: {
|
|
110
110
|
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
111
111
|
} | undefined;
|
|
@@ -216,8 +216,8 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
|
|
|
216
216
|
callbacks?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.CallbackObject> | undefined;
|
|
217
217
|
pathItems?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.PathItemObject> | undefined;
|
|
218
218
|
} | undefined;
|
|
219
|
-
webhooks?: import("@scalar/types
|
|
220
|
-
definitions?: import("@scalar/types
|
|
219
|
+
webhooks?: import("@scalar/types").Webhooks | undefined;
|
|
220
|
+
definitions?: import("@scalar/types").Definitions | undefined;
|
|
221
221
|
swagger?: import("@scalar/openapi-types").OpenAPIV2.Document["swagger"];
|
|
222
222
|
openapi?: import("@scalar/openapi-types").OpenAPIV3.Document["openapi"] | import("@scalar/openapi-types").OpenAPIV3_1.Document["openapi"];
|
|
223
223
|
'x-tagGroups'?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAa3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAcD,uDAAuD;AACvD,iBAAS,aAAa,CAAC,IAAI,EAAE,IAAI,QA0ChC;AAMD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAgOD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,CAAA;IACnD,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,CAAA;CACvG,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,SAepD,CAAA;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,YAAY;;;;;;;;;;;;;qCApBrB,MAAM;EA2EpD"}
|