@scalar/api-client 2.2.3 → 2.2.6

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 (106) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarServer.vue.js +15 -15
  4. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +1 -1
  5. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +24 -24
  8. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +2 -2
  9. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -5
  10. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableCheckbox.vue.js +5 -6
  12. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  13. package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -8
  14. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  15. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +37 -47
  16. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  17. package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
  18. package/dist/components/HttpMethod/HttpMethod.vue2.js +16 -17
  19. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  20. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +85 -84
  21. package/dist/components/ImportCollection/ImportNowButton.vue.js +3 -3
  22. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  23. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +24 -26
  24. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +6 -0
  25. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  26. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +28 -23
  27. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
  28. package/dist/components/OpenApiClientButton.vue.js +1 -1
  29. package/dist/components/OpenApiClientButton.vue2.js +16 -16
  30. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  31. package/dist/components/TopNav/TopNav.vue.js +72 -70
  32. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  33. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  34. package/dist/components/TopNav/TopNavItem.vue2.js +83 -81
  35. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  36. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -6
  37. package/dist/layouts/App/create-api-client-app.d.ts +3 -2
  38. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  39. package/dist/layouts/App/create-api-client-app.js +6 -6
  40. package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -4
  41. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  42. package/dist/layouts/Modal/create-api-client-modal.js +1 -1
  43. package/dist/layouts/Web/create-api-client-web.d.ts +3 -2
  44. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  45. package/dist/layouts/Web/create-api-client-web.js +4 -4
  46. package/dist/libs/create-client.d.ts +6 -5
  47. package/dist/libs/create-client.d.ts.map +1 -1
  48. package/dist/libs/create-client.js +38 -37
  49. package/dist/libs/index.d.ts +1 -2
  50. package/dist/libs/index.d.ts.map +1 -1
  51. package/dist/libs/index.js +20 -20
  52. package/dist/libs/send-request/index.d.ts +2 -0
  53. package/dist/libs/send-request/index.d.ts.map +1 -0
  54. package/dist/libs/send-request/index.js +9 -0
  55. package/dist/libs/{send-request.d.ts → send-request/send-request.d.ts} +6 -6
  56. package/dist/libs/send-request/send-request.d.ts.map +1 -0
  57. package/dist/libs/{send-request.js → send-request/send-request.js} +29 -29
  58. package/dist/store/events.d.ts +1 -1
  59. package/dist/store/import-spec.d.ts +1 -1
  60. package/dist/store/import-spec.d.ts.map +1 -1
  61. package/dist/store/import-spec.js +1 -1
  62. package/dist/store/store.d.ts +6 -4
  63. package/dist/store/store.d.ts.map +1 -1
  64. package/dist/store/store.js +47 -45
  65. package/dist/style.css +1 -1
  66. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  67. package/dist/views/Cookies/Cookies.vue2.js +18 -20
  68. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  69. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +76 -72
  70. package/dist/views/Request/Request.vue.js +1 -1
  71. package/dist/views/Request/Request.vue2.js +30 -30
  72. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  73. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +20 -19
  74. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  75. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  76. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +2 -2
  77. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  78. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  79. package/dist/views/Request/RequestSection/RequestBody.vue2.js +245 -191
  80. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  82. package/dist/views/Request/RequestSidebar.vue2.js +60 -61
  83. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  84. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  85. package/dist/views/Request/RequestSidebarItem.vue2.js +188 -196
  86. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  87. package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
  88. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +153 -147
  89. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  90. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  91. package/dist/views/Request/RequestSubpageHeader.vue2.js +24 -28
  92. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
  93. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  94. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +5 -5
  95. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  96. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  97. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -25
  98. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  99. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +41 -30
  100. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  101. package/dist/views/Request/components/WorkspaceDropdown.vue.js +50 -58
  102. package/dist/views/Request/libs/oauth2.d.ts +6 -2
  103. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  104. package/dist/views/Request/libs/oauth2.js +43 -37
  105. package/package.json +18 -14
  106. package/dist/libs/send-request.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA0gBA,wBAMG"}
