@scalar/api-client 2.2.10 → 2.2.12

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 (29) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarServerItem.vue.js +19 -18
  4. package/dist/layouts/App/create-api-client-app.d.ts +1 -1
  5. package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -2
  6. package/dist/layouts/Web/create-api-client-web.d.ts +1 -1
  7. package/dist/libs/create-client.d.ts +1 -1
  8. package/dist/libs/create-client.d.ts.map +1 -1
  9. package/dist/libs/create-client.js +64 -51
  10. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  11. package/dist/libs/send-request/send-request.js +50 -48
  12. package/dist/style.css +1 -1
  13. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  14. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +12 -12
  15. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  16. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  17. package/dist/views/Request/RequestSection/RequestBody.vue2.js +40 -36
  18. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  19. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +53 -51
  20. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  21. package/dist/views/Request/RequestSection/RequestSection.vue2.js +15 -15
  22. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  23. package/dist/views/Request/RequestSidebar.vue2.js +44 -44
  24. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  25. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  26. package/dist/views/Request/RequestSidebarItem.vue2.js +103 -111
  27. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  28. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +11 -11
  29. package/package.json +14 -14
@@ -1,15 +1,15 @@
1
- import { defineComponent as ne, useId as ie, reactive as le, watch as B, onMounted as de, onBeforeUnmount as ue, computed as ce, openBlock as n, createElementBlock as v, Fragment as k, withDirectives as me, createVNode as c, unref as s, normalizeClass as f, createSlots as pe, withCtx as l, createElementVNode as i, isRef as fe, withKeys as y, withModifiers as m, createBlock as d, renderList as O, createTextVNode as I, toDisplayString as be, createCommentVNode as C, vShow as he } from "vue";
1
+ import { defineComponent as ne, useId as ie, reactive as le, watch as O, onMounted as de, onBeforeUnmount as ue, computed as ce, openBlock as n, createElementBlock as v, Fragment as g, withDirectives as me, createVNode as c, unref as s, normalizeClass as f, createSlots as pe, withCtx as l, createElementVNode as i, isRef as fe, withKeys as k, withModifiers as m, createBlock as d, renderList as W, createTextVNode as I, toDisplayString as be, createCommentVNode as C, vShow as he } from "vue";
2
2
  import ve from "../../assets/rabbit.ascii.js";
3
3
  import Se from "../../assets/rabbitjump.ascii.js";
4
4
  import Re from "../../components/HttpMethod/HttpMethod.vue.js";
5
- import W from "../../components/ScalarAsciiArt.vue.js";
5
+ import A from "../../components/ScalarAsciiArt.vue.js";
6
6
  import { useSearch as we } from "../../components/Search/useSearch.js";
7
- import ge from "../../components/Sidebar/SidebarButton.vue.js";
8
- import { useActiveEntities as ke } from "../../store/active-entities.js";
9
- import { createInitialRequest as ye } from "../../store/requests.js";
7
+ import ye from "../../components/Sidebar/SidebarButton.vue.js";
8
+ import { useActiveEntities as ge } from "../../store/active-entities.js";
9
+ import { createInitialRequest as ke } from "../../store/requests.js";
10
10
  import Ie from "./RequestSidebarItemMenu.vue.js";
11
11
  import { dragHandlerFactory as Ce } from "./handle-drag.js";
12
- import { ScalarSearchInput as qe, ScalarSearchResultList as De, ScalarSearchResultItem as $e, ScalarIcon as A, ScalarButton as Me } from "@scalar/components";
12
+ import { ScalarSearchInput as qe, ScalarSearchResultList as De, ScalarSearchResultItem as $e, ScalarIcon as F, ScalarButton as Me } from "@scalar/components";
13
13
  import { LibraryIcon as xe } from "@scalar/icons";
14
14
  import { useToasts as Pe } from "@scalar/use-toasts";
15
15
  import { useRouter as Te } from "vue-router";
@@ -30,21 +30,21 @@ const We = {
30
30
  isReadonly: { type: Boolean }
31
31
  },
32
32
  emits: ["update:showSidebar", "newTab", "clearDrafts"],
