@scalar/api-client 2.2.6 → 2.2.8

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 (58) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  3. package/dist/components/AddressBar/AddressBar.vue2.js +1 -1
  4. package/dist/components/AddressBar/AddressBarServer.vue.js +18 -18
  5. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +108 -106
  7. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +20 -20
  8. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  10. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +12 -12
  11. package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
  12. package/dist/components/HttpMethod/HttpMethod.vue2.js +12 -12
  13. package/dist/components/HttpMethod/index.d.ts +0 -1
  14. package/dist/components/HttpMethod/index.d.ts.map +1 -1
  15. package/dist/components/HttpMethod/index.js +2 -4
  16. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  17. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +119 -102
  18. package/dist/components/OpenApiClientButton.vue.d.ts +1 -0
  19. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
  20. package/dist/components/OpenApiClientButton.vue.js +2 -2
  21. package/dist/components/OpenApiClientButton.vue2.js +23 -17
  22. package/dist/components/Search/useSearch.d.ts.map +1 -1
  23. package/dist/components/Search/useSearch.js +45 -41
  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 +28 -23
  27. package/dist/libs/create-client.d.ts +1 -0
  28. package/dist/libs/create-client.d.ts.map +1 -1
  29. package/dist/libs/create-client.js +31 -30
  30. package/dist/libs/index.d.ts +1 -0
  31. package/dist/libs/index.d.ts.map +1 -1
  32. package/dist/libs/index.js +28 -24
  33. package/dist/libs/postman.d.ts +11 -0
  34. package/dist/libs/postman.d.ts.map +1 -0
  35. package/dist/libs/postman.js +39 -0
  36. package/dist/style.css +1 -1
  37. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  38. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +65 -62
  39. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  41. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +82 -84
  42. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  44. package/dist/views/Request/RequestSection/RequestBody.vue2.js +27 -24
  45. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSidebar.vue.js +4 -4
  47. package/dist/views/Request/RequestSidebar.vue2.js +32 -30
  48. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  49. package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
  50. package/dist/views/Request/RequestSubpageHeader.vue2.js +34 -32
  51. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  52. package/dist/views/Request/components/WorkspaceDropdown.vue.js +1 -1
  53. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  54. package/dist/views/Request/libs/live-sync.js +77 -78
  55. package/package.json +10 -9
  56. package/dist/components/HttpMethod/helpers.d.ts +0 -4
  57. package/dist/components/HttpMethod/helpers.d.ts.map +0 -1
  58. package/dist/components/HttpMethod/helpers.js +0 -5
@@ -1,4 +1,4 @@
1
- import { defineComponent as Z, computed as b, ref as I, watch as W, openBlock as f, createBlock as h, withCtx as d, createTextVNode as z, toDisplayString as F, createVNode as s, unref as u, createElementVNode as w, createCommentVNode as ee, createElementBlock as U, Fragment as ae, nextTick as te } from "vue";
1
+ import { defineComponent as Z, computed as b, ref as I, watch as W, openBlock as p, createBlock as h, withCtx as d, createTextVNode as z, toDisplayString as F, createVNode as s, unref as u, createElementVNode as w, createCommentVNode as ee, createElementBlock as U, Fragment as ae, nextTick as te } from "vue";
2
2
  import oe from "../../../components/CodeInput/CodeInput.vue.js";
3
3
  import ne from "../../../components/DataTable/DataTable.vue.js";
4
4
  import le from "../../../components/DataTable/DataTableHeader.vue.js";
@@ -59,9 +59,9 @@ const se = {
59
59
  function V() {
60
60
  console.log("deleteRow");
61
61
  }
62
- const C = (e, a, t) => {
62
+ const P = (e, a, t) => {
63
63
  if (!c.value || !o.value) return;
64
- const l = p.value;
64
+ const l = f.value;
65
65
  if (l.length > e) {
66
66
  const n = [...l];
67
67
  n[e] = { ...n[e], [a]: t }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), i.edit(
@@ -82,16 +82,19 @@ const se = {
82
82
  });
83
83
  }
84
84
  e === l.length - 1 && j();
85
- }, p = b(
85
+ }, f = b(
86
86
  () => {
87
87
  var e, a, t;
88
88
  return ((t = (a = (e = o.value) == null ? void 0 : e.body) == null ? void 0 : a.formData) == null ? void 0 : t.value) ?? [];
89
89
  }
90
- ), P = () => p.value.length === 0 && j(), j = () => {
90
+ ), C = () => {
91
+ const e = f.value[f.value.length - 1];
92
+ (!e || e.key !== "" || e.value !== "") && j();
93
+ }, j = () => {
91
94
  if (!c.value || !o.value) return;
92
95
  const e = J.parse({
93
96
  enabled: !1
94
- }), a = [...p.value, e];
97
+ }), a = [...f.value, e];
95
98
  o.value.body.formData ? i.edit(
96
99
  o.value.uid,
97
100
  "body.formData.value",
@@ -102,7 +105,7 @@ const se = {
102
105
  });
