@scalar/api-reference 1.25.115 → 1.25.118
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 +76 -0
- package/dist/browser/standalone.js +15973 -15829
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +39 -38
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +58 -60
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
- 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 +124 -120
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +1 -3
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +36 -38
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +59 -55
- package/dist/features/ApiClientModal/useApiClient.d.ts +208 -128
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +6 -4
- 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 +130 -119
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -91
- package/dist/features/Operation/Operation.vue.d.ts +4 -5
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +34 -41
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -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 +54 -51
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -6
- 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 +71 -71
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts +1 -1
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useConfig.js +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +26 -24
- package/dist/hooks/useReactiveSpec.d.ts +1 -1
- package/dist/index.js +66 -72
- package/dist/style.css +1 -1
- package/package.json +12 -12
- package/dist/features/Operation/hooks/useRequestExample.d.ts +0 -17
- package/dist/features/Operation/hooks/useRequestExample.d.ts.map +0 -1
- package/dist/features/Operation/hooks/useRequestExample.js +0 -68
- package/dist/helpers/convertRequestToHarRequest.d.ts +0 -7
- package/dist/helpers/convertRequestToHarRequest.d.ts.map +0 -1
- package/dist/helpers/convertRequestToHarRequest.js +0 -64
- package/dist/helpers/get-request.js +0 -6
- package/dist/helpers/getExampleCode.d.ts +0 -8
- package/dist/helpers/getExampleCode.d.ts.map +0 -1
- package/dist/helpers/getExampleCode.js +0 -16
- package/dist/helpers/joinWithSlash.d.ts +0 -5
- package/dist/helpers/joinWithSlash.d.ts.map +0 -1
- package/dist/helpers/joinWithSlash.js +0 -4
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as $, openBlock as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { scrollToId as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as $, openBlock as n, createElementBlock as l, createElementVNode as a, normalizeClass as V, withModifiers as A, createVNode as g, unref as b, withCtx as E, createTextVNode as m, toDisplayString as h, createCommentVNode as s, createBlock as N, renderSlot as v } from "vue";
|
|
2
|
+
import { ScalarSidebarGroupToggle as T, ScalarIcon as O } from "@scalar/components";
|
|
3
|
+
import { combineUrlAndPath as U } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import H from "./SidebarHttpBadge.vue.js";
|
|
5
|
+
import { sleep as k } from "../../helpers/sleep.js";
|
|
6
|
+
import { useNavState as I } from "../../hooks/useNavState.js";
|
|
7
|
+
import { scrollToId as P } from "../../helpers/scrollToId.js";
|
|
8
|
+
const D = ["id"], L = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "sidebar-heading-chevron"
|
|
11
|
-
},
|
|
11
|
+
}, M = ["aria-expanded"], R = ["href", "tabindex"], z = { class: "sidebar-heading-link-title" }, F = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "sidebar-heading-link-method"
|
|
14
|
-
},
|
|
14
|
+
}, G = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "action-menu"
|
|
17
|
-
},
|
|
17
|
+
}, Y = /* @__PURE__ */ $({
|
|
18
18
|
__name: "SidebarElement",
|
|
19
19
|
props: {
|
|
20
20
|
id: {},
|
|
@@ -24,77 +24,81 @@ const R = ["id"], U = {
|
|
|
24
24
|
open: { type: Boolean }
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggleOpen"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
var e,
|
|
30
|
-
|
|
31
|
-
},
|
|
27
|
+
setup(C, { emit: y }) {
|
|
28
|
+
const i = C, d = y, { getFullHash: c, isIntersectionEnabled: r, pathRouting: p, replaceUrlState: w } = I(), u = async () => {
|
|
29
|
+
var e, t;
|
|
30
|
+
i.hasChildren && d("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), i.open && (r.value = !1, await k(100), r.value = !0);
|
|
31
|
+
}, S = () => {
|
|
32
32
|
if (p.value)
|
|
33
|
-
return
|
|
33
|
+
return U(p.value.basePath, i.item.id);
|
|
34
34
|
if (typeof window < "u") {
|
|
35
35
|
const e = new URL(window.location.href);
|
|
36
|
-
return e.hash =
|
|
37
|
-
} else return `#${
|
|
38
|
-
},
|
|
39
|
-
var
|
|
40
|
-
p.value && (e.preventDefault(),
|
|
36
|
+
return e.hash = c(i.item.id), `${e.pathname}${e.search}${e.hash}`;
|
|
37
|
+
} else return `#${c(i.item.id)}`;
|
|
38
|
+
}, B = async (e) => {
|
|
39
|
+
var t, o;
|
|
40
|
+
p.value && (e.preventDefault(), i.hasChildren && d("toggleOpen"), (o = (t = i.item) == null ? void 0 : t.select) == null || o.call(t), d("toggleOpen"), r.value = !1, w(i.item.id), P(i.item.id), await k(100), r.value = !0);
|
|
41
41
|
};
|
|
42
|
-
return (e,
|
|
43
|
-
var
|
|
44
|
-
return
|
|
42
|
+
return (e, t) => {
|
|
43
|
+
var o, f;
|
|
44
|
+
return n(), l("li", {
|
|
45
45
|
id: e.id,
|
|
46
46
|
class: "sidebar-group-item"
|
|
47
47
|
}, [
|
|
48
|
-
|
|
49
|
-
class:
|
|
48
|
+
a("div", {
|
|
49
|
+
class: V(["sidebar-heading", {
|
|
50
50
|
"sidebar-group-item__folder": e.hasChildren,
|
|
51
51
|
active_page: e.isActive,
|
|
52
52
|
deprecated: e.item.deprecated ?? !1
|
|
53
53
|
}]),
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: u
|
|
55
55
|
}, [
|
|
56
|
-
e.hasChildren ? (
|
|
57
|
-
|
|
56
|
+
e.hasChildren ? (n(), l("p", L, [
|
|
57
|
+
a("button", {
|
|
58
58
|
"aria-expanded": e.open,
|
|
59
59
|
class: "toggle-nested-icon",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
type: "button",
|
|
61
|
+
onClick: A(u, ["stop"])
|
|
62
|
+
}, [
|
|
63
|
+
g(b(T), { open: e.open }, {
|
|
64
|
+
label: E(() => [
|
|
65
|
+
m(h(e.open ? "Collapse" : "Expand") + " " + h(e.item.title), 1)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["open"])
|
|
69
|
+
], 8, M),
|
|
70
|
+
t[0] || (t[0] = m(" "))
|
|
71
|
+
])) : s("", !0),
|
|
72
|
+
a("a", {
|
|
69
73
|
class: "sidebar-heading-link",
|
|
70
|
-
href:
|
|
74
|
+
href: S(),
|
|
71
75
|
tabindex: e.hasChildren ? -1 : 0,
|
|
72
|
-
onClick:
|
|
76
|
+
onClick: B
|
|
73
77
|
}, [
|
|
74
|
-
(
|
|
78
|
+
(f = (o = e.item) == null ? void 0 : o.icon) != null && f.src ? (n(), N(b(O), {
|
|
75
79
|
key: 0,
|
|
76
80
|
class: "sidebar-icon",
|
|
77
81
|
icon: e.item.icon.src
|
|
78
|
-
}, null, 8, ["icon"])) :
|
|
79
|
-
|
|
80
|
-
e.item.httpVerb && !e.hasChildren ? (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
}, null, 8, ["icon"])) : s("", !0),
|
|
83
|
+
a("p", z, h(e.item.title), 1),
|
|
84
|
+
e.item.httpVerb && !e.hasChildren ? (n(), l("p", F, [
|
|
85
|
+
t[1] || (t[1] = m(" ")),
|
|
86
|
+
t[2] || (t[2] = a("span", { class: "sr-only" }, "HTTP Method: ", -1)),
|
|
87
|
+
g(H, {
|
|
84
88
|
active: e.isActive,
|
|
85
89
|
method: e.item.httpVerb
|
|
86
90
|
}, null, 8, ["active", "method"])
|
|
87
|
-
])) :
|
|
88
|
-
], 8,
|
|
91
|
+
])) : s("", !0)
|
|
92
|
+
], 8, R)
|
|
89
93
|
], 2),
|
|
90
|
-
e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) :
|
|
91
|
-
e.$slots["action-menu"] ? (
|
|
94
|
+
e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
|
|
95
|
+
e.$slots["action-menu"] ? (n(), l("div", G, [
|
|
92
96
|
v(e.$slots, "action-menu", {}, void 0, !0)
|
|
93
|
-
])) :
|
|
94
|
-
], 8,
|
|
97
|
+
])) : s("", !0)
|
|
98
|
+
], 8, D);
|
|
95
99
|
};
|
|
96
100
|
}
|
|
97
101
|
});
|
|
98
102
|
export {
|
|
99
|
-
|
|
103
|
+
Y as default
|
|
100
104
|
};
|