1
+ {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AAwgBA,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, computed as D, onMounted as M, onBeforeUnmount as R, openBlock as n, createBlock as O, withCtx as a, createVNode as s, unref as l, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as x, normalizeClass as $, createTextVNode as k, toDisplayString as j, withDirectives as E, vShow as N } from "vue";
1
+ import { defineComponent as B, computed as D, onMounted as M, onBeforeUnmount as R, openBlock as n, createBlock as O, withCtx as a, createVNode as s, unref as l, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as x, normalizeClass as $, createTextVNode as v, toDisplayString as j, withDirectives as E, vShow as N } from "vue";
2
2
  import F from "../../components/Sidebar/SidebarButton.vue.js";
3
3
  import K from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import A from "../../components/Sidebar/SidebarListElement.vue.js";
@@ -12,10 +12,10 @@ import q from "./CookieRaw.vue.js";
12
12
  import { useWorkspace as G } from "../../store/store.js";
13
13
  import J from "../../components/Sidebar/Sidebar.vue.js";
14
14
  import { useSidebar as Q } from "../../hooks/useSidebar.js";
15
- const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, ee = ["onClick"], te = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, xe = /* @__PURE__ */ B({
15
+ const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, ee = ["onClick"], te = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, xe = /* @__PURE__ */ B({
16
16
  __name: "Cookies",
17
17
  setup(oe) {
18
- const { cookies: p, cookieMutators: v, events: g } = G(), { collapsedSidebarFolders: i, toggleSidebarFolder: y } = Q(), b = T(), L = U(), C = () => {
18
+ const { cookies: p, cookieMutators: k, events: g } = G(), { collapsedSidebarFolders: i, toggleSidebarFolder: y } = Q(), b = T(), L = U(), C = () => {
19
19
  const t = Object.keys(p).length, e = P.parse({
20
20
  name: `Cookie ${t}`,
21
21
  value: "",
@@ -25,9 +25,9 @@ const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border b
25
25
  httpOnly: !1,
26
26
  sameSite: "None"
27
27
  });
28
- v.add(e), b.push(e.uid);
28
+ k.add(e), b.push(e.uid);
29
29
  }, V = (t) => {
30
- v.delete(t);
30
+ k.delete(t);
31
31
  const e = Object.values(p).filter(
32
32
  (o) => o.uid !== t
33
33
  );
@@ -70,38 +70,36 @@ const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border b
70
70
  "rotate-90": l(i)[r]
71
71
  }]),
72
72
  icon: "ChevronRight",
73
- size: "sm",
74
- thickness: "2.5"
73
+ size: "md"
75
74
  }, null, 8, ["class"]),
76
- k(" " + j(r), 1)
75
+ v(" " + j(r), 1)
77
76
  ], 8, Y),