103
106
  }, N = (e, a) => {
104
107
  if (!c.value || !o.value) return;
105
- const t = p.value;
108
+ const t = f.value;
106
109
  if (t.length > e) {
107
110
  const l = [...t];
108
111
  l[e].enabled = a, i.edit(
@@ -184,7 +187,7 @@ const se = {
184
187
  onChange: async (t) => {
185
188
  const l = t == null ? void 0 : t[0];
186
189
  if (l && c.value && o.value) {
187
- const r = [...p.value];
190
+ const r = [...f.value];
188
191
  r[e] = {
189
192
  ...r[e],
190
193
  file: l
@@ -205,7 +208,7 @@ const se = {
205
208
  }
206
209
  function M(e) {
207
210
  if (!c.value || !o.value) return;
208
- const t = [...p.value];
211
+ const t = [...f.value];
209
212
  t[e] = {
210
213
  ...t[e],
211
214
  file: void 0
@@ -233,7 +236,7 @@ const se = {
233
236
  W(
234
237
  v,
235
238
  (e) => {
236
- ["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) && P();
239
+ ["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) && C();
237
240
  },
238
241
  { immediate: !0 }
239
242
  ), W(
@@ -245,7 +248,7 @@ const se = {
245
248
  var e;
246
249
  (e = c.value) != null && e.method && ue(c.value.method) && q(R.value), ["multipartForm", "formUrlEncoded"].includes(
247
250
  R.value
248
- ) && P();
251
+ ) && C();
249
252
  },
250
253
  { immediate: !0 }
251
254
  );
@@ -275,7 +278,7 @@ const se = {
275
278
  }
276
279
  }
277
280
  });
278
- return (e, a) => (f(), h(re, null, {
281
+ return (e, a) => (p(), h(re, null, {
279
282
  title: d(() => [
280
283
  z(F(e.title), 1)
281
284
  ]),
@@ -313,7 +316,7 @@ const se = {
313
316
  ]),
314
317
  _: 1
315
318
  }, 8, ["modelValue", "options"]),
316
- g.value.length > 0 ? (f(), h(u(A), {
319
+ g.value.length > 0 ? (p(), h(u(A), {
317
320
  key: 0,
318
321
  modelValue: _.value,
319
322
  "onUpdate:modelValue": a[1] || (a[1] = (t) => _.value = t),
@@ -352,10 +355,10 @@ const se = {
352
355
  default: d(() => {
353
356
  var t, l, n, r, m;
354
357
  return [
355
- v.value.id === "none" ? (f(), U("div", se, a[2] || (a[2] = [
358
+ v.value.id === "none" ? (p(), U("div", se, a[2] || (a[2] = [
356
359
  w("span", null, "No Body", -1)
357
- ]))) : v.value.id === "binaryFile" ? (f(), U("div", ce, [
358
- (t = u(o)) != null && t.body.binary ? (f(), U(ae, { key: 0 }, [
360
+ ]))) : v.value.id === "binaryFile" ? (p(), U("div", ce, [
361
+ (t = u(o)) != null && t.body.binary ? (p(), U(ae, { key: 0 }, [
359
362
  w("span", me, F(((l = u(o)) == null ? void 0 : l.body.binary).name), 1),
360
363
  s(u(k), {
361
364
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
@@ -368,7 +371,7 @@ const se = {
368
371
  ])),
369
372
  _: 1
370
373
  })
371
- ], 64)) : (f(), h(u(k), {
374
+ ], 64)) : (p(), h(u(k), {
372
375
  key: 1,
373
376
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
374
377
  size: "sm",
@@ -386,33 +389,33 @@ const se = {
386
389
  ]),
387
390
  _: 1
388
391
  }))
389
- ])) : v.value.id == "multipartForm" ? (f(), h($, {
392
+ ])) : v.value.id == "multipartForm" ? (p(), h($, {
390
393
  key: 2,
391
394
  ref_key: "tableWrapperRef",
392
395
  ref: B,
393
396
  class: "!m-0 rounded-t-none shadow-none border-l-0 border-r-0 border-t-0 border-b-0",
394
397
  columns: ["32px", "", "", "61px"],
395
- items: p.value,
398
+ items: f.value,
396
399
  showUploadButton: "",
397
400
  onDeleteRow: V,
398
401
  onRemoveFile: M,
399
402
  onToggleRow: N,
400
- onUpdateRow: C,
403
+ onUpdateRow: P,
401
404
  onUploadFile: L
402
- }, null, 8, ["items"])) : v.value.id == "formUrlEncoded" ? (f(), h($, {
405
+ }, null, 8, ["items"])) : v.value.id == "formUrlEncoded" ? (p(), h($, {
403
406
  key: 3,
404
407
  ref_key: "tableWrapperRef",
405
408
  ref: B,
406
409
  class: "!m-0 rounded-t-none border-t-0 shadow-none border-l-0 border-r-0 border-t-0 border-b-0",
407
410
  columns: ["32px", "", "", "61px"],
408
- items: p.value,
411
+ items: f.value,
409
412
  showUploadButton: "",
410
413
  onDeleteRow: V,
411
414
  onRemoveFile: M,
412
415
  onToggleRow: N,
413
- onUpdateRow: C,
416
+ onUpdateRow: P,
414
417
  onUploadFile: L
415
- }, null, 8, ["items"])) : (f(), h(oe, {
418
+ }, null, 8, ["items"])) : (p(), h(oe, {
416
419
  key: 4,
417
420
  content: "",
418
421
  language: Y.value,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AA+ZA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AA+nB1D,wBAOG"}
1
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AAiaA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAioB1D,wBAOG"}
@@ -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-360eb73e"]]);
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2a60e0fa"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as se, useId as re, reactive as ae, watch as ne, onMounted as ie, onBeforeUnmount as le, computed as de, openBlock as a, createElementBlock as h, Fragment as g, withDirectives as ue, createVNode as u, unref as s, normalizeClass as p, createSlots as ce, withCtx as l, createElementVNode as i, isRef as me, withKeys as y, withModifiers as c, createBlock as d, renderList as V, createTextVNode as I, toDisplayString as pe, createCommentVNode as q, vShow as fe } from "vue";
1
+ import { defineComponent as se, useId as re, reactive as ae, watch as ne, onMounted as ie, onBeforeUnmount as le, computed as de, openBlock as a, createElementBlock as h, Fragment as g, withDirectives as ue, createVNode as u, unref as s, normalizeClass as p, createSlots as me, withCtx as l, createElementVNode as i, isRef as ce, withKeys as y, withModifiers as m, createBlock as d, renderList as V, createTextVNode as I, toDisplayString as pe, createCommentVNode as q, vShow as fe } from "vue";
2
2
  import be from "../../assets/rabbit.ascii.js";
3
3
  import he from "../../assets/rabbitjump.ascii.js";
4
4
  import ve from "../../components/HttpMethod/HttpMethod.vue.js";
@@ -13,9 +13,9 @@ import { ScalarSearchInput as Ie, ScalarSearchResultList as qe, ScalarSearchResu
13
13
  import { LibraryIcon as xe } from "@scalar/icons";
14
14
  import { useRouter as $e } from "vue-router";
15
15
  import Me from "./RequestSidebarItem.vue.js";
16
- import Te from "../../components/Sidebar/Sidebar.vue.js";
17
- import { useWorkspace as Ee } from "../../store/store.js";
18
- import { useSidebar as Pe } from "../../hooks/useSidebar.js";
16
+ import Pe from "../../components/Sidebar/Sidebar.vue.js";
17
+ import { useWorkspace as Te } from "../../store/store.js";
18
+ import { useSidebar as Ee } from "../../hooks/useSidebar.js";
19
19
  const Ve = {
20
20
  class: "search-button-fade sticky px-3 py-2.5 top-0 z-10",
21
21
  role: "search"
@@ -30,7 +30,7 @@ const Ve = {
30
30
  },
31
31
  emits: ["update:showSidebar", "newTab", "clearDrafts"],
32
32
  setup(W, { emit: A }) {
33
- const F = W, C = A, D = Ee(), {
33
+ const F = W, C = A, D = Te(), {
34
34
  activeWorkspaceCollections: v,
35
35
  activeRequest: K,
36
36
  activeWorkspaceRequests: S,
@@ -38,9 +38,11 @@ const Ve = {
38
38
  } = we(), { findRequestParents: N, isReadOnly: U, events: f, requestMutators: x, requests: z } = D, { handleDragEnd: H, isDroppable: L } = ye(
39
39
  R,
40
40
  D
41
- ), { collapsedSidebarFolders: j, setCollapsedSidebarFolder: G } = Pe(), { replace: $ } = $e(), J = () => {
42
- f.commandPalette.emit({ commandName: "Import from OpenAPI/Swagger" });
43
- }, M = re(), m = ae({ open: !1 });
41
+ ), { collapsedSidebarFolders: j, setCollapsedSidebarFolder: G } = Ee(), { replace: $ } = $e(), J = () => {
42
+ f.commandPalette.emit({
43
+ commandName: "Import from OpenAPI/Swagger/Postman"
44
+ });
45
+ }, M = re(), c = ae({ open: !1 });
44
46
  ne(
45
47
  K,
46
48
  (t) => {
@@ -56,16 +58,16 @@ const Ve = {
56
58
  selectedSearchResult: k,
57
59
  onSearchResultClick: Q,
58
60
  fuseSearch: X,
59
- searchInputRef: T,
61
+ searchInputRef: P,
60
62
  searchResultRefs: Y,
61
- navigateSearchResults: E,
63
+ navigateSearchResults: T,
62
64
  selectSearchResult: Z
63
- } = Se(), P = (t) => {
65
+ } = Se(), E = (t) => {
64
66
  var e;
65
- t && (t.toggleSidebar && C("update:showSidebar", F.showSidebar), t.focusRequestSearch && ((e = T.value) == null || e.focus()));
67
+ t && (t.toggleSidebar && C("update:showSidebar", F.showSidebar), t.focusRequestSearch && ((e = P.value) == null || e.focus()));
66
68
  };
67
- ie(() => f.hotKeys.on(P)), le(() => {
68
- f.hotKeys.off(P);
69
+ ie(() => f.hotKeys.on(E)), le(() => {
70
+ f.hotKeys.off(E);
69
71
  });
70
72
  const _ = (t) => {
71
73
  t != null && t.documentUrl && (t.watchMode = !t.watchMode);
@@ -91,26 +93,26 @@ const Ve = {
91
93
  }
92
94
  };
93
95
  return (t, e) => (a(), h(g, null, [
94
- ue(u(s(Te), {
96
+ ue(u(s(Pe), {
95
97
  class: p([t.showSidebar ? "sidebar-active-width" : ""]),
96
98
  showSidebar: t.showSidebar,
97
99
  "onUpdate:showSidebar": e[8] || (e[8] = (o) => t.$emit("update:showSidebar", o))
98
- }, ce({
100
+ }, me({
99
101
  content: l(() => [
100
102
  i("div", Ve, [
101
103
  u(s(Ie), {
102
104
  ref_key: "searchInputRef",
103
- ref: T,
105
+ ref: P,
104
106
  modelValue: s(b),
105
- "onUpdate:modelValue": e[0] || (e[0] = (o) => me(b) ? b.value = o : null),
107
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => ce(b) ? b.value = o : null),
106
108
  "aria-activedescendant": ee.value,
107
109
  "aria-controls": s(M),
108
110
  sidebar: "",
109
111
  onInput: s(X),
110
112
  onKeydown: [
111
- e[1] || (e[1] = y(c((o) => s(E)("down"), ["stop"]), ["down"])),
112
- e[2] || (e[2] = y(c((o) => s(Z)(), ["stop"]), ["enter"])),
113
- e[3] || (e[3] = y(c((o) => s(E)("up"), ["stop"]), ["up"]))
113
+ e[1] || (e[1] = y(m((o) => s(T)("down"), ["stop"]), ["down"])),
114
+ e[2] || (e[2] = y(m((o) => s(Z)(), ["stop"]), ["enter"])),
115
+ e[3] || (e[3] = y(m((o) => s(T)("up"), ["stop"]), ["up"]))
114
116
  ]
115
117
  }, null, 8, ["modelValue", "aria-activedescendant", "aria-controls", "onInput"])
116
118
  ]),
@@ -118,9 +120,9 @@ const Ve = {
118
120
  class: p(["flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
119
121
  "pb-14": !t.isReadonly
120
122
  }]),
121
- onDragenter: e[6] || (e[6] = c(() => {
123
+ onDragenter: e[6] || (e[6] = m(() => {
122
124
  }, ["prevent"])),
123
- onDragover: e[7] || (e[7] = c(() => {
125
+ onDragover: e[7] || (e[7] = m(() => {
124
126
  }, ["prevent"]))
125
127
  }, [
126
128
  s(b) ? (a(), d(s(qe), {
@@ -139,7 +141,7 @@ const Ve = {
139
141
  active: s(k) === r,
140
142
  class: "px-2",
141
143
  href: o.item.link,
142
- onClick: c((n) => s(Q)(o), ["prevent"]),
144
+ onClick: m((n) => s(Q)(o), ["prevent"]),
143
145
  onFocus: (n) => k.value = r
144
146
  }, {
145
147
  addon: l(() => [
@@ -163,12 +165,12 @@ const Ve = {
163
165
  key: o.uid,
164
166
  isDraggable: !t.isReadonly && ((r = o.info) == null ? void 0 : r.title) !== "Drafts",
165
167
  isDroppable: s(L),
166
- menuItem: m,
168
+ menuItem: c,
167
169
  parentUids: [],
168
170
  uid: o.uid,
169
171
  onNewTab: e[4] || (e[4] = (n, oe) => C("newTab", { name: n, uid: oe })),
170
172
  onOnDragEnd: s(H),
171
- onOpenMenu: e[5] || (e[5] = (n) => Object.assign(m, n))
173
+ onOpenMenu: e[5] || (e[5] = (n) => Object.assign(c, n))
172
174
  }, {
173
175
  leftIcon: l(() => {
174
176
  var n;
@@ -221,7 +223,7 @@ const Ve = {
221
223
  ]),
222
224
  e[11] || (e[11] = i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
223
225
  i("b", { class: "font-medium" }, "Let's Get Started"),
224
- i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
226
+ i("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
225
227
  ], -1))
226
228
  ]),
227
229
  t.isReadonly ? q("", !0) : (a(), d(s(De), {
@@ -258,11 +260,11 @@ const Ve = {
258
260
  ]), 1032, ["class", "showSidebar"]), [
259
261
  [fe, t.showSidebar]
260
262
  ]),
261
- !s(U) && m ? (a(), d(ge, {
263
+ !s(U) && c ? (a(), d(ge, {
262
264
  key: 0,
263
- menuItem: m,
265
+ menuItem: c,
264
266
  onClearDrafts: te,
265
- onCloseMenu: e[9] || (e[9] = (o) => m.open = !1),
267
+ onCloseMenu: e[9] || (e[9] = (o) => c.open = !1),
266
268
  onToggleWatchMode: _
267
269
  }, null, 8, ["menuItem"])) : q("", !0)
268
270
  ], 64));
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AA8GA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;;;;;AAkPF,wBAQG"}
1
+ {"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AAoHA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;;;;;AAwPF,wBAQG"}
@@ -1,7 +1,7 @@
1
- import e from "./RequestSubpageHeader.vue2.js";
1
+ import a from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
- import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-df327023"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ e(a, [["__scopeId", "data-v-cad1af01"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,28 +1,29 @@
1
- import { defineComponent as C, openBlock as l, createElementBlock as a, createElementVNode as r, createVNode as s, normalizeClass as k, unref as t, createBlock as d, createCommentVNode as i } from "vue";
2
- import V from "../../components/AddressBar/AddressBar.vue.js";
3
- import x from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
4
- import v from "../../components/Sidebar/SidebarToggle.vue.js";
5
- import { useActiveEntities as w } from "../../store/active-entities.js";
6
- import { ScalarIcon as g } from "@scalar/components";
7
- import $ from "./components/WorkspaceDropdown.vue.js";
8
- import B from "../../components/OpenApiClientButton.vue.js";
9
- import { useWorkspace as R } from "../../store/store.js";
10
- import { useLayout as h } from "../../hooks/useLayout.js";
11
- const z = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, A = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, E = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, D = /* @__PURE__ */ C({
1
+ import { defineComponent as C, openBlock as l, createElementBlock as a, createElementVNode as i, createVNode as s, normalizeClass as V, unref as t, createBlock as u, createCommentVNode as r } from "vue";
2
+ import x from "../../components/AddressBar/AddressBar.vue.js";
3
+ import v from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
4
+ import w from "../../components/Sidebar/SidebarToggle.vue.js";
5
+ import { useActiveEntities as R } from "../../store/active-entities.js";
6
+ import { ScalarIcon as c } from "@scalar/components";
7
+ import { useRouter as $ } from "vue-router";
8
+ import B from "./components/WorkspaceDropdown.vue.js";
9
+ import h from "../../components/OpenApiClientButton.vue.js";
10
+ import { useWorkspace as z } from "../../store/store.js";
11
+ import { useLayout as A } from "../../hooks/useLayout.js";
12
+ const E = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, N = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, J = /* @__PURE__ */ C({
12
13
  __name: "RequestSubpageHeader",
13
14
  props: {
14
15
  modelValue: { type: Boolean },
15
16
  isReadonly: { type: Boolean }
16
17
  },
17
18
  emits: ["update:modelValue", "hideModal", "importCurl"],
18
- setup(M) {
19
- const { activeCollection: m } = w(), c = R(), { hideClientButton: y } = c, { layout: b } = h();
19
+ setup(S) {
20
+ const { activeCollection: m } = R(), g = z(), { hideClientButton: y } = g, { layout: b } = A(), { currentRoute: k } = $();
20
21
  return (o, e) => {
21
- var p, u, f;
22
- return l(), a("div", z, [
23
- r("div", A, [
24
- s(v, {
25
- class: k(["gitbook-hidden", [
22
+ var d, p, f;
23
+ return l(), a("div", E, [
24
+ i("div", M, [
25
+ s(w, {
26
+ class: V(["gitbook-hidden", [
26
27
  "xl:hidden",
27
28
  { "xl:!flex": !o.modelValue },
28
29
  { "!flex": t(b) === "modal" }
@@ -30,51 +31,52 @@ const z = { class: "lg:min-h-header flex items-center w-full justify-center p-2
30
31
  modelValue: o.modelValue,
31
32
  "onUpdate:modelValue": e[0] || (e[0] = (n) => o.$emit("update:modelValue", n))
32
33
  }, null, 8, ["class", "modelValue"]),
33
- o.isReadonly ? i("", !0) : (l(), d(t($), { key: 0 }))
34
+ o.isReadonly ? r("", !0) : (l(), u(t(B), { key: 0 }))
34
35
  ]),
35
- s(V, {
36
+ s(x, {
36
37
  onImportCurl: e[1] || (e[1] = (n) => o.$emit("importCurl", n))
37
38
  }),
38
- r("div", E, [
39
- o.isReadonly ? i("", !0) : (l(), d(x, { key: 0 })),
40
- o.isReadonly && ((p = t(m)) != null && p.documentUrl) && !t(y) ? (l(), d(t(B), {
39
+ i("div", N, [
40
+ o.isReadonly ? r("", !0) : (l(), u(v, { key: 0 })),
41
+ o.isReadonly && ((d = t(m)) != null && d.documentUrl) && !t(y) ? (l(), u(t(h), {
41
42
  key: 1,
42
43
  buttonSource: "modal",
43
44
  class: "!w-fit lg:-mr-1",
44
- integration: (u = t(m)) == null ? void 0 : u.integration,
45
+ integration: (p = t(m)) == null ? void 0 : p.integration,
46
+ source: t(k).query.source === "gitbook" ? "gitbook" : "api-reference",
45
47
  url: (f = t(m)) == null ? void 0 : f.documentUrl
46
- }, null, 8, ["integration", "url"])) : i("", !0),
48
+ }, null, 8, ["integration", "source", "url"])) : r("", !0),
47
49
  o.isReadonly ? (l(), a("button", {
48
50
  key: 2,
49
51
  class: "app-exit-button p-2 rounded-full fixed right-2 top-2 gitbook-hidden",
50
52
  type: "button",
51
53
  onClick: e[2] || (e[2] = (n) => o.$emit("hideModal"))
52
54
  }, [
53
- s(t(g), {
55
+ s(t(c), {
54
56
  icon: "Close",
55
57
  size: "lg",
56
58
  thickness: "2"
57
59
  }),
58
- e[4] || (e[4] = r("span", { class: "sr-only" }, "Close Client", -1))
59
- ])) : i("", !0),
60
+ e[4] || (e[4] = i("span", { class: "sr-only" }, "Close Client", -1))
61
+ ])) : r("", !0),
60
62
  o.isReadonly ? (l(), a("button", {
61
63
  key: 3,
62
64
  class: "text-c-1 hover:bg-b-2 active:text-c-1 p-2 rounded -mr-1.5 gitbook-show",
63
65
  type: "button",
64
66
  onClick: e[3] || (e[3] = (n) => o.$emit("hideModal"))
65
67
  }, [
66
- s(t(g), {
68
+ s(t(c), {
67
69
  icon: "Close",
68
70
  size: "md",
69
71
  thickness: "1.75"
70
72
  }),
71
- e[5] || (e[5] = r("span", { class: "sr-only" }, "Close Client", -1))
72
- ])) : i("", !0)
73
+ e[5] || (e[5] = i("span", { class: "sr-only" }, "Close Client", -1))
74
+ ])) : r("", !0)
73
75
  ])
74
76
  ]);
75
77
  };
76
78
  }
77
79
  });
78
80
  export {
79
- D as default
81
+ J as default
80
82
  };
@@ -17,7 +17,7 @@ const K = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, A = {
17
17
  a.commandPalette.emit({ commandName: "Create Request" });
18
18
  }, y = (i) => {
19
19
  i != null && i.createNew && v.name === "request" && f();
20
- }, h = "2.2.6";
20
+ }, h = "2.2.8";
21
21
  return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (r(), l("div", K, [
22
22
  o("div", {
23
23
  class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -52,7 +52,7 @@ const J = { class: "flex items-center text-sm w-[inherit]" }, K = { class: "font
52
52
  l("span", X, z(p.name), 1),
53
53
  s(e(S), {
54
54
  placement: "right-start",
55
- teleport: ".scalar-client"
55
+ teleport: ""
56
56
  }, {
57
57
  items: n(() => [
58
58
  s(e(u), {
@@ -1 +1 @@
1
- {"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[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O,MAAM,iBAAiB,SACtB,UAAU,wBACM,mBAAmB,SAClC,cAAc,KACpB,OAwIF,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,SACrB,UAAU,wBACM,mBAAmB,+BACZ,cAAc,KAC1C,OAoCF,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,aAAa,SAClB,UAAU,wBACM,mBAAmB,yBAClB,cAAc,KACpC,OA+BF,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,WACpB,SAAS,OACZ,MAAM,SACJ,MAAM,KACZ,SAAS,GAAG,IAmBd,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,wBACM,mBAAmB,+CACI,cAAc,KAC1D,OA0CF,CAAA"}
1
+ {"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAelE,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,6BAA6B,CAAA;AAEpC,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAK,MAAM,KAAK,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,EAAE,eACN,MAAM,EAAE,KACnB,UAAU,EAqFZ,CAAA;AAED,kEAAkE;AAClE,eAAO,MAAM,YAAY,GAAI,CAAC,OACvB,MAAM,EAAE,aACF,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,aACjB,CAAC,QAAQ,EAAE,CAAC,KAAK,OAAO,KAClC,CAAC,GAAG,IAMN,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WACpB,SAAS,QACX,CAAC,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