@scalar/api-client 2.0.47 → 2.0.48

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 (72) hide show
  1. package/CHANGELOG.md +25 -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 +77 -71
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  8. package/dist/components/CodeInput/CodeInput.vue2.js +49 -44
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  11. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -106
  12. package/dist/components/Sidebar/Sidebar.vue.d.ts +24 -3
  13. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  14. package/dist/components/Sidebar/Sidebar.vue.js +57 -19
  15. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  16. package/dist/components/TopNav/TopNav.vue.js +1 -1
  17. package/dist/components/TopNav/TopNav.vue2.js +46 -43
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +9 -9
  21. package/dist/layouts/App/ApiClientApp.vue.js +1 -1
  22. package/dist/layouts/App/create-api-client-app.d.ts +56 -46
  23. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  24. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  25. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  26. package/dist/layouts/Modal/ApiClientModal.vue2.js +20 -20
  27. package/dist/layouts/Modal/create-api-client-modal.d.ts +112 -92
  28. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  29. package/dist/libs/create-client.d.ts +56 -46
  30. package/dist/libs/create-client.d.ts.map +1 -1
  31. package/dist/libs/event-busses/{command-palette.d.ts → command-palette-bus.d.ts} +1 -1
  32. package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -0
  33. package/dist/libs/event-busses/{execute-requestBus.d.ts → execute-request-bus.d.ts} +1 -1
  34. package/dist/libs/event-busses/execute-request-bus.d.ts.map +1 -0
  35. package/dist/libs/event-busses/hot-keys-bus.d.ts +33 -0
  36. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -0
  37. package/dist/libs/event-busses/hot-keys-bus.js +33 -0
  38. package/dist/libs/event-busses/index.d.ts +3 -3
  39. package/dist/libs/event-busses/index.d.ts.map +1 -1
  40. package/dist/libs/event-busses/index.js +3 -3
  41. package/dist/libs/index.js +3 -3
  42. package/dist/libs/local-storage.d.ts +1 -1
  43. package/dist/libs/local-storage.d.ts.map +1 -1
  44. package/dist/libs/local-storage.js +15 -30
  45. package/dist/router.d.ts +2 -2
  46. package/dist/router.d.ts.map +1 -1
  47. package/dist/router.js +3 -3
  48. package/dist/store/workspace.d.ts +112 -92
  49. package/dist/store/workspace.d.ts.map +1 -1
  50. package/dist/store/workspace.js +140 -137
  51. package/dist/style.css +1 -1
  52. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  53. package/dist/views/Request/Request.vue.js +1 -1
  54. package/dist/views/Request/Request.vue2.js +135 -131
  55. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  56. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  57. package/dist/views/Request/RequestSidebarItem.vue2.js +252 -138
  58. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +27 -5
  59. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  60. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  61. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +83 -158
  62. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  63. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  64. package/dist/views/Request/components/WorkspaceDropdown.vue.js +214 -70
  65. package/package.json +6 -6
  66. package/dist/libs/event-busses/command-palette.d.ts.map +0 -1
  67. package/dist/libs/event-busses/execute-requestBus.d.ts.map +0 -1
  68. package/dist/libs/event-busses/hot-key.d.ts +0 -34
  69. package/dist/libs/event-busses/hot-key.d.ts.map +0 -1
  70. package/dist/libs/event-busses/hot-key.js +0 -25
  71. /package/dist/libs/event-busses/{command-palette.js → command-palette-bus.js} +0 -0
  72. /package/dist/libs/event-busses/{execute-requestBus.js → execute-request-bus.js} +0 -0
