@scalar/api-client 2.0.55 → 2.0.57

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 (38) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  4. package/dist/components/CodeInput/CodeInput.vue2.js +6 -6
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  7. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +45 -45
  8. package/dist/components/Search/useSearch.d.ts +29 -0
  9. package/dist/components/Search/useSearch.d.ts.map +1 -0
  10. package/dist/components/Search/useSearch.js +62 -0
  11. package/dist/layouts/App/create-api-client-app.d.ts +13 -13
  12. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  13. package/dist/layouts/Modal/create-api-client-modal.d.ts +26 -26
  14. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  15. package/dist/libs/create-client.d.ts +13 -13
  16. package/dist/libs/create-client.d.ts.map +1 -1
  17. package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -3
  18. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  19. package/dist/libs/event-busses/hot-keys-bus.js +17 -16
  20. package/dist/libs/local-storage.js +1 -1
  21. package/dist/store/workspace.d.ts +26 -26
  22. package/dist/store/workspace.d.ts.map +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  25. package/dist/views/Request/Request.vue.js +2 -2
  26. package/dist/views/Request/Request.vue2.js +259 -215
  27. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  28. package/dist/views/Request/RequestSection/RequestParams.vue.js +45 -41
  29. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  30. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +31 -25
  31. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  32. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  33. package/dist/views/Request/RequestSidebarItem.vue2.js +16 -17
  34. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  35. package/dist/views/Request/components/WorkspaceDropdown.vue.js +20 -21
  36. package/package.json +5 -5
  37. package/dist/components/Search/SearchButton.vue.js +0 -7
  38. package/dist/components/Search/SearchButton.vue2.js +0 -30
@@ -1,88 +1,92 @@
1
- import { defineComponent as K, computed as d, onMounted as P, ref as $, watch as x, openBlock as E, createBlock as T, withCtx as i, createTextVNode as y, toDisplayString as A, createElementVNode as R, createVNode as g, unref as B, withModifiers as M, nextTick as h } from "vue";
1
+ import { defineComponent as x, computed as d, onMounted as C, ref as K, watch as $, openBlock as E, createBlock as T, withCtx as i, createTextVNode as y, toDisplayString as A, createElementVNode as R, createVNode as g, unref as B, withModifiers as M, nextTick as h } from "vue";
2
2
  import N from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
3
  import { useWorkspace as S } from "../../../store/workspace.js";
4
4
  import V from "./RequestTable.vue.js";
5
5
  import { ScalarButton as W } from "@scalar/components";
6
6
  import { createRequestExampleParameter as _ } from "@scalar/oas-utils/entities/workspace/spec";
7
- const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 request-meta-buttons" }, O = /* @__PURE__ */ K({
7
+ const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 request-meta-buttons" }, O = /* @__PURE__ */ x({
8
8
  __name: "RequestParams",
9
9
  props: {
10
10
  title: {},
11
11
  paramKey: {}
12
12
  },
13
13
  setup(k) {
14
- const s = k, { activeRequest: n, activeExample: t, requestExampleMutators: u } = S(), l = d(
14
+ const s = k, { activeRequest: n, activeExample: a, requestExampleMutators: u } = S(), r = d(
15
15
  () => {
16
16
  var e;
17
- return ((e = t.value) == null ? void 0 : e.parameters[s.paramKey]) ?? [];
17
+ return ((e = a.value) == null ? void 0 : e.parameters[s.paramKey]) ?? [];
18
18
  }
19
19
  );
20
- P(() => {
20
+ C(() => {
21
21
  c();
22
22
  });
23
23
  const o = () => {
24
- if (!n.value || !t.value) return;
25
- const e = _({ enabled: !1 }), r = [...l.value, e];
24
+ if (!n.value || !a.value) return;
25
+ const e = _({ enabled: !1 }), t = [...r.value, e];
26
26
  u.edit(
27
- t.value.uid,
27
+ a.value.uid,
28
28
  `parameters.${s.paramKey}`,
29
- r
29
+ t
30
30
  );
31
- }, p = $(null), b = (e, r, m) => {
32
- if (!n.value || !t.value) return;
33
- const f = l.value;
31
+ }, p = K(null), b = (e, t, m) => {
32
+ if (!n.value || !a.value) return;
33
+ const f = r.value;
34
34
  if (f.length > e) {
35
- const a = [...f];
36
- a[e] = { ...a[e], [r]: m }, (a[e].key !== "" || a[e].value !== "") && (a[e].enabled = !0), a[e].key === "" && a[e].value === "" && a.splice(e, 1), u.edit(
37
- t.value.uid,
35
+ const l = [...f];
36
+ l[e] = { ...l[e], [t]: m }, (l[e].key !== "" || l[e].value !== "") && (l[e].enabled = !0), l[e].key === "" && l[e].value === "" && l.splice(e, 1), u.edit(
37
+ a.value.uid,
38
38
  `parameters.${s.paramKey}`,
39
- a
39
+ l
40
40
  );
41
41
  } else {
42
- const a = [_({ [r]: m })];
42
+ const l = [_({ [t]: m })];
43
43
  u.edit(
44
- t.value.uid,
44
+ a.value.uid,
45
45
  `parameters.${s.paramKey}`,
46
- a
46
+ l
47
47
  ), h(() => {
48
48
  var v;
49
49
  if (!p.value) return;
50
- (v = p.value.querySelectorAll("input")[r === "key" ? 0 : 1]) == null || v.focus();
50
+ (v = p.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || v.focus();
51
51
  });
52
52
  }
53
- }, q = (e, r) => n.value && t.value && u.edit(
54
- t.value.uid,
53
+ }, q = (e, t) => n.value && a.value && u.edit(
54
+ a.value.uid,
55
55
  `parameters.${s.paramKey}.${e}.enabled`,
56
- r
57
- ), w = () => {
58
- !n.value || !t.value || (u.edit(
59
- t.value.uid,
56
+ t
57
+ ), P = () => {
58
+ if (!n.value || !a.value) return;
59
+ const e = r.value.filter(
60
+ (t) => t.enabled || t.required
61
+ );
62
+ u.edit(
63
+ a.value.uid,
60
64
  `parameters.${s.paramKey}`,
61
- []
65
+ e
62
66
  ), h(() => {
63
67
  o();
64
- }));
68
+ });
65
69
  };
66
70
  function c() {
67
- if (l.value.length === 0)
71
+ if (r.value.length === 0)
68
72
  o();
69
- else if (l.value.length >= 1) {
70
- const e = l.value[l.value.length - 1];
73
+ else if (r.value.length >= 1) {
74
+ const e = r.value[r.value.length - 1];
71
75
  e.key !== "" && e.value !== "" && o();
72
76
  }
73
77
  }
74
- const C = d(
75
- () => l.value.filter((e) => e.key || e.value).length
78
+ const w = d(
79
+ () => r.value.filter((e) => e.key || e.value).length
76
80
  );
77
- return x(
78
- () => t.value,
79
- (e, r) => {
80
- e !== r && c();
81
+ return $(
82
+ () => a.value,
83
+ (e, t) => {
84
+ e !== t && c();
81
85
  },
82
86
  { immediate: !0 }
83
- ), (e, r) => (E(), T(N, {
87
+ ), (e, t) => (E(), T(N, {
84
88
  class: "group/params",
85
- itemCount: C.value
89
+ itemCount: w.value
86
90
  }, {
87
91
  title: i(() => [
88
92
  y(A(e.title), 1)
@@ -93,7 +97,7 @@ const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
93
97
  class: "px-1 transition-none",
94
98
  size: "sm",
95
99
  variant: "ghost",
96
- onClick: M(w, ["stop"])
100
+ onClick: M(P, ["stop"])
97
101
  }, {
98
102
  default: i(() => [
99
103
  y(" Clear ")
@@ -110,7 +114,7 @@ const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
110
114
  g(V, {
111
115
  class: "flex-1",
112
116
  columns: ["32px", "", ""],
113
- items: l.value,
117
+ items: r.value,
114
118
  onAddRow: o,
115
119
  onToggleRow: q,
116
120
  onUpdateRow: b
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;UAI1D,uBAAuB;;UAAvB,uBAAuB;;AA2JrD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;UAK1D,uBAAuB;;UAAvB,uBAAuB;;AA6JrD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,37 +1,43 @@
1
- import { defineComponent as m, openBlock as t, createBlock as c, unref as i, withCtx as a, createElementVNode as n, createVNode as l, createElementBlock as o, toDisplayString as s, createCommentVNode as r } from "vue";
2
- import { ScalarTooltip as f, ScalarIcon as p } from "@scalar/components";
3
- const d = { class: "pl-1 pr-1.5 py-[9px]" }, b = { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, h = { class: "flex items-center text-c-2" }, u = { key: 0 }, g = {
1
+ import { defineComponent as l, computed as f, openBlock as t, createBlock as p, unref as i, withCtx as n, createElementVNode as m, createVNode as d, createElementBlock as o, toDisplayString as r, createCommentVNode as s } from "vue";
2
+ import { ScalarTooltip as u, ScalarIcon as b } from "@scalar/components";
3
+ const x = { class: "pl-1 pr-1.5 py-[9px]" }, h = { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, _ = {
4
+ key: 0,
5
+ class: "flex items-center text-c-2"
6
+ }, g = { key: 0 }, k = {
4
7
  key: 1,
5
8
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex"
6
- }, x = {
9
+ }, y = {
7
10
  key: 2,
8
11
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex whitespace-nowrap"
9
- }, _ = {
12
+ }, w = {
10
13
  key: 3,
11
14
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex whitespace-nowrap"
12
- }, k = {
15
+ }, v = {
13
16
  key: 4,
14
17
  class: "before:content-['·'] before:block before:mx-[0.5ch] flex whitespace-nowrap"
15
- }, y = {
16
- key: 0,
18
+ }, C = {
19
+ key: 1,
17
20
  class: "leading-snug text-pretty text-sm",
18
21
  style: { maxWidth: "16rem" }
19
- }, B = /* @__PURE__ */ m({
22
+ }, S = /* @__PURE__ */ l({
20
23
  __name: "RequestTableTooltip",
21
24
  props: {
22
25
  item: {}
23
26
  },
24
- setup(w) {
25
- return (e, v) => (t(), c(i(f), {
27
+ setup(a) {
28
+ const e = a, c = f(
29
+ () => e.item.type || e.item.format || e.item.minimum || e.item.maximum || e.item.default
30
+ );
31
+ return (z, B) => (t(), p(i(u), {
26
32
  align: "start",
27
33
  class: "w-full",
28
34
  delay: 0,
29
35
  side: "left",
30
36
  triggerClass: "before:absolute before:content-[''] before:bg-gradient-to-r before:from-transparent before:to-b-1 before:min-h-full before:right-[23px] before:w-3 absolute h-8 right-0"
31
37
  }, {
32
- trigger: a(() => [
33
- n("div", d, [
34
- l(i(p), {
38
+ trigger: n(() => [
39
+ m("div", x, [
40
+ d(i(b), {
35
41
  class: "text-c-3 group-hover/info:text-c-1",
36
42
  icon: "Info",
37
43
  size: "sm",
@@ -39,16 +45,16 @@ const d = { class: "pl-1 pr-1.5 py-[9px]" }, b = { class: "grid gap-1.5 pointer-
39
45
  })
40
46
  ])
41
47
  ]),
42
- content: a(() => [
43
- n("div", b, [
44
- n("div", h, [
45
- e.item.type ? (t(), o("span", u, s(e.item.type), 1)) : r("", !0),
46
- e.item.format ? (t(), o("span", g, s(e.item.format), 1)) : r("", !0),
47
- e.item.minimum ? (t(), o("span", x, "min: " + s(e.item.minimum), 1)) : r("", !0),
48
- e.item.maximum ? (t(), o("span", _, "max: " + s(e.item.maximum), 1)) : r("", !0),
49
- e.item.default ? (t(), o("span", k, "default: " + s(e.item.default), 1)) : r("", !0)
50
- ]),
51
- e.item.description ? (t(), o("span", y, s(e.item.description), 1)) : r("", !0)
48
+ content: n(() => [
49
+ m("div", h, [
50
+ c.value ? (t(), o("div", _, [
51
+ e.item.type ? (t(), o("span", g, r(e.item.type), 1)) : s("", !0),
52
+ e.item.format ? (t(), o("span", k, r(e.item.format), 1)) : s("", !0),
53
+ e.item.minimum ? (t(), o("span", y, "min: " + r(e.item.minimum), 1)) : s("", !0),
54
+ e.item.maximum ? (t(), o("span", w, "max: " + r(e.item.maximum), 1)) : s("", !0),
55
+ e.item.default ? (t(), o("span", v, "default: " + r(e.item.default), 1)) : s("", !0)
56
+ ])) : s("", !0),
57
+ e.item.description ? (t(), o("span", C, r(e.item.description), 1)) : s("", !0)
52
58
  ])
53
59
  ]),
54
60
  _: 1
@@ -56,5 +62,5 @@ const d = { class: "pl-1 pr-1.5 py-[9px]" }, b = { class: "grid gap-1.5 pointer-
56
62
  }
57
63
  });
58
64
  export {
59
- B as default
65
+ S as default
60
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAweA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAA;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;AAkPlD,iBAAS,cAAc;gBA/MT,IAAI;;gBAAJ,IAAI;EAg3BjB;AACD,QAAA,MAAM,eAAe;IA34BjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;IAdpD;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAA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AC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import o from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-17dc8b59"]]);
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f405c234"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as fe, useCssVars as ce, computed as n, ref as H, resolveComponent as ve, openBlock as m, createElementBlock as M, Fragment as G, createElementVNode as l, normalizeClass as v, unref as i, createVNode as o, withCtx as d, createBlock as b, toDisplayString as J, createCommentVNode as y, createTextVNode as D, renderSlot as be, withDirectives as ge, renderList as he, vShow as Ue, withKeys as we, withModifiers as ye, pushScopeId as De, popScopeId as ke } from "vue";
1
+ import { defineComponent as pe, useCssVars as ce, computed as n, ref as H, resolveComponent as ve, openBlock as m, createElementBlock as M, Fragment as G, createElementVNode as l, normalizeClass as v, unref as i, createVNode as o, withCtx as d, createBlock as b, toDisplayString as J, createCommentVNode as y, createTextVNode as D, renderSlot as be, withDirectives as ge, renderList as he, vShow as Ue, withKeys as we, withModifiers as ye, pushScopeId as De, popScopeId as ke } from "vue";
2
2
  import qe from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
3
  import { PathId as I } from "../../router.js";
4
4
  import { useWorkspace as Re } from "../../store/workspace.js";
@@ -8,7 +8,7 @@ import { useRouter as Ce, RouterLink as Me } from "vue-router";
8
8
  import q from "./RequestSidebarItemMenu.vue.js";
9
9
  import Ie from "../../components/HttpMethod/HttpMethod.vue.js";
10
10
  import { useSidebar as Te } from "../../hooks/useSidebar.js";
11
- const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex flex-row gap-1 items-center" }, Ne = { class: "relative" }, Ve = { class: "flex items-start" }, Oe = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Fe = { class: "relative flex h-fit" }, je = /* @__PURE__ */ Ee(() => /* @__PURE__ */ l("span", null, " ", -1)), Ke = { key: 2 }, Le = { class: "flex gap-3" }, _ = "hover:bg-sidebar-active-b indent-padding-left", _e = /* @__PURE__ */ fe({
11
+ const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex flex-row gap-1 items-center" }, Ne = { class: "relative" }, Ve = { class: "flex items-start" }, Oe = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Fe = { class: "relative flex h-fit" }, je = /* @__PURE__ */ Ee(() => /* @__PURE__ */ l("span", null, " ", -1)), Ke = { key: 2 }, Le = { class: "flex gap-3" }, _ = "hover:bg-sidebar-active-b indent-padding-left", _e = /* @__PURE__ */ pe({
12
12
  __name: "RequestSidebarItem",
13
13
  props: {
14
14
  isDraggable: { type: Boolean, default: !1 },
@@ -19,8 +19,8 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
19
19
  emits: ["onDragEnd"],
20
20
  setup(g) {
21
21
  ce((e) => ({
22
- "4035a823": se.value,
23
- d307928a: le.value
22
+ 49329293: se.value,
23
+ f2dc136a: le.value
24
24
  }));
25
25
  const t = g, {
26
26
  activeRequest: T,
@@ -50,10 +50,10 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
50
50
  if (!S.value) return { ceiling: e, floor: s };
51
51
  const { draggingItem: w } = S.value;
52
52
  return !E[w == null ? void 0 : w.id] && K.value ? (e = 1, s = 0) : ie.value && !L.value && !K.value && (e = 0.8, s = 0.2), { ceiling: e, floor: s };
53
- }), de = (e, s) => !(h.value.isReadOnly || $[s.id] || E[e.id]), f = H(""), k = Q(), U = Q(), P = () => {
54
- "summary" in t.item ? O.edit(t.item.uid, "summary", f.value) : "requestUid" in t.item ? B.edit(t.item.uid, "name", f.value) : "spec" in t.item ? N.edit(t.item.uid, "spec.info.title", f.value) : V.edit(t.item.uid, "name", f.value), k.hide();
53
+ }), de = (e, s) => !(h.value.isReadOnly || $[s.id] || E[e.id]), p = H(""), k = Q(), U = Q(), P = () => {
54
+ "summary" in t.item ? O.edit(t.item.uid, "summary", p.value) : "requestUid" in t.item ? B.edit(t.item.uid, "name", p.value) : "spec" in t.item ? N.edit(t.item.uid, "spec.info.title", p.value) : V.edit(t.item.uid, "name", p.value), k.hide();
55
55
  }, C = () => {
56
- f.value = x(t.item) || "", k.show();
56
+ p.value = x(t.item) || "", k.show();
57
57
  }, ue = () => {
58
58
  "requestUid" in t.item ? (B.delete(t.item), R.value[I.Examples] === t.item.uid && F(`/workspace/${h.value}/request/default`)) : "summary" in t.item ? (O.delete(
59
59
  t.item,
@@ -84,10 +84,10 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
84
84
  isDraggable: e.isDraggable,
85
85
  isDroppable: e.isDroppable,
86
86
  parentIds: e.parentUids,
87
- onOnDragEnd: s[5] || (s[5] = (...p) => e.$emit("onDragEnd", ...p))
87
+ onOnDragEnd: s[5] || (s[5] = (...f) => e.$emit("onDragEnd", ...f))
88
88
  }, {
89
89
  default: d(() => {
90
- var p, A;
90
+ var f, A;
91
91
  return [
92
92
  "summary" in e.item || "requestUid" in e.item ? (m(), b(i(Me), {
93
93
  key: 0,
@@ -146,7 +146,7 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
146
146
  _: 1
147
147
  }, 8, ["to"])) : !i(a) || e.parentUids.length ? (m(), b(i(X), {
148
148
  key: 1,
149
- disabled: i(a) || ((A = (p = e.item.spec) == null ? void 0 : p.info) == null ? void 0 : A.title) === "Drafts"
149
+ disabled: i(a) || ((A = (f = e.item.spec) == null ? void 0 : f.info) == null ? void 0 : A.title) === "Drafts"
150
150
  }, {
151
151
  trigger: d(() => {
152
152
  var r, u;
@@ -154,7 +154,7 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
154
154
  l("button", {
155
155
  class: v(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", _]),
156
156
  type: "button",
157
- onClick: s[2] || (s[2] = (pe) => i(te)(e.item.uid))
157
+ onClick: s[2] || (s[2] = (fe) => i(te)(e.item.uid))
158
158
  }, [
159
159
  l("span", Oe, [
160
160
  be(e.$slots, "leftIcon", {}, () => [
@@ -201,7 +201,7 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
201
201
  parentUids: e.parentUids,
202
202
  resourceTitle: c.value,
203
203
  static: "",
204
- onDelete: s[3] || (s[3] = (pe) => i(U).show()),
204
+ onDelete: s[3] || (s[3] = (fe) => i(U).show()),
205
205
  onRename: C
206
206
  }, null, 8, ["item", "parentUids", "resourceTitle"])) : y("", !0)
207
207
  ];
@@ -237,7 +237,7 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
237
237
  o(qe, {
238
238
  variableName: me.value,
239
239
  warningMessage: "Warning: Deleting this will delete all items inside of this",
240
- onClose: s[6] || (s[6] = (p) => i(U).hide()),
240
+ onClose: s[6] || (s[6] = (f) => i(U).hide()),
241
241
  onDelete: ue
242
242
  }, null, 8, ["variableName"])
243
243
  ]),
@@ -249,17 +249,16 @@ const Ee = (g) => (De("data-v-17dc8b59"), g = g(), ke(), g), ze = { class: "flex
249
249
  }, {
250
250
  default: d(() => [
251
251
  o(i(xe), {
252
- modelValue: f.value,
253
- "onUpdate:modelValue": s[7] || (s[7] = (p) => f.value = p),
252
+ modelValue: p.value,
253
+ "onUpdate:modelValue": s[7] || (s[7] = (f) => p.value = f),
254
254
  label: c.value,
255
- labelShadowColor: "var(--scalar-background-1)",
256
255
  onKeydown: we(ye(P, ["prevent"]), ["enter"])
257
256
  }, null, 8, ["modelValue", "label", "onKeydown"]),
258
257
  l("div", Le, [
259
258
  o(i(Z), {
260
259
  class: "flex-1",
261
260
  variant: "outlined",
262
- onClick: s[8] || (s[8] = (p) => i(k).hide())
261
+ onClick: s[8] || (s[8] = (f) => i(k).hide())
263
262
  }, {
264
263
  default: d(() => [
265
264
  D(" Cancel ")
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAs7BA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAq7BA,wBAKG"}
@@ -1,36 +1,36 @@
1
- import { defineComponent as K, computed as O, ref as W, openBlock as p, createElementBlock as D, Fragment as S, createElementVNode as a, createVNode as t, unref as e, withCtx as s, renderList as U, createBlock as x, withModifiers as w, normalizeClass as A, createTextVNode as k, toDisplayString as z, withKeys as F } from "vue";
1
+ import { defineComponent as K, computed as O, ref as W, openBlock as p, createElementBlock as D, Fragment as S, createElementVNode as n, createVNode as t, unref as e, withCtx as s, renderList as U, createBlock as x, withModifiers as w, normalizeClass as A, createTextVNode as k, toDisplayString as z, withKeys as F } from "vue";
2
2
  import I from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
3
  import { useWorkspace as L } from "../../../store/workspace.js";
4
4
  import { useModal as $, ScalarDropdown as N, ScalarContextMenu as P, ScalarDropdownItem as m, ScalarIcon as c, ScalarTooltip as q, ScalarDropdownDivider as G, ScalarButton as _, ScalarModal as V, ScalarTextField as H } from "@scalar/components";
5
5
  import { useRouter as J } from "vue-router";
6
6
  import { commandPaletteBus as Q } from "../../../libs/event-busses/command-palette-bus.js";
7
- const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm" }, Y = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Z = /* @__PURE__ */ a("span", null, "Rename", -1), ee = /* @__PURE__ */ a("span", null, "Delete", -1), te = /* @__PURE__ */ a("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
8
- /* @__PURE__ */ a("div", { class: "flex items-center text-c-2" }, [
9
- /* @__PURE__ */ a("span", null, "Only workspace cannot be deleted.")
7
+ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm" }, Y = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Z = /* @__PURE__ */ n("span", null, "Rename", -1), ee = /* @__PURE__ */ n("span", null, "Delete", -1), te = /* @__PURE__ */ n("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
8
+ /* @__PURE__ */ n("div", { class: "flex items-center text-c-2" }, [
9
+ /* @__PURE__ */ n("span", null, "Only workspace cannot be deleted.")
10
10
  ])
11
- ], -1), se = /* @__PURE__ */ a("span", null, "Delete", -1), ae = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ a("span", null, "Create new workspace", -1), le = { class: "flex gap-3" }, me = /* @__PURE__ */ K({
11
+ ], -1), se = /* @__PURE__ */ n("span", null, "Delete", -1), ne = { class: "flex items-center justify-center h-4 w-4" }, ae = /* @__PURE__ */ n("span", null, "Create new workspace", -1), le = { class: "flex gap-3" }, me = /* @__PURE__ */ K({
12
12
  __name: "WorkspaceDropdown",
13
13
  setup(oe) {
14
- const { activeWorkspace: f, workspaces: d, workspaceMutators: g } = L(), { push: b } = J(), j = (n) => {
15
- n !== f.value.uid && b(`/workspace/${n}`);
16
- }, y = O(() => Object.keys(d).length === 1), B = () => Q.emit({ commandName: "Create Workspace" }), o = W(""), r = W(""), v = $(), h = $(), R = (n) => {
17
- o.value = d[n].name, r.value = n, v.show();
14
+ const { activeWorkspace: f, workspaces: d, workspaceMutators: g } = L(), { push: b } = J(), j = (a) => {
15
+ a !== f.value.uid && b(`/workspace/${a}`);
16
+ }, y = O(() => Object.keys(d).length === 1), B = () => Q.emit({ commandName: "Create Workspace" }), o = W(""), r = W(""), v = $(), h = $(), R = (a) => {
17
+ o.value = d[a].name, r.value = a, v.show();
18
18
  }, C = () => {
19
19
  o.value.trim() && (g.rename(r.value, o.value.trim()), v.hide());
20
- }, T = (n) => {
21
- o.value = d[n].name, r.value = n, h.show();
20
+ }, T = (a) => {
21
+ o.value = d[a].name, r.value = a, h.show();
22
22
  }, E = async () => {
23
23
  if (!y.value) {
24
- const n = f.value.uid === r.value, l = { ...d };
25
- if (delete l[r.value], g.delete(r.value), n) {
24
+ const a = f.value.uid === r.value, l = { ...d };
25
+ if (delete l[r.value], g.delete(r.value), a) {
26
26
  const i = Object.keys(l)[0];
27
27
  await b(`/workspace/${i}/`);
28
28
  }
29
29
  }
30
30
  h.hide();
31
31
  };
32
- return (n, l) => (p(), D(S, null, [
33
- a("div", X, [
32
+ return (a, l) => (p(), D(S, null, [
33
+ n("div", X, [
34
34
  t(e(N), null, {
35
35
  items: s(() => [
36
36
  (p(!0), D(S, null, U(e(d), (i, u) => (p(), x(e(P), { key: u }, {
@@ -40,7 +40,7 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
40
40
  onClick: w((M) => j(u), ["stop"])
41
41
  }, {
42
42
  default: s(() => [
43
- a("div", {
43
+ n("div", {
44
44
  class: A([
45
45
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
46
46
  e(f).uid === u ? "bg-blue text-b-1" : "text-transparent"
@@ -131,14 +131,14 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
131
131
  onClick: B
132
132
  }, {
133
133
  default: s(() => [
134
- a("div", ae, [
134
+ n("div", ne, [
135
135
  t(e(c), {
136
136
  class: "h-2.5",
137
137
  icon: "Add",
138
138
  thickness: "3"
139
139
  })
140
140
  ]),
141
- ne
141
+ ae
142
142
  ]),
143
143
  _: 1
144
144
  })
@@ -150,7 +150,7 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
150
150
  variant: "ghost"
151
151
  }, {
152
152
  default: s(() => [
153
- a("h2", Y, [
153
+ n("h2", Y, [
154
154
  k(z(e(f).name) + " ", 1),
155
155
  t(e(c), {
156
156
  class: "size-2.5",
@@ -189,10 +189,9 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
189
189
  modelValue: o.value,
190
190
  "onUpdate:modelValue": l[2] || (l[2] = (i) => o.value = i),
191
191
  label: "Workspace",
192
- labelShadowColor: "var(--scalar-background-1)",
193
192
  onKeydown: F(w(C, ["prevent"]), ["enter"])
194
193
  }, null, 8, ["modelValue", "onKeydown"]),
195
- a("div", le, [
194
+ n("div", le, [
196
195
  t(e(_), {
197
196
  class: "flex-1",
198
197
  variant: "outlined",
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.55",
21
+ "version": "2.0.57",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -127,12 +127,12 @@
127
127
  "vue-router": "^4.3.0",
128
128
  "whatwg-mimetype": "^4.0.0",
129
129
  "zod": "^3.22.4",
130
- "@scalar/components": "0.12.36",
130
+ "@scalar/components": "0.12.38",
131
131
  "@scalar/draggable": "0.1.4",
132
- "@scalar/oas-utils": "0.2.35",
133
- "@scalar/themes": "0.9.25",
132
+ "@scalar/oas-utils": "0.2.37",
134
133
  "@scalar/object-utils": "1.1.7",
135
- "@scalar/types": "0.0.2",
134
+ "@scalar/themes": "0.9.26",
135
+ "@scalar/types": "0.0.3",
136
136
  "@scalar/use-codemirror": "0.11.10",
137
137
  "@scalar/use-tooltip": "1.0.2",
138
138
  "@scalar/use-toasts": "0.7.5"
@@ -1,7 +0,0 @@
1
- import o from "./SearchButton.vue2.js";
2
- /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2c26b5ad"]]);
5
- export {
6
- m as default
7
- };
@@ -1,30 +0,0 @@
1
- import { defineComponent as n, openBlock as r, createElementBlock as a, createElementVNode as t, createVNode as i, unref as p, pushScopeId as d, popScopeId as l } from "vue";
2
- import { ScalarIcon as m } from "@scalar/components";
3
- const u = (e) => (d("data-v-2c26b5ad"), e = e(), l(), e), f = { class: "search-button-fade sticky top-0 z-50 px-3 py-2.5 pb-2.5" }, h = { class: "w-[15px] flex items-center justify-center" }, _ = /* @__PURE__ */ u(() => /* @__PURE__ */ t("div", { class: "sidebar-search-input ml-1.5 flex w-full items-center justify-between text-sm font-medium" }, [
4
- /* @__PURE__ */ t("span", { class: "sidebar-search-placeholder" }, "Search")
5
- ], -1)), v = /* @__PURE__ */ n({
6
- __name: "SearchButton",
7
- emits: ["openSearchModal"],
8
- setup(e, { emit: s }) {
9
- const c = s;
10
- return (x, o) => (r(), a("div", f, [
11
- t("button", {
12
- class: "border-1/2 text-c-2 flex w-full items-center rounded p-1.5",
13
- type: "button",
14
- onClick: o[0] || (o[0] = (b) => c("openSearchModal"))
15
- }, [
16
- t("div", h, [
17
- i(p(m), {
18
- icon: "Search",
19
- size: "xs",
20
- thickness: "2.5"
21
- })
22
- ]),
23
- _
24
- ])
25
- ]));
26
- }
27
- });
28
- export {
29
- v as default
30
- };