@scalar/api-reference 1.28.10 → 1.28.12

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 (46) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/browser/standalone.js +6057 -5999
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  5. package/dist/components/ApiReferenceLayout.vue2.js +12 -12
  6. package/dist/components/Content/Schema/Schema.preview.d.ts +232 -0
  7. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -0
  8. package/dist/components/Content/Schema/Schema.vue.d.ts +2 -0
  9. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  11. package/dist/components/Content/Schema/Schema.vue2.js +82 -57
  12. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
  14. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +9 -7
  15. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  17. package/dist/components/Content/Schema/SchemaProperty.vue2.js +55 -51
  18. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  19. package/dist/components/ShowMoreButton.vue.js +2 -2
  20. package/dist/components/ShowMoreButton.vue2.js +15 -11
  21. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  22. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  23. package/dist/components/Sidebar/Sidebar.vue2.js +55 -55
  24. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  25. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  26. package/dist/components/Sidebar/SidebarElement.vue2.js +53 -53
  27. package/dist/features/ApiClientModal/useApiClient.d.ts +36 -320
  28. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  29. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  30. package/dist/features/ExampleRequest/ExampleRequest.vue.js +4 -4
  31. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +76 -76
  32. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  33. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  34. package/dist/features/Operation/components/RequestBody.vue2.js +65 -28
  35. package/dist/features/Search/useSearchIndex.js +72 -72
  36. package/dist/hooks/useMultipleDocuments.d.ts +8 -2
  37. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  38. package/dist/hooks/useMultipleDocuments.js +49 -48
  39. package/dist/hooks/useNavState.d.ts +6 -4
  40. package/dist/hooks/useNavState.d.ts.map +1 -1
  41. package/dist/hooks/useNavState.js +34 -37
  42. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  43. package/dist/hooks/useReactiveSpec.js +36 -36
  44. package/dist/index.js +1 -1
  45. package/dist/style.css +1 -1
  46. package/package.json +14 -13
@@ -1,4 +1,4 @@
1
- import { defineComponent as S, ref as A, openBlock as a, createElementBlock as c, createBlock as n, unref as i, withCtx as l, createVNode as d, createElementVNode as m, toDisplayString as f, Fragment as y, renderList as v, normalizeClass as T, createTextVNode as q } from "vue";
1
+ import { defineComponent as S, ref as A, openBlock as a, createElementBlock as c, createBlock as i, unref as n, withCtx as l, createVNode as d, createElementVNode as m, toDisplayString as f, Fragment as y, renderList as v, normalizeClass as T, createTextVNode as q } from "vue";
2
2
  import { TabGroup as B, TabList as N, Tab as V, TabPanel as j } from "@headlessui/vue";
3
3
  import { cva as w, cx as H } from "@scalar/components";
4
4
  import { stringify as b } from "flatted";
@@ -44,6 +44,8 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
44
44
  }, O = (e) => {
45
45
  if (!e)
46
46
  return null;
47
+ if (e.name)
48
+ return e.name;
47
49
  if (s.schemas && typeof s.schemas == "object") {
48
50
  for (const [o, r] of Object.entries(s.schemas))
49
51
  if (b(r) === b(e))
@@ -53,17 +55,17 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
53
55
  return null;
54
56
  }, C = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (o) => o.toUpperCase()).toLowerCase().replace(/^(\w)/, (o) => o.toUpperCase());
