@scalar/api-reference 1.28.34 → 1.29.2
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 +66 -0
- package/dist/browser/standalone.js +12508 -13008
- package/dist/browser/webpack-stats.json +1 -1
- 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 +3 -3
- 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/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts} +3 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.js +187 -0
- package/dist/components/Content/Schema/SchemaComposition.vue2.js +4 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +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 +6 -6
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +0 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +8 -9
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +165 -146
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +3 -2
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +13 -13
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts +12 -0
- package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js +8 -0
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +4 -0
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -0
- package/dist/components/Layouts/Layouts.vue.d.ts +3 -0
- package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
- package/dist/components/Layouts/Layouts.vue.js +14 -23
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue2.js +51 -45
- package/dist/components/SingleApiReference.vue.d.ts +1 -0
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/components/SingleApiReference.vue.js +25 -22
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.d.ts +144 -104
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +11 -10
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -43
- package/dist/style.css +1 -1
- package/package.json +17 -17
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -101
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, useSlots as w, watch as f, computed as $, createBlock as u, openBlock as t, normalizeClass as D, createSlots as M, withCtx as a, createVNode as m, unref as i, createCommentVNode as d, createElementBlock as p, renderSlot as c, normalizeProps as g, guardReactiveProps as S, isRef as V, renderList as K } from "vue";
|
|
2
2
|
import { OpenApiClientButton as H } from "@scalar/api-client/components";
|
|
3
|
-
import { ScalarSidebarFooter as
|
|
4
|
-
import {
|
|
5
|
-
import R from "
|
|
6
|
-
import U from "../
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
3
|
+
import { ScalarSidebarFooter as L, ScalarColorModeToggleButton as N } from "@scalar/components";
|
|
4
|
+
import { getObjectKeys as O } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { useBreakpoints as R } from "@scalar/use-hooks/useBreakpoints";
|
|
6
|
+
import U from "../ApiReferenceLayout.vue.js";
|
|
7
|
+
import z from "../MobileHeader.vue.js";
|
|
8
|
+
import { useNavState as A } from "../../hooks/useNavState.js";
|
|
9
|
+
import { useSidebar as T } from "../../hooks/useSidebar.js";
|
|
10
|
+
import j from "../../features/Search/SearchButton.vue.js";
|
|
11
|
+
const E = { key: 0 }, F = {
|
|
11
12
|
key: 1,
|
|
12
13
|
class: "scalar-api-references-standalone-search"
|
|
13
|
-
},
|
|
14
|
+
}, P = { key: 1 }, x = /* @__PURE__ */ B({
|
|
14
15
|
__name: "ModernLayout",
|
|
15
16
|
props: {
|
|
16
17
|
configuration: {},
|
|
@@ -19,59 +20,64 @@ const P = { key: 0 }, T = {
|
|
|
19
20
|
isDark: { type: Boolean }
|
|
20
21
|
},
|
|
21
22
|
emits: ["toggleDarkMode", "updateContent"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
o && !e && (
|
|
23
|
+
setup(k) {
|
|
24
|
+
const s = k, h = w(), { mediaQueries: b } = R(), { isSidebarOpen: n } = T(), v = !1;
|
|
25
|
+
f(b.lg, (e, o) => {
|
|
26
|
+
o && !e && (n.value = !1);
|
|
26
27
|
});
|
|
27
|
-
const { hash: y } =
|
|
28
|
-
|
|
29
|
-
e && e !== o && (
|
|
30
|
-
})
|
|
31
|
-
|
|
28
|
+
const { hash: y } = A();
|
|
29
|
+
f(y, (e, o) => {
|
|
30
|
+
e && e !== o && (n.value = !1);
|
|
31
|
+
});
|
|
32
|
+
const C = $(
|
|
33
|
+
() => O(h).filter((e) => e !== "sidebar-start")
|
|
34
|
+
);
|
|
35
|
+
return (e, o) => (t(), u(U, {
|
|
36
|
+
class: D({
|
|
32
37
|
"scalar-api-references-standalone-mobile": e.configuration.showSidebar ?? !0
|
|
33
38
|
}),
|
|
34
39
|
configuration: e.configuration,
|
|
35
40
|
parsedSpec: e.parsedSpec,
|
|
36
41
|
rawSpec: e.rawSpec,
|
|
37
42
|
onUpdateContent: o[2] || (o[2] = (r) => e.$emit("updateContent", r))
|
|
38
|
-
},
|
|
39
|
-
header:
|
|
40
|
-
e.configuration.showSidebar ?? !0 ? (t(), u(
|
|
43
|
+
}, M({
|
|
44
|
+
header: a(() => [
|
|
45
|
+
e.configuration.showSidebar ?? !0 ? (t(), u(z, {
|
|
41
46
|
key: 0,
|
|
42
|
-
open:
|
|
43
|
-
"onUpdate:open": o[0] || (o[0] = (r) =>
|
|
47
|
+
open: i(n),
|
|
48
|
+
"onUpdate:open": o[0] || (o[0] = (r) => V(n) ? n.value = r : null)
|
|
44
49
|
}, null, 8, ["open"])) : d("", !0)
|
|
45
50
|
]),
|
|
46
|
-
"sidebar-start":
|
|
47
|
-
var
|
|
51
|
+
"sidebar-start": a((r) => {
|
|
52
|
+
var l;
|
|
48
53
|
return [
|
|
49
|
-
e.$slots["document-selector"] ? (t(), p("div",
|
|
50
|
-
|
|
54
|
+
e.$slots["document-selector"] ? (t(), p("div", E, [
|
|
55
|
+
c(e.$slots, "document-selector", {}, void 0, !0)
|
|
51
56
|
])) : d("", !0),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
searchHotKey: (
|
|
55
|
-
spec: r
|
|
57
|
+
s.configuration.hideSearch ? d("", !0) : (t(), p("div", F, [
|
|
58
|
+
m(i(j), {
|
|
59
|
+
searchHotKey: (l = s.configuration) == null ? void 0 : l.searchHotKey,
|
|
60
|
+
spec: r.spec
|
|
56
61
|
}, null, 8, ["searchHotKey", "spec"])
|
|
57
|
-
]))
|
|
62
|
+
])),
|
|
63
|
+
c(e.$slots, "sidebar-start", g(S(r)), void 0, !0)
|
|
58
64
|
];
|
|
59
65
|
}),
|
|
60
|
-
"sidebar-end":
|
|
61
|
-
|
|
62
|
-
toggle:
|
|
63
|
-
|
|
66
|
+
"sidebar-end": a(() => [
|
|
67
|
+
m(i(L), { class: "darklight-reference" }, {
|
|
68
|
+
toggle: a(() => [
|
|
69
|
+
s.configuration.hideDarkModeToggle ? (t(), p("span", P)) : (t(), u(i(N), {
|
|
64
70
|
key: 0,
|
|
65
71
|
modelValue: e.isDark,
|
|
66
72
|
"onUpdate:modelValue": o[1] || (o[1] = (r) => e.$emit("toggleDarkMode"))
|
|
67
73
|
}, null, 8, ["modelValue"]))
|
|
68
74
|
]),
|
|
69
|
-
default:
|
|
70
|
-
|
|
75
|
+
default: a(() => [
|
|
76
|
+
s.configuration.hideClientButton ? d("", !0) : (t(), u(i(H), {
|
|
71
77
|
key: 0,
|
|
72
78
|
buttonSource: "sidebar",
|
|
73
79
|
integration: e.configuration._integration,
|
|
74
|
-
isDevelopment:
|
|
80
|
+
isDevelopment: v,
|
|
75
81
|
url: e.configuration.url
|
|
76
82
|
}, null, 8, ["integration", "url"]))
|
|
77
83
|
]),
|
|
@@ -80,15 +86,15 @@ const P = { key: 0 }, T = {
|
|
|
80
86
|
]),
|
|
81
87
|
_: 2
|
|
82
88
|
}, [
|
|
83
|
-
|
|
84
|
-
name:
|
|
85
|
-
fn:
|
|
86
|
-
|
|
89
|
+
K(C.value, (r) => ({
|
|
90
|
+
name: r,
|
|
91
|
+
fn: a((l) => [
|
|
92
|
+
c(e.$slots, r, g(S(l || {})), void 0, !0)
|
|
87
93
|
])
|
|
88
94
|
}))
|
|
89
95
|
]), 1032, ["class", "configuration", "parsedSpec", "rawSpec"]));
|
|
90
96
|
}
|
|
91
97
|
});
|
|
92
98
|
export {
|
|
93
|
-
|
|
99
|
+
x as default
|
|
94
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAY5E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CAClD,CAAC;AAyCF,iBAAS,cAAc;WAuGT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;qCACU,GAAG;iCACP,GAAG;;;;EAaxC;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAOnB,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,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as p, watch as C, toRef as
|
|
1
|
+
import { defineComponent as p, watch as C, toRef as s, computed as k, createElementBlock as S, openBlock as f, Fragment as M, createBlock as D, createCommentVNode as v, createVNode as y, resolveDynamicComponent as $, withCtx as t, createTextVNode as w, toDisplayString as B, unref as r, renderSlot as a } from "vue";
|
|
2
2
|
import { useColorMode as N } from "@scalar/use-hooks/useColorMode";
|
|
3
3
|
import { useSeoMeta as R } from "@unhead/vue";
|
|
4
4
|
import { useFavicon as U } from "@vueuse/core";
|
|
5
5
|
import { useReactiveSpec as V } from "../hooks/useReactiveSpec.js";
|
|
6
|
-
import
|
|
6
|
+
import b from "./Layouts/Layouts.vue.js";
|
|
7
7
|
const z = /* @__PURE__ */ p({
|
|
8
8
|
__name: "SingleApiReference",
|
|
9
9
|
props: {
|
|
@@ -11,43 +11,46 @@ const z = /* @__PURE__ */ p({
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["updateContent"],
|
|
13
13
|
setup(e) {
|
|
14
|
-
const { toggleColorMode:
|
|
14
|
+
const { toggleColorMode: u, isDarkMode: i } = N({
|
|
15
15
|
initialColorMode: e.configuration.darkMode ? "dark" : void 0,
|
|
16
16
|
overrideColorMode: e.configuration.forceDarkModeState
|
|
17
17
|
});
|
|
18
18
|
C(
|
|
19
19
|
() => e.configuration.darkMode,
|
|
20
|
-
(o) =>
|
|
20
|
+
(o) => i.value = !!o
|
|
21
21
|
), e.configuration.metaData && R(e.configuration.metaData);
|
|
22
|
-
const { parsedSpec:
|
|
23
|
-
proxyUrl:
|
|
24
|
-
specConfig:
|
|
22
|
+
const { parsedSpec: d, rawSpec: m } = V({
|
|
23
|
+
proxyUrl: s(() => e.configuration.proxyUrl || ""),
|
|
24
|
+
specConfig: s(() => e.configuration || {})
|
|
25
25
|
}), l = k(() => e.configuration.favicon);
|
|
26
26
|
return U(l), (o, n) => {
|
|
27
27
|
var c;
|
|
28
|
-
return
|
|
29
|
-
(c = o.configuration) != null && c.customCss ? (
|
|
30
|
-
default:
|
|
31
|
-
|
|
28
|
+
return f(), S(M, null, [
|
|
29
|
+
(c = o.configuration) != null && c.customCss ? (f(), D($("style"), { key: 0 }, {
|
|
30
|
+
default: t(() => [
|
|
31
|
+
w(B(o.configuration.customCss), 1)
|
|
32
32
|
]),
|
|
33
33
|
_: 1
|
|
34
34
|
})) : v("", !0),
|
|
35
|
-
y(
|
|
35
|
+
y(r(b), {
|
|
36
36
|
configuration: o.configuration,
|
|
37
|
-
isDark:
|
|
38
|
-
parsedSpec:
|
|
39
|
-
rawSpec:
|
|
40
|
-
onToggleDarkMode: n[0] || (n[0] = () =>
|
|
37
|
+
isDark: r(i),
|
|
38
|
+
parsedSpec: r(d),
|
|
39
|
+
rawSpec: r(m),
|
|
40
|
+
onToggleDarkMode: n[0] || (n[0] = () => r(u)()),
|
|
41
41
|
onUpdateContent: n[1] || (n[1] = (g) => o.$emit("updateContent", g))
|
|
42
42
|
}, {
|
|
43
|
-
footer:
|
|
44
|
-
|
|
43
|
+
footer: t(() => [
|
|
44
|
+
a(o.$slots, "footer")
|
|
45
45
|
]),
|
|
46
|
-
"content-end":
|
|
47
|
-
|
|
46
|
+
"content-end": t(() => [
|
|
47
|
+
a(o.$slots, "footer")
|
|
48
48
|
]),
|
|
49
|
-
"document-selector":
|
|
50
|
-
|
|
49
|
+
"document-selector": t(() => [
|
|
50
|
+
a(o.$slots, "document-selector")
|
|
51
|
+
]),
|
|
52
|
+
"sidebar-start": t(() => [
|
|
53
|
+
a(o.$slots, "sidebar-start")
|
|
51
54
|
]),
|
|
52
55
|
_: 3
|
|
53
56
|
}, 8, ["configuration", "isDark", "parsedSpec", "rawSpec"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ApiClientConfiguration } from '@scalar/types/api-reference';
|
|
2
2
|
import type { Spec } from '@scalar/types/legacy';
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
configuration: Partial<ApiClientConfiguration
|
|
4
|
+
configuration: Partial<Omit<ApiClientConfiguration, 'plugins'>>;
|
|
5
5
|
parsedSpec: Spec;
|
|
6
6
|
};
|
|
7
7
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -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":"AAmIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAYhD,KAAK,WAAW,GAAG;IAEjB,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC,CAAA;IAC/D,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;;AA+JF,wBAOG"}
|