@scalar/api-client 2.2.53 → 2.2.54

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,11 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.2.54
4
+
5
+ ### Patch Changes
6
+
7
+ - fdd50b2: fix: auth bottom border on references
8
+
3
9
  ## 2.2.53
4
10
 
5
11
  ### Patch Changes
@@ -7,6 +7,10 @@ type __VLS_Props = {
7
7
  /** The id of the target to use for the popover (e.g. address bar) */
8
8
  target: string;
9
9
  };
10
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
+ updateServer: (server: string) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onUpdateServer?: (server: string) => any;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
15
  export default _default;
12
16
  //# sourceMappingURL=ServerSelector.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerSelector.vue"],"names":[],"mappings":"AA+FA,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;;AAkKF,wBAMG"}
1
+ {"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerSelector.vue"],"names":[],"mappings":"AA2GA,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;;;;;;AAiLF,wBAOG"}
@@ -1,70 +1,75 @@
1
- import { defineComponent as S, computed as s, watch as p, openBlock as u, createBlock as w, unref as n, withCtx as d, createVNode as v, createElementVNode as m, createTextVNode as f, toDisplayString as g, createElementBlock as h } from "vue";
2
- import { ScalarListbox as y, ScalarButton as k, ScalarIcon as V } from "@scalar/components";
3
- import { useWorkspace as b } from "../../store/store.js";
4
- const U = {
1
+ import { defineComponent as h, computed as a, watch as y, openBlock as m, createBlock as k, unref as n, withCtx as f, createVNode as S, createElementVNode as g, createTextVNode as p, toDisplayString as x, createElementBlock as U } 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 = {
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
- }, z = /* @__PURE__ */ S({
7
+ }, E = /* @__PURE__ */ h({
8
8
  __name: "ServerSelector",
9
9
  props: {
10
10
  collection: {},
11
11
  server: {},
12
12
  target: {}
13
13
  },
14
- setup(r) {
15
- const { servers: x, collectionMutators: a } = b(), o = s(
14
+ emits: ["updateServer"],
15
+ setup(l, { emit: w }) {
16
+ const i = w, { servers: s, collectionMutators: c } = N(), o = a(
16
17
  () => {
17
- var e;
18
- return (e = r.collection) == null ? void 0 : e.servers.map((t) => {
19
- var l;
18
+ var t;
19
+ return (t = l.collection) == null ? void 0 : t.servers.map((e) => {
20
+ var r;
20
21
  return {
21
- id: t,
22
- label: ((l = x[t]) == null ? void 0 : l.url) ?? "Unknown server"
22
+ id: e,
23
+ label: ((r = s[e]) == null ? void 0 : r.url) ?? "Unknown server"
23
24
  };
24
25
  });
25
26
  }
26
- ), i = s({
27
- get: () => r.server ? o.value.find((e) => e.id === r.server.uid) : void 0,
28
- set: (e) => {
29
- e && a.edit(
30
- r.collection.uid,
27
+ ), u = a({
28
+ get: () => l.server ? o.value.find((t) => t.id === l.server.uid) : void 0,
29
+ set: (t) => {
30
+ var r;
31
+ if (!t) return;
32
+ c.edit(
33
+ l.collection.uid,
31
34
  "selectedServerUid",
32
- e.id
35
+ t.id
33
36
  );
37
+ const e = (r = s[t.id]) == null ? void 0 : r.url;
38
+ e && i("updateServer", e);
34
39
  }
35
40
  });
36
- p(
37
- () => r.collection,
38
- (e) => {
39
- var l;
40
- if (!e || e.selectedServerUid) return;
41
- const t = (l = r.collection.servers) == null ? void 0 : l[0];
42
- t && a.edit(r.collection.uid, "selectedServerUid", t);
41
+ y(
42
+ () => l.collection,
43
+ (t) => {
44
+ var r, v;
45
+ if (!t || t.selectedServerUid) return;
46
+ const e = (r = l.collection.servers) == null ? void 0 : r[0];
47
+ e && (c.edit(l.collection.uid, "selectedServerUid", e), (v = s[e]) != null && v.url && i("updateServer", s[e].url));
43
48
  }
44
49
  );
45
- const c = s(() => {
46
- var e, t, l;
47
- return (t = (e = r.server) == null ? void 0 : e.url) != null && t.endsWith("/") ? r.server.url.slice(0, -1) : ((l = r.server) == null ? void 0 : l.url) || "";
50
+ const d = a(() => {
51
+ var t, e, r;
52
+ 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) || "";
48
53
  });
49
- return (e, t) => o.value.length > 1 ? (u(), w(n(y), {
54
+ return (t, e) => o.value.length > 1 ? (m(), k(n(V), {
50
55
  key: 0,
51
- modelValue: i.value,
52
- "onUpdate:modelValue": t[0] || (t[0] = (l) => i.value = l),
56
+ modelValue: u.value,
57
+ "onUpdate:modelValue": e[0] || (e[0] = (r) => u.value = r),
53
58
  options: o.value,
54
59
  placement: "bottom-start",
55
60
  resize: "",
56
- target: e.target,
57
- teleport: `#${e.target}`
61
+ target: t.target,
62
+ teleport: `#${t.target}`
58
63
  }, {
59
- default: d(() => [
60
- v(n(k), {
64
+ default: f(() => [
65
+ S(n(b), {
61
66
  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",
62
67
  variant: "ghost"
63
68
  }, {
64
- default: d(() => [
65
- t[1] || (t[1] = m("span", { class: "sr-only" }, "Server:", -1)),
66
- f(" " + g(c.value) + " ", 1),
67
- v(n(V), {
69
+ default: f(() => [
70
+ e[1] || (e[1] = g("span", { class: "sr-only" }, "Server:", -1)),
71
+ p(" " + x(d.value) + " ", 1),
72
+ S(n(B), {
68
73
  class: "text-c-2",
69
74
  icon: "ChevronDown",
70
75
  size: "sm"
@@ -74,12 +79,12 @@ const U = {
74
79
  })
75
80
  ]),
76
81
  _: 1
77
- }, 8, ["modelValue", "options", "target", "teleport"])) : (u(), h("div", U, [
78
- t[2] || (t[2] = m("span", { class: "sr-only" }, "Server:", -1)),
79
- f(" " + g(c.value), 1)
82
+ }, 8, ["modelValue", "options", "target", "teleport"])) : (m(), U("div", W, [
83
+ e[2] || (e[2] = g("span", { class: "sr-only" }, "Server:", -1)),
84
+ p(" " + x(d.value), 1)
80
85
  ]));
81
86
  }
82
87
  });
83
88
  export {
84
- z as default
89
+ E as default
85
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAqEA,KAAK,WAAW,GAAG;IACjB,WAAW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1
1
  import { defineComponent as f, openBlock as o, createBlock as a, unref as l, withCtx as s, createElementVNode as i, createVNode as u, normalizeClass as c, createCommentVNode as r, renderSlot as n, createElementBlock as d, toDisplayString as p, mergeProps as m } from "vue";
2
2
  import { Disclosure as h, DisclosureButton as x, DisclosurePanel as b } from "@headlessui/vue";
3
- import { ScalarIcon as g } from "@scalar/components";
4
- const y = { class: "bg-b-2 flex items-center" }, v = { class: "text-c-1 flex flex-1 items-center gap-1.5" }, C = {
3
+ import { ScalarIcon as y } from "@scalar/components";
4
+ const g = { class: "bg-b-2 flex items-center" }, v = { class: "text-c-1 flex flex-1 items-center gap-1.5" }, C = {
5
5
  key: 0,
6
6
  class: "bg-b-2 text-c-2 text-3xs inline-flex h-4 w-4 items-center justify-center rounded-full border font-semibold"
7
- }, _ = {
7
+ }, k = {
8
8
  key: 0,
9
9
  class: "ui-not-open:invisible flex items-center gap-2 pr-1.5"
10
10
  }, O = /* @__PURE__ */ f({
@@ -14,7 +14,7 @@ const y = { class: "bg-b-2 flex items-center" }, v = { class: "text-c-1 flex fle
14
14
  itemCount: { default: 0 },
15
15
  layout: { default: "client" }
16
16
  },
17
- setup(k) {
17
+ setup(_) {
18
18
  return (e, w) => (o(), a(l(h), {
19
19
  as: "div",
20
20
  class: "group/collapse focus-within:text-c-1 text-c-2 request-item",
@@ -22,16 +22,17 @@ const y = { class: "bg-b-2 flex items-center" }, v = { class: "text-c-1 flex fle
22
22
  static: e.layout === "reference"
23
23
  }, {
24
24
  default: s(({ open: t }) => [
25
- i("div", y, [
25
+ i("div", g, [
26
26
  u(l(x), {
27
27
  class: c([
28
- "hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-sm font-medium outline-none group-last/collapse:border-b md:px-1.5 xl:pl-2 xl:pr-0.5",
29
- { "!pl-3": e.layout === "reference" }
28
+ "hover:text-c-1 group box-content flex max-h-8 flex-1 items-center gap-2.5 overflow-hidden px-1 py-1.5 text-sm font-medium outline-none md:px-1.5 xl:pl-2 xl:pr-0.5",
29
+ { "!pl-3": e.layout === "reference" },
30
+ { "group-last/collapse:border-b": e.layout === "client" }
30
31
  ]),
31
32
  disabled: e.layout === "reference"
32
33
  }, {
33
34
  default: s(() => [
34
- e.layout !== "reference" ? (o(), a(l(g), {
35
+ e.layout !== "reference" ? (o(), a(l(y), {
35
36
  key: 0,
36
37
  class: c([
37
38
  "text-c-3 group-hover:text-c-1 ui-open:rotate-90 ui-not-open:rotate-0 rounded-px outline-offset-2 group-focus-visible:outline"
@@ -46,7 +47,7 @@ const y = { class: "bg-b-2 flex items-center" }, v = { class: "text-c-1 flex fle
46
47
  ]),
47
48
  _: 2
48
49
  }, 1032, ["class", "disabled"]),
49
- e.$slots.actions ? (o(), d("div", _, [
50
+ e.$slots.actions ? (o(), d("div", k, [
50
51
  n(e.$slots, "actions", { open: t })
51
52
  ])) : r("", !0)
52
53
  ]),
@@ -19,7 +19,7 @@ const V = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, _ = {
19
19
  a.commandPalette.emit({ commandName: "Create Request" });
20
20
  }, d = (o) => {
21
21
  o != null && o.createNew && y.name === "request" && u();
22
- }, k = "2.2.53";
22
+ }, k = "2.2.54";
23
23
  return g(() => a.hotKeys.on(d)), R(() => a.hotKeys.off(d)), (o, e) => (n(), m("div", V, [
24
24
  s("div", {
25
25
  class: f(["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.2.53",
21
+ "version": "2.2.54",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -188,22 +188,22 @@
188
188
  "whatwg-mimetype": "^4.0.0",
189
189
  "yaml": "^2.4.5",
190
190
  "zod": "^3.23.8",
191
- "@scalar/draggable": "0.1.11",
192
191
  "@scalar/components": "0.13.27",
193
- "@scalar/import": "0.2.29",
194
192
  "@scalar/icons": "0.1.3",
193
+ "@scalar/import": "0.2.29",
194
+ "@scalar/draggable": "0.1.11",
195
195
  "@scalar/oas-utils": "0.2.109",
196
196
  "@scalar/object-utils": "1.1.13",
197
197
  "@scalar/openapi-parser": "0.10.9",
198
- "@scalar/openapi-types": "0.1.9",
199
198
  "@scalar/postman-to-openapi": "0.1.32",
200
- "@scalar/types": "0.0.36",
201
199
  "@scalar/snippetz": "0.2.15",
202
- "@scalar/use-hooks": "0.1.24",
203
- "@scalar/use-codemirror": "0.11.72",
204
200
  "@scalar/themes": "0.9.70",
205
- "@scalar/use-toasts": "0.7.9",
206
- "@scalar/use-tooltip": "1.0.6"
201
+ "@scalar/openapi-types": "0.1.9",
202
+ "@scalar/use-codemirror": "0.11.72",
203
+ "@scalar/use-hooks": "0.1.24",
204
+ "@scalar/use-tooltip": "1.0.6",
205
+ "@scalar/types": "0.0.36",
206
+ "@scalar/use-toasts": "0.7.9"
207
207
  },
208
208
  "devDependencies": {
209
209
  "@types/shell-quote": "^1.7.5",