@scalar/api-client 2.1.7 → 2.1.8

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 (51) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +48 -21
  4. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  5. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  6. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  7. package/dist/components/IconSelector.vue.d.ts +35 -0
  8. package/dist/components/IconSelector.vue.d.ts.map +1 -0
  9. package/dist/components/IconSelector.vue.js +73 -0
  10. package/dist/components/IconSelector.vue2.js +4 -0
  11. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +24 -0
  12. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -0
  13. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +58 -0
  14. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +4 -0
  15. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.d.ts → EditSidebarListElement.vue.d.ts} +3 -3
  16. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -0
  17. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.js → EditSidebarListElement.vue.js} +9 -9
  18. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +4 -0
  19. package/dist/layouts/App/create-api-client-app.d.ts +32 -20
  20. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  21. package/dist/layouts/Modal/create-api-client-modal.d.ts +64 -40
  22. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  23. package/dist/libs/create-client.d.ts +32 -20
  24. package/dist/libs/create-client.d.ts.map +1 -1
  25. package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
  26. package/dist/store/collections.d.ts +14 -4
  27. package/dist/store/collections.d.ts.map +1 -1
  28. package/dist/store/request-example.d.ts +2 -2
  29. package/dist/store/requests.d.ts +2 -2
  30. package/dist/store/security-schemes.d.ts +4 -4
  31. package/dist/store/store.d.ts +64 -40
  32. package/dist/store/store.d.ts.map +1 -1
  33. package/dist/store/tags.d.ts +4 -4
  34. package/dist/store/workspace.d.ts +4 -4
  35. package/dist/style.css +1 -1
  36. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  37. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  38. package/dist/views/Request/RequestSidebar.vue2.js +73 -74
  39. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  41. package/dist/views/Request/RequestSidebarItem.vue2.js +94 -91
  42. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  44. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +93 -79
  45. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  46. package/dist/views/Request/components/WorkspaceDropdown.vue.js +109 -95
  47. package/dist/views/Request/types/sidebar-item.d.ts +2 -1
  48. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  49. package/package.json +9 -8
  50. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +0 -1
  51. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +0 -4
@@ -1,7 +1,7 @@
1
- import t from "./RequestSidebarItemMenu.vue2.js";
1
+ import e from "./RequestSidebarItemMenu.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-b6270746"]]);
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(e, [["__scopeId", "data-v-eb0a2336"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };
@@ -1,137 +1,151 @@
1
- import { defineComponent as A, ref as y, watch as L, onMounted as P, onBeforeUnmount as V, openBlock as p, createElementBlock as K, Fragment as T, createBlock as E, unref as n, withKeys as U, withCtx as i, createVNode as a, createCommentVNode as C, pushScopeId as W, popScopeId as F, createElementVNode as v } from "vue";
2
- import j from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
- import G from "../../components/Sidebar/Actions/RenameSidebarListElement.vue.js";
4
- import { PathId as x } from "../../router.js";
5
- import { useModal as D, ScalarDropdown as H, ScalarDropdownItem as f, ScalarIcon as I, ScalarModal as S } from "@scalar/components";
6
- import { useRouter as J } from "vue-router";
7
- import { useWorkspace as O } from "../../store/store.js";
8
- import { commandPaletteBus as Q } from "../../libs/event-busses/command-palette-bus.js";
9
- const k = (s) => (W("data-v-b6270746"), s = s(), F(), s), X = /* @__PURE__ */ k(() => /* @__PURE__ */ v("span", null, "Add Example", -1)), Y = /* @__PURE__ */ k(() => /* @__PURE__ */ v("span", null, "Rename", -1)), Z = /* @__PURE__ */ k(() => /* @__PURE__ */ v("span", null, "Delete", -1)), re = /* @__PURE__ */ A({
1
+ import { defineComponent as P, ref as K, watch as U, onMounted as W, onBeforeUnmount as F, openBlock as s, createElementBlock as k, Fragment as v, createBlock as f, unref as n, withKeys as j, withCtx as r, createVNode as l, createCommentVNode as S, createElementVNode as y, createTextVNode as N, pushScopeId as G, popScopeId as H } from "vue";
2
+ import J from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
+ import O from "../../components/Sidebar/Actions/EditSidebarListCollection.vue.js";
4
+ import Q from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
5
+ import { PathId as b } from "../../router.js";
6
+ import { useModal as q, ScalarDropdown as X, ScalarDropdownItem as w, ScalarIcon as $, ScalarModal as x } from "@scalar/components";
7
+ import { useRouter as Y } from "vue-router";
8
+ import { useWorkspace as Z } from "../../store/store.js";
9
+ import { commandPaletteBus as _ } from "../../libs/event-busses/command-palette-bus.js";
10
+ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z(() => /* @__PURE__ */ y("span", null, "Add Example", -1)), te = /* @__PURE__ */ z(() => /* @__PURE__ */ y("span", null, "Delete", -1)), de = /* @__PURE__ */ P({
10
11
  __name: "RequestSidebarItemMenu",
11
12
  props: {
12
13
  menuItem: {}
13
14
  },
14
15
  emits: ["closeMenu"],
15
- setup(s, { emit: N }) {
16
- const o = s, _ = N, { replace: w } = J(), { activeWorkspace: R, activeRouterParams: $ } = O(), g = y(""), r = D(), u = D(), b = () => {
16
+ setup(u, { emit: B }) {
17
+ const a = u, T = B, { replace: E } = Y(), { activeWorkspace: g, activeRouterParams: C } = Z(), d = q(), p = q(), V = () => {
17
18
  var e;
18
- return Q.emit({
19
+ return _.emit({
19
20
  commandName: "Add Example",
20
21
  metaData: {
21
- itemUid: (e = o.menuItem.item) == null ? void 0 : e.entity.uid
22
+ itemUid: (e = a.menuItem.item) == null ? void 0 : e.entity.uid
22
23
  }
23
24
  });
24
- }, q = () => {
25
- var e;
26
- g.value = ((e = o.menuItem.item) == null ? void 0 : e.title) || "", r.show();
27
- }, z = (e) => {
28
- var t;
29
- g.value = e, (t = o.menuItem.item) == null || t.rename(e), r.hide();
30
- }, B = () => {
31
- var e, t, l;
32
- (e = o.menuItem.item) == null || e.delete(), $.value[x.Request] === ((t = o.menuItem.item) == null ? void 0 : t.entity.uid) && w(`/workspace/${R.value.uid}/request/default`), $.value[x.Examples] === ((l = o.menuItem.item) == null ? void 0 : l.entity.uid) && w(`/workspace/${R.value}/request/default`), u.hide();
33
- }, d = y(null);
34
- L([() => o.menuItem.open, d], async ([e]) => {
35
- var t, l;
36
- e && ((l = (t = d.value) == null ? void 0 : t.$parent) != null && l.$el) && d.value.$parent.$el.focus();
25
+ }, M = (e, t) => {
26
+ var m;
27
+ (m = a.menuItem.item) == null || m.edit(e, t), d.hide();
28
+ }, A = () => {
29
+ var e, t, m;
30
+ (e = a.menuItem.item) == null || e.delete(), C.value[b.Request] === ((t = a.menuItem.item) == null ? void 0 : t.entity.uid) && E(`/workspace/${g.value.uid}/request/default`), C.value[b.Examples] === ((m = a.menuItem.item) == null ? void 0 : m.entity.uid) && E(`/workspace/${g.value}/request/default`), p.hide();
31
+ }, c = K(null);
32
+ U([() => a.menuItem.open, c], async ([e]) => {
33
+ var t, m;
34
+ e && ((m = (t = c.value) == null ? void 0 : t.$parent) != null && m.$el) && c.value.$parent.$el.focus();
37
35
  });
38
- const h = () => o.menuItem.open && _("closeMenu");
39
- return P(() => window.addEventListener("click", h)), V(() => window.removeEventListener("click", h)), (e, t) => {
40
- var l, M;
41
- return p(), K(T, null, [
42
- e.menuItem.targetRef && e.menuItem.open ? (p(), E(n(H), {
36
+ const R = () => a.menuItem.open && T("closeMenu");
37
+ return W(() => window.addEventListener("click", R)), F(() => window.removeEventListener("click", R)), (e, t) => {
38
+ var m, h;
39
+ return s(), k(v, null, [
40
+ e.menuItem.targetRef && e.menuItem.open ? (s(), f(n(X), {
43
41
  key: 0,
44
42
  static: "",
45
43
  targetRef: e.menuItem.targetRef,
46
44
  teleport: "",
47
- onKeydown: t[1] || (t[1] = U((m) => e.$emit("closeMenu"), ["escape"]))
45
+ onKeydown: t[2] || (t[2] = j((o) => e.$emit("closeMenu"), ["escape"]))
48
46
  }, {
49
- items: i(() => {
50
- var m;
47
+ items: r(() => {
48
+ var o;
51
49
  return [
52
- ((m = e.menuItem.item) == null ? void 0 : m.entity.type) === "request" ? (p(), E(n(f), {
50
+ ((o = e.menuItem.item) == null ? void 0 : o.entity.type) === "request" ? (s(), f(n(w), {
53
51
  key: 0,
54
52
  class: "flex gap-2",
55
- onClick: b
53
+ onClick: V
56
54
  }, {
57
- default: i(() => [
58
- a(n(I), {
55
+ default: r(() => [
56
+ l(n($), {
59
57
  class: "inline-flex",
60
58
  icon: "Example",
61
59
  size: "md",
62
60
  thickness: "1.5"
63
61
  }),
64
- X
62
+ ee
65
63
  ]),
66
64
  _: 1
67
- })) : C("", !0),
68
- a(n(f), {
65
+ })) : S("", !0),
66
+ l(n(w), {
69
67
  ref_key: "menuRef",
70
- ref: d,
68
+ ref: c,
71
69
  class: "flex gap-2",
72
- onClick: q
70
+ onClick: t[0] || (t[0] = (i) => n(d).show())
73
71
  }, {
74
- default: i(() => [
75
- a(n(I), {
76
- class: "inline-flex",
77
- icon: "Edit",
78
- size: "md",
79
- thickness: "1.5"
80
- }),
81
- Y
82
- ]),
72
+ default: r(() => {
73
+ var i;
74
+ return [
75
+ l(n($), {
76
+ class: "inline-flex",
77
+ icon: "Edit",
78
+ size: "md",
79
+ thickness: "1.5"
80
+ }),
81
+ y("span", null, [
82
+ ((i = e.menuItem.item) == null ? void 0 : i.entity.type) === "collection" ? (s(), k(v, { key: 0 }, [
83
+ N(" Edit ")
84
+ ], 64)) : (s(), k(v, { key: 1 }, [
85
+ N(" Rename ")
86
+ ], 64))
87
+ ])
88
+ ];
89
+ }),
83
90
  _: 1
84
91
  }, 512),
85
- a(n(f), {
92
+ l(n(w), {
86
93
  class: "flex gap-2",
87
- onClick: t[0] || (t[0] = (c) => n(u).show())
94
+ onClick: t[1] || (t[1] = (i) => n(p).show())
88
95
  }, {
89
- default: i(() => [
90
- a(n(I), {
96
+ default: r(() => [
97
+ l(n($), {
91
98
  class: "inline-flex",
92
99
  icon: "Delete",
93
100
  size: "md",
94
101
  thickness: "1.5"
95
102
  }),
96
- Z
103
+ te
97
104
  ]),
98
105
  _: 1
99
106
  })
100
107
  ];
101
108
  }),
102
109
  _: 1
103
- }, 8, ["targetRef"])) : C("", !0),
104
- a(n(S), {
110
+ }, 8, ["targetRef"])) : S("", !0),
111
+ l(n(x), {
105
112
  size: "xxs",
106
- state: n(u),
107
- title: `Delete ${(l = e.menuItem.item) == null ? void 0 : l.resourceTitle}`
113
+ state: n(p),
114
+ title: `Delete ${(m = e.menuItem.item) == null ? void 0 : m.resourceTitle}`
108
115
  }, {
109
- default: i(() => {
110
- var m, c;
116
+ default: r(() => {
117
+ var o, i;
111
118
  return [
112
- a(j, {
113
- variableName: ((m = e.menuItem.item) == null ? void 0 : m.title) ?? "",
114
- warningMessage: (c = e.menuItem.item) == null ? void 0 : c.warning,
115
- onClose: t[2] || (t[2] = (ee) => n(u).hide()),
116
- onDelete: B
119
+ l(J, {
120
+ variableName: ((o = e.menuItem.item) == null ? void 0 : o.title) ?? "",
121
+ warningMessage: (i = e.menuItem.item) == null ? void 0 : i.warning,
122
+ onClose: t[3] || (t[3] = (I) => n(p).hide()),
123
+ onDelete: A
117
124
  }, null, 8, ["variableName", "warningMessage"])
118
125
  ];
119
126
  }),
120
127
  _: 1
121
128
  }, 8, ["state", "title"]),
122
- a(n(S), {
129
+ l(n(x), {
123
130
  size: "xxs",
124
- state: n(r),
125
- title: `Rename ${(M = e.menuItem.item) == null ? void 0 : M.resourceTitle}`
131
+ state: n(d),
132
+ title: `Edit ${(h = e.menuItem.item) == null ? void 0 : h.resourceTitle}`
126
133
  }, {
127
- default: i(() => {
128
- var m;
134
+ default: r(() => {
135
+ var o, i, I, D;
129
136
  return [
130
- a(G, {
131
- name: ((m = e.menuItem.item) == null ? void 0 : m.title) ?? "",
132
- onClose: t[3] || (t[3] = (c) => n(r).hide()),
133
- onRename: z
134
- }, null, 8, ["name"])
137
+ ((o = e.menuItem.item) == null ? void 0 : o.resourceTitle) === "Collection" ? (s(), f(O, {
138
+ key: 0,
139
+ icon: ((i = e.menuItem.item) == null ? void 0 : i.icon) || "interface-content-folder",
140
+ name: (I = e.menuItem.item) == null ? void 0 : I.title,
141
+ onClose: t[4] || (t[4] = (L) => n(d).hide()),
142
+ onEdit: M
143
+ }, null, 8, ["icon", "name"])) : (s(), f(Q, {
144
+ key: 1,
145
+ name: ((D = e.menuItem.item) == null ? void 0 : D.title) ?? "",
146
+ onClose: t[5] || (t[5] = (L) => n(d).hide()),
147
+ onEdit: M
148
+ }, null, 8, ["name"]))
135
149
  ];
136
150
  }),
137
151
  _: 1
@@ -141,5 +155,5 @@ const k = (s) => (W("data-v-b6270746"), s = s(), F(), s), X = /* @__PURE__ */ k(
141
155
  }
142
156
  });
143
157
  export {
144
- re as default
158
+ de as default
145
159
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA+3BA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA67BA,wBAKG"}
@@ -1,159 +1,173 @@
1
- import { defineComponent as O, computed as A, ref as y, openBlock as m, createElementBlock as M, Fragment as D, createElementVNode as n, createVNode as t, unref as e, withCtx as s, renderList as I, createBlock as w, withModifiers as x, normalizeClass as L, toDisplayString as C } from "vue";
2
- import T from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
- import U from "../../../components/Sidebar/Actions/RenameSidebarListElement.vue.js";
4
- import { useModal as W, ScalarDropdown as z, ScalarContextMenu as V, ScalarDropdownItem as u, ScalarIcon as c, ScalarTooltip as F, ScalarDropdownDivider as P, ScalarButton as Y, ScalarModal as S } from "@scalar/components";
5
- import { useRouter as q } from "vue-router";
6
- import { useWorkspace as G } from "../../../store/store.js";
7
- import { commandPaletteBus as H } from "../../../libs/event-busses/command-palette-bus.js";
8
- const J = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm w-[inherit]" }, K = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Q = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, X = { class: "text-ellipsis overflow-hidden" }, 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" }, [
9
- /* @__PURE__ */ n("div", { class: "flex items-center text-c-2" }, [
10
- /* @__PURE__ */ n("span", null, "Only workspace cannot be deleted.")
1
+ import { defineComponent as O, computed as A, ref as M, openBlock as u, createElementBlock as W, Fragment as z, createElementVNode as o, createVNode as t, unref as e, withCtx as s, renderList as I, createBlock as k, withModifiers as c, normalizeClass as L, toDisplayString as C } from "vue";
2
+ import U from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
+ import V from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
4
+ import { useModal as $, ScalarDropdown as S, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as q, ScalarButton as N, ScalarDropdownDivider as F, ScalarModal as T } from "@scalar/components";
5
+ import { useRouter as P } from "vue-router";
6
+ import { useWorkspace as Y } from "../../../store/store.js";
7
+ import { commandPaletteBus as G } from "../../../libs/event-busses/command-palette-bus.js";
8
+ const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = /* @__PURE__ */ o("span", null, "Rename", -1), Z = /* @__PURE__ */ o("span", null, "Delete", -1), ee = /* @__PURE__ */ o("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" }, [
9
+ /* @__PURE__ */ o("div", { class: "flex items-center text-c-2" }, [
10
+ /* @__PURE__ */ o("span", null, "Only workspace cannot be deleted.")
11
11
  ])
12
- ], -1), se = /* @__PURE__ */ n("span", null, "Delete", -1), ne = { class: "flex items-center justify-center h-4 w-4" }, oe = /* @__PURE__ */ n("span", null, "Create new workspace", -1), ue = /* @__PURE__ */ O({
12
+ ], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), ue = /* @__PURE__ */ O({
13
13
  __name: "WorkspaceDropdown",
14
- setup(ae) {
15
- const { activeWorkspace: f, workspaces: r, workspaceMutators: k } = G(), { push: _ } = q(), $ = (o) => {
16
- o !== f.value.uid && _(`/workspace/${o}`);
17
- }, g = A(() => Object.keys(r).length === 1), N = () => H.emit({ commandName: "Create Workspace" }), l = y(""), i = y(""), h = W(), v = W(), R = (o) => {
18
- l.value = r[o].name, i.value = o, h.show();
19
- }, j = () => {
20
- l.value.trim() && (k.edit(i.value, "name", l.value.trim()), h.hide());
21
- }, B = (o) => {
22
- l.value = r[o].name, i.value = o, v.show();
23
- }, E = async () => {
24
- if (!g.value) {
25
- const o = f.value.uid === i.value, a = { ...r };
26
- if (delete a[i.value], k.delete(i.value), o) {
27
- const d = Object.keys(a)[0];
28
- await _(`/workspace/${d}/`);
14
+ setup(oe) {
15
+ const { activeWorkspace: f, workspaces: d, workspaceMutators: _ } = Y(), { push: g } = P(), E = (n) => {
16
+ n !== f.value.uid && g(`/workspace/${n}`);
17
+ }, b = A(() => Object.keys(d).length === 1), j = () => G.emit({ commandName: "Create Workspace" }), h = M(""), r = M(""), v = $(), x = $(), y = (n) => {
18
+ h.value = d[n].name, r.value = n, v.show();
19
+ }, B = (n) => {
20
+ n.trim() && (_.edit(r.value, "name", n.trim()), v.hide());
21
+ }, D = (n) => {
22
+ h.value = d[n].name, r.value = n, x.show();
23
+ }, R = async () => {
24
+ if (!b.value) {
25
+ const n = f.value.uid === r.value, a = { ...d };
26
+ if (delete a[r.value], _.delete(r.value), n) {
27
+ const p = Object.keys(a)[0];
28
+ await g(`/workspace/${p}/`);
29
29
  }
30
30
  }
31
- v.hide();
31
+ x.hide();
32
32
  };
33
- return (o, a) => (m(), M(D, null, [
34
- n("div", J, [
35
- t(e(z), null, {
33
+ return (n, a) => (u(), W(z, null, [
34
+ o("div", H, [
35
+ t(e(S), null, {
36
36
  items: s(() => [
37
- (m(!0), M(D, null, I(e(r), (d, p) => (m(), w(e(V), { key: p }, {
38
- trigger: s(() => [
39
- t(e(u), {
40
- class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
41
- onClick: x((b) => $(p), ["stop"])
42
- }, {
43
- default: s(() => [
44
- n("div", {
45
- class: L([
46
- "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
47
- e(f).uid === p ? "bg-blue text-b-1" : "text-transparent"
48
- ])
49
- }, [
50
- t(e(c), {
51
- class: "size-2.5",
52
- icon: "Checkmark",
53
- thickness: "3.5"
54
- })
55
- ], 2),
56
- n("span", X, C(d.name), 1)
57
- ]),
58
- _: 2
59
- }, 1032, ["onClick"])
60
- ]),
61
- content: s(() => [
62
- t(e(z), { static: "" }, {
37
+ (u(!0), W(z, null, I(e(d), (p, l) => (u(), k(e(m), {
38
+ key: l,
39
+ class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
40
+ onClick: c((w) => E(l), ["stop"])
41
+ }, {
42
+ default: s(() => [
43
+ o("div", {
44
+ class: L([
45
+ "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
46
+ e(f).uid === l ? "bg-blue text-b-1" : "text-transparent"
47
+ ])
48
+ }, [
49
+ t(e(i), {
50
+ class: "size-2.5",
51
+ icon: "Checkmark",
52
+ thickness: "3.5"
53
+ })
54
+ ], 2),
55
+ o("span", Q, C(p.name), 1),
56
+ t(e(S), { teleport: ".scalar-client" }, {
63
57
  items: s(() => [
64
- t(e(u), {
58
+ t(e(m), {
65
59
  class: "flex gap-2",
66
- onMousedown: (b) => R(p)
60
+ onMousedown: (w) => y(l),
61
+ onTouchend: c((w) => y(l), ["prevent"])
67
62
  }, {
68
63
  default: s(() => [
69
- t(e(c), {
64
+ t(e(i), {
70
65
  class: "inline-flex",
71
66
  icon: "Edit",
72
67
  size: "md",
73
68
  thickness: "1.5"
74
69
  }),
75
- Z
70
+ X
76
71
  ]),
77
72
  _: 2
78
- }, 1032, ["onMousedown"]),
79
- g.value ? (m(), w(e(F), {
73
+ }, 1032, ["onMousedown", "onTouchend"]),
74
+ b.value ? (u(), k(e(q), {
80
75
  key: 0,
81
76
  class: "z-10",
82
77
  side: "bottom"
83
78
  }, {
84
79
  trigger: s(() => [
85
- t(e(u), {
80
+ t(e(m), {
86
81
  class: "flex gap-2 w-full",
87
82
  disabled: "",
88
- onMousedown: a[0] || (a[0] = x(() => {
83
+ onMousedown: a[0] || (a[0] = c(() => {
84
+ }, ["prevent"])),
85
+ onTouchend: a[1] || (a[1] = c(() => {
89
86
  }, ["prevent"]))
90
87
  }, {
91
88
  default: s(() => [
92
- t(e(c), {
89
+ t(e(i), {
93
90
  class: "inline-flex",
94
91
  icon: "Delete",
95
92
  size: "md",
96
93
  thickness: "1.5"
97
94
  }),
98
- ee
95
+ Z
99
96
  ]),
100
97
  _: 1
101
98
  })
102
99
  ]),
103
100
  content: s(() => [
104
- te
101
+ ee
105
102
  ]),
106
103
  _: 1
107
- })) : (m(), w(e(u), {
104
+ })) : (u(), k(e(m), {
108
105
  key: 1,
109
106
  class: "flex !gap-2",
110
- onMousedown: x((b) => B(p), ["prevent"])
107
+ onMousedown: c((w) => D(l), ["prevent"]),
108
+ onTouchend: c((w) => D(l), ["prevent"])
111
109
  }, {
112
110
  default: s(() => [
113
- t(e(c), {
111
+ t(e(i), {
114
112
  class: "inline-flex",
115
113
  icon: "Delete",
116
114
  size: "sm",
117
115
  thickness: "1.5"
118
116
  }),
119
- se
117
+ te
120
118
  ]),
121
119
  _: 2
122
- }, 1032, ["onMousedown"]))
120
+ }, 1032, ["onMousedown", "onTouchend"]))
121
+ ]),
122
+ default: s(() => [
123
+ t(e(N), {
124
+ class: "px-0.5 py-0 hover:bg-b-3 group-hover/item:flex aspect-square ml-auto -mr-1 h-fit",
125
+ size: "sm",
126
+ type: "button",
127
+ variant: "ghost"
128
+ }, {
129
+ default: s(() => [
130
+ t(e(i), {
131
+ icon: "Ellipses",
132
+ size: "sm"
133
+ })
134
+ ]),
135
+ _: 1
136
+ })
123
137
  ]),
124
138
  _: 2
125
139
  }, 1024)
126
140
  ]),
127
141
  _: 2
128
- }, 1024))), 128)),
129
- t(e(P)),
130
- t(e(u), {
142
+ }, 1032, ["onClick"]))), 128)),
143
+ t(e(F)),
144
+ t(e(m), {
131
145
  class: "flex items-center gap-1.5",
132
- onClick: N
146
+ onClick: j
133
147
  }, {
134
148
  default: s(() => [
135
- n("div", ne, [
136
- t(e(c), {
149
+ o("div", se, [
150
+ t(e(i), {
137
151
  class: "h-2.5",
138
152
  icon: "Add",
139
153
  thickness: "3"
140
154
  })
141
155
  ]),
142
- oe
156
+ ne
143
157
  ]),
144
158
  _: 1
145
159
  })
146
160
  ]),
147
161
  default: s(() => [
148
- t(e(Y), {
162
+ t(e(N), {
149
163
  class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
150
164
  fullWidth: "",
151
165
  variant: "ghost"
152
166
  }, {
153
167
  default: s(() => [
154
- n("div", K, [
155
- n("h2", Q, C(e(f).name), 1),
156
- t(e(c), {
168
+ o("div", J, [
169
+ o("h2", K, C(e(f).name), 1),
170
+ t(e(i), {
157
171
  class: "size-2.5",
158
172
  icon: "ChevronDown",
159
173
  thickness: "3.5"
@@ -166,31 +180,31 @@ const J = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
166
180
  _: 1
167
181
  })
168
182
  ]),
169
- t(e(S), {
183
+ t(e(T), {
170
184
  size: "xxs",
171
- state: e(v),
185
+ state: e(x),
172
186
  title: "Delete workspace"
173
187
  }, {
174
188
  default: s(() => [
175
- t(T, {
176
- variableName: l.value,
189
+ t(U, {
190
+ variableName: h.value,
177
191
  warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
178
- onClose: a[1] || (a[1] = (d) => e(v).hide()),
179
- onDelete: E
192
+ onClose: a[2] || (a[2] = (p) => e(x).hide()),
193
+ onDelete: R
180
194
  }, null, 8, ["variableName"])
181
195
  ]),
182
196
  _: 1
183
197
  }, 8, ["state"]),
184
- t(e(S), {
198
+ t(e(T), {
185
199
  size: "xxs",
186
- state: e(h),
200
+ state: e(v),
187
201
  title: "Rename Workspace"
188
202
  }, {
189
203
  default: s(() => [
190
- t(U, {
191
- name: l.value,
192
- onClose: a[2] || (a[2] = (d) => e(h).hide()),
193
- onRename: j
204
+ t(V, {
205
+ name: h.value,
206
+ onClose: a[3] || (a[3] = (p) => e(v).hide()),
207
+ onEdit: B
194
208
  }, null, 8, ["name"])
195
209
  ]),
196
210
  _: 1
@@ -7,7 +7,8 @@ export type SidebarItem = {
7
7
  method?: RequestMethod;
8
8
  link?: string;
9
9
  warning?: string;
10
- rename: (name: string) => void;
10
+ icon?: string;
11
+ edit: (name: string, icon?: string) => void;
11
12
  delete: () => void;
12
13
  };
13
14
  export type SidebarMenuItem = {
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
1
+ {"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.7",
21
+ "version": "2.1.8",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -129,17 +129,18 @@
129
129
  "vue-router": "^4.3.0",
130
130
  "whatwg-mimetype": "^4.0.0",
131
131
  "zod": "^3.23.8",
132
- "@scalar/components": "0.12.47",
132
+ "@scalar/components": "0.12.48",
133
133
  "@scalar/draggable": "0.1.5",
134
- "@scalar/oas-utils": "0.2.47",
134
+ "@scalar/oas-utils": "0.2.48",
135
135
  "@scalar/object-utils": "1.1.9",
136
+ "@scalar/icons": "0.1.0",
136
137
  "@scalar/openapi-parser": "0.8.4",
137
138
  "@scalar/openapi-types": "0.1.1",
138
- "@scalar/themes": "0.9.31",
139
- "@scalar/types": "0.0.10",
140
- "@scalar/use-codemirror": "0.11.13",
141
- "@scalar/use-tooltip": "1.0.2",
142
- "@scalar/use-toasts": "0.7.6"
139
+ "@scalar/themes": "0.9.32",
140
+ "@scalar/types": "0.0.11",
141
+ "@scalar/use-codemirror": "0.11.14",
142
+ "@scalar/use-toasts": "0.7.6",
143
+ "@scalar/use-tooltip": "1.0.2"
143
144
  },
144
145
  "devDependencies": {
145
146
  "@types/content-type": "^1.1.8",
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenameSidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Actions/RenameSidebarListElement.vue"],"names":[],"mappings":";UAkCQ,MAAM;;;;;UAAN,MAAM;;;;;AAyGd,wBAOG;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,4 +0,0 @@
1
- import f from "./RenameSidebarListElement.vue.js";
2
- export {
3
- f as default
4
- };