@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,106 +1,111 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as A, computed as B, openBlock as r, createElementBlock as i, Fragment as d, createStaticVNode as E, createElementVNode as l, renderSlot as n, createVNode as o, unref as s, createBlock as a, withCtx as k, normalizeClass as L, renderList as N, createCommentVNode as p } from "vue";
|
|
2
|
+
import { useActiveEntities as V } from "@scalar/api-client/store";
|
|
3
|
+
import { RequestAuthDataTable as R } from "@scalar/api-client/views/Request/RequestSection/RequestAuth";
|
|
4
|
+
import { ScalarErrorBoundary as q } from "@scalar/components";
|
|
5
|
+
import z from "./Lazy/Loading.vue.js";
|
|
4
6
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import F from "./Authentication/Authentication.vue.js";
|
|
7
|
+
import D from "./Introduction/Introduction.vue.js";
|
|
8
|
+
import F from "../../features/BaseUrl/BaseUrl.vue.js";
|
|
8
9
|
import G from "./ClientLibraries/ClientLibraries.vue.js";
|
|
9
|
-
import
|
|
10
|
+
import b from "./Tag/TagList.vue.js";
|
|
10
11
|
import I from "../../features/Operation/Webhooks.vue.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useSidebar as
|
|
14
|
-
import { hasModels as
|
|
12
|
+
import T from "./Models/ModelsAccordion.vue.js";
|
|
13
|
+
import W from "./Models/Models.vue.js";
|
|
14
|
+
import { useSidebar as j } from "../../hooks/useSidebar.js";
|
|
15
|
+
import { hasModels as H } from "../../helpers/hasModels.js";
|
|
15
16
|
import { getModels as g } from "../../helpers/getModels.js";
|
|
16
|
-
const
|
|
17
|
+
const J = { class: "narrow-references-container" }, K = { class: "scalar-client p-[9px] border-y-1/2" }, ce = /* @__PURE__ */ A({
|
|
17
18
|
__name: "Content",
|
|
18
19
|
props: {
|
|
19
20
|
parsedSpec: {},
|
|
20
21
|
layout: { default: "modern" },
|
|
21
22
|
baseServerURL: {},
|
|
22
|
-
servers: {}
|
|
23
|
-
proxyUrl: {}
|
|
23
|
+
servers: {}
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
() =>
|
|
25
|
+
setup(C) {
|
|
26
|
+
const m = C, { hideModels: w } = j(), { activeCollection: U } = V(), $ = B(
|
|
27
|
+
() => m.layout === "classic" ? "after" : "aside"
|
|
28
28
|
);
|
|
29
|
-
return (e,
|
|
30
|
-
var f,
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
o(
|
|
29
|
+
return (e, u) => {
|
|
30
|
+
var f, v, S, y;
|
|
31
|
+
return r(), i(d, null, [
|
|
32
|
+
u[0] || (u[0] = E('<div class="section-flare" data-v-604f5c87><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div><div class="section-flare-item" data-v-604f5c87></div></div>', 1)),
|
|
33
|
+
l("div", J, [
|
|
34
|
+
n(e.$slots, "start", {}, void 0, !0),
|
|
35
|
+
o(s(z), {
|
|
36
36
|
layout: e.layout,
|
|
37
37
|
parsedSpec: e.parsedSpec
|
|
38
38
|
}, null, 8, ["layout", "parsedSpec"]),
|
|
39
|
-
(
|
|
39
|
+
(v = (f = e.parsedSpec) == null ? void 0 : f.info) != null && v.title || (y = (S = e.parsedSpec) == null ? void 0 : S.info) != null && y.description ? (r(), a(s(D), {
|
|
40
40
|
key: 0,
|
|
41
41
|
info: e.parsedSpec.info,
|
|
42
42
|
parsedSpec: e.parsedSpec
|
|
43
43
|
}, {
|
|
44
|
-
[
|
|
45
|
-
o(
|
|
46
|
-
default: k(() =>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
44
|
+
[$.value]: k(() => [
|
|
45
|
+
o(s(q), null, {
|
|
46
|
+
default: k(() => {
|
|
47
|
+
var t;
|
|
48
|
+
return [
|
|
49
|
+
l("div", {
|
|
50
|
+
class: L(["introduction-card", { "introduction-card-row": e.layout === "classic" }])
|
|
51
|
+
}, [
|
|
52
|
+
o(s(F), {
|
|
53
|
+
class: "introduction-card-item",
|
|
54
|
+
defaultServerUrl: e.baseServerURL,
|
|
55
|
+
servers: m.servers,
|
|
56
|
+
specification: e.parsedSpec
|
|
57
|
+
}, null, 8, ["defaultServerUrl", "servers", "specification"]),
|
|
58
|
+
l("div", K, [
|
|
59
|
+
o(s(R), {
|
|
60
|
+
layout: "reference",
|
|
61
|
+
selectedSecuritySchemeUids: ((t = s(U)) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [],
|
|
62
|
+
title: "Authentication"
|
|
63
|
+
}, null, 8, ["selectedSecuritySchemeUids"])
|
|
64
|
+
]),
|
|
65
|
+
o(s(G), { class: "introduction-card-item" })
|
|
66
|
+
], 2)
|
|
67
|
+
];
|
|
68
|
+
}),
|
|
64
69
|
_: 1
|
|
65
70
|
})
|
|
66
71
|
]),
|
|
67
72
|
_: 2
|
|
68
|
-
}, 1032, ["info", "parsedSpec"])) :
|
|
69
|
-
e.parsedSpec.tags ? (
|
|
70
|
-
e.parsedSpec["x-tagGroups"] ? (
|
|
71
|
-
key:
|
|
73
|
+
}, 1032, ["info", "parsedSpec"])) : n(e.$slots, "empty-state", { key: 1 }, void 0, !0),
|
|
74
|
+
e.parsedSpec.tags ? (r(), i(d, { key: 2 }, [
|
|
75
|
+
e.parsedSpec["x-tagGroups"] ? (r(!0), i(d, { key: 0 }, N(e.parsedSpec["x-tagGroups"], (t) => (r(), a(s(b), {
|
|
76
|
+
key: t.name,
|
|
72
77
|
layout: e.layout,
|
|
73
78
|
spec: e.parsedSpec,
|
|
74
|
-
tags:
|
|
75
|
-
var
|
|
76
|
-
return (
|
|
77
|
-
}).filter((
|
|
78
|
-
}, null, 8, ["layout", "spec", "tags"]))), 128)) : (
|
|
79
|
+
tags: t.tags.map((c) => {
|
|
80
|
+
var h;
|
|
81
|
+
return (h = e.parsedSpec.tags) == null ? void 0 : h.find((M) => M.name === c);
|
|
82
|
+
}).filter((c) => !!c)
|
|
83
|
+
}, null, 8, ["layout", "spec", "tags"]))), 128)) : (r(), a(s(b), {
|
|
79
84
|
key: 1,
|
|
80
85
|
layout: e.layout,
|
|
81
86
|
spec: e.parsedSpec,
|
|
82
87
|
tags: e.parsedSpec.tags
|
|
83
88
|
}, null, 8, ["layout", "spec", "tags"]))
|
|
84
89
|
], 64)) : p("", !0),
|
|
85
|
-
e.parsedSpec.webhooks ? (
|
|
90
|
+
e.parsedSpec.webhooks ? (r(), a(s(I), {
|
|
86
91
|
key: 3,
|
|
87
92
|
webhooks: e.parsedSpec.webhooks
|
|
88
93
|
}, null, 8, ["webhooks"])) : p("", !0),
|
|
89
|
-
|
|
90
|
-
e.layout === "classic" ? (
|
|
94
|
+
s(H)(e.parsedSpec) && !s(w) ? (r(), i(d, { key: 4 }, [
|
|
95
|
+
e.layout === "classic" ? (r(), a(s(T), {
|
|
91
96
|
key: 0,
|
|
92
|
-
schemas:
|
|
93
|
-
}, null, 8, ["schemas"])) : (
|
|
97
|
+
schemas: s(g)(e.parsedSpec)
|
|
98
|
+
}, null, 8, ["schemas"])) : (r(), a(s(W), {
|
|
94
99
|
key: 1,
|
|
95
|
-
schemas:
|
|
100
|
+
schemas: s(g)(e.parsedSpec)
|
|
96
101
|
}, null, 8, ["schemas"]))
|
|
97
102
|
], 64)) : p("", !0),
|
|
98
|
-
|
|
103
|
+
n(e.$slots, "end", {}, void 0, !0)
|
|
99
104
|
])
|
|
100
105
|
], 64);
|
|
101
106
|
};
|
|
102
107
|
}
|
|
103
108
|
});
|
|
104
109
|
export {
|
|
105
|
-
|
|
110
|
+
ce as default
|
|
106
111
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Loading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Lazy/Loading.vue"],"names":[],"mappings":"AAsOA,OAAO,KAAK,EACV,IAAI,EAGL,MAAM,sBAAsB,CAAA;AAkB7B;;;;;;;;;;;;GAYG;AACH,KAAK,WAAW,GAAG;IACf,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;;YAFS,QAAQ,GAAG,SAAS;;AAyQjC,wBAQG"}
|
|
@@ -1,117 +1,122 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
1
|
+
import { defineComponent as K, ref as v, watch as M, onMounted as j, withDirectives as A, openBlock as a, createElementBlock as m, normalizeClass as F, Fragment as h, renderList as b, createBlock as f, unref as t, withCtx as p, createCommentVNode as w, createVNode as T, createTextVNode as H, toDisplayString as P, vShow as G } from "vue";
|
|
2
|
+
import { useWorkspace as J } from "@scalar/api-client/store";
|
|
3
|
+
import { lazyBus as Q } from "./lazyBus.js";
|
|
4
|
+
import R from "../Tag/Tag.vue.js";
|
|
5
|
+
import U from "../../../features/Operation/Operation.vue.js";
|
|
6
|
+
import X from "../../Section/SectionContainer.vue.js";
|
|
7
|
+
import Y from "../../Section/Section.vue.js";
|
|
8
|
+
import Z from "../../Section/SectionContent.vue.js";
|
|
9
|
+
import ee from "../../Section/SectionHeader.vue.js";
|
|
10
|
+
import te from "../../Anchor/Anchor.vue.js";
|
|
11
|
+
import oe from "../Schema/Schema.vue.js";
|
|
12
|
+
import { getModels as g } from "../../../helpers/getModels.js";
|
|
13
|
+
import { scrollToId as C } from "../../../helpers/scrollToId.js";
|
|
14
|
+
import { useNavState as re } from "../../../hooks/useNavState.js";
|
|
15
|
+
const ye = /* @__PURE__ */ K({
|
|
15
16
|
__name: "Loading",
|
|
16
17
|
props: {
|
|
17
18
|
layout: { default: "modern" },
|
|
18
19
|
parsedSpec: {}
|
|
19
20
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const i =
|
|
22
|
-
|
|
21
|
+
setup(q) {
|
|
22
|
+
const i = q, _ = v(!1), y = v([]), S = v([]), { requests: E, requestExamples: L, securitySchemes: V } = J(), { getModelId: z, getSectionId: B, getTagId: N, hash: s, isIntersectionEnabled: I } = re(), x = v(i.layout !== "classic" && s.value);
|
|
23
|
+
M(
|
|
23
24
|
() => {
|
|
24
25
|
var r;
|
|
25
26
|
return (r = i.parsedSpec.tags) == null ? void 0 : r.length;
|
|
26
27
|
},
|
|
27
28
|
(r) => {
|
|
28
29
|
var e, u;
|
|
29
|
-
if (!
|
|
30
|
+
if (!s.value || typeof r != "number" || !i.parsedSpec.tags)
|
|
30
31
|
return;
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
let
|
|
34
|
-
const
|
|
35
|
-
(
|
|
36
|
-
)) ?? 0,
|
|
37
|
-
if ((
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
({ httpVerb:
|
|
32
|
+
const l = B();
|
|
33
|
+
if (l.startsWith("tag")) {
|
|
34
|
+
let o = 0;
|
|
35
|
+
const c = ((e = i.parsedSpec.tags) == null ? void 0 : e.findIndex(
|
|
36
|
+
(k) => N(k) === l
|
|
37
|
+
)) ?? 0, n = s.value.match(/tag\/([^/]+)\/([^/]+)\/(.+)/);
|
|
38
|
+
if ((n == null ? void 0 : n.length) === 4) {
|
|
39
|
+
const k = n[2], O = "/" + n[3];
|
|
40
|
+
o = (u = i.parsedSpec.tags[c]) == null ? void 0 : u.operations.findIndex(
|
|
41
|
+
({ httpVerb: $, path: D }) => k === $ && O === D
|
|
41
42
|
);
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
|
|
46
|
-
...
|
|
47
|
-
lazyOperations:
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
const d = i.parsedSpec.tags[c];
|
|
45
|
+
if (!d) return;
|
|
46
|
+
d.name !== "default" && (_.value = l !== s.value && l.startsWith("tag")), y.value.push({
|
|
47
|
+
...d,
|
|
48
|
+
lazyOperations: d.operations.slice(
|
|
49
|
+
o,
|
|
50
|
+
o + 2
|
|
50
51
|
)
|
|
51
52
|
});
|
|
52
|
-
} else if (
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
|
|
53
|
+
} else if (s.value.startsWith("model")) {
|
|
54
|
+
const o = Object.keys(g(i.parsedSpec) ?? {}), [, c] = s.value.toLowerCase().split("/"), n = s.value === "models" ? 0 : o.findIndex((d) => d.toLowerCase() === c);
|
|
55
|
+
if (n === -1) return;
|
|
56
|
+
S.value = o.slice(n, n + 3);
|
|
56
57
|
} else
|
|
57
|
-
typeof window < "u" &&
|
|
58
|
+
typeof window < "u" && C(s.value), setTimeout(() => I.value = !0, 1e3);
|
|
58
59
|
},
|
|
59
60
|
{ immediate: !0 }
|
|
60
61
|
);
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
!
|
|
64
|
-
typeof window < "u" &&
|
|
62
|
+
const W = Q.on(({ id: r }) => {
|
|
63
|
+
const l = s.value;
|
|
64
|
+
!l || r !== l || (W(), setTimeout(() => {
|
|
65
|
+
typeof window < "u" && C(l), x.value = !1, setTimeout(() => I.value = !0, 1e3);
|
|
65
66
|
}, 300));
|
|
66
67
|
});
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
}), (r,
|
|
70
|
-
class:
|
|
71
|
-
"references-loading-hidden-tag":
|
|
72
|
-
"references-loading-top-spacer":
|
|
68
|
+
return j(() => {
|
|
69
|
+
s.value || setTimeout(() => I.value = !0, 1e3);
|
|
70
|
+
}), (r, l) => A((a(), m("div", {
|
|
71
|
+
class: F(["references-loading", {
|
|
72
|
+
"references-loading-hidden-tag": _.value,
|
|
73
|
+
"references-loading-top-spacer": y.value.length
|
|
73
74
|
}])
|
|
74
75
|
}, [
|
|
75
|
-
(
|
|
76
|
+
(a(!0), m(h, null, b(y.value, (e, u) => (a(), m(h, {
|
|
76
77
|
key: e.name + u
|
|
77
78
|
}, [
|
|
78
|
-
e.operations && e.operations.length > 0 ? (
|
|
79
|
+
e.operations && e.operations.length > 0 ? (a(), f(t(R), {
|
|
79
80
|
key: 0,
|
|
80
81
|
spec: r.parsedSpec,
|
|
81
82
|
tag: e
|
|
82
83
|
}, {
|
|
83
84
|
default: p(() => [
|
|
84
|
-
(
|
|
85
|
-
key: `${
|
|
86
|
-
|
|
85
|
+
(a(!0), m(h, null, b(e.lazyOperations, (o) => (a(), f(t(U), {
|
|
86
|
+
key: `${o.httpVerb}-${o.operationId}`,
|
|
87
|
+
layout: r.layout,
|
|
88
|
+
operation: o,
|
|
89
|
+
requestExamples: t(L),
|
|
90
|
+
requests: t(E),
|
|
91
|
+
securitySchemes: t(V),
|
|
87
92
|
tag: e
|
|
88
|
-
}, null, 8, ["operation", "tag"]))), 128))
|
|
93
|
+
}, null, 8, ["layout", "operation", "requestExamples", "requests", "securitySchemes", "tag"]))), 128))
|
|
89
94
|
]),
|
|
90
95
|
_: 2
|
|
91
96
|
}, 1032, ["spec", "tag"])) : w("", !0)
|
|
92
97
|
], 64))), 128)),
|
|
93
|
-
|
|
98
|
+
S.value.length ? (a(), f(t(X), { key: 0 }, {
|
|
94
99
|
default: p(() => [
|
|
95
|
-
(
|
|
100
|
+
(a(!0), m(h, null, b(S.value, (e) => (a(), f(t(Y), {
|
|
96
101
|
key: e,
|
|
97
102
|
label: e
|
|
98
103
|
}, {
|
|
99
104
|
default: p(() => {
|
|
100
105
|
var u;
|
|
101
106
|
return [
|
|
102
|
-
(u =
|
|
107
|
+
(u = t(g)(r.parsedSpec)) != null && u[e] ? (a(), f(t(Z), { key: 0 }, {
|
|
103
108
|
default: p(() => {
|
|
104
|
-
var
|
|
109
|
+
var o;
|
|
105
110
|
return [
|
|
106
|
-
|
|
111
|
+
T(t(ee), { level: 2 }, {
|
|
107
112
|
default: p(() => [
|
|
108
|
-
|
|
109
|
-
id:
|
|
113
|
+
T(t(te), {
|
|
114
|
+
id: t(z)(e)
|
|
110
115
|
}, {
|
|
111
116
|
default: p(() => {
|
|
112
|
-
var
|
|
117
|
+
var c;
|
|
113
118
|
return [
|
|
114
|
-
|
|
119
|
+
H(P(((c = t(g)(r.parsedSpec)) == null ? void 0 : c[e]).title ?? e), 1)
|
|
115
120
|
];
|
|
116
121
|
}),
|
|
117
122
|
_: 2
|
|
@@ -119,10 +124,10 @@ const fe = /* @__PURE__ */ D({
|
|
|
119
124
|
]),
|
|
120
125
|
_: 2
|
|
121
126
|
}, 1024),
|
|
122
|
-
|
|
127
|
+
T(t(oe), {
|
|
123
128
|
name: e,
|
|
124
129
|
noncollapsible: "",
|
|
125
|
-
value: (
|
|
130
|
+
value: (o = t(g)(r.parsedSpec)) == null ? void 0 : o[e]
|
|
126
131
|
}, null, 8, ["name", "value"])
|
|
127
132
|
];
|
|
128
133
|
}),
|
|
@@ -136,10 +141,10 @@ const fe = /* @__PURE__ */ D({
|
|
|
136
141
|
_: 1
|
|
137
142
|
})) : w("", !0)
|
|
138
143
|
], 2)), [
|
|
139
|
-
[
|
|
144
|
+
[G, x.value]
|
|
140
145
|
]);
|
|
141
146
|
}
|
|
142
147
|
});
|
|
143
148
|
export {
|
|
144
|
-
|
|
149
|
+
ye as default
|
|
145
150
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;;AAiHF,wBAMG"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as g, computed as v, openBlock as r, createElementBlock as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as g, computed as v, openBlock as r, createElementBlock as l, Fragment as n, renderList as p, createBlock as i, unref as e, withCtx as a, resolveDynamicComponent as B, createVNode as d } from "vue";
|
|
2
|
+
import { useWorkspace as I } from "@scalar/api-client/store";
|
|
3
|
+
import { ScalarErrorBoundary as T } from "@scalar/components";
|
|
4
|
+
import $ from "./TagAccordion.vue.js";
|
|
5
|
+
import b from "./Tag.vue.js";
|
|
5
6
|
import f from "../Lazy/Lazy.vue2.js";
|
|
6
|
-
import
|
|
7
|
-
import { useSidebar as
|
|
8
|
-
import { useNavState as
|
|
9
|
-
const
|
|
7
|
+
import x from "../../../features/Operation/Operation.vue.js";
|
|
8
|
+
import { useSidebar as C } from "../../../hooks/useSidebar.js";
|
|
9
|
+
import { useNavState as N } from "../../../hooks/useNavState.js";
|
|
10
|
+
const J = /* @__PURE__ */ g({
|
|
10
11
|
__name: "TagList",
|
|
11
12
|
props: {
|
|
12
13
|
tags: {},
|
|
@@ -14,35 +15,38 @@ const j = /* @__PURE__ */ g({
|
|
|
14
15
|
layout: {}
|
|
15
16
|
},
|
|
16
17
|
setup(y) {
|
|
17
|
-
const
|
|
18
|
-
() =>
|
|
19
|
-
),
|
|
20
|
-
return (
|
|
21
|
-
id: e(
|
|
22
|
-
key: e(
|
|
23
|
-
isLazy: e(
|
|
18
|
+
const c = y, { getOperationId: m, getTagId: o, hash: _ } = N(), { collapsedSidebarItems: h } = C(), { requests: L, requestExamples: S, securitySchemes: k } = I(), q = v(
|
|
19
|
+
() => c.layout === "classic" ? $ : b
|
|
20
|
+
), z = c.layout !== "classic" && !_.value.startsWith("model");
|
|
21
|
+
return (u, V) => (r(!0), l(n, null, p(u.tags, (t) => (r(), i(e(f), {
|
|
22
|
+
id: e(o)(t),
|
|
23
|
+
key: e(o)(t),
|
|
24
|
+
isLazy: e(z) && !e(h)[e(o)(t)]
|
|
24
25
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
(r(),
|
|
27
|
-
id: e(
|
|
28
|
-
spec:
|
|
26
|
+
default: a(() => [
|
|
27
|
+
(r(), i(B(q.value), {
|
|
28
|
+
id: e(o)(t),
|
|
29
|
+
spec: u.spec,
|
|
29
30
|
tag: t
|
|
30
31
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
(r(!0),
|
|
33
|
-
id: e(
|
|
34
|
-
key: `${
|
|
35
|
-
isLazy:
|
|
32
|
+
default: a(() => [
|
|
33
|
+
(r(!0), l(n, null, p(t.operations, (s, E) => (r(), i(e(f), {
|
|
34
|
+
id: e(m)(s, t),
|
|
35
|
+
key: `${s.httpVerb}-${s.operationId}`,
|
|
36
|
+
isLazy: E > 0
|
|
36
37
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
|
|
39
|
-
default:
|
|
40
|
-
|
|
41
|
-
id: e(
|
|
42
|
-
layout:
|
|
43
|
-
operation:
|
|
38
|
+
default: a(() => [
|
|
39
|
+
d(e(T), null, {
|
|
40
|
+
default: a(() => [
|
|
41
|
+
d(e(x), {
|
|
42
|
+
id: e(m)(s, t),
|
|
43
|
+
layout: u.layout,
|
|
44
|
+
operation: s,
|
|
45
|
+
requestExamples: e(S),
|
|
46
|
+
requests: e(L),
|
|
47
|
+
securitySchemes: e(k),
|
|
44
48
|
tag: t
|
|
45
|
-
}, null, 8, ["id", "layout", "operation", "tag"])
|
|
49
|
+
}, null, 8, ["id", "layout", "operation", "requestExamples", "requests", "securitySchemes", "tag"])
|
|
46
50
|
]),
|
|
47
51
|
_: 2
|
|
48
52
|
}, 1024)
|
|
@@ -58,5 +62,5 @@ const j = /* @__PURE__ */ g({
|
|
|
58
62
|
}
|
|
59
63
|
});
|
|
60
64
|
export {
|
|
61
|
-
|
|
65
|
+
J as default
|
|
62
66
|
};
|
|
@@ -2,7 +2,7 @@ import type { Spec, TransformedOperation } from '@scalar/types/legacy';
|
|
|
2
2
|
import type { OpenApiDocumentConfiguration } from '../OpenApiDocument/types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
parsedSpec: Spec;
|
|
5
|
-
operation
|
|
5
|
+
operation: TransformedOperation;
|
|
6
6
|
configuration?: OpenApiDocumentConfiguration;
|
|
7
7
|
};
|
|
8
8
|
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, {}, HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGtE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAI5E,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,IAAI,CAAA;IAChB,SAAS,EAAE,oBAAoB,CAAA;IAC/B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;;AA4GF,wBAOG"}
|