@scalar/api-client 2.1.32 → 2.1.34

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 (78) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  3. package/dist/components/ScalarHotkey.vue.d.ts +5 -6
  4. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  5. package/dist/components/ScalarHotkey.vue.js +9 -18
  6. package/dist/components/Sidebar/SidebarButton.vue.d.ts +4 -0
  7. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  8. package/dist/components/Sidebar/SidebarButton.vue.js +19 -17
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +8 -8
  12. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  13. package/dist/layouts/App/ApiClientApp.vue.js +35 -29
  14. package/dist/layouts/App/create-api-client-app.d.ts +257 -45
  15. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  16. package/dist/layouts/App/create-api-client-app.js +10 -10
  17. package/dist/layouts/App/hotkeys.js +1 -1
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts +514 -90
  19. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  20. package/dist/layouts/Modal/create-api-client-modal.js +24 -22
  21. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  22. package/dist/layouts/Web/ApiClientWeb.vue.js +33 -27
  23. package/dist/layouts/Web/create-api-client-web.d.ts +258 -46
  24. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  25. package/dist/layouts/Web/create-api-client-web.js +9 -9
  26. package/dist/libs/create-client.d.ts +280 -50
  27. package/dist/libs/create-client.d.ts.map +1 -1
  28. package/dist/libs/create-client.js +25 -24
  29. package/dist/libs/hot-keys.d.ts +1 -1
  30. package/dist/libs/local-storage.d.ts +2 -2
  31. package/dist/libs/local-storage.d.ts.map +1 -1
  32. package/dist/libs/send-request.d.ts +2 -1
  33. package/dist/libs/send-request.d.ts.map +1 -1
  34. package/dist/libs/send-request.js +98 -97
  35. package/dist/router.d.ts +5 -5
  36. package/dist/router.d.ts.map +1 -1
  37. package/dist/router.js +32 -32
  38. package/dist/store/collections.d.ts +14 -4
  39. package/dist/store/collections.d.ts.map +1 -1
  40. package/dist/store/events.d.ts +1 -1
  41. package/dist/store/import-spec.d.ts +16 -31
  42. package/dist/store/import-spec.d.ts.map +1 -1
  43. package/dist/store/import-spec.js +43 -56
  44. package/dist/store/requests.d.ts +14 -14
  45. package/dist/store/store.d.ts +514 -90
  46. package/dist/store/store.d.ts.map +1 -1
  47. package/dist/store/store.js +43 -43
  48. package/dist/store/workspace.d.ts +10 -10
  49. package/dist/store/workspace.d.ts.map +1 -1
  50. package/dist/style.css +1 -1
  51. package/dist/views/Cookies/Cookies.vue.d.ts +5 -1
  52. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  53. package/dist/views/Cookies/Cookies.vue2.js +64 -55
  54. package/dist/views/Environment/Environment.vue.d.ts +5 -1
  55. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  56. package/dist/views/Environment/Environment.vue2.js +75 -66
  57. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  58. package/dist/views/Request/Request.vue.js +1 -1
  59. package/dist/views/Request/Request.vue2.js +98 -91
  60. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -0
  61. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  62. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  63. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +104 -111
  64. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +5 -1
  65. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  66. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +37 -34
  67. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +5 -1
  68. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  69. package/dist/views/Request/RequestSection/RequestSection.vue.js +43 -37
  70. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  71. package/dist/views/Request/RequestSidebar.vue.js +4 -4
  72. package/dist/views/Request/RequestSidebar.vue2.js +43 -42
  73. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  74. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  75. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -26
  76. package/dist/views/Settings/SettingsGeneral.vue.js +3 -3
  77. package/dist/views/Settings/SettingsGeneralMode.vue.js +3 -3
  78. package/package.json +9 -9
@@ -1,49 +1,52 @@
1
- import { defineComponent as w, computed as x, openBlock as r, createElementBlock as s, Fragment as f, renderList as g, createVNode as d, unref as i, withCtx as l, createBlock as k, createTextVNode as n, toDisplayString as T, createCommentVNode as _, capitalize as B } from "vue";
2
- import V from "../RequestAuthDataTableInput.vue.js";
3
- import S from "./OAuth2.vue.js";
1
+ import { defineComponent as x, computed as g, openBlock as r, createElementBlock as s, Fragment as f, renderList as S, createVNode as o, unref as i, withCtx as l, createBlock as k, createTextVNode as n, toDisplayString as T, createCommentVNode as c, capitalize as B } from "vue";
2
+ import y from "../RequestAuthDataTableInput.vue.js";
3
+ import E from "./OAuth2.vue.js";
4
4
  import p from "../../../../components/DataTable/DataTableRow.vue.js";
5
- import E from "../../../../components/DataTable/DataTableCell.vue.js";
6
- import { isOauth2Example as F } from "../../libs/oauth2.js";
7
- import { useWorkspace as R } from "../../../../store/store.js";
8
- const A = /* @__PURE__ */ w({
5
+ import F from "../../../../components/DataTable/DataTableCell.vue.js";
6
+ import { isOauth2Example as R } from "../../libs/oauth2.js";
7
+ import { useWorkspace as C } from "../../../../store/store.js";
8
+ const A = /* @__PURE__ */ x({
9
9
  __name: "RequestExampleAuth",
10
- setup(C) {
11
- const { activeCollection: y, activeRequest: U, collectionMutators: v, securitySchemes: $ } = R(), c = x(() => !y.value || !U.value ? [] : U.value.selectedSecuritySchemeUids.map((o) => ({
12
- example: y.value.auth[o],
13
- scheme: $[o]
10
+ props: {
11
+ selectedSecuritySchemeUids: {}
12
+ },
13
+ setup(_) {
14
+ const { activeCollection: V, activeRequest: $, collectionMutators: v, securitySchemes: b } = C(), U = g(() => !V.value || !$.value ? [] : _.selectedSecuritySchemeUids.map((d) => ({
15
+ example: V.value.auth[d],
16
+ scheme: b[d]
14
17
  })));
15
- function b(o) {
16
- return `${B(o.nameKey)}: ${o.type} ${o.type === "oauth2" ? o.flow.type : ""}`;
18
+ function w(d) {
19
+ return `${B(d.nameKey)}: ${d.type} ${d.type === "oauth2" ? d.flow.type : ""}`;
17
20
  }
18
- function m(o, u, e, t) {
21
+ function m(d, u, e, t) {
19
22
  var a;
20
- (a = y.value) != null && a.uid && v.edit(
21
- y.value.uid,
22
- `auth.${o}.${e}`,
23
+ (a = V.value) != null && a.uid && v.edit(
24
+ V.value.uid,
25
+ `auth.${d}.${e}`,
23
26
  t
24
27
  );
25
28
  }
26
- return (o, u) => (r(!0), s(f, null, g(c.value, ({ scheme: e, example: t }) => (r(), s(f, {
29
+ return (d, u) => (r(!0), s(f, null, S(U.value, ({ scheme: e, example: t }) => (r(), s(f, {
27
30
  key: e.uid
28
31
  }, [
29
- d(i(p), { class: "group/delete" }, {
32
+ o(i(p), { class: "group/delete" }, {
30
33
  default: l(() => [
31
- c.value.length > 1 ? (r(), k(i(E), {
34
+ U.value.length > 1 ? (r(), k(i(F), {
32
35
  key: 0,
33
36
  class: "text-c-2 pl-2 text-xs font-medium flex items-center bg-b-2"
34
37
  }, {
35
38
  default: l(() => [
36
- n(T(b(e)), 1)
39
+ n(T(w(e)), 1)
37
40
  ]),
38
41
  _: 2
39
- }, 1024)) : _("", !0)
42
+ }, 1024)) : c("", !0)
40
43
  ]),
41
44
  _: 2
42
45
  }, 1024),
43
46
  e.type === "http" && t.type === "http" ? (r(), s(f, { key: 0 }, [
44
47
  e.scheme === "bearer" ? (r(), k(i(p), { key: 0 }, {
45
48
  default: l(() => [
46
- d(V, {
49
+ o(y, {
47
50
  id: `http-bearer-token-${e.uid}`,
48
51
  modelValue: t.token,
49
52
  placeholder: "Token",
@@ -58,9 +61,9 @@ const A = /* @__PURE__ */ w({
58
61
  ]),
59
62
  _: 2
60
63
  }, 1024)) : e.scheme === "basic" ? (r(), s(f, { key: 1 }, [
61
- d(i(p), null, {
64
+ o(i(p), null, {
62
65
  default: l(() => [
63
- d(V, {
66
+ o(y, {
64
67
  id: `http-basic-username-${e.uid}`,
65
68
  class: "text-c-2",
66
69
  modelValue: t.username,
@@ -76,9 +79,9 @@ const A = /* @__PURE__ */ w({
76
79
  ]),
77
80
  _: 2
78
81
  }, 1024),
79
- d(i(p), null, {
82
+ o(i(p), null, {
80
83
  default: l(() => [
81
- d(V, {
84
+ o(y, {
82
85
  id: `http-basic-password-${e.uid}`,
83
86
  modelValue: t.password,
84
87
  placeholder: "xxxxxx",
@@ -93,11 +96,11 @@ const A = /* @__PURE__ */ w({
93
96
  ]),
94
97
  _: 2
95
98
  }, 1024)
96
- ], 64)) : _("", !0)
99
+ ], 64)) : c("", !0)
97
100
  ], 64)) : e.type === "apiKey" && t.type === "apiKey" ? (r(), s(f, { key: 1 }, [
98
- d(i(p), null, {
101
+ o(i(p), null, {
99
102
  default: l(() => [
100
- d(V, {
103
+ o(y, {
101
104
  id: `api-key-name-${e.uid}`,
102
105
  modelValue: t.name,
103
106
  placeholder: "api-key",
@@ -111,9 +114,9 @@ const A = /* @__PURE__ */ w({
111
114
  ]),
112
115
  _: 2
113
116
  }, 1024),
114
- d(i(p), null, {
117
+ o(i(p), null, {
115
118
  default: l(() => [
116
- d(V, {
119
+ o(y, {
117
120
  id: `api-key-value-add-${e.uid}`,
118
121
  modelValue: t.value,
119
122
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
@@ -127,11 +130,11 @@ const A = /* @__PURE__ */ w({
127
130
  ]),
128
131
  _: 2
129
132
  }, 1024)
130
- ], 64)) : e.type === "oauth2" && i(F)(t) ? (r(), k(S, {
133
+ ], 64)) : e.type === "oauth2" && i(R)(t) ? (r(), k(E, {
131
134
  key: 2,
132
135
  example: t,
133
136
  scheme: e
134
- }, null, 8, ["example", "scheme"])) : _("", !0)
137
+ }, null, 8, ["example", "scheme"])) : c("", !0)
135
138
  ], 64))), 128));
136
139
  }
137
140
  });
@@ -1,3 +1,7 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: import("vue").DefineComponent<{
2
+ selectedSecuritySchemeUids: string[];
3
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
4
+ selectedSecuritySchemeUids: string[];
5
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
6
  export default _default;
3
7
  //# sourceMappingURL=RequestSection.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAiZA,wBAKG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";gCA2J8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AA+PtC,wBAMG"}
@@ -1,23 +1,26 @@
1
- import { defineComponent as S, computed as _, ref as g, watch as b, openBlock as m, createBlock as C, withCtx as x, createElementVNode as A, unref as r, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as s, withDirectives as u, vShow as n } from "vue";
1
+ import { defineComponent as q, computed as _, ref as g, watch as b, openBlock as m, createBlock as C, withCtx as S, createElementVNode as A, unref as s, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as r, withDirectives as u, vShow as i } from "vue";
2
2
  import H from "../../../components/ContextBar.vue.js";
3
3
  import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
4
  import N from "./RequestBody.vue.js";
5
5
  import v from "./RequestParams.vue.js";
6
6
  import K from "./RequestPathParams.vue.js";
7
7
  import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
8
- import E from "./RequestAuth/RequestAuth.vue.js";
9
- import { useWorkspace as Q } from "../../../store/store.js";
10
- const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none" }, D = {
8
+ import U from "./RequestAuth/RequestAuth.vue.js";
9
+ import { useWorkspace as E } from "../../../store/store.js";
10
+ const Q = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none" }, $ = {
11
11
  key: 0,
12
12
  class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
13
13
  for: "requestname"
14
- }, M = ["value"], P = {
14
+ }, D = ["value"], M = {
15
15
  key: 2,
16
16
  class: "text-c-1"
17
- }, I = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ S({
17
+ }, P = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ q({
18
18
  __name: "RequestSection",
19
- setup(O) {
20
- const { activeRequest: a, activeExample: h, isReadOnly: d, requestMutators: k } = Q(), B = _(() => {
19
+ props: {
20
+ selectedSecuritySchemeUids: {}
21
+ },
22
+ setup(I) {
23
+ const { activeRequest: a, activeExample: h, isReadOnly: d, requestMutators: x } = E(), k = _(() => {
21
24
  var l, o;
22
25
  const t = /* @__PURE__ */ new Set([
23
26
  "All",
@@ -38,74 +41,77 @@ const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
38
41
  b(a, (t) => {
39
42
  e.value === "Body" && t && !f(t.method) && (e.value = "All");
40
43
  });
41
- const q = (t) => {
44
+ const B = (t) => {
42
45
  if (!a.value) return;
43
46
  const l = t.target;
44
- k.edit(a.value.uid, "summary", l.value);
47
+ x.edit(a.value.uid, "summary", l.value);
45
48
  };
46
49
  return (t, l) => (m(), C(R, null, {
47
- title: x(() => {
48
- var o, i;
50
+ title: S(() => {
51
+ var o, n;
49
52
  return [
50
- A("div", $, [
51
- r(d) ? V("", !0) : (m(), p("label", D)),
52
- r(d) ? (m(), p("span", P, w((i = r(a)) == null ? void 0 : i.summary), 1)) : (m(), p("input", {
53
+ A("div", Q, [
54
+ s(d) ? V("", !0) : (m(), p("label", $)),
55
+ s(d) ? (m(), p("span", M, w((n = s(a)) == null ? void 0 : n.summary), 1)) : (m(), p("input", {
53
56
  key: 1,
54
57
  id: "requestname",
55
58
  class: "outline-none border-0 text-c-1 rounded pointer-events-auto relative w-full",
56
59
  placeholder: "Request Name",
57
- value: (o = r(a)) == null ? void 0 : o.summary,
58
- onInput: q
59
- }, null, 40, M))
60
+ value: (o = s(a)) == null ? void 0 : o.summary,
61
+ onInput: B
62
+ }, null, 40, D))
60
63
  ]),
61
- s(H, {
64
+ r(H, {
62
65
  activeSection: e.value,
63
- sections: B.value,
66
+ sections: k.value,
64
67
  onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
65
68
  }, null, 8, ["activeSection", "sections"])
66
69
  ];
67
70
  }),
68
- default: x(() => {
69
- var o, i, c;
71
+ default: S(() => {
72
+ var o, n, c;
70
73
  return [
71
- A("div", I, [
72
- u(s(E, { title: "Authentication" }, null, 512), [
74
+ A("div", P, [
75
+ u(r(U, {
76
+ selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
77
+ title: "Authentication"
78
+ }, null, 8, ["selectedSecuritySchemeUids"]), [
73
79
  [
74
- n,
80
+ i,
75
81
  !y.value && (e.value === "All" || e.value === "Auth")
76
82
  ]
77
83
  ]),
78
- u(s(K, {
84
+ u(r(K, {
79
85
  paramKey: "path",
80
86
  title: "Path Variables"
81
87
  }, null, 512), [
82
88
  [
83
- n,
84
- (e.value === "All" || e.value === "Variables") && ((c = (i = (o = r(h)) == null ? void 0 : o.parameters) == null ? void 0 : i.path) == null ? void 0 : c.length)
89
+ i,
90
+ (e.value === "All" || e.value === "Variables") && ((c = (n = (o = s(h)) == null ? void 0 : o.parameters) == null ? void 0 : n.path) == null ? void 0 : c.length)
85
91
  ]
86
92
  ]),
87
- u(s(v, {
93
+ u(r(v, {
88
94
  paramKey: "cookies",
89
95
  title: "Cookies"
90
96
  }, null, 512), [
91
- [n, e.value === "All" || e.value === "Cookies"]
97
+ [i, e.value === "All" || e.value === "Cookies"]
92
98
  ]),
93
- u(s(v, {
99
+ u(r(v, {
94
100
  paramKey: "headers",
95
101
  title: "Headers"
96
102
  }, null, 512), [
97
- [n, e.value === "All" || e.value === "Headers"]
103
+ [i, e.value === "All" || e.value === "Headers"]
98
104
  ]),
99
- u(s(v, {
105
+ u(r(v, {
100
106
  paramKey: "query",
101
107
  title: "Query Parameters"
102
108
  }, null, 512), [
103
- [n, e.value === "All" || e.value === "Query"]
109
+ [i, e.value === "All" || e.value === "Query"]
104
110
  ]),
105
- u(s(N, { title: "Body" }, null, 512), [
111
+ u(r(N, { title: "Body" }, null, 512), [
106
112
  [
107
- n,
108
- r(a) && (e.value === "All" || e.value === "Body") && r(f)(r(a).method)
113
+ i,
114
+ s(a) && (e.value === "All" || e.value === "Body") && s(f)(s(a).method)
109
115
  ]
110
116
  ])
111
117
  ])
@@ -1 +1 @@
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
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAwVe,OAAO;gBACR,OAAO;;;cAmnBkB,MAAM;aAAO,MAAM;;;;iBApnB3C,OAAO;gBACR,OAAO;;;cAmnBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
@@ -1,7 +1,7 @@
1
- import o from "./RequestSidebar.vue2.js";
1
+ import e from "./RequestSidebar.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7cb3d69f"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-beea081e"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
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";
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 f, createSlots as te, withCtx as i, createElementVNode as n, isRef as oe, withKeys as v, withModifiers as m, createBlock as l, renderList as x, createTextVNode as D, toDisplayString as se, createCommentVNode as F, vShow as re } from "vue";
2
2
  import ae from "../../assets/rabbit.ascii.js";
3
3
  import ne from "../../assets/rabbitjump.ascii.js";
4
4
  import ie from "../../components/HttpMethod/HttpMethod.vue.js";
@@ -6,8 +6,8 @@ import $ from "../../components/ScalarAsciiArt.vue.js";
6
6
  import { useSearch as le } from "../../components/Search/useSearch.js";
7
7
  import de from "../../components/Sidebar/SidebarButton.vue.js";
8
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";
9
+ import { dragHandlerFactory as pe } from "./handle-drag.js";
10
+ import { ScalarSearchInput as me, ScalarSearchResultList as ce, ScalarSearchResultItem as fe, ScalarIcon as V } from "@scalar/components";
11
11
  import { LibraryIcon as be } from "@scalar/icons";
12
12
  import he from "./RequestSidebarItem.vue.js";
13
13
  import Se from "../../components/Sidebar/Sidebar.vue.js";
@@ -20,76 +20,76 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
20
20
  isReadonly: { type: Boolean }
21
21
  },
22
22
  emits: ["update:showSidebar", "newTab"],
23
- setup(q, { emit: P }) {
24
- const T = q, g = P, R = ge(), {
25
- activeWorkspaceCollections: B,
26
- activeRequest: E,
23
+ setup(q, { emit: T }) {
24
+ const B = q, g = T, R = ge(), {
25
+ activeWorkspaceCollections: E,
26
+ activeRequest: K,
27
27
  activeWorkspaceRequests: M,
28
28
  findRequestParents: O,
29
29
  isReadOnly: W,
30
- events: c
31
- } = R, { handleDragEnd: K, isDroppable: N } = me(R), { collapsedSidebarFolders: U, setCollapsedSidebarFolder: z } = ve(), m = X({ open: !1 });
30
+ events: b
31
+ } = R, { handleDragEnd: N, isDroppable: U } = pe(R), { collapsedSidebarFolders: z, setCollapsedSidebarFolder: A } = ve(), p = X({ open: !1 });
32
32
  Y(
33
- E,
33
+ K,
34
34
  (o) => {
35
35
  o && O(o).forEach(
36
- (e) => z(e, !0)
36
+ (e) => A(e, !0)
37
37
  );
38
38
  },
39
39
  { immediate: !0 }
40
40
  );
41
41
  const {
42
- searchText: f,
42
+ searchText: c,
43
43
  searchResultsWithPlaceholderResults: w,
44
44
  selectedSearchResult: k,
45
- onSearchResultClick: A,
46
- fuseSearch: L,
45
+ onSearchResultClick: L,
46
+ fuseSearch: P,
47
47
  searchInputRef: y,
48
48
  searchResultRefs: H,
49
49
  navigateSearchResults: C,
50
50
  selectSearchResult: j
51
51
  } = le(), I = (o) => {
52
52
  var e;
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()));
53
+ o && (o.toggleSidebar && g("update:showSidebar", B.showSidebar), o.focusRequestSearch && ((e = y.value) == null || e.focus()));
54
54
  };
55
- Z(() => c.hotKeys.on(I)), _(() => {
56
- c.hotKeys.off(I);
55
+ Z(() => b.hotKeys.on(I)), _(() => {
56
+ b.hotKeys.off(I);
57
57
  });
58
58
  const G = (o) => {
59
59
  o != null && o.documentUrl && (o.watchForChanges = !o.watchForChanges);
60
60
  };
61
61
  return (o, e) => (a(), h(S, null, [
62
62
  ee(u(t(Se), {
63
- class: b([o.showSidebar ? "sidebar-active-width" : ""]),
63
+ class: f([o.showSidebar ? "sidebar-active-width" : ""]),
64
64
  showSidebar: o.showSidebar,
65
65
  "onUpdate:showSidebar": e[8] || (e[8] = (s) => o.$emit("update:showSidebar", s))
66
66
  }, te({
67
67
  content: i(() => [
68
68
  n("div", Re, [
69
- u(t(pe), {
69
+ u(t(me), {
70
70
  ref_key: "searchInputRef",
71
71
  ref: y,
72
- modelValue: t(f),
73
- "onUpdate:modelValue": e[0] || (e[0] = (s) => oe(f) ? f.value = s : null),
72
+ modelValue: t(c),
73
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => oe(c) ? c.value = s : null),
74
74
  sidebar: "",
75
- onInput: t(L),
75
+ onInput: t(P),
76
76
  onKeydown: [
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"]))
77
+ e[1] || (e[1] = v(m((s) => t(C)("down"), ["stop"]), ["down"])),
78
+ e[2] || (e[2] = v(m((s) => t(j)(), ["stop"]), ["enter"])),
79
+ e[3] || (e[3] = v(m((s) => t(C)("up"), ["stop"]), ["up"]))
80
80
  ]
81
81
  }, null, 8, ["modelValue", "onInput"])
82
82
  ]),
83
83
  n("div", {
84
- class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
84
+ class: f(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
85
85
  "pb-14": !o.isReadonly
86
86
  }]),
87
- onDragenter: e[6] || (e[6] = p(() => {
87
+ onDragenter: e[6] || (e[6] = m(() => {
88
88
  }, ["prevent"])),
89
- onDragover: e[7] || (e[7] = p(() => {
89
+ onDragover: e[7] || (e[7] = m(() => {
90
90
  }, ["prevent"]))
91
91
  }, [
92
- t(f) ? (a(), l(t(ce), {
92
+ t(c) ? (a(), l(t(ce), {
93
93
  key: 0,
94
94
  class: "gap-px custom-scroll",
95
95
  noResults: !t(w).length
@@ -102,7 +102,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
102
102
  ref: (r) => t(H)[d] = r,
103
103
  active: t(k) === d,
104
104
  class: "px-2",
105
- onClick: (r) => t(A)(s),
105
+ onClick: (r) => t(L)(s),
106
106
  onFocus: (r) => k.value = d
107
107
  }, {
108
108
  addon: i(() => [
@@ -118,18 +118,18 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
118
118
  }, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
119
119
  ]),
120
120
  _: 1
121
- }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(B), (s) => {
121
+ }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(E), (s) => {
122
122
  var d;
123
123
  return a(), l(he, {
124
124
  key: s.uid,
125
125
  isDraggable: !o.isReadonly && ((d = s.info) == null ? void 0 : d.title) !== "Drafts",
126
- isDroppable: t(N),
127
- menuItem: m,
126
+ isDroppable: t(U),
127
+ menuItem: p,
128
128
  parentUids: [],
129
129
  uid: s.uid,
130
130
  onNewTab: e[4] || (e[4] = (r, J) => g("newTab", { name: r, uid: J })),
131
- onOnDragEnd: t(K),
132
- onOpenMenu: e[5] || (e[5] = (r) => Object.assign(m, r))
131
+ onOnDragEnd: t(N),
132
+ onOpenMenu: e[5] || (e[5] = (r) => Object.assign(p, r))
133
133
  }, {
134
134
  leftIcon: i(() => {
135
135
  var r;
@@ -145,8 +145,8 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
145
145
  src: s["x-scalar-icon"] || "interface-content-folder"
146
146
  }, null, 8, ["src"])),
147
147
  n("div", {
148
- class: b({
149
- "rotate-90": t(U)[s.uid]
148
+ class: f({
149
+ "rotate-90": t(z)[s.uid]
150
150
  })
151
151
  }, [
152
152
  u(t(V), {
@@ -165,7 +165,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
165
165
  ]),
166
166
  button: i(() => [
167
167
  n("div", {
168
- class: b({
168
+ class: f({
169
169
  "empty-sidebar-item": t(M).length <= 1
170
170
  })
171
171
  }, [
@@ -187,7 +187,8 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
187
187
  ]),
188
188
  o.isReadonly ? F("", !0) : (a(), l(de, {
189
189
  key: 0,
190
- click: t(c).commandPalette.emit
190
+ click: t(b).commandPalette.emit,
191
+ hotkey: "K"
191
192
  }, {
192
193
  title: i(() => e[11] || (e[11] = [
193
194
  D("Add Item")
@@ -206,10 +207,10 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
206
207
  ]), 1032, ["class", "showSidebar"]), [
207
208
  [re, o.showSidebar]
208
209
  ]),
209
- !t(W) && m ? (a(), l(ue, {
210
+ !t(W) && p ? (a(), l(ue, {
210
211
  key: 0,
211
- menuItem: m,
212
- onCloseMenu: e[9] || (e[9] = (s) => m.open = !1),
212
+ menuItem: p,
213
+ onCloseMenu: e[9] || (e[9] = (s) => p.open = !1),
213
214
  onToggleWatchForChanges: G
214
215
  }, null, 8, ["menuItem"])) : F("", !0)
215
216
  ], 64));
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AA+NA,wBAKG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAuOA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cddb96c9"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cf8761cd"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,25 +1,26 @@
1
- import { defineComponent as y, onMounted as k, onBeforeUnmount as R, openBlock as r, createElementBlock as l, createElementVNode as t, unref as o, createTextVNode as a, toDisplayString as g, createCommentVNode as p, createVNode as i } from "vue";
2
- import _ from "../../../assets/computer.ascii.js";
3
- import b from "../../../components/ScalarAsciiArt.vue.js";
4
- import u from "../../../components/ScalarHotkey.vue.js";
5
- import { useWorkspace as C } from "../../../store/store.js";
6
- const N = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, q = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, v = {
1
+ import { defineComponent as k, onMounted as R, onBeforeUnmount as g, openBlock as a, createElementBlock as l, createElementVNode as t, unref as o, createTextVNode as r, toDisplayString as _, createCommentVNode as u, createVNode as i } from "vue";
2
+ import b from "../../../assets/computer.ascii.js";
3
+ import N from "../../../components/ScalarAsciiArt.vue.js";
4
+ import p from "../../../components/ScalarHotkey.vue.js";
5
+ import { useRoute as C } from "vue-router";
6
+ import { useWorkspace as q } from "../../../store/store.js";
7
+ const v = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, B = {
7
8
  key: 0,
8
9
  class: "scalar-version-number"
9
- }, V = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, A = /* @__PURE__ */ y({
10
+ }, S = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, $ = /* @__PURE__ */ k({
10
11
  __name: "ResponseEmpty",
11
- setup(B) {
12
- const { isReadOnly: d, activeWorkspace: f, events: s } = C(), m = () => {
12
+ setup(h) {
13
+ const { isReadOnly: d, activeWorkspace: f, events: s } = q(), x = C(), m = () => {
13
14
  s.commandPalette.emit({ commandName: "Create Request" });
14
15
  }, c = (n) => {
15
- n != null && n.openCommandPaletteRequest && m();
16
- }, x = "2.1.32";
17
- return k(() => s.hotKeys.on(c)), R(() => s.hotKeys.off(c)), (n, e) => (r(), l("div", N, [
18
- t("div", q, [
19
- o(f).isReadOnly ? p("", !0) : (r(), l("div", v, [
20
- a(" Scalar V" + g(o(x)) + " ", 1),
16
+ n != null && n.createNew && x.name === "request" && m();
17
+ }, y = "2.1.34";
18
+ return R(() => s.hotKeys.on(c)), g(() => s.hotKeys.off(c)), (n, e) => (a(), l("div", v, [
19
+ t("div", V, [
20
+ o(f).isReadOnly ? u("", !0) : (a(), l("div", B, [
21
+ r(" Scalar V" + _(o(y)) + " ", 1),
21
22
  e[1] || (e[1] = t("b", null, "Beta", -1)),
22
- e[2] || (e[2] = a(" Release ")),
23
+ e[2] || (e[2] = r(" Release ")),
23
24
  e[3] || (e[3] = t("div", { class: "mt-1" }, [
24
25
  t("a", {
25
26
  href: "https://github.com/scalar/scalar/issues/2669",
@@ -27,33 +28,33 @@ const N = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, q = { cl
27
28
  }, " Roadmap ")
28
29
  ], -1))
29
30
  ])),
30
- i(b, {
31
- art: o(_),
31
+ i(N, {
32
+ art: o(b),
32
33
  class: "text-c-3"
33
34
  }, null, 8, ["art"])
34
35
  ]),
35
- t("div", V, [
36
+ t("div", S, [
36
37
  t("button", {
37
38
  class: "flex items-center gap-1.5",
38
39
  type: "button",
39
- onClick: e[0] || (e[0] = (S) => o(s).executeRequest.emit())
40
+ onClick: e[0] || (e[0] = (w) => o(s).executeRequest.emit())
40
41
  }, [
41
- e[4] || (e[4] = a(" Send Request ")),
42
- i(u, { hotkey: "↵" })
42
+ e[4] || (e[4] = r(" Send Request ")),
43
+ i(p, { hotkey: "↵" })
43
44
  ]),
44
- o(d) ? p("", !0) : (r(), l("button", {
45
+ o(d) ? u("", !0) : (a(), l("button", {
45
46
  key: 0,
46
47
  class: "flex items-center gap-1.5",
47
48
  type: "button",
48
49
  onClick: m
49
50
  }, [
50
- e[5] || (e[5] = a(" New Request ")),
51
- i(u, { hotkey: "N" })
51
+ e[5] || (e[5] = r(" New Request ")),
52
+ i(p, { hotkey: "N" })
52
53
  ]))
53
54
  ])
54
55
  ]));
55
56
  }
56
57
  });
57
58
  export {
58
- A as default
59
+ $ as default
59
60
  };