@scalar/api-client 2.1.5 → 2.1.6

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 (63) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +25 -25
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +5 -87
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +87 -2
  8. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  9. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  10. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +6 -2
  11. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +38 -37
  13. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +6 -2
  14. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  15. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  16. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  17. package/dist/components/HttpMethod/HttpMethod.vue2.js +5 -5
  18. package/dist/hooks/useFileDialog.d.ts +1 -1
  19. package/dist/layouts/App/create-api-client-app.d.ts +2 -313
  20. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  21. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  22. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  23. package/dist/layouts/Modal/create-api-client-modal.d.ts +25 -647
  24. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  25. package/dist/libs/create-client.d.ts +14 -325
  26. package/dist/libs/create-client.d.ts.map +1 -1
  27. package/dist/libs/errors.d.ts +1 -1
  28. package/dist/libs/errors.js +1 -1
  29. package/dist/libs/local-storage.d.ts.map +1 -1
  30. package/dist/libs/local-storage.js +40 -24
  31. package/dist/store/collections.d.ts +0 -63
  32. package/dist/store/collections.d.ts.map +1 -1
  33. package/dist/store/cookies.d.ts +0 -13
  34. package/dist/store/cookies.d.ts.map +1 -1
  35. package/dist/store/environment.d.ts +0 -7
  36. package/dist/store/environment.d.ts.map +1 -1
  37. package/dist/store/request-example.d.ts +2 -102
  38. package/dist/store/request-example.d.ts.map +1 -1
  39. package/dist/store/requests.d.ts +0 -32
  40. package/dist/store/requests.d.ts.map +1 -1
  41. package/dist/store/security-schemes.d.ts +0 -55
  42. package/dist/store/security-schemes.d.ts.map +1 -1
  43. package/dist/store/servers.d.ts +0 -8
  44. package/dist/store/servers.d.ts.map +1 -1
  45. package/dist/store/store.d.ts +25 -647
  46. package/dist/store/store.d.ts.map +1 -1
  47. package/dist/store/tags.d.ts +0 -14
  48. package/dist/store/tags.d.ts.map +1 -1
  49. package/dist/store/workspace.d.ts +0 -19
  50. package/dist/store/workspace.d.ts.map +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  53. package/dist/views/Request/RequestSection/RequestBody.vue.js +49 -47
  54. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  55. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  56. package/dist/views/Request/RequestSidebar.vue2.js +47 -49
  57. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  58. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  59. package/dist/views/Request/RequestSidebarItem.vue2.js +50 -50
  60. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  61. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  62. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +20 -20
  63. package/package.json +8 -8
@@ -1,5 +1,5 @@
1
- import { defineComponent as te, useCssVars as ie, computed as c, ref as ne, resolveComponent as re, openBlock as f, createElementBlock as k, normalizeClass as m, unref as n, createVNode as h, withCtx as y, createBlock as b, withModifiers as C, createElementVNode as d, toDisplayString as O, createCommentVNode as g, createTextVNode as B, renderSlot as le, Fragment as se, renderList as ae, pushScopeId as oe, popScopeId as de } from "vue";
2
- import { PathId as ue } from "../../router.js";
1
+ import { defineComponent as te, useCssVars as ie, computed as c, ref as ne, resolveComponent as re, openBlock as p, createElementBlock as k, normalizeClass as m, unref as n, createVNode as h, withCtx as y, createBlock as b, withModifiers as C, createElementVNode as u, toDisplayString as O, createCommentVNode as g, createTextVNode as B, renderSlot as le, Fragment as se, renderList as ae, pushScopeId as oe, popScopeId as ue } from "vue";
2
+ import { PathId as de } from "../../router.js";
3
3
  import { ScalarButton as I, ScalarIcon as w } from "@scalar/components";
4
4
  import { Draggable as pe } from "@scalar/draggable";
5
5
  import { RouterLink as fe } from "vue-router";
@@ -8,7 +8,7 @@ import { useSidebar as ce } from "../../hooks/useSidebar.js";
8
8
  import { getModifiers as be } from "../../libs/event-busses/hot-keys-bus.js";
9
9
  import { useWorkspace as ge } from "../../store/store.js";
10
10
  import { commandPaletteBus as ve } from "../../libs/event-busses/command-palette-bus.js";
11
- const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = ["disabled"], we = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Ue = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, De = /* @__PURE__ */ P(() => /* @__PURE__ */ d("span", null, " ", -1)), Ce = { key: 2 }, Ie = /* @__PURE__ */ P(() => /* @__PURE__ */ d("span", null, "Add Request", -1)), j = "hover:bg-sidebar-active-b indent-padding-left", je = /* @__PURE__ */ te({
11
+ const P = (v) => (oe("data-v-4a6dd4d2"), v = v(), ue(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, we = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, Ue = /* @__PURE__ */ P(() => /* @__PURE__ */ u("span", null, " ", -1)), De = { key: 2 }, Ce = /* @__PURE__ */ P(() => /* @__PURE__ */ u("span", null, "Add Request", -1)), j = "hover:bg-sidebar-active-b indent-padding-left", Be = /* @__PURE__ */ te({
12
12
  __name: "RequestSidebarItem",
13
13
  props: {
14
14
  isDraggable: { type: Boolean, default: !1 },
@@ -20,26 +20,26 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
20
20
  emits: ["onDragEnd", "newTab", "openMenu"],
21
21
  setup(v, { emit: V }) {
22
22
  ie((e) => ({
23
- "2df59af7": G.value,
24
- "6a813932": J.value
23
+ "2d4187ae": G.value,
24
+ "33fcdcf5": J.value
25
25
  }));
26
26
  const r = v, F = V, {
27
27
  activeRequest: R,
28
- activeRouterParams: A,
28
+ activeRouterParams: Y,
29
29
  activeWorkspace: x,
30
- collections: U,
31
- tags: Y,
32
- isReadOnly: p,
30
+ collections: q,
31
+ tags: A,
32
+ isReadOnly: f,
33
33
  requests: $,
34
- requestExamples: q,
34
+ requestExamples: U,
35
35
  collectionMutators: T,
36
36
  tagMutators: M,
37
37
  requestMutators: z,
38
38
  requestExampleMutators: E,
39
39
  router: L
40
40
  } = ge(), { collapsedSidebarFolders: S, toggleSidebarFolder: W } = ce(), i = c(() => {
41
- var s, u;
42
- const e = U[r.uid], t = Y[r.uid], l = $[r.uid], a = q[r.uid];
41
+ var s, d;
42
+ const e = q[r.uid], t = A[r.uid], l = $[r.uid], a = U[r.uid];
43
43
  return e ? {
44
44
  title: ((s = e.info) == null ? void 0 : s.title) ?? "Unknown title",
45
45
  entity: e,
@@ -69,16 +69,17 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
69
69
  } : {
70
70
  title: a.name,
71
71
  link: `/workspace/${x.value.uid}/request/${a.requestUid}/examples/${a.uid}`,
72
- method: (u = $[a.requestUid]) == null ? void 0 : u.method,
72
+ method: (d = $[a.requestUid]) == null ? void 0 : d.method,
73
73
  entity: a,
74
74
  resourceTitle: "Example",
75
+ warning: "This cannot be undone. You’re about to delete the example from the request.",
75
76
  children: [],
76
77
  rename: (o) => E.edit(a.uid, "name", o),
77
78
  delete: () => E.delete(a)
78
79
  };
79
80
  }), H = c(
80
81
  () => i.value.entity.type === "collection" && i.value.title === "Drafts"
81
- ), G = c(() => r.parentUids.length ? p.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "12px"), J = c(() => r.parentUids.length ? p.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "0px"), K = c(
82
+ ), G = c(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "12px"), J = c(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "0px"), K = c(
82
83
  () => {
83
84
  var e;
84
85
  return S[r.uid] || ((e = R.value) == null ? void 0 : e.uid) === r.uid && i.value.entity.examples.length > 1;
@@ -86,14 +87,14 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
86
87
  ), Q = c(
87
88
  () => {
88
89
  var e;
89
- return A.value[ue.Request] === "default" && ((e = R.value) == null ? void 0 : e.uid) === r.uid;
90
+ return Y.value[de.Request] === "default" && ((e = R.value) == null ? void 0 : e.uid) === r.uid;
90
91
  }
91
92
  ), D = ne(null), N = c(() => {
92
93
  let e = 0.5, t = 0.5;
93
94
  if (!D.value) return { ceiling: e, floor: t };
94
95
  const { draggingItem: l } = D.value;
95
- return !U[l == null ? void 0 : l.id] && i.value.entity.type === "collection" ? (e = 1, t = 0) : i.value.entity.type === "tag" && (e = 0.8, t = 0.2), { ceiling: e, floor: t };
96
- }), X = (e, t) => !(x.value.isReadOnly || q[t.id] || U[e.id]), Z = (e, t) => {
96
+ return !q[l == null ? void 0 : l.id] && i.value.entity.type === "collection" ? (e = 1, t = 0) : i.value.entity.type === "tag" && (e = 0.8, t = 0.2), { ceiling: e, floor: t };
97
+ }), X = (e, t) => !(x.value.isReadOnly || U[t.id] || q[e.id]), Z = (e, t) => {
97
98
  e && (be(["default"]).some((s) => e[s]) ? F("newTab", t.title || "", t.entity.uid) : t.link && L.push(t.link));
98
99
  };
99
100
  function _() {
@@ -107,9 +108,9 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
107
108
  }
108
109
  return (e, t) => {
109
110
  const l = re("RequestSidebarItem", !0);
110
- return f(), k("div", {
111
+ return p(), k("div", {
111
112
  class: m(["relative flex flex-row", [
112
- n(p) && e.parentUids.length > 1 || !n(p) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
113
+ n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
113
114
  ]])
114
115
  }, [
115
116
  h(n(pe), {
@@ -127,7 +128,7 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
127
128
  default: y(() => {
128
129
  var a;
129
130
  return [
130
- i.value.link ? (f(), b(n(fe), {
131
+ i.value.link ? (p(), b(n(fe), {
131
132
  key: 0,
132
133
  class: "no-underline",
133
134
  to: i.value.link,
@@ -137,26 +138,26 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
137
138
  ))
138
139
  }, {
139
140
  default: y(({ isExactActive: s }) => {
140
- var u, o;
141
+ var d, o;
141
142
  return [
142
- d("div", {
143
+ u("div", {
143
144
  class: m(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover w-full", [
144
145
  j,
145
146
  s || Q.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
146
147
  ]]),
147
148
  tabindex: "0"
148
149
  }, [
149
- d("span", {
150
+ u("span", {
150
151
  class: m(["line-clamp-3 z-10 font-medium w-full pl-2 word-break-break-word", {
151
- "editable-sidebar-hover-item": !n(p)
152
+ "editable-sidebar-hover-item": !n(f)
152
153
  }])
153
154
  }, O(i.value.title), 3),
154
- d("div", he, [
155
- d("div", ye, [
156
- n(p) ? g("", !0) : (f(), b(n(I), {
155
+ u("div", he, [
156
+ u("div", ye, [
157
+ n(f) ? g("", !0) : (p(), b(n(I), {
157
158
  key: 0,
158
159
  class: m(["px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
159
- flex: ((o = (u = e.menuItem) == null ? void 0 : u.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
160
+ flex: ((o = (d = e.menuItem) == null ? void 0 : d.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
160
161
  }]),
161
162
  size: "sm",
162
163
  type: "button",
@@ -180,9 +181,9 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
180
181
  _: 1
181
182
  }, 8, ["class"]))
182
183
  ]),
183
- d("span", xe, [
184
+ u("span", xe, [
184
185
  B("   "),
185
- i.value.method ? (f(), b(n(me), {
186
+ i.value.method ? (p(), b(n(me), {
186
187
  key: 0,
187
188
  class: "font-bold",
188
189
  method: i.value.method
@@ -193,16 +194,15 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
193
194
  ];
194
195
  }),
195
196
  _: 1
196
- }, 8, ["to"])) : !n(p) || e.parentUids.length ? (f(), k("button", {
197
+ }, 8, ["to"])) : !n(f) || e.parentUids.length ? (p(), k("button", {
197
198
  key: 1,
198
199
  class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", j]),
199
- disabled: n(p),
200
200
  type: "button",
201
201
  onClick: t[3] || (t[3] = (s) => n(W)(i.value.entity.uid))
202
202
  }, [
203
- d("span", we, [
203
+ u("span", ke, [
204
204
  le(e.$slots, "leftIcon", {}, () => [
205
- d("div", {
205
+ u("div", {
206
206
  class: m({
207
207
  "rotate-90": n(S)[i.value.entity.uid]
208
208
  })
@@ -217,14 +217,14 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
217
217
  ], !0),
218
218
  B("   ")
219
219
  ]),
220
- d("div", Ue, [
221
- d("span", {
220
+ u("div", we, [
221
+ u("span", {
222
222
  class: m(["line-clamp-3 z-10 font-medium text-left w-full word-break-break-word", {
223
- "editable-sidebar-hover-item": !n(p)
223
+ "editable-sidebar-hover-item": !n(f)
224
224
  }])
225
225
  }, O(i.value.title), 3),
226
- d("div", qe, [
227
- !n(p) && !H.value ? (f(), b(n(I), {
226
+ u("div", qe, [
227
+ !n(f) && !H.value ? (p(), b(n(I), {
228
228
  key: 0,
229
229
  class: m(["px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
230
230
  flex: ((a = e.menuItem.item) == null ? void 0 : a.entity.uid) === i.value.entity.uid && e.menuItem.open
@@ -249,23 +249,23 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
249
249
  ]),
250
250
  _: 1
251
251
  }, 8, ["class"])) : g("", !0),
252
- De
252
+ Ue
253
253
  ])
254
254
  ])
255
- ], 8, ke)) : g("", !0),
256
- K.value ? (f(), k("div", Ce, [
257
- (f(!0), k(se, null, ae(i.value.children, (s) => (f(), b(l, {
255
+ ])) : g("", !0),
256
+ K.value ? (p(), k("div", De, [
257
+ (p(!0), k(se, null, ae(i.value.children, (s) => (p(), b(l, {
258
258
  key: s,
259
- isDraggable: !n(q)[s],
259
+ isDraggable: !n(U)[s],
260
260
  isDroppable: X,
261
261
  menuItem: e.menuItem,
262
262
  parentUids: [...e.parentUids, e.uid],
263
263
  uid: s,
264
- onNewTab: t[4] || (t[4] = (u, o) => e.$emit("newTab", u, o)),
265
- onOnDragEnd: t[5] || (t[5] = (...u) => e.$emit("onDragEnd", ...u)),
266
- onOpenMenu: t[6] || (t[6] = (u) => e.$emit("openMenu", u))
264
+ onNewTab: t[4] || (t[4] = (d, o) => e.$emit("newTab", d, o)),
265
+ onOnDragEnd: t[5] || (t[5] = (...d) => e.$emit("onDragEnd", ...d)),
266
+ onOpenMenu: t[6] || (t[6] = (d) => e.$emit("openMenu", d))
267
267
  }, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
268
- i.value.children.length === 0 ? (f(), b(n(I), {
268
+ i.value.children.length === 0 ? (p(), b(n(I), {
269
269
  key: 0,
270
270
  class: m(["mb-[.5px] flex gap-1.5 h-8 text-c-1 py-0 justify-start text-xs w-full hover:bg-b-2", e.parentUids.length ? "pl-9" : ""]),
271
271
  variant: "ghost",
@@ -277,7 +277,7 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
277
277
  icon: "Add",
278
278
  thickness: "3"
279
279
  }),
280
- Ie
280
+ Ce
281
281
  ]),
282
282
  _: 1
283
283
  }, 8, ["class"])) : g("", !0)
@@ -291,5 +291,5 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
291
291
  }
292
292
  });
293
293
  export {
294
- je as default
294
+ Be as default
295
295
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA4KA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;;cAa1B,eAAe;;;;cAAf,eAAe;;;;AA+YjD,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
+ {"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA8KA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;;cAa1B,eAAe;;;;cAAf,eAAe;;;;AAiZjD,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,7 +1,7 @@
1
1
  import t from "./RequestSidebarItemMenu.vue2.js";
2
2
  /* empty css */
3
3
  import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ e(t, [["__scopeId", "data-v-59cf3dad"]]);
4
+ const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-b6270746"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -6,14 +6,14 @@ import { useModal as D, ScalarDropdown as H, ScalarDropdownItem as f, ScalarIcon
6
6
  import { useRouter as J } from "vue-router";
7
7
  import { useWorkspace as O } from "../../store/store.js";
8
8
  import { commandPaletteBus as Q } from "../../libs/event-busses/command-palette-bus.js";
9
- const k = (s) => (W("data-v-59cf3dad"), 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({
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({
10
10
  __name: "RequestSidebarItemMenu",
11
11
  props: {
12
12
  menuItem: {}
13
13
  },
14
14
  emits: ["closeMenu"],
15
15
  setup(s, { emit: N }) {
16
- const o = s, _ = N, { replace: w } = J(), { activeWorkspace: R, activeRouterParams: $ } = O(), g = y(""), r = D(), c = D(), q = () => {
16
+ const o = s, _ = N, { replace: w } = J(), { activeWorkspace: R, activeRouterParams: $ } = O(), g = y(""), r = D(), u = D(), b = () => {
17
17
  var e;
18
18
  return Q.emit({
19
19
  commandName: "Add Example",
@@ -21,19 +21,19 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
21
21
  itemUid: (e = o.menuItem.item) == null ? void 0 : e.entity.uid
22
22
  }
23
23
  });
24
- }, z = () => {
24
+ }, q = () => {
25
25
  var e;
26
26
  g.value = ((e = o.menuItem.item) == null ? void 0 : e.title) || "", r.show();
27
- }, B = (e) => {
27
+ }, z = (e) => {
28
28
  var t;
29
29
  g.value = e, (t = o.menuItem.item) == null || t.rename(e), r.hide();
30
- }, b = () => {
30
+ }, B = () => {
31
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`);
33
- }, u = y(null);
34
- L([() => o.menuItem.open, u], async ([e]) => {
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
35
  var t, l;
36
- e && ((l = (t = u.value) == null ? void 0 : t.$parent) != null && l.$el) && u.value.$parent.$el.focus();
36
+ e && ((l = (t = d.value) == null ? void 0 : t.$parent) != null && l.$el) && d.value.$parent.$el.focus();
37
37
  });
38
38
  const h = () => o.menuItem.open && _("closeMenu");
39
39
  return P(() => window.addEventListener("click", h)), V(() => window.removeEventListener("click", h)), (e, t) => {
@@ -52,7 +52,7 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
52
52
  ((m = e.menuItem.item) == null ? void 0 : m.entity.type) === "request" ? (p(), E(n(f), {
53
53
  key: 0,
54
54
  class: "flex gap-2",
55
- onClick: q
55
+ onClick: b
56
56
  }, {
57
57
  default: i(() => [
58
58
  a(n(I), {
@@ -67,9 +67,9 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
67
67
  })) : C("", !0),
68
68
  a(n(f), {
69
69
  ref_key: "menuRef",
70
- ref: u,
70
+ ref: d,
71
71
  class: "flex gap-2",
72
- onClick: z
72
+ onClick: q
73
73
  }, {
74
74
  default: i(() => [
75
75
  a(n(I), {
@@ -84,7 +84,7 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
84
84
  }, 512),
85
85
  a(n(f), {
86
86
  class: "flex gap-2",
87
- onClick: t[0] || (t[0] = (d) => n(c).show())
87
+ onClick: t[0] || (t[0] = (c) => n(u).show())
88
88
  }, {
89
89
  default: i(() => [
90
90
  a(n(I), {
@@ -103,17 +103,17 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
103
103
  }, 8, ["targetRef"])) : C("", !0),
104
104
  a(n(S), {
105
105
  size: "xxs",
106
- state: n(c),
106
+ state: n(u),
107
107
  title: `Delete ${(l = e.menuItem.item) == null ? void 0 : l.resourceTitle}`
108
108
  }, {
109
109
  default: i(() => {
110
- var m, d;
110
+ var m, c;
111
111
  return [
112
112
  a(j, {
113
113
  variableName: ((m = e.menuItem.item) == null ? void 0 : m.title) ?? "",
114
- warningMessage: (d = e.menuItem.item) == null ? void 0 : d.warning,
115
- onClose: t[2] || (t[2] = (ee) => n(c).hide()),
116
- onDelete: b
114
+ warningMessage: (c = e.menuItem.item) == null ? void 0 : c.warning,
115
+ onClose: t[2] || (t[2] = (ee) => n(u).hide()),
116
+ onDelete: B
117
117
  }, null, 8, ["variableName", "warningMessage"])
118
118
  ];
119
119
  }),
@@ -129,8 +129,8 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
129
129
  return [
130
130
  a(G, {
131
131
  name: ((m = e.menuItem.item) == null ? void 0 : m.title) ?? "",
132
- onClose: t[3] || (t[3] = (d) => n(r).hide()),
133
- onRename: B
132
+ onClose: t[3] || (t[3] = (c) => n(r).hide()),
133
+ onRename: z
134
134
  }, null, 8, ["name"])
135
135
  ];
136
136
  }),
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.5",
21
+ "version": "2.1.6",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -129,15 +129,15 @@
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.46",
132
+ "@scalar/components": "0.12.47",
133
133
  "@scalar/draggable": "0.1.5",
134
- "@scalar/oas-utils": "0.2.46",
135
- "@scalar/object-utils": "1.1.8",
136
- "@scalar/openapi-parser": "0.8.3",
134
+ "@scalar/oas-utils": "0.2.47",
135
+ "@scalar/object-utils": "1.1.9",
137
136
  "@scalar/openapi-types": "0.1.1",
138
- "@scalar/themes": "0.9.30",
139
- "@scalar/types": "0.0.9",
140
- "@scalar/use-codemirror": "0.11.12",
137
+ "@scalar/openapi-parser": "0.8.3",
138
+ "@scalar/types": "0.0.10",
139
+ "@scalar/themes": "0.9.31",
140
+ "@scalar/use-codemirror": "0.11.13",
141
141
  "@scalar/use-toasts": "0.7.6",
142
142
  "@scalar/use-tooltip": "1.0.2"
143
143
  },