@scalar/api-client 2.2.61 → 2.3.1

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 (42) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +2 -6
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  5. package/dist/components/AddressBar/AddressBar.vue2.js +38 -38
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  8. package/dist/components/CodeInput/CodeInput.vue2.js +21 -21
  9. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -0
  10. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  12. package/dist/components/DataTable/DataTableInput.vue2.js +48 -47
  13. package/dist/components/SectionFilter.vue.js +2 -2
  14. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  15. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  16. package/dist/layouts/App/create-api-client-app.js +13 -14
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  18. package/dist/layouts/Modal/create-api-client-modal.js +18 -19
  19. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  20. package/dist/layouts/Web/create-api-client-web.js +13 -14
  21. package/dist/libs/create-client.d.ts +1 -1
  22. package/dist/libs/create-client.d.ts.map +1 -1
  23. package/dist/libs/create-client.js +20 -20
  24. package/dist/store/security-schemes.d.ts.map +1 -1
  25. package/dist/store/store.d.ts.map +1 -1
  26. package/dist/style.css +1 -1
  27. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  28. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +8 -7
  29. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  30. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +21 -23
  31. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  32. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
  33. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  34. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  35. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +74 -63
  36. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  37. package/dist/views/Request/RequestSection/RequestParams.vue.js +31 -31
  38. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  39. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  40. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +17 -17
  41. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  42. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAkQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAS1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4eF,wBAMG"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAmQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAS1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4eF,wBAMG"}
@@ -1,5 +1,5 @@
1
- import { defineComponent as b, openBlock as s, createElementBlock as V, Fragment as U, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as d, createElementVNode as $, createBlock as k, createCommentVNode as p } from "vue";
2
- import { useLoadingState as C, ScalarButton as z } from "@scalar/components";
1
+ import { defineComponent as S, openBlock as s, createElementBlock as V, Fragment as U, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as d, createElementVNode as $, createBlock as k, createCommentVNode as p } from "vue";
2
+ import { useLoadingState as T, ScalarButton as b } from "@scalar/components";
3
3
  import { pkceOptions as P } from "@scalar/oas-utils/entities/spec";
4
4
  import { useToasts as L } from "@scalar/use-toasts";
5
5
  import { useWorkspace as R } from "../../../../store/store.js";
@@ -7,7 +7,7 @@ import B from "./OAuthScopesInput.vue.js";
7
7
  import w from "./RequestAuthDataTableInput.vue.js";
8
8
  import u from "../../../../components/DataTable/DataTableRow.vue.js";
9
9
  import { authorizeOauth2 as F } from "../../libs/oauth2.js";
10
- const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "border-t-1/2 flex h-8 w-full items-center justify-end" }, W = /* @__PURE__ */ b({
10
+ const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "border-t-1/2 flex h-8 w-full items-center justify-end" }, W = /* @__PURE__ */ S({
11
11
  __name: "OAuth2",
12
12
  props: {
13
13
  collection: {},
@@ -19,7 +19,7 @@ const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "bor
19
19
  workspace: {}
20
20
  },
21
21
  setup(f) {
22
- const y = C(), { toast: g } = L(), { securitySchemeMutators: S } = R(), n = (l, e) => S.edit(f.scheme.uid, l, e), T = async () => {
22
+ const y = T(), { toast: g } = L(), { securitySchemeMutators: z } = R(), n = (l, e) => z.edit(f.scheme.uid, l, e), C = async () => {
23
23
  var t, v;
24
24
  if (y.isLoading || !((t = f.collection) != null && t.uid)) return;
25
25
  if (y.startLoading(), !f.server) {
@@ -59,7 +59,7 @@ const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "bor
59
59
  a(r(u), { class: "min-w-full" }, {
60
60
  default: o(() => [
61
61
  $("div", I, [
62
- a(r(z), {
62
+ a(r(b), {
63
63
  class: "mr-1 p-0 px-2 py-0.5",
64
64
  loading: r(y),
65
65
  size: "sm",
@@ -79,6 +79,7 @@ const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "bor
79
79
  a(r(u), null, {
80
80
  default: o(() => [
81
81
  "authorizationUrl" in l.flow ? (s(), k(w, m({ key: 0 }, i, {
82
+ containerClass: "border-r-0",
82
83
  modelValue: l.flow.authorizationUrl,
83
84
  placeholder: "https://galaxy.scalar.com/authorize",
84
85
  "onUpdate:modelValue": e[2] || (e[2] = (t) => n(`flows.${l.flow.type}.authorizationUrl`, t))
@@ -216,12 +217,12 @@ const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "bor
216
217
  }, {
217
218
  default: o(() => [
218
219
  $("div", A, [
219
- a(r(z), {
220
+ a(r(b), {
220
221
  class: "mr-1 p-0 px-2 py-0.5",
221
222
  loading: r(y),
222
223
  size: "sm",
223
224
  variant: "outlined",
224
- onClick: T
225
+ onClick: C
225
226
  }, {
226
227
  default: o(() => e[20] || (e[20] = [
227
228
  d(" Authorize ")
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAQjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAoPF,wBAOG"}
1
+ {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAmGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAQjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAoPF,wBAOG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, computed as x, openBlock as m, createBlock as w, unref as t, withCtx as a, createElementVNode as n, createVNode as r, normalizeClass as y, toDisplayString as d, createElementBlock as v, Fragment as k, renderList as V, createTextVNode as b, createCommentVNode as D } from "vue";
1
+ import { defineComponent as C, computed as x, openBlock as f, createBlock as w, unref as t, withCtx as a, createElementVNode as i, createVNode as n, normalizeClass as b, toDisplayString as m, createElementBlock as v, Fragment as y, renderList as k, createTextVNode as V, createCommentVNode as D } from "vue";
2
2
  import { Disclosure as $, DisclosureButton as B, DisclosurePanel as N } from "@headlessui/vue";
3
3
  import { ScalarIcon as O } from "@scalar/components";
4
4
  import S from "../../../../components/DataTable/DataTableCell.vue.js";
@@ -36,57 +36,55 @@ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
36
36
  u.value.filter((s) => s !== e)
37
37
  );
38
38
  }
39
- return (e, l) => (m(), w(t(S), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
39
+ return (e, l) => (f(), w(t(S), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
40
40
  default: a(() => [
41
- n("div", z, [
42
- l[0] || (l[0] = n("div", { class: "text-c-1 h-full items-center" }, null, -1)),
43
- r(t($), {
41
+ i("div", z, [
42
+ l[0] || (l[0] = i("div", { class: "text-c-1 h-full items-center" }, null, -1)),
43
+ n(t($), {
44
44
  as: "div",
45
45
  class: "bl flex w-full flex-col"
46
46
  }, {
47
47
  default: a(() => {
48
48
  var s, h;
49
49
  return [
50
- r(t(B), {
51
- class: y([
52
- "group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pl-3 pr-2 text-left",
50
+ n(t(B), {
51
+ class: b([
52
+ "group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pl-3 pr-2.5 text-left",
53
53
  (((h = (s = e.flow) == null ? void 0 : s.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
54
54
  ])
55
55
  }, {
56
56
  default: a(({ open: c }) => {
57
- var f, i, p;
57
+ var d, r, p;
58
58
  return [
59
- n("div", E, " Scopes Selected " + d(((i = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : i.length) || 0) + " / " + d(Object.keys(((p = e.flow) == null ? void 0 : p.scopes) ?? {}).length || 0), 1),
60
- r(t(O), {
59
+ i("div", E, " Scopes Selected " + m(((r = (d = e.flow) == null ? void 0 : d.selectedScopes) == null ? void 0 : r.length) || 0) + " / " + m(Object.keys(((p = e.flow) == null ? void 0 : p.scopes) ?? {}).length || 0), 1),
60
+ n(t(O), {
61
61
  class: "text-c-3 group-hover/scopes-accordion:text-c-2",
62
62
  icon: c ? "ChevronDown" : "ChevronRight",
63
- size: "sm"
63
+ size: "md"
64
64
  }, null, 8, ["icon"])
65
65
  ];
66
66
  }),
67
67
  _: 1
68
68
  }, 8, ["class"]),
69
- r(t(N), { as: "template" }, {
69
+ n(t(N), { as: "template" }, {
70
70
  default: a(() => [
71
- n("table", F, [
72
- (m(!0), v(k, null, V(g.value, ({ id: c, label: f, description: i }) => (m(), w(t(T), {
71
+ i("table", F, [
72
+ (f(!0), v(y, null, k(g.value, ({ id: c, label: d, description: r }) => (f(), w(t(T), {
73
73
  key: c,
74
74
  class: "text-c-2",
75
75
  onClick: (p) => _(c, !u.value.includes(c))
76
76
  }, {
77
77
  default: a(() => [
78
- r(t(S), { class: "hover:text-c-1 !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
78
+ n(t(S), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
79
79
  default: a(() => [
80
- n("span", null, [
81
- i ? (m(), v("span", I, [
82
- n("span", R, d(f), 1),
83
- b(" " + d(i), 1)
84
- ])) : D("", !0)
85
- ])
80
+ r ? (f(), v("div", I, [
81
+ i("span", R, m(d), 1),
82
+ V("" + m(r), 1)
83
+ ])) : D("", !0)
86
84
  ]),
87
85
  _: 2
88
86
  }, 1024),
89
- r(t(j), {
87
+ n(t(j), {
90
88
  modelValue: u.value.includes(c),
91
89
  "onUpdate:modelValue": () => {
92
90
  }
@@ -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-8ab24b0b"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-88a7b6d4"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -123,7 +123,7 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
123
123
  ref_key: "comboboxButtonRef",
124
124
  ref: C,
125
125
  "aria-describedby": r(R),
126
- class: "py-0.75 hover:bg-b-3 text-c-1 hover:text-c-1 h-auto px-1.5 font-normal",
126
+ class: "hover:bg-b-3 text-c-1 hover:text-c-1 py-0.25 h-fit px-1.5 font-normal",
127
127
  fullWidth: "",
128
128
  variant: "ghost"
129
129
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"AAgPA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AAKxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,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,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkZF,wBAMG"}
1
+ {"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"AAwPA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AAKxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,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,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA0aF,wBAMG"}
@@ -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 f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-00684fd6"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-be1373d0"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as F, computed as N, ref as P, openBlock as o, createElementBlock as n, Fragment as i, renderList as U, createBlock as _, unref as f, normalizeClass as C, withCtx as l, createVNode as u, createTextVNode as b, toDisplayString as $, createCommentVNode as k, mergeProps as v, createElementVNode as T, capitalize as x } from "vue";
2
- import { useWorkspace as j } from "../../../../store/store.js";
3
- import q from "./OAuth2.vue.js";
4
- import m from "./RequestAuthDataTableInput.vue.js";
1
+ import { defineComponent as N, computed as P, ref as j, openBlock as o, createElementBlock as n, Fragment as p, renderList as U, createBlock as _, unref as d, normalizeClass as C, withCtx as l, createVNode as u, createTextVNode as y, toDisplayString as g, createCommentVNode as b, mergeProps as V, createElementVNode as T, capitalize as c } from "vue";
2
+ import { useWorkspace as q } from "../../../../store/store.js";
3
+ import R from "./OAuth2.vue.js";
4
+ import w from "./RequestAuthDataTableInput.vue.js";
5
5
  import s from "../../../../components/DataTable/DataTableRow.vue.js";
6
- import R from "../../../../components/DataTable/DataTableCell.vue.js";
6
+ import S from "../../../../components/DataTable/DataTableCell.vue.js";
7
7
  const z = {
8
8
  key: 0,
9
9
  class: "flex min-h-8 border-t text-sm"
10
10
  }, M = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, Q = ["onClick"], D = { class: "relative z-10" }, E = {
11
- key: 4,
11
+ key: 5,
12
12
  class: "text-c-3 bg-b-1 flex min-h-16 items-center justify-center border-t px-4 text-sm"
13
- }, X = /* @__PURE__ */ F({
13
+ }, X = /* @__PURE__ */ N({
14
14
  __name: "RequestAuthTab",
15
15
  props: {
16
16
  collection: {},
@@ -21,167 +21,178 @@ const z = {
21
21
  server: {},
22
22
  workspace: {}
23
23
  },
24
- setup(w) {
25
- const { securitySchemes: S, securitySchemeMutators: B } = j(), g = N(
26
- () => w.securitySchemeUids.map((t) => ({
27
- scheme: S[t]
24
+ setup(m) {
25
+ const { securitySchemes: B, securitySchemeMutators: I } = q(), $ = P(
26
+ () => m.securitySchemeUids.map((t) => ({
27
+ scheme: B[t]
28
28
  }))
29
- ), d = P(""), I = (t) => {
29
+ ), i = j(""), K = (t) => {
30
30
  if (t.type === "apiKey")
31
- return `${x(t.nameKey)}: ${t.in}`;
31
+ return `${c(t.nameKey)}: ${t.in}`;
32
32
  if (t.type === "oauth2") {
33
33
  const r = Object.values(t.flows ?? {})[0];
34
- return `${x(t.nameKey)}: ${d.value ? d.value : (r == null ? void 0 : r.type) ?? ""}`;
34
+ return `${c(t.nameKey)}: ${i.value ? i.value : (r == null ? void 0 : r.type) ?? ""}`;
35
35
  }
36
- return t.type === "http" ? `${x(t.nameKey)}: ${t.scheme}` : `${x(t.nameKey)}: ${t.type}`;
37
- }, V = (t, r, e) => B.edit(t, r, e), y = {
38
- environment: w.environment,
39
- envVariables: w.envVariables,
40
- workspace: w.workspace
36
+ return t.type === "http" ? `${c(t.nameKey)}: ${t.scheme}` : `${c(t.nameKey)}: ${t.type}`;
37
+ }, k = (t, r, e) => I.edit(t, r, e), v = {
38
+ environment: m.environment,
39
+ envVariables: m.envVariables,
40
+ workspace: m.workspace
41
41
  };
42
- return (t, r) => (o(!0), n(i, null, U(g.value, ({ scheme: e }, K) => (o(), n(i, {
42
+ return (t, r) => (o(!0), n(p, null, U($.value, ({ scheme: e }, F) => (o(), n(p, {
43
43
  key: e == null ? void 0 : e.uid
44
44
  }, [
45
- g.value.length > 1 ? (o(), _(f(s), {
45
+ $.value.length > 1 ? (o(), _(d(s), {
46
46
  key: 0,
47
47
  class: C({
48
48
  "request-example-references-header": t.layout === "reference"
49
49
  })
50
50
  }, {
51
51
  default: l(() => [
52
- u(f(R), {
52
+ u(d(S), {
53
53
  class: C([
54
54
  "text-c-3 flex items-center pl-3 font-medium",
55
- t.layout === "reference" && `border-t ${K !== 0 ? "mt-2" : ""}`
55
+ t.layout === "reference" && `border-t ${F !== 0 ? "mt-2" : ""}`
56
56
  ])
57
57
  }, {
58
58
  default: l(() => [
59
- b($(I(e)), 1)
59
+ y(g(K(e)), 1)
60
60
  ]),
61
61
  _: 2
62
62
  }, 1032, ["class"])
63
63
  ]),
64
64
  _: 2
65
- }, 1032, ["class"])) : k("", !0),
66
- (e == null ? void 0 : e.type) === "http" ? (o(), n(i, { key: 1 }, [
67
- e.scheme === "bearer" ? (o(), _(f(s), { key: 0 }, {
65
+ }, 1032, ["class"])) : b("", !0),
66
+ e != null && e.description ? (o(), _(d(s), { key: 1 }, {
67
+ default: l(() => [
68
+ u(d(S), { class: "text-c-3 flex items-center overflow-auto whitespace-nowrap pl-3 font-medium" }, {
69
+ default: l(() => [
70
+ y(g(e.description), 1)
71
+ ]),
72
+ _: 2
73
+ }, 1024)
74
+ ]),
75
+ _: 2
76
+ }, 1024)) : b("", !0),
77
+ (e == null ? void 0 : e.type) === "http" ? (o(), n(p, { key: 2 }, [
78
+ e.scheme === "bearer" ? (o(), _(d(s), { key: 0 }, {
68
79
  default: l(() => [
69
- u(m, v({ ref_for: !0 }, y, {
80
+ u(w, V({ ref_for: !0 }, v, {
70
81
  containerClass: t.layout === "reference" && "border-t",
71
82
  modelValue: e.token,
72
83
  placeholder: "Token",
73
84
  type: "password",
74
- "onUpdate:modelValue": (a) => V(e.uid, "token", a)
85
+ "onUpdate:modelValue": (a) => k(e.uid, "token", a)
75
86
  }), {
76
87
  default: l(() => r[0] || (r[0] = [
77
- b(" Bearer Token ")
88
+ y(" Bearer Token ")
78
89
  ])),
79
90
  _: 2
80
91
  }, 1040, ["containerClass", "modelValue", "onUpdate:modelValue"])
81
92
  ]),
82
93
  _: 2
83
- }, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (o(), n(i, { key: 1 }, [
84
- u(f(s), null, {
94
+ }, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (o(), n(p, { key: 1 }, [
95
+ u(d(s), null, {
85
96
  default: l(() => [
86
- u(m, v({ ref_for: !0 }, y, {
97
+ u(w, V({ ref_for: !0 }, v, {
87
98
  class: "text-c-2",
88
99
  containerClass: t.layout === "reference" && "auth-blend-required border-t",
89
100
  modelValue: e.username,
90
101
  placeholder: "janedoe",
91
102
  required: "",
92
- "onUpdate:modelValue": (a) => V(e.uid, "username", a)
103
+ "onUpdate:modelValue": (a) => k(e.uid, "username", a)
93
104
  }), {
94
105
  default: l(() => r[1] || (r[1] = [
95
- b(" Username ")
106
+ y(" Username ")
96
107
  ])),
97
108
  _: 2
98
109
  }, 1040, ["containerClass", "modelValue", "onUpdate:modelValue"])
99
110
  ]),
100
111
  _: 2
101
112
  }, 1024),
102
- u(f(s), null, {
113
+ u(d(s), null, {
103
114
  default: l(() => [
104
- u(m, v({ ref_for: !0 }, y, {
115
+ u(w, V({ ref_for: !0 }, v, {
105
116
  modelValue: e.password,
106
117
  placeholder: "********",
107
118
  type: "password",
108
- "onUpdate:modelValue": (a) => V(e.uid, "password", a)
119
+ "onUpdate:modelValue": (a) => k(e.uid, "password", a)
109
120
  }), {
110
121
  default: l(() => r[2] || (r[2] = [
111
- b(" Password ")
122
+ y(" Password ")
112
123
  ])),
113
124
  _: 2
114
125
  }, 1040, ["modelValue", "onUpdate:modelValue"])
115
126
  ]),
116
127
  _: 2
117
128
  }, 1024)
118
- ], 64)) : k("", !0)
119
- ], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (o(), n(i, { key: 2 }, [
120
- u(f(s), null, {
129
+ ], 64)) : b("", !0)
130
+ ], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (o(), n(p, { key: 3 }, [
131
+ u(d(s), null, {
121
132
  default: l(() => [
122
- u(m, v({ ref_for: !0 }, y, {
133
+ u(w, V({ ref_for: !0 }, v, {
123
134
  containerClass: t.layout === "reference" && "border-t",
124
135
  modelValue: e.name,
125
136
  placeholder: "api-key",
126
- "onUpdate:modelValue": (a) => V(e.uid, "name", a)
137
+ "onUpdate:modelValue": (a) => k(e.uid, "name", a)
127
138
  }), {
128
139
  default: l(() => r[3] || (r[3] = [
129
- b(" Name ")
140
+ y(" Name ")
130
141
  ])),
131
142
  _: 2
132
143
  }, 1040, ["containerClass", "modelValue", "onUpdate:modelValue"])
133
144
  ]),
134
145
  _: 2
135
146
  }, 1024),
136
- u(f(s), null, {
147
+ u(d(s), null, {
137
148
  default: l(() => [
138
- u(m, v({ ref_for: !0 }, y, {
149
+ u(w, V({ ref_for: !0 }, v, {
139
150
  modelValue: e.value,
140
151
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
141
- "onUpdate:modelValue": (a) => V(e.uid, "value", a)
152
+ "onUpdate:modelValue": (a) => k(e.uid, "value", a)
142
153
  }), {
143
154
  default: l(() => r[4] || (r[4] = [
144
- b(" Value ")
155
+ y(" Value ")
145
156
  ])),
146
157
  _: 2
147
158
  }, 1040, ["modelValue", "onUpdate:modelValue"])
148
159
  ]),
149
160
  _: 2
150
161
  }, 1024)
151
- ], 64)) : (e == null ? void 0 : e.type) === "oauth2" ? (o(), n(i, { key: 3 }, [
152
- u(f(s), null, {
162
+ ], 64)) : (e == null ? void 0 : e.type) === "oauth2" ? (o(), n(p, { key: 4 }, [
163
+ u(d(s), null, {
153
164
  default: l(() => [
154
165
  Object.keys(e.flows).length > 1 ? (o(), n("div", z, [
155
166
  T("div", M, [
156
- (o(!0), n(i, null, U(e == null ? void 0 : e.flows, (a, p, c) => (o(), n("button", {
157
- key: p,
167
+ (o(!0), n(p, null, U(e == null ? void 0 : e.flows, (a, f, x) => (o(), n("button", {
168
+ key: f,
158
169
  class: C(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium", {
159
- "!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (d.value === p || c === 0 && !d.value),
160
- "!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (d.value === p || c === 0 && !d.value)
170
+ "!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (i.value === f || x === 0 && !i.value),
171
+ "!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (i.value === f || x === 0 && !i.value)
161
172
  }]),
162
173
  type: "button",
163
- onClick: (L) => d.value = p
174
+ onClick: (L) => i.value = f
164
175
  }, [
165
- T("span", D, $(p), 1)
176
+ T("span", D, g(f), 1)
166
177
  ], 10, Q))), 128))
167
178
  ])
168
- ])) : k("", !0)
179
+ ])) : b("", !0)
169
180
  ]),
170
181
  _: 2
171
182
  }, 1024),
172
- (o(!0), n(i, null, U(e == null ? void 0 : e.flows, (a, p, c) => (o(), n(i, { key: p }, [
173
- d.value === p || c === 0 && !d.value ? (o(), _(q, v({
183
+ (o(!0), n(p, null, U(e == null ? void 0 : e.flows, (a, f, x) => (o(), n(p, { key: f }, [
184
+ i.value === f || x === 0 && !i.value ? (o(), _(R, V({
174
185
  key: 0,
175
186
  ref_for: !0
176
- }, y, {
187
+ }, v, {
177
188
  collection: t.collection,
178
189
  flow: a,
179
190
  scheme: e,
180
191
  server: t.server,
181
192
  workspace: t.workspace
182
- }), null, 16, ["collection", "flow", "scheme", "server", "workspace"])) : k("", !0)
193
+ }), null, 16, ["collection", "flow", "scheme", "server", "workspace"])) : b("", !0)
183
194
  ], 64))), 128))
184
- ], 64)) : (e == null ? void 0 : e.type) === "openIdConnect" ? (o(), n("div", E, " Coming soon ")) : k("", !0)
195
+ ], 64)) : (e == null ? void 0 : e.type) === "openIdConnect" ? (o(), n("div", E, " Coming soon ")) : b("", !0)
185
196
  ], 64))), 128));
186
197
  }
187
198
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAiOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAC;;AA6UF,wBAOG"}
1
+ {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAiOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAC;;AA8UF,wBAOG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, computed as m, onMounted as T, ref as S, watch as N, openBlock as p, createBlock as d, withCtx as l, createTextVNode as b, toDisplayString as k, createElementVNode as i, unref as h, createVNode as w, withModifiers as z, createCommentVNode as P, normalizeClass as A, nextTick as R } from "vue";
1
+ import { defineComponent as O, computed as m, onMounted as T, ref as S, watch as N, openBlock as c, createBlock as d, withCtx as s, createTextVNode as b, toDisplayString as k, createElementVNode as i, unref as h, createVNode as w, withModifiers as z, createCommentVNode as P, normalizeClass as A, nextTick as R } from "vue";
2
2
  import { ScalarTooltip as B, ScalarButton as M } from "@scalar/components";
3
3
  import { requestExampleParametersSchema as x } from "@scalar/oas-utils/entities/spec";
4
4
  import W from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
@@ -17,36 +17,36 @@ const G = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
17
17
  invalidParams: {}
18
18
  },
19
19
  setup(t) {
20
- const { requestExampleMutators: r } = D(), s = m(() => t.example.parameters[t.paramKey] ?? []);
20
+ const { requestExampleMutators: r } = D(), l = m(() => t.example.parameters[t.paramKey] ?? []);
21
21
  T(() => v());
22
22
  const o = () => {
23
- const e = x.parse({ enabled: !1 }), a = [...s.value, e];
23
+ const e = x.parse({ enabled: !1 }), a = [...l.value, e];
24
24
  r.edit(t.example.uid, `parameters.${t.paramKey}`, a);
25
- }, u = S(null), C = (e, a, g) => {
26
- const c = s.value;
27
- if (c.length > e) {
28
- const n = [...c];
25
+ }, u = S(null), C = (e, a, y) => {
26
+ const p = l.value;
27
+ if (p.length > e) {
28
+ const n = [...p];
29
29
  if (!n[e]) return;
30
- n[e] = { ...n[e], [a]: g }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), r.edit(
30
+ n[e] = { ...n[e], [a]: y }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), r.edit(
31
31
  t.example.uid,
32
32
  `parameters.${t.paramKey}`,
33
33
  n
34
34
  );
35
35
  } else {
36
- const n = [x.parse({ [a]: g })];
36
+ const n = [x.parse({ [a]: y })];
37
37
  r.edit(t.example.uid, `parameters.${t.paramKey}`, n), R(() => {
38
- var y;
38
+ var g;
39
39
  if (!u.value) return;
40
- (y = u.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || y.focus();
40
+ (g = u.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || g.focus();
41
41
  });
42
42
  }
43
- e === c.length - 1 && o();
43
+ e === p.length - 1 && o();
44
44
  }, q = (e, a) => r.edit(
45
45
  t.example.uid,
46
46
  `parameters.${t.paramKey}.${e}.enabled`,
47
47
  a
48
48
  ), E = () => {
49
- const e = s.value.filter((a) => a.required);
49
+ const e = l.value.filter((a) => a.required);
50
50
  r.edit(
51
51
  t.example.uid,
52
52
  `parameters.${t.paramKey}`,
@@ -54,16 +54,16 @@ const G = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
54
54
  ), R(() => o());
55
55
  };
56
56
  function v() {
57
- if (s.value.length === 0)
57
+ if (l.value.length === 0)
58
58
  o();
59
- else if (s.value.length >= 1) {
60
- const e = s.value[s.value.length - 1];
59
+ else if (l.value.length >= 1) {
60
+ const e = l.value[l.value.length - 1];
61
61
  e && e.key !== "" && e.value !== "" && o();
62
62
  }
63
63
  }
64
64
  const K = m(
65
- () => s.value.filter((e) => e.key || e.value).length
66
- ), $ = m(() => s.value.length > 1);
65
+ () => l.value.filter((e) => e.key || e.value).length
66
+ ), $ = m(() => l.value.length > 1);
67
67
  N(
68
68
  () => t.example,
69
69
  (e, a) => {
@@ -72,35 +72,35 @@ const G = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
72
72
  { immediate: !0 }
73
73
  );
74
74
  const f = m(() => (t.readOnlyEntries ?? []).length > 0);
75
- return (e, a) => (p(), d(W, {
75
+ return (e, a) => (c(), d(W, {
76
76
  class: "group/params",
77
77
  itemCount: K.value
78
78
  }, {
79
- title: l(() => [
79
+ title: s(() => [
80
80
  b(k(e.title), 1)
81
81
  ]),
82
- actions: l(() => [
82
+ actions: s(() => [
83
83
  i("div", G, [
84
- $.value ? (p(), d(h(B), {
84
+ $.value ? (c(), d(h(B), {
85
85
  key: 0,
86
- side: "right",
87
- sideOffset: 12
86
+ side: "left",
87
+ sideOffset: 6
88
88
  }, {
89
- trigger: l(() => [
89
+ trigger: s(() => [
90
90
  w(h(M), {
91
- class: "px-1 transition-none",
91
+ class: "pr-0.75 pl-1 transition-none",
92
92
  size: "sm",
93
93
  variant: "ghost",
94
94
  onClick: z(E, ["stop"])
95
95
  }, {
96
- default: l(() => [
96
+ default: s(() => [
97
97
  a[0] || (a[0] = b(" Clear ")),
98
98
  i("span", U, "All " + k(e.title), 1)
99
99
  ]),
100
100
  _: 1
101
101
  })
102
102
  ]),
103
- content: l(() => a[1] || (a[1] = [
103
+ content: s(() => a[1] || (a[1] = [
104
104
  i("div", { class: "w-content bg-b-1 text-xxs text-c-1 pointer-events-none z-10 grid min-w-48 gap-1.5 rounded p-2 leading-5 shadow-lg" }, [
105
105
  i("div", { class: "text-c-2 flex items-center" }, [
106
106
  i("span", null, "Clear optional parameters")
@@ -111,12 +111,12 @@ const G = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
111
111
  })) : P("", !0)
112
112
  ])
113
113
  ]),
114
- default: l(() => [
114
+ default: s(() => [
115
115
  i("div", {
116
116
  ref_key: "tableWrapperRef",
117
117
  ref: u
118
118
  }, [
119
- f.value ? (p(), d(V, {
119
+ f.value ? (c(), d(V, {
120
120
  key: 0,
121
121
  class: A(["flex-1", {
122
122
  "bg-mix-transparent bg-mix-amount-95 bg-c-3": f.value
@@ -135,7 +135,7 @@ const G = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
135
135
  columns: ["32px", "", ""],
136
136
  envVariables: e.envVariables,
137
137
  environment: e.environment,
138
- items: s.value,
138
+ items: l.value,
139
139
  workspace: e.workspace,
140
140
  invalidParams: e.invalidParams,
141
141
  onToggleRow: q,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAM9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AAuJrD,wBAOG"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAM9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AA6JrD,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTableTooltip.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-ac049e60"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-eaaae574"]]);
5
5
  export {
6
6
  r as default
7
7
  };