@scalar/api-client 2.1.36 → 2.1.38

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 (67) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarServer.vue.js +8 -7
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  6. package/dist/components/CodeInput/CodeInput.vue2.js +43 -42
  7. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -2
  8. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  9. package/dist/components/CodeInput/codeVariableWidget.js +38 -40
  10. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  11. package/dist/components/SideNav/SideNav.vue.js +2 -2
  12. package/dist/components/SideNav/SideNav.vue2.js +42 -29
  13. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -0
  14. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  15. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  16. package/dist/components/Sidebar/SidebarListElement.vue2.js +32 -28
  17. package/dist/layouts/App/create-api-client-app.d.ts +70 -6
  18. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  19. package/dist/layouts/Modal/create-api-client-modal.d.ts +140 -12
  20. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  21. package/dist/layouts/Web/create-api-client-web.d.ts +70 -6
  22. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  23. package/dist/libs/create-client.d.ts +76 -9
  24. package/dist/libs/create-client.d.ts.map +1 -1
  25. package/dist/libs/create-client.js +92 -80
  26. package/dist/store/collections.d.ts +1 -0
  27. package/dist/store/collections.d.ts.map +1 -1
  28. package/dist/store/cookies.d.ts +1 -0
  29. package/dist/store/cookies.d.ts.map +1 -1
  30. package/dist/store/environment.d.ts +1 -0
  31. package/dist/store/environment.d.ts.map +1 -1
  32. package/dist/store/environment.js +6 -7
  33. package/dist/store/request-example.d.ts +1 -0
  34. package/dist/store/request-example.d.ts.map +1 -1
  35. package/dist/store/requests.d.ts +55 -4
  36. package/dist/store/requests.d.ts.map +1 -1
  37. package/dist/store/security-schemes.d.ts +2 -1
  38. package/dist/store/security-schemes.d.ts.map +1 -1
  39. package/dist/store/security-schemes.js +9 -9
  40. package/dist/store/servers.d.ts +1 -0
  41. package/dist/store/servers.d.ts.map +1 -1
  42. package/dist/store/store.d.ts +138 -10
  43. package/dist/store/store.d.ts.map +1 -1
  44. package/dist/store/tags.d.ts +1 -0
  45. package/dist/store/tags.d.ts.map +1 -1
  46. package/dist/store/workspace.d.ts +1 -0
  47. package/dist/store/workspace.d.ts.map +1 -1
  48. package/dist/style.css +1 -1
  49. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  50. package/dist/views/Environment/Environment.vue2.js +98 -83
  51. package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +16 -0
  52. package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -0
  53. package/dist/views/Environment/EnvironmentColorModal.vue.js +40 -0
  54. package/dist/views/Environment/EnvironmentColorModal.vue2.js +4 -0
  55. package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +1 -1
  56. package/dist/views/Environment/EnvironmentColors.vue.js +84 -29
  57. package/dist/views/Environment/EnvironmentModal.vue.d.ts +20 -0
  58. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -0
  59. package/dist/views/Environment/EnvironmentModal.vue.js +52 -0
  60. package/dist/views/Environment/EnvironmentModal.vue2.js +4 -0
  61. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -0
  62. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  63. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +51 -50
  64. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  65. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +12 -12
  66. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  67. package/package.json +8 -8
@@ -1,91 +1,92 @@
1
- import { defineComponent as I, ref as u, computed as N, onMounted as P, openBlock as s, createBlock as w, unref as d, normalizeStyle as R, withCtx as h, createElementBlock as p, Fragment as $, renderList as j, normalizeClass as y, createElementVNode as f, createTextVNode as b, toDisplayString as k, createVNode as q } from "vue";
2
- import { ScalarDropdown as z, ScalarButton as F, ScalarIcon as K } from "@scalar/components";
3
- import { onClickOutside as T } from "@vueuse/core";
1
+ import { defineComponent as I, ref as d, computed as N, onMounted as P, openBlock as s, createBlock as w, unref as p, normalizeStyle as h, withCtx as y, createElementBlock as f, Fragment as R, renderList as j, normalizeClass as q, createElementVNode as v, createTextVNode as b, toDisplayString as k, createVNode as z } from "vue";
2
+ import { ScalarDropdown as F, ScalarButton as K, ScalarIcon as T } from "@scalar/components";
3
+ import { onClickOutside as $ } from "@vueuse/core";
4
4
  import L from "fuse.js";
