@scalar/api-reference 1.31.7 → 1.31.9
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 +55 -0
- package/dist/browser/standalone.js +18613 -18470
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +10 -30
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +240 -222
- package/dist/components/Content/Content.vue.d.ts +2 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +84 -74
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
- 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 +93 -83
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +84 -86
- package/dist/components/Content/Models/Models.vue.js +1 -1
- package/dist/components/Content/Models/Models.vue2.js +4 -4
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +53 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
- 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 +161 -191
- package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Tag.vue.js +45 -47
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +40 -41
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagSection.vue.js +2 -2
- package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
- package/dist/components/MobileHeader.vue.d.ts +1 -8
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +1 -1
- package/dist/components/MobileHeader.vue2.js +19 -19
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/Section.vue2.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
- package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
- package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
- package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
- 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 +200 -179
- package/dist/features/Operation/Operation.vue.d.ts +0 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +31 -34
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +2 -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.vue2.js +31 -38
- package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
- package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
- package/dist/features/Operation/hooks/useResponses.js +12 -13
- package/dist/features/Operation/index.d.ts +0 -1
- package/dist/features/Operation/index.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
- 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 +85 -72
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -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 +114 -98
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +1 -1
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +61 -64
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
- package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
- package/dist/features/sidebar/hooks/useSidebar.js +18 -0
- package/dist/features/sidebar/index.d.ts +2 -1
- package/dist/features/sidebar/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
- package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
- package/dist/features/traverse-schema/index.d.ts +3 -3
- package/dist/features/traverse-schema/index.d.ts.map +1 -1
- package/dist/features/traverse-schema/types.d.ts +8 -5
- package/dist/features/traverse-schema/types.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts +2 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +72 -88
- package/dist/hooks/useMultipleDocuments.d.ts +6 -6
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +14 -9
- package/dist/hooks/useOperation.d.ts +7 -7
- package/dist/hooks/useOperation.d.ts.map +1 -1
- package/dist/hooks/useOperation.js +13 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -25
- package/dist/legacy/fixtures/index.d.ts +1 -1
- package/dist/libs/openapi.d.ts +3 -4
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +8 -9
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
- package/package.json +17 -17
- package/dist/components/Content/Webhooks/index.d.ts +0 -2
- package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
- package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
- package/dist/features/Operation/Webhooks.vue.js +0 -7
- package/dist/features/Operation/Webhooks.vue2.js +0 -121
- package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
- package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
- package/dist/features/Operation/components/Webhook.vue.js +0 -7
- package/dist/features/Operation/components/Webhook.vue2.js +0 -29
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
- package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
- package/dist/hooks/useSidebar.d.ts +0 -53
- package/dist/hooks/useSidebar.d.ts.map +0 -1
- package/dist/hooks/useSidebar.js +0 -248
- package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarSidebarGroupToggle as O
|
|
3
|
-
import { scrollToId as
|
|
1
|
+
import { defineComponent as $, createElementBlock as l, openBlock as n, createElementVNode as a, renderSlot as g, createCommentVNode as r, normalizeClass as A, unref as d, createTextVNode as p, withModifiers as T, createVNode as b, withCtx as v, toDisplayString as h, createBlock as E, normalizeStyle as N } from "vue";
|
|
2
|
+
import { ScalarSidebarGroupToggle as O } from "@scalar/components";
|
|
3
|
+
import { scrollToId as V } from "@scalar/helpers/dom/scroll-to-id";
|
|
4
|
+
import { getHttpMethodInfo as H } from "@scalar/helpers/http/http-info";
|
|
4
5
|
import { sleep as k } from "@scalar/helpers/testing/sleep";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
6
|
+
import { ScalarIconWebhooksLogo as I } from "@scalar/icons";
|
|
7
|
+
import { combineUrlAndPath as R } from "@scalar/oas-utils/helpers";
|
|
8
|
+
import { useConfig as U } from "../../hooks/useConfig.js";
|
|
9
|
+
import { useNavState as L } from "../../hooks/useNavState.js";
|
|
10
|
+
import M from "./SidebarHttpBadge.vue.js";
|
|
11
|
+
const P = ["id"], z = {
|
|
10
12
|
key: 0,
|
|
11
13
|
class: "sidebar-heading-chevron"
|
|
12
|
-
},
|
|
13
|
-
key:
|
|
14
|
+
}, D = ["aria-expanded"], F = ["href", "tabindex"], G = { class: "sidebar-heading-link-title" }, W = {
|
|
15
|
+
key: 0,
|
|
14
16
|
class: "sidebar-heading-link-method"
|
|
15
|
-
},
|
|
17
|
+
}, j = {
|
|
16
18
|
key: 1,
|
|
17
19
|
class: "action-menu"
|
|
18
|
-
},
|
|
20
|
+
}, te = /* @__PURE__ */ $({
|
|
19
21
|
__name: "SidebarElement",
|
|
20
22
|
props: {
|
|
21
23
|
id: {},
|
|
@@ -25,82 +27,84 @@ const L = ["id"], M = {
|
|
|
25
27
|
open: { type: Boolean }
|
|
26
28
|
},
|
|
27
29
|
emits: ["toggleOpen"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return H(n.value.pathRouting.basePath, i.item.id);
|
|
30
|
+
setup(C, { emit: y }) {
|
|
31
|
+
const o = C, m = y, { getFullHash: u, isIntersectionEnabled: s, replaceUrlState: w } = L(), i = U(), c = async () => {
|
|
32
|
+
s.value = !1, o.hasChildren && m("toggleOpen"), await k(100), s.value = !0;
|
|
33
|
+
}, S = () => {
|
|
34
|
+
if (i.value.pathRouting)
|
|
35
|
+
return R(i.value.pathRouting.basePath, o.item.id);
|
|
35
36
|
if (typeof window < "u") {
|
|
36
37
|
const e = new URL(window.location.href);
|
|
37
|
-
return e.hash =
|
|
38
|
+
return e.hash = u(o.item.id), `${e.pathname}${e.search}${e.hash}`;
|
|
38
39
|
}
|
|
39
|
-
return `#${
|
|
40
|
-
},
|
|
41
|
-
var t,
|
|
42
|
-
(
|
|
40
|
+
return `#${u(o.item.id)}`;
|
|
41
|
+
}, B = async (e) => {
|
|
42
|
+
var t, f;
|
|
43
|
+
(f = (t = i.value).onSidebarClick) == null || f.call(t, o.item.id), i.value.pathRouting && (e.preventDefault(), o.hasChildren && m("toggleOpen"), m("toggleOpen"), s.value = !1, w(o.item.id), V(o.item.id), await k(100), s.value = !0);
|
|
43
44
|
};
|
|
44
|
-
return (e, t) => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
return (e, t) => (n(), l("li", {
|
|
46
|
+
id: e.id,
|
|
47
|
+
class: "sidebar-group-item"
|
|
48
|
+
}, [
|
|
49
|
+
a("div", {
|
|
50
|
+
class: A(["sidebar-heading", {
|
|
51
|
+
"sidebar-group-item__folder": e.hasChildren,
|
|
52
|
+
active_page: e.isActive,
|
|
53
|
+
deprecated: "deprecated" in e.item && e.item.deprecated
|
|
54
|
+
}]),
|
|
55
|
+
onClick: c
|
|
49
56
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
onClick: g
|
|
57
|
-
}, [
|
|
58
|
-
e.hasChildren && !c(n).defaultOpenAllTags ? (s(), p("p", M, [
|
|
59
|
-
r("button", {
|
|
60
|
-
"aria-expanded": e.open,
|
|
61
|
-
class: "toggle-nested-icon",
|
|
62
|
-
type: "button",
|
|
63
|
-
onClick: V(g, ["stop"])
|
|
64
|
-
}, [
|
|
65
|
-
C(c(O), { open: e.open }, {
|
|
66
|
-
label: E(() => [
|
|
67
|
-
h(u(e.open ? "Collapse" : "Expand") + " " + u(e.item.title), 1)
|
|
68
|
-
]),
|
|
69
|
-
_: 1
|
|
70
|
-
}, 8, ["open"])
|
|
71
|
-
], 8, z),
|
|
72
|
-
t[0] || (t[0] = h(" "))
|
|
73
|
-
])) : l("", !0),
|
|
74
|
-
r("a", {
|
|
75
|
-
class: "sidebar-heading-link",
|
|
76
|
-
href: B(),
|
|
77
|
-
tabindex: e.hasChildren ? -1 : 0,
|
|
78
|
-
onClick: $
|
|
57
|
+
e.hasChildren && !d(i).defaultOpenAllTags ? (n(), l("p", z, [
|
|
58
|
+
a("button", {
|
|
59
|
+
"aria-expanded": e.open,
|
|
60
|
+
class: "toggle-nested-icon",
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: T(c, ["stop"])
|
|
79
63
|
}, [
|
|
80
|
-
(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
64
|
+
b(d(O), { open: e.open }, {
|
|
65
|
+
label: v(() => [
|
|
66
|
+
p(h(e.open ? "Collapse" : "Expand") + " " + h(e.item.title), 1)
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
}, 8, ["open"])
|
|
70
|
+
], 8, D),
|
|
71
|
+
t[0] || (t[0] = p(" "))
|
|
72
|
+
])) : r("", !0),
|
|
73
|
+
a("a", {
|
|
74
|
+
class: "sidebar-heading-link",
|
|
75
|
+
href: S(),
|
|
76
|
+
tabindex: e.hasChildren ? -1 : 0,
|
|
77
|
+
onClick: B
|
|
78
|
+
}, [
|
|
79
|
+
a("p", G, h(e.item.title), 1),
|
|
80
|
+
"method" in e.item && !e.hasChildren ? (n(), l("p", W, [
|
|
81
|
+
t[1] || (t[1] = p(" ")),
|
|
82
|
+
t[2] || (t[2] = a("span", { class: "sr-only" }, "HTTP Method: ", -1)),
|
|
83
|
+
b(M, {
|
|
84
|
+
active: e.isActive,
|
|
85
|
+
method: e.item.method
|
|
86
|
+
}, {
|
|
87
|
+
default: v(() => [
|
|
88
|
+
"webhook" in e.item ? (n(), E(d(I), {
|
|
89
|
+
key: 0,
|
|
90
|
+
weight: "bold",
|
|
91
|
+
style: N({
|
|
92
|
+
color: d(H)(e.item.method).colorVar
|
|
93
|
+
})
|
|
94
|
+
}, null, 8, ["style"])) : r("", !0)
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["active", "method"])
|
|
98
|
+
])) : r("", !0)
|
|
99
|
+
], 8, F)
|
|
100
|
+
], 2),
|
|
101
|
+
e.open ? g(e.$slots, "default", { key: 0 }, void 0, !0) : r("", !0),
|
|
102
|
+
e.$slots["action-menu"] ? (n(), l("div", j, [
|
|
103
|
+
g(e.$slots, "action-menu", {}, void 0, !0)
|
|
104
|
+
])) : r("", !0)
|
|
105
|
+
], 8, P));
|
|
102
106
|
}
|
|
103
107
|
});
|
|
104
108
|
export {
|
|
105
|
-
|
|
109
|
+
te as default
|
|
106
110
|
};
|
|
@@ -2,6 +2,21 @@ type __VLS_Props = {
|
|
|
2
2
|
method: string;
|
|
3
3
|
active?: boolean;
|
|
4
4
|
};
|
|
5
|
-
declare
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: any;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
6
16
|
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
7
22
|
//# sourceMappingURL=SidebarHttpBadge.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarHttpBadge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarHttpBadge.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarHttpBadge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarHttpBadge.vue"],"names":[],"mappings":"AAmDA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAQF,iBAAS,cAAc;WA6DT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,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,7 +1,7 @@
|
|
|
1
1
|
import t from "./SidebarHttpBadge.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ o(t, [["__scopeId", "data-v-43724d28"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as t, createBlock as o, openBlock as a, unref as r, normalizeClass as s, withCtx as d, renderSlot as i } from "vue";
|
|
2
2
|
import n from "../HttpMethod/HttpMethod.vue.js";
|
|
3
|
-
const
|
|
3
|
+
const h = /* @__PURE__ */ t({
|
|
4
4
|
__name: "SidebarHttpBadge",
|
|
5
5
|
props: {
|
|
6
6
|
method: {},
|
|
7
7
|
active: { type: Boolean }
|
|
8
8
|
},
|
|
9
9
|
setup(p) {
|
|
10
|
-
return (e,
|
|
10
|
+
return (e, m) => (a(), o(r(n), {
|
|
11
11
|
class: s([
|
|
12
|
+
"flex items-center justify-end gap-1",
|
|
12
13
|
"sidebar-heading-type",
|
|
13
14
|
`sidebar-heading-type--${e.method.toLowerCase()}`,
|
|
14
15
|
{ "sidebar-heading-type-active": e.active }
|
|
@@ -16,9 +17,14 @@ const c = /* @__PURE__ */ o({
|
|
|
16
17
|
method: e.method,
|
|
17
18
|
property: "--method-color",
|
|
18
19
|
short: ""
|
|
19
|
-
},
|
|
20
|
+
}, {
|
|
21
|
+
default: d(() => [
|
|
22
|
+
i(e.$slots, "default", {}, void 0, !0)
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 8, ["class", "method"]));
|
|
20
26
|
}
|
|
21
27
|
});
|
|
22
28
|
export {
|
|
23
|
-
|
|
29
|
+
h as default
|
|
24
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAiKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAYzE,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAA;IAC/D,oBAAoB,EAAE,WAAW,CAAC,QAAQ,CAAA;CAC3C,CAAC;;AAuLF,wBAOG"}
|
|
@@ -1,53 +1,65 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as M, useWorkspace as
|
|
1
|
+
import { defineComponent as h, ref as S, onMounted as E, watch as g, onBeforeUnmount as D, createElementBlock as b, openBlock as x } from "vue";
|
|
2
|
+
import { useActiveEntities as M, useWorkspace as U } from "@scalar/api-client/store";
|
|
3
3
|
import { mutateSecuritySchemeDiff as k } from "@scalar/api-client/views/Request/libs";
|
|
4
4
|
import { getServersFromOpenApiDocument as A } from "@scalar/oas-utils/transforms";
|
|
5
|
-
import { watchDebounced as
|
|
6
|
-
import
|
|
7
|
-
import { useNavState as
|
|
8
|
-
import { useApiClient as
|
|
9
|
-
import { useExampleStore as
|
|
10
|
-
const
|
|
5
|
+
import { watchDebounced as d } from "@vueuse/core";
|
|
6
|
+
import C from "microdiff";
|
|
7
|
+
import { useNavState as y } from "../../hooks/useNavState.js";
|
|
8
|
+
import { useApiClient as B } from "./useApiClient.js";
|
|
9
|
+
import { useExampleStore as L } from "../../legacy/stores/useExampleStore.js";
|
|
10
|
+
const z = /* @__PURE__ */ h({
|
|
11
11
|
__name: "ApiClientModal",
|
|
12
12
|
props: {
|
|
13
13
|
configuration: {},
|
|
14
14
|
dereferencedDocument: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
el:
|
|
21
|
-
configuration:
|
|
22
|
-
store:
|
|
16
|
+
setup(n) {
|
|
17
|
+
const a = S(null), { client: c, init: v } = B(), { selectedExampleKey: p, operationId: s } = L(), u = M(), i = U(), { isIntersectionEnabled: m } = y();
|
|
18
|
+
return E(() => {
|
|
19
|
+
a.value && v({
|
|
20
|
+
el: a.value,
|
|
21
|
+
configuration: n.configuration,
|
|
22
|
+
store: i
|
|
23
23
|
});
|
|
24
|
-
}),
|
|
25
|
-
() =>
|
|
26
|
-
(
|
|
27
|
-
|
|
24
|
+
}), d(
|
|
25
|
+
() => n.dereferencedDocument,
|
|
26
|
+
(e) => {
|
|
27
|
+
var r, o;
|
|
28
|
+
e && (u.activeCollection.value && ((r = c.value) == null || r.resetStore()), i.importSpecFile(void 0, "default", {
|
|
29
|
+
dereferencedDocument: e,
|
|
30
|
+
shouldLoad: !1,
|
|
31
|
+
documentUrl: (o = n.configuration) == null ? void 0 : o.url,
|
|
32
|
+
useCollectionSecurity: !0,
|
|
33
|
+
...n.configuration
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
), d(
|
|
37
|
+
() => n.configuration,
|
|
38
|
+
(e, r) => {
|
|
39
|
+
if (!r || !u.activeCollection.value)
|
|
28
40
|
return;
|
|
29
|
-
const
|
|
41
|
+
const o = u.activeCollection.value, f = C(r, e);
|
|
30
42
|
if (!f.some(
|
|
31
|
-
(
|
|
43
|
+
(t) => t.path[0] === "url" || t.path[0] === "content" || t.path[1] === "url" || t.path[1] === "content"
|
|
32
44
|
)) {
|
|
33
|
-
if (f.forEach((
|
|
34
|
-
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
|
|
45
|
+
if (f.forEach((t) => {
|
|
46
|
+
t.path[0] === "authentication" && k(t, u, i);
|
|
47
|
+
}), e.servers || r.servers) {
|
|
48
|
+
o.servers.forEach((l) => {
|
|
49
|
+
i.serverMutators.delete(l, o.uid);
|
|
38
50
|
});
|
|
39
|
-
const
|
|
40
|
-
|
|
51
|
+
const t = A(
|
|
52
|
+
e.servers ?? n.dereferencedDocument.servers,
|
|
41
53
|
{
|
|
42
|
-
baseServerURL:
|
|
54
|
+
baseServerURL: e.baseServerURL
|
|
43
55
|
}
|
|
44
56
|
);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
|
|
57
|
+
t.forEach((l) => {
|
|
58
|
+
i.serverMutators.add(l, o.uid);
|
|
59
|
+
}), t.length && i.collectionMutators.edit(
|
|
60
|
+
o.uid,
|
|
49
61
|
"selectedServerUid",
|
|
50
|
-
|
|
62
|
+
t[t.length - 1].uid
|
|
51
63
|
);
|
|
52
64
|
}
|
|
53
65
|
}
|
|
@@ -56,17 +68,17 @@ const q = /* @__PURE__ */ d({
|
|
|
56
68
|
}, 1e3);
|
|
57
69
|
},
|
|
58
70
|
{ deep: !0, debounce: 300 }
|
|
59
|
-
),
|
|
60
|
-
|
|
61
|
-
}),
|
|
62
|
-
var
|
|
63
|
-
return (
|
|
64
|
-
}), (
|
|
71
|
+
), g(p, (e) => {
|
|
72
|
+
c.value && e && s.value && c.value.updateExample(e, s.value);
|
|
73
|
+
}), D(() => {
|
|
74
|
+
var e;
|
|
75
|
+
return (e = c.value) == null ? void 0 : e.app.unmount();
|
|
76
|
+
}), (e, r) => (x(), b("div", {
|
|
65
77
|
ref_key: "el",
|
|
66
|
-
ref:
|
|
78
|
+
ref: a
|
|
67
79
|
}, null, 512));
|
|
68
80
|
}
|
|
69
81
|
});
|
|
70
82
|
export {
|
|
71
|
-
|
|
83
|
+
z as default
|
|
72
84
|
};
|