@scalar/api-client 2.0.60 → 2.0.63

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 (44) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  3. package/dist/components/CodeInput/CodeInput.vue2.js +16 -15
  4. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  5. package/dist/components/CodeInput/codeVariableWidget.js +35 -30
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +3 -0
  7. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -0
  8. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +114 -0
  9. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +4 -0
  10. package/dist/layouts/App/create-api-client-app.d.ts +879 -195
  11. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  12. package/dist/layouts/Modal/create-api-client-modal.d.ts +1758 -390
  13. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  14. package/dist/libs/create-client.d.ts +879 -195
  15. package/dist/libs/create-client.d.ts.map +1 -1
  16. package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
  17. package/dist/libs/local-storage.js +1 -1
  18. package/dist/libs/normalizeHeaders.d.ts +1 -2
  19. package/dist/libs/normalizeHeaders.d.ts.map +1 -1
  20. package/dist/libs/sendRequest.d.ts +4 -5
  21. package/dist/libs/sendRequest.d.ts.map +1 -1
  22. package/dist/libs/sendRequest.js +104 -86
  23. package/dist/store/workspace.d.ts +1754 -389
  24. package/dist/store/workspace.d.ts.map +1 -1
  25. package/dist/store/workspace.js +219 -216
  26. package/dist/style.css +1 -1
  27. package/dist/views/Environment/Environment.vue2.js +12 -12
  28. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  29. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +54 -52
  30. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  31. package/dist/views/Request/Request.vue.js +4 -4
  32. package/dist/views/Request/Request.vue2.js +91 -89
  33. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  34. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  35. package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
  36. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  37. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  38. package/dist/views/Request/RequestSidebarItem.vue2.js +82 -80
  39. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +2 -2
  40. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  41. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +20 -20
  42. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  43. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +47 -42
  44. package/package.json +8 -8
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, ref as c, onMounted as N, openBlock as r, createBlock as f, withCtx as o, createVNode as a, createElementVNode as _, createElementBlock as d, Fragment as C, renderList as S, unref as u, createTextVNode as $, createSlots as h, createCommentVNode as I, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
1
+ import { defineComponent as b, ref as c, onMounted as C, openBlock as r, createBlock as f, withCtx as o, createVNode as a, createElementVNode as _, createElementBlock as d, Fragment as V, renderList as S, unref as u, createTextVNode as $, createSlots as h, createCommentVNode as I, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
2
2
  import A from "../../components/CodeInput/CodeInput.vue.js";
3
3
  import K from "../../components/Sidebar/Sidebar.vue.js";
4
4
  /* empty css */
@@ -13,7 +13,7 @@ import { useWorkspace as W } from "../../store/workspace.js";
13
13
  import { nanoid as j } from "nanoid";
14
14
  import { useRouter as q } from "vue-router";
15
15
  import z from "./EnvironmentColors.vue.js";
16
- const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, de = /* @__PURE__ */ D({
16
+ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, de = /* @__PURE__ */ b({
17
17
  __name: "Environment",
18
18
  setup(X) {
19
19
  const v = q(), { environments: l, environmentMutators: s } = W(), e = c(null), p = c(null), m = c(!1);
@@ -35,18 +35,18 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
35
35
  s.delete(t), e.value === t && (e.value = null);
36
36
  }, g = (t) => {
37
37
  e.value && (l[e.value].color = t);
38
- }, b = () => {
39
- v.currentRoute.value.params.environment === "default" && (e.value = l.default.uid);
40
38
  }, x = () => {
39
+ v.currentRoute.value.params.environment === "default" && (e.value = l.default.uid);
40
+ }, w = () => {
41
41
  e.value && !l[e.value].isDefault && (m.value = !0, R(() => {
42
42
  var t;
43
43
  (t = p.value) == null || t.focus();
44
44
  }));
45
- }, V = (t) => {
45
+ }, D = (t) => {
46
46
  const n = t.target.value;
47
47
  e.value && !l[e.value].isDefault && s.edit(e.value, "name", n);
48
48
  };
49
- return N(b), (t, i) => (r(), f(F, null, {
49
+ return C(x), (t, i) => (r(), f(F, null, {
50
50
  default: o(() => [
51
51
  a(H, null, {
52
52
  default: o(() => [
@@ -55,7 +55,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
55
55
  _("div", G, [
56
56
  a(T, null, {
57
57
  default: o(() => [
58
- (r(!0), d(C, null, S(u(l), (n) => (r(), f(U, {
58
+ (r(!0), d(V, null, S(u(l), (n) => (r(), f(U, {
59
59
  key: n.uid,
60
60
  class: "text-xs",
61
61
  variable: {
@@ -65,8 +65,8 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
65
65
  isDefault: n.isDefault
66
66
  },
67
67
  warningMessage: "Are you sure you want to delete this environment?",
68
- onClick: (w) => e.value = n.uid,
69
- onDelete: (w) => k(n.uid)
68
+ onClick: (N) => e.value = n.uid,
69
+ onDelete: (N) => k(n.uid)
70
70
  }, null, 8, ["variable", "onClick", "onDelete"]))), 128))
71
71
  ]),
72
72
  _: 1
@@ -76,7 +76,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
76
76
  button: o(() => [
77
77
  a(M, { click: y }, {
78
78
  title: o(() => [
79
- $("Add Environment Variable")
79
+ $("Add Environment")
80
80
  ]),
81
81
  _: 1
82
82
  })
@@ -102,7 +102,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
102
102
  fn: o(() => [
103
103
  !m.value || u(l)[e.value].isDefault ? (r(), d("span", {
104
104
  key: 0,
105
- onDblclick: x
105
+ onDblclick: w
106
106
  }, L(u(l)[e.value].name), 33)) : (r(), d("input", {
107
107
  key: 1,
108
108
  ref_key: "nameInputRef",
@@ -112,7 +112,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
112
112
  type: "text",
113
113
  value: u(l)[e.value].name,
114
114
  onBlur: i[0] || (i[0] = (n) => m.value = !1),
115
- onInput: V,
115
+ onInput: D,
116
116
  onKeyup: i[1] || (i[1] = B((n) => m.value = !1, ["enter"]))
117
117
  }, null, 40, P)),
118
118
  _("div", Q, [
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAkHA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAIvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;;WAK/B,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;WAHP,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;AAmNhB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAA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AO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as b, ref as y, computed as E, openBlock as r, createElementBlock as o, Fragment as C, renderList as V, createElementVNode as a, normalizeClass as B, createTextVNode as i, toDisplayString as u, createBlock as I, unref as d, withCtx as z, createVNode as N } from "vue";
2
- import { ScalarButton as P, ScalarIcon as S } from "@scalar/components";
3
- import $ from "fuse.js";
4
- const j = ["open"], q = { key: 0 }, A = ["onClick"], D = { class: "flex items-center gap-1.5 whitespace-nowrap" }, F = { class: "w-20 overflow-hidden text-ellipsis text-right" }, R = /* @__PURE__ */ b({
1
+ import { defineComponent as b, ref as E, computed as C, openBlock as n, createBlock as u, unref as s, withCtx as d, createElementBlock as a, Fragment as V, renderList as I, createElementVNode as c, normalizeClass as D, createTextVNode as p, toDisplayString as v, createVNode as S } from "vue";
2
+ import { ScalarDropdown as z, ScalarDropdownItem as B, ScalarIcon as N } from "@scalar/components";
3
+ import P from "fuse.js";
4
+ const $ = { key: 0 }, j = ["onClick"], q = { class: "flex items-center gap-1.5 whitespace-nowrap" }, A = { class: "w-20 overflow-hidden text-ellipsis text-right" }, Q = /* @__PURE__ */ b({
5
5
  __name: "EnvironmentVariableDropdown",
6
6
  props: {
7
7
  query: {},
@@ -10,60 +10,62 @@ const j = ["open"], q = { key: 0 }, A = ["onClick"], D = { class: "flex items-ce
10
10
  router: {}
11
11
  },
12
12
  emits: ["select"],
13
- setup(p, { emit: v }) {
14
- const n = p, m = v, c = y(!0), f = () => {
15
- const e = _.value.params.workspace;
16
- h(`/workspace/${e}/environment/default`), c.value = !1;
17
- }, { push: h, currentRoute: _ } = n.router, g = new $(n.activeParsedEnvironments.value, {
13
+ setup(m, { emit: f }) {
14
+ const r = m, h = f, l = E(!0), w = () => {
15
+ const e = k.value.params.workspace;
16
+ _(`/workspace/${e}/environment/default`), l.value = !1;
17
+ }, { push: _, currentRoute: k } = r.router, g = new P(r.activeParsedEnvironments.value, {
18
18
  keys: ["key", "value"]
19
- }), l = E(() => {
20
- const e = n.query;
19
+ }), i = C(() => {
20
+ const e = r.query;
21
21
  if (!e)
22
- return n.activeParsedEnvironments.value.slice(-4);
23
- const s = g.search(e);
24
- return s.length > 0 ? s.map((t) => t.item) : [];
25
- }), k = (e) => {
26
- m("select", e);
27
- }, w = (e) => "_scalarEnvId" in e ? `bg-${n.environments[e._scalarEnvId].color}` : "bg-grey";
28
- return (e, s) => (r(), o("dialog", {
22
+ return r.activeParsedEnvironments.value.slice(-4);
23
+ const o = g.search(e);
24
+ return o.length > 0 ? o.map((t) => t.item) : [];
25
+ }), x = (e) => {
26
+ h("select", e);
27
+ }, y = (e) => "_scalarEnvId" in e ? `bg-${r.environments[e._scalarEnvId].color}` : "bg-grey";
28
+ return (e, o) => (n(), u(s(z), {
29
29
  id: "env-dialog",
30
30
  class: "z-10 w-60 rounded border bg-b-1 p-1",
31
- open: c.value,
32
- tabindex: "0"
33
- }, [
34
- l.value.length ? (r(), o("ul", q, [
35
- (r(!0), o(C, null, V(l.value, (t, x) => (r(), o("li", {
36
- key: x,
37
- class: "font-code text-3xs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150",
38
- onClick: (T) => k(t.key)
39
- }, [
40
- a("div", D, [
41
- a("span", {
42
- class: B(["h-2.5 w-2.5 min-w-2.5 rounded-full", w(t)])
43
- }, null, 2),
44
- i(" " + u(t.key), 1)
31
+ open: l.value,
32
+ static: ""
33
+ }, {
34
+ items: d(() => [
35
+ i.value.length ? (n(), a("ul", $, [
36
+ (n(!0), a(V, null, I(i.value, (t) => (n(), a("li", {
37
+ key: t.key,
38
+ class: "h-8 font-code text-3xs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150",
39
+ onClick: (F) => x(t.key)
40
+ }, [
41
+ c("div", q, [
42
+ c("span", {
43
+ class: D(["h-2.5 w-2.5 min-w-2.5 rounded-full", y(t)])
44
+ }, null, 2),
45
+ p(" " + v(t.key), 1)
46
+ ]),
47
+ c("span", A, v(t.value), 1)
48
+ ], 8, j))), 128))
49
+ ])) : (n(), u(s(B), {
50
+ key: 1,
51
+ class: "font-code !text-3xs hover:bg-b-2 flex h-8 w-full justify-start gap-2 !px-1.5 transition-colors duration-150",
52
+ onClick: w
53
+ }, {
54
+ default: d(() => [
55
+ S(s(N), {
56
+ class: "w-2",
57
+ icon: "Add",
58
+ size: "xs"
59
+ }),
60
+ p(" Add variable ")
45
61
  ]),
46
- a("span", F, u(t.value), 1)
47
- ], 8, A))), 128))
48
- ])) : (r(), I(d(P), {
49
- key: 1,
50
- class: "font-code text-3xs hover:bg-b-2 flex h-7 w-full justify-start gap-2 px-2 transition-colors duration-150",
51
- variant: "secondary",
52
- onClick: f
53
- }, {
54
- default: z(() => [
55
- N(d(S), {
56
- class: "w-2",
57
- icon: "Add",
58
- size: "xs"
59
- }),
60
- i(" Add variable ")
61
- ]),
62
- _: 1
63
- }))
64
- ], 8, j));
62
+ _: 1
63
+ }))
64
+ ]),
65
+ _: 1
66
+ }, 8, ["open"]));
65
67
  }
66
68
  });
67
69
  export {
68
- R as default
70
+ Q as default
69
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAshB8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAoyBjD,wBAMG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cA2hB8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAkzBjD,wBAMG"}
@@ -1,7 +1,7 @@
1
- import e from "./Request.vue2.js";
1
+ import o from "./Request.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-e8d1eeb0"]]);
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fa353420"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };
@@ -1,34 +1,35 @@
1
- import { defineComponent as Re, ref as z, watch as A, onMounted as Se, onBeforeUnmount as we, openBlock as f, createElementBlock as _, normalizeClass as b, unref as o, createElementVNode as v, createVNode as d, createCommentVNode as q, withCtx as m, withDirectives as ye, createSlots as _e, isRef as ke, withModifiers as L, createBlock as R, Fragment as j, renderList as H, createTextVNode as K, toDisplayString as Ue, vShow as Ce, pushScopeId as qe, popScopeId as De } from "vue";
1
+ import { defineComponent as Re, ref as z, watch as A, onMounted as Se, onBeforeUnmount as we, openBlock as m, createElementBlock as _, normalizeClass as b, unref as o, createElementVNode as v, createVNode as d, createBlock as x, createCommentVNode as k, withCtx as f, withDirectives as ye, createSlots as _e, isRef as ke, withModifiers as L, Fragment as j, renderList as H, createTextVNode as K, toDisplayString as Ue, vShow as Ce, pushScopeId as qe, popScopeId as De } from "vue";
2
2
  import Ie from "../../components/AddressBar/AddressBar.vue.js";
3
- import Be from "../../components/HttpMethod/HttpMethod.vue.js";
3
+ import Be from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
4
+ import Oe from "../../components/HttpMethod/HttpMethod.vue.js";
4
5
  import { useSearch as Ve } from "../../components/Search/useSearch.js";
5
- import Oe from "../../components/Sidebar/SidebarButton.vue.js";
6
- import $e from "../../components/Sidebar/SidebarToggle.vue.js";
7
- import Ee from "../../components/ViewLayout/ViewLayout.vue.js";
6
+ import $e from "../../components/Sidebar/SidebarButton.vue.js";
7
+ import Ee from "../../components/Sidebar/SidebarToggle.vue.js";
8
+ import Me from "../../components/ViewLayout/ViewLayout.vue.js";
8
9
  import Fe from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
- import { useWorkspace as Me } from "../../store/workspace.js";
10
- import Ne from "./RequestSection/RequestSection.vue.js";
10
+ import { useWorkspace as Pe } from "../../store/workspace.js";
11
+ import Te from "./RequestSection/RequestSection.vue.js";
11
12
  /* empty css */
12
- import Pe from "./ResponseSection/ResponseSection.vue.js";
13
- import { ScalarIcon as D, ScalarSearchInput as Te, ScalarSearchResultList as We, ScalarSearchResultItem as ze } from "@scalar/components";
14
- import { useToasts as Ae } from "@scalar/use-toasts";
15
- import { useMediaQuery as Le } from "@vueuse/core";
16
- import je from "./RequestSidebarItem.vue.js";
17
- import He from "../../components/Sidebar/Sidebar.vue.js";
13
+ import Ne from "./ResponseSection/ResponseSection.vue.js";
14
+ import { ScalarIcon as D, ScalarSearchInput as We, ScalarSearchResultList as ze, ScalarSearchResultItem as Ae } from "@scalar/components";
15
+ import { useToasts as Le } from "@scalar/use-toasts";
16
+ import { useMediaQuery as je } from "@vueuse/core";
17
+ import He from "./RequestSidebarItem.vue.js";
18
+ import Ke from "../../components/Sidebar/Sidebar.vue.js";
18
19
  /* empty css */
19
- import Ke from "./components/WorkspaceDropdown.vue.js";
20
- import { useSidebar as Je } from "../../hooks/useSidebar.js";
21
- import { sendRequest as Qe } from "../../libs/sendRequest.js";
20
+ import Je from "./components/WorkspaceDropdown.vue.js";
21
+ import { useSidebar as Qe } from "../../hooks/useSidebar.js";
22
+ import { sendRequest as Ge } from "../../libs/sendRequest.js";
22
23
  import { executeRequestBus as J } from "../../libs/event-busses/execute-request-bus.js";
23
- import { cancelRequestBus as Ge } from "../../libs/event-busses/cancel-request-bus.js";
24
+ import { cancelRequestBus as Xe } from "../../libs/event-busses/cancel-request-bus.js";
24
25
  import { hotKeyBus as Q } from "../../libs/event-busses/hot-keys-bus.js";
25
26
  import { commandPaletteBus as G } from "../../libs/event-busses/command-palette-bus.js";
26
- import { requestStatusBus as k } from "../../libs/event-busses/request-status-bus.js";
27
- const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, Ze = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, et = /* @__PURE__ */ Xe(() => /* @__PURE__ */ v("a", {
27
+ import { requestStatusBus as U } from "../../libs/event-busses/request-status-bus.js";
28
+ const Ye = (S) => (qe("data-v-fa353420"), S = S(), De(), S), Ze = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, et = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, tt = /* @__PURE__ */ Ye(() => /* @__PURE__ */ v("a", {
28
29
  class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
29
30
  href: "https://scalar.com/",
30
31
  target: "_blank"
31
- }, " Powered by Scalar.com ", -1)), tt = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, st = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Dt = /* @__PURE__ */ Re({
32
+ }, " Powered by Scalar.com ", -1)), ot = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, st = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Bt = /* @__PURE__ */ Re({
32
33
  __name: "Request",
33
34
  emits: ["newTab"],
34
35
  setup(S, { emit: X }) {
@@ -40,28 +41,28 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
40
41
  activeWorkspace: c,
41
42
  activeWorkspaceCollections: ee,
42
43
  activeWorkspaceServers: te,
43
- activeWorkspaceRequests: se,
44
+ activeWorkspaceRequests: oe,
44
45
  collectionMutators: I,
45
46
  collections: p,
46
- cookies: oe,
47
+ cookies: se,
47
48
  environments: re,
48
49
  findRequestFolders: ae,
49
- folders: x,
50
+ folders: g,
50
51
  folderMutators: B,
51
52
  modalState: ie,
52
53
  requestMutators: le,
53
- workspaceMutators: V
54
- } = Me(), { collapsedSidebarFolders: ne, setCollapsedSidebarFolder: ce } = Je(), { toast: O } = Ae(), {
54
+ workspaceMutators: O
55
+ } = Pe(), { collapsedSidebarFolders: ne, setCollapsedSidebarFolder: ce } = Qe(), { toast: V } = Le(), {
55
56
  searchText: y,
56
57
  searchResultsWithPlaceholderResults: $,
57
58
  selectedSearchResult: E,
58
59
  onSearchResultClick: de,
59
60
  fuseSearch: ue,
60
- searchInputRef: F,
61
+ searchInputRef: M,
61
62
  searchResultRefs: me,
62
- navigateSearchResults: M,
63
+ navigateSearchResults: F,
63
64
  selectSearchResult: fe
64
- } = Ve(), pe = Le("(max-width: 780px)"), u = z(!((W = c.value) != null && W.isReadOnly)), U = z();
65
+ } = Ve(), pe = je("(max-width: 780px)"), u = z(!((W = c.value) != null && W.isReadOnly)), C = z();
65
66
  A(pe, (e) => u.value = !e), A(
66
67
  h,
67
68
  (e) => {
@@ -71,7 +72,7 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
71
72
  },
72
73
  { immediate: !0 }
73
74
  );
74
- const N = async () => {
75
+ const P = async () => {
75
76
  var r, a;
76
77
  if (!h.value || !w.value) {
77
78
  console.warn(
@@ -93,17 +94,17 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
93
94
  e = e.replace(t, (l, n) => (te.value.forEach((i) => {
94
95
  if (i.url === n)
95
96
  return n;
96
- }), s[n] || n)), k.emit("start");
97
+ }), s[n] || n)), U.emit("start");
97
98
  try {
98
- U.value = new AbortController();
99
- const { request: l, response: n, error: i } = await Qe(
99
+ C.value = new AbortController();
100
+ const { request: l, response: n, error: i } = await Ge(
100
101
  h.value,
101
102
  w.value,
102
103
  e,
103
104
  Z.value,
104
105
  (r = c.value) == null ? void 0 : r.proxyUrl,
105
- oe,
106
- (a = U.value) == null ? void 0 : a.signal
106
+ se,
107
+ (a = C.value) == null ? void 0 : a.signal
107
108
  );
108
109
  l && n ? (le.edit(h.value.uid, "history", [
109
110
  ...h.value.history,
@@ -112,25 +113,25 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
112
113
  response: n,
113
114
  timestamp: Date.now()
114
115
  }
115
- ]), k.emit("stop")) : ((i == null ? void 0 : i.code) !== "ERR_CANCELED" && O((i == null ? void 0 : i.message) ?? "Send Request Failed", "error"), k.emit("abort"));
116
+ ]), U.emit("stop")) : (i instanceof DOMException && i.name == "AbortError" || V((i == null ? void 0 : i.message) ?? "Send Request Failed", "error"), U.emit("abort"));
116
117
  } catch (l) {
117
- console.error(l), O(`Oops!
118
- ${l}`, "error"), k.emit("abort");
118
+ console.error(l), V(`Oops!
119
+ ${l}`, "error"), U.emit("abort");
119
120
  }
120
- }, P = (e) => {
121
+ }, T = (e) => {
121
122
  var s;
122
- e.toggleSidebar && (u.value = !u.value), e.openCommandPalette && (e.openCommandPalette.preventDefault(), G.emit()), e.focusRequestSearch && ((s = F.value) == null || s.focus()), e.navigateSearchResultsUp && M("up"), e.navigateSearchResultsDown && M("down"), e.selectSearchResult && fe();
123
+ e.toggleSidebar && (u.value = !u.value), e.openCommandPalette && (e.openCommandPalette.preventDefault(), G.emit()), e.focusRequestSearch && ((s = M.value) == null || s.focus()), e.navigateSearchResultsUp && F("up"), e.navigateSearchResultsDown && F("down"), e.selectSearchResult && fe();
123
124
  }, he = async () => {
124
125
  var e;
125
- return (e = U.value) == null ? void 0 : e.abort();
126
+ return (e = C.value) == null ? void 0 : e.abort();
126
127
  };
127
128
  Se(() => {
128
- J.on(N), Ge.on(he), Q.on(P);
129
+ J.on(P), Xe.on(he), Q.on(T);
129
130
  }), we(() => {
130
- J.off(N), Q.off(P);
131
+ J.off(P), Q.off(T);
131
132
  });
132
- const T = (e, s) => {
133
- p[e] ? I.edit(e, "childUids", s) : x[e] && B.edit(e, "childUids", s);
133
+ const N = (e, s) => {
134
+ p[e] ? I.edit(e, "childUids", s) : g[e] && B.edit(e, "childUids", s);
134
135
  }, ve = (e, s) => {
135
136
  if (!e || !s) return;
136
137
  const { id: t, parentId: r } = e, { id: a, parentId: l, offset: n } = s;
@@ -140,23 +141,23 @@ ${l}`, "error"), k.emit("abort");
140
141
  p[r].childUids.filter(
141
142
  (i) => i !== t
142
143
  )
143
- ) : x[r] && B.edit(
144
+ ) : g[r] && B.edit(
144
145
  r,
145
146
  "childUids",
146
- x[r].childUids.filter((i) => i !== t)
147
- ) : V.edit(
147
+ g[r].childUids.filter((i) => i !== t)
148
+ ) : O.edit(
148
149
  c.value.uid,
149
150
  "collectionUids",
150
151
  c.value.collectionUids.filter((i) => i !== t)
151
152
  ), n === 2) {
152
- const i = p[a] || x[a];
153
- T(a, [...i.childUids, t]);
153
+ const i = p[a] || g[a];
154
+ N(a, [...i.childUids, t]);
154
155
  } else if (l) {
155
- const g = [...(p[l] || x[l]).childUids], C = g.findIndex((ge) => a === ge) ?? 0;
156
- g.splice(C + n, 0, t), T(l, g);
156
+ const R = [...(p[l] || g[l]).childUids], q = R.findIndex((ge) => a === ge) ?? 0;
157
+ R.splice(q + n, 0, t), N(l, R);
157
158
  } else {
158
- const i = [...c.value.collectionUids], g = i.findIndex((C) => a === C) ?? 0;
159
- i.splice(g + n, 0, t), V.edit(
159
+ const i = [...c.value.collectionUids], R = i.findIndex((q) => a === q) ?? 0;
160
+ i.splice(R + n, 0, t), O.edit(
160
161
  c.value.uid,
161
162
  "collectionUids",
162
163
  i
@@ -168,24 +169,25 @@ ${l}`, "error"), k.emit("abort");
168
169
  }, xe = (e, s) => {
169
170
  Y("newTab", { name: e, uid: s });
170
171
  };
171
- return (e, s) => (f(), _("div", {
172
+ return (e, s) => (m(), _("div", {
172
173
  class: b(["flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden", {
173
174
  "!mr-0 !mb-0 !border-0": o(c).isReadOnly
174
175
  }])
175
176
  }, [
176
- v("div", Ye, [
177
- v("div", Ze, [
178
- d($e, {
177
+ v("div", Ze, [
178
+ v("div", et, [
179
+ d(Ee, {
179
180
  modelValue: u.value,
180
181
  "onUpdate:modelValue": s[0] || (s[0] = (t) => u.value = t),
181
182
  class: "gitbook-hidden"
182
183
  }, null, 8, ["modelValue"]),
183
- et
184
+ tt
184
185
  ]),
185
186
  d(Ie),
186
- v("div", tt, [
187
- o(c).isReadOnly ? (f(), _("button", {
188
- key: 0,
187
+ v("div", ot, [
188
+ o(c).isReadOnly ? k("", !0) : (m(), x(Be, { key: 0 })),
189
+ o(c).isReadOnly ? (m(), _("button", {
190
+ key: 1,
189
191
  class: "text-c-3 hover:bg-b-2 active:text-c-1 p-2 rounded",
190
192
  type: "button",
191
193
  onClick: s[1] || (s[1] = (t) => o(ie).hide())
@@ -195,21 +197,21 @@ ${l}`, "error"), k.emit("abort");
195
197
  size: "lg",
196
198
  thickness: "1.75"
197
199
  })
198
- ])) : q("", !0)
200
+ ])) : k("", !0)
199
201
  ])
200
202
  ]),
201
- d(Ee, null, {
202
- default: m(() => [
203
- ye(d(o(He), {
203
+ d(Me, null, {
204
+ default: f(() => [
205
+ ye(d(o(Ke), {
204
206
  class: b([u.value ? "sidebar-active-width" : ""]),
205
207
  showSideBar: u.value,
206
208
  "onUpdate:showSideBar": s[5] || (s[5] = (t) => u.value = t)
207
209
  }, _e({
208
- content: m(() => [
210
+ content: f(() => [
209
211
  v("div", st, [
210
- d(o(Te), {
212
+ d(o(We), {
211
213
  ref_key: "searchInputRef",
212
- ref: F,
214
+ ref: M,
213
215
  modelValue: o(y),
214
216
  "onUpdate:modelValue": s[2] || (s[2] = (t) => ke(y) ? y.value = t : null),
215
217
  sidebar: "",
@@ -225,13 +227,13 @@ ${l}`, "error"), k.emit("abort");
225
227
  onDragover: s[4] || (s[4] = L(() => {
226
228
  }, ["prevent"]))
227
229
  }, [
228
- o(y) ? (f(), R(o(We), {
230
+ o(y) ? (m(), x(o(ze), {
229
231
  key: 0,
230
232
  class: "gap-px custom-scroll",
231
233
  noResults: !o($).length
232
234
  }, {
233
- default: m(() => [
234
- (f(!0), _(j, null, H(o($), (t, r) => (f(), R(o(ze), {
235
+ default: f(() => [
236
+ (m(!0), _(j, null, H(o($), (t, r) => (m(), x(o(Ae), {
235
237
  id: `#search-input-${t.item.id}`,
236
238
  key: t.refIndex,
237
239
  ref_for: !0,
@@ -241,22 +243,22 @@ ${l}`, "error"), k.emit("abort");
241
243
  onClick: (a) => o(de)(t),
242
244
  onFocus: (a) => E.value = r
243
245
  }, {
244
- addon: m(() => [
245
- d(Be, {
246
+ addon: f(() => [
247
+ d(Oe, {
246
248
  class: "font-bold",
247
249
  method: t.item.httpVerb ?? "get"
248
250
  }, null, 8, ["method"])
249
251
  ]),
250
- default: m(() => [
252
+ default: f(() => [
251
253
  K(Ue(t.item.title) + " ", 1)
252
254
  ]),
253
255
  _: 2
254
256
  }, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
255
257
  ]),
256
258
  _: 1
257
- }, 8, ["noResults"])) : (f(!0), _(j, { key: 1 }, H(o(ee), (t) => {
259
+ }, 8, ["noResults"])) : (m(!0), _(j, { key: 1 }, H(o(ee), (t) => {
258
260
  var r, a;
259
- return f(), R(je, {
261
+ return m(), x(He, {
260
262
  key: t.uid,
261
263
  isDraggable: !o(c).isReadOnly && ((a = (r = t.spec) == null ? void 0 : r.info) == null ? void 0 : a.title) !== "Drafts",
262
264
  isDroppable: be,
@@ -265,7 +267,7 @@ ${l}`, "error"), k.emit("abort");
265
267
  onNewTab: xe,
266
268
  onOnDragEnd: ve
267
269
  }, {
268
- leftIcon: m(() => [
270
+ leftIcon: f(() => [
269
271
  d(o(D), {
270
272
  class: "text-sidebar-c-2 text-sm group-hover:hidden",
271
273
  icon: "CodeFolder",
@@ -289,15 +291,15 @@ ${l}`, "error"), k.emit("abort");
289
291
  }), 128))
290
292
  ], 34)
291
293
  ]),
292
- button: m(() => [
293
- o(c).isReadOnly ? q("", !0) : (f(), R(Oe, {
294
+ button: f(() => [
295
+ o(c).isReadOnly ? k("", !0) : (m(), x($e, {
294
296
  key: 0,
295
297
  class: b({
296
- "empty-sidebar-item": o(se).length === 1
298
+ "empty-sidebar-item": o(oe).length === 1
297
299
  }),
298
300
  click: o(G).emit
299
301
  }, {
300
- title: m(() => [
302
+ title: f(() => [
301
303
  K("Add Item")
302
304
  ]),
303
305
  _: 1
@@ -307,29 +309,29 @@ ${l}`, "error"), k.emit("abort");
307
309
  }, [
308
310
  o(c).isReadOnly ? void 0 : {
309
311
  name: "header",
310
- fn: m(() => [
311
- d(o(Ke))
312
+ fn: f(() => [
313
+ d(o(Je))
312
314
  ]),
313
315
  key: "0"
314
316
  }
315
317
  ]), 1032, ["class", "showSideBar"]), [
316
318
  [Ce, u.value]
317
319
  ]),
318
- o(w) ? (f(), R(Fe, {
320
+ o(w) ? (m(), x(Fe, {
319
321
  key: 0,
320
322
  class: b(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
321
323
  }, {
322
- default: m(() => {
324
+ default: f(() => {
323
325
  var t, r, a, l, n;
324
326
  return [
325
- d(Ne),
326
- d(Pe, {
327
+ d(Te),
328
+ d(Ne, {
327
329
  response: (n = (l = (t = o(h)) == null ? void 0 : t.history) == null ? void 0 : l[((a = (r = o(h)) == null ? void 0 : r.history) == null ? void 0 : a.length) - 1]) == null ? void 0 : n.response
328
330
  }, null, 8, ["response"])
329
331
  ];
330
332
  }),
331
333
  _: 1
332
- }, 8, ["class"])) : q("", !0)
334
+ }, 8, ["class"])) : k("", !0)
333
335
  ]),
334
336
  _: 1
335
337
  })
@@ -337,5 +339,5 @@ ${l}`, "error"), k.emit("abort");
337
339
  }
338
340
  });
339
341
  export {
340
- Dt as default
342
+ Bt as default
341
343
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/R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@@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0c169f89"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-61c6e031"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -6,7 +6,7 @@ import z from "../../../components/DataTable/DataTableCheckbox.vue.js";
6
6
  import D from "../../../components/DataTable/DataTableRow.vue.js";
7
7
  import { ScalarButton as H, ScalarIcon as A } from "@scalar/components";
8
8
  import M from "./RequestTableTooltip.vue.js";
9
- const O = (s) => (T("data-v-0c169f89"), s = s(), N(), s), j = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, K = ["onClick"], L = /* @__PURE__ */ O(() => /* @__PURE__ */ p("span", null, "File", -1)), ee = /* @__PURE__ */ F({
9
+ const O = (s) => (T("data-v-61c6e031"), s = s(), N(), s), j = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, K = ["onClick"], L = /* @__PURE__ */ O(() => /* @__PURE__ */ p("span", null, "File", -1)), ee = /* @__PURE__ */ F({
10
10
  __name: "RequestTable",
11
11
  props: {
12
12
  items: {},