@scalar/api-reference 1.25.76 → 1.25.78
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 +33 -0
- package/dist/browser/standalone.js +24389 -23740
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +41 -56
- package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +3 -3
- package/dist/components/ApiReferenceLayout.vue2.js +140 -123
- package/dist/components/Content/Content.vue.d.ts +0 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/components/Content/Content.vue2.js +67 -62
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +74 -69
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +37 -33
- package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts +1 -1
- package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +60 -60
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/embeds/OpenApiDocument/types.d.ts +1 -1
- package/dist/embeds/OpenApiDocument/types.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +20 -18
- package/dist/features/ApiClientModal/useApiClient.d.ts +149 -138
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.js +6 -6
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +2 -2
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +3 -3
- package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +3 -3
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +3 -0
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +121 -147
- package/dist/features/Operation/Operation.vue.d.ts +6 -4
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +30 -13
- package/dist/features/Operation/hooks/useRequestExample.d.ts +17 -0
- package/dist/features/Operation/hooks/useRequestExample.d.ts.map +1 -0
- package/dist/features/Operation/hooks/useRequestExample.js +68 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +2 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +47 -41
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -0
- 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 +52 -48
- package/dist/helpers/convertRequestToHarRequest.d.ts +7 -0
- package/dist/helpers/convertRequestToHarRequest.d.ts.map +1 -0
- package/dist/helpers/convertRequestToHarRequest.js +64 -0
- package/dist/helpers/get-request.d.ts +40 -0
- package/dist/helpers/get-request.d.ts.map +1 -0
- package/dist/helpers/get-request.js +6 -0
- package/dist/helpers/getExampleCode.d.ts +2 -2
- package/dist/helpers/getExampleCode.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.js +19 -16
- package/dist/helpers/index.d.ts +1 -3
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/provideSymbols.d.ts +0 -5
- package/dist/helpers/provideSymbols.d.ts.map +1 -1
- package/dist/helpers/provideSymbols.js +3 -4
- package/dist/hooks/useReactiveSpec.d.ts +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/index.js +77 -85
- package/dist/legacy/helpers/getUrlFromServerState.js +8 -8
- package/dist/legacy/helpers/index.d.ts +0 -10
- package/dist/legacy/helpers/index.d.ts.map +1 -1
- package/dist/legacy/stores/index.d.ts +0 -3
- package/dist/legacy/stores/index.d.ts.map +1 -1
- package/dist/stores/index.d.ts +0 -1
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -8
- package/dist/components/Content/Authentication/Authentication.vue.d.ts +0 -8
- package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +0 -1
- package/dist/components/Content/Authentication/Authentication.vue.js +0 -7
- package/dist/components/Content/Authentication/Authentication.vue2.js +0 -62
- package/dist/components/Content/Authentication/index.d.ts +0 -2
- package/dist/components/Content/Authentication/index.d.ts.map +0 -1
- package/dist/helpers/createRequest.d.ts +0 -6
- package/dist/helpers/createRequest.d.ts.map +0 -1
- package/dist/helpers/createRequest.js +0 -16
- package/dist/helpers/getApiClientRequest.d.ts +0 -13
- package/dist/helpers/getApiClientRequest.d.ts.map +0 -1
- package/dist/helpers/getApiClientRequest.js +0 -43
- package/dist/helpers/getHarRequest.d.ts +0 -4
- package/dist/helpers/getHarRequest.d.ts.map +0 -1
- package/dist/helpers/getHarRequest.js +0 -34
- package/dist/legacy/components/CardForm.vue.d.ts +0 -18
- package/dist/legacy/components/CardForm.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardForm.vue.js +0 -13
- package/dist/legacy/components/CardFormButton.vue.d.ts +0 -22
- package/dist/legacy/components/CardFormButton.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormButton.vue.js +0 -7
- package/dist/legacy/components/CardFormButton.vue2.js +0 -18
- package/dist/legacy/components/CardFormGroup.vue.d.ts +0 -18
- package/dist/legacy/components/CardFormGroup.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormGroup.vue.js +0 -13
- package/dist/legacy/components/CardFormRows.vue.d.ts +0 -18
- package/dist/legacy/components/CardFormRows.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormRows.vue.js +0 -13
- package/dist/legacy/components/CardFormTextInput.vue.d.ts +0 -23
- package/dist/legacy/components/CardFormTextInput.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormTextInput.vue.js +0 -7
- package/dist/legacy/components/CardFormTextInput.vue2.js +0 -53
- package/dist/legacy/components/SecurityScheme.vue.d.ts +0 -8
- package/dist/legacy/components/SecurityScheme.vue.d.ts.map +0 -1
- package/dist/legacy/components/SecurityScheme.vue.js +0 -7
- package/dist/legacy/components/SecurityScheme.vue2.js +0 -393
- package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts +0 -13
- package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts.map +0 -1
- package/dist/legacy/components/SecuritySchemeScopes.vue.js +0 -7
- package/dist/legacy/components/SecuritySchemeScopes.vue2.js +0 -91
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts +0 -11
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +0 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +0 -7
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +0 -96
- package/dist/legacy/helpers/createPlaceholderRequest.d.ts +0 -6
- package/dist/legacy/helpers/createPlaceholderRequest.d.ts.map +0 -1
- package/dist/legacy/helpers/encodeStringAsBase64.js +0 -6
- package/dist/legacy/helpers/getRequestFromAuthentication.d.ts +0 -10
- package/dist/legacy/helpers/getRequestFromAuthentication.d.ts.map +0 -1
- package/dist/legacy/helpers/getRequestFromAuthentication.js +0 -83
- package/dist/legacy/helpers/humanDiff.d.ts +0 -5
- package/dist/legacy/helpers/humanDiff.d.ts.map +0 -1
- package/dist/legacy/helpers/mapFromArray.d.ts +0 -5
- package/dist/legacy/helpers/mapFromArray.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeHeaderName.d.ts +0 -5
- package/dist/legacy/helpers/normalizeHeaderName.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeHeaderName.js +0 -6
- package/dist/legacy/helpers/normalizeHeaders.d.ts +0 -8
- package/dist/legacy/helpers/normalizeHeaders.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeHeaders.js +0 -22
- package/dist/legacy/helpers/normalizePath.d.ts +0 -5
- package/dist/legacy/helpers/normalizePath.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeUrl.d.ts +0 -5
- package/dist/legacy/helpers/normalizeUrl.d.ts.map +0 -1
- package/dist/legacy/helpers/prepareClientRequestConfig.d.ts +0 -24
- package/dist/legacy/helpers/prepareClientRequestConfig.d.ts.map +0 -1
- package/dist/legacy/stores/useAuthenticationStore.d.ts +0 -55
- package/dist/legacy/stores/useAuthenticationStore.d.ts.map +0 -1
- package/dist/legacy/stores/useAuthenticationStore.js +0 -36
- package/dist/legacy/stores/useOpenApiStore.d.ts +0 -125
- package/dist/legacy/stores/useOpenApiStore.d.ts.map +0 -1
- package/dist/legacy/stores/useOpenApiStore.js +0 -9
- package/dist/legacy/stores/useRequestStore.d.ts +0 -62
- package/dist/legacy/stores/useRequestStore.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAmE9C,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;wBATrB,GAAG;wBACH,GAAG;;;;EAa/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,94 +1,79 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { migrateThemeVariables as
|
|
3
|
-
import { useColorMode as
|
|
4
|
-
import { useSeoMeta as
|
|
5
|
-
import { useFavicon as
|
|
6
|
-
import { useReactiveSpec as
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
const W = /* @__PURE__ */ T({
|
|
1
|
+
import { defineComponent as x, watch as p, computed as i, toRef as m, openBlock as f, createElementBlock as h, Fragment as U, createBlock as V, resolveDynamicComponent as $, withCtx as s, createTextVNode as b, toDisplayString as B, createCommentVNode as N, createVNode as R, unref as a, renderSlot as g } from "vue";
|
|
2
|
+
import { migrateThemeVariables as T } from "@scalar/themes";
|
|
3
|
+
import { useColorMode as _ } from "@scalar/use-hooks/useColorMode";
|
|
4
|
+
import { useSeoMeta as E } from "@unhead/vue";
|
|
5
|
+
import { useFavicon as F } from "@vueuse/core";
|
|
6
|
+
import { useReactiveSpec as A } from "../hooks/useReactiveSpec.js";
|
|
7
|
+
import L from "./Layouts/Layouts.vue.js";
|
|
8
|
+
const K = /* @__PURE__ */ x({
|
|
10
9
|
__name: "ApiReference",
|
|
11
10
|
props: {
|
|
12
11
|
configuration: {}
|
|
13
12
|
},
|
|
14
13
|
emits: ["updateContent"],
|
|
15
14
|
setup(v) {
|
|
16
|
-
var
|
|
17
|
-
const
|
|
18
|
-
initialColorMode: (
|
|
19
|
-
overrideColorMode: (
|
|
15
|
+
var c, u, l;
|
|
16
|
+
const t = v, { setColorMode: C, toggleColorMode: k, darkLightMode: S } = _({
|
|
17
|
+
initialColorMode: (c = t.configuration) != null && c.darkMode ? "dark" : void 0,
|
|
18
|
+
overrideColorMode: (u = t.configuration) == null ? void 0 : u.forceDarkModeState
|
|
20
19
|
});
|
|
21
|
-
|
|
20
|
+
p(
|
|
22
21
|
() => {
|
|
23
22
|
var o;
|
|
24
|
-
return (o =
|
|
23
|
+
return (o = t.configuration) == null ? void 0 : o.darkMode;
|
|
25
24
|
},
|
|
26
25
|
(o) => C(o ? "dark" : "light")
|
|
27
26
|
);
|
|
28
|
-
const
|
|
29
|
-
var o,
|
|
30
|
-
if ((o =
|
|
31
|
-
return
|
|
27
|
+
const n = i(() => {
|
|
28
|
+
var o, r;
|
|
29
|
+
if ((o = t.configuration) != null && o.customCss)
|
|
30
|
+
return T((r = t.configuration) == null ? void 0 : r.customCss);
|
|
32
31
|
});
|
|
33
|
-
|
|
34
|
-
const e =
|
|
32
|
+
p(n, () => console.log(n.value));
|
|
33
|
+
const e = i(() => {
|
|
35
34
|
var o;
|
|
36
35
|
return {
|
|
37
36
|
spec: {
|
|
38
37
|
content: void 0,
|
|
39
38
|
url: void 0,
|
|
40
|
-
...(o =
|
|
39
|
+
...(o = t.configuration) == null ? void 0 : o.spec
|
|
41
40
|
},
|
|
42
41
|
proxyUrl: void 0,
|
|
43
42
|
theme: "default",
|
|
44
43
|
showSidebar: !0,
|
|
45
44
|
isEditable: !1,
|
|
46
|
-
...
|
|
47
|
-
customCss:
|
|
45
|
+
...t.configuration,
|
|
46
|
+
customCss: n.value
|
|
48
47
|
};
|
|
49
48
|
});
|
|
50
|
-
(
|
|
51
|
-
|
|
52
|
-
s(
|
|
53
|
-
() => {
|
|
54
|
-
var r;
|
|
55
|
-
return (r = e.value) == null ? void 0 : r[o];
|
|
56
|
-
},
|
|
57
|
-
(r) => {
|
|
58
|
-
typeof r < "u" && t(r);
|
|
59
|
-
},
|
|
60
|
-
{ immediate: !0 }
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
const { setAuthentication: y } = z();
|
|
64
|
-
M("authentication", y);
|
|
65
|
-
const { parsedSpec: D, rawSpec: h } = j({
|
|
49
|
+
(l = e.value) != null && l.metaData && E(e.value.metaData);
|
|
50
|
+
const { parsedSpec: M, rawSpec: y } = A({
|
|
66
51
|
proxyUrl: m(
|
|
67
52
|
() => e.value.proxyUrl || e.value.proxy || ""
|
|
68
53
|
),
|
|
69
54
|
specConfig: m(() => e.value.spec || {})
|
|
70
|
-
}),
|
|
71
|
-
return
|
|
72
|
-
var
|
|
73
|
-
return
|
|
74
|
-
(
|
|
75
|
-
default:
|
|
76
|
-
B(
|
|
55
|
+
}), D = i(() => e.value.favicon);
|
|
56
|
+
return F(D), (o, r) => {
|
|
57
|
+
var d;
|
|
58
|
+
return f(), h(U, null, [
|
|
59
|
+
(d = e.value) != null && d.customCss ? (f(), V($("style"), { key: 0 }, {
|
|
60
|
+
default: s(() => [
|
|
61
|
+
b(B(e.value.customCss), 1)
|
|
77
62
|
]),
|
|
78
63
|
_: 1
|
|
79
|
-
})) :
|
|
80
|
-
|
|
64
|
+
})) : N("", !0),
|
|
65
|
+
R(a(L), {
|
|
81
66
|
configuration: e.value,
|
|
82
67
|
isDark: a(S) === "dark",
|
|
83
|
-
parsedSpec: a(
|
|
84
|
-
rawSpec: a(
|
|
85
|
-
onToggleDarkMode:
|
|
86
|
-
onUpdateContent:
|
|
68
|
+
parsedSpec: a(M),
|
|
69
|
+
rawSpec: a(y),
|
|
70
|
+
onToggleDarkMode: r[0] || (r[0] = () => a(k)()),
|
|
71
|
+
onUpdateContent: r[1] || (r[1] = (w) => o.$emit("updateContent", w))
|
|
87
72
|
}, {
|
|
88
|
-
footer:
|
|
73
|
+
footer: s(() => [
|
|
89
74
|
g(o.$slots, "footer")
|
|
90
75
|
]),
|
|
91
|
-
"content-end":
|
|
76
|
+
"content-end": s(() => [
|
|
92
77
|
g(o.$slots, "footer")
|
|
93
78
|
]),
|
|
94
79
|
_: 3
|
|
@@ -98,5 +83,5 @@ const W = /* @__PURE__ */ T({
|
|
|
98
83
|
}
|
|
99
84
|
});
|
|
100
85
|
export {
|
|
101
|
-
|
|
86
|
+
K as default
|
|
102
87
|
};
|
|
@@ -4,16 +4,16 @@ type __VLS_Props = Omit<ReferenceLayoutProps, 'isDark'>;
|
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
6
6
|
slots: Readonly<{
|
|
7
|
-
header: (props: ReferenceSlotProps) => any;
|
|
8
7
|
footer: (props: ReferenceSlotProps) => any;
|
|
8
|
+
header: (props: ReferenceSlotProps) => any;
|
|
9
9
|
editor: (props: ReferenceSlotProps) => any;
|
|
10
10
|
"content-start": (props: ReferenceSlotProps) => any;
|
|
11
11
|
"content-end": (props: ReferenceSlotProps) => any;
|
|
12
12
|
"sidebar-start": (props: ReferenceSlotProps) => any;
|
|
13
13
|
"sidebar-end": (props: ReferenceSlotProps) => any;
|
|
14
14
|
}> & {
|
|
15
|
-
header: (props: ReferenceSlotProps) => any;
|
|
16
15
|
footer: (props: ReferenceSlotProps) => any;
|
|
16
|
+
header: (props: ReferenceSlotProps) => any;
|
|
17
17
|
editor: (props: ReferenceSlotProps) => any;
|
|
18
18
|
"content-start": (props: ReferenceSlotProps) => any;
|
|
19
19
|
"content-end": (props: ReferenceSlotProps) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AA6nBA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,gBAAgB,CAAA;AA4BvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAOjB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AAqRxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBApfZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EAyf/D;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YAliBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAyiB9D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./ApiReferenceLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
const m = /* @__PURE__ */ o
|
|
4
|
+
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0e930cc2"]]);
|
|
6
6
|
export {
|
|
7
7
|
m as default
|
|
8
8
|
};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useHttpClientStore as
|
|
3
|
-
import { provideUseId as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
1
|
+
import { defineComponent as ae, ref as T, computed as h, onBeforeMount as P, onMounted as ne, onUnmounted as ie, watch as C, onServerPrefetch as se, useSSRContext as le, getCurrentInstance as de, provide as p, openBlock as b, createElementBlock as w, Fragment as U, createElementVNode as d, normalizeClass as ue, unref as s, normalizeStyle as ce, renderSlot as u, normalizeProps as c, guardReactiveProps as f, createVNode as g, withCtx as m, createCommentVNode as E, withDirectives as fe, vShow as pe, createSlots as ge } from "vue";
|
|
2
|
+
import { useHttpClientStore as me } from "../stores/useHttpClientStore.js";
|
|
3
|
+
import { provideUseId as Se } from "@headlessui/vue";
|
|
4
|
+
import { createWorkspaceStore as ve, WORKSPACE_SYMBOL as he, createActiveEntitiesStore as be, ACTIVE_ENTITIES_SYMBOL as we } from "@scalar/api-client/store";
|
|
5
|
+
import { addScalarClassesToHeadless as ye, ScalarErrorBoundary as Te } from "@scalar/components";
|
|
6
|
+
import { defaultStateFactory as F } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { hasObtrusiveScrollbars as Ce, getThemeStyles as Ee } from "@scalar/themes";
|
|
8
|
+
import { useToasts as Re, ScalarToasts as Oe } from "@scalar/use-toasts";
|
|
9
|
+
import { useMediaQuery as Ie, useResizeObserver as $e, useDebounceFn as Be } from "@vueuse/core";
|
|
10
|
+
import Le from "./GettingStarted.vue.js";
|
|
11
|
+
import { downloadSpecBus as N, downloadSpecFile as De } from "../helpers/specDownloads.js";
|
|
12
|
+
import { HIDE_DOWNLOAD_BUTTON_SYMBOL as Me, HIDE_TEST_REQUEST_BUTTON_SYMBOL as ke, OPENAPI_DOCUMENT_URL_SYMBOL as Ae, INTEGRATION_SYMBOL as Pe } from "../helpers/provideSymbols.js";
|
|
12
13
|
import { useDeprecationWarnings as Ue } from "../hooks/useDeprecationWarnings.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { useSidebar as
|
|
17
|
-
import { useNavState as
|
|
18
|
-
import { sleep as
|
|
19
|
-
const
|
|
14
|
+
import Fe from "./Sidebar/Sidebar.vue.js";
|
|
15
|
+
import Ne from "./Content/Content.vue.js";
|
|
16
|
+
import He from "../features/ApiClientModal/ApiClientModal.vue.js";
|
|
17
|
+
import { useSidebar as _e } from "../hooks/useSidebar.js";
|
|
18
|
+
import { useNavState as Ye } from "../hooks/useNavState.js";
|
|
19
|
+
import { sleep as ze } from "../helpers/sleep.js";
|
|
20
|
+
const We = ["innerHTML"], Ve = { class: "references-header" }, Ge = {
|
|
20
21
|
key: 0,
|
|
21
22
|
class: "references-navigation t-doc__sidebar"
|
|
22
|
-
},
|
|
23
|
+
}, Ke = { class: "references-navigation-list" }, Qe = { class: "references-editor" }, je = { class: "references-editor-textarea" }, qe = ["aria-label"], Je = {
|
|
23
24
|
key: 0,
|
|
24
25
|
class: "references-footer"
|
|
25
|
-
},
|
|
26
|
+
}, St = /* @__PURE__ */ ae({
|
|
26
27
|
inheritAttrs: !1,
|
|
27
28
|
__name: "ApiReferenceLayout",
|
|
28
29
|
props: {
|
|
@@ -31,98 +32,115 @@ const Ne = ["innerHTML"], He = { class: "references-header" }, Ye = {
|
|
|
31
32
|
rawSpec: {}
|
|
32
33
|
},
|
|
33
34
|
emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
|
|
34
|
-
setup(
|
|
35
|
-
const o =
|
|
36
|
-
|
|
37
|
-
const z =
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
setup(H) {
|
|
36
|
+
const o = H, { initializeToasts: _, toast: Y } = Re();
|
|
37
|
+
_((e) => Y(e));
|
|
38
|
+
const z = Ie("(min-width: 1150px)"), W = T("100dvh"), S = T(null);
|
|
39
|
+
$e(S, (e) => {
|
|
40
|
+
W.value = e[0].contentRect.height + "px";
|
|
40
41
|
});
|
|
41
|
-
const
|
|
42
|
-
breadcrumb:
|
|
42
|
+
const V = h(Ce), {
|
|
43
|
+
breadcrumb: G,
|
|
43
44
|
collapsedSidebarItems: v,
|
|
44
|
-
isSidebarOpen:
|
|
45
|
-
setCollapsedSidebarItem:
|
|
46
|
-
hideModels:
|
|
45
|
+
isSidebarOpen: K,
|
|
46
|
+
setCollapsedSidebarItem: R,
|
|
47
|
+
hideModels: Q,
|
|
47
48
|
defaultOpenAllTags: j,
|
|
48
49
|
setParsedSpec: q,
|
|
49
|
-
scrollToOperation:
|
|
50
|
-
} =
|
|
51
|
-
getPathRoutingId:
|
|
52
|
-
getSectionId:
|
|
53
|
-
getTagId:
|
|
54
|
-
hash:
|
|
55
|
-
isIntersectionEnabled:
|
|
56
|
-
pathRouting:
|
|
57
|
-
updateHash:
|
|
58
|
-
} =
|
|
59
|
-
|
|
60
|
-
const
|
|
50
|
+
scrollToOperation: J
|
|
51
|
+
} = _e(), {
|
|
52
|
+
getPathRoutingId: O,
|
|
53
|
+
getSectionId: X,
|
|
54
|
+
getTagId: Z,
|
|
55
|
+
hash: I,
|
|
56
|
+
isIntersectionEnabled: $,
|
|
57
|
+
pathRouting: B,
|
|
58
|
+
updateHash: L
|
|
59
|
+
} = Ye();
|
|
60
|
+
B.value = o.configuration.pathRouting, P(() => L());
|
|
61
|
+
const D = async (e) => {
|
|
61
62
|
var t;
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
63
|
+
$.value = !1, L(), e ? J(e) : (t = S.value) == null || t.scrollTo(0, 0), await ze(100), $.value = !0;
|
|
64
|
+
}, M = T(0);
|
|
65
|
+
P(() => ye()), ne(() => {
|
|
65
66
|
var r, a, n;
|
|
66
|
-
history.scrollRestoration = "manual",
|
|
67
|
-
|
|
67
|
+
history.scrollRestoration = "manual", N.on(({ specTitle: i }) => {
|
|
68
|
+
De(o.rawSpec, i);
|
|
68
69
|
});
|
|
69
|
-
const e = (a = (r =
|
|
70
|
+
const e = (a = (r = S.value) == null ? void 0 : r.parentElement) == null ? void 0 : a.getBoundingClientRect(), t = (n = S.value) == null ? void 0 : n.getBoundingClientRect();
|
|
70
71
|
if (e && t) {
|
|
71
72
|
const i = t.top - e.top;
|
|
72
|
-
|
|
73
|
+
M.value = i < 2 ? 0 : i;
|
|
73
74
|
}
|
|
74
|
-
window.onhashchange = () =>
|
|
75
|
+
window.onhashchange = () => D(decodeURIComponent(window.location.hash.replace(/^#/, ""))), window.onpopstate = () => B.value && D(O(window.location.pathname));
|
|
75
76
|
});
|
|
76
|
-
const
|
|
77
|
+
const x = h(
|
|
77
78
|
() => z.value || !o.configuration.isEditable
|
|
78
|
-
),
|
|
79
|
+
), k = Be((e) => {
|
|
79
80
|
if ((e.target.scrollTop ?? 0) < 50) {
|
|
80
81
|
const r = o.configuration.pathRouting ? o.configuration.pathRouting.basePath : window.location.pathname;
|
|
81
|
-
window.history.replaceState({}, "", r + window.location.search),
|
|
82
|
+
window.history.replaceState({}, "", r + window.location.search), I.value = "";
|
|
82
83
|
}
|
|
83
84
|
}), l = h(() => ({
|
|
84
|
-
breadcrumb:
|
|
85
|
+
breadcrumb: G.value,
|
|
85
86
|
spec: o.parsedSpec
|
|
86
87
|
}));
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}),
|
|
88
|
+
ie(() => {
|
|
89
|
+
N.reset();
|
|
90
|
+
}), C(() => o.parsedSpec, q, { deep: !0 }), se(() => {
|
|
90
91
|
var t, r;
|
|
91
|
-
const e =
|
|
92
|
-
if (e && (e.payload || (e.payload = { data:
|
|
93
|
-
const a =
|
|
94
|
-
|
|
92
|
+
const e = le();
|
|
93
|
+
if (e && (e.payload || (e.payload = { data: F() }), (t = e.payload).data || (t.data = F()), o.configuration.pathRouting)) {
|
|
94
|
+
const a = O(e.url);
|
|
95
|
+
I.value = a, e.payload.data.hash = a;
|
|
95
96
|
for (const n in v)
|
|
96
97
|
Object.hasOwn(v, n) && delete v[n];
|
|
97
98
|
if (a)
|
|
98
|
-
|
|
99
|
+
R(X(a), !0);
|
|
99
100
|
else {
|
|
100
101
|
const n = (r = o.parsedSpec.tags) == null ? void 0 : r[0];
|
|
101
|
-
n &&
|
|
102
|
+
n && R(Z(n), !0);
|
|
102
103
|
}
|
|
103
104
|
e.payload.data["useSidebarContent-collapsedSidebarItems"] = v;
|
|
104
105
|
}
|
|
105
|
-
}),
|
|
106
|
+
}), Se(() => {
|
|
106
107
|
var a;
|
|
107
|
-
const e =
|
|
108
|
+
const e = de(), t = "scalar-instance-id";
|
|
108
109
|
if (!e) return t;
|
|
109
110
|
let r = e.uid;
|
|
110
111
|
return typeof window > "u" ? (e.attrs || (e.attrs = {}), e.attrs[t] = r) : (a = e.vnode.el) != null && a.getAttribute && (r = e.vnode.el.getAttribute(t)), `${t}-${r}`;
|
|
111
|
-
})
|
|
112
|
-
|
|
112
|
+
});
|
|
113
|
+
const y = ve({
|
|
114
|
+
isReadOnly: !0,
|
|
115
|
+
proxyUrl: o.configuration.proxy,
|
|
116
|
+
themeId: o.configuration.theme,
|
|
117
|
+
useLocalStorage: !1,
|
|
118
|
+
hideClientButton: o.configuration.hideClientButton
|
|
119
|
+
});
|
|
120
|
+
C(
|
|
121
|
+
() => o.rawSpec,
|
|
122
|
+
(e) => y.importSpecFile(e, "default", {
|
|
123
|
+
shouldLoad: !1,
|
|
124
|
+
setCollectionSecurity: !0,
|
|
125
|
+
...o.configuration
|
|
126
|
+
})
|
|
127
|
+
), p(he, y);
|
|
128
|
+
const ee = be(y);
|
|
129
|
+
p(we, ee), p(
|
|
130
|
+
Me,
|
|
113
131
|
() => o.configuration.hideDownloadButton
|
|
114
|
-
),
|
|
115
|
-
|
|
132
|
+
), p(
|
|
133
|
+
ke,
|
|
116
134
|
() => o.configuration.hideTestRequestButton
|
|
117
|
-
),
|
|
135
|
+
), p(Ae, () => {
|
|
118
136
|
var e;
|
|
119
137
|
return (e = o.configuration.spec) == null ? void 0 : e.url;
|
|
120
|
-
}),
|
|
121
|
-
|
|
138
|
+
}), p(
|
|
139
|
+
Pe,
|
|
122
140
|
() => o.configuration._integration !== null ? o.configuration._integration : "vue"
|
|
123
141
|
);
|
|
124
|
-
function
|
|
125
|
-
|
|
142
|
+
function A(e, t) {
|
|
143
|
+
C(
|
|
126
144
|
() => o.configuration[e],
|
|
127
145
|
(r) => {
|
|
128
146
|
typeof r < "u" && t(r);
|
|
@@ -130,54 +148,54 @@ const Ne = ["innerHTML"], He = { class: "references-header" }, Ye = {
|
|
|
130
148
|
{ immediate: !0 }
|
|
131
149
|
);
|
|
132
150
|
}
|
|
133
|
-
const { setExcludedClients:
|
|
134
|
-
|
|
135
|
-
const
|
|
151
|
+
const { setExcludedClients: te, setDefaultHttpClient: oe } = me();
|
|
152
|
+
A("defaultHttpClient", oe), A("hiddenClients", te), Q.value = o.configuration.hideModels ?? !1, j.value = o.configuration.defaultOpenAllTags ?? !1, Ue(o.configuration);
|
|
153
|
+
const re = h(
|
|
136
154
|
() => `<style>
|
|
137
|
-
${
|
|
155
|
+
${Ee(o.configuration.theme, {
|
|
138
156
|
fonts: o.configuration.withDefaultFonts
|
|
139
157
|
})}</style>`
|
|
140
158
|
);
|
|
141
159
|
return (e, t) => {
|
|
142
160
|
var r, a;
|
|
143
|
-
return b(),
|
|
144
|
-
d("div", { innerHTML:
|
|
161
|
+
return b(), w(U, null, [
|
|
162
|
+
d("div", { innerHTML: re.value }, null, 8, We),
|
|
145
163
|
d("div", {
|
|
146
164
|
ref_key: "documentEl",
|
|
147
|
-
ref:
|
|
148
|
-
class:
|
|
165
|
+
ref: S,
|
|
166
|
+
class: ue(["scalar-app scalar-api-reference references-layout", [
|
|
149
167
|
{
|
|
150
|
-
"scalar-scrollbars-obtrusive":
|
|
168
|
+
"scalar-scrollbars-obtrusive": V.value,
|
|
151
169
|
"references-editable": e.configuration.isEditable,
|
|
152
170
|
"references-sidebar": e.configuration.showSidebar,
|
|
153
|
-
"references-sidebar-mobile-open": s(
|
|
171
|
+
"references-sidebar-mobile-open": s(K),
|
|
154
172
|
"references-classic": e.configuration.layout === "classic"
|
|
155
173
|
},
|
|
156
174
|
e.$attrs.class
|
|
157
175
|
]]),
|
|
158
|
-
style:
|
|
159
|
-
"--scalar-y-offset": `var(--scalar-custom-header-height, ${
|
|
176
|
+
style: ce({
|
|
177
|
+
"--scalar-y-offset": `var(--scalar-custom-header-height, ${M.value}px)`
|
|
160
178
|
}),
|
|
161
179
|
onScrollPassive: t[4] || (t[4] = //@ts-ignore
|
|
162
|
-
(...n) => s(
|
|
180
|
+
(...n) => s(k) && s(k)(...n))
|
|
163
181
|
}, [
|
|
164
|
-
d("div",
|
|
165
|
-
u(e.$slots, "header", c(
|
|
182
|
+
d("div", Ve, [
|
|
183
|
+
u(e.$slots, "header", c(f(l.value)), void 0, !0)
|
|
166
184
|
]),
|
|
167
|
-
e.configuration.showSidebar ? (b(),
|
|
168
|
-
d("div",
|
|
169
|
-
|
|
170
|
-
default:
|
|
171
|
-
|
|
185
|
+
e.configuration.showSidebar ? (b(), w("aside", Ge, [
|
|
186
|
+
d("div", Ke, [
|
|
187
|
+
g(s(Te), null, {
|
|
188
|
+
default: m(() => [
|
|
189
|
+
g(s(Fe), {
|
|
172
190
|
operationsSorter: e.configuration.operationsSorter,
|
|
173
191
|
parsedSpec: e.parsedSpec,
|
|
174
192
|
tagsSorter: e.configuration.tagsSorter
|
|
175
193
|
}, {
|
|
176
|
-
"sidebar-start":
|
|
177
|
-
u(e.$slots, "sidebar-start", c(
|
|
194
|
+
"sidebar-start": m(() => [
|
|
195
|
+
u(e.$slots, "sidebar-start", c(f(l.value)), void 0, !0)
|
|
178
196
|
]),
|
|
179
|
-
"sidebar-end":
|
|
180
|
-
u(e.$slots, "sidebar-end", c(
|
|
197
|
+
"sidebar-end": m(() => [
|
|
198
|
+
u(e.$slots, "sidebar-end", c(f(l.value)), void 0, !0)
|
|
181
199
|
]),
|
|
182
200
|
_: 3
|
|
183
201
|
}, 8, ["operationsSorter", "parsedSpec", "tagsSorter"])
|
|
@@ -185,40 +203,39 @@ const Ne = ["innerHTML"], He = { class: "references-header" }, Ye = {
|
|
|
185
203
|
_: 3
|
|
186
204
|
})
|
|
187
205
|
])
|
|
188
|
-
])) :
|
|
189
|
-
|
|
190
|
-
d("div",
|
|
191
|
-
u(e.$slots, "editor", c(
|
|
206
|
+
])) : E("", !0),
|
|
207
|
+
fe(d("div", Qe, [
|
|
208
|
+
d("div", je, [
|
|
209
|
+
u(e.$slots, "editor", c(f(l.value)), void 0, !0)
|
|
192
210
|
])
|
|
193
211
|
], 512), [
|
|
194
|
-
[
|
|
212
|
+
[pe, e.configuration.isEditable]
|
|
195
213
|
]),
|
|
196
|
-
|
|
214
|
+
x.value ? (b(), w(U, { key: 1 }, [
|
|
197
215
|
d("section", {
|
|
198
216
|
"aria-label": `Open API Documentation for ${(r = e.parsedSpec.info) == null ? void 0 : r.title}`,
|
|
199
217
|
class: "references-rendered"
|
|
200
218
|
}, [
|
|
201
|
-
|
|
219
|
+
g(s(Ne), {
|
|
202
220
|
baseServerURL: e.configuration.baseServerURL,
|
|
203
221
|
layout: e.configuration.layout,
|
|
204
222
|
parsedSpec: e.parsedSpec,
|
|
205
|
-
proxyUrl: e.configuration.proxyUrl ?? e.configuration.proxy,
|
|
206
223
|
servers: e.configuration.servers
|
|
207
|
-
},
|
|
208
|
-
start:
|
|
209
|
-
u(e.$slots, "content-start", c(
|
|
224
|
+
}, ge({
|
|
225
|
+
start: m(() => [
|
|
226
|
+
u(e.$slots, "content-start", c(f(l.value)), void 0, !0)
|
|
210
227
|
]),
|
|
211
|
-
end:
|
|
212
|
-
u(e.$slots, "content-end", c(
|
|
228
|
+
end: m(() => [
|
|
229
|
+
u(e.$slots, "content-end", c(f(l.value)), void 0, !0)
|
|
213
230
|
]),
|
|
214
231
|
_: 2
|
|
215
232
|
}, [
|
|
216
233
|
(a = e.configuration) != null && a.isEditable ? {
|
|
217
234
|
name: "empty-state",
|
|
218
|
-
fn:
|
|
235
|
+
fn: m(() => {
|
|
219
236
|
var n;
|
|
220
237
|
return [
|
|
221
|
-
|
|
238
|
+
g(Le, {
|
|
222
239
|
theme: ((n = e.configuration) == null ? void 0 : n.theme) || "default",
|
|
223
240
|
onChangeTheme: t[0] || (t[0] = (i) => e.$emit("changeTheme", i)),
|
|
224
241
|
onLinkSwaggerFile: t[1] || (t[1] = (i) => e.$emit("linkSwaggerFile")),
|
|
@@ -229,19 +246,19 @@ const Ne = ["innerHTML"], He = { class: "references-header" }, Ye = {
|
|
|
229
246
|
}),
|
|
230
247
|
key: "0"
|
|
231
248
|
} : void 0
|
|
232
|
-
]), 1032, ["baseServerURL", "layout", "parsedSpec", "
|
|
233
|
-
], 8,
|
|
234
|
-
e.$slots.footer ? (b(),
|
|
235
|
-
u(e.$slots, "footer", c(
|
|
236
|
-
])) :
|
|
237
|
-
], 64)) :
|
|
238
|
-
|
|
249
|
+
]), 1032, ["baseServerURL", "layout", "parsedSpec", "servers"])
|
|
250
|
+
], 8, qe),
|
|
251
|
+
e.$slots.footer ? (b(), w("div", Je, [
|
|
252
|
+
u(e.$slots, "footer", c(f(l.value)), void 0, !0)
|
|
253
|
+
])) : E("", !0)
|
|
254
|
+
], 64)) : E("", !0),
|
|
255
|
+
g(s(He), { configuration: e.configuration }, null, 8, ["configuration"])
|
|
239
256
|
], 38),
|
|
240
|
-
|
|
257
|
+
g(s(Oe))
|
|
241
258
|
], 64);
|
|
242
259
|
};
|
|
243
260
|
}
|
|
244
261
|
});
|
|
245
262
|
export {
|
|
246
|
-
|
|
263
|
+
St as default
|
|
247
264
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAiOA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAexD,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,IAAI,CAAA;IAChB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,CAAC;AAuBJ,iBAAS,cAAc;WA8MT,OAAO,IAA6B;;uBAVvB,GAAG;+BACM,GAAG;qBACb,GAAG;;;;EAa5B;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YAtQR,QAAQ,GAAG,SAAS;6EA6Q/B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./Content.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-604f5c87"]]);
|
|
6
6
|
export {
|
|
7
7
|
_ as default
|
|
8
8
|
};
|