@scalar/api-client 2.4.2 → 2.4.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - fbcce50: fix: adds server selector x axis overflow for long content
8
+ - Updated dependencies [ca8d9bc]
9
+ - @scalar/use-codemirror@0.12.2
10
+
3
11
  ## 2.4.2
4
12
 
5
13
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerSelector.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAYzE,KAAK,WAAW,GAAG;IACjB,qBAAqB;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;AAqLF,wBAOG"}
1
+ {"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerSelector.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAYzE,KAAK,WAAW,GAAG;IACjB,qBAAqB;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;AA0LF,wBAOG"}
@@ -1,10 +1,10 @@
1
- import { defineComponent as h, computed as a, watch as y, createBlock as k, createElementBlock as U, openBlock as m, unref as n, withCtx as f, createVNode as S, createElementVNode as g, createTextVNode as p, toDisplayString as x } from "vue";
2
- import { ScalarListbox as V, ScalarButton as b, ScalarIcon as B } from "@scalar/components";
3
- import { useWorkspace as N } from "../../store/store.js";
4
- const W = {
1
+ import { defineComponent as w, computed as n, watch as h, createBlock as y, createElementBlock as k, openBlock as m, unref as i, withCtx as p, createVNode as x, createElementVNode as o, toDisplayString as S } from "vue";
2
+ import { ScalarListbox as U, ScalarButton as b, ScalarIcon as V } from "@scalar/components";
3
+ import { useWorkspace as B } from "../../store/store.js";
4
+ const W = { class: "overflow-x-auto" }, z = {
5
5
  key: 1,
6
6
  class: "gap-0.75 text-c-1 h-6.5 flex w-full items-center whitespace-nowrap rounded-b-lg px-3 py-1.5 text-xs lg:text-sm"
7
- }, E = /* @__PURE__ */ h({
7
+ }, C = { class: "overflow-x-auto" }, j = /* @__PURE__ */ w({
8
8
  __name: "ServerSelector",
9
9
  props: {
10
10
  collection: {},
@@ -12,8 +12,8 @@ const W = {
12
12
  target: {}
13
13
  },
14
14
  emits: ["updateServer"],
15
- setup(l, { emit: w }) {
16
- const i = w, { servers: s, collectionMutators: c } = N(), o = a(
15
+ setup(l, { emit: g }) {
16
+ const c = g, { servers: s, collectionMutators: u } = B(), a = n(
17
17
  () => {
18
18
  var t;
19
19
  return (t = l.collection) == null ? void 0 : t.servers.map((e) => {
@@ -24,54 +24,54 @@ const W = {
24
24
  };
25
25
  });
26
26
  }
27
- ), u = a({
28
- get: () => l.server ? o.value.find((t) => t.id === l.server.uid) : void 0,
27
+ ), d = n({
28
+ get: () => l.server ? a.value.find((t) => t.id === l.server.uid) : void 0,
29
29
  set: (t) => {
30
30
  var r;
31
31
  if (!t)
32
32
  return;
33
- c.edit(
33
+ u.edit(
34
34
  l.collection.uid,
35
35
  "selectedServerUid",
36
36
  t.id
37
37
  );
38
38
  const e = (r = s[t.id]) == null ? void 0 : r.url;
39
- e && i("updateServer", e);
39
+ e && c("updateServer", e);
40
40
  }
41
41
  });
42
- y(
42
+ h(
43
43
  () => l.collection,
44
44
  (t) => {
45
- var r, v;
45
+ var r, f;
46
46
  if (!t || t.selectedServerUid)
47
47
  return;
48
48
  const e = (r = l.collection.servers) == null ? void 0 : r[0];
49
- e && (c.edit(l.collection.uid, "selectedServerUid", e), (v = s[e]) != null && v.url && i("updateServer", s[e].url));
49
+ e && (u.edit(l.collection.uid, "selectedServerUid", e), (f = s[e]) != null && f.url && c("updateServer", s[e].url));
50
50
  }
51
51
  );
52
- const d = a(() => {
52
+ const v = n(() => {
53
53
  var t, e, r;
54
54
  return (e = (t = l.server) == null ? void 0 : t.url) != null && e.endsWith("/") ? l.server.url.slice(0, -1) : ((r = l.server) == null ? void 0 : r.url) || "";
55
55
  });
56
- return (t, e) => o.value.length > 1 ? (m(), k(n(V), {
56
+ return (t, e) => a.value.length > 1 ? (m(), y(i(U), {
57
57
  key: 0,
58
- modelValue: u.value,
59
- "onUpdate:modelValue": e[0] || (e[0] = (r) => u.value = r),
60
- options: o.value,
58
+ modelValue: d.value,
59
+ "onUpdate:modelValue": e[0] || (e[0] = (r) => d.value = r),
60
+ options: a.value,
61
61
  placement: "bottom-start",
62
62
  resize: "",
63
63
  target: t.target,
64
64
  teleport: `#${t.target}`
65
65
  }, {
66
- default: f(() => [
67
- S(n(b), {
68
- class: "gap-0.75 text-c-1 h-6.5 w-full justify-start whitespace-nowrap rounded-b-lg px-3 py-1.5 text-xs font-normal -outline-offset-1 lg:text-sm",
66
+ default: p(() => [
67
+ x(i(b), {
68
+ class: "gap-0.75 text-c-1 h-6.5 w-full justify-start overflow-x-auto whitespace-nowrap rounded-b-lg px-3 py-1.5 text-xs font-normal -outline-offset-1 lg:text-sm",
69
69
  variant: "ghost"
70
70
  }, {
71
- default: f(() => [
72
- e[1] || (e[1] = g("span", { class: "sr-only" }, "Server:", -1)),
73
- p(" " + x(d.value) + " ", 1),
74
- S(n(B), {
71
+ default: p(() => [
72
+ e[1] || (e[1] = o("span", { class: "sr-only" }, "Server:", -1)),
73
+ o("span", W, S(v.value), 1),
74
+ x(i(V), {
75
75
  class: "text-c-2",
76
76
  icon: "ChevronDown",
77
77
  size: "sm"
@@ -81,12 +81,12 @@ const W = {
81
81
  })
82
82
  ]),
83
83
  _: 1
84
- }, 8, ["modelValue", "options", "target", "teleport"])) : (m(), U("div", W, [
85
- e[2] || (e[2] = g("span", { class: "sr-only" }, "Server:", -1)),
86
- p(" " + x(d.value), 1)
84
+ }, 8, ["modelValue", "options", "target", "teleport"])) : (m(), k("div", z, [
85
+ e[2] || (e[2] = o("span", { class: "sr-only" }, "Server:", -1)),
86
+ o("span", C, S(v.value), 1)
87
87
  ]));
88
88
  }
89
89
  });
90
90
  export {
91
- E as default
91
+ j as default
92
92
  };
@@ -34,7 +34,7 @@ const W = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, $ = {
34
34
  }));
35
35
  }, k = (o) => {
36
36
  o != null && o.createNew && x.name === "request" && f();
37
- }, w = "2.4.2";
37
+ }, w = "2.4.3";
38
38
  return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (u(), l("div", W, [
39
39
  s("div", {
40
40
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.4.2",
21
+ "version": "2.4.3",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -208,17 +208,17 @@
208
208
  "@scalar/draggable": "0.2.0",
209
209
  "@scalar/icons": "0.4.1",
210
210
  "@scalar/import": "0.4.2",
211
+ "@scalar/object-utils": "1.2.1",
211
212
  "@scalar/oas-utils": "0.3.1",
213
+ "@scalar/openapi-parser": "0.11.1",
212
214
  "@scalar/openapi-types": "0.3.1",
213
- "@scalar/themes": "0.12.1",
214
215
  "@scalar/postman-to-openapi": "0.3.1",
215
- "@scalar/object-utils": "1.2.1",
216
- "@scalar/openapi-parser": "0.11.1",
216
+ "@scalar/themes": "0.12.1",
217
217
  "@scalar/types": "0.2.1",
218
- "@scalar/use-codemirror": "0.12.1",
218
+ "@scalar/use-codemirror": "0.12.2",
219
+ "@scalar/use-hooks": "0.2.1",
219
220
  "@scalar/snippetz": "0.3.0",
220
221
  "@scalar/use-toasts": "0.8.0",
221
- "@scalar/use-hooks": "0.2.1",
222
222
  "@scalar/use-tooltip": "1.1.0"
223
223
  },
224
224
  "devDependencies": {