@scalar/api-reference 1.28.11 → 1.28.13
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 +44 -0
- package/dist/browser/standalone.js +5885 -5823
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Schema/Schema.preview.d.ts +232 -0
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +3 -3
- package/dist/components/Content/Schema/Schema.vue2.js +52 -51
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +39 -37
- 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 +55 -51
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +15 -11
- 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 +55 -55
- 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 +53 -53
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +23 -20
- package/dist/features/ApiClientModal/useApiClient.d.ts +308 -8
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +4 -4
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +76 -76
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +29 -19
- package/dist/helpers/get-request.d.ts +15 -0
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.d.ts +3 -1
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.js +36 -36
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +12 -11
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarSidebarGroupToggle as
|
|
3
|
-
import { combineUrlAndPath as
|
|
4
|
-
import { useConfig as
|
|
5
|
-
import
|
|
6
|
-
import { sleep as
|
|
7
|
-
import { useNavState as
|
|
8
|
-
import { scrollToId as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as A, openBlock as s, createElementBlock as p, createElementVNode as r, normalizeClass as T, unref as c, withModifiers as V, createVNode as v, withCtx as E, createTextVNode as h, toDisplayString as u, createCommentVNode as l, createBlock as N, renderSlot as C } from "vue";
|
|
2
|
+
import { ScalarSidebarGroupToggle as O, ScalarIcon as R } from "@scalar/components";
|
|
3
|
+
import { combineUrlAndPath as U } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useConfig as H } from "../../hooks/useConfig.js";
|
|
5
|
+
import I from "./SidebarHttpBadge.vue.js";
|
|
6
|
+
import { sleep as k } from "../../helpers/sleep.js";
|
|
7
|
+
import { useNavState as P } from "../../hooks/useNavState.js";
|
|
8
|
+
import { scrollToId as D } from "../../helpers/scrollToId.js";
|
|
9
|
+
const L = ["id"], M = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "sidebar-heading-chevron"
|
|
12
|
-
},
|
|
12
|
+
}, z = ["aria-expanded"], F = ["href", "tabindex"], G = { class: "sidebar-heading-link-title" }, j = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "sidebar-heading-link-method"
|
|
15
|
-
},
|
|
15
|
+
}, q = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "action-menu"
|
|
18
|
-
},
|
|
18
|
+
}, x = /* @__PURE__ */ A({
|
|
19
19
|
__name: "SidebarElement",
|
|
20
20
|
props: {
|
|
21
21
|
id: {},
|
|
@@ -25,82 +25,82 @@ const D = ["id"], L = {
|
|
|
25
25
|
open: { type: Boolean }
|
|
26
26
|
},
|
|
27
27
|
emits: ["toggleOpen"],
|
|
28
|
-
setup(
|
|
29
|
-
const i =
|
|
28
|
+
setup(y, { emit: w }) {
|
|
29
|
+
const i = y, m = w, { getFullHash: f, isIntersectionEnabled: d, replaceUrlState: S } = P(), n = H(), g = async () => {
|
|
30
30
|
var e, t;
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
31
|
+
d.value = !1, i.hasChildren && m("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), await k(100), d.value = !0;
|
|
32
|
+
}, B = () => {
|
|
33
|
+
if (n.value.pathRouting)
|
|
34
|
+
return U(n.value.pathRouting.basePath, i.item.id);
|
|
35
35
|
if (typeof window < "u") {
|
|
36
36
|
const e = new URL(window.location.href);
|
|
37
|
-
return e.hash =
|
|
37
|
+
return e.hash = f(i.item.id), `${e.pathname}${e.search}${e.hash}`;
|
|
38
38
|
}
|
|
39
|
-
return `#${
|
|
40
|
-
},
|
|
41
|
-
var t, o;
|
|
42
|
-
|
|
39
|
+
return `#${f(i.item.id)}`;
|
|
40
|
+
}, $ = async (e) => {
|
|
41
|
+
var t, a, o, b;
|
|
42
|
+
(a = (t = n.value).onSidebarClick) == null || a.call(t, i.item.id), n.value.pathRouting && (e.preventDefault(), i.hasChildren && m("toggleOpen"), (b = (o = i.item) == null ? void 0 : o.select) == null || b.call(o), m("toggleOpen"), d.value = !1, S(i.item.id), D(i.item.id), await k(100), d.value = !0);
|
|
43
43
|
};
|
|
44
44
|
return (e, t) => {
|
|
45
|
-
var
|
|
46
|
-
return
|
|
45
|
+
var a, o;
|
|
46
|
+
return s(), p("li", {
|
|
47
47
|
id: e.id,
|
|
48
48
|
class: "sidebar-group-item"
|
|
49
49
|
}, [
|
|
50
|
-
|
|
51
|
-
class:
|
|
50
|
+
r("div", {
|
|
51
|
+
class: T(["sidebar-heading", {
|
|
52
52
|
"sidebar-group-item__folder": e.hasChildren,
|
|
53
53
|
active_page: e.isActive,
|
|
54
54
|
deprecated: e.item.deprecated ?? !1
|
|
55
55
|
}]),
|
|
56
|
-
onClick:
|
|
56
|
+
onClick: g
|
|
57
57
|
}, [
|
|
58
|
-
e.hasChildren && !
|
|
59
|
-
|
|
58
|
+
e.hasChildren && !c(n).defaultOpenAllTags ? (s(), p("p", M, [
|
|
59
|
+
r("button", {
|
|
60
60
|
"aria-expanded": e.open,
|
|
61
61
|
class: "toggle-nested-icon",
|
|
62
62
|
type: "button",
|
|
63
|
-
onClick:
|
|
63
|
+
onClick: V(g, ["stop"])
|
|
64
64
|
}, [
|
|
65
|
-
|
|
66
|
-
label:
|
|
67
|
-
h(
|
|
65
|
+
v(c(O), { open: e.open }, {
|
|
66
|
+
label: E(() => [
|
|
67
|
+
h(u(e.open ? "Collapse" : "Expand") + " " + u(e.item.title), 1)
|
|
68
68
|
]),
|
|
69
69
|
_: 1
|
|
70
70
|
}, 8, ["open"])
|
|
71
|
-
], 8,
|
|
71
|
+
], 8, z),
|
|
72
72
|
t[0] || (t[0] = h(" "))
|
|
73
|
-
])) :
|
|
74
|
-
|
|
73
|
+
])) : l("", !0),
|
|
74
|
+
r("a", {
|
|
75
75
|
class: "sidebar-heading-link",
|
|
76
|
-
href:
|
|
76
|
+
href: B(),
|
|
77
77
|
tabindex: e.hasChildren ? -1 : 0,
|
|
78
|
-
onClick:
|
|
78
|
+
onClick: $
|
|
79
79
|
}, [
|
|
80
|
-
(
|
|
80
|
+
(o = (a = e.item) == null ? void 0 : a.icon) != null && o.src ? (s(), N(c(R), {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "sidebar-icon",
|
|
83
83
|
icon: e.item.icon.src
|
|
84
|
-
}, null, 8, ["icon"])) :
|
|
85
|
-
|
|
86
|
-
e.item.httpVerb && !e.hasChildren ? (
|
|
84
|
+
}, null, 8, ["icon"])) : l("", !0),
|
|
85
|
+
r("p", G, u(e.item.title), 1),
|
|
86
|
+
e.item.httpVerb && !e.hasChildren ? (s(), p("p", j, [
|
|
87
87
|
t[1] || (t[1] = h(" ")),
|
|
88
|
-
t[2] || (t[2] =
|
|
89
|
-
|
|
88
|
+
t[2] || (t[2] = r("span", { class: "sr-only" }, "HTTP Method: ", -1)),
|
|
89
|
+
v(I, {
|
|
90
90
|
active: e.isActive,
|
|
91
91
|
method: e.item.httpVerb
|
|
92
92
|
}, null, 8, ["active", "method"])
|
|
93
|
-
])) :
|
|
94
|
-
], 8,
|
|
93
|
+
])) : l("", !0)
|
|
94
|
+
], 8, F)
|
|
95
95
|
], 2),
|
|
96
|
-
e.open ?
|
|
97
|
-
e.$slots["action-menu"] ? (
|
|
98
|
-
|
|
99
|
-
])) :
|
|
100
|
-
], 8,
|
|
96
|
+
e.open ? C(e.$slots, "default", { key: 0 }, void 0, !0) : l("", !0),
|
|
97
|
+
e.$slots["action-menu"] ? (s(), p("div", q, [
|
|
98
|
+
C(e.$slots, "action-menu", {}, void 0, !0)
|
|
99
|
+
])) : l("", !0)
|
|
100
|
+
], 8, L);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
export {
|
|
105
|
-
|
|
105
|
+
x as default
|
|
106
106
|
};
|
|
@@ -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":"AAoEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAWzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AAwGF,wBAOG"}
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as m, ref as p, onMounted as f, watch as s, onBeforeUnmount as d, openBlock as v, createElementBlock as x } from "vue";
|
|
2
|
+
import { useWorkspace as E } from "@scalar/api-client/store";
|
|
3
3
|
import { watchDebounced as g } from "@vueuse/core";
|
|
4
4
|
import { useApiClient as k } from "./useApiClient.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { useNavState as C } from "../../hooks/useNavState.js";
|
|
6
|
+
import { useExampleStore as _ } from "../../legacy/stores/useExampleStore.js";
|
|
7
|
+
const S = /* @__PURE__ */ m({
|
|
7
8
|
__name: "ApiClientModal",
|
|
8
9
|
props: {
|
|
9
10
|
configuration: {}
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
el:
|
|
16
|
-
configuration:
|
|
17
|
-
store:
|
|
12
|
+
setup(u) {
|
|
13
|
+
const o = p(null), { client: t, init: i } = k(), { selectedExampleKey: l, operationId: a } = _(), c = E(), { isIntersectionEnabled: r } = C();
|
|
14
|
+
return f(() => {
|
|
15
|
+
o.value && i({
|
|
16
|
+
el: o.value,
|
|
17
|
+
configuration: u.configuration,
|
|
18
|
+
store: c
|
|
18
19
|
});
|
|
19
20
|
}), g(
|
|
20
|
-
() =>
|
|
21
|
+
() => u.configuration,
|
|
21
22
|
(e) => {
|
|
22
23
|
var n;
|
|
23
|
-
|
|
24
|
+
e && (r.value = !1, (n = t.value) == null || n.updateConfig(e), setTimeout(() => {
|
|
25
|
+
r.value = !0;
|
|
26
|
+
}, 1e3));
|
|
24
27
|
},
|
|
25
28
|
{ deep: !0, debounce: 300 }
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
+
), s(l, (e) => {
|
|
30
|
+
t.value && e && a.value && t.value.updateExample(e, a.value);
|
|
31
|
+
}), d(() => {
|
|
29
32
|
var e;
|
|
30
|
-
return (e =
|
|
31
|
-
}), (e, n) => (
|
|
33
|
+
return (e = t.value) == null ? void 0 : e.app.unmount();
|
|
34
|
+
}), (e, n) => (v(), x("div", {
|
|
32
35
|
ref_key: "el",
|
|
33
|
-
ref:
|
|
36
|
+
ref: o
|
|
34
37
|
}, null, 512));
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
S as default
|
|
39
42
|
};
|