@scalar/api-reference 1.25.115 → 1.25.118

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 (67) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/dist/browser/standalone.js +15973 -15829
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  5. package/dist/components/ApiReferenceLayout.vue2.js +1 -1
  6. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  7. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  8. package/dist/components/Content/Introduction/Introduction.vue2.js +39 -38
  9. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Lazy/Loading.vue.js +58 -60
  11. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
  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 +124 -120
  15. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +1 -3
  16. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  17. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Tag/TagList.vue.js +36 -38
  19. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  20. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  21. package/dist/components/Sidebar/SidebarElement.vue2.js +59 -55
  22. package/dist/features/ApiClientModal/useApiClient.d.ts +208 -128
  23. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  24. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +6 -4
  25. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  26. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  27. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +130 -119
  28. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts +2 -2
  29. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  30. package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
  31. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -91
  32. package/dist/features/Operation/Operation.vue.d.ts +4 -5
  33. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/Operation.vue.js +34 -41
  35. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -6
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  38. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +54 -51
  39. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -6
  40. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  41. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  42. package/dist/features/Operation/layouts/ModernLayout.vue2.js +71 -71
  43. package/dist/helpers/get-request.d.ts.map +1 -1
  44. package/dist/helpers/index.d.ts +0 -3
  45. package/dist/helpers/index.d.ts.map +1 -1
  46. package/dist/hooks/useConfig.d.ts +1 -1
  47. package/dist/hooks/useConfig.d.ts.map +1 -1
  48. package/dist/hooks/useConfig.js +1 -1
  49. package/dist/hooks/useNavState.d.ts.map +1 -1
  50. package/dist/hooks/useNavState.js +26 -24
  51. package/dist/hooks/useReactiveSpec.d.ts +1 -1
  52. package/dist/index.js +66 -72
  53. package/dist/style.css +1 -1
  54. package/package.json +12 -12
  55. package/dist/features/Operation/hooks/useRequestExample.d.ts +0 -17
  56. package/dist/features/Operation/hooks/useRequestExample.d.ts.map +0 -1
  57. package/dist/features/Operation/hooks/useRequestExample.js +0 -68
  58. package/dist/helpers/convertRequestToHarRequest.d.ts +0 -7
  59. package/dist/helpers/convertRequestToHarRequest.d.ts.map +0 -1
  60. package/dist/helpers/convertRequestToHarRequest.js +0 -64
  61. package/dist/helpers/get-request.js +0 -6
  62. package/dist/helpers/getExampleCode.d.ts +0 -8
  63. package/dist/helpers/getExampleCode.d.ts.map +0 -1
  64. package/dist/helpers/getExampleCode.js +0 -16
  65. package/dist/helpers/joinWithSlash.d.ts +0 -5
  66. package/dist/helpers/joinWithSlash.d.ts.map +0 -1
  67. package/dist/helpers/joinWithSlash.js +0 -4
@@ -1,20 +1,20 @@
1
- import { defineComponent as $, openBlock as o, createElementBlock as l, createElementVNode as r, normalizeClass as B, createVNode as u, unref as f, withModifiers as V, createTextVNode as g, createCommentVNode as a, createBlock as E, toDisplayString as N, renderSlot as v } from "vue";
2
- import { ScalarIconButton as A, ScalarIcon as I } from "@scalar/components";
3
- import O from "./SidebarHttpBadge.vue.js";
4
- import { sleep as b } from "../../helpers/sleep.js";
5
- import { useNavState as T } from "../../hooks/useNavState.js";
6
- import { joinWithSlash as D } from "../../helpers/joinWithSlash.js";
7
- import { scrollToId as H } from "../../helpers/scrollToId.js";
8
- const R = ["id"], U = {
1
+ import { defineComponent as $, openBlock as n, createElementBlock as l, createElementVNode as a, normalizeClass as V, withModifiers as A, createVNode as g, unref as b, withCtx as E, createTextVNode as m, toDisplayString as h, createCommentVNode as s, createBlock as N, renderSlot as v } from "vue";
2
+ import { ScalarSidebarGroupToggle as T, ScalarIcon as O } from "@scalar/components";
3
+ import { combineUrlAndPath as U } from "@scalar/oas-utils/helpers";
4
+ import H from "./SidebarHttpBadge.vue.js";
5
+ import { sleep as k } from "../../helpers/sleep.js";
6
+ import { useNavState as I } from "../../hooks/useNavState.js";
7
+ import { scrollToId as P } from "../../helpers/scrollToId.js";
8
+ const D = ["id"], L = {
9
9
  key: 0,
10
10
  class: "sidebar-heading-chevron"
11
- }, z = ["href", "tabindex"], L = { class: "sidebar-heading-link-title" }, M = {
11
+ }, M = ["aria-expanded"], R = ["href", "tabindex"], z = { class: "sidebar-heading-link-title" }, F = {
12
12
  key: 1,
13
13
  class: "sidebar-heading-link-method"
14
- }, P = {
14
+ }, G = {
15
15
  key: 1,
16
16
  class: "action-menu"
17
- }, Q = /* @__PURE__ */ $({
17
+ }, Y = /* @__PURE__ */ $({
18
18
  __name: "SidebarElement",
19
19
  props: {
20
20
  id: {},
@@ -24,77 +24,81 @@ const R = ["id"], U = {
24
24
  open: { type: Boolean }
25
25
  },
26
26
  emits: ["toggleOpen"],
27
- setup(k, { emit: C }) {
28
- const t = k, d = C, { getFullHash: m, isIntersectionEnabled: s, pathRouting: p, replaceUrlState: y } = T(), h = async () => {
29
- var e, i;
30
- t.hasChildren && d("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (s.value = !1, await b(100), s.value = !0);
31
- }, w = () => {
27
+ setup(C, { emit: y }) {
28
+ const i = C, d = y, { getFullHash: c, isIntersectionEnabled: r, pathRouting: p, replaceUrlState: w } = I(), u = async () => {
29
+ var e, t;
30
+ i.hasChildren && d("toggleOpen"), (t = (e = i.item) == null ? void 0 : e.select) == null || t.call(e), i.open && (r.value = !1, await k(100), r.value = !0);
31
+ }, S = () => {
32
32
  if (p.value)
33
- return D(p.value.basePath, t.item.id);
33
+ return U(p.value.basePath, i.item.id);
34
34
  if (typeof window < "u") {
35
35
  const e = new URL(window.location.href);
36
- return e.hash = m(t.item.id), `${e.pathname}${e.search}${e.hash}`;
37
- } else return `#${m(t.item.id)}`;
38
- }, S = async (e) => {
39
- var i, n;
40
- p.value && (e.preventDefault(), t.hasChildren && d("toggleOpen"), (n = (i = t.item) == null ? void 0 : i.select) == null || n.call(i), d("toggleOpen"), s.value = !1, y(t.item.id), H(t.item.id), await b(100), s.value = !0);
36
+ return e.hash = c(i.item.id), `${e.pathname}${e.search}${e.hash}`;
37
+ } else return `#${c(i.item.id)}`;
38
+ }, B = async (e) => {
39
+ var t, o;
40
+ p.value && (e.preventDefault(), i.hasChildren && d("toggleOpen"), (o = (t = i.item) == null ? void 0 : t.select) == null || o.call(t), d("toggleOpen"), r.value = !1, w(i.item.id), P(i.item.id), await k(100), r.value = !0);
41
41
  };
42
- return (e, i) => {
43
- var n, c;
44
- return o(), l("li", {
42
+ return (e, t) => {
43
+ var o, f;
44
+ return n(), l("li", {
45
45
  id: e.id,
46
46
  class: "sidebar-group-item"
47
47
  }, [
48
- r("div", {
49
- class: B(["sidebar-heading", {
48
+ a("div", {
49
+ class: V(["sidebar-heading", {
50
50
  "sidebar-group-item__folder": e.hasChildren,
51
51
  active_page: e.isActive,
52
52
  deprecated: e.item.deprecated ?? !1
53
53
  }]),
54
- onClick: h
54
+ onClick: u
55
55
  }, [
56
- e.hasChildren ? (o(), l("p", U, [
57
- u(f(A), {
56
+ e.hasChildren ? (n(), l("p", L, [
57
+ a("button", {
58
58
  "aria-expanded": e.open,
59
59
  class: "toggle-nested-icon",
60
- icon: e.open ? "ChevronDown" : "ChevronRight",
61
- label: `${e.open ? "Collapse" : "Expand"} ${e.item.title}`,
62
- size: "xs",
63
- thickness: "1.5",
64
- onClick: V(h, ["stop"])
65
- }, null, 8, ["aria-expanded", "icon", "label"]),
66
- i[0] || (i[0] = g("   "))
67
- ])) : a("", !0),
68
- r("a", {
60
+ type: "button",
61
+ onClick: A(u, ["stop"])
62
+ }, [
63
+ g(b(T), { open: e.open }, {
64
+ label: E(() => [
65
+ m(h(e.open ? "Collapse" : "Expand") + " " + h(e.item.title), 1)
66
+ ]),
67
+ _: 1
68
+ }, 8, ["open"])
69
+ ], 8, M),
70
+ t[0] || (t[0] = m("   "))
71
+ ])) : s("", !0),
72
+ a("a", {
69
73
  class: "sidebar-heading-link",
70
- href: w(),
74
+ href: S(),
71
75
  tabindex: e.hasChildren ? -1 : 0,
72
- onClick: S
76
+ onClick: B
73
77
  }, [
74
- (c = (n = e.item) == null ? void 0 : n.icon) != null && c.src ? (o(), E(f(I), {
78
+ (f = (o = e.item) == null ? void 0 : o.icon) != null && f.src ? (n(), N(b(O), {
75
79
  key: 0,
76
80
  class: "sidebar-icon",
77
81
  icon: e.item.icon.src
78
- }, null, 8, ["icon"])) : a("", !0),
79
- r("p", L, N(e.item.title), 1),
80
- e.item.httpVerb && !e.hasChildren ? (o(), l("p", M, [
81
- i[1] || (i[1] = g("   ")),
82
- i[2] || (i[2] = r("span", { class: "sr-only" }, "HTTP Method: ", -1)),
83
- u(O, {
82
+ }, null, 8, ["icon"])) : s("", !0),
83
+ a("p", z, h(e.item.title), 1),
84
+ e.item.httpVerb && !e.hasChildren ? (n(), l("p", F, [
85
+ t[1] || (t[1] = m("   ")),
86
+ t[2] || (t[2] = a("span", { class: "sr-only" }, "HTTP Method: ", -1)),
87
+ g(H, {
84
88
  active: e.isActive,
85
89
  method: e.item.httpVerb
86
90
  }, null, 8, ["active", "method"])
87
- ])) : a("", !0)
88
- ], 8, z)
91
+ ])) : s("", !0)
92
+ ], 8, R)
89
93
  ], 2),
90
- e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0),
91
- e.$slots["action-menu"] ? (o(), l("div", P, [
94
+ e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
95
+ e.$slots["action-menu"] ? (n(), l("div", G, [
92
96
  v(e.$slots, "action-menu", {}, void 0, !0)
93
- ])) : a("", !0)
94
- ], 8, R);
97
+ ])) : s("", !0)
98
+ ], 8, D);
95
99
  };
96
100
  }
97
101
  });
98
102
  export {
99
- Q as default
103
+ Y as default
100
104
  };