@scalar/api-reference 1.25.53 → 1.25.55

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AA+YA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAmP7B,iBAAS,cAAc;oBAyRM,GAAG;oBAEH,GAAG;oBADH,GAAG;oBAEH,GAAG;EAqC/B;AACD,QAAA,MAAM,eAAe;eArhBR,oBAAoB;IAC/B,yDAAyD;eAC9C,OAAO;;eAFP,oBAAoB;IAC/B,yDAAyD;eAC9C,OAAO;iGAyhBlB,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":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleRequest/ExampleRequest.vue"],"names":[],"mappings":"AAmYA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAuO7B,iBAAS,cAAc;oBAyRM,GAAG;oBAEH,GAAG;oBADH,GAAG;oBAEH,GAAG;EAqC/B;AACD,QAAA,MAAM,eAAe;eAzgBR,oBAAoB;IAC/B,yDAAyD;eAC9C,OAAO;;eAFP,oBAAoB;IAC/B,yDAAyD;eAC9C,OAAO;iGA6gBlB,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 "./ExampleRequest.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9d53b153"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cd795a2e"]]);
5
5
  export {
6
- r as default
6
+ p as default
7
7
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as Y, ref as O, useId as D, computed as d, watch as z, inject as G, onServerPrefetch as Q, useSSRContext as W, unref as r, openBlock as m, createBlock as g, withCtx as a, createVNode as l, createElementBlock as K, Fragment as R, createTextVNode as f, toDisplayString as S, createElementVNode as x, renderSlot as y, createCommentVNode as C } from "vue";
1
+ import { defineComponent as Y, ref as O, useId as D, computed as d, watch as z, inject as G, onServerPrefetch as Q, useSSRContext as W, unref as a, openBlock as c, createBlock as g, withCtx as r, createVNode as l, createElementBlock as K, Fragment as R, createTextVNode as f, toDisplayString as S, createElementVNode as x, renderSlot as y, createCommentVNode as C } from "vue";
2
2
  import { ScalarCodeBlock as X } from "@scalar/components";
3
3
  import { createHash as Z, ssrState as ee } from "@scalar/oas-utils/helpers";
4
4
  import { getRequestFromOperation as te } from "@scalar/oas-utils/spec-getters";
5
5
  import { asyncComputed as oe } from "@vueuse/core";
6
6
  import B from "../../components/ScreenReader.vue.js";
7
- import re from "./ExamplePicker.vue.js";
8
- import ae from "./TextSelect.vue.js";
7
+ import ae from "./ExamplePicker.vue.js";
8
+ import re from "./TextSelect.vue.js";
9
9
  /* empty css */
10
10
  import { GLOBAL_SECURITY_SYMBOL as le } from "../../helpers/provideSymbols.js";
11
11
  import N from "../../components/Card/Card.vue.js";
@@ -14,8 +14,8 @@ import T from "../../components/HttpMethod/HttpMethod.vue.js";
14
14
  import j from "../../components/Card/CardContent.vue.js";
15
15
  import { getSecretCredentialsFromAuthentication as ne, getRequestFromAuthentication as ie } from "../../legacy/helpers/getRequestFromAuthentication.js";
16
16
  import ue from "../../components/Card/CardFooter.vue.js";
17
- import { getExampleCode as ce } from "../../helpers/getExampleCode.js";
18
- import { useHttpClientStore as me } from "../../stores/useHttpClientStore.js";
17
+ import { getExampleCode as me } from "../../helpers/getExampleCode.js";
18
+ import { useHttpClientStore as ce } from "../../stores/useHttpClientStore.js";
19
19
  import { useServerStore as pe } from "../../legacy/stores/useServerStore.js";
20
20
  import { useAuthenticationStore as de } from "../../legacy/stores/useAuthenticationStore.js";
21
21
  import { getHarRequest as fe } from "../../helpers/getHarRequest.js";
@@ -30,58 +30,58 @@ const ve = ["id"], he = ["id"], ge = {
30
30
  fallback: { type: Boolean }
31
31
  },
