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