@scalar/api-reference 1.34.1 → 1.34.4
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 +99 -0
- package/README.md +1 -1
- package/dist/browser/standalone.js +13121 -12730
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Badge/Badge.vue.d.ts +4 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +5 -11
- package/dist/components/Badge/Badge.vue2.js +22 -2
- package/dist/components/Badge/Badge.vue3.js +4 -0
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +30 -31
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +2 -0
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +39 -37
- package/dist/components/Content/Operations/TraversedEntry.vue.js +12 -12
- package/dist/components/Content/Tags/TagSection.vue.js +6 -6
- package/dist/components/GettingStarted.vue.js +3 -3
- package/dist/components/GettingStarted.vue2.js +21 -21
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue.d.ts +2 -0
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue2.js +30 -29
- package/dist/features/Operation/Operation.vue.d.ts +2 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +53 -52
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -2
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +16 -16
- package/dist/features/Operation/helpers/combine-params.d.ts +5 -0
- package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -0
- package/dist/features/Operation/helpers/combine-params.js +13 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -4
- 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 +59 -50
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -4
- 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 +94 -78
- package/dist/features/Search/helpers/create-fuse-instance.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.js +0 -3
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.js +51 -48
- package/dist/features/api-client-modal/useApiClient.d.ts +100 -100
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.js +16 -18
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.js +30 -33
- package/dist/features/example-responses/ExampleResponse.vue.d.ts +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponse.vue2.js +15 -13
- package/dist/features/example-responses/ExampleResponses.vue.d.ts +2 -3
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponses.vue2.js +73 -69
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts +26 -0
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +1 -0
- package/dist/features/example-responses/helpers/get-resolved-ref-deep.js +29 -0
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue2.js +6 -6
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +13 -14
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +1 -2
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +11 -12
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/features/x-badges/XBadges.vue.d.ts +8 -0
- package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -0
- package/dist/features/x-badges/XBadges.vue.js +26 -0
- package/dist/features/x-badges/XBadges.vue2.js +4 -0
- package/dist/features/x-badges/index.d.ts +2 -0
- package/dist/features/x-badges/index.d.ts.map +1 -0
- package/dist/helpers/test-utils.d.ts +1 -1
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -2
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/libs/openapi.d.ts +4 -14
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +55 -36
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +64 -64
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +1 -2
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +2 -2
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +97 -100
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +1 -2
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +17 -20
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/helpers/map-configuration.d.ts +66 -0
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -0
- package/dist/v2/helpers/map-configuration.js +53 -0
- package/dist/vitest.setup.d.ts +2 -0
- package/dist/vitest.setup.d.ts.map +1 -0
- package/package.json +24 -20
|
@@ -1,93 +1,96 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { mutateSecuritySchemeDiff as
|
|
4
|
-
import {
|
|
5
|
-
import { watchDebounced as
|
|
6
|
-
import
|
|
7
|
-
import { useNavState as
|
|
1
|
+
import { defineComponent as E, ref as B, onMounted as b, watch as R, onBeforeUnmount as k, createElementBlock as q, openBlock as x } from "vue";
|
|
2
|
+
import { useActiveEntities as D, useWorkspace as M } from "@scalar/api-client/store";
|
|
3
|
+
import { mutateSecuritySchemeDiff as U } from "@scalar/api-client/views/Request/libs";
|
|
4
|
+
import { getServersFromDocument as C } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { watchDebounced as v } from "@vueuse/core";
|
|
6
|
+
import h from "microdiff";
|
|
7
|
+
import { useNavState as y } from "../../hooks/useNavState.js";
|
|
8
8
|
import { useApiClient as A } from "./useApiClient.js";
|
|
9
|
-
import { useExampleStore as
|
|
10
|
-
const
|
|
9
|
+
import { useExampleStore as L } from "../../legacy/stores/useExampleStore.js";
|
|
10
|
+
const z = /* @__PURE__ */ E({
|
|
11
11
|
__name: "ApiClientModal",
|
|
12
12
|
props: {
|
|
13
13
|
configuration: {},
|
|
14
14
|
dereferencedDocument: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
16
|
+
setup(o) {
|
|
17
|
+
const l = B(null), { client: c, init: p } = A(), { selectedExampleKey: S, operationId: m } = L(), a = D(), n = M(), { isIntersectionEnabled: d } = y(), g = () => ({
|
|
18
18
|
name: "on-before-request",
|
|
19
19
|
hooks: {
|
|
20
|
-
onBeforeRequest:
|
|
20
|
+
onBeforeRequest: o.configuration.onBeforeRequest
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
el:
|
|
23
|
+
return b(() => {
|
|
24
|
+
l.value && p({
|
|
25
|
+
el: l.value,
|
|
26
26
|
configuration: {
|
|
27
|
-
...
|
|
27
|
+
...o.configuration,
|
|
28
28
|
// If the onBeforeRequest hook is configured, we add the plugin to the API client.
|
|
29
|
-
plugins:
|
|
29
|
+
plugins: o.configuration.onBeforeRequest ? [g] : []
|
|
30
30
|
},
|
|
31
31
|
store: n
|
|
32
32
|
});
|
|
33
|
-
}),
|
|
34
|
-
() =>
|
|
35
|
-
(e,
|
|
36
|
-
var
|
|
37
|
-
|
|
33
|
+
}), v(
|
|
34
|
+
() => o.dereferencedDocument,
|
|
35
|
+
(e, u) => {
|
|
36
|
+
var i, s;
|
|
37
|
+
if (!e)
|
|
38
|
+
return;
|
|
39
|
+
const r = h(e, u || {});
|
|
40
|
+
r != null && r.length && (a.activeCollection.value && ((i = c.value) == null || i.resetStore()), n.importSpecFile(void 0, "default", {
|
|
38
41
|
dereferencedDocument: e,
|
|
39
42
|
shouldLoad: !1,
|
|
40
|
-
documentUrl: (
|
|
43
|
+
documentUrl: (s = o.configuration) == null ? void 0 : s.url,
|
|
41
44
|
useCollectionSecurity: !0,
|
|
42
|
-
...
|
|
45
|
+
...o.configuration
|
|
43
46
|
}));
|
|
44
47
|
}
|
|
45
|
-
),
|
|
46
|
-
() =>
|
|
47
|
-
(e,
|
|
48
|
-
if (!
|
|
48
|
+
), v(
|
|
49
|
+
() => o.configuration,
|
|
50
|
+
(e, u) => {
|
|
51
|
+
if (!u || !a.activeCollection.value)
|
|
49
52
|
return;
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
53
|
+
const r = a.activeCollection.value, i = h(u, e);
|
|
54
|
+
if (!i.some(
|
|
52
55
|
(t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
|
|
53
56
|
)) {
|
|
54
|
-
if (
|
|
55
|
-
t.path[0] === "authentication" &&
|
|
56
|
-
}), e.servers ||
|
|
57
|
-
|
|
58
|
-
n.serverMutators.delete(
|
|
57
|
+
if (i.forEach((t) => {
|
|
58
|
+
t.path[0] === "authentication" && U(t, a, n);
|
|
59
|
+
}), e.servers || u.servers) {
|
|
60
|
+
r.servers.forEach((f) => {
|
|
61
|
+
n.serverMutators.delete(f, r.uid);
|
|
59
62
|
});
|
|
60
|
-
const t =
|
|
61
|
-
e.servers ??
|
|
63
|
+
const t = C(
|
|
64
|
+
e.servers ?? o.dereferencedDocument.servers,
|
|
62
65
|
{
|
|
63
66
|
baseServerURL: e.baseServerURL
|
|
64
67
|
}
|
|
65
68
|
);
|
|
66
|
-
t.forEach((
|
|
67
|
-
n.serverMutators.add(
|
|
69
|
+
t.forEach((f) => {
|
|
70
|
+
n.serverMutators.add(f, r.uid);
|
|
68
71
|
}), t.length && n.collectionMutators.edit(
|
|
69
|
-
|
|
72
|
+
r.uid,
|
|
70
73
|
"selectedServerUid",
|
|
71
74
|
t[t.length - 1].uid
|
|
72
75
|
);
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
d.value = !1, setTimeout(() => {
|
|
79
|
+
d.value = !0;
|
|
77
80
|
}, 1e3);
|
|
78
81
|
},
|
|
79
82
|
{ deep: !0, debounce: 300 }
|
|
80
|
-
),
|
|
81
|
-
c.value && e &&
|
|
82
|
-
}),
|
|
83
|
+
), R(S, (e) => {
|
|
84
|
+
c.value && e && m.value && c.value.updateExample(e, m.value);
|
|
85
|
+
}), k(() => {
|
|
83
86
|
var e;
|
|
84
87
|
return (e = c.value) == null ? void 0 : e.app.unmount();
|
|
85
|
-
}), (e,
|
|
88
|
+
}), (e, u) => (x(), q("div", {
|
|
86
89
|
ref_key: "el",
|
|
87
|
-
ref:
|
|
90
|
+
ref: l
|
|
88
91
|
}, null, 512));
|
|
89
92
|
}
|
|
90
93
|
});
|
|
91
94
|
export {
|
|
92
|
-
|
|
95
|
+
z as default
|
|
93
96
|
};
|