5
- import { parseEnvVariables as x } from "../../libs/environment-parser.js";
5
+ import { parseEnvVariables as g } from "../../libs/environment-parser.js";
6
6
  const M = { key: 0 }, Q = ["onClick"], G = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, oe = /* @__PURE__ */ I({
7
7
  __name: "EnvironmentVariableDropdown",
8
8
  props: {
9
9
  query: {},
10
+ activeEnvironment: {},
10
11
  activeEnvVariables: {},
11
12
  router: {},
12
13
  dropdownPosition: {}
13
14
  },
14
15
  emits: ["select"],
15
- setup(g, { expose: V, emit: _ }) {
16
- const r = g, E = _, i = u(!0), c = u(null), n = u(0), C = () => {
16
+ setup(x, { expose: E, emit: V }) {
17
+ const a = x, _ = V, c = d(!0), u = d(null), r = d(0), C = () => {
17
18
  const e = A.value.params.workspace;
18
- S(`/workspace/${e}/environment/default`), i.value = !1;
19
- }, { push: S, currentRoute: A } = r.router, B = new L(x(r.activeEnvVariables.value), {
19
+ S(`/workspace/${e}/environment/default`), c.value = !1;
20
+ }, { push: S, currentRoute: A } = a.router, B = new L(g(a.activeEnvVariables.value), {
20
21
  keys: ["key", "value"]
21
- }), a = N(() => {
22
- const e = r.query;
22
+ }), l = N(() => {
23
+ const e = a.query;
23
24
  if (!e)
24
- return x(r.activeEnvVariables.value).slice(-4);
25
+ return g(a.activeEnvVariables.value).slice(-4).filter(({ key: t, value: n }) => t !== "" || n !== "");
25
26
  const o = B.search(e);
26
- return o.length > 0 ? o.map((t) => t.item) : [];
27
- }), v = (e) => {
28
- E("select", e);
29
- }, O = () => r.activeEnvVariables.value.map((e) => {
30
- if (e.key === "color")
31
- return `bg-${e.value}`;
32
- });
33
- return V({
27
+ return o.length > 0 ? o.map((t) => t.item).filter(({ key: t, value: n }) => t !== "" || n !== "") : [];
28
+ }), m = (e) => {
29
+ _("select", e);
30
+ }, O = (e) => e.value ? e.value.color : "#8E8E8E";
31
+ return E({
34
32
  handleArrowKey: (e) => {
35
- const o = e === "up" ? -1 : 1, t = a.value.length;
36
- t !== 0 && (n.value = (n.value + o + t) % t);
33
+ const o = e === "up" ? -1 : 1, t = l.value.length;
34
+ t !== 0 && (r.value = (r.value + o + t) % t);
37
35
  },
38
36
  handleSelect: () => {
39
- if (n.value >= 0) {
40
- const e = a.value[n.value];
41
- e && v(e.key);
37
+ if (r.value >= 0) {
38
+ const e = l.value[r.value];
39
+ e && m(e.key);
42
40
  }
43
41
  }
44
42
  }), P(() => {
45
- n.value = 0;
46
- }), T(
47
- c,
43
+ r.value = 0;
44
+ }), $(
45
+ u,
48
46
  () => {
49
- i.value = !1;
47
+ c.value = !1;
50
48
  },
51
- { ignore: [c] }
49
+ { ignore: [u] }
52
50
  ), (e, o) => {
53
- var t, m;
54
- return s(), w(d(z), {
51
+ var t, n;
52
+ return s(), w(p(F), {
55
53
  ref_key: "dropdownRef",
56
- ref: c,
54
+ ref: u,
57
55
  class: "mt-2 min-w-60 rounded border bg-b-1 p-1 w-fit",
58
56
  static: "",
59
- staticOpen: i.value,
60
- style: R({
57
+ staticOpen: c.value,
58
+ style: h({
61
59
  left: ((t = e.dropdownPosition) == null ? void 0 : t.left) + "px",
62
- top: ((m = e.dropdownPosition) == null ? void 0 : m.top) + "px"
60
+ top: ((n = e.dropdownPosition) == null ? void 0 : n.top) + "px"
63
61
  }),
64
62
  teleport: ".scalar-client"
65
63
  }, {
66
- items: h(() => [
67
- a.value.length ? (s(), p("ul", M, [
68
- (s(!0), p($, null, j(a.value, (l, D) => (s(), p("li", {
69
- key: l.key,
70
- class: y(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": D === n.value }]),
71
- onClick: (W) => v(l.key)
64
+ items: y(() => [
65
+ l.value.length ? (s(), f("ul", M, [
66
+ (s(!0), f(R, null, j(l.value, (i, D) => (s(), f("li", {
67
+ key: i.key,
68
+ class: q(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": D === r.value }]),
69
+ onClick: (W) => m(i.key)
72
70
  }, [
73
- f("div", G, [
74
- f("span", {
75
- class: y(["h-2.5 w-2.5 min-w-2.5 rounded-full", O()])
76
- }, null, 2),
77
- b(" " + k(l.key), 1)
71
+ v("div", G, [
72
+ v("span", {
73
+ class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
74
+ style: h({
75
+ backgroundColor: O(e.activeEnvironment)
76
+ })
77
+ }, null, 4),
78
+ b(" " + k(i.key), 1)
78
79
  ]),
79
- f("span", H, k(l.value), 1)
80
+ v("span", H, k(i.value), 1)
80
81
  ], 10, Q))), 128))
81
- ])) : (s(), w(d(F), {
82
+ ])) : (s(), w(p(K), {
82
83
  key: 1,
83
84
  class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
84
85
  variant: "secondary",
85
86
  onClick: C
86
87
  }, {
87
- default: h(() => [
88
- q(d(K), {
88
+ default: y(() => [
89
+ z(p(T), {
89
90
  class: "w-2.5",
90
91
  icon: "Add"
91
92
  }),
@@ -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-d99a68c2"]]);
4
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-266d3491"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -33,7 +33,7 @@ const se = { class: "flex gap-1" }, oe = {
33
33
  securitySchemeMutators: V
34
34
  } = le(), R = w(null), h = L(), y = w(void 0), _ = `combobox-${J()}`, T = v(() => {
35
35
  var e;
36
- return (((e = a.value) == null ? void 0 : e.securitySchemes) ?? []).map((l) => p[l]).filter((l) => l);
36
+ return (((e = a.value) == null ? void 0 : e.securitySchemes) ?? []).map((s) => p[s]).filter((s) => s);
37
37
  }), B = v(
38
38
  () => {
39
39
  const t = T.value.map(
@@ -65,20 +65,20 @@ const se = { class: "flex gap-1" }, oe = {
65
65
  function N(t) {
66
66
  var C, U;
67
67
  if (!((C = a.value) != null && C.uid) || !((U = d.value) != null && U.uid)) return;
68
- const e = t.find((s) => s.payload), l = t.filter((s) => !s.payload).map(({ id: s }) => s);
68
+ const e = t.find((l) => l.payload), s = t.filter((l) => !l.payload).map(({ id: l }) => l);
69
69
  if (e != null && e.payload) {
70
- const s = V.add(
70
+ const l = V.add(
71
71
  e.payload,
72
72
  a.value.uid
73
73
  );
74
- l.push(s.uid);
74
+ l && s.push(l.uid);
75
75
  }
76
- const g = l.filter((s) => !a.value.auth[s]);
76
+ const g = s.filter((l) => !a.value.auth[l]);
77
77
  x.edit(
78
78
  a.value.uid,
79
79
  "auth",
80
- g.reduce((s, k) => (s[k] = X(p[k]), s), a.value.auth)
81
- ), b(l);
80
+ g.reduce((l, k) => (l[k] = X(p[k]), l), a.value.auth)
81
+ ), b(s);
82
82
  }
83
83
  const q = (t) => b(
84
84
  S.selectedSecuritySchemeUids.filter((e) => e !== t)
@@ -129,16 +129,16 @@ const se = { class: "flex gap-1" }, oe = {
129
129
  n.value.length ? (u(), m("div", oe, [
130
130
  e[1] || (e[1] = r("div", { class: "fade-left" }, null, -1)),
131
131
  r("div", ie, [
132
- (u(!0), m(W, null, z(n.value, (l) => (u(), m("span", {
133
- key: l.id,
132
+ (u(!0), m(W, null, z(n.value, (s) => (u(), m("span", {
133
+ key: s.id,
134
134
  class: "cm-pill flex items-center mx-0 h-fit pr-1 !bg-b-2 text-c-1"
135
135
  }, [
136
- E(A(l.label) + " ", 1),
136
+ E(A(s.label) + " ", 1),
137
137
  i(o(D), {
138
138
  class: "ml-1 cursor-pointer text-c-3 hover:text-c-1",
139
139
  icon: "Close",
140
140
  size: "xs",
141
- onClick: j((g) => q(l.id), ["stop"])
141
+ onClick: j((g) => q(s.id), ["stop"])
142
142
  }, null, 8, ["onClick"])
143
143
  ]))), 128))
144
144
  ]),
@@ -168,7 +168,7 @@ const se = { class: "flex gap-1" }, oe = {
168
168
  i(K, {
169
169
  scheme: y.value,
170
170
  state: o(h),
171
- onClose: e[0] || (e[0] = (l) => o(h).hide())
171
+ onClose: e[0] || (e[0] = (s) => o(h).hide())
172
172
  }, null, 8, ["scheme", "state"]),
173
173
  r("div", { id: _ })
174
174
  ])
@@ -14,7 +14,7 @@ const v = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { cl
14
14
  s.commandPalette.emit({ commandName: "Create Request" });
15
15
  }, c = (n) => {
16
16
  n != null && n.createNew && x.name === "request" && m();
17
- }, y = "2.1.36";
17
+ }, y = "2.1.38";
18
18
  return R(() => s.hotKeys.on(c)), g(() => s.hotKeys.off(c)), (n, e) => (a(), l("div", v, [
19
19
  t("div", V, [
20
20
  o(f).isReadOnly ? u("", !0) : (a(), l("div", B, [
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.36",
21
+ "version": "2.1.38",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -153,17 +153,17 @@
153
153
  "whatwg-mimetype": "^4.0.0",
154
154
  "yaml": "^2.4.5",
155
155
  "zod": "^3.23.8",
156
- "@scalar/components": "0.12.62",
156
+ "@scalar/components": "0.12.63",
157
157
  "@scalar/draggable": "0.1.6",
158
- "@scalar/icons": "0.1.1",
159
- "@scalar/oas-utils": "0.2.63",
160
- "@scalar/object-utils": "1.1.10",
158
+ "@scalar/oas-utils": "0.2.65",
159
+ "@scalar/object-utils": "1.1.11",
161
160
  "@scalar/openapi-parser": "0.8.8",
162
- "@scalar/themes": "0.9.44",
163
- "@scalar/types": "0.0.17",
164
- "@scalar/use-codemirror": "0.11.29",
165
161
  "@scalar/openapi-types": "0.1.4",
162
+ "@scalar/themes": "0.9.45",
163
+ "@scalar/icons": "0.1.1",
166
164
  "@scalar/use-toasts": "0.7.7",
165
+ "@scalar/types": "0.0.18",
166
+ "@scalar/use-codemirror": "0.11.30",
167
167
  "@scalar/use-tooltip": "1.0.3"
168
168
  },
169
169
  "devDependencies": {