32
32
  setup(F) {
33
- const n = F, k = `components-Content-Operation-Example-Request${Z(
34
- n.operation.path + n.operation.httpVerb + n.operation.operationId
33
+ const i = F, k = `components-Content-Operation-Example-Request${Z(
34
+ i.operation.path + i.operation.httpVerb + i.operation.operationId
35
35
  )}`, E = O(), {
36
- httpClient: i,
36
+ httpClient: u,
37
37
  setHttpClient: w,
38
38
  availableTargets: b,
39
39
  httpTargetTitle: A,
40
40
  httpClientTitle: J
41
- } = me(), { server: U } = pe(), { authentication: q } = de(), v = D(), c = d(() => {
41
+ } = ce(), { server: U } = pe(), { authentication: q } = de(), v = D(), m = d(() => {
42
42
  var t;
43
43
  const e = ["x-custom-examples", "x-codeSamples", "x-code-samples"];
44
44
  for (const o of e)
45
- if ((t = n.operation.information) != null && t[o])
46
- return n.operation.information[o] ?? [];
45
+ if ((t = i.operation.information) != null && t[o])
46
+ return [...i.operation.information[o]];
47
47
  return [];
48
48
  }), s = O(
49
49
  // Default to first custom example
50
- c.value.length ? {
50
+ m.value.length ? {
51
51
  targetKey: "customExamples",
52
52
  clientKey: 0
53
53
  } : (
54
54
  // Otherwise use the globally selected HTTP client
55
55
  {
56
- targetKey: i.targetKey,
57
- clientKey: i.clientKey
56
+ targetKey: u.targetKey,
57
+ clientKey: u.clientKey
58
58
  }
59
59
  )
60
60
  );
61
- z(i, () => {
61
+ z(u, () => {
62
62
  s.value = {
63
- targetKey: i.targetKey,
64
- clientKey: i.clientKey
63
+ targetKey: u.targetKey,
64
+ clientKey: u.clientKey
65
65
  };
66
66
  });
67
67
  const _ = d(
68
68
  () => {
69
- var e, t, o, u;
69
+ var e, t, o, n;
70
70
  return Object.keys(
71
- ((u = (o = (t = (e = n.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : t.content) == null ? void 0 : o["application/json"]) == null ? void 0 : u.examples) ?? {}
71
+ ((n = (o = (t = (e = i.operation.information) == null ? void 0 : e.requestBody) == null ? void 0 : t.content) == null ? void 0 : o["application/json"]) == null ? void 0 : n.examples) ?? {}
72
72
  ).length > 1;
73
73
  }
74
74
  ), h = G(le);
75
75
  async function V() {
76
- var u, p;
76
+ var n, p;
77
77
  if (s.value.targetKey === "customExamples")
78
- return ((u = c.value[s.value.clientKey]) == null ? void 0 : u.source) ?? "";
78
+ return ((n = m.value[s.value.clientKey]) == null ? void 0 : n.source) ?? "";
79
79
  const e = fe(
80
80
  {
81
81
  url: ye(U)
82
82
  },
83
83
  te(
84
- n.operation,
84
+ i.operation,
85
85
  {
86
86
  replaceVariables: !0
87
87
  },
@@ -89,10 +89,10 @@ const ve = ["id"], he = ["id"], ge = {
89
89
  ),
90
90
  ie(
91
91
  q,
92
- ((p = n.operation.information) == null ? void 0 : p.security) ?? (h == null ? void 0 : h())
92
+ ((p = i.operation.information) == null ? void 0 : p.security) ?? (h == null ? void 0 : h())
93
93
  )
94
- ), t = i.clientKey, o = i.targetKey;
95
- return await ce(e, o, t) ?? "";
94
+ ), t = u.clientKey, o = u.targetKey;
95
+ return await me(e, o, t) ?? "";
96
96
  }
97
97
  const $ = oe(async () => {
98
98
  try {
@@ -109,9 +109,9 @@ const ve = ["id"], he = ["id"], ge = {
109
109
  var t, o;
110
110
  const e = (
111
111
  // Specified language
112
- ((t = s.value) == null ? void 0 : t.targetKey) === "customExamples" ? ((o = c.value[s.value.clientKey]) == null ? void 0 : o.lang) ?? "plaintext" : (
112
+ ((t = s.value) == null ? void 0 : t.targetKey) === "customExamples" ? ((o = m.value[s.value.clientKey]) == null ? void 0 : o.lang) ?? "plaintext" : (
113
113
  // Or language for the globally selected HTTP client
114
- i.targetKey
114
+ u.targetKey
115
115
  )
116
116
  );
117
117
  return e === "shell" && $.value.includes("curl") ? "curl" : e === "Objective-C" ? "objc" : e;
@@ -127,10 +127,10 @@ const ve = ["id"], he = ["id"], ge = {
127
127
  label: o.title
128
128
  }))
129
129
  }));
130
- return c.value.length && e.unshift({
130
+ return m.value.length && e.unshift({
131
131
  value: "customExamples",
132
132
  label: "Examples",
133
- options: c.value.map((t, o) => ({
133
+ options: m.value.map((t, o) => ({
134
134
  value: JSON.stringify({
135
135
  targetKey: "customExamples",
136
136
  clientKey: o
@@ -143,48 +143,48 @@ const ve = ["id"], he = ["id"], ge = {
143
143
  const t = JSON.parse(e);
144
144
  t.targetKey === "customExamples" ? s.value = t : w(t);
145
145
  }
146
- return (e, t) => r(b).length || c.value.length ? (m(), g(r(N), {
146
+ return (e, t) => a(b).length || m.value.length ? (c(), g(a(N), {
147
147
  key: 0,
148
148
  class: "dark-mode"
149
149
  }, {
150
- default: a(() => [
151
- l(r(se), { muted: "" }, {
152
- actions: a(() => [
153
- l(ae, {
150
+ default: r(() => [
151
+ l(a(se), { muted: "" }, {
152
+ actions: r(() => [
153
+ l(re, {
154
154
  class: "request-client-picker",
155
- controls: `${r(v)}-example`,
155
+ controls: `${a(v)}-example`,
156
156
  modelValue: JSON.stringify(s.value),
157
157
  options: L.value,
158
158
  "onUpdate:modelValue": P
159
159
  }, {
160
- default: a(() => [
161
- s.value.targetKey === "customExamples" ? (m(), K(R, { key: 0 }, [
160
+ default: r(() => [
161
+ s.value.targetKey === "customExamples" ? (c(), K(R, { key: 0 }, [
162
162
  l(B, null, {
163
- default: a(() => t[1] || (t[1] = [
163
+ default: r(() => t[1] || (t[1] = [
164
164
  f("Selected Example:")
165
165
  ])),
166
166
  _: 1
167
167
  }),
168
- f(" " + S(c.value[s.value.clientKey].label ?? "Example"), 1)
169
- ], 64)) : (m(), K(R, { key: 1 }, [
168
+ f(" " + S(m.value[s.value.clientKey].label ?? "Example"), 1)
169
+ ], 64)) : (c(), K(R, { key: 1 }, [
170
170
  l(B, null, {
171
- default: a(() => t[2] || (t[2] = [
171
+ default: r(() => t[2] || (t[2] = [
172
172
  f("Selected HTTP client:")
173
173
  ])),
174
174
  _: 1
175
175
  }),
176
- f(" " + S(r(A)) + " " + S(r(J)), 1)
176
+ f(" " + S(a(A)) + " " + S(a(J)), 1)
177
177
  ], 64))
178
178
  ]),
179
179
  _: 1
180
180
  }, 8, ["controls", "modelValue", "options"])
181
181
  ]),
182
- default: a(() => [
182
+ default: r(() => [
183
183
  x("div", {
184
- id: `${r(v)}-header`,
184
+ id: `${a(v)}-header`,
185
185
  class: "request-header"
186
186
  }, [
187
- l(r(T), {
187
+ l(a(T), {
188
188
  as: "span",
189
189
  class: "request-method",
190
190
  method: e.operation.httpVerb
@@ -194,20 +194,20 @@ const ve = ["id"], he = ["id"], ge = {
194
194
  ]),
195
195
  _: 3
196
196
  }),
197
- l(r(j), {
197
+ l(a(j), {
198
198
  borderless: "",
199
199
  class: "request-editor-section custom-scroll",
200
200
  frameless: ""
201
201
  }, {
202
- default: a(() => [
202
+ default: r(() => [
203
203
  x("div", {
204
- id: `${r(v)}-example`,
204
+ id: `${a(v)}-example`,
205
205
  class: "code-snippet"
206
206
  }, [
207
- l(r(X), {
207
+ l(a(X), {
208
208
  class: "bg-b-2",
209
- content: r($),
210
- hideCredentials: r(ne)(r(q)),
209
+ content: a($),
210
+ hideCredentials: a(ne)(a(q)),
211
211
  lang: I.value,
212
212
  lineNumbers: ""
213
213
  }, null, 8, ["content", "hideCredentials", "lang"])
@@ -215,18 +215,18 @@ const ve = ["id"], he = ["id"], ge = {
215
215
  ]),
216
216
  _: 1
217
217
  }),
218
- _.value || e.$slots.footer ? (m(), g(r(ue), {
218
+ _.value || e.$slots.footer ? (c(), g(a(ue), {
219
219
  key: 0,
220
220
  class: "request-card-footer",
221
221
  contrast: ""
222
222
  }, {
223
- default: a(() => {
224
- var o, u, p, H;
223
+ default: r(() => {
224
+ var o, n, p, H;
225
225
  return [
226
- _.value ? (m(), K("div", ge, [
227
- l(re, {
226
+ _.value ? (c(), K("div", ge, [
227
+ l(ae, {
228
228
  class: "request-example-selector",
229
- examples: ((H = (p = (u = (o = e.operation.information) == null ? void 0 : o.requestBody) == null ? void 0 : u.content) == null ? void 0 : p["application/json"]) == null ? void 0 : H.examples) ?? [],
229
+ examples: ((H = (p = (n = (o = e.operation.information) == null ? void 0 : o.requestBody) == null ? void 0 : n.content) == null ? void 0 : p["application/json"]) == null ? void 0 : H.examples) ?? [],
230
230
  "onUpdate:modelValue": t[0] || (t[0] = (M) => E.value = M)
231
231
  }, null, 8, ["examples"])
232
232
  ])) : C("", !0),
@@ -237,15 +237,15 @@ const ve = ["id"], he = ["id"], ge = {
237
237
  })) : C("", !0)
238
238
  ]),
239
239
  _: 3
240
- })) : e.fallback ? (m(), g(r(N), {
240
+ })) : e.fallback ? (c(), g(a(N), {
241
241
  key: 1,
242
242
  class: "dark-mode"
243
243
  }, {
244
- default: a(() => [
245
- l(r(j), { class: "request-card-simple" }, {
246
- default: a(() => [
244
+ default: r(() => [
245
+ l(a(j), { class: "request-card-simple" }, {
246
+ default: r(() => [
247
247
  x("div", Ke, [
248
- l(r(T), {
248
+ l(a(T), {
249
249
  as: "span",
250
250
  class: "request-method",
251
251
  method: e.operation.httpVerb
@@ -1 +1 @@
1
- {"version":3,"file":"TextSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleRequest/TextSelect.vue"],"names":[],"mappings":"AA+IA,iBAAS,cAAc;qBA6CM,GAAG;EAiB/B;AACD,QAAA,MAAM,eAAe;gBAxFP,GAAG;aACN;QACP,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE;YACR,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,EAAE,CAAA;KACJ,EAAE;eACQ,MAAM;;;;gBATL,GAAG;aACN;QACP,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE;YACR,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,EAAE,CAAA;KACJ,EAAE;eACQ,MAAM;;;kFAwFjB,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":"TextSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ExampleRequest/TextSelect.vue"],"names":[],"mappings":"AA0JA,iBAAS,cAAc;qBA6CM,GAAG;EAkB/B;AACD,QAAA,MAAM,eAAe;gBA7FP,GAAG;aACN;QACP,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE;YACR,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,EAAE,CAAA;KACJ,EAAE;eACQ,MAAM;;;;gBATL,GAAG;aACN;QACP,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE;YACR,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,EAAE,CAAA;KACJ,EAAE;eACQ,MAAM;;;kFA6FjB,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,5 +1,5 @@
1
- import { defineComponent as p, openBlock as t, createElementBlock as o, normalizeClass as d, createElementVNode as r, renderSlot as m, Fragment as s, renderList as u, toDisplayString as i } from "vue";
2
- const c = { class: "text-select-label" }, v = ["aria-controls", "tabindex", "value"], b = ["label"], _ = ["value"], g = ["value"], y = /* @__PURE__ */ p({
1
+ import { defineComponent as m, computed as v, openBlock as l, createElementBlock as o, normalizeClass as b, createElementVNode as u, renderSlot as _, Fragment as s, renderList as r, toDisplayString as p } from "vue";
2
+ const g = { class: "text-select-label" }, f = ["aria-controls", "tabindex", "value"], k = ["label"], y = ["value"], V = ["value"], S = /* @__PURE__ */ m({
3
3
  __name: "TextSelect",
4
4
  props: {
5
5
  modelValue: {},
@@ -7,39 +7,42 @@ const c = { class: "text-select-label" }, v = ["aria-controls", "tabindex", "val
7
7
  controls: {}
8
8
  },
9
9
  emits: ["update:modelValue"],
10
- setup(k) {
11
- return (l, n) => (t(), o("label", {
12
- class: d(["text-select", l.options.length === 1 ? "text-select--single-option" : ""])
10
+ setup(i) {
11
+ const d = i, c = v(
12
+ () => d.options.flatMap((e) => e.options ?? e).length
13
+ );
14
+ return (e, n) => (l(), o("label", {
15
+ class: b(["text-select", c.value === 1 ? "text-select--single-option" : ""])
13
16
  }, [
14
- r("span", c, [
15
- m(l.$slots, "default")
17
+ u("span", g, [
18
+ _(e.$slots, "default")
16
19
  ]),
17
- r("select", {
18
- "aria-controls": l.controls,
19
- tabindex: l.options.length === 1 ? -1 : 0,
20
- value: l.modelValue,
21
- onInput: n[0] || (n[0] = (e) => l.$emit("update:modelValue", e.target.value))
20
+ u("select", {
21
+ "aria-controls": e.controls,
22
+ tabindex: e.options.length === 1 ? -1 : 0,
23
+ value: e.modelValue,
24
+ onInput: n[0] || (n[0] = (t) => e.$emit("update:modelValue", t.target.value))
22
25
  }, [
23
- (t(!0), o(s, null, u(l.options, (e) => (t(), o(s, {
24
- key: e.value
26
+ (l(!0), o(s, null, r(e.options, (t) => (l(), o(s, {
27
+ key: t.value
25
28
  }, [
26
- e.options ? (t(), o("optgroup", {
29
+ t.options ? (l(), o("optgroup", {
27
30
  key: 0,
28
- label: e.label
31
+ label: t.label
29
32
  }, [
30
- (t(!0), o(s, null, u(e.options, (a) => (t(), o("option", {
33
+ (l(!0), o(s, null, r(t.options, (a) => (l(), o("option", {
31
34
  key: a.value,
32
35
  value: a.value
33
- }, i(a.label), 9, _))), 128))
34
- ], 8, b)) : (t(), o("option", {
35
- key: e.value,
36
- value: e.value
37
- }, i(e.label), 9, g))
36
+ }, p(a.label), 9, y))), 128))
37
+ ], 8, k)) : (l(), o("option", {
38
+ key: t.value,
39
+ value: t.value
40
+ }, p(t.label), 9, V))
38
41
  ], 64))), 128))
39
- ], 40, v)
42
+ ], 40, f)
40
43
  ], 2));
41
44
  }
42
45
  });
43
46
  export {
44
- y as default
47
+ S as default
45
48
  };