55
57
  return (e, o) => (a(), c("div", L, [
56
- e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (a(), n(i(B), { key: 0 }, {
58
+ e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (a(), i(n(B), { key: 0 }, {
57
59
  default: l(() => [
58
- d(i(N), { class: "discriminator-tab-list py-1.25 flex items-center gap-2 rounded-t-lg border border-b-0 px-2 pr-3" }, {
60
+ d(n(N), { class: "discriminator-tab-list py-1.25 flex items-center gap-2 rounded-t-lg border border-b-0 px-2 pr-3" }, {
59
61
  default: l(() => [
60
62
  m("span", null, f(C(e.discriminator)), 1),
61
63
  m("div", z, [
62
- (a(!0), c(y, null, v(e.value[e.discriminator], (r, t) => (a(), n(i(V), {
64
+ (a(!0), c(y, null, v(e.value[e.discriminator], (r, t) => (a(), i(n(V), {
63
65
  key: t,
64
66
  class: T([
65
67
  "cursor-pointer",
66
- i(H)(i(k)({ selected: p.value === t }))
68
+ n(H)(n(k)({ selected: p.value === t }))
67
69
  ]),
68
70
  onClick: (D) => p.value = t
69
71
  }, {
@@ -76,7 +78,7 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
76
78
  ]),
77
79
  _: 1
78
80
  }),
79
- (a(!0), c(y, null, v(e.value[e.discriminator], (r, t) => (a(), n(i(j), {
81
+ (a(!0), c(y, null, v(e.value[e.discriminator], (r, t) => (a(), i(n(j), {
80
82
  key: t,
81
83
  class: "discriminator-panel"
82
84
  }, {
@@ -93,7 +95,7 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
93
95
  }, 1024))), 128))
94
96
  ]),
95
97
  _: 1
96
- })) : (a(), n(g, {
98
+ })) : (a(), i(g, {
97
99
  key: 1,
98
100
  compact: e.compact,
99
101
  level: e.level,
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAieA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAc9E;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAic1B,0BAQG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAmgBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAc9E;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AA4c1B,0BAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaProperty.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3431ec35"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-eab09a54"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as $, computed as u, openBlock as r, createElementBlock as o, normalizeClass as z, createBlock as v, createSlots as G, withCtx as y, createTextVNode as B, toDisplayString as d, createCommentVNode as l, createVNode as s, unref as a, Fragment as c, renderList as k, createElementVNode as S } from "vue";
1
+ import { defineComponent as $, computed as u, openBlock as r, createElementBlock as i, normalizeClass as z, createBlock as b, createSlots as G, withCtx as y, createTextVNode as S, toDisplayString as d, createCommentVNode as l, createVNode as s, unref as a, Fragment as c, renderList as k, createElementVNode as f } from "vue";
2
2
  import { Disclosure as J, DisclosurePanel as K, DisclosureButton as Q } from "@headlessui/vue";
3
3
  import { ScalarMarkdown as D, ScalarIcon as W } from "@scalar/components";
4
4
  import { optimizeValueForDisplay as X, discriminators as I } from "./helpers/optimizeValueForDisplay.js";
@@ -17,16 +17,16 @@ const x = {
17
17
  }, ne = {
18
18
  key: 0,
19
19
  class: "property-list"
20
- }, re = { class: "property-heading" }, ie = { class: "property-name" }, oe = { class: "property-description" }, le = {
20
+ }, re = { class: "property-heading" }, oe = { class: "property-name" }, ie = { class: "property-description" }, le = {
21
21
  key: 1,
22
22
  class: "property-enum-values"
23
- }, se = {
23
+ }, se = { class: "property-enum-value-label" }, ae = { class: "property-enum-value-label" }, pe = {
24
24
  key: 4,
25
25
  class: "children"
26
- }, ae = {
26
+ }, de = {
27
27
  key: 0,
28
28
  class: "children"
29
- }, he = /* @__PURE__ */ $({
29
+ }, ve = /* @__PURE__ */ $({
30
30
  __name: "SchemaProperty",
31
31
  props: {
32
32
  value: {},
@@ -55,27 +55,27 @@ const x = {
55
55
  byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
56
56
  binary: "binary data, used to describe files"
57
57
  }
58
- }, b = (e, n) => n != null && n.properties || n != null && n.additionalProperties || n != null && n.patternProperties || n != null && n.allOf ? null : e || (n == null ? void 0 : n.description) || null, E = (e) => !e || !H[e.type] ? null : H[e.type][e.format || "_default"], p = (e) => {
58
+ }, B = (e, n) => n != null && n.properties || n != null && n.additionalProperties || n != null && n.patternProperties || n != null && n.allOf ? null : e || (n == null ? void 0 : n.description) || null, E = (e) => !e || !H[e.type] ? null : H[e.type][e.format || "_default"], p = (e) => {
59
59
  var n;
60
60
  return (e == null ? void 0 : e.enum) || ((n = e == null ? void 0 : e.items) == null ? void 0 : n.enum) || [];
61
- }, P = u(
61
+ }, _ = u(
62
62
  () => p(t.value).length > 9
63
- ), w = u(() => P.value ? 5 : 9), U = u(
64
- () => p(t.value).slice(0, w.value)
63
+ ), P = u(() => _.value ? 5 : 9), U = u(
64
+ () => p(t.value).slice(0, P.value)
65
65
  ), Z = u(
66
- () => p(t.value).slice(w.value)
66
+ () => p(t.value).slice(P.value)
67
67
  ), t = u(() => X(T.value));
68
68
  I.find((e) => !t.value || typeof t.value != "object" ? !1 : e in t.value || t.value.items && typeof t.value.items == "object" && e in t.value.items);
69
- const M = (e, n, f, h, g) => n || f || h || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || g;
69
+ const M = (e, n, h, g, v) => n || h || g || (e == null ? void 0 : e.deprecated) || (e == null ? void 0 : e.const) || (e == null ? void 0 : e.enum) && e.enum.length === 1 || (e == null ? void 0 : e.type) || (e == null ? void 0 : e.nullable) === !0 || (e == null ? void 0 : e.writeOnly) || (e == null ? void 0 : e.readOnly) || v;
70
70
  return (e, n) => {
71
- var f, h, g, C, j, q, A, F, N, V;
72
- return r(), o("li", {
71
+ var h, g, v, w, C, j, q, A, F, N;
72
+ return r(), i("li", {
73
73
  class: z(["property", [
74
- (b(e.description, t.value), ""),
74
+ (B(e.description, t.value), ""),
75
75
  `property--level-${e.level}`,
76
76
  {
77
77
  "property--compact": e.compact,
78
- "property--deprecated": (f = t.value) == null ? void 0 : f.deprecated
78
+ "property--deprecated": (h = t.value) == null ? void 0 : h.deprecated
79
79
  }
80
80
  ]])
81
81
  }, [
@@ -85,7 +85,7 @@ const x = {
85
85
  e.additional,
86
86
  e.pattern,
87
87
  e.required
88
- ) ? (r(), v(Y, {
88
+ ) ? (r(), b(Y, {
89
89
  key: 0,
90
90
  additional: e.additional,
91
91
  enum: p(t.value).length > 0,
@@ -96,66 +96,70 @@ const x = {
96
96
  e.name ? {
97
97
  name: "name",
98
98
  fn: y(() => [
99
- B(d(e.name), 1)
99
+ S(d(e.name), 1)
100
100
  ]),
101
101
  key: "0"
102
102
  } : void 0,
103
- (h = t.value) != null && h.example ? {
103
+ (g = t.value) != null && g.example ? {
104
104
  name: "example",
105
105
  fn: y(() => [
106
- B(" Example: " + d(t.value.example), 1)
106
+ S(" Example: " + d(t.value.example), 1)
107
107
  ]),
108
108
  key: "1"
109
109
  } : void 0
110
110
  ]), 1032, ["additional", "enum", "pattern", "required", "value"])) : l("", !0),
111
- b(e.description, t.value) ? (r(), o("div", x, [
111
+ B(e.description, t.value) ? (r(), i("div", x, [
112
112
  s(a(D), {
113
- value: b(e.description, t.value)
113
+ value: B(e.description, t.value)
114
114
  }, null, 8, ["value"])
115
- ])) : E(t.value) ? (r(), o("div", ee, [
115
+ ])) : E(t.value) ? (r(), i("div", ee, [
116
116
  s(a(D), {
117
117
  value: E(t.value) || ""
118
118
  }, null, 8, ["value"])
119
119
  ])) : l("", !0),
120
- ((g = p(t.value)) == null ? void 0 : g.length) > 0 ? (r(), o("div", te, [
121
- Array.isArray((C = t.value) == null ? void 0 : C["x-enumDescriptions"]) ? (r(), o("div", ne, [
122
- (r(!0), o(c, null, k(p(t.value), (i) => (r(), o("div", {
123
- key: i,
120
+ ((v = p(t.value)) == null ? void 0 : v.length) > 0 ? (r(), i("div", te, [
121
+ Array.isArray((w = t.value) == null ? void 0 : w["x-enumDescriptions"]) ? (r(), i("div", ne, [
122
+ (r(!0), i(c, null, k(p(t.value), (o) => (r(), i("div", {
123
+ key: o,
124
124
  class: "property"
125
125
  }, [
126
- S("div", re, [
127
- S("div", ie, d(i), 1)
126
+ f("div", re, [
127
+ f("div", oe, d(o), 1)
128
128
  ]),
129
- S("div", oe, [
129
+ f("div", ie, [
130
130
  s(a(D), {
131
- value: t.value["x-enumDescriptions"][i]
131
+ value: t.value["x-enumDescriptions"][o]
132
132
  }, null, 8, ["value"])
133
133
  ])
134
134
  ]))), 128))
135
- ])) : (r(), o("ul", le, [
136
- (r(!0), o(c, null, k(U.value, (i) => (r(), o("li", {
137
- key: i,
135
+ ])) : (r(), i("ul", le, [
136
+ (r(!0), i(c, null, k(U.value, (o) => (r(), i("li", {
137
+ key: o,
138
138
  class: "property-enum-value"
139
- }, d(i), 1))), 128)),
140
- P.value ? (r(), v(a(J), { key: 0 }, {
141
- default: y(({ open: i }) => [
139
+ }, [
140
+ f("span", se, d(o), 1)
141
+ ]))), 128)),
142
+ _.value ? (r(), b(a(J), { key: 0 }, {
143
+ default: y(({ open: o }) => [
142
144
  s(a(K), null, {
143
145
  default: y(() => [
144
- (r(!0), o(c, null, k(Z.value, (m) => (r(), o("li", {
146
+ (r(!0), i(c, null, k(Z.value, (m) => (r(), i("li", {
145
147
  key: m,
146
148
  class: "property-enum-value"
147
- }, d(m), 1))), 128))
149
+ }, [
150
+ f("span", ae, d(m), 1)
151
+ ]))), 128))
148
152
  ]),
149
153
  _: 1
150
154
  }),
151
155
  s(a(Q), { class: "enum-toggle-button" }, {
152
156
  default: y(() => [
153
157
  s(a(W), {
154
- class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": i }]),
158
+ class: z(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": o }]),
155
159
  icon: "Add",
156
160
  size: "sm"
157
161
  }, null, 8, ["class"]),
158
- B(" " + d(i ? "Hide values" : "Show all values"), 1)
162
+ S(" " + d(o ? "Hide values" : "Show all values"), 1)
159
163
  ]),
160
164
  _: 2
161
165
  }, 1024)
@@ -164,15 +168,15 @@ const x = {
164
168
  })) : l("", !0)
165
169
  ]))
166
170
  ])) : l("", !0),
167
- ((j = t.value) == null ? void 0 : j.type) === "object" && ((q = t.value) != null && q.properties || (A = t.value) != null && A.additionalProperties) ? (r(), o("div", se, [
171
+ ((C = t.value) == null ? void 0 : C.type) === "object" && ((j = t.value) != null && j.properties || (q = t.value) != null && q.additionalProperties) ? (r(), i("div", pe, [
168
172
  s(L, {
169
173
  compact: e.compact,
170
174
  level: e.level + 1,
171
175
  value: t.value
172
176
  }, null, 8, ["compact", "level", "value"])
173
177
  ])) : l("", !0),
174
- (F = t.value) != null && F.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (r(), o(c, { key: 5 }, [
175
- ["object"].includes((V = (N = t.value) == null ? void 0 : N.items) == null ? void 0 : V.type) ? (r(), o("div", ae, [
178
+ (A = t.value) != null && A.items && typeof t.value.items == "object" && "type" in t.value.items && typeof t.value.items.type == "string" ? (r(), i(c, { key: 5 }, [
179
+ ["object"].includes((N = (F = t.value) == null ? void 0 : F.items) == null ? void 0 : N.type) ? (r(), i("div", de, [
176
180
  s(L, {
177
181
  compact: e.compact,
178
182
  level: e.level + 1,
@@ -180,21 +184,21 @@ const x = {
180
184
  }, null, 8, ["compact", "level", "value"])
181
185
  ])) : l("", !0)
182
186
  ], 64)) : l("", !0),
183
- (r(!0), o(c, null, k(a(I), (i) => {
184
- var m, _;
185
- return r(), o(c, { key: i }, [
186
- (m = t.value) != null && m[i] ? (r(), v(O, {
187
+ (r(!0), i(c, null, k(a(I), (o) => {
188
+ var m, V;
189
+ return r(), i(c, { key: o }, [
190
+ (m = t.value) != null && m[o] ? (r(), b(O, {
187
191
  key: 0,
188
192
  compact: e.compact,
189
- discriminator: i,
193
+ discriminator: o,
190
194
  hideHeading: e.hideHeading,
191
195
  level: e.level,
192
196
  schemas: e.schemas,
193
197
  value: t.value
194
- }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : (_ = t.value) != null && _.items && typeof i == "string" && typeof t.value.items == "object" && i in t.value.items && Array.isArray(t.value.items[i]) && e.level < 3 ? (r(), v(O, {
198
+ }, null, 8, ["compact", "discriminator", "hideHeading", "level", "schemas", "value"])) : (V = t.value) != null && V.items && typeof o == "string" && typeof t.value.items == "object" && o in t.value.items && Array.isArray(t.value.items[o]) && e.level < 3 ? (r(), b(O, {
195
199
  key: 1,
196
200
  compact: e.compact,
197
- discriminator: i,
201
+ discriminator: o,
198
202
  hideHeading: e.hideHeading,
199
203
  level: e.level,
200
204
  schemas: e.schemas,
@@ -207,5 +211,5 @@ const x = {
207
211
  }
208
212
  });
209
213
  export {
210
- he as default
214
+ ve as default
211
215
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":"AAoEA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAC;;AA0EF,wBAOG"}
1
+ {"version":3,"file":"ShowMoreButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShowMoreButton.vue"],"names":[],"mappings":"AA8EA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAC;;AA+EF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ShowMoreButton.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-916afedd"]]);
4
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d3b738d8"]]);
5
5
  export {
6
- f as default
6
+ _ as default
7
7
  };
@@ -1,20 +1,24 @@
1
- import { defineComponent as n, openBlock as s, createElementBlock as m, unref as e, createTextVNode as p, createVNode as i } from "vue";
2
- import { ScalarIcon as a } from "@scalar/components";
3
- import { useSidebar as l } from "../hooks/useSidebar.js";
4
- const S = /* @__PURE__ */ n({
1
+ import { defineComponent as i, openBlock as s, createElementBlock as a, createTextVNode as m, createVNode as l, unref as u } from "vue";
2
+ import { ScalarIcon as d } from "@scalar/components";
3
+ import { useConfig as f } from "../hooks/useConfig.js";
4
+ import { useSidebar as p } from "../hooks/useSidebar.js";
5
+ const b = /* @__PURE__ */ i({
5
6
  __name: "ShowMoreButton",
6
7
  props: {
7
8
  id: {}
8
9
  },
9
- setup(u) {
10
- const { setCollapsedSidebarItem: t } = l();
11
- return (r, o) => (s(), m("button", {
10
+ setup(t) {
11
+ const { setCollapsedSidebarItem: n } = p(), r = f(), c = () => {
12
+ var e, o;
13
+ n(t.id, !0), (o = (e = r.value).onShowMore) == null || o.call(e, t.id);
14
+ };
15
+ return (e, o) => (s(), a("button", {
12
16
  class: "show-more",
13
17
  type: "button",
14
- onClick: o[0] || (o[0] = (c) => e(t)(r.id, !0))
18
+ onClick: c
15
19
  }, [
16
- o[1] || (o[1] = p(" Show More ")),
17
- i(e(a), {
20
+ o[0] || (o[0] = m(" Show More ")),
21
+ l(u(d), {
18
22
  class: "show-more-icon",
19
23
  icon: "ChevronDown"
20
24
  })
@@ -22,5 +26,5 @@ const S = /* @__PURE__ */ n({
22
26
  }
23
27
  });
24
28
  export {
25
- S as default
29
+ b as default
26
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AAmQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAMxE,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,IAAI,CAAA;CACjB,GAAG,YAAY,CAAC;AA+FnB,iBAAS,cAAc;WA4NT,OAAO,IAA6B;;iCAVb,GAAG;+BACJ,GAAG;;;;;;EActC;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,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":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AAwQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAIhD,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAMxE,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,IAAI,CAAA;CACjB,GAAG,YAAY,CAAC;AAoGnB,iBAAS,cAAc;WA4NT,OAAO,IAA6B;;iCAVb,GAAG;+BACJ,GAAG;;;;;;EActC;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,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,7 +1,7 @@
1
1
  import o from "./Sidebar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1c7b654c"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-093edd11"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as F, ref as E, watch as I, onMounted as N, onUnmounted as L, openBlock as r, createElementBlock as d, renderSlot as w, createElementVNode as V, createVNode as G, withCtx as h, Fragment as o, renderList as y, unref as n, toDisplayString as M, createBlock as f, createCommentVNode as v } from "vue";
2
- import S from "./SidebarElement.vue.js";
1
+ import { defineComponent as F, ref as E, watch as I, onMounted as N, onUnmounted as L, openBlock as r, createElementBlock as d, renderSlot as w, createElementVNode as V, createVNode as G, withCtx as v, Fragment as o, renderList as y, unref as n, toDisplayString as M, createBlock as f, createCommentVNode as h } from "vue";
2
+ import m from "./SidebarElement.vue.js";
3
3
  import g from "./SidebarGroup.vue.js";
4
4
  import { useNavState as D } from "../../hooks/useNavState.js";
5
5
  import { useSidebar as H } from "../../hooks/useSidebar.js";
@@ -12,28 +12,28 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
12
12
  operationsSorter: { type: [String, Function] }
13
13
  },
14
14
  setup(A) {
15
- const m = A, { hash: p, isIntersectionEnabled: $ } = D(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: _ } = H(
15
+ const S = A, { hash: c, isIntersectionEnabled: $ } = D(), { items: O, toggleCollapsedSidebarItem: T, collapsedSidebarItems: _ } = H(
16
16
  {
17
- parsedSpec: m.parsedSpec,
18
- tagsSorter: m.tagsSorter,
19
- operationsSorter: m.operationsSorter
17
+ parsedSpec: S.parsedSpec,
18
+ tagsSorter: S.tagsSorter,
19
+ operationsSorter: S.operationsSorter
20
20
  }
21
- ), b = E(null), u = E(!0);
22
- I(p, (l) => {
23
- !$.value || u.value || typeof window > "u" || k(l);
21
+ ), b = E(null), p = E(!0);
22
+ I(c, (s) => {
23
+ !$.value || p.value || typeof window > "u" || k(s);
24
24
  });
25
- const k = (l) => {
26
- var e, t, s, a;
27
- const i = document.getElementById(`sidebar-${l}`);
25
+ const k = (s) => {
26
+ var e, t, l, a;
27
+ const i = document.getElementById(`sidebar-${s}`);
28
28
  if (!i || !b.value)
29
29
  return;
30
- let c = q;
31
- i.getAttribute("data-sidebar-type") === "heading" ? c += i.offsetTop + ((e = i.getElementsByClassName("sidebar-heading")) == null ? void 0 : e[0]).offsetHeight : c += i.offsetTop + (((t = i.parentElement) == null ? void 0 : t.offsetTop) ?? 0) + (((a = (s = i.parentElement) == null ? void 0 : s.parentElement) == null ? void 0 : a.offsetTop) ?? 0), b.value.scrollTo({ top: c, behavior: "smooth" });
32
- }, B = (l) => {
30
+ let u = q;
31
+ i.getAttribute("data-sidebar-type") === "heading" ? u += i.offsetTop + ((e = i.getElementsByClassName("sidebar-heading")) == null ? void 0 : e[0]).offsetHeight : u += i.offsetTop + (((t = i.parentElement) == null ? void 0 : t.offsetTop) ?? 0) + (((a = (l = i.parentElement) == null ? void 0 : l.parentElement) == null ? void 0 : a.offsetTop) ?? 0), b.value.scrollTo({ top: u, behavior: "smooth" });
32
+ }, B = (s) => {
33
33
  if (!b.value)
34
34
  return;
35
- const i = new MutationObserver((c, e) => {
36
- document.getElementById(`sidebar-${l}`) && (k(l), u.value = !1, e.disconnect());
35
+ const i = new MutationObserver((u, e) => {
36
+ document.getElementById(`sidebar-${s}`) && (k(s), p.value = !1, e.disconnect());
37
37
  });
38
38
  return i.observe(b.value, {
39
39
  childList: !0,
@@ -41,33 +41,33 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
41
41
  }), i;
42
42
  };
43
43
  return N(() => {
44
- const l = B(p.value);
45
- L(() => {
46
- l == null || l.disconnect();
44
+ const s = B(c.value);
45
+ c.value || setTimeout(() => p.value = !1, 300), L(() => {
46
+ s == null || s.disconnect();
47
47
  });
48
- }), (l, i) => {
49
- var c;
48
+ }), (s, i) => {
49
+ var u;
50
50
  return r(), d("div", R, [
51
- w(l.$slots, "sidebar-start", {}, void 0, !0),
51
+ w(s.$slots, "sidebar-start", {}, void 0, !0),
52
52
  V("nav", {
53
53
  ref_key: "scrollerEl",
54
54
  ref: b,
55
- "aria-label": `Table of contents for ${(c = l.parsedSpec.info) == null ? void 0 : c.title}`,
55
+ "aria-label": `Table of contents for ${(u = s.parsedSpec.info) == null ? void 0 : u.title}`,
56
56
  class: "sidebar-pages custom-scroll custom-scroll-self-contain-overflow"
57
57
  }, [
58
58
  G(g, { level: 0 }, {
59
- default: h(() => [
59
+ default: v(() => [
60
60
  (r(!0), d(o, null, y(n(O).entries, (e) => (r(), d(o, {
61
61
  key: e.id
62
62
  }, [
63
63
  e.isGroup ? (r(), d(o, { key: 0 }, [
64
64
  V("li", j, M(e.displayTitle ?? e.title), 1),
65
- (r(!0), d(o, null, y(e.children, (t) => (r(), f(S, {
65
+ (r(!0), d(o, null, y(e.children, (t) => (r(), f(m, {
66
66
  key: t.id,
67
67
  id: `sidebar-${t.id}`,
68
68
  "data-sidebar-type": "heading",
69
69
  hasChildren: t.children && t.children.length > 0,
70
- isActive: n(p) === t.id,
70
+ isActive: n(c) === t.id,
71
71
  item: {
72
72
  id: t.id,
73
73
  title: t.displayTitle ?? t.title,
@@ -77,24 +77,24 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
77
77
  },
78
78
  open: n(_)[t.id] ?? !1,
79
79
  onToggleOpen: async () => {
80
- u.value = !0, n(T)(t.id), await n(C)(100), u.value = !1;
80
+ p.value = !0, n(T)(t.id), await n(C)(100), p.value = !1;
81
81
  }
82
82
  }, {
83
- default: h(() => {
84
- var s;
83
+ default: v(() => {
84
+ var l;
85
85
  return [
86
- t.children && ((s = t.children) == null ? void 0 : s.length) > 0 ? (r(), f(g, {
86
+ t.children && ((l = t.children) == null ? void 0 : l.length) > 0 ? (r(), f(g, {
87
87
  key: 0,
88
88
  level: 1
89
89
  }, {
90
- default: h(() => [
90
+ default: v(() => [
91
91
  (r(!0), d(o, null, y(t.children, (a) => (r(), d(o, {
92
92
  key: a.id
93
93
  }, [
94
- e.show ? (r(), f(S, {
94
+ e.show ? (r(), f(m, {
95
95
  key: 0,
96
96
  id: `sidebar-${a.id}`,
97
- isActive: n(p) === a.id,
97
+ isActive: n(c) === a.id,
98
98
  item: {
99
99
  id: a.id,
100
100
  title: a.displayTitle ?? a.title,
@@ -102,22 +102,22 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
102
102
  httpVerb: a.httpVerb,
103
103
  deprecated: a.deprecated ?? !1
104
104
  }
105
- }, null, 8, ["id", "isActive", "item"])) : v("", !0)
105
+ }, null, 8, ["id", "isActive", "item"])) : h("", !0)
106
106
  ], 64))), 128))
107
107
  ]),
108
108
  _: 2
109
- }, 1024)) : v("", !0)
109
+ }, 1024)) : h("", !0)
110
110
  ];
111
111
  }),
112
112
  _: 2
113
113
  }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"]))), 128))
114
114
  ], 64)) : (r(), d(o, { key: 1 }, [
115
- e.show ? (r(), f(S, {
115
+ e.show ? (r(), f(m, {
116
116
  key: 0,
117
117
  id: `sidebar-${e.id}`,
118
118
  "data-sidebar-type": "heading",
119
119
  hasChildren: e.children && e.children.length > 0,
120
- isActive: n(p) === e.id,
120
+ isActive: n(c) === e.id,
121
121
  item: {
122
122
  id: e.id,
123
123
  title: e.displayTitle ?? e.title,
@@ -127,47 +127,47 @@ const R = { class: "sidebar" }, U = ["aria-label"], j = { class: "sidebar-group-
127
127
  },
128
128
  open: n(_)[e.id] ?? !1,
129
129
  onToggleOpen: async () => {
130
- u.value = !0, n(T)(e.id), await n(C)(100), u.value = !1;
130
+ p.value = !0, n(T)(e.id), await n(C)(100), p.value = !1;
131
131
  }
132
132
  }, {
133
- default: h(() => {
133
+ default: v(() => {
134
134
  var t;
135
135
  return [
136
136
  e.children && ((t = e.children) == null ? void 0 : t.length) > 0 ? (r(), f(g, {
137
137
  key: 0,
138
138
  level: 1
139
139
  }, {
140
- default: h(() => [
141
- (r(!0), d(o, null, y(e.children, (s) => (r(), d(o, {
142
- key: s.id
140
+ default: v(() => [
141
+ (r(!0), d(o, null, y(e.children, (l) => (r(), d(o, {
142
+ key: l.id
143
143
  }, [
144
- e.show ? (r(), f(S, {
144
+ e.show ? (r(), f(m, {
145
145
  key: 0,
146
- id: `sidebar-${s.id}`,
147
- isActive: n(p) === s.id,
146
+ id: `sidebar-${l.id}`,
147
+ isActive: n(c) === l.id,
148
148
  item: {
149
- id: s.id,
150
- title: s.displayTitle ?? s.title,
151
- select: s.select,
152
- httpVerb: s.httpVerb,
153
- deprecated: s.deprecated ?? !1
149
+ id: l.id,
150
+ title: l.displayTitle ?? l.title,
151
+ select: l.select,
152
+ httpVerb: l.httpVerb,
153
+ deprecated: l.deprecated ?? !1
154
154
  }
155
- }, null, 8, ["id", "isActive", "item"])) : v("", !0)
155
+ }, null, 8, ["id", "isActive", "item"])) : h("", !0)
156
156
  ], 64))), 128))
157
157
  ]),
158
158
  _: 2
159
- }, 1024)) : v("", !0)
159
+ }, 1024)) : h("", !0)
160
160
  ];
161
161
  }),
162
162
  _: 2
163
- }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"])) : v("", !0)
163
+ }, 1032, ["id", "hasChildren", "isActive", "item", "open", "onToggleOpen"])) : h("", !0)
164
164
  ], 64))
165
165
  ], 64))), 128))
166
166
  ]),
167
167
  _: 1
168
168
  })
169
169
  ], 8, U),
170
- w(l.$slots, "sidebar-end", {}, void 0, !0)
170
+ w(s.$slots, "sidebar-end", {}, void 0, !0)
171
171
  ]);
172
172
  };
173
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AAwWA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE;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,CAAA;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAuEF,iBAAS,cAAc;WAoKT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;4FAQnB,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":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarElement.vue"],"names":[],"mappings":"AA0WA,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE;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,CAAA;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAyEF,iBAAS,cAAc;WAoKT,OAAO,IAA6B;;yBATpB,GAAG;+BACG,GAAG;;;;EAatC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;4FAQnB,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,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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8f90da18"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-efbd2692"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };