@scalar/api-client 2.2.59 → 2.2.61

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 (65) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +88 -80
  5. package/dist/components/IconSelector.vue.d.ts.map +1 -1
  6. package/dist/components/IconSelector.vue.js +1 -0
  7. package/dist/components/SectionFilter.vue.d.ts +23 -0
  8. package/dist/components/SectionFilter.vue.d.ts.map +1 -0
  9. package/dist/components/SectionFilter.vue.js +7 -0
  10. package/dist/components/SectionFilter.vue2.js +67 -0
  11. package/dist/components/SectionFilterButton.vue.d.ts +22 -0
  12. package/dist/components/SectionFilterButton.vue.d.ts.map +1 -0
  13. package/dist/components/SectionFilterButton.vue.js +23 -0
  14. package/dist/components/SectionFilterButton.vue2.js +4 -0
  15. package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
  16. package/dist/components/Server/ServerDropdown.vue.js +1 -0
  17. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  18. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +62 -44
  19. package/dist/layouts/App/create-api-client-app.d.ts +2 -1
  20. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  21. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -2
  22. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  23. package/dist/layouts/Web/create-api-client-web.d.ts +2 -1
  24. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  25. package/dist/libs/create-client.d.ts +3 -1
  26. package/dist/libs/create-client.d.ts.map +1 -1
  27. package/dist/store/events.d.ts +4 -0
  28. package/dist/store/events.d.ts.map +1 -1
  29. package/dist/store/events.js +4 -0
  30. package/dist/store/store.d.ts +1 -0
  31. package/dist/store/store.d.ts.map +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  34. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +10 -10
  35. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  36. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  37. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -83
  38. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  39. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +1 -1
  40. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +2 -0
  41. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +1 -0
  42. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  44. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +36 -36
  45. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  47. package/dist/views/Request/RequestSection/RequestSection.vue2.js +103 -83
  48. package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -1
  49. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  50. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  51. package/dist/views/Request/RequestSidebarItem.vue2.js +81 -81
  52. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
  53. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +9 -9
  54. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  55. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  56. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -21
  57. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  58. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  59. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  60. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +80 -65
  61. package/package.json +14 -14
  62. package/dist/components/ContextBar.vue.d.ts +0 -11
  63. package/dist/components/ContextBar.vue.d.ts.map +0 -1
  64. package/dist/components/ContextBar.vue.js +0 -7
  65. package/dist/components/ContextBar.vue2.js +0 -47