78
77
  E(f("div", Z, [
79
- (n(!0), m(_, null, x(o, (d, c) => (n(), m("div", { key: c }, [
78
+ (n(!0), m(_, null, x(o, (d, u) => (n(), m("div", { key: u }, [
80
79
  f("button", {
81
80
  class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
82
81
  type: "button",
83
- onClick: (u) => l(y)(r + c)
82
+ onClick: (c) => l(y)(r + u)
84
83
  }, [
85
84
  s(l(z), {
86
85
  class: $(["text-c-3", {
87
- "rotate-90": l(i)[r + c]
86
+ "rotate-90": l(i)[r + u]
88
87
  }]),
89
88
  icon: "ChevronRight",
90
- size: "sm",
91
- thickness: "2.5"
89
+ size: "md"
92
90
  }, null, 8, ["class"]),
93
- k(" " + j(c), 1)
91
+ v(" " + j(u), 1)
94
92
  ], 8, ee),
95
93
  E(f("div", te, [
96
- (n(!0), m(_, null, x(d, (u) => (n(), O(A, {
97
- key: u.uid,
94
+ (n(!0), m(_, null, x(d, (c) => (n(), O(A, {
95
+ key: c.uid,
98
96
  class: "cookie text-xs",
99
- variable: { name: u.name, uid: u.uid },
97
+ variable: { name: c.name, uid: c.uid },
100
98
  warningMessage: "Are you sure you want to delete this cookie?",
101
- onDelete: (re) => V(u.uid)
99
+ onDelete: (re) => V(c.uid)
102
100
  }, null, 8, ["variable", "onDelete"]))), 128))
103
101
  ], 512), [
104
- [N, w(r + c)]
102
+ [N, w(r + u)]
105
103
  ])
106
104
  ]))), 128))
107
105
  ], 512), [
@@ -119,7 +117,7 @@ const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border b
119
117
  hotkey: "N"
120
118
  }, {
121
119
  title: a(() => e[0] || (e[0] = [
122
- k("Add Cookie")
120
+ v("Add Cookie")
123
121
  ])),
124
122
  _: 1
125
123
  })
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAKlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;IAC3D,kBAAkB,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;IAC7D,MAAM,EAAE,MAAM,CAAA;IAEd,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCAkEiC,IAAI,GAAG,MAAM;;;;;;;AAiNhD,wBASG"}
1
+ {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAgLA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAKlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;IAC3D,kBAAkB,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;IAC7D,MAAM,EAAE,MAAM,CAAA;IAEd,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCAkEiC,IAAI,GAAG,MAAM;;;;;;;AAqOhD,wBAQG"}
@@ -1,9 +1,9 @@
1
- import { defineComponent as I, ref as d, computed as N, onMounted as P, openBlock as a, createBlock as w, unref as p, normalizeStyle as h, withCtx as y, createElementBlock as f, Fragment as R, renderList as j, normalizeClass as q, createElementVNode as v, createTextVNode as k, toDisplayString as b, createVNode as z } from "vue";
2
- import { ScalarDropdown as F, ScalarButton as K, ScalarIcon as T } from "@scalar/components";
1
+ import { defineComponent as N, ref as d, computed as v, onMounted as I, openBlock as s, createBlock as m, Teleport as P, createElementVNode as a, normalizeStyle as h, createElementBlock as p, Fragment as R, renderList as T, normalizeClass as j, createTextVNode as w, toDisplayString as y, unref as b, withCtx as q, createVNode as D, createCommentVNode as F } from "vue";
2
+ import { ScalarButton as K, ScalarIcon as O } from "@scalar/components";
3
3
  import { onClickOutside as L } from "@vueuse/core";
4
4
  import M from "fuse.js";
5
5
  import { parseEnvVariables as x } from "../../libs/environment-parser.js";
6
- const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, oe = /* @__PURE__ */ I({
6
+ const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, oe = /* @__PURE__ */ N({
7
7
  __name: "EnvironmentVariableDropdown",
8
8
  props: {
9
9
  query: {},
@@ -13,95 +13,99 @@ const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 w
13
13
  dropdownPosition: {}
14
14
  },
15
15
  emits: ["select"],
16
- setup(g, { expose: E, emit: V }) {
17
- const s = g, _ = V, c = d(!0), u = d(null), r = d(0), C = () => {
18
- const e = A.value.params.workspace;
19
- S({
16
+ setup(k, { expose: g, emit: V }) {
17
+ const r = k, E = V, c = d(!0), u = d(null), n = d(0), _ = () => {
18
+ const e = S.value.params.workspace;
19
+ C({
20
20
  name: "environment.default",
21
21
  params: {
22
22
  workspace: e
23
23
  }
24
24
  }), c.value = !1;
25
- }, { push: S, currentRoute: A } = s.router, B = new M(x(s.activeEnvVariables.value), {
25
+ }, { push: C, currentRoute: S } = r.router, z = new M(x(r.activeEnvVariables.value), {
26
26
  keys: ["key", "value"]
27
- }), l = N(() => {
28
- const e = s.query;
27
+ }), i = v(() => {
28
+ const e = r.query;
29
29
  if (!e)
30
- return x(s.activeEnvVariables.value).slice(-4).filter(({ key: t, value: n }) => t !== "" || n !== "");
31
- const o = B.search(e);
32
- return o.length > 0 ? o.map((t) => t.item).filter(({ key: t, value: n }) => t !== "" || n !== "") : [];
33
- }), m = (e) => {
34
- _("select", e);
35
- }, O = (e) => e.value ? e.value.color : "#8E8E8E";
36
- return E({
30
+ return x(r.activeEnvVariables.value).slice(-4).filter(({ key: t, value: l }) => t !== "" || l !== "");
31
+ const o = z.search(e, { limit: 10 });
32
+ return o.length > 0 ? o.map((t) => t.item).filter(({ key: t, value: l }) => t !== "" || l !== "") : [];
33
+ }), f = (e) => {
34
+ E("select", e);
35
+ }, A = (e) => e.value ? e.value.color : "#8E8E8E";
36
+ g({
37
37
  handleArrowKey: (e) => {
38
- const o = e === "up" ? -1 : 1, t = l.value.length;
39
- t !== 0 && (r.value = (r.value + o + t) % t);
38
+ const o = e === "up" ? -1 : 1, t = i.value.length;
39
+ t !== 0 && (n.value = (n.value + o + t) % t);
40
40
  },
41
41
  handleSelect: () => {
42
- if (r.value >= 0) {
43
- const e = l.value[r.value];
44
- e && m(e.key);
42
+ if (n.value >= 0) {
43
+ const e = i.value[n.value];
44
+ e && f(e.key);
45
45
  }
46
46
  }
47
- }), P(() => {
48
- r.value = 0;
49
- }), L(
47
+ }), I(() => {
48
+ n.value = 0;
49
+ });
50
+ const B = v(() => {
51
+ var e, o;
52
+ return {
53
+ left: (((e = r.dropdownPosition) == null ? void 0 : e.left) ?? 0) + "px",
54
+ // Add a 5px offset from the editor
55
+ top: (((o = r.dropdownPosition) == null ? void 0 : o.top) ?? 0) + 5 + "px"
56
+ };
57
+ });
58
+ return L(
50
59
  u,
51
60
  () => {
52
61
  c.value = !1;
53
62
  },
54
63
  { ignore: [u] }
55
- ), (e, o) => {
56
- var t, n;
57
- return a(), w(p(F), {
64
+ ), (e, o) => c.value ? (s(), m(P, {
65
+ key: 0,
66
+ to: ".scalar-client"
67
+ }, [
68
+ a("div", {
58
69
  ref_key: "dropdownRef",
59
70
  ref: u,
60
- static: "",
61
- staticOpen: c.value,
62
- style: h({
63
- left: ((t = e.dropdownPosition) == null ? void 0 : t.left) + "px",
64
- top: ((n = e.dropdownPosition) == null ? void 0 : n.top) + "px"
65
- }),
66
- teleport: ".scalar-client"
67
- }, {
68
- items: y(() => [
69
- l.value.length ? (a(), f("ul", Q, [
70
- (a(!0), f(R, null, j(l.value, (i, D) => (a(), f("li", {
71
- key: i.key,
72
- class: q(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": D === r.value }]),
73
- onClick: (W) => m(i.key)
74
- }, [
75
- v("div", G, [
76
- v("span", {
77
- class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
78
- style: h({
79
- backgroundColor: O(e.activeEnvironment)
80
- })
81
- }, null, 4),
82
- k(" " + b(i.key), 1)
83
- ]),
84
- v("span", H, b(i.value), 1)
85
- ], 10, $))), 128))
86
- ])) : (a(), w(p(K), {
87
- key: 1,
88
- class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
89
- variant: "secondary",
90
- onClick: C
91
- }, {
92
- default: y(() => [
93
- z(p(T), {
94
- class: "w-2.5",
95
- icon: "Add"
96
- }),
97
- o[0] || (o[0] = k(" Add Variable "))
71
+ class: "fixed left-0 top-0 flex flex-col p-0.75 max-h-[60svh] w-56 rounded border custom-scroll",
72
+ style: h(B.value)
73
+ }, [
74
+ i.value.length ? (s(), p("ul", Q, [
75
+ (s(!0), p(R, null, T(i.value, (t, l) => (s(), p("li", {
76
+ key: t.key,
77
+ class: j(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": l === n.value }]),
78
+ onClick: (W) => f(t.key)
79
+ }, [
80
+ a("div", G, [
81
+ a("span", {
82
+ class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
83
+ style: h({
84
+ backgroundColor: A(e.activeEnvironment)
85
+ })
86
+ }, null, 4),
87
+ w(" " + y(t.key), 1)
98
88
  ]),
99
- _: 1
100
- }))
101
- ]),
102
- _: 1
103
- }, 8, ["staticOpen", "style"]);
104
- };
89
+ a("span", H, y(t.value), 1)
90
+ ], 10, $))), 128))
91
+ ])) : (s(), m(b(K), {
92
+ key: 1,
93
+ class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
94
+ variant: "secondary",
95
+ onClick: _
96
+ }, {
97
+ default: q(() => [
98
+ D(b(O), {
99
+ icon: "Add",
100
+ size: "sm"
101
+ }),
102
+ o[0] || (o[0] = w(" Add Variable "))
103
+ ]),
104
+ _: 1
105
+ })),
106
+ o[1] || (o[1] = a("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1))
107
+ ], 4)
108
+ ])) : F("", !0);
105
109
  }
106
110
  });
107
111
  export {
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-76d1e7a7"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5f5d9e27"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -3,48 +3,48 @@ import te from "../../components/ImportCurl/ImportCurlModal.vue.js";
3
3
  import oe from "../../components/ViewLayout/ViewLayout.vue.js";
4
4
  import re from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
5
  import { importCurlCommand as se } from "../../libs/importers/curl.js";
6
- import { createRequestOperation as ue } from "../../libs/send-request.js";
7
- import { useActiveEntities as ae } from "../../store/active-entities.js";
8
- import le from "./RequestSection/RequestSection.vue.js";
9
- import ne from "./RequestSubpageHeader.vue.js";
10
- import ie from "./ResponseSection/ResponseSection.vue.js";
11
- import { useOpenApiWatcher as me } from "./hooks/useOpenApiWatcher.js";
12
- import { safeJSON as ce } from "@scalar/object-utils/parse";
13
- import { useBreakpoints as de } from "@scalar/use-hooks/useBreakpoints";
14
- import { useToasts as ve } from "@scalar/use-toasts";
15
- import { useRouter as pe } from "vue-router";
16
- import fe from "./RequestSidebar.vue.js";
6
+ import { useActiveEntities as ue } from "../../store/active-entities.js";
7
+ import ae from "./RequestSection/RequestSection.vue.js";
8
+ import le from "./RequestSubpageHeader.vue.js";
9
+ import ne from "./ResponseSection/ResponseSection.vue.js";
10
+ import { useOpenApiWatcher as ie } from "./hooks/useOpenApiWatcher.js";
11
+ import { safeJSON as me } from "@scalar/object-utils/parse";
12
+ import { useBreakpoints as ce } from "@scalar/use-hooks/useBreakpoints";
13
+ import { useToasts as de } from "@scalar/use-toasts";
14
+ import { useRouter as ve } from "vue-router";
15
+ import pe from "./RequestSidebar.vue.js";
16
+ import { createRequestOperation as fe } from "../../libs/send-request/send-request.js";
17
17
  import { ERRORS as Se } from "../../libs/errors.js";
18
18
  import { useWorkspace as ye } from "../../store/store.js";
19
19
  const He = /* @__PURE__ */ K({
20
20
  __name: "Request",
21
21
  emits: ["newTab"],
22
22
  setup(Re) {
23
- const T = ye(), { toast: w } = ve(), {
23
+ const T = ye(), { toast: w } = de(), {
24
24
  activeCollection: x,
25
25
  activeExample: v,
26
26
  activeEnvironment: M,
27
27
  activeRequest: q,
28
28
  activeWorkspace: a,
29
29
  activeServer: A
30
- } = ae(), {
30
+ } = ue(), {
31
31
  cookies: H,
32
32
  isReadOnly: l,
33
33
  modalState: n,
34
- requestHistory: k,
34
+ requestHistory: U,
35
35
  securitySchemes: L,
36
36
  requestMutators: $,
37
37
  serverMutators: W,
38
38
  servers: j,
39
39
  events: p
40
- } = T, u = R(!l), E = R(), e = R(), h = R(""), z = pe(), D = B(
41
- () => k.findLast((o) => {
40
+ } = T, u = R(!l), k = R(), e = R(), h = R(""), z = ve(), D = B(
41
+ () => U.findLast((o) => {
42
42
  var t;
43
43
  return o.request.uid === ((t = v.value) == null ? void 0 : t.uid);
44
44
  })
45
- ), { mediaQueries: F } = de();
45
+ ), { mediaQueries: F } = ce();
46
46
  P(F.md, (o) => u.value = o);
47
- const U = B(
47
+ const E = B(
48
48
  () => {
49
49
  var o, t;
50
50
  return (l ? (o = x.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = q.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
@@ -53,13 +53,13 @@ const He = /* @__PURE__ */ K({
53
53
  var S;
54
54
  if (!q.value || !v.value || !x.value)
55
55
  return;
56
- const o = ce.parse(((S = M.value) == null ? void 0 : S.value) || "{}");
56
+ const o = me.parse(((S = M.value) == null ? void 0 : S.value) || "{}");
57
57
  o.error && console.error("INVALID ENVIRONMENT!");
58
- const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = a.value.cookies.map((y) => H[y]), [i, m] = ue({
58
+ const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = a.value.cookies.map((y) => H[y]), [i, m] = fe({
59
59
  request: q.value,
60
60
  example: v.value,
61
- selectedSecuritySchemeUids: U.value,
62
- proxy: a.value.proxyUrl ?? "",
61
+ selectedSecuritySchemeUids: E.value,
62
+ proxyUrl: a.value.proxyUrl ?? "",
63
63
  environment: t,
64
64
  globalCookies: r,
65
65
  status: p.requestStatus,
@@ -70,16 +70,16 @@ const He = /* @__PURE__ */ K({
70
70
  w(i.message, "error");
71
71
  return;
72
72
  }
73
- E.value = m.controller;
73
+ k.value = m.controller;
74
74
  const [c, f] = await m.sendRequest();
75
- c ? w(c.message, "error") : k.push(f);
75
+ c ? w(c.message, "error") : U.push(f);
76
76
  }, Q = async () => {
77
77
  var o;
78
- return (o = E.value) == null ? void 0 : o.abort(Se.REQUEST_ABORTED);
78
+ return (o = k.value) == null ? void 0 : o.abort(Se.REQUEST_ABORTED);
79
79
  };
80
80
  X(() => {
81
81
  p.executeRequest.on(C), p.cancelRequest.on(Q);
82
- }), me(), Y(() => p.executeRequest.off(C));
82
+ }), ie(), Y(() => p.executeRequest.off(C));
83
83
  function J({ requestName: o }) {
84
84
  var r, i, m, c;
85
85
  if (!e.value) return;
@@ -119,7 +119,7 @@ const He = /* @__PURE__ */ K({
119
119
  "!mr-0 !mb-0 !border-0": s(l)
120
120
  }])
121
121
  }, [
122
- d(ne, {
122
+ d(le, {
123
123
  modelValue: u.value,
124
124
  "onUpdate:modelValue": t[0] || (t[0] = (r) => u.value = r),
125
125
  isReadonly: s(l),
@@ -128,7 +128,7 @@ const He = /* @__PURE__ */ K({
128
128
  }, null, 8, ["modelValue", "isReadonly"]),
129
129
  d(oe, null, {
130
130
  default: O(() => [
131
- d(fe, {
131
+ d(pe, {
132
132
  isReadonly: s(l),
133
133
  showSidebar: u.value,
134
134
  onNewTab: t[2] || (t[2] = (r) => o.$emit("newTab", r)),
@@ -141,8 +141,8 @@ const He = /* @__PURE__ */ K({
141
141
  default: O(() => {
142
142
  var r;
143
143
  return [
144
- d(le, { selectedSecuritySchemeUids: U.value }, null, 8, ["selectedSecuritySchemeUids"]),
145
- d(ie, {
144
+ d(ae, { selectedSecuritySchemeUids: E.value }, null, 8, ["selectedSecuritySchemeUids"]),
145
+ d(ne, {
146
146
  response: (r = D.value) == null ? void 0 : r.response
147
147
  }, null, 8, ["response"])
148
148
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAwOA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,oBAAoB,EAE1B,MAAM,iCAAiC,CAAA;AAOxC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,UAAU,CAAA;CACjB,CAAC;;AAudF,wBAMG"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAyOA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,oBAAoB,EAE1B,MAAM,iCAAiC,CAAA;AAOxC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,UAAU,CAAA;CACjB,CAAC;;AAwdF,wBAMG"}
@@ -1,27 +1,28 @@
1
- import { defineComponent as C, openBlock as i, createElementBlock as k, Fragment as y, createVNode as d, unref as a, withCtx as o, createTextVNode as s, createElementVNode as V, createBlock as m, createCommentVNode as f } from "vue";
2
- import { useActiveEntities as T } from "../../../../store/active-entities.js";
1
+ import { defineComponent as T, openBlock as i, createElementBlock as k, Fragment as y, createVNode as d, unref as a, withCtx as o, createTextVNode as s, createElementVNode as V, createBlock as m, createCommentVNode as f } from "vue";
2
+ import { useActiveEntities as P } from "../../../../store/active-entities.js";
3
3
  import n from "../RequestAuthDataTableInput.vue.js";
4
- import { useLoadingState as P, ScalarButton as U } from "@scalar/components";
5
- import { pkceOptions as A } from "@scalar/oas-utils/entities/spec";
6
- import { useToasts as B } from "@scalar/use-toasts";
7
- import F from "./OAuthScopesInput.vue.js";
4
+ import { useLoadingState as A, ScalarButton as U } from "@scalar/components";
5
+ import { pkceOptions as B } from "@scalar/oas-utils/entities/spec";
6
+ import { useToasts as F } from "@scalar/use-toasts";
7
+ import O from "./OAuthScopesInput.vue.js";
8
8
  import u from "../../../../components/DataTable/DataTableRow.vue.js";
9
- import { authorizeOauth2 as O } from "../../libs/oauth2.js";
10
- import { useWorkspace as E } from "../../../../store/store.js";
11
- const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8 flex items-center justify-self-end" }, X = /* @__PURE__ */ C({
9
+ import { authorizeOauth2 as E } from "../../libs/oauth2.js";
10
+ import { useWorkspace as I } from "../../../../store/store.js";
11
+ const R = { class: "h-8 flex items-center justify-self-end" }, b = { class: "h-8 flex items-center justify-self-end" }, Y = /* @__PURE__ */ T({
12
12
  __name: "OAuth2",
13
13
  props: {
14
14
  scheme: {},
15
15
  flow: {}
16
16
  },
17
17
  setup(w) {
18
- const p = P(), { toast: $ } = B(), { activeCollection: g, activeServer: S } = T(), { isReadOnly: v, securitySchemeMutators: z } = E(), r = (l, e) => z.edit(w.scheme.uid, l, e), h = async () => {
18
+ const p = A(), { toast: $ } = F(), { activeCollection: g, activeServer: v, activeWorkspace: S } = P(), { isReadOnly: z, securitySchemeMutators: h } = I(), r = (l, e) => h.edit(w.scheme.uid, l, e), C = async () => {
19
19
  var t;
20
20
  if (p.isLoading || !((t = g.value) != null && t.uid)) return;
21
21
  p.startLoading();
22
- const [l, e] = await O(
22
+ const [l, e] = await E(
23
23
  w.flow,
24
- S.value
24
+ v.value,
25
+ S.value.proxyUrl
25
26
  ).finally(() => p.stopLoading());
26
27
  e ? r(`flows.${w.flow.type}.token`, e) : (console.error(l), $((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
27
28
  };
@@ -46,7 +47,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
46
47
  }),
47
48
  d(a(u), { class: "min-w-full" }, {
48
49
  default: o(() => [
49
- V("div", I, [
50
+ V("div", R, [
50
51
  d(a(U), {
51
52
  class: "p-0 py-0.5 px-2 mr-1",
52
53
  loading: a(p),
@@ -64,7 +65,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
64
65
  _: 1
65
66
  })
66
67
  ], 64)) : (i(), k(y, { key: 1 }, [
67
- a(v) ? f("", !0) : (i(), m(a(u), { key: 0 }, {
68
+ a(z) ? f("", !0) : (i(), m(a(u), { key: 0 }, {
68
69
  default: o(() => [
69
70
  "authorizationUrl" in l.flow ? (i(), m(n, {
70
71
  key: 0,
@@ -182,7 +183,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
182
183
  default: o(() => [
183
184
  d(n, {
184
185
  id: `oauth2-use-pkce-${l.scheme.uid}`,
185
- enum: a(A),
186
+ enum: a(B),
186
187
  modelValue: l.flow["x-usePkce"],
187
188
  readOnly: "",
188
189
  "onUpdate:modelValue": e[9] || (e[9] = (t) => r(
@@ -200,7 +201,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
200
201
  })) : f("", !0),
201
202
  Object.keys(l.flow.scopes ?? {}).length ? (i(), m(a(u), { key: 5 }, {
202
203
  default: o(() => [
203
- d(F, {
204
+ d(O, {
204
205
  flow: l.flow,
205
206
  updateScheme: r
206
207
  }, null, 8, ["flow"])
@@ -209,13 +210,13 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
209
210
  })) : f("", !0),
210
211
  d(a(u), { class: "min-w-full" }, {
211
212
  default: o(() => [
212
- V("div", R, [
213
+ V("div", b, [
213
214
  d(a(U), {
214
215
  class: "p-0 py-0.5 px-2 mr-1",
215
216
  loading: a(p),
216
217
  size: "sm",
217
218
  variant: "outlined",
218
- onClick: h
219
+ onClick: C
219
220
  }, {
220
221
  default: o(() => e[20] || (e[20] = [
221
222
  s(" Authorize ")
@@ -230,5 +231,5 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
230
231
  }
231
232
  });
232
233
  export {
233
- X as default
234
+ Y as default
234
235
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AA8YA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAkgBF,wBAOG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AA8YA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAggBF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuth.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fb32077d"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-77ffb391"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -177,9 +177,9 @@ const ae = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
177
177
  t[2] || (t[2] = a("div", { class: "fade-right" }, null, -1))
178
178
  ])) : (m(), p("div", fe, " None ")),
179
179
  c(i(B), {
180
- class: "min-w-3 ml-auto mr-2.5",
180
+ class: "mr-[9px]",
181
181
  icon: "ChevronDown",
182
- size: "xs"
182
+ size: "md"
183
183
  })
184
184
  ]),
185
185
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAyhBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAuzBF,wBAOG"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AA6kBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AA+3BF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-68fbfb14"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9187b053"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };