@scalar/api-client 2.0.24 → 2.0.26

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 (168) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +79 -83
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +38 -38
  7. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  8. package/dist/components/CodeInput/CodeInput.vue.d.ts +10 -0
  9. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  10. package/dist/components/CodeInput/CodeInput.vue.js +2 -1
  11. package/dist/components/CodeInput/CodeInput.vue2.js +43 -38
  12. package/dist/components/CodeInput/codeDropdownWidget.d.ts +24 -0
  13. package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +1 -0
  14. package/dist/components/CodeInput/codeDropdownWidget.js +110 -0
  15. package/dist/components/CodeInput/codeVariableWidget.d.ts +8 -0
  16. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -0
  17. package/dist/components/CodeInput/codeVariableWidget.js +124 -0
  18. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -15
  19. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +51 -54
  21. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +4 -2
  22. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  23. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +106 -92
  24. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts +2 -15
  25. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
  26. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +68 -74
  27. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -15
  28. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  29. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -62
  30. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -15
  31. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  32. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +106 -99
  33. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +7 -0
  34. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -0
  35. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +57 -0
  36. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +4 -0
  37. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +50 -0
  38. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -0
  39. package/dist/components/CommandPalette/TheCommandPalette.vue.js +9 -0
  40. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +198 -0
  41. package/dist/components/CommandPalette/index.d.ts +2 -0
  42. package/dist/components/CommandPalette/index.d.ts.map +1 -0
  43. package/dist/components/CommandPalette/index.js +4 -0
  44. package/dist/components/ContextBar.vue.js +4 -4
  45. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  46. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  47. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  48. package/dist/components/DataTable/DataTableInput.vue2.js +36 -49
  49. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  50. package/dist/components/SideNav/SideNav.vue.js +26 -23
  51. package/dist/components/SideNav/SideNavLink.vue.d.ts +3 -2
  52. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  53. package/dist/components/SideNav/SideNavLink.vue.js +5 -5
  54. package/dist/components/Sidebar/Sidebar.vue.d.ts +15 -2
  55. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  56. package/dist/components/Sidebar/Sidebar.vue.js +14 -12
  57. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  58. package/dist/components/Sidebar/SidebarButton.vue.js +5 -5
  59. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  60. package/dist/components/TopNav/TopNav.vue.js +2 -2
  61. package/dist/components/TopNav/TopNav.vue2.js +31 -28
  62. package/dist/components/TopNav/TopNavItem.vue.d.ts +7 -3
  63. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  64. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  65. package/dist/components/TopNav/TopNavItem.vue2.js +16 -15
  66. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  67. package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
  68. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  69. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +2 -1
  70. package/dist/constants.d.ts +13 -7
  71. package/dist/constants.d.ts.map +1 -1
  72. package/dist/constants.js +4 -4
  73. package/dist/index.d.ts +3 -4
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +14 -16
  76. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -0
  77. package/dist/layouts/App/ApiClientApp.vue.js +72 -0
  78. package/dist/{App → layouts/App}/createApiClientApp.d.ts +1 -1
  79. package/dist/layouts/App/createApiClientApp.d.ts.map +1 -0
  80. package/dist/{App → layouts/App}/createApiClientApp.js +2 -2
  81. package/dist/layouts/App/index.d.ts.map +1 -0
  82. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.d.ts +1 -0
  83. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -0
  84. package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.js +2 -2
  85. package/dist/{Modal → layouts/Modal}/api-client-modal.d.ts +1 -1
  86. package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -0
  87. package/dist/{Modal → layouts/Modal}/api-client-modal.js +42 -42
  88. package/dist/layouts/Modal/index.d.ts.map +1 -0
  89. package/dist/libs/eventBusses/command-palette.d.ts +14 -0
  90. package/dist/libs/eventBusses/command-palette.d.ts.map +1 -0
  91. package/dist/libs/eventBusses/command-palette.js +5 -0
  92. package/dist/libs/local-storage.d.ts +1 -1
  93. package/dist/libs/local-storage.d.ts.map +1 -1
  94. package/dist/libs/local-storage.js +19 -19
  95. package/dist/router.d.ts +5 -10
  96. package/dist/router.d.ts.map +1 -1
  97. package/dist/router.js +23 -19
  98. package/dist/store/topNav.d.ts +94 -82
  99. package/dist/store/topNav.d.ts.map +1 -1
  100. package/dist/store/topNav.js +21 -20
  101. package/dist/store/workspace.d.ts +348 -94
  102. package/dist/store/workspace.d.ts.map +1 -1
  103. package/dist/store/workspace.js +314 -221
  104. package/dist/style.css +1 -1
  105. package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
  106. package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +1 -1
  107. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  108. package/dist/views/Cookies/Cookies.vue2.js +27 -30
  109. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  110. package/dist/views/Environment/Environment.vue2.js +22 -25
  111. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  112. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -47
  113. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  114. package/dist/views/Request/Request.vue.js +1 -1
  115. package/dist/views/Request/Request.vue2.js +130 -109
  116. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  117. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  118. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  119. package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -4
  120. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  121. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  122. package/dist/views/Request/RequestSection/RequestTable.vue2.js +19 -19
  123. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  124. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +6 -5
  125. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  127. package/dist/views/Request/RequestSidebarItem.vue2.js +78 -81
  128. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  129. package/dist/views/Request/RequestSidebarItemMenu.vue.js +60 -42
  130. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  131. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +6 -5
  132. package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
  133. package/dist/views/Request/components/OAuth2.vue.js +2 -0
  134. package/dist/{App.vue.d.ts → views/Request/components/WorkspaceDropdown.vue.d.ts} +1 -2
  135. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -0
  136. package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -0
  137. package/dist/views/Request/components/WorkspaceDropdown.vue2.js +4 -0
  138. package/dist/views/Request/components/index.d.ts +1 -0
  139. package/dist/views/Request/components/index.d.ts.map +1 -1
  140. package/dist/views/Request/components/index.js +4 -2
  141. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  142. package/dist/views/Servers/Servers.vue2.js +12 -15
  143. package/package.json +22 -18
  144. package/dist/App/ApiClientApp.vue.d.ts.map +0 -1
  145. package/dist/App/ApiClientApp.vue.js +0 -56
  146. package/dist/App/createApiClientApp.d.ts.map +0 -1
  147. package/dist/App/index.d.ts.map +0 -1
  148. package/dist/App.vue.d.ts.map +0 -1
  149. package/dist/App.vue.js +0 -77
  150. package/dist/App.vue3.js +0 -5
  151. package/dist/Modal/ApiClientModal.vue.d.ts.map +0 -1
  152. package/dist/Modal/api-client-modal.d.ts.map +0 -1
  153. package/dist/Modal/index.d.ts.map +0 -1
  154. package/dist/components/AddressBar/AddressBarServer.vue.js +0 -113
  155. package/dist/components/AddressBar/AddressBarServer.vue2.js +0 -4
  156. package/dist/components/CommandPalette/CommandPalette.vue.d.ts +0 -17
  157. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +0 -1
  158. package/dist/components/CommandPalette/CommandPalette.vue.js +0 -7
  159. package/dist/components/CommandPalette/CommandPalette.vue2.js +0 -185
  160. package/dist/main.d.ts +0 -2
  161. package/dist/main.d.ts.map +0 -1
  162. /package/dist/{App → layouts/App}/ApiClientApp.vue.d.ts +0 -0
  163. /package/dist/{App → layouts/App}/ApiClientApp.vue3.js +0 -0
  164. /package/dist/{App → layouts/App}/index.d.ts +0 -0
  165. /package/dist/{App → layouts/App}/index.js +0 -0
  166. /package/dist/{Modal → layouts/Modal}/ApiClientModal.vue2.js +0 -0
  167. /package/dist/{Modal → layouts/Modal}/index.d.ts +0 -0
  168. /package/dist/{Modal → layouts/Modal}/index.js +0 -0
@@ -1,44 +1,41 @@
1
- import { defineComponent as f, openBlock as i, createBlock as a, withCtx as e, createVNode as t, unref as n, createTextVNode as m, createElementVNode as d, createElementBlock as p, Fragment as _, renderList as k } from "vue";
1
+ import { defineComponent as u, openBlock as i, createBlock as a, withCtx as e, createVNode as t, unref as m, createElementVNode as f, createElementBlock as d, Fragment as p, renderList as _, createTextVNode as k } from "vue";
2
2
  import x from "../../components/Sidebar/SidebarButton.vue.js";
3
- import h from "../../components/Sidebar/SidebarList.vue.js";
4
- import C from "../../components/Sidebar/SidebarListElement.vue.js";
3
+ import C from "../../components/Sidebar/SidebarList.vue.js";
4
+ import h from "../../components/Sidebar/SidebarListElement.vue.js";
5
5
  import b from "../../components/ViewLayout/ViewLayout.vue.js";
6
- import v from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
- import { useWorkspace as w } from "../../store/workspace.js";
8
- import { createCookie as L } from "@scalar/oas-utils/entities/workspace/cookie";
9
- import { nanoid as V } from "nanoid";
10
- import { useRouter as y } from "vue-router";
11
- import N from "./CookieForm.vue.js";
12
- import $ from "./CookieRaw.vue.js";
6
+ import L from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
+ import { useWorkspace as V } from "../../store/workspace.js";
8
+ import { createCookie as v } from "@scalar/oas-utils/entities/workspace/cookie";
9
+ import { nanoid as y } from "nanoid";
10
+ import { useRouter as N } from "vue-router";
11
+ import $ from "./CookieForm.vue.js";
12
+ import w from "./CookieRaw.vue.js";
13
13
  import B from "../../components/Sidebar/Sidebar.vue.js";
14
14
  /* empty css */
15
- const E = { class: "flex-1" }, J = /* @__PURE__ */ f({
15
+ const E = { class: "flex-1" }, J = /* @__PURE__ */ u({
16
16
  __name: "Cookies",
17
17
  setup(S) {
18
- const { cookies: l, cookieMutators: s } = w(), c = y(), u = () => {
19
- const o = L({
20
- uid: V(),
21
- name: "new cookie",
22
- value: "new value",
23
- domain: "localhost",
18
+ const { cookies: n, cookieMutators: s } = V(), l = N(), c = () => {
19
+ const o = v({
20
+ uid: y(),
21
+ name: "Cookie",
22
+ value: "",
23
+ domain: "",
24
24
  path: "/",
25
25
  secure: !1,
26
26
  httpOnly: !1,
27
27
  sameSite: "None"
28
28
  });
29
- s.add(o), c.push(o.uid);
29
+ s.add(o), l.push(o.uid);
30
30
  };
31
31
  return (o, g) => (i(), a(b, null, {
32
32
  default: e(() => [
33
- t(n(B), null, {
34
- title: e(() => [
35
- m("Domain")
36
- ]),
33
+ t(m(B), { title: "Domain" }, {
37
34
  content: e(() => [
38
- d("div", E, [
39
- t(h, null, {
35
+ f("div", E, [
36
+ t(C, null, {
40
37
  default: e(() => [
41
- (i(!0), p(_, null, k(n(l), (r) => (i(), a(C, {
38
+ (i(!0), d(p, null, _(m(n), (r) => (i(), a(h, {
42
39
  key: r.uid,
43
40
  class: "text-xs",
44
41
  variable: { name: r.name, uid: r.uid }
@@ -49,19 +46,19 @@ const E = { class: "flex-1" }, J = /* @__PURE__ */ f({
49
46
  ])
50
47
  ]),
51
48
  button: e(() => [
52
- t(x, { click: u }, {
49
+ t(x, { click: c }, {
53
50
  title: e(() => [
54
- m("Add Item")
51
+ k("Add Item")
55
52
  ]),
56
53
  _: 1
57
54
  })
58
55
  ]),
59
56
  _: 1
60
57
  }),
61
- t(v, { class: "flex-1" }, {
58
+ t(L, { class: "flex-1" }, {
62
59
  default: e(() => [
63
- t(N),
64
- t($)
60
+ t($),
61
+ t(w)
65
62
  ]),
66
63
  _: 1
67
64
  })
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AA2fA,wBAKG"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AAsfA,wBAKG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, ref as c, onMounted as w, openBlock as a, createBlock as f, withCtx as o, createVNode as r, createTextVNode as _, createElementVNode as E, createElementBlock as v, Fragment as $, renderList as I, unref as u, createSlots as S, createCommentVNode as h, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
1
+ import { defineComponent as N, ref as c, onMounted as C, openBlock as a, createBlock as f, withCtx as o, createVNode as r, createElementVNode as _, createElementBlock as v, Fragment as w, renderList as $, unref as u, createTextVNode as I, createSlots as S, createCommentVNode as h, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
2
2
  import K from "../../components/CodeInput/CodeInput.vue.js";
3
3
  import A from "../../components/Sidebar/Sidebar.vue.js";
4
4
  /* empty css */
@@ -12,11 +12,11 @@ import { useWorkspace as W } from "../../store/workspace.js";
12
12
  import { nanoid as j } from "nanoid";
13
13
  import { useRouter as q } from "vue-router";
14
14
  import z from "./EnvironmentColors.vue.js";
15
- const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, ce = /* @__PURE__ */ C({
15
+ const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, ce = /* @__PURE__ */ N({
16
16
  __name: "Environment",
17
17
  setup(Q) {
18
18
  const d = q(), { environments: n, environmentMutators: m } = W(), e = c(null), p = c(null), s = c(!1);
19
- function k() {
19
+ function E() {
20
20
  const t = {
21
21
  name: "New Environment",
22
22
  uid: j(),
@@ -27,35 +27,32 @@ const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, c
27
27
  };
28
28
  m.add(t), e.value = t.uid, d.push(e.value);
29
29
  }
30
- function y(t) {
30
+ function k(t) {
31
31
  e.value && m.edit(e.value, "raw", t);
32
32
  }
33
- const x = (t) => {
33
+ const y = (t) => {
34
34
  m.delete(t), e.value === t && (e.value = null);
35
- }, V = (t) => {
35
+ }, x = (t) => {
36
36
  e.value && (n[e.value].color = t);
37
- }, b = () => {
37
+ }, V = () => {
38
38
  d.currentRoute.value.params.environment === "default" && (e.value = n.default.uid);
39
- }, g = () => {
39
+ }, b = () => {
40
40
  e.value && !n[e.value].isDefault && (s.value = !0, R(() => {
41
41
  var t;
42
42
  (t = p.value) == null || t.focus();
43
43
  }));
44
- }, D = (t) => {
44
+ }, g = (t) => {
45
45
  const l = t.target.value;
46
46
  e.value && !n[e.value].isDefault && (n[e.value].name = l);
47
47
  };
48
- return w(b), (t, i) => (a(), f(F, null, {
48
+ return C(V), (t, i) => (a(), f(F, null, {
49
49
  default: o(() => [
50
- r(A, null, {
51
- title: o(() => [
52
- _("Environment")
53
- ]),
50
+ r(A, { title: "Environment" }, {
54
51
  content: o(() => [
55
- E("div", G, [
52
+ _("div", G, [
56
53
  r(T, null, {
57
54
  default: o(() => [
58
- (a(!0), v($, null, I(u(n), (l) => (a(), f(U, {
55
+ (a(!0), v(w, null, $(u(n), (l) => (a(), f(U, {
59
56
  key: l.uid,
60
57
  class: "text-xs",
61
58
  variable: {
@@ -64,8 +61,8 @@ const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, c
64
61
  color: l.color,
65
62
  isDefault: l.isDefault
66
63
  },
67
- onClick: (N) => e.value = l.uid,
68
- onDelete: (N) => x(l.uid)
64
+ onClick: (D) => e.value = l.uid,
65
+ onDelete: (D) => y(l.uid)
69
66
  }, null, 8, ["variable", "onClick", "onDelete"]))), 128))
70
67
  ]),
71
68
  _: 1
@@ -73,9 +70,9 @@ const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, c
73
70
  ])
74
71
  ]),
75
72
  button: o(() => [
76
- r(M, { click: k }, {
73
+ r(M, { click: E }, {
77
74
  title: o(() => [
78
- _("Add Environment Variable")
75
+ I("Add Environment Variable")
79
76
  ]),
80
77
  _: 1
81
78
  })
@@ -91,7 +88,7 @@ const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, c
91
88
  class: "px-2 py-2.5",
92
89
  lineNumbers: "",
93
90
  modelValue: u(n)[e.value].raw,
94
- "onUpdate:modelValue": y
91
+ "onUpdate:modelValue": k
95
92
  }, null, 8, ["modelValue"])) : h("", !0)
96
93
  ]),
97
94
  _: 2
@@ -101,7 +98,7 @@ const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, c
101
98
  fn: o(() => [
102
99
  !s.value || u(n)[e.value].isDefault ? (a(), v("span", {
103
100
  key: 0,
104
- onDblclick: g
101
+ onDblclick: b
105
102
  }, L(u(n)[e.value].name), 33)) : (a(), v("input", {
106
103
  key: 1,
107
104
  ref_key: "nameInputRef",
@@ -111,13 +108,13 @@ const G = { class: "flex-1" }, H = ["value"], P = { class: "colors ml-auto" }, c
111
108
  type: "text",
112
109
  value: u(n)[e.value].name,
113
110
  onBlur: i[0] || (i[0] = (l) => s.value = !1),
114
- onInput: D,
111
+ onInput: g,
115
112
  onKeyup: i[1] || (i[1] = B((l) => s.value = !1, ["enter"]))
116
113
  }, null, 40, H)),
117
- E("div", P, [
114
+ _("div", P, [
118
115
  r(z, {
119
116
  activeColor: u(n)[e.value].color,
120
- onSelect: V
117
+ onSelect: x
121
118
  }, null, 8, ["activeColor"])
122
119
  ])
123
120
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":";WAsGS,MAAM;;;;WAAN,MAAM;;;;AAqMf,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":";WA6FS,MAAM;;;;WAAN,MAAM;;;;AAqLf,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,72 +1,63 @@
1
- import { defineComponent as b, ref as y, computed as k, watch as V, openBlock as s, createElementBlock as n, Fragment as C, renderList as j, withModifiers as B, createElementVNode as a, normalizeClass as $, createTextVNode as p, toDisplayString as m, createBlock as q, unref as i, withCtx as z, createVNode as E } from "vue";
2
- import { useWorkspace as N } from "../../store/workspace.js";
3
- import { ScalarButton as O, ScalarIcon as S } from "@scalar/components";
4
- import A from "fuse.js";
5
- import { useRouter as D } from "vue-router";
6
- const F = ["open"], R = { key: 0 }, W = ["onClick"], I = { class: "flex items-center gap-1.5 whitespace-nowrap" }, L = { class: "w-20 overflow-hidden text-ellipsis text-right" }, J = /* @__PURE__ */ b({
1
+ import { defineComponent as k, computed as y, openBlock as r, createElementBlock as n, Fragment as b, renderList as g, createElementVNode as a, createTextVNode as c, toDisplayString as u, createBlock as w, unref as s, withCtx as V, createVNode as C } from "vue";
2
+ import { useWorkspace as B } from "../../store/workspace.js";
3
+ import { ScalarButton as E, ScalarIcon as N } from "@scalar/components";
4
+ import S from "fuse.js";
5
+ import { useRouter as j } from "vue-router";
6
+ const q = {
7
+ id: "env-dialog",
8
+ class: "z-10 w-60 rounded border bg-b-1 p-1",
9
+ open: !0,
10
+ tabindex: "0"
11
+ }, z = { key: 0 }, A = ["onClick"], D = { class: "flex items-center gap-1.5 whitespace-nowrap" }, F = /* @__PURE__ */ a("span", { class: "h-2.5 w-2.5 min-w-2.5 rounded-full" }, null, -1), $ = { class: "w-20 overflow-hidden text-ellipsis text-right" }, W = /* @__PURE__ */ k({
7
12
  __name: "EnvironmentVariableDropdown",
8
13
  props: {
9
14
  query: {}
10
15
  },
11
16
  emits: ["select"],
12
- setup(f, { emit: h }) {
13
- const l = f, v = h, { environments: c, activeWorkspace: w } = N(), x = D(), r = y(!1), g = new A(Object.values(c), {
14
- /** search by both name and value */
15
- keys: ["name", "value"]
16
- }), u = k(() => {
17
- const o = l.query.match(/{{\s*(.*?)\s*(}}|$)/), t = o ? o[1].trim() : "";
17
+ setup(d, { emit: p }) {
18
+ const m = d, f = p, { activeParsedEnvironments: i } = B(), v = j(), h = new S(i.value, {
19
+ keys: ["key", "value"]
20
+ }), l = y(() => {
21
+ const t = m.query;
18
22
  if (!t)
19
- return Object.values(c).slice(-4);
20
- const e = g.search(t);
21
- return e.length > 0 ? e.map((d) => d.item) : [];
22
- }), _ = (o) => {
23
- v("select", o.name), r.value = !1;
23
+ return i.value.slice(-4);
24
+ const o = h.search(t);
25
+ return o.length > 0 ? o.map((e) => e.item) : [];
26
+ }), _ = (t) => {
27
+ f("select", t);
24
28
  };
25
- return V(
26
- () => l.query,
27
- (o) => {
28
- var t;
29
- r.value = o.includes("{{") && !((t = w.value) != null && t.isReadOnly);
30
- }
31
- ), (o, t) => (s(), n("dialog", {
32
- id: "env-dialog",
33
- class: "absolute left-2 top-7 z-10 w-60 rounded border bg-white p-1",
34
- open: r.value,
35
- tabindex: "0"
36
- }, [
37
- u.value.length ? (s(), n("ul", R, [
38
- (s(!0), n(C, null, j(u.value, (e) => (s(), n("li", {
39
- key: e.uid,
29
+ return (t, o) => (r(), n("dialog", q, [
30
+ l.value.length ? (r(), n("ul", z, [
31
+ (r(!0), n(b, null, g(l.value, (e, x) => (r(), n("li", {
32
+ key: x,
40
33
  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",
41
- onClick: B((d) => _(e), ["stop"])
34
+ onClick: (I) => _(e.key)
42
35
  }, [
43
- a("div", I, [
44
- a("span", {
45
- class: $(["h-2.5 w-2.5 min-w-2.5 rounded-full", `bg-${e.color}`])
46
- }, null, 2),
47
- p(" " + m(e.name), 1)
36
+ a("div", D, [
37
+ F,
38
+ c(" " + u(e.key), 1)
48
39
  ]),
49
- a("span", L, m(e.raw), 1)
50
- ], 8, W))), 128))
51
- ])) : (s(), q(i(O), {
40
+ a("span", $, u(e.value), 1)
41
+ ], 8, A))), 128))
42
+ ])) : (r(), w(s(E), {
52
43
  key: 1,
53
44
  class: "font-code text-3xs hover:bg-b-2 flex h-7 w-full justify-start gap-2 px-2 transition-colors duration-150",
54
45
  variant: "secondary",
55
- onClick: t[0] || (t[0] = (e) => i(x).push("/environment"))
46
+ onClick: o[0] || (o[0] = (e) => s(v).push("/environment"))
56
47
  }, {
57
- default: z(() => [
58
- E(i(S), {
48
+ default: V(() => [
49
+ C(s(N), {
59
50
  class: "w-2",
60
51
  icon: "Add",
61
52
  size: "xs"
62
53
  }),
63
- p(" Add variable ")
54
+ c(" Add variable ")
64
55
  ]),
65
56
  _: 1
66
57
  }))
67
- ], 8, F));
58
+ ]));
68
59
  }
69
60
  });
70
61
  export {
71
- J as default
62
+ W as default
72
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AA6+BA,wBAKG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AAogCA,wBAKG"}
@@ -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-1984884a"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f0bfeb71"]]);
5
5
  export {
6
6
  m as default
7
7
  };