@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.
Files changed (55) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/browser/standalone.js +12508 -13008
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  5. package/dist/components/Content/Content.vue.js +2 -2
  6. package/dist/components/Content/Content.vue2.js +3 -3
  7. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  9. package/dist/components/Content/Schema/{SchemaDiscriminator.vue.d.ts → SchemaComposition.vue.d.ts} +3 -2
  10. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -0
  11. package/dist/components/Content/Schema/SchemaComposition.vue.js +187 -0
  12. package/dist/components/Content/Schema/SchemaComposition.vue2.js +4 -0
  13. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  14. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  16. package/dist/components/Content/Schema/SchemaProperty.vue2.js +6 -6
  17. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +0 -1
  18. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +3 -3
  20. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +8 -9
  21. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  23. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +165 -146
  24. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +3 -2
  25. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  26. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +13 -13
  27. package/dist/components/Content/Schema/helpers/schema-composition.d.ts +12 -0
  28. package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -0
  29. package/dist/components/Content/Schema/helpers/schema-composition.js +8 -0
  30. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +4 -0
  31. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -0
  32. package/dist/components/Layouts/Layouts.vue.d.ts +3 -0
  33. package/dist/components/Layouts/Layouts.vue.d.ts.map +1 -1
  34. package/dist/components/Layouts/Layouts.vue.js +14 -23
  35. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  36. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  37. package/dist/components/Layouts/ModernLayout.vue2.js +51 -45
  38. package/dist/components/SingleApiReference.vue.d.ts +1 -0
  39. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  40. package/dist/components/SingleApiReference.vue.js +25 -22
  41. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +1 -1
  42. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  43. package/dist/features/ApiClientModal/useApiClient.d.ts +144 -104
  44. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  45. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
  46. package/dist/features/BaseUrl/BaseUrl.vue.js +11 -10
  47. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  48. package/dist/index.d.ts +1 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +46 -43
  51. package/dist/style.css +1 -1
  52. package/package.json +17 -17
  53. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
  54. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -101
  55. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
@@ -1,16 +1,17 @@
1
- import { defineComponent as v, useSlots as C, watch as c, createBlock as u, openBlock as t, normalizeClass as B, createSlots as w, withCtx as n, createVNode as f, unref as s, createCommentVNode as d, createElementBlock as p, renderSlot as m, isRef as D, renderList as M, normalizeProps as $, guardReactiveProps as V } from "vue";
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 K, ScalarColorModeToggleButton as L } from "@scalar/components";
4
- import { useBreakpoints as N } from "@scalar/use-hooks/useBreakpoints";
5
- import R from "../ApiReferenceLayout.vue.js";
6
- import U from "../MobileHeader.vue.js";
7
- import { useNavState as z } from "../../hooks/useNavState.js";
8
- import { useSidebar as A } from "../../hooks/useSidebar.js";
9
- import O from "../../features/Search/SearchButton.vue.js";
10
- const P = { key: 0 }, T = {
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
- }, E = { key: 1 }, Y = /* @__PURE__ */ v({
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(g) {
23
- const l = g, S = C(), { mediaQueries: k } = N(), { isSidebarOpen: a } = A(), h = !1;
24
- c(k.lg, (e, o) => {
25
- o && !e && (a.value = !1);
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 } = z();
28
- return c(y, (e, o) => {
29
- e && e !== o && (a.value = !1);
30
- }), (e, o) => (t(), u(R, {
31
- class: B({
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
- }, w({
39
- header: n(() => [
40
- e.configuration.showSidebar ?? !0 ? (t(), u(U, {
43
+ }, M({
44
+ header: a(() => [
45
+ e.configuration.showSidebar ?? !0 ? (t(), u(z, {
41
46
  key: 0,
42
- open: s(a),
43
- "onUpdate:open": o[0] || (o[0] = (r) => D(a) ? a.value = r : null)
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": n(({ spec: r }) => {
47
- var i;
51
+ "sidebar-start": a((r) => {
52
+ var l;
48
53
  return [
49
- e.$slots["document-selector"] ? (t(), p("div", P, [
50
- m(e.$slots, "document-selector", {}, void 0, !0)
54
+ e.$slots["document-selector"] ? (t(), p("div", E, [
55
+ c(e.$slots, "document-selector", {}, void 0, !0)
51
56
  ])) : d("", !0),
52
- l.configuration.hideSearch ? d("", !0) : (t(), p("div", T, [
53
- f(s(O), {
54
- searchHotKey: (i = l.configuration) == null ? void 0 : i.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": n(() => [
61
- f(s(K), { class: "darklight-reference" }, {
62
- toggle: n(() => [
63
- l.configuration.hideDarkModeToggle ? (t(), p("span", E)) : (t(), u(s(L), {
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: n(() => [
70
- l.configuration.hideClientButton ? d("", !0) : (t(), u(s(H), {
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: h,
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
- M(S, (r, i) => ({
84
- name: i,
85
- fn: n((b) => [
86
- m(e.$slots, i, $(V(b || {})), void 0, !0)
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
- Y as default
99
+ x as default
94
100
  };
@@ -8,6 +8,7 @@ declare function __VLS_template(): {
8
8
  footer?(_: {}): any;
9
9
  footer?(_: {}): any;
10
10
  "document-selector"?(_: {}): any;
11
+ "sidebar-start"?(_: {}): any;
11
12
  };
12
13
  refs: {};
13
14
  rootEl: any;
@@ -1 +1 @@
1
- {"version":3,"file":"SingleApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/SingleApiReference.vue"],"names":[],"mappings":"AA8EA,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;WAgGT,OAAO,IAA6B;;wBAVrB,GAAG;wBACH,GAAG;qCACU,GAAG;;;;EAa5C;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
+ {"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 f, computed as k, createElementBlock as S, openBlock as u, Fragment as M, createBlock as D, createCommentVNode as v, createVNode as y, resolveDynamicComponent as w, withCtx as r, createTextVNode as $, toDisplayString as B, unref as t, renderSlot as i } from "vue";
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 F from "./Layouts/Layouts.vue.js";
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: d, isDarkMode: a } = N({
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) => a.value = !!o
20
+ (o) => i.value = !!o
21
21
  ), e.configuration.metaData && R(e.configuration.metaData);
22
- const { parsedSpec: m, rawSpec: s } = V({
23
- proxyUrl: f(() => e.configuration.proxyUrl || ""),
24
- specConfig: f(() => e.configuration || {})
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 u(), S(M, null, [
29
- (c = o.configuration) != null && c.customCss ? (u(), D(w("style"), { key: 0 }, {
30
- default: r(() => [
31
- $(B(o.configuration.customCss), 1)
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(t(F), {
35
+ y(r(b), {
36
36
  configuration: o.configuration,
37
- isDark: t(a),
38
- parsedSpec: t(m),
39
- rawSpec: t(s),
40
- onToggleDarkMode: n[0] || (n[0] = () => t(d)()),
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: r(() => [
44
- i(o.$slots, "footer")
43
+ footer: t(() => [
44
+ a(o.$slots, "footer")
45
45
  ]),
46
- "content-end": r(() => [
47
- i(o.$slots, "footer")
46
+ "content-end": t(() => [
47
+ a(o.$slots, "footer")
48
48
  ]),
49
- "document-selector": r(() => [
50
- i(o.$slots, "document-selector")
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":"AAkIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAYhD,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC9C,UAAU,EAAE,IAAI,CAAA;CACjB,CAAC;;AA+JF,wBAOG"}
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"}