@scalar/api-reference 1.28.12 → 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 +17 -0
- package/dist/browser/standalone.js +5659 -5613
- package/dist/browser/webpack-stats.json +1 -1
- 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/SchemaDiscriminator.vue2.js +37 -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/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/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/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AAyNA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQ9E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA+QF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaDiscriminator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0e576b82"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as S, ref as A, openBlock as
|
|
2
|
-
import { TabGroup as B, TabList as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { stringify as
|
|
1
|
+
import { defineComponent as S, ref as A, openBlock as i, createElementBlock as c, createBlock as o, unref as l, withCtx as n, createVNode as m, createElementVNode as p, toDisplayString as f, Fragment as y, renderList as b, normalizeClass as q } from "vue";
|
|
2
|
+
import { TabGroup as B, TabList as T, Tab as j, TabPanel as H } from "@headlessui/vue";
|
|
3
|
+
import { cva as N, cx as V } from "@scalar/components";
|
|
4
|
+
import { stringify as v } from "flatted";
|
|
5
5
|
import g from "./Schema.vue.js";
|
|
6
|
-
const
|
|
6
|
+
const w = { class: "property-rule" }, z = { class: "text-c-3" }, L = { class: "flex items-center gap-1.5" }, D = { class: "schema-tab-label z-1 relative" }, G = /* @__PURE__ */ S({
|
|
7
7
|
__name: "SchemaDiscriminator",
|
|
8
8
|
props: {
|
|
9
9
|
discriminator: {},
|
|
@@ -14,25 +14,25 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
|
|
|
14
14
|
hideHeading: { type: Boolean }
|
|
15
15
|
},
|
|
16
16
|
setup(h) {
|
|
17
|
-
const s = h,
|
|
18
|
-
base: "
|
|
17
|
+
const s = h, u = A(0), k = N({
|
|
18
|
+
base: "schema-tab",
|
|
19
19
|
variants: {
|
|
20
20
|
selected: {
|
|
21
|
-
true: "
|
|
22
|
-
false: "
|
|
21
|
+
true: "schema-tab-selected",
|
|
22
|
+
false: "text-c-3"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
25
|
+
}), d = (e) => {
|
|
26
26
|
if (!Array.isArray(e) || e.length === 0)
|
|
27
27
|
return {};
|
|
28
28
|
if (e.length > 0 && e[0].allOf) {
|
|
29
|
-
const
|
|
30
|
-
return
|
|
29
|
+
const a = e.flatMap((r) => r.allOf || []);
|
|
30
|
+
return d(a);
|
|
31
31
|
}
|
|
32
|
-
return e.reduce((
|
|
32
|
+
return e.reduce((a, r) => {
|
|
33
33
|
if (!r || typeof r != "object")
|
|
34
|
-
return
|
|
35
|
-
const t = { ...
|
|
34
|
+
return a;
|
|
35
|
+
const t = { ...a };
|
|
36
36
|
return r.properties && (t.properties = {
|
|
37
37
|
...t.properties,
|
|
38
38
|
...r.properties
|
|
@@ -47,30 +47,30 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
|
|
|
47
47
|
if (e.name)
|
|
48
48
|
return e.name;
|
|
49
49
|
if (s.schemas && typeof s.schemas == "object") {
|
|
50
|
-
for (const [
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
50
|
+
for (const [a, r] of Object.entries(s.schemas))
|
|
51
|
+
if (v(r) === v(e))
|
|
52
|
+
return a;
|
|
53
53
|
return Object.keys(e)[0];
|
|
54
54
|
}
|
|
55
55
|
return null;
|
|
56
|
-
}, C = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (
|
|
57
|
-
return (e,
|
|
58
|
-
e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (
|
|
59
|
-
default:
|
|
60
|
-
|
|
61
|
-
default:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(
|
|
56
|
+
}, C = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (a) => a.toUpperCase()).toLowerCase().replace(/^(\w)/, (a) => a.toUpperCase());
|
|
57
|
+
return (e, a) => (i(), c("div", w, [
|
|
58
|
+
e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (i(), o(l(B), { key: 0 }, {
|
|
59
|
+
default: n(() => [
|
|
60
|
+
m(l(T), { class: "discriminator-tab-list py-1.25 flex flex-col gap-1 rounded-t-lg border border-b-0 px-2 pr-3" }, {
|
|
61
|
+
default: n(() => [
|
|
62
|
+
p("span", z, f(C(e.discriminator)), 1),
|
|
63
|
+
p("div", L, [
|
|
64
|
+
(i(!0), c(y, null, b(e.value[e.discriminator], (r, t) => (i(), o(l(j), {
|
|
65
65
|
key: t,
|
|
66
|
-
class:
|
|
66
|
+
class: q([
|
|
67
67
|
"cursor-pointer",
|
|
68
|
-
|
|
68
|
+
l(V)(l(k)({ selected: u.value === t }))
|
|
69
69
|
]),
|
|
70
|
-
onClick: (
|
|
70
|
+
onClick: (E) => u.value = t
|
|
71
71
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
72
|
+
default: n(() => [
|
|
73
|
+
p("span", D, f(O(r) || "Schema"), 1)
|
|
74
74
|
]),
|
|
75
75
|
_: 2
|
|
76
76
|
}, 1032, ["class", "onClick"]))), 128))
|
|
@@ -78,12 +78,12 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
|
|
|
78
78
|
]),
|
|
79
79
|
_: 1
|
|
80
80
|
}),
|
|
81
|
-
(
|
|
81
|
+
(i(!0), c(y, null, b(e.value[e.discriminator], (r, t) => (i(), o(l(H), {
|
|
82
82
|
key: t,
|
|
83
83
|
class: "discriminator-panel"
|
|
84
84
|
}, {
|
|
85
|
-
default:
|
|
86
|
-
|
|
85
|
+
default: n(() => [
|
|
86
|
+
m(g, {
|
|
87
87
|
compact: e.compact,
|
|
88
88
|
hideHeading: e.hideHeading,
|
|
89
89
|
noncollapsible: !0,
|
|
@@ -95,13 +95,13 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
|
|
|
95
95
|
}, 1024))), 128))
|
|
96
96
|
]),
|
|
97
97
|
_: 1
|
|
98
|
-
})) : (
|
|
98
|
+
})) : (i(), o(g, {
|
|
99
99
|
key: 1,
|
|
100
100
|
compact: e.compact,
|
|
101
101
|
level: e.level,
|
|
102
102
|
noncollapsible: e.level == 0,
|
|
103
103
|
schemas: e.schemas,
|
|
104
|
-
value:
|
|
104
|
+
value: d(e.value[e.discriminator])
|
|
105
105
|
}, null, 8, ["compact", "level", "noncollapsible", "schemas", "value"]))
|
|
106
106
|
]));
|
|
107
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA4gBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAc9E;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAod1B,0BAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-04d58839"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -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
|
};
|