@@ -1 +1 @@
1
- {"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AAOzE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,oDAMhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KACA,aAAa,CAAC,MAAM,CA6CtB,CAAA"}
1
+ {"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AAOzE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,oDAMhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KACA,aAAa,CAAC,MAAM,CA+CtB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { snippetz as a } from "@scalar/snippetz";
2
2
  import { getHarRequest as E } from "./get-har-request.js";
3
- const s = "ws://replace.me", w = (l, t, {
4
- operation: i,
3
+ const s = "ws://replace.me", S = (i, t, {
4
+ operation: l,
5
5
  example: u,
6
6
  server: c,
7
7
  securitySchemes: g = []
@@ -9,7 +9,7 @@ const s = "ws://replace.me", w = (l, t, {
9
9
  var n;
10
10
  try {
11
11
  const r = E({
12
- operation: i,
12
+ operation: l,
13
13
  example: u,
14
14
  server: c,
15
15
  securitySchemes: g
@@ -19,25 +19,25 @@ const s = "ws://replace.me", w = (l, t, {
19
19
  const o = r.url.startsWith("/") ? "" : "/";
20
20
  try {
21
21
  new URL(r.url);
22
- } catch {
23
- r.url = `${s}${o}${r.url}`;
22
+ } catch (e) {
23
+ console.error("[getSnippet] Invalid URL", e), r.url = `${s}${o}${r.url}`;
24
24
  }
25
25
  if (((n = r.postData) == null ? void 0 : n.mimeType) === "application/json")
26
26
  try {
27
27
  JSON.parse(r.postData.text || "{}");
28
- } catch {
29
- return [new Error("Invalid JSON body"), null];
28
+ } catch (e) {
29
+ return console.error("[getSnippet] Invalid JSON body", e), [new Error("Invalid JSON body"), null];
30
30
  }
31
- const p = l.replace("javascript", "js");
31
+ const p = i.replace("javascript", "js");
32
32
  if (a().hasPlugin(p, t)) {
33
33
  const e = a().print(p, t, r);
34
34
  return e ? [null, e.replace(`${s}${o}`, "")] : [new Error("Error generating snippet"), null];
35
35
  }
36
36
  } catch (r) {
37
- return console.error("[getSnippet]", r), [new Error("Error generating snippet"), null];
37
+ return console.error("[getSnippet] Error generating snippet", r), [new Error("Error generating snippet"), null];
38
38
  }
39
39
  return [new Error("No snippet found"), null];
40
40
  };
41
41
  export {
42
- w as getSnippet
42
+ S as getSnippet
43
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAsUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAe1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAmXF,wBAOG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAqVA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAe1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkYF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuth.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fdbdfe77"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8ab24b0b"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as I, useId as L, ref as C, computed as y, openBlock as u, createBlock as N, withCtx as m, createElementVNode as i, unref as r, toDisplayString as g, createElementBlock as h, normalizeClass as j, createCommentVNode as z, createVNode as d, Fragment as k, createTextVNode as x } from "vue";
2
- import { useModal as E, ScalarComboboxMultiselect as K, ScalarButton as W, ScalarIcon as F } from "@scalar/components";
3
- import { isDefined as G } from "@scalar/oas-utils/helpers";
4
- import H from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
- import { useLayout as J } from "../../../../hooks/useLayout.js";
6
- import { useWorkspace as P } from "../../../../store/store.js";
7
- import Q from "./DeleteRequestAuthModal.vue.js";
8
- import X from "./RequestAuthDataTable.vue.js";
9
- import { getSecurityRequirements as Y, formatComplexScheme as Z, formatScheme as _, getSchemeOptions as ee } from "../../libs/auth.js";
10
- const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1" }, fe = /* @__PURE__ */ I({
1
+ import { defineComponent as I, useId as L, ref as D, computed as h, openBlock as m, createBlock as N, withCtx as d, createElementVNode as i, unref as r, toDisplayString as k, createElementBlock as p, normalizeClass as z, createCommentVNode as E, createVNode as f, Fragment as x, createTextVNode as q } from "vue";
2
+ import { useModal as K, ScalarComboboxMultiselect as W, ScalarButton as F, ScalarIcon as G } from "@scalar/components";
3
+ import { isDefined as H } from "@scalar/oas-utils/helpers";
4
+ import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
+ import { useLayout as P } from "../../../../hooks/useLayout.js";
6
+ import { useWorkspace as Q } from "../../../../store/store.js";
7
+ import X from "./DeleteRequestAuthModal.vue.js";
8
+ import Y from "./RequestAuthDataTable.vue.js";
9
+ import { getSecurityRequirements as Z, formatComplexScheme as _, formatScheme as ee, getSchemeOptions as te } from "../../libs/auth.js";
10
+ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1" }, he = /* @__PURE__ */ I({
11
11
  __name: "RequestAuth",
12
12
  props: {
13
13
  collection: {},
@@ -21,123 +21,128 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
21
21
  workspace: {}
22
22
  },
23
23
  setup(s) {
24
- const { layout: p } = J(), {
25
- securitySchemes: v,
26
- securitySchemeMutators: D,
24
+ const { layout: v } = P(), {
25
+ securitySchemes: S,
26
+ securitySchemeMutators: O,
27
27
  requestMutators: w,
28
- collectionMutators: O
29
- } = P(), q = L(), R = C(null), f = E(), S = C(
28
+ collectionMutators: M
29
+ } = Q(), R = L(), C = D(null), y = K(), b = D(
30
30
  null
31
- ), A = y(() => {
32
- const e = Y(s.operation, s.collection);
33
- return { filteredRequirements: e.filter((l) => Object.keys(l).length), requirements: e };
34
- }), b = y(() => {
31
+ ), A = h(() => {
32
+ const e = Z(s.operation, s.collection);
33
+ return { filteredRequirements: e.filter((o) => Object.keys(o).length), requirements: e };
34
+ }), g = h(() => {
35
35
  const { filteredRequirements: e, requirements: t } = A.value;
36
36
  if (!t.length) return null;
37
- const l = e.length < t.length, n = l ? "Unlock" : "Lock", o = l ? "Optional" : "Required", T = `${e.length === 1 ? Object.keys(e[0] || {})[0] : ""} ${o}`;
38
- return { icon: n, text: T };
39
- }), a = y(
37
+ const n = !t.some(
38
+ (u) => Object.keys(u).length > 1
39
+ ) && e.length < t.length, l = n ? "Unlock" : "Lock", c = n ? "Optional" : "Required", j = `${e.length === 1 ? (() => {
40
+ const u = Object.keys(e[0] || {});
41
+ return u.length > 1 ? u.join(" & ") : u[0] || "";
42
+ })() : ""} ${c}`;
43
+ return { icon: l, text: j };
44
+ }), a = h(
40
45
  () => s.selectedSecuritySchemeUids.map((e) => {
41
- if (Array.isArray(e)) return Z(e, v);
42
- const t = v[e ?? ""];
46
+ if (Array.isArray(e)) return _(e, S);
47
+ const t = S[e ?? ""];
43
48
  if (t)
44
- return _(t);
45
- }).filter(G)
49
+ return ee(t);
50
+ }).filter(H)
46
51
  );
47
- function M(e) {
52
+ function U(e) {
48
53
  var n;
49
- const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => {
50
- const c = o.split(",");
51
- return c.length > 1 ? c : o;
54
+ const t = e.find((l) => l.payload), o = e.filter((l) => !l.payload).map(({ id: l }) => {
55
+ const c = l.split(",");
56
+ return c.length > 1 ? c : l;
52
57
  });
53
58
  if (t != null && t.payload) {
54
- const o = D.add(
59
+ const l = O.add(
55
60
  t.payload,
56
61
  (n = s.collection) == null ? void 0 : n.uid
57
62
  );
58
- o && l.push(o.uid);
63
+ l && o.push(l.uid);
59
64
  }
60
- V(l);
65
+ V(o);
61
66
  }
62
67
  const V = (e) => {
63
68
  var t;
64
- p === "modal" || s.layout === "reference" ? O.edit(s.collection.uid, "selectedSecuritySchemeUids", e) : (t = s.operation) != null && t.uid && w.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
69
+ v === "modal" || s.layout === "reference" ? M.edit(s.collection.uid, "selectedSecuritySchemeUids", e) : (t = s.operation) != null && t.uid && w.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
65
70
  };
66
- function U({ id: e, label: t }) {
67
- S.value = { id: e, label: t }, f.show();
71
+ function $({ id: e, label: t }) {
72
+ b.value = { id: e, label: t }, y.show();
68
73
  }
69
- const $ = (e) => {
70
- var l;
74
+ const B = (e) => {
75
+ var o;
71
76
  if (!e) return;
72
77
  const t = s.selectedSecuritySchemeUids.filter((n) => {
73
- const o = e.split(",");
74
- return o.length > 1 && Array.isArray(n) && o.length === n.length ? n.every((c) => !o.includes(c)) : n !== e;
78
+ const l = e.split(",");
79
+ return l.length > 1 && Array.isArray(n) && l.length === n.length ? n.every((c) => !l.includes(c)) : n !== e;
75
80
  });
76
- V(t), (l = R.value) == null || l.$el.focus(), f.hide();
77
- }, B = y(
81
+ V(t), (o = C.value) == null || o.$el.focus(), y.hide();
82
+ }, T = h(
78
83
  () => {
79
84
  var e;
80
- return ee(
85
+ return te(
81
86
  A.value.filteredRequirements,
82
87
  ((e = s.collection) == null ? void 0 : e.securitySchemes) ?? [],
83
- v,
84
- p === "modal" || s.layout === "reference"
88
+ S,
89
+ v === "modal" || s.layout === "reference"
85
90
  );
86
91
  }
87
92
  );
88
- return (e, t) => (u(), N(H, {
93
+ return (e, t) => (m(), N(J, {
89
94
  class: "group/params",
90
95
  itemCount: a.value.length,
91
96
  layout: e.layout
92
97
  }, {
93
- title: m(() => [
98
+ title: d(() => [
94
99
  i("div", {
95
- id: r(q),
100
+ id: r(R),
96
101
  class: "inline-flex items-center gap-1"
97
102
  }, [
98
- i("span", null, g(e.title), 1),
99
- b.value ? (u(), h("span", {
103
+ i("span", null, k(e.title), 1),
104
+ g.value ? (m(), p("span", {
100
105
  key: 0,
101
- class: j(["text-c-3 text-xs leading-[normal]", { "text-c-1": b.value.text === "Required" }])
102
- }, g(b.value.text), 3)) : z("", !0)
103
- ], 8, te)
106
+ class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": g.value.text === "Required" }])
107
+ }, k(g.value.text), 3)) : E("", !0)
108
+ ], 8, le)
104
109
  ]),
105
- actions: m(() => [
106
- i("div", le, [
107
- d(r(K), {
110
+ actions: d(() => [
111
+ i("div", oe, [
112
+ f(r(W), {
108
113
  class: "w-72 text-xs",
109
- isDeletable: r(p) !== "modal" && e.layout !== "reference",
114
+ isDeletable: r(v) !== "modal" && e.layout !== "reference",
110
115
  modelValue: a.value,
111
116
  multiple: "",
112
- options: B.value,
113
- onDelete: U,
114
- "onUpdate:modelValue": M
117
+ options: T.value,
118
+ onDelete: $,
119
+ "onUpdate:modelValue": U
115
120
  }, {
116
- default: m(() => [
117
- d(r(W), {
121
+ default: d(() => [
122
+ f(r(F), {
118
123
  ref_key: "comboboxButtonRef",
119
- ref: R,
120
- "aria-describedby": r(q),
124
+ ref: C,
125
+ "aria-describedby": r(R),
121
126
  class: "py-0.75 hover:bg-b-3 text-c-1 hover:text-c-1 h-auto px-1.5 font-normal",
122
127
  fullWidth: "",
123
128
  variant: "ghost"
124
129
  }, {
125
- default: m(() => {
126
- var l;
130
+ default: d(() => {
131
+ var o;
127
132
  return [
128
- i("div", oe, [
129
- a.value.length === 0 ? (u(), h(k, { key: 0 }, [
133
+ i("div", ne, [
134
+ a.value.length === 0 ? (m(), p(x, { key: 0 }, [
130
135
  t[2] || (t[2] = i("span", { class: "sr-only" }, "Select", -1)),
131
- t[3] || (t[3] = x(" Auth Type "))
132
- ], 64)) : a.value.length === 1 ? (u(), h(k, { key: 1 }, [
136
+ t[3] || (t[3] = q(" Auth Type "))
137
+ ], 64)) : a.value.length === 1 ? (m(), p(x, { key: 1 }, [
133
138
  t[4] || (t[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
134
- x(" " + g((l = a.value[0]) == null ? void 0 : l.label), 1)
135
- ], 64)) : (u(), h(k, { key: 2 }, [
136
- t[5] || (t[5] = x(" Multiple ")),
139
+ q(" " + k((o = a.value[0]) == null ? void 0 : o.label), 1)
140
+ ], 64)) : (m(), p(x, { key: 2 }, [
141
+ t[5] || (t[5] = q(" Multiple ")),
137
142
  t[6] || (t[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
138
143
  ], 64))
139
144
  ]),
140
- d(r(F), {
145
+ f(r(G), {
141
146
  class: "ml-1 shrink-0",
142
147
  icon: "ChevronDown",
143
148
  size: "sm"
@@ -151,8 +156,8 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
151
156
  }, 8, ["isDeletable", "modelValue", "options"])
152
157
  ])
153
158
  ]),
154
- default: m(() => [
155
- d(X, {
159
+ default: d(() => [
160
+ f(Y, {
156
161
  collection: e.collection,
157
162
  envVariables: e.envVariables,
158
163
  environment: e.environment,
@@ -161,13 +166,13 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
161
166
  server: e.server,
162
167
  workspace: e.workspace
163
168
  }, null, 8, ["collection", "envVariables", "environment", "layout", "selectedSchemeOptions", "server", "workspace"]),
164
- d(Q, {
165
- scheme: S.value,
166
- state: r(f),
167
- onClose: t[0] || (t[0] = (l) => r(f).hide()),
168
- onDelete: t[1] || (t[1] = (l) => {
169
+ f(X, {
170
+ scheme: b.value,
171
+ state: r(y),
172
+ onClose: t[0] || (t[0] = (o) => r(y).hide()),
173
+ onDelete: t[1] || (t[1] = (o) => {
169
174
  var n;
170
- return $((n = S.value) == null ? void 0 : n.id);
175
+ return B((n = b.value) == null ? void 0 : n.id);
171
176
  })
172
177
  }, null, 8, ["scheme", "state"])
173
178
  ]),
@@ -176,5 +181,5 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
176
181
  }
177
182
  });
178
183
  export {
179
- fe as default
184
+ he as default
180
185
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuthTab.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2b678dcb"]]);
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-00684fd6"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -51,7 +51,7 @@ const z = {
51
51
  default: l(() => [
52
52
  u(f(R), {
53
53
  class: C([
54
- "text-c-3 flex items-center pl-2 font-medium",
54
+ "text-c-3 flex items-center pl-3 font-medium",
55
55
  t.layout === "reference" && `border-t ${K !== 0 ? "mt-2" : ""}`
56
56
  ])
57
57
  }, {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=RequestCodeExample.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestCodeExample.test.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA0KA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAcxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA2PF,wBAOG"}
1
+ {"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA2KA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAcxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4PF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestCodeExample.vue2.js";
2
2
  /* empty css */
3
3
  import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-81efbf9b"]]);
4
+ const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-cf7ecb78"]]);
5
5
  export {
6
- p as default
6
+ r as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as b, computed as c, openBlock as w, createElementBlock as x, createVNode as n, withCtx as s, createTextVNode as C, createElementVNode as m, unref as r, toDisplayString as S } from "vue";
1
+ import { defineComponent as b, computed as i, openBlock as w, createElementBlock as x, createVNode as n, withCtx as c, createTextVNode as S, createElementVNode as m, unref as r, toDisplayString as C } from "vue";
2
2
  import { ScalarCombobox as k, ScalarButton as $, ScalarIcon as g } from "@scalar/components";
3
3
  import { snippetz as K } from "@scalar/snippetz";
4
4
  import V from "../../../components/DataTable/DataTable.vue.js";
5
- import _ from "../../../components/DataTable/DataTableRow.vue.js";
6
- import H from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
- import { filterSecurityRequirements as j } from "./helpers/filter-security-requirements.js";
8
- import B from "../../Components/CodeSnippet/CodeSnippet.vue.js";
9
- import { useWorkspace as D } from "../../../store/store.js";
10
- const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class: "bg-b-1 flex items-center justify-center overflow-hidden border-t" }, P = /* @__PURE__ */ b({
5
+ import H from "../../../components/DataTable/DataTableRow.vue.js";
6
+ import U from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
+ import { filterSecurityRequirements as _ } from "./helpers/filter-security-requirements.js";
8
+ import j from "../../Components/CodeSnippet/CodeSnippet.vue.js";
9
+ import { useWorkspace as B } from "../../../store/store.js";
10
+ const D = { class: "w-full" }, E = { class: "-mx-1 flex flex-1" }, N = { class: "bg-b-1 flex items-center justify-center overflow-hidden border-t" }, P = /* @__PURE__ */ b({
11
11
  __name: "RequestCodeExample",
12
12
  props: {
13
13
  collection: {},
@@ -17,25 +17,25 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
17
17
  workspace: {}
18
18
  },
19
19
  setup(o) {
20
- const { securitySchemes: p, workspaceMutators: u } = D(), f = c(
21
- () => j(
20
+ const { securitySchemes: u, workspaceMutators: p } = B(), f = i(
21
+ () => _(
22
22
  o.operation.security || o.collection.security || [],
23
- o.collection.selectedSecuritySchemeUids,
24
- p
23
+ o.operation.selectedSecuritySchemeUids || o.collection.selectedSecuritySchemeUids,
24
+ u
25
25
  )
26
- ), a = c(() => {
26
+ ), a = i(() => {
27
27
  const e = {};
28
28
  return {
29
29
  options: K().clients().map((t) => ({
30
30
  label: t.title,
31
- options: t.clients.map((i) => (e[`${t.key},${i.client}`] = i.title, {
32
- id: `${t.key},${i.client}`,
33
- label: i.title
31
+ options: t.clients.map((s) => (e[`${t.key},${s.client}`] = s.title, {
32
+ id: `${t.key},${s.client}`,
33
+ label: s.title
34
34
  }))
35
35
  })),
36
36
  dict: e
37
37
  };
38
- }), d = c(() => {
38
+ }), d = i(() => {
39
39
  var t;
40
40
  const e = o.workspace.selectedHttpClient;
41
41
  if (!e)
@@ -48,49 +48,49 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
48
48
  id: l,
49
49
  label: a.value.dict[l] ?? "Unknown"
50
50
  };
51
- }), v = c(
51
+ }), y = i(
52
52
  () => {
53
53
  var e;
54
54
  return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.targetKey) ?? "js";
55
55
  }
56
- ), y = c(
56
+ ), v = i(
57
57
  () => {
58
58
  var e;
59
59
  return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.clientKey) ?? "fetch";
60
60
  }
61
61
  ), h = ({ id: e }) => {
62
62
  const [l, t] = e.split(",");
63
- !l || !t || u.edit(o.workspace.uid, "selectedHttpClient", {
63
+ !l || !t || p.edit(o.workspace.uid, "selectedHttpClient", {
64
64
  targetKey: l,
65
65
  clientKey: t
66
66
  });
67
67
  };
68
- return (e, l) => (w(), x("div", E, [
69
- n(H, {
68
+ return (e, l) => (w(), x("div", D, [
69
+ n(U, {
70
70
  class: "group/preview w-full border-b-0",
71
71
  defaultOpen: !1
72
72
  }, {
73
- title: s(() => l[0] || (l[0] = [
74
- C("Code Snippet")
73
+ title: c(() => l[0] || (l[0] = [
74
+ S("Code Snippet")
75
75
  ])),
76
- actions: s(() => [
77
- m("div", N, [
76
+ actions: c(() => [
77
+ m("div", E, [
78
78
  n(r(k), {
79
79
  modelValue: d.value,
80
80
  options: a.value.options,
81
81
  placement: "bottom-end",
82
82
  "onUpdate:modelValue": h
83
83
  }, {
84
- default: s(() => [
84
+ default: c(() => [
85
85
  n(r($), {
86
86
  class: "text-c-1 hover:bg-b-3 py-0.75 flex h-full w-fit gap-1.5 px-1.5 font-normal",
87
87
  fullWidth: "",
88
88
  variant: "ghost"
89
89
  }, {
90
- default: s(() => {
90
+ default: c(() => {
91
91
  var t;
92
92
  return [
93
- m("span", null, S((t = d.value) == null ? void 0 : t.label), 1),
93
+ m("span", null, C((t = d.value) == null ? void 0 : t.label), 1),
94
94
  n(r(g), {
95
95
  icon: "ChevronDown",
96
96
  size: "md"
@@ -104,20 +104,20 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
104
104
  }, 8, ["modelValue", "options"])
105
105
  ])
106
106
  ]),
107
- default: s(() => [
107
+ default: c(() => [
108
108
  n(V, { columns: [""] }, {
109
- default: s(() => [
110
- n(_, null, {
111
- default: s(() => [
112
- m("div", R, [
113
- n(r(B), {
109
+ default: c(() => [
110
+ n(H, null, {
111
+ default: c(() => [
112
+ m("div", N, [
113
+ n(r(j), {
114
114
  class: "px-3 py-1.5",
115
- client: y.value,
115
+ client: v.value,
116
116
  example: e.example,
117
117
  operation: e.operation,
118
118
  securitySchemes: f.value,
119
119
  server: e.server,
120
- target: v.value
120
+ target: y.value
121
121
  }, null, 8, ["client", "example", "operation", "securitySchemes", "server", "target"])
122
122
  ])
123
123
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AAuRA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AASxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAU1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAwUF,wBAOG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA+SA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AASxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAU1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkUF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSection.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-c67b3580"]]);
4
+ const d = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dd5754ad"]]);
5
5
  export {
6
- m as default
6
+ d as default
7
7
  };