@scalar/api-client 2.1.26 → 2.1.28

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 +23 -0
  2. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +149 -89
  4. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  5. package/dist/components/ImportCollection/ImportNowButton.vue.js +7 -9
  6. package/dist/layouts/App/create-api-client-app.d.ts +77 -20
  7. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  8. package/dist/layouts/App/create-api-client-app.js +14 -12
  9. package/dist/layouts/Modal/create-api-client-modal.d.ts +154 -40
  10. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  11. package/dist/layouts/Modal/create-api-client-modal.js +23 -26
  12. package/dist/layouts/Web/create-api-client-web.d.ts +77 -20
  13. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  14. package/dist/layouts/Web/create-api-client-web.js +12 -10
  15. package/dist/libs/create-client.d.ts +77 -20
  16. package/dist/libs/create-client.d.ts.map +1 -1
  17. package/dist/libs/create-client.js +60 -58
  18. package/dist/store/collections.d.ts +34 -4
  19. package/dist/store/collections.d.ts.map +1 -1
  20. package/dist/store/import-spec.d.ts +43 -4
  21. package/dist/store/import-spec.d.ts.map +1 -1
  22. package/dist/store/import-spec.js +60 -36
  23. package/dist/store/requests.d.ts +4 -1
  24. package/dist/store/requests.d.ts.map +1 -1
  25. package/dist/store/requests.js +76 -76
  26. package/dist/store/security-schemes.d.ts +2 -2
  27. package/dist/store/security-schemes.d.ts.map +1 -1
  28. package/dist/store/security-schemes.js +35 -37
  29. package/dist/store/servers.d.ts +10 -10
  30. package/dist/store/servers.d.ts.map +1 -1
  31. package/dist/store/store.d.ts +154 -40
  32. package/dist/store/store.d.ts.map +1 -1
  33. package/dist/store/store.js +27 -27
  34. package/dist/style.css +1 -1
  35. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  36. package/dist/views/Request/Request.vue.js +1 -1
  37. package/dist/views/Request/Request.vue2.js +39 -38
  38. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
  39. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +12 -12
  40. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  41. package/dist/views/Request/RequestSidebar.vue.js +4 -4
  42. package/dist/views/Request/RequestSidebar.vue2.js +107 -102
  43. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  44. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  45. package/dist/views/Request/RequestSidebarItem.vue2.js +165 -135
  46. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -1
  47. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  49. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +96 -71
  50. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  51. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts +9 -0
  52. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -0
  53. package/dist/views/Request/hooks/useOpenApiWatcher.js +86 -0
  54. package/dist/views/Request/libs/live-sync.d.ts +59 -0
  55. package/dist/views/Request/libs/live-sync.d.ts.map +1 -0
  56. package/dist/views/Request/libs/live-sync.js +289 -0
  57. package/dist/views/Request/types/sidebar-item.d.ts +2 -0
  58. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  59. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  60. package/dist/views/Settings/SettingsGeneral.vue.js +59 -69
  61. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -1
  62. package/dist/views/Settings/SettingsGeneralMode.vue.js +22 -22
  63. package/package.json +12 -10
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAwlB8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AANjD,wBAQG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cA8lB8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AANjD,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a2bc9058"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e56f92be"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -8,49 +8,50 @@ import se from "./RequestSection/RequestSection.vue.js";
8
8
  /* empty css */
9
9
  import ue from "./RequestSubpageHeader.vue.js";
10
10
  import le from "./ResponseSection/ResponseSection.vue.js";
11
- import { safeJSON as ne } from "@scalar/object-utils/parse";
12
- import { useToasts as ie } from "@scalar/use-toasts";
13
- import { useMediaQuery as me } from "@vueuse/core";
14
- import { useRouter as ve } from "vue-router";
15
- import de from "./RequestSidebar.vue.js";
16
- import { ERRORS as ce } from "../../libs/errors.js";
17
- import { useWorkspace as pe } from "../../store/store.js";
18
- const Me = /* @__PURE__ */ z({
11
+ import { useOpenApiWatcher as ne } from "./hooks/useOpenApiWatcher.js";
12
+ import { safeJSON as ie } from "@scalar/object-utils/parse";
13
+ import { useToasts as me } from "@scalar/use-toasts";
14
+ import { useMediaQuery as ve } from "@vueuse/core";
15
+ import { useRouter as de } from "vue-router";
16
+ import ce from "./RequestSidebar.vue.js";
17
+ import { ERRORS as pe } from "../../libs/errors.js";
18
+ import { useWorkspace as fe } from "../../store/store.js";
19
+ const Ue = /* @__PURE__ */ z({
19
20
  __name: "Request",
20
21
  emits: ["newTab"],
21
- setup(fe) {
22
+ setup(Re) {
22
23
  var O;
23
- const I = pe(), { toast: b } = ie(), {
24
+ const I = fe(), { toast: b } = me(), {
24
25
  activeCollection: x,
25
26
  activeExample: d,
26
27
  activeEnvironment: M,
27
- activeRequest: S,
28
+ activeRequest: h,
28
29
  activeWorkspace: a,
29
30
  activeServer: T,
30
31
  cookies: U,
31
32
  modalState: l,
32
- requestHistory: h,
33
+ requestHistory: S,
33
34
  securitySchemes: $,
34
- requestMutators: H,
35
- serverMutators: L,
36
- servers: _,
35
+ requestMutators: A,
36
+ serverMutators: H,
37
+ servers: L,
37
38
  events: c
38
- } = I, u = y(!((O = a.value) != null && O.isReadOnly)), k = y(), e = y(), q = y(""), A = ve(), j = J(
39
- () => h.findLast((o) => {
39
+ } = I, u = y(!((O = a.value) != null && O.isReadOnly)), k = y(), e = y(), q = y(""), _ = de(), W = J(
40
+ () => S.findLast((o) => {
40
41
  var t;
41
42
  return o.request.uid === ((t = d.value) == null ? void 0 : t.uid);
42
43
  })
43
- ), D = me("(max-width: 800px)");
44
- G(D, (o) => u.value = !o);
44
+ ), j = ve("(max-width: 800px)");
45
+ G(j, (o) => u.value = !o);
45
46
  const E = async () => {
46
47
  var f;
47
- if (!S.value || !d.value || !x.value)
48
+ if (!h.value || !d.value || !x.value)
48
49
  return;
49
- const o = ne.parse(((f = M.value) == null ? void 0 : f.value) || "{}");
50
+ const o = ie.parse(((f = M.value) == null ? void 0 : f.value) || "{}");
50
51
  o.error && console.error("INVALID ENVIRONMENT!");
51
52
  const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = a.value.cookies.map((R) => U[R]), [n, i] = ae({
52
53
  auth: x.value.auth,
53
- request: S.value,
54
+ request: h.value,
54
55
  example: d.value,
55
56
  proxy: a.value.proxyUrl ?? "",
56
57
  environment: t,
@@ -65,30 +66,30 @@ const Me = /* @__PURE__ */ z({
65
66
  }
66
67
  k.value = i.controller;
67
68
  const [m, p] = await i.sendRequest();
68
- m ? b(m.message, "error") : h.push(p);
69
- }, F = async () => {
69
+ m ? b(m.message, "error") : S.push(p);
70
+ }, D = async () => {
70
71
  var o;
71
- return (o = k.value) == null ? void 0 : o.abort(ce.REQUEST_ABORTED);
72
+ return (o = k.value) == null ? void 0 : o.abort(pe.REQUEST_ABORTED);
72
73
  };
73
74
  K(() => {
74
- c.executeRequest.on(E), c.cancelRequest.on(F);
75
- }), P(() => c.executeRequest.off(E));
76
- function Q({ requestName: o }) {
75
+ c.executeRequest.on(E), c.cancelRequest.on(D);
76
+ }), ne(), P(() => c.executeRequest.off(E));
77
+ function F({ requestName: o }) {
77
78
  var r, n, i, m;
78
79
  if (!e.value) return;
79
80
  if (e.value.servers) {
80
- const p = Object.values(_).find(
81
+ const p = Object.values(L).find(
81
82
  (f) => {
82
83
  var R, C;
83
84
  return f.url === ((C = (R = e == null ? void 0 : e.value) == null ? void 0 : R.servers) == null ? void 0 : C[0]);
84
85
  }
85
86
  );
86
- p ? q.value = p.uid : q.value = L.add(
87
+ p ? q.value = p.uid : q.value = H.add(
87
88
  { url: e.value.servers[0] },
88
89
  a.value.collections[0]
89
90
  ).uid;
90
91
  }
91
- const t = H.add(
92
+ const t = A.add(
92
93
  {
93
94
  summary: o,
94
95
  path: (r = e == null ? void 0 : e.value) == null ? void 0 : r.path,
@@ -99,11 +100,11 @@ const Me = /* @__PURE__ */ z({
99
100
  },
100
101
  a.value.collections[0]
101
102
  );
102
- t && A.push(
103
+ t && _.push(
103
104
  `/workspace/${a.value.uid}/request/${t.uid}`
104
105
  ), l.hide();
105
106
  }
106
- function W(o) {
107
+ function Q(o) {
107
108
  e.value = re(o), l.show();
108
109
  }
109
110
  return (o, t) => (w(), X(Y, null, [
@@ -117,11 +118,11 @@ const Me = /* @__PURE__ */ z({
117
118
  "onUpdate:modelValue": t[0] || (t[0] = (r) => u.value = r),
118
119
  isReadonly: s(a).isReadOnly,
119
120
  onHideModal: t[1] || (t[1] = () => s(l).hide()),
120
- onImportCurl: W
121
+ onImportCurl: Q
121
122
  }, null, 8, ["modelValue", "isReadonly"]),
122
123
  v(te, null, {
123
124
  default: V(() => [
124
- v(de, {
125
+ v(ce, {
125
126
  isReadonly: s(a).isReadOnly,
126
127
  showSidebar: u.value,
127
128
  onNewTab: t[2] || (t[2] = (r) => o.$emit("newTab", r)),
@@ -136,7 +137,7 @@ const Me = /* @__PURE__ */ z({
136
137
  return [
137
138
  v(se),
138
139
  v(le, {
139
- response: (r = j.value) == null ? void 0 : r.response
140
+ response: (r = W.value) == null ? void 0 : r.response
140
141
  }, null, 8, ["response"])
141
142
  ];
142
143
  }),
@@ -151,11 +152,11 @@ const Me = /* @__PURE__ */ z({
151
152
  parsedCurl: e.value,
152
153
  state: s(l),
153
154
  onClose: t[4] || (t[4] = (r) => s(l).hide()),
154
- onImportCurl: Q
155
+ onImportCurl: F
155
156
  }, null, 8, ["parsedCurl", "state"])) : g("", !0)
156
157
  ], 64));
157
158
  }
158
159
  });
159
160
  export {
160
- Me as default
161
+ Ue as default
161
162
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteRequestAuthModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue"],"names":[],"mappings":";WAwDS;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;YACpD;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;;;;WAD1C;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;YACpD;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;;;;AAqKnD,wBASG"}
1
+ {"version":3,"file":"DeleteRequestAuthModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue"],"names":[],"mappings":";WAsDS;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;YACpD;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;;;;WAD1C;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;YACpD;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;;;;AAmKnD,wBASG"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as y, openBlock as S, createBlock as _, unref as s, withCtx as n, createElementVNode as r, toDisplayString as i, createVNode as m, createTextVNode as u } from "vue";
2
- import { ScalarModal as g, ScalarButton as d } from "@scalar/components";
3
- import { useWorkspace as k } from "../../../../store/store.js";
4
- const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex justify-between gap-2" }, M = /* @__PURE__ */ y({
1
+ import { defineComponent as b, openBlock as y, createBlock as S, unref as s, withCtx as n, createElementVNode as r, toDisplayString as i, createVNode as m, createTextVNode as u } from "vue";
2
+ import { ScalarModal as _, ScalarButton as d } from "@scalar/components";
3
+ import { useWorkspace as g } from "../../../../store/store.js";
4
+ const k = { class: "mb-4 leading-normal text-c-2 text-sm" }, C = { class: "flex justify-between gap-2" }, B = /* @__PURE__ */ b({
5
5
  __name: "DeleteRequestAuthModal",
6
6
  props: {
7
7
  state: {},
@@ -9,11 +9,11 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
9
9
  },
10
10
  emits: ["close"],
11
11
  setup(p, { emit: f }) {
12
- const c = p, l = f, { securitySchemes: h, securitySchemeMutators: x } = k(), b = () => {
12
+ const l = p, c = f, { securitySchemeMutators: h } = g(), x = () => {
13
13
  var e;
14
- (e = c.scheme) != null && e.id && x.delete(h[c.scheme.id]), l("close");
14
+ (e = l.scheme) != null && e.id && h.delete(l.scheme.id), c("close");
15
15
  };
16
- return (e, t) => (S(), _(s(g), {
16
+ return (e, t) => (y(), S(s(_), {
17
17
  size: "xxs",
18
18
  state: e.state,
19
19
  title: "Delete Security Scheme"
@@ -21,13 +21,13 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
21
21
  default: n(() => {
22
22
  var a;
23
23
  return [
24
- r("p", C, " This cannot be undone. You’re about to delete the " + i((a = e.scheme) == null ? void 0 : a.label) + " security scheme from the collection. ", 1),
25
- r("div", w, [
24
+ r("p", k, " This cannot be undone. You’re about to delete the " + i((a = e.scheme) == null ? void 0 : a.label) + " security scheme from the collection. ", 1),
25
+ r("div", C, [
26
26
  m(s(d), {
27
27
  class: "gap-1.5 px-3 h-8 shadow-none focus:outline-none flex items-center cursor-pointer",
28
28
  type: "button",
29
29
  variant: "outlined",
30
- onClick: t[0] || (t[0] = (o) => l("close"))
30
+ onClick: t[0] || (t[0] = (o) => c("close"))
31
31
  }, {
32
32
  default: n(() => t[1] || (t[1] = [
33
33
  u(" Cancel ")
@@ -37,7 +37,7 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
37
37
  m(s(d), {
38
38
  class: "gap-1.5 px-3 h-8 shadow-none focus:outline-none flex items-center cursor-pointer",
39
39
  type: "submit",
40
- onClick: b
40
+ onClick: x
41
41
  }, {
42
42
  default: n(() => {
43
43
  var o;
@@ -55,5 +55,5 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
55
55
  }
56
56
  });
57
57
  export {
58
- M as default
58
+ B as default
59
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAsVe,OAAO;gBACR,OAAO;;;cAqmBkB,MAAM;aAAO,MAAM;;;;iBAtmB3C,OAAO;gBACR,OAAO;;;cAqmBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
1
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBA6Ve,OAAO;gBACR,OAAO;;;cAynBkB,MAAM;aAAO,MAAM;;;;iBA1nB3C,OAAO;gBACR,OAAO;;;cAynBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
@@ -1,7 +1,7 @@
1
- import e from "./RequestSidebar.vue2.js";
1
+ import o from "./RequestSidebar.vue2.js";
2
2
  /* empty css */
3
- import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-3e3ee583"]]);
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7cb3d69f"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,39 +1,39 @@
1
- import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as u, unref as t, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as i, isRef as te, withKeys as v, withModifiers as p, createBlock as l, renderList as C, createTextVNode as D, toDisplayString as oe, createCommentVNode as $, vShow as se } from "vue";
2
- import re from "../../assets/rabbit.ascii.js";
3
- import ae from "../../assets/rabbitjump.ascii.js";
1
+ import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as u, unref as t, normalizeClass as b, createSlots as te, withCtx as i, createElementVNode as n, isRef as oe, withKeys as v, withModifiers as p, createBlock as l, renderList as x, createTextVNode as D, toDisplayString as se, createCommentVNode as F, vShow as re } from "vue";
2
+ import ae from "../../assets/rabbit.ascii.js";
3
+ import ne from "../../assets/rabbitjump.ascii.js";
4
4
  import ie from "../../components/HttpMethod/HttpMethod.vue.js";
5
- import V from "../../components/ScalarAsciiArt.vue.js";
6
- import { useSearch as ne } from "../../components/Search/useSearch.js";
7
- import le from "../../components/Sidebar/SidebarButton.vue.js";
8
- import de from "./RequestSidebarItemMenu.vue.js";
9
- import { dragHandlerFactory as ue } from "./handle-drag.js";
10
- import { ScalarSearchInput as me, ScalarSearchResultList as pe, ScalarSearchResultItem as ce, ScalarIcon as q } from "@scalar/components";
11
- import { LibraryIcon as fe } from "@scalar/icons";
12
- import be from "./RequestSidebarItem.vue.js";
13
- import he from "../../components/Sidebar/Sidebar.vue.js";
14
- import { useSidebar as Se } from "../../hooks/useSidebar.js";
15
- import { useWorkspace as ve } from "../../store/store.js";
16
- const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, we = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, Ke = /* @__PURE__ */ J({
5
+ import $ from "../../components/ScalarAsciiArt.vue.js";
6
+ import { useSearch as le } from "../../components/Search/useSearch.js";
7
+ import de from "../../components/Sidebar/SidebarButton.vue.js";
8
+ import ue from "./RequestSidebarItemMenu.vue.js";
9
+ import { dragHandlerFactory as me } from "./handle-drag.js";
10
+ import { ScalarSearchInput as pe, ScalarSearchResultList as ce, ScalarSearchResultItem as fe, ScalarIcon as V } from "@scalar/components";
11
+ import { LibraryIcon as be } from "@scalar/icons";
12
+ import he from "./RequestSidebarItem.vue.js";
13
+ import Se from "../../components/Sidebar/Sidebar.vue.js";
14
+ import { useSidebar as ve } from "../../hooks/useSidebar.js";
15
+ import { useWorkspace as ge } from "../../store/store.js";
16
+ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, ke = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, We = /* @__PURE__ */ Q({
17
17
  __name: "RequestSidebar",
18
18
  props: {
19
19
  showSidebar: { type: Boolean },
20
20
  isReadonly: { type: Boolean }
21
21
  },
22
22
  emits: ["update:showSidebar", "newTab"],
23
- setup(P, { emit: B }) {
24
- const E = P, R = B, k = ve(), {
25
- activeWorkspaceCollections: F,
26
- activeRequest: M,
27
- activeWorkspaceRequests: O,
28
- findRequestParents: K,
29
- isReadOnly: N,
23
+ setup(q, { emit: P }) {
24
+ const T = q, g = P, R = ge(), {
25
+ activeWorkspaceCollections: B,
26
+ activeRequest: E,
27
+ activeWorkspaceRequests: M,
28
+ findRequestParents: O,
29
+ isReadOnly: W,
30
30
  events: c
31
- } = k, { handleDragEnd: T, isDroppable: z } = ue(k), { collapsedSidebarFolders: A, setCollapsedSidebarFolder: L } = Se(), m = Q({ open: !1 });
32
- X(
33
- M,
34
- (s) => {
35
- s && K(s).forEach(
36
- (e) => L(e, !0)
31
+ } = R, { handleDragEnd: K, isDroppable: N } = me(R), { collapsedSidebarFolders: U, setCollapsedSidebarFolder: z } = ve(), m = X({ open: !1 });
32
+ Y(
33
+ E,
34
+ (o) => {
35
+ o && O(o).forEach(
36
+ (e) => z(e, !0)
37
37
  );
38
38
  },
39
39
  { immediate: !0 }
@@ -41,111 +41,115 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = {
41
41
  const {
42
42
  searchText: f,
43
43
  searchResultsWithPlaceholderResults: w,
44
- selectedSearchResult: y,
45
- onSearchResultClick: U,
46
- fuseSearch: W,
47
- searchInputRef: g,
44
+ selectedSearchResult: k,
45
+ onSearchResultClick: A,
46
+ fuseSearch: L,
47
+ searchInputRef: y,
48
48
  searchResultRefs: H,
49
- navigateSearchResults: I,
49
+ navigateSearchResults: C,
50
50
  selectSearchResult: j
51
- } = ne(), x = (s) => {
51
+ } = le(), I = (o) => {
52
52
  var e;
53
- s && (s.toggleSidebar && R("update:showSidebar", E.showSidebar), s.openCommandPalette && (s.openCommandPalette.preventDefault(), c.commandPalette.emit()), s.focusRequestSearch && ((e = g.value) == null || e.focus()));
53
+ o && (o.toggleSidebar && g("update:showSidebar", T.showSidebar), o.openCommandPalette && (o.openCommandPalette.preventDefault(), c.commandPalette.emit()), o.focusRequestSearch && ((e = y.value) == null || e.focus()));
54
54
  };
55
- return Y(() => c.hotKeys.on(x)), Z(() => {
56
- c.hotKeys.off(x);
57
- }), (s, e) => (a(), h(S, null, [
58
- _(u(t(he), {
59
- class: b([s.showSidebar ? "sidebar-active-width" : ""]),
60
- showSidebar: s.showSidebar,
61
- "onUpdate:showSidebar": e[8] || (e[8] = (o) => s.$emit("update:showSidebar", o))
62
- }, ee({
63
- content: n(() => [
64
- i("div", Re, [
65
- u(t(me), {
55
+ Z(() => c.hotKeys.on(I)), _(() => {
56
+ c.hotKeys.off(I);
57
+ });
58
+ const G = (o) => {
59
+ o != null && o.documentUrl && (o.watchForChanges = !o.watchForChanges);
60
+ };
61
+ return (o, e) => (a(), h(S, null, [
62
+ ee(u(t(Se), {
63
+ class: b([o.showSidebar ? "sidebar-active-width" : ""]),
64
+ showSidebar: o.showSidebar,
65
+ "onUpdate:showSidebar": e[8] || (e[8] = (s) => o.$emit("update:showSidebar", s))
66
+ }, te({
67
+ content: i(() => [
68
+ n("div", Re, [
69
+ u(t(pe), {
66
70
  ref_key: "searchInputRef",
67
- ref: g,
71
+ ref: y,
68
72
  modelValue: t(f),
69
- "onUpdate:modelValue": e[0] || (e[0] = (o) => te(f) ? f.value = o : null),
73
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => oe(f) ? f.value = s : null),
70
74
  sidebar: "",
71
- onInput: t(W),
75
+ onInput: t(L),
72
76
  onKeydown: [
73
- e[1] || (e[1] = v(p((o) => t(I)("down"), ["stop"]), ["down"])),
74
- e[2] || (e[2] = v(p((o) => t(j)(), ["stop"]), ["enter"])),
75
- e[3] || (e[3] = v(p((o) => t(I)("up"), ["stop"]), ["up"]))
77
+ e[1] || (e[1] = v(p((s) => t(C)("down"), ["stop"]), ["down"])),
78
+ e[2] || (e[2] = v(p((s) => t(j)(), ["stop"]), ["enter"])),
79
+ e[3] || (e[3] = v(p((s) => t(C)("up"), ["stop"]), ["up"]))
76
80
  ]
77
81
  }, null, 8, ["modelValue", "onInput"])
78
82
  ]),
79
- i("div", {
83
+ n("div", {
80
84
  class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
81
- "pb-14": !s.isReadonly
85
+ "pb-14": !o.isReadonly
82
86
  }]),
83
87
  onDragenter: e[6] || (e[6] = p(() => {
84
88
  }, ["prevent"])),
85
89
  onDragover: e[7] || (e[7] = p(() => {
86
90
  }, ["prevent"]))
87
91
  }, [
88
- t(f) ? (a(), l(t(pe), {
92
+ t(f) ? (a(), l(t(ce), {
89
93
  key: 0,
90
94
  class: "gap-px custom-scroll",
91
95
  noResults: !t(w).length
92
96
  }, {
93
- default: n(() => [
94
- (a(!0), h(S, null, C(t(w), (o, d) => (a(), l(t(ce), {
95
- id: `#search-input-${o.item.id}`,
96
- key: o.refIndex,
97
+ default: i(() => [
98
+ (a(!0), h(S, null, x(t(w), (s, d) => (a(), l(t(fe), {
99
+ id: `#search-input-${s.item.id}`,
100
+ key: s.refIndex,
97
101
  ref_for: !0,
98
102
  ref: (r) => t(H)[d] = r,
99
- active: t(y) === d,
103
+ active: t(k) === d,
100
104
  class: "px-2",
101
- onClick: (r) => t(U)(o),
102
- onFocus: (r) => y.value = d
105
+ onClick: (r) => t(A)(s),
106
+ onFocus: (r) => k.value = d
103
107
  }, {
104
- addon: n(() => [
108
+ addon: i(() => [
105
109
  u(ie, {
106
110
  class: "font-bold",
107
- method: o.item.httpVerb ?? "get"
111
+ method: s.item.httpVerb ?? "get"
108
112
  }, null, 8, ["method"])
109
113
  ]),
110
- default: n(() => [
111
- D(oe(o.item.title) + " ", 1)
114
+ default: i(() => [
115
+ D(se(s.item.title) + " ", 1)
112
116
  ]),
113
117
  _: 2
114
118
  }, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
115
119
  ]),
116
120
  _: 1
117
- }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, C(t(F), (o) => {
121
+ }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(B), (s) => {
118
122
  var d;
119
- return a(), l(be, {
120
- key: o.uid,
121
- isDraggable: !s.isReadonly && ((d = o.info) == null ? void 0 : d.title) !== "Drafts",
122
- isDroppable: t(z),
123
+ return a(), l(he, {
124
+ key: s.uid,
125
+ isDraggable: !o.isReadonly && ((d = s.info) == null ? void 0 : d.title) !== "Drafts",
126
+ isDroppable: t(N),
123
127
  menuItem: m,
124
128
  parentUids: [],
125
- uid: o.uid,
126
- onNewTab: e[4] || (e[4] = (r, G) => R("newTab", { name: r, uid: G })),
127
- onOnDragEnd: t(T),
129
+ uid: s.uid,
130
+ onNewTab: e[4] || (e[4] = (r, J) => g("newTab", { name: r, uid: J })),
131
+ onOnDragEnd: t(K),
128
132
  onOpenMenu: e[5] || (e[5] = (r) => Object.assign(m, r))
129
133
  }, {
130
- leftIcon: n(() => {
134
+ leftIcon: i(() => {
131
135
  var r;
132
136
  return [
133
- ((r = o.info) == null ? void 0 : r.title) === "Drafts" ? (a(), l(t(q), {
137
+ ((r = s.info) == null ? void 0 : r.title) === "Drafts" ? (a(), l(t(V), {
134
138
  key: 0,
135
139
  class: "text-sidebar-c-2 group-hover:hidden",
136
140
  icon: "Scribble",
137
141
  thickness: "2.25"
138
- })) : (a(), l(t(fe), {
142
+ })) : (a(), l(t(be), {
139
143
  key: 1,
140
144
  class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
141
- src: o["x-scalar-icon"] || "interface-content-folder"
145
+ src: s["x-scalar-icon"] || "interface-content-folder"
142
146
  }, null, 8, ["src"])),
143
- i("div", {
147
+ n("div", {
144
148
  class: b({
145
- "rotate-90": t(A)[o.uid]
149
+ "rotate-90": t(U)[s.uid]
146
150
  })
147
151
  }, [
148
- u(t(q), {
152
+ u(t(V), {
149
153
  class: "text-c-3 hidden text-sm group-hover:block",
150
154
  icon: "ChevronRight",
151
155
  size: "sm",
@@ -159,33 +163,33 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = {
159
163
  }), 128))
160
164
  ], 34)
161
165
  ]),
162
- button: n(() => [
163
- i("div", {
166
+ button: i(() => [
167
+ n("div", {
164
168
  class: b({
165
- "empty-sidebar-item": t(O).length <= 1
169
+ "empty-sidebar-item": t(M).length <= 1
166
170
  })
167
171
  }, [
168
- i("div", ke, [
169
- i("div", we, [
170
- u(V, {
171
- art: t(re),
172
+ n("div", we, [
173
+ n("div", ke, [
174
+ u($, {
175
+ art: t(ae),
172
176
  class: "font-bold rabbitsit"
173
177
  }, null, 8, ["art"]),
174
- u(V, {
175
- art: t(ae),
178
+ u($, {
179
+ art: t(ne),
176
180
  class: "font-bold absolute top-0 left-0 rabbitjump"
177
181
  }, null, 8, ["art"])
178
182
  ]),
179
- e[10] || (e[10] = i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
180
- i("b", { class: "font-medium" }, "Let's Get Started"),
181
- i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
183
+ e[10] || (e[10] = n("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
184
+ n("b", { class: "font-medium" }, "Let's Get Started"),
185
+ n("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
182
186
  ], -1))
183
187
  ]),
184
- s.isReadonly ? $("", !0) : (a(), l(le, {
188
+ o.isReadonly ? F("", !0) : (a(), l(de, {
185
189
  key: 0,
186
190
  click: t(c).commandPalette.emit
187
191
  }, {
188
- title: n(() => e[11] || (e[11] = [
192
+ title: i(() => e[11] || (e[11] = [
189
193
  D("Add Item")
190
194
  ])),
191
195
  _: 1
@@ -194,22 +198,23 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = {
194
198
  ]),
195
199
  _: 2
196
200
  }, [
197
- s.isReadonly ? void 0 : {
201
+ o.isReadonly ? void 0 : {
198
202
  name: "header",
199
- fn: n(() => []),
203
+ fn: i(() => []),
200
204
  key: "0"
201
205
  }
202
206
  ]), 1032, ["class", "showSidebar"]), [
203
- [se, s.showSidebar]
207
+ [re, o.showSidebar]
204
208
  ]),
205
- !t(N) && m ? (a(), l(de, {
209
+ !t(W) && m ? (a(), l(ue, {
206
210
  key: 0,
207
211
  menuItem: m,
208
- onCloseMenu: e[9] || (e[9] = (o) => m.open = !1)
209
- }, null, 8, ["menuItem"])) : $("", !0)
212
+ onCloseMenu: e[9] || (e[9] = (s) => m.open = !1),
213
+ onToggleWatchForChanges: G
214
+ }, null, 8, ["menuItem"])) : F("", !0)
210
215
  ], 64));
211
216
  }
212
217
  });
213
218
  export {
214
- Ke as default
219
+ We as default
215
220
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA0bA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AA6O1B,iBAAS,cAAc;gBAtMT,IAAI;;gBAAJ,IAAI;EAkwBjB;AACD,QAAA,MAAM,eAAe;IAlyBjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;IAjBzB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;;iBAZX,OAAO;6EAyyBvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA8dA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAyP1B,iBAAS,cAAc;gBAlNT,IAAI;;gBAAJ,IAAI;EAo1BjB;AACD,QAAA,MAAM,eAAe;IAp3BjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;IAjBzB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;;iBAZX,OAAO;6EA23BvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,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-d0057f49"]]);
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-0eb4db04"]]);
6
6
  export {
7
7
  a as default
8
8
  };