33
- setup(F, { emit: K }) {
34
- const N = F, q = K, D = Be(), {
33
+ setup(K, { emit: N }) {
34
+ const q = K, D = N, $ = Be(), {
35
35
  activeWorkspaceCollections: u,
36
36
  activeRequest: U,
37
37
  activeWorkspaceRequests: S,
38
38
  activeWorkspace: R
39
- } = ke(), { findRequestParents: z, isReadOnly: H, events: b, requestMutators: $, requests: L } = D, { handleDragEnd: j, isDroppable: G } = Ce(
39
+ } = ge(), { findRequestParents: z, isReadOnly: H, events: b, requestMutators: M, requests: L } = $, { handleDragEnd: j, isDroppable: G } = Ce(
40
40
  R,
41
- D
42
- ), { collapsedSidebarFolders: J, setCollapsedSidebarFolder: Q } = Oe(), { replace: M } = Te(), X = () => {
41
+ $
42
+ ), { collapsedSidebarFolders: J, setCollapsedSidebarFolder: Q } = Oe(), { replace: x } = Te(), X = () => {
43
43
  b.commandPalette.emit({
44
44
  commandName: "Import from OpenAPI/Swagger/Postman"
45
45
  });
46
- }, x = ie(), { toast: Y } = Pe(), p = le({ open: !1 });
47
- B(
46
+ }, P = ie(), { toast: Y } = Pe(), p = le({ open: !1 });
47
+ O(
48
48
  U,
49
49
  (t) => {
50
50
  t && z(t).forEach(
@@ -56,19 +56,19 @@ const We = {
56
56
  const {
57
57
  searchText: h,
58
58
  searchResultsWithPlaceholderResults: w,
59
- selectedSearchResult: g,
59
+ selectedSearchResult: y,
60
60
  onSearchResultClick: Z,
61
61
  fuseSearch: _,
62
- searchInputRef: P,
62
+ searchInputRef: T,
63
63
  searchResultRefs: ee,
64
- navigateSearchResults: T,
64
+ navigateSearchResults: E,
65
65
  selectSearchResult: te
66
- } = we(), E = (t) => {
66
+ } = we(), V = (t) => {
67
67
  var e;
68
- t && (t.toggleSidebar && q("update:showSidebar", N.showSidebar), t.focusRequestSearch && ((e = P.value) == null || e.focus()));
68
+ t && (t.toggleSidebar && D("update:showSidebar", q.showSidebar), t.focusRequestSearch && ((e = T.value) == null || e.focus()));
69
69
  };
70
- de(() => b.hotKeys.on(E)), ue(() => {
71
- b.hotKeys.off(E);
70
+ de(() => b.hotKeys.on(V)), ue(() => {
71
+ b.hotKeys.off(V);
72
72
  });
73
73
  const oe = (t) => {
74
74
  if (t != null && t.documentUrl) {
@@ -79,12 +79,12 @@ const We = {
79
79
  e && (e.watchMode = t.watchMode);
80
80
  }
81
81
  };
82
- B(
82
+ O(
83
83
  () => u.value.map((t) => t.watchMode),
84
84
  (t, e) => {
85
85
  t.forEach((o, r) => {
86
86
  var a;
87
- if (o !== e[r]) {
87
+ if (!q.isReadonly && o !== e[r]) {
88
88
  const ae = `${(a = u.value[r].info) == null ? void 0 : a.title}: Watch Mode ${o ? "enabled" : "disabled"}`;
89
89
  Y(ae, "info");
90
90
  }
@@ -93,7 +93,7 @@ const We = {
93
93
  );
94
94
  const se = ce(() => {
95
95
  var e;
96
- const t = w.value[g.value];
96
+ const t = w.value[y.value];
97
97
  return (e = t == null ? void 0 : t.item) != null && e.id ? `#search-input-${t.item.id}` : void 0;
98
98
  }), re = () => {
99
99
  const t = u.value.find(
@@ -103,16 +103,16 @@ const We = {
103
103
  }
104
104
  );
105
105
  if (t && t.requests.forEach((o) => {
106
- $.delete(L[o], t.uid);
106
+ M.delete(L[o], t.uid);
107
107
  }), S.value.length) {
108
108
  const o = u.value[0], r = o == null ? void 0 : o.requests[0];
109
- r && M(`/workspace/${R.value.uid}/request/${r}`);
109
+ r && x(`/workspace/${R.value.uid}/request/${r}`);
110
110
  } else {
111
- const { request: o } = ye();
112
- t && ($.add(o, t.uid), M(`/workspace/${R.value.uid}/request/${o.uid}`));
111
+ const { request: o } = ke();
112
+ t && (M.add(o, t.uid), x(`/workspace/${R.value.uid}/request/${o.uid}`));
113
113
  }
114
114
  };
115
- return (t, e) => (n(), v(k, null, [
115
+ return (t, e) => (n(), v(g, null, [
116
116
  me(c(s(Ve), {
117
117
  class: f([t.showSidebar ? "sidebar-active-width" : ""]),
118
118
  showSidebar: t.showSidebar,
@@ -122,17 +122,17 @@ const We = {
122
122
  i("div", We, [
123
123
  c(s(qe), {
124
124
  ref_key: "searchInputRef",
125
- ref: P,
125
+ ref: T,
126
126
  modelValue: s(h),
127
127
  "onUpdate:modelValue": e[0] || (e[0] = (o) => fe(h) ? h.value = o : null),
128
128
  "aria-activedescendant": se.value,
129
- "aria-controls": s(x),
129
+ "aria-controls": s(P),
130
130
  sidebar: "",
131
131
  onInput: s(_),
132
132
  onKeydown: [
133
- e[1] || (e[1] = y(m((o) => s(T)("down"), ["stop"]), ["down"])),
134
- e[2] || (e[2] = y(m((o) => s(te)(), ["stop"]), ["enter"])),
135
- e[3] || (e[3] = y(m((o) => s(T)("up"), ["stop"]), ["up"]))
133
+ e[1] || (e[1] = k(m((o) => s(E)("down"), ["stop"]), ["down"])),
134
+ e[2] || (e[2] = k(m((o) => s(te)(), ["stop"]), ["enter"])),
135
+ e[3] || (e[3] = k(m((o) => s(E)("up"), ["stop"]), ["up"]))
136
136
  ]
137
137
  }, null, 8, ["modelValue", "aria-activedescendant", "aria-controls", "onInput"])
138
138
  ]),
@@ -147,22 +147,22 @@ const We = {
147
147
  }, [
148
148
  s(h) ? (n(), d(s(De), {
149
149
  key: 0,
150
- id: s(x),
150
+ id: s(P),
151
151
  "aria-label": "Search Results",
152
152
  class: "gap-px",
153
153
  noResults: !s(w).length
154
154
  }, {
155
155
  default: l(() => [
156
- (n(!0), v(k, null, O(s(w), (o, r) => (n(), d(s($e), {
156
+ (n(!0), v(g, null, W(s(w), (o, r) => (n(), d(s($e), {
157
157
  id: `#search-input-${o.item.id}`,
158
158
  key: o.refIndex,
159
159
  ref_for: !0,
160
160
  ref: (a) => s(ee)[r] = a,
161
- active: s(g) === r,
161
+ active: s(y) === r,
162
162
  class: "px-2",
163
163
  href: o.item.link,
164
164
  onClick: m((a) => s(Z)(o), ["prevent"]),
165
- onFocus: (a) => g.value = r
165
+ onFocus: (a) => y.value = r
166
166
  }, {
167
167
  addon: l(() => [
168
168
  e[10] || (e[10] = i("span", { class: "sr-only" }, "HTTP Method:", -1)),
@@ -179,7 +179,7 @@ const We = {
179
179
  ]),
180
180
  _: 1
181
181
  }, 8, ["id", "noResults"])) : (n(), v("nav", Ae, [
182
- (n(!0), v(k, null, O(s(u), (o) => {
182
+ (n(!0), v(g, null, W(s(u), (o) => {
183
183
  var r;
184
184
  return n(), d(Ee, {
185
185
  key: o.uid,
@@ -188,14 +188,14 @@ const We = {
188
188
  menuItem: p,
189
189
  parentUids: [],
190
190
  uid: o.uid,
191
- onNewTab: e[4] || (e[4] = (a, V) => q("newTab", { name: a, uid: V })),
191
+ onNewTab: e[4] || (e[4] = (a, B) => D("newTab", { name: a, uid: B })),
192
192
  onOnDragEnd: s(j),
193
193
  onOpenMenu: e[5] || (e[5] = (a) => Object.assign(p, a))
194
194
  }, {
195
195
  leftIcon: l(() => {
196
196
  var a;
197
197
  return [
198
- ((a = o.info) == null ? void 0 : a.title) === "Drafts" ? (n(), d(s(A), {
198
+ ((a = o.info) == null ? void 0 : a.title) === "Drafts" ? (n(), d(s(F), {
199
199
  key: 0,
200
200
  class: "text-sidebar-c-2 group-hover:hidden",
201
201
  icon: "Scribble",
@@ -210,7 +210,7 @@ const We = {
210
210
  "rotate-90": s(J)[o.uid]
211
211
  })
212
212
  }, [
213
- c(s(A), {
213
+ c(s(F), {
214
214
  class: "text-c-3 hidden text-sm group-hover:block",
215
215
  icon: "ChevronRight",
216
216
  size: "md"
@@ -232,11 +232,11 @@ const We = {
232
232
  }, [
233
233
  i("div", Fe, [
234
234
  i("div", Ke, [
235
- c(W, {
235
+ c(A, {
236
236
  art: s(ve),
237
237
  class: "font-bold rabbitsit"
238
238
  }, null, 8, ["art"]),
239
- c(W, {
239
+ c(A, {
240
240
  art: s(Se),
241
241
  class: "font-bold absolute top-0 left-0 rabbitjump"
242
242
  }, null, 8, ["art"])
@@ -258,7 +258,7 @@ const We = {
258
258
  ])),
259
259
  _: 1
260
260
  }, 8, ["class"])),
261
- t.isReadonly ? C("", !0) : (n(), d(ge, {
261
+ t.isReadonly ? C("", !0) : (n(), d(ye, {
262
262
  key: 1,
263
263
  click: s(b).commandPalette.emit,
264
264
  hotkey: "K"
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAogBA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAO1B,KAAK,WAAW,GAAG;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AA+OJ,iBAAS,cAAc;WA6gBT,OAAO,IAA6B;;oBA9uBpC,IAAI;;oBAAJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCArDlB,KAzdW;;;;;;;oCAydX,KAldsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAiwBiB,GAAE,8CAGxB,GAAG,yBACG,GACtB,6DACI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmfP;AAkCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;A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;iBApyBH,OAAO;uFA6yBvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,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 p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fb216cf9"]]);
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-390bf191"]]);
6
6
  export {
7
- p as default
7
+ a as default
8
8
  };