@@ -1,13 +1,14 @@
1
- import { defineComponent as H, useCssVars as G, computed as l, ref as J, resolveComponent as K, openBlock as o, createElementBlock as m, normalizeClass as d, unref as i, createVNode as U, withCtx as C, createBlock as c, createElementVNode as s, toDisplayString as I, createCommentVNode as b, createTextVNode as E, renderSlot as Q, withDirectives as X, Fragment as Y, renderList as Z, vShow as ee, pushScopeId as te, popScopeId as ie } from "vue";
2
- import { PathId as re } from "../../router.js";
3
- import { useWorkspace as se } from "../../store/workspace.js";
4
- import { ScalarIcon as ae } from "@scalar/components";
5
- import { Draggable as le } from "@scalar/draggable";
6
- import { RouterLink as ne } from "vue-router";
7
- import z from "./RequestSidebarItemMenu.vue.js";
8
- import oe from "../../components/HttpMethod/HttpMethod.vue.js";
9
- import { useSidebar as de } from "../../hooks/useSidebar.js";
10
- const ue = (u) => (te("data-v-481dd9cc"), u = u(), ie(), u), pe = { class: "flex flex-row gap-1 items-center" }, fe = { class: "relative" }, me = { class: "flex items-start" }, ce = { 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" }, ge = { class: "relative flex h-fit" }, ve = /* @__PURE__ */ ue(() => /* @__PURE__ */ s("span", null, " ", -1)), he = { key: 2 }, O = "hover:bg-sidebar-active-b indent-padding-left", $e = /* @__PURE__ */ H({
1
+ import { defineComponent as me, useCssVars as pe, computed as n, ref as P, resolveComponent as fe, openBlock as m, createElementBlock as C, Fragment as A, createElementVNode as r, normalizeClass as c, unref as i, createVNode as o, withCtx as d, createBlock as v, toDisplayString as H, createCommentVNode as w, createTextVNode as D, renderSlot as ce, withDirectives as ve, renderList as be, vShow as ge, withKeys as he, withModifiers as Ue, pushScopeId as we, popScopeId as ye } from "vue";
2
+ import De from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
+ import { PathId as M } from "../../router.js";
4
+ import { useWorkspace as ke } from "../../store/workspace.js";
5
+ import { useModal as G, ScalarContextMenu as J, ScalarIcon as qe, ScalarModal as Q, ScalarTextField as Re, ScalarButton as X } from "@scalar/components";
6
+ import { Draggable as $e } from "@scalar/draggable";
7
+ import { useRouter as xe, RouterLink as Se } from "vue-router";
8
+ import k from "./RequestSidebarItemMenu.vue.js";
9
+ import Ce from "../../components/HttpMethod/HttpMethod.vue.js";
10
+ import { useSidebar as Me } from "../../hooks/useSidebar.js";
11
+ const Ie = (b) => (we("data-v-846321e2"), b = b(), ye(), b), Te = { class: "flex flex-row gap-1 items-center" }, Ee = { class: "relative" }, ze = { class: "flex items-start" }, Ne = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Ve = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Oe = { class: "relative flex h-fit" }, Be = /* @__PURE__ */ Ie(() => /* @__PURE__ */ r("span", null, " ", -1)), Fe = { key: 2 }, je = { class: "flex gap-3" }, Y = "hover:bg-sidebar-active-b indent-padding-left", Ye = /* @__PURE__ */ me({
11
12
  __name: "RequestSidebarItem",
12
13
  props: {
13
14
  isDraggable: { type: Boolean, default: !1 },
@@ -16,154 +17,267 @@ const ue = (u) => (te("data-v-481dd9cc"), u = u(), ie(), u), pe = { class: "flex
16
17
  item: {}
17
18
  },
18
19
  emits: ["onDragEnd"],
19
- setup(u) {
20
- G((e) => ({
21
- "9215ea88": N.value,
22
- "602f2182": _.value
20
+ setup(b) {
21
+ pe((e) => ({
22
+ "8cbace56": te.value,
23
+ "02fa30c9": ie.value
23
24
  }));
24
- const t = u, {
25
- activeRequest: w,
26
- activeRouterParams: B,
25
+ const t = b, {
26
+ activeRequest: I,
27
+ activeRouterParams: q,
27
28
  activeWorkspace: g,
28
- collections: D,
29
- folders: V,
29
+ collections: T,
30
+ folders: Z,
30
31
  isReadOnly: a,
31
- requests: k,
32
- requestExamples: v
33
- } = se(), { collapsedSidebarFolders: y, toggleSidebarFolder: j } = de(), F = l(() => "childUids" in t.item), q = l(() => "spec" in t.item), x = l(() => "summary" in t.item), N = l(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), _ = l(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), R = (e) => {
34
- var r;
35
- return "spec" in e ? (r = e.spec.info) == null ? void 0 : r.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
36
- }, L = l(() => ("requestUid" in t.item ? k[t.item.requestUid] : t.item).method), M = l(
32
+ requests: E,
33
+ requestExamples: R,
34
+ collectionMutators: z,
35
+ folderMutators: N,
36
+ requestMutators: V,
37
+ requestExampleMutators: O
38
+ } = ke(), { replace: B } = xe(), { collapsedSidebarFolders: F, toggleSidebarFolder: _ } = Me(), ee = n(() => "childUids" in t.item), j = n(() => "spec" in t.item), K = n(() => "summary" in t.item), te = n(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), ie = n(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), $ = (e) => {
39
+ var s;
40
+ return "spec" in e ? (s = e.spec.info) == null ? void 0 : s.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
41
+ }, se = n(() => ("requestUid" in t.item ? E[t.item.requestUid] : t.item).method), le = n(
37
42
  () => {
38
43
  var e;
39
- return y[t.item.uid] || ((e = w.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
44
+ return F[t.item.uid] || ((e = I.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
40
45
  }
41
- ), P = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, T = l(
42
- () => B.value[re.Request] === "default" && w.value.uid === t.item.uid
43
- ), h = J(null), S = l(() => {
44
- let e = 0.5, r = 0.5;
45
- if (!h.value) return { ceiling: e, floor: r };
46
- const { draggingItem: p } = h.value;
47
- return !D[p == null ? void 0 : p.id] && q.value ? (e = 1, r = 0) : F.value && !x.value && !q.value && (e = 0.8, r = 0.2), { ceiling: e, floor: r };
48
- }), W = (e, r) => !(g.value.isReadOnly || v[r.id] || D[e.id]);
49
- return (e, r) => {
50
- const p = K("RequestSidebarItem", !0);
51
- return o(), m("div", {
52
- class: d(["relative flex flex-row", [
53
- i(a) && e.parentUids.length > 1 || !i(a) && 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" : ""
54
- ]])
55
- }, [
56
- U(i(le), {
57
- id: e.item.uid,
58
- ref_key: "draggableRef",
59
- ref: h,
60
- ceiling: S.value.ceiling,
61
- class: "flex flex-1 flex-col gap-[.5px] text-sm",
62
- floor: S.value.floor,
63
- isDraggable: e.isDraggable,
64
- isDroppable: e.isDroppable,
65
- parentIds: e.parentUids,
66
- onOnDragEnd: r[2] || (r[2] = (...f) => e.$emit("onDragEnd", ...f))
67
- }, {
68
- default: C(() => {
69
- var f, $;
70
- return [
71
- "summary" in e.item || "requestUid" in e.item ? (o(), c(i(ne), {
46
+ ), re = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, ae = n(
47
+ () => q.value[M.Request] === "default" && I.value.uid === t.item.uid
48
+ ), x = P(null), L = n(() => {
49
+ let e = 0.5, s = 0.5;
50
+ if (!x.value) return { ceiling: e, floor: s };
51
+ const { draggingItem: U } = x.value;
52
+ return !T[U == null ? void 0 : U.id] && j.value ? (e = 1, s = 0) : ee.value && !K.value && !j.value && (e = 0.8, s = 0.2), { ceiling: e, floor: s };
53
+ }), ne = (e, s) => !(g.value.isReadOnly || R[s.id] || T[e.id]), p = P(""), y = G(), h = G(), W = () => {
54
+ "summary" in t.item ? V.edit(t.item.uid, "summary", p.value) : "requestUid" in t.item ? O.edit(t.item.uid, "name", p.value) : "spec" in t.item ? z.edit(t.item.uid, "spec.info.title", p.value) : N.edit(t.item.uid, "name", p.value), y.hide();
55
+ }, S = () => {
56
+ p.value = $(t.item) || "", y.show();
57
+ }, oe = () => {
58
+ "requestUid" in t.item ? (O.delete(t.item), q.value[M.Examples] === t.item.uid && B(`/workspace/${g.value}/request/default`)) : "summary" in t.item ? (V.delete(
59
+ t.item,
60
+ t.parentUids[t.parentUids.length - 1]
61
+ ), q.value[M.Request] === t.item.uid && B(`/workspace/${g.value.uid}/request/default`)) : "spec" in t.item ? z.delete(t.item) : "name" in t.item && N.delete(
62
+ t.item,
63
+ t.parentUids[t.parentUids.length - 1]
64
+ );
65
+ }, de = n(() => {
66
+ var e;
67
+ return "summary" in t.item ? t.item.summary || "" : "name" in t.item ? t.item.name || "" : "spec" in t.item && ((e = t.item.spec.info) == null ? void 0 : e.title) || "";
68
+ }), f = n(() => "requestUid" in t.item ? "Example" : "summary" in t.item ? "Request" : "spec" in t.item ? "Collection" : "Folder");
69
+ return (e, s) => {
70
+ const U = fe("RequestSidebarItem", !0);
71
+ return m(), C(A, null, [
72
+ r("div", {
73
+ class: c(["relative flex flex-row", [
74
+ i(a) && e.parentUids.length > 1 || !i(a) && 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" : ""
75
+ ]])
76
+ }, [
77
+ o(i($e), {
78
+ id: e.item.uid,
79
+ ref_key: "draggableRef",
80
+ ref: x,
81
+ ceiling: L.value.ceiling,
82
+ class: "flex flex-1 flex-col gap-[.5px] text-sm",
83
+ floor: L.value.floor,
84
+ isDraggable: e.isDraggable,
85
+ isDroppable: e.isDroppable,
86
+ parentIds: e.parentUids,
87
+ onOnDragEnd: s[5] || (s[5] = (...l) => e.$emit("onDragEnd", ...l))
88
+ }, {
89
+ default: d(() => [
90
+ "summary" in e.item || "requestUid" in e.item ? (m(), v(i(Se), {
72
91
  key: 0,
73
92
  class: "no-underline",
74
- to: P()
93
+ to: re()
75
94
  }, {
76
- default: C(({ isExactActive: n }) => [
77
- s("div", {
78
- class: d(["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", [
79
- O,
80
- n || T.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
81
- ]]),
82
- tabindex: "0"
83
- }, [
84
- s("span", {
85
- class: d(["z-10 font-medium w-full pl-2 word-break-break-word", {
86
- "editable-sidebar-hover-item": !i(a)
87
- }])
88
- }, I(R(e.item)), 3),
89
- s("div", pe, [
90
- s("div", fe, [
91
- i(a) ? b("", !0) : (o(), c(z, {
92
- key: 0,
93
- item: e.item,
94
- parentUids: e.parentUids
95
- }, null, 8, ["item", "parentUids"]))
96
- ]),
97
- s("span", me, [
98
- E("   "),
99
- U(i(oe), {
100
- class: "font-bold",
101
- method: L.value
102
- }, null, 8, ["method"])
103
- ])
104
- ])
105
- ], 2)
95
+ default: d(({ isExactActive: l }) => [
96
+ o(i(J), { disabled: i(a) }, {
97
+ trigger: d(() => [
98
+ r("div", {
99
+ class: c(["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", [
100
+ Y,
101
+ l || ae.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
102
+ ]]),
103
+ tabindex: "0"
104
+ }, [
105
+ r("span", {
106
+ class: c(["z-10 font-medium w-full pl-2 word-break-break-word", {
107
+ "editable-sidebar-hover-item": !i(a)
108
+ }])
109
+ }, H($(e.item)), 3),
110
+ r("div", Te, [
111
+ r("div", Ee, [
112
+ i(a) ? w("", !0) : (m(), v(k, {
113
+ key: 0,
114
+ item: e.item,
115
+ parentUids: e.parentUids,
116
+ resourceTitle: f.value,
117
+ onDelete: s[0] || (s[0] = (u) => i(h).show()),
118
+ onRename: S
119
+ }, null, 8, ["item", "parentUids", "resourceTitle"]))
120
+ ]),
121
+ r("span", ze, [
122
+ D("   "),
123
+ o(i(Ce), {
124
+ class: "font-bold",
125
+ method: se.value
126
+ }, null, 8, ["method"])
127
+ ])
128
+ ])
129
+ ], 2)
130
+ ]),
131
+ content: d(() => [
132
+ o(k, {
133
+ item: e.item,
134
+ parentUids: e.parentUids,
135
+ resourceTitle: f.value,
136
+ static: "",
137
+ onDelete: s[1] || (s[1] = (u) => i(h).show()),
138
+ onRename: S
139
+ }, null, 8, ["item", "parentUids", "resourceTitle"])
140
+ ]),
141
+ _: 2
142
+ }, 1032, ["disabled"])
106
143
  ]),
107
144
  _: 1
108
- }, 8, ["to"])) : !i(a) || e.parentUids.length ? (o(), m("button", {
145
+ }, 8, ["to"])) : !i(a) || e.parentUids.length ? (m(), v(i(J), {
109
146
  key: 1,
110
- class: d(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", O]),
111
- type: "button",
112
- onClick: r[0] || (r[0] = (n) => i(j)(e.item.uid))
113
- }, [
114
- s("span", ce, [
115
- Q(e.$slots, "leftIcon", {}, () => [
116
- s("div", {
117
- class: d({
118
- "rotate-90": i(y)[e.item.uid]
119
- })
147
+ disabled: i(a)
148
+ }, {
149
+ trigger: d(() => {
150
+ var l, u;
151
+ return [
152
+ r("button", {
153
+ class: c(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", Y]),
154
+ type: "button",
155
+ onClick: s[2] || (s[2] = (ue) => i(_)(e.item.uid))
120
156
  }, [
121
- U(i(ae), {
122
- class: "text-c-3 text-sm",
123
- icon: "ChevronRight",
124
- size: "sm",
125
- thickness: "2.5"
126
- })
127
- ], 2)
128
- ], !0),
129
- E("")
130
- ]),
131
- s("div", be, [
132
- s("span", {
133
- class: d(["z-10 font-medium text-left w-full word-break-break-word", {
134
- "editable-sidebar-hover-item": !i(a)
135
- }])
136
- }, I(R(e.item)), 3),
137
- s("div", ge, [
138
- !i(a) && (($ = (f = e.item.spec) == null ? void 0 : f.info) == null ? void 0 : $.title) !== "Drafts" ? (o(), c(z, {
157
+ r("span", Ne, [
158
+ ce(e.$slots, "leftIcon", {}, () => [
159
+ r("div", {
160
+ class: c({
161
+ "rotate-90": i(F)[e.item.uid]
162
+ })
163
+ }, [
164
+ o(i(qe), {
165
+ class: "text-c-3 text-sm",
166
+ icon: "ChevronRight",
167
+ size: "sm",
168
+ thickness: "2.5"
169
+ })
170
+ ], 2)
171
+ ], !0),
172
+ D("   ")
173
+ ]),
174
+ r("div", Ve, [
175
+ r("span", {
176
+ class: c(["z-10 font-medium text-left w-full word-break-break-word", {
177
+ "editable-sidebar-hover-item": !i(a)
178
+ }])
179
+ }, H($(e.item)), 3),
180
+ r("div", Oe, [
181
+ !i(a) && ((u = (l = e.item.spec) == null ? void 0 : l.info) == null ? void 0 : u.title) !== "Drafts" ? (m(), v(k, {
182
+ key: 0,
183
+ item: e.item,
184
+ parentUids: e.parentUids,
185
+ resourceTitle: f.value
186
+ }, null, 8, ["item", "parentUids", "resourceTitle"])) : w("", !0),
187
+ Be
188
+ ])
189
+ ])
190
+ ])
191
+ ];
192
+ }),
193
+ content: d(() => {
194
+ var l, u;
195
+ return [
196
+ !i(a) && ((u = (l = e.item.spec) == null ? void 0 : l.info) == null ? void 0 : u.title) !== "Drafts" ? (m(), v(k, {
139
197
  key: 0,
140
198
  item: e.item,
141
- parentUids: e.parentUids
142
- }, null, 8, ["item", "parentUids"])) : b("", !0),
143
- ve
144
- ])
145
- ])
146
- ])) : b("", !0),
147
- "childUids" in e.item ? X((o(), m("div", he, [
148
- (o(!0), m(Y, null, Z(x.value ? e.item.childUids.slice(1) : e.item.childUids, (n) => (o(), c(p, {
149
- key: n,
150
- isDraggable: !i(v)[n],
151
- isDroppable: W,
152
- item: i(V)[n] || i(k)[n] || i(v)[n],
199
+ parentUids: e.parentUids,
200
+ resourceTitle: f.value,
201
+ static: "",
202
+ onDelete: s[3] || (s[3] = (ue) => i(h).show()),
203
+ onRename: S
204
+ }, null, 8, ["item", "parentUids", "resourceTitle"])) : w("", !0)
205
+ ];
206
+ }),
207
+ _: 3
208
+ }, 8, ["disabled"])) : w("", !0),
209
+ "childUids" in e.item ? ve((m(), C("div", Fe, [
210
+ (m(!0), C(A, null, be(K.value ? e.item.childUids.slice(1) : e.item.childUids, (l) => (m(), v(U, {
211
+ key: l,
212
+ isDraggable: !i(R)[l],
213
+ isDroppable: ne,
214
+ item: i(Z)[l] || i(E)[l] || i(R)[l],
153
215
  parentUids: [...e.parentUids, e.item.uid],
154
- onOnDragEnd: r[1] || (r[1] = (...A) => e.$emit("onDragEnd", ...A))
216
+ onOnDragEnd: s[4] || (s[4] = (...u) => e.$emit("onDragEnd", ...u))
155
217
  }, null, 8, ["isDraggable", "item", "parentUids"]))), 128))
156
218
  ], 512)), [
157
- [ee, M.value]
158
- ]) : b("", !0)
159
- ];
160
- }),
161
- _: 3
162
- }, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
163
- ], 2);
219
+ [ge, le.value]
220
+ ]) : w("", !0)
221
+ ]),
222
+ _: 3
223
+ }, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
224
+ ], 2),
225
+ o(i(Q), {
226
+ size: "sm",
227
+ state: i(h),
228
+ title: `Delete ${f.value}`
229
+ }, {
230
+ default: d(() => [
231
+ o(De, {
232
+ variableName: de.value,
233
+ warningMessage: "Warning: Deleting this will delete all items inside of this",
234
+ onClose: s[6] || (s[6] = (l) => i(h).hide()),
235
+ onDelete: oe
236
+ }, null, 8, ["variableName"])
237
+ ]),
238
+ _: 1
239
+ }, 8, ["state", "title"]),
240
+ o(i(Q), {
241
+ state: i(y),
242
+ title: `Rename ${f.value}`
243
+ }, {
244
+ default: d(() => [
245
+ o(i(Re), {
246
+ modelValue: p.value,
247
+ "onUpdate:modelValue": s[7] || (s[7] = (l) => p.value = l),
248
+ label: f.value,
249
+ labelShadowColor: "var(--scalar-background-1)",
250
+ onKeydown: he(Ue(W, ["prevent"]), ["enter"])
251
+ }, null, 8, ["modelValue", "label", "onKeydown"]),
252
+ r("div", je, [
253
+ o(i(X), {
254
+ class: "flex-1",
255
+ variant: "outlined",
256
+ onClick: s[8] || (s[8] = (l) => i(y).hide())
257
+ }, {
258
+ default: d(() => [
259
+ D(" Cancel ")
260
+ ]),
261
+ _: 1
262
+ }),
263
+ o(i(X), {
264
+ class: "flex-1",
265
+ type: "submit",
266
+ onClick: W
267
+ }, {
268
+ default: d(() => [
269
+ D(" Save ")
270
+ ]),
271
+ _: 1
272
+ })
273
+ ])
274
+ ]),
275
+ _: 1
276
+ }, 8, ["state", "title"])
277
+ ], 64);
164
278
  };
165
279
  }
166
280
  });
167
281
  export {
168
- $e as default
282
+ Ye as default
169
283
  };
@@ -1,16 +1,38 @@
1
1
  import type { Collection } from '@scalar/oas-utils/entities/workspace/collection';
2
2
  import type { Folder } from '@scalar/oas-utils/entities/workspace/folder';
3
3
  import type { Request, RequestExample } from '@scalar/oas-utils/entities/workspace/spec';
4
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
4
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
5
5
  /** Both inidicate the level and provide a way to traverse upwards */
6
- parentUids: string[];
7
6
  item: Collection | Folder | Request | RequestExample;
8
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
7
+ resourceTitle: string;
8
+ static?: boolean;
9
+ }>, {
10
+ static: boolean;
11
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ delete: () => void;
13
+ rename: () => void;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
9
15
  /** Both inidicate the level and provide a way to traverse upwards */
10
- parentUids: string[];
11
16
  item: Collection | Folder | Request | RequestExample;
12
- }>>>, {}, {}>;
17
+ resourceTitle: string;
18
+ static?: boolean;
19
+ }>, {
20
+ static: boolean;
21
+ }>>> & {
22
+ onDelete?: (() => any) | undefined;
23
+ onRename?: (() => any) | undefined;
24
+ }, {
25
+ static: boolean;
26
+ }, {}>;
13
27
  export default _default;
28
+ type __VLS_WithDefaults<P, D> = {
29
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
30
+ default: D[K];
31
+ }> : P[K];
32
+ };
33
+ type __VLS_Prettify<T> = {
34
+ [K in keyof T]: T[K];
35
+ } & {};
14
36
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
37
  type __VLS_TypePropsToOption<T> = {
16
38
  [K in keyof T]-?: {} extends Pick<T, K> ? {
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA4PA,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;;IAOhD,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;IAFpD,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;AAyhBtD,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":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AAkIA,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;;IAM9C,qEAAqE;UAC/D,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;mBACrC,MAAM;aACZ,OAAO;;;;;;;IAHhB,qEAAqE;UAC/D,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;mBACrC,MAAM;aACZ,OAAO;;;;;;;YAAP,OAAO;;AAoSpB,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,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
- import e from "./RequestSidebarItemMenu.vue2.js";
1
+ import t from "./RequestSidebarItemMenu.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(e, [["__scopeId", "data-v-52248ee9"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(t, [["__scopeId", "data-v-5686fba5"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };