@scalar/api-reference 1.25.47 → 1.25.49

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 (64) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/browser/standalone.js +13698 -13755
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +136 -137
  7. package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
  9. package/dist/components/Content/Operation/TestRequestButton.vue2.js +18 -17
  10. package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts.map +1 -1
  11. package/dist/components/DarkModeToggle/DarkModeToggle.vue.js +1 -1
  12. package/dist/components/DarkModeToggle/DarkModeToggle.vue2.js +12 -11
  13. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  14. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  15. package/dist/components/Sidebar/Sidebar.vue2.js +146 -142
  16. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  17. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  18. package/dist/components/Sidebar/SidebarElement.vue2.js +37 -35
  19. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
  20. package/dist/{components → features/ApiClientModal}/ApiClientModal.vue.d.ts +3 -3
  21. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -0
  22. package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -0
  23. package/dist/features/ApiClientModal/index.d.ts +3 -0
  24. package/dist/features/ApiClientModal/index.d.ts.map +1 -0
  25. package/dist/features/ApiClientModal/useApiClient.d.ts +7734 -0
  26. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -0
  27. package/dist/features/ApiClientModal/useApiClient.js +23 -0
  28. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
  29. package/dist/features/BaseUrl/ServerUrlSelect.vue.js +2 -2
  30. package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +10 -7
  31. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  32. package/dist/features/Search/SearchButton.vue.js +2 -2
  33. package/dist/features/Search/SearchButton.vue2.js +16 -20
  34. package/dist/helpers/index.d.ts +0 -1
  35. package/dist/helpers/index.d.ts.map +1 -1
  36. package/dist/hooks/useSidebar.d.ts.map +1 -1
  37. package/dist/hooks/useSidebar.js +148 -155
  38. package/dist/index.js +43 -45
  39. package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
  40. package/dist/legacy/components/SecurityScheme.vue.js +2 -2
  41. package/dist/legacy/components/SecurityScheme.vue2.js +111 -115
  42. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -1
  43. package/dist/legacy/components/SecuritySchemeSelector.vue.js +1 -1
  44. package/dist/legacy/components/SecuritySchemeSelector.vue2.js +46 -36
  45. package/dist/legacy/helpers/index.d.ts +1 -1
  46. package/dist/legacy/stores/index.d.ts +1 -2
  47. package/dist/legacy/stores/index.d.ts.map +1 -1
  48. package/dist/legacy/stores/useOpenApiStore.js +4 -18
  49. package/dist/style.css +1 -1
  50. package/package.json +10 -10
  51. package/dist/components/ApiClientModal.vue.d.ts.map +0 -1
  52. package/dist/components/ApiClientModal.vue.js +0 -64
  53. package/dist/components/api-client-bus.d.ts +0 -22
  54. package/dist/components/api-client-bus.d.ts.map +0 -1
  55. package/dist/components/api-client-bus.js +0 -6
  56. package/dist/helpers/openClientFor.d.ts +0 -7
  57. package/dist/helpers/openClientFor.d.ts.map +0 -1
  58. package/dist/helpers/openClientFor.js +0 -19
  59. package/dist/legacy/helpers/createPlaceholderRequest.js +0 -14
  60. package/dist/legacy/stores/useApiClientStore.d.ts +0 -18
  61. package/dist/legacy/stores/useApiClientStore.d.ts.map +0 -1
  62. package/dist/legacy/stores/useApiClientStore.js +0 -32
  63. package/dist/legacy/stores/useRequestStore.js +0 -33
  64. /package/dist/{components → features/ApiClientModal}/ApiClientModal.vue2.js +0 -0
@@ -1,10 +1,10 @@
1
- import { defineComponent as B, ref as E, watch as F, onMounted as N, openBlock as r, createElementBlock as a, renderSlot as V, createElementVNode as w, createVNode as I, withCtx as f, Fragment as d, renderList as h, unref as i, toDisplayString as L, createBlock as u, createCommentVNode as b } from "vue";
2
- import v from "./SidebarElement.vue.js";
3
- import m from "./SidebarGroup.vue.js";
1
+ import { defineComponent as B, ref as E, watch as F, onMounted as N, openBlock as r, createElementBlock as i, renderSlot as C, createElementVNode as V, createVNode as I, withCtx as b, Fragment as d, renderList as v, unref as a, toDisplayString as L, createBlock as u, createCommentVNode as h } from "vue";
2
+ import y from "./SidebarElement.vue.js";
3
+ import g from "./SidebarGroup.vue.js";
4
4
  import { useSidebar as G } from "../../hooks/useSidebar.js";
5
- import { sleep as C } from "../../helpers/sleep.js";
6
- import { useNavState as x } from "../../hooks/useNavState.js";
7
- const D = { class: "sidebar" }, H = { class: "sidebar-group-title" }, M = -160, P = /* @__PURE__ */ B({
5
+ import { sleep as w } from "../../helpers/sleep.js";
6
+ import { useNavState as D } from "../../hooks/useNavState.js";
7
+ const H = { class: "sidebar" }, M = ["aria-label"], R = { class: "sidebar-group-title" }, j = -160, Q = /* @__PURE__ */ B({
8
8
  __name: "Sidebar",
9
9
  props: {
10
10
  parsedSpec: {},
@@ -12,148 +12,152 @@ const D = { class: "sidebar" }, H = { class: "sidebar-group-title" }, M = -160,
12
12
  operationsSorter: { type: [String, Function] }
13
13
  },
14
14
  setup(A) {
15
- const y = A, { hash: o, isIntersectionEnabled: $ } = x(), { items: O, toggleCollapsedSidebarItem: g, collapsedSidebarItems: T } = G(
15
+ const S = A, { hash: c, isIntersectionEnabled: $ } = D(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: _ } = G(
16
16
  {
17
- parsedSpec: y.parsedSpec,
18
- tagsSorter: y.tagsSorter,
19
- operationsSorter: y.operationsSorter
17
+ parsedSpec: S.parsedSpec,
18
+ tagsSorter: S.tagsSorter,
19
+ operationsSorter: S.operationsSorter
20
20
  }
21
- ), S = E(null), c = E(!0);
22
- F(o, (p) => {
23
- !$.value || c.value || typeof window > "u" || k(p);
21
+ ), m = E(null), p = E(!0);
22
+ F(c, (o) => {
23
+ !$.value || p.value || typeof window > "u" || k(o);
24
24
  });
25
- const k = (p) => {
26
- var t, l, s, _;
27
- const n = document.getElementById(`sidebar-${p}`);
28
- if (!n || !S.value) return;
29
- let e = M;
30
- n.getAttribute("data-sidebar-type") === "heading" ? e += n.offsetTop + ((t = n.getElementsByClassName("sidebar-heading")) == null ? void 0 : t[0]).offsetHeight : e += n.offsetTop + (((l = n.parentElement) == null ? void 0 : l.offsetTop) ?? 0) + (((_ = (s = n.parentElement) == null ? void 0 : s.parentElement) == null ? void 0 : _.offsetTop) ?? 0), S.value.scrollTo({ top: e, behavior: "smooth" });
25
+ const k = (o) => {
26
+ var e, t, l, s;
27
+ const n = document.getElementById(`sidebar-${o}`);
28
+ if (!n || !m.value) return;
29
+ let f = j;
30
+ n.getAttribute("data-sidebar-type") === "heading" ? f += n.offsetTop + ((e = n.getElementsByClassName("sidebar-heading")) == null ? void 0 : e[0]).offsetHeight : f += n.offsetTop + (((t = n.parentElement) == null ? void 0 : t.offsetTop) ?? 0) + (((s = (l = n.parentElement) == null ? void 0 : l.parentElement) == null ? void 0 : s.offsetTop) ?? 0), m.value.scrollTo({ top: f, behavior: "smooth" });
31
31
  };
32
32
  return N(() => {
33
- setTimeout(() => k(o.value), 500), c.value = !1;
34
- }), (p, n) => (r(), a("div", D, [
35
- V(p.$slots, "sidebar-start", {}, void 0, !0),
36
- w("div", {
37
- ref_key: "scrollerEl",
38
- ref: S,
39
- class: "sidebar-pages custom-scroll custom-scroll-self-contain-overflow"
40
- }, [
41
- I(m, { level: 0 }, {
42
- default: f(() => [
43
- (r(!0), a(d, null, h(i(O).entries, (e) => (r(), a(d, {
44
- key: e.id
45
- }, [
46
- e.isGroup ? (r(), a(d, { key: 0 }, [
47
- w("li", H, L(e.displayTitle ?? e.title), 1),
48
- (r(!0), a(d, null, h(e.children, (t) => (r(), u(v, {
49
- key: t.id,
50
- id: `sidebar-${t.id}`,
51
- "data-sidebar-type": "heading",
52
- hasChildren: t.children && t.children.length > 0,
53
- isActive: i(o) === t.id,
54
- item: {
55
- id: t.id,
56
- title: t.displayTitle ?? t.title,
57
- select: t.select,
58
- httpVerb: t.httpVerb,
59
- deprecated: t.deprecated ?? !1
60
- },
61
- open: i(T)[t.id] ?? !1,
62
- onToggleOpen: async () => {
63
- c.value = !0, i(g)(t.id), await i(C)(100), c.value = !1;
64
- }
65
- }, {
66
- default: f(() => {
67
- var l;
68
- return [
69
- t.children && ((l = t.children) == null ? void 0 : l.length) > 0 ? (r(), u(m, {
70
- key: 0,
71
- level: 1
72
- }, {
73
- default: f(() => [
74
- (r(!0), a(d, null, h(t.children, (s) => (r(), a(d, {
75
- key: s.id
76
- }, [
77
- e.show ? (r(), u(v, {
78
- key: 0,
79
- id: `sidebar-${s.id}`,
80
- isActive: i(o) === s.id,
81
- item: {
82
- id: s.id,
83
- title: s.displayTitle ?? s.title,
84
- select: s.select,
85
- httpVerb: s.httpVerb,
86
- deprecated: s.deprecated ?? !1
87
- }
88
- }, null, 8, ["id", "isActive", "item"])) : b("", !0)
89
- ], 64))), 128))
90
- ]),
91
- _: 2
92
- }, 1024)) : b("", !0)
93
- ];
94
- }),
95
- _: 2
96
- }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
97
- ], 64)) : (r(), a(d, { key: 1 }, [
98
- e.show ? (r(), u(v, {
99
- key: 0,
100
- id: `sidebar-${e.id}`,
101
- "data-sidebar-type": "heading",
102
- hasChildren: e.children && e.children.length > 0,
103
- isActive: i(o) === e.id,
104
- item: {
105
- id: e.id,
106
- title: e.displayTitle ?? e.title,
107
- select: e.select,
108
- httpVerb: e.httpVerb,
109
- deprecated: e.deprecated ?? !1
110
- },
111
- open: i(T)[e.id] ?? !1,
112
- onToggleOpen: async () => {
113
- c.value = !0, i(g)(e.id), await i(C)(100), c.value = !1;
114
- }
115
- }, {
116
- default: f(() => {
117
- var t;
118
- return [
119
- e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (r(), u(m, {
120
- key: 0,
121
- level: 1
122
- }, {
123
- default: f(() => [
124
- (r(!0), a(d, null, h(e.children, (l) => (r(), a(d, {
125
- key: l.id
126
- }, [
127
- e.show ? (r(), u(v, {
128
- key: 0,
129
- id: `sidebar-${l.id}`,
130
- isActive: i(o) === l.id,
131
- item: {
132
- id: l.id,
133
- title: l.displayTitle ?? l.title,
134
- select: l.select,
135
- httpVerb: l.httpVerb,
136
- deprecated: l.deprecated ?? !1
137
- }
138
- }, null, 8, ["id", "isActive", "item"])) : b("", !0)
139
- ], 64))), 128))
140
- ]),
141
- _: 2
142
- }, 1024)) : b("", !0)
143
- ];
144
- }),
145
- _: 2
146
- }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"])) : b("", !0)
147
- ], 64))
148
- ], 64))), 128))
149
- ]),
150
- _: 1
151
- })
152
- ], 512),
153
- V(p.$slots, "sidebar-end", {}, void 0, !0)
154
- ]));
33
+ setTimeout(() => k(c.value), 500), p.value = !1;
34
+ }), (o, n) => {
35
+ var f;
36
+ return r(), i("div", H, [
37
+ C(o.$slots, "sidebar-start", {}, void 0, !0),
38
+ V("nav", {
39
+ ref_key: "scrollerEl",
40
+ ref: m,
41
+ "aria-label": `Contents of ${(f = o.parsedSpec.info) == null ? void 0 : f.title}`,
42
+ class: "sidebar-pages custom-scroll custom-scroll-self-contain-overflow"
43
+ }, [
44
+ I(g, { level: 0 }, {
45
+ default: b(() => [
46
+ (r(!0), i(d, null, v(a(O).entries, (e) => (r(), i(d, {
47
+ key: e.id
48
+ }, [
49
+ e.isGroup ? (r(), i(d, { key: 0 }, [
50
+ V("li", R, L(e.displayTitle ?? e.title), 1),
51
+ (r(!0), i(d, null, v(e.children, (t) => (r(), u(y, {
52
+ key: t.id,
53
+ id: `sidebar-${t.id}`,
54
+ "data-sidebar-type": "heading",
55
+ hasChildren: t.children && t.children.length > 0,
56
+ isActive: a(c) === t.id,
57
+ item: {
58
+ id: t.id,
59
+ title: t.displayTitle ?? t.title,
60
+ select: t.select,
61
+ httpVerb: t.httpVerb,
62
+ deprecated: t.deprecated ?? !1
63
+ },
64
+ open: a(_)[t.id] ?? !1,
65
+ onToggleOpen: async () => {
66
+ p.value = !0, a(T)(t.id), await a(w)(100), p.value = !1;
67
+ }
68
+ }, {
69
+ default: b(() => {
70
+ var l;
71
+ return [
72
+ t.children && ((l = t.children) == null ? void 0 : l.length) > 0 ? (r(), u(g, {
73
+ key: 0,
74
+ level: 1
75
+ }, {
76
+ default: b(() => [
77
+ (r(!0), i(d, null, v(t.children, (s) => (r(), i(d, {
78
+ key: s.id
79
+ }, [
80
+ e.show ? (r(), u(y, {
81
+ key: 0,
82
+ id: `sidebar-${s.id}`,
83
+ isActive: a(c) === s.id,
84
+ item: {
85
+ id: s.id,
86
+ title: s.displayTitle ?? s.title,
87
+ select: s.select,
88
+ httpVerb: s.httpVerb,
89
+ deprecated: s.deprecated ?? !1
90
+ }
91
+ }, null, 8, ["id", "isActive", "item"])) : h("", !0)
92
+ ], 64))), 128))
93
+ ]),
94
+ _: 2
95
+ }, 1024)) : h("", !0)
96
+ ];
97
+ }),
98
+ _: 2
99
+ }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
100
+ ], 64)) : (r(), i(d, { key: 1 }, [
101
+ e.show ? (r(), u(y, {
102
+ key: 0,
103
+ id: `sidebar-${e.id}`,
104
+ "data-sidebar-type": "heading",
105
+ hasChildren: e.children && e.children.length > 0,
106
+ isActive: a(c) === e.id,
107
+ item: {
108
+ id: e.id,
109
+ title: e.displayTitle ?? e.title,
110
+ select: e.select,
111
+ httpVerb: e.httpVerb,
112
+ deprecated: e.deprecated ?? !1
113
+ },
114
+ open: a(_)[e.id] ?? !1,
115
+ onToggleOpen: async () => {
116
+ p.value = !0, a(T)(e.id), await a(w)(100), p.value = !1;
117
+ }
118
+ }, {
119
+ default: b(() => {
120
+ var t;
121
+ return [
122
+ e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (r(), u(g, {
123
+ key: 0,
124
+ level: 1
125
+ }, {
126
+ default: b(() => [
127
+ (r(!0), i(d, null, v(e.children, (l) => (r(), i(d, {
128
+ key: l.id
129
+ }, [
130
+ e.show ? (r(), u(y, {
131
+ key: 0,
132
+ id: `sidebar-${l.id}`,
133
+ isActive: a(c) === l.id,
134
+ item: {
135
+ id: l.id,
136
+ title: l.displayTitle ?? l.title,
137
+ select: l.select,
138
+ httpVerb: l.httpVerb,
139
+ deprecated: l.deprecated ?? !1
140
+ }
141
+ }, null, 8, ["id", "isActive", "item"])) : h("", !0)
142
+ ], 64))), 128))
143
+ ]),
144
+ _: 2
145
+ }, 1024)) : h("", !0)
146
+ ];
147
+ }),
148
+ _: 2
149
+ }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"])) : h("", !0)
150
+ ], 64))
151
+ ], 64))), 128))
152
+ ]),
153
+ _: 1
154
+ })
155
+ ], 8, M),
156
+ C(o.$slots, "sidebar-end", {}, void 0, !0)
157
+ ]);
158
+ };
155
159
  }
156
160
  });
157
161
  export {
158
- P as default
162
+ Q as default
159
163
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AA+YA,iBAAS,cAAc;qBAuKO,GAAG;2BACG,GAAG;EAuBtC;AACD,QAAA,MAAM,eAAe;QArRf,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;;QAdV,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;kFAgRd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AA0ZA,iBAAS,cAAc;qBA8KO,GAAG;2BACG,GAAG;EAuBtC;AACD,QAAA,MAAM,eAAe;QA5Rf,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;;QAdV,MAAM;UACJ;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;eACU,OAAO;kBACJ,OAAO;WACd,OAAO;;;kFAuRd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SidebarElement.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8f97b414"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5728e727"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as B, openBlock as a, createElementBlock as d, createElementVNode as h, normalizeClass as $, createVNode as p, unref as u, withModifiers as V, createTextVNode as f, createCommentVNode as s, createBlock as N, toDisplayString as A, renderSlot as g } from "vue";
2
- import { ScalarIconButton as E, ScalarIcon as I } from "@scalar/components";
1
+ import { defineComponent as $, openBlock as a, createElementBlock as d, createElementVNode as p, normalizeClass as B, createVNode as c, unref as u, withModifiers as V, createTextVNode as f, createCommentVNode as s, createBlock as E, toDisplayString as N, renderSlot as v } from "vue";
2
+ import { ScalarIconButton as A, ScalarIcon as I } from "@scalar/components";
3
3
  import O from "./SidebarHttpBadge.vue.js";
4
- import { sleep as v } from "../../helpers/sleep.js";
5
- import { joinWithSlash as k } from "../../helpers/joinWithSlash.js";
4
+ import { sleep as g } from "../../helpers/sleep.js";
5
+ import { joinWithSlash as b } from "../../helpers/joinWithSlash.js";
6
6
  import { scrollToId as R } from "../../helpers/scrollToId.js";
7
- import { useNavState as D } from "../../hooks/useNavState.js";
8
- const L = ["id"], T = {
7
+ import { useNavState as T } from "../../hooks/useNavState.js";
8
+ const D = ["id"], L = {
9
9
  key: 0,
10
10
  class: "sidebar-heading-chevron"
11
- }, U = ["href"], z = { class: "sidebar-heading-link-title" }, P = {
11
+ }, P = ["href"], U = { class: "sidebar-heading-link-title" }, z = {
12
12
  key: 1,
13
13
  class: "sidebar-heading-link-method"
14
- }, j = {
14
+ }, H = {
15
15
  key: 1,
16
16
  class: "action-menu"
17
- }, K = /* @__PURE__ */ B({
17
+ }, K = /* @__PURE__ */ $({
18
18
  __name: "SidebarElement",
19
19
  props: {
20
20
  id: {},
@@ -24,23 +24,23 @@ const L = ["id"], T = {
24
24
  open: { type: Boolean }
25
25
  },
26
26
  emits: ["toggleOpen"],
27
- setup(b, { emit: C }) {
28
- const t = b, c = C, { hash: w, isIntersectionEnabled: r, pathRouting: l } = D(), m = async () => {
27
+ setup(k, { emit: C }) {
28
+ const t = k, m = C, { hash: w, isIntersectionEnabled: l, pathRouting: r } = T(), h = async () => {
29
29
  var e, i;
30
- t.hasChildren && c("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (r.value = !1, await v(100), r.value = !0);
30
+ t.hasChildren && m("toggleOpen"), (i = (e = t.item) == null ? void 0 : e.select) == null || i.call(e), t.open && (l.value = !1, await g(100), l.value = !0);
31
31
  }, y = () => {
32
- if (l.value)
33
- return k(l.value.basePath, t.item.id);
32
+ if (r.value)
33
+ return b(r.value.basePath, t.item.id);
34
34
  if (typeof window < "u") {
35
35
  const e = new URL(window.location.href);
36
36
  return e.hash = t.item.id, `${e.pathname}${e.search}${e.hash}`;
37
37
  } else return `#${t.item.id}`;
38
38
  }, S = async (e) => {
39
39
  var i, o;
40
- if (l.value) {
41
- e.preventDefault(), t.hasChildren && c("toggleOpen"), (o = (i = t.item) == null ? void 0 : i.select) == null || o.call(i), c("toggleOpen"), r.value = !1, w.value = t.item.id;
40
+ if (r.value) {
41
+ e.preventDefault(), t.hasChildren && m("toggleOpen"), (o = (i = t.item) == null ? void 0 : i.select) == null || o.call(i), m("toggleOpen"), l.value = !1, w.value = t.item.id;
42
42
  const n = new URL(window.location.href);
43
- n.pathname = k(l.value.basePath, t.item.id), window.history.pushState({}, "", n), R(t.item.id), await v(100), r.value = !0;
43
+ n.pathname = b(r.value.basePath, t.item.id), window.history.pushState({}, "", n), R(t.item.id), await g(100), l.value = !0;
44
44
  }
45
45
  };
46
46
  return (e, i) => {
@@ -49,49 +49,51 @@ const L = ["id"], T = {
49
49
  id: e.id,
50
50
  class: "sidebar-group-item"
51
51
  }, [
52
- h("div", {
53
- class: $(["sidebar-heading", {
52
+ p("div", {
53
+ class: B(["sidebar-heading", {
54
54
  "sidebar-group-item__folder": e.hasChildren,
55
55
  active_page: e.isActive,
56
56
  deprecated: e.item.deprecated ?? !1
57
57
  }]),
58
- onClick: m
58
+ onClick: h
59
59
  }, [
60
- e.hasChildren ? (a(), d("p", T, [
61
- p(u(E), {
60
+ e.hasChildren ? (a(), d("p", L, [
61
+ c(u(A), {
62
+ "aria-expanded": e.open,
62
63
  class: "toggle-nested-icon",
63
64
  icon: e.open ? "ChevronDown" : "ChevronRight",
64
- label: "Toggle group",
65
+ label: `${e.open ? "Collapse" : "Expand"} ${e.item.title}`,
65
66
  size: "xs",
66
- onClick: V(m, ["stop"])
67
- }, null, 8, ["icon"]),
67
+ onClick: V(h, ["stop"])
68
+ }, null, 8, ["aria-expanded", "icon", "label"]),
68
69
  i[0] || (i[0] = f("   "))
69
70
  ])) : s("", !0),
70
- h("a", {
71
+ p("a", {
71
72
  class: "sidebar-heading-link",
72
73
  href: y(),
73
74
  onClick: S
74
75
  }, [
75
- (n = (o = e.item) == null ? void 0 : o.icon) != null && n.src ? (a(), N(u(I), {
76
+ (n = (o = e.item) == null ? void 0 : o.icon) != null && n.src ? (a(), E(u(I), {
76
77
  key: 0,
77
78
  class: "sidebar-icon",
78
79
  icon: e.item.icon.src
79
80
  }, null, 8, ["icon"])) : s("", !0),
80
- h("p", z, A(e.item.title), 1),
81
- e.item.httpVerb && !e.hasChildren ? (a(), d("p", P, [
81
+ p("p", U, N(e.item.title), 1),
82
+ e.item.httpVerb && !e.hasChildren ? (a(), d("p", z, [
82
83
  i[1] || (i[1] = f("   ")),
83
- p(O, {
84
+ i[2] || (i[2] = p("span", { class: "sr-only" }, "HTTP Method: ", -1)),
85
+ c(O, {
84
86
  active: e.isActive,
85
87
  method: e.item.httpVerb
86
88
  }, null, 8, ["active", "method"])
87
89
  ])) : s("", !0)
88
- ], 8, U)
90
+ ], 8, P)
89
91
  ], 2),
90
- e.open ? g(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
91
- e.$slots["action-menu"] ? (a(), d("div", j, [
92
- g(e.$slots, "action-menu", {}, void 0, !0)
92
+ e.open ? v(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
93
+ e.$slots["action-menu"] ? (a(), d("div", H, [
94
+ v(e.$slots, "action-menu", {}, void 0, !0)
93
95
  ])) : s("", !0)
94
- ], 8, L);
96
+ ], 8, D);
95
97
  };
96
98
  }
97
99
  });
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiDocument.vue.d.ts","sourceRoot":"","sources":["../../../src/embeds/OpenApiDocument/OpenApiDocument.vue"],"names":[],"mappings":"AA8HA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,wBAAwB,CAAA;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAUpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MA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C9B,GAAG,GAAG;;mBAdQ;QACb,8BAA8B;QAC9B,aAAa,CAAC,EAAE,4BAA4B,CAAA;QAC5C,8CAA8C;QAC9C,MAAM,EAAE,OAAO,MAAM,CAAC,KAAK,CAAA;QAC3B,4CAA4C;QAC5C,OAAO,EAAE,OAAO,OAAO,CAAC,KAAK,CAAA;QAC7B,wCAAwC;QACxC,YAAY,EAAE,OAAO,YAAY,CAAC,KAAK,CAAA;QACvC;;;WAGG;QACH,UAAU,EAAE,OAAO,UAAU,CAAA;KAC9B,GAAG,GAAG;EAiGR;AACD,QAAA,MAAM,eAAe;oBAzJH,4BAA4B;;oBAA5B,4BAA4B;iGA+J5C,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,12 +1,12 @@
1
- import type { Spec, SpecConfiguration } from '@scalar/types/legacy';
1
+ import type { ReferenceConfiguration, Spec, SpecConfiguration } from '@scalar/types/legacy';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  proxyUrl?: string;
4
- preferredSecurityScheme?: string | null;
4
+ authentication?: ReferenceConfiguration["authentication"];
5
5
  spec?: SpecConfiguration;
6
6
  servers?: Spec["servers"];
7
7
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
8
8
  proxyUrl?: string;
9
- preferredSecurityScheme?: string | null;
9
+ authentication?: ReferenceConfiguration["authentication"];
10
10
  spec?: SpecConfiguration;
11
11
  servers?: Spec["servers"];
12
12
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EACV,sBAAsB,EACtB,IAAI,EACJ,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;;eAQhB,MAAM;qBACA,sBAAsB,CAAC,gBAAgB,CAAC;WAClD,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;eAHd,MAAM;qBACA,sBAAsB,CAAC,gBAAgB,CAAC;WAClD,iBAAiB;cACd,IAAI,CAAC,SAAS,CAAC;;AAmF3B,wBAMG"}
@@ -0,0 +1,49 @@
1
+ import { defineComponent as v, ref as f, onMounted as m, watch as i, onBeforeUnmount as d, openBlock as _, createElementBlock as S } from "vue";
2
+ import { useApiClient as x } from "./useApiClient.js";
3
+ import { useServerStore as U } from "../../legacy/stores/useServerStore.js";
4
+ import { getUrlFromServerState as h } from "../../legacy/helpers/getUrlFromServerState.js";
5
+ const A = /* @__PURE__ */ v({
6
+ __name: "ApiClientModal",
7
+ props: {
8
+ proxyUrl: {},
9
+ authentication: {},
10
+ spec: {},
11
+ servers: {}
12
+ },
13
+ setup(a) {
14
+ const t = a, o = f(null), { server: s, setServer: c } = U(), { client: n, init: p } = x();
15
+ return m(async () => {
16
+ if (!o.value) return;
17
+ (await p({
18
+ el: o.value,
19
+ spec: t.spec ?? {},
20
+ authentication: t.authentication,
21
+ proxyUrl: t.proxyUrl,
22
+ servers: t.servers
23
+ })).onUpdateServer((r) => {
24
+ if (!s.servers) return;
25
+ const l = s.servers.findIndex((u) => u.url === r);
26
+ l >= 0 && c({ selectedServer: l });
27
+ });
28
+ }), i(s, (e) => {
29
+ const r = h(e);
30
+ r && n.value && n.value.updateServer(r);
31
+ }), i(
32
+ () => t.spec,
33
+ (e) => {
34
+ var r;
35
+ return e && ((r = n.value) == null ? void 0 : r.updateSpec(e));
36
+ },
37
+ { deep: !0 }
38
+ ), d(() => {
39
+ var e;
40
+ return (e = n.value) == null ? void 0 : e.app.unmount();
41
+ }), (e, r) => (_(), S("div", {
42
+ ref_key: "el",
43
+ ref: o
44
+ }, null, 512));
45
+ }
46
+ });
47
+ export {
48
+ A as default
49
+ };
@@ -0,0 +1,3 @@
1
+ export { default as ApiClientModal } from './ApiClientModal.vue.js';
2
+ export * from './useApiClient.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,cAAc,gBAAgB,CAAA"}