@scalar/api-reference 1.29.3 → 1.31.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 +58 -0
- package/README.md +13 -114
- package/dist/browser/standalone.js +6525 -6416
- package/dist/browser/webpack-stats.json +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 +164 -181
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
- 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 +5 -5
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +57 -63
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +46 -46
- package/dist/components/Content/Models/Models.vue.d.ts +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +7 -6
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.preview.d.ts +98 -56
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +6 -3
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue2.js +140 -97
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +13 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +49 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +4 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -2
- 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 +40 -38
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +147 -143
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +9 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.js +45 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
- package/dist/components/Layouts/ClassicLayout.vue.js +10 -8
- package/dist/components/Layouts/Layouts.vue.js +11 -9
- package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +2 -2
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/components/SingleApiReference.vue.js +27 -33
- package/dist/esm.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
- package/dist/features/ApiClientModal/useApiClient.d.ts +224 -204
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
- package/dist/features/DocumentSource/index.d.ts +2 -0
- package/dist/features/DocumentSource/index.d.ts.map +1 -0
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
- package/dist/features/DownloadLink/index.d.ts +1 -0
- package/dist/features/DownloadLink/index.d.ts.map +1 -1
- package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
- package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
- package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
- package/dist/features/Operation/Operation.vue.d.ts +2 -2
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
- 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/ParameterList.vue.d.ts +2 -2
- 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/ParameterListItem.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
- 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/callbacks/Callback.vue.d.ts +14 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.js +7 -0
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +62 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +10 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +30 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +4 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +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 +55 -55
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +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 +94 -79
- package/dist/features/Operation/types/schemas.d.ts +3 -0
- package/dist/features/Operation/types/schemas.d.ts.map +1 -0
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/helpers/local-storage.d.ts +8 -0
- package/dist/helpers/local-storage.d.ts.map +1 -0
- package/dist/helpers/local-storage.js +6 -0
- package/dist/helpers/measure.d.ts +21 -0
- package/dist/helpers/measure.d.ts.map +1 -0
- package/dist/helpers/measure.js +7 -0
- package/dist/helpers/parse.d.ts +3 -5
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +64 -86
- package/dist/helpers/scroll-to-id.d.ts.map +1 -1
- package/dist/helpers/scroll-to-id.js +18 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -35
- package/dist/libs/openapi.d.ts +3 -3
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +35 -42
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +15 -15
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/stores/useHttpClientStore.js +19 -18
- package/dist/style.css +1 -1
- package/dist/types.d.ts +27 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +15 -16
- package/dist/hooks/useReactiveSpec.d.ts +0 -448
- package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
- package/dist/hooks/useReactiveSpec.js +0 -59
|
@@ -1,73 +1,72 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { mutateSecuritySchemeDiff as
|
|
4
|
-
import { getServersFromOpenApiDocument as
|
|
5
|
-
import { watchDebounced as
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as d, ref as h, onMounted as S, watch as E, onBeforeUnmount as b, createElementBlock as x, openBlock as D } from "vue";
|
|
2
|
+
import { useActiveEntities as M, useWorkspace as g } from "@scalar/api-client/store";
|
|
3
|
+
import { mutateSecuritySchemeDiff as k } from "@scalar/api-client/views/Request/libs";
|
|
4
|
+
import { getServersFromOpenApiDocument as A } from "@scalar/oas-utils/transforms";
|
|
5
|
+
import { watchDebounced as U } from "@vueuse/core";
|
|
6
|
+
import B from "microdiff";
|
|
7
7
|
import { useNavState as _ } from "../../hooks/useNavState.js";
|
|
8
8
|
import { useApiClient as y } from "./useApiClient.js";
|
|
9
|
-
import { useExampleStore as
|
|
10
|
-
const
|
|
9
|
+
import { useExampleStore as C } from "../../legacy/stores/useExampleStore.js";
|
|
10
|
+
const q = /* @__PURE__ */ d({
|
|
11
11
|
__name: "ApiClientModal",
|
|
12
12
|
props: {
|
|
13
13
|
configuration: {},
|
|
14
|
-
|
|
14
|
+
dereferencedDocument: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const c =
|
|
18
|
-
return
|
|
19
|
-
c.value &&
|
|
16
|
+
setup(a) {
|
|
17
|
+
const c = h(null), { client: i, init: p } = y(), { selectedExampleKey: v, operationId: l } = C(), u = M(), r = g(), { isIntersectionEnabled: m } = _();
|
|
18
|
+
return S(() => {
|
|
19
|
+
c.value && p({
|
|
20
20
|
el: c.value,
|
|
21
|
-
configuration:
|
|
21
|
+
configuration: a.configuration,
|
|
22
22
|
store: r
|
|
23
23
|
});
|
|
24
|
-
}),
|
|
25
|
-
() =>
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
if (!a || !s.activeCollection.value)
|
|
24
|
+
}), U(
|
|
25
|
+
() => a.configuration,
|
|
26
|
+
(t, o) => {
|
|
27
|
+
if (!o || !u.activeCollection.value)
|
|
29
28
|
return;
|
|
30
|
-
const n =
|
|
31
|
-
if (
|
|
32
|
-
(
|
|
33
|
-
))
|
|
34
|
-
(f
|
|
35
|
-
|
|
36
|
-
t.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
r.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
const n = u.activeCollection.value, f = B(o, t);
|
|
30
|
+
if (!f.some(
|
|
31
|
+
(e) => e.path[0] === "url" || e.path[0] === "content" || e.path[1] === "url" || e.path[1] === "content"
|
|
32
|
+
)) {
|
|
33
|
+
if (f.forEach((e) => {
|
|
34
|
+
e.path[0] === "authentication" && k(e, u, r);
|
|
35
|
+
}), t.servers || o.servers) {
|
|
36
|
+
n.servers.forEach((s) => {
|
|
37
|
+
r.serverMutators.delete(s, n.uid);
|
|
38
|
+
});
|
|
39
|
+
const e = A(
|
|
40
|
+
t.servers ?? a.dereferencedDocument.servers,
|
|
41
|
+
{
|
|
42
|
+
baseServerURL: t.baseServerURL
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
e.forEach((s) => {
|
|
46
|
+
r.serverMutators.add(s, n.uid);
|
|
47
|
+
}), e.length && r.collectionMutators.edit(
|
|
48
|
+
n.uid,
|
|
49
|
+
"selectedServerUid",
|
|
50
|
+
e[e.length - 1].uid
|
|
51
|
+
);
|
|
52
|
+
}
|
|
54
53
|
}
|
|
55
54
|
m.value = !1, setTimeout(() => {
|
|
56
55
|
m.value = !0;
|
|
57
56
|
}, 1e3);
|
|
58
57
|
},
|
|
59
58
|
{ deep: !0, debounce: 300 }
|
|
60
|
-
),
|
|
61
|
-
|
|
62
|
-
}),
|
|
63
|
-
var
|
|
64
|
-
return (
|
|
65
|
-
}), (
|
|
59
|
+
), E(v, (t) => {
|
|
60
|
+
i.value && t && l.value && i.value.updateExample(t, l.value);
|
|
61
|
+
}), b(() => {
|
|
62
|
+
var t;
|
|
63
|
+
return (t = i.value) == null ? void 0 : t.app.unmount();
|
|
64
|
+
}), (t, o) => (D(), x("div", {
|
|
66
65
|
ref_key: "el",
|
|
67
66
|
ref: c
|
|
68
67
|
}, null, 512));
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
q as default
|
|
73
72
|
};
|