@scalar/api-client 2.1.18 → 2.1.20

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 (213) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  5. package/dist/components/AddressBar/AddressBar.vue2.js +70 -69
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +29 -29
  10. package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
  11. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  12. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  13. package/dist/components/CodeInput/CodeInput.vue2.js +57 -49
  14. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
  19. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
  21. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
  23. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +13 -7
  24. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  25. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  26. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +87 -89
  27. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  28. package/dist/components/ContextBar.vue.js +2 -2
  29. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
  30. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  31. package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
  32. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  33. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
  34. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  35. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  36. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
  37. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
  38. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
  39. package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
  40. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
  41. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
  42. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  43. package/dist/components/SideNav/SideNav.vue.js +1 -1
  44. package/dist/components/SideNav/SideNav.vue2.js +37 -26
  45. package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
  46. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  47. package/dist/components/SideNav/SideNavLink.vue.js +10 -11
  48. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
  49. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  50. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  51. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  52. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  53. package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
  54. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
  55. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  56. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  57. package/dist/components/Sidebar/SidebarListElement.vue2.js +26 -22
  58. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
  59. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  60. package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
  61. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  62. package/dist/components/TopNav/TopNav.vue.js +3 -3
  63. package/dist/components/TopNav/TopNav.vue2.js +41 -40
  64. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  65. package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
  66. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  67. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  68. package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
  69. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
  70. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  71. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
  72. package/dist/constants.d.ts +4 -0
  73. package/dist/constants.d.ts.map +1 -1
  74. package/dist/constants.js +2 -1
  75. package/dist/hooks/useDarkModeState.d.ts +4 -3
  76. package/dist/hooks/useDarkModeState.d.ts.map +1 -1
  77. package/dist/hooks/useDarkModeState.js +36 -21
  78. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  79. package/dist/layouts/App/ApiClientApp.vue.js +40 -44
  80. package/dist/layouts/App/create-api-client-app.d.ts +46 -36
  81. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  82. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  83. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  84. package/dist/layouts/Modal/ApiClientModal.vue2.js +17 -17
  85. package/dist/layouts/Modal/create-api-client-modal.d.ts +92 -72
  86. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  87. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  88. package/dist/layouts/Web/ApiClientWeb.vue.js +30 -34
  89. package/dist/layouts/Web/create-api-client-web.d.ts +46 -36
  90. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  91. package/dist/libs/create-client.d.ts +46 -36
  92. package/dist/libs/create-client.d.ts.map +1 -1
  93. package/dist/libs/event-bus.d.ts +41 -0
  94. package/dist/libs/event-bus.d.ts.map +1 -0
  95. package/dist/libs/event-bus.js +32 -0
  96. package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
  97. package/dist/libs/hot-keys.d.ts.map +1 -0
  98. package/dist/libs/hot-keys.js +45 -0
  99. package/dist/libs/importers/curl.d.ts +3 -0
  100. package/dist/libs/importers/curl.d.ts.map +1 -0
  101. package/dist/libs/importers/curl.js +61 -0
  102. package/dist/libs/importers/index.d.ts +2 -0
  103. package/dist/libs/importers/index.d.ts.map +1 -0
  104. package/dist/libs/importers/index.js +4 -0
  105. package/dist/libs/index.d.ts +4 -1
  106. package/dist/libs/index.d.ts.map +1 -1
  107. package/dist/libs/index.js +31 -31
  108. package/dist/libs/parse-curl.d.ts +12 -0
  109. package/dist/libs/parse-curl.d.ts.map +1 -0
  110. package/dist/libs/parse-curl.js +70 -0
  111. package/dist/libs/send-request.d.ts +4 -1
  112. package/dist/libs/send-request.d.ts.map +1 -1
  113. package/dist/libs/send-request.js +103 -103
  114. package/dist/router.d.ts +2 -1
  115. package/dist/router.d.ts.map +1 -1
  116. package/dist/router.js +33 -24
  117. package/dist/store/collections.d.ts +4 -4
  118. package/dist/store/cookies.d.ts +4 -4
  119. package/dist/store/environment.d.ts +4 -4
  120. package/dist/store/events.d.ts +29 -0
  121. package/dist/store/events.d.ts.map +1 -0
  122. package/dist/store/events.js +31 -0
  123. package/dist/store/request-example.d.ts +4 -4
  124. package/dist/store/requests.d.ts +4 -4
  125. package/dist/store/router-params.d.ts +1 -0
  126. package/dist/store/router-params.d.ts.map +1 -1
  127. package/dist/store/router-params.js +2 -1
  128. package/dist/store/security-schemes.d.ts +4 -4
  129. package/dist/store/servers.d.ts +4 -4
  130. package/dist/store/store.d.ts +92 -72
  131. package/dist/store/store.d.ts.map +1 -1
  132. package/dist/store/store.js +138 -129
  133. package/dist/store/tags.d.ts +4 -4
  134. package/dist/store/workspace.d.ts +4 -4
  135. package/dist/style.css +1 -1
  136. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  137. package/dist/views/Cookies/Cookies.vue2.js +18 -18
  138. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  139. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
  140. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  141. package/dist/views/Request/Request.vue.js +1 -1
  142. package/dist/views/Request/Request.vue2.js +148 -98
  143. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  145. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
  146. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  147. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
  148. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  149. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  150. package/dist/views/Request/RequestSidebar.vue2.js +101 -102
  151. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  153. package/dist/views/Request/RequestSidebarItem.vue2.js +73 -73
  154. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  155. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  156. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +33 -34
  157. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
  158. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  159. package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
  160. package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
  161. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
  162. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
  163. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
  164. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
  165. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  166. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  167. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -33
  168. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  169. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
  170. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +18 -19
  171. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  172. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
  173. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  174. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
  175. package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
  176. package/dist/views/Settings/Settings.vue.d.ts +4 -0
  177. package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
  178. package/dist/views/Settings/Settings.vue.js +4 -0
  179. package/dist/views/Settings/Settings.vue2.js +59 -0
  180. package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
  181. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
  182. package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
  183. package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
  184. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
  185. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
  186. package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
  187. package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
  188. package/package.json +59 -35
  189. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
  190. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
  191. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
  192. package/dist/components/DarkModeToggle/index.d.ts +0 -2
  193. package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
  194. package/dist/components/DarkModeToggle/index.js +0 -4
  195. package/dist/components/ScreenReader.vue.js +0 -7
  196. package/dist/components/ScreenReader.vue2.js +0 -18
  197. package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
  198. package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
  199. package/dist/libs/event-busses/cancel-request-bus.js +0 -5
  200. package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
  201. package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
  202. package/dist/libs/event-busses/command-palette-bus.js +0 -5
  203. package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
  204. package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
  205. package/dist/libs/event-busses/execute-request-bus.js +0 -5
  206. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
  207. package/dist/libs/event-busses/hot-keys-bus.js +0 -47
  208. package/dist/libs/event-busses/index.d.ts +0 -6
  209. package/dist/libs/event-busses/index.d.ts.map +0 -1
  210. package/dist/libs/event-busses/index.js +0 -15
  211. package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
  212. package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
  213. package/dist/libs/event-busses/request-status-bus.js +0 -5
@@ -1,33 +1,31 @@
1
- import { defineComponent as F, ref as u, computed as P, watch as U, onMounted as G, onBeforeUnmount as Q, openBlock as a, createElementBlock as r, Fragment as d, withDirectives as h, createElementVNode as m, vShow as w, unref as f, createVNode as y, withKeys as g, withModifiers as $, vModelText as j, renderList as K, toDisplayString as M, normalizeClass as J, createTextVNode as O, createCommentVNode as X, createBlock as Y, resolveDynamicComponent as Z, mergeProps as ee, nextTick as T } from "vue";
2
- import { useModal as oe, ScalarIcon as S } from "@scalar/components";
3
- import { useRouter as te } from "vue-router";
4
- import ne from "./CommandPaletteCollection.vue.js";
5
- import ae from "./CommandPaletteExample.vue.js";
6
- import le from "./CommandPaletteImport.vue.js";
7
- import se from "./CommandPaletteRequest.vue.js";
8
- import re from "./CommandPaletteServer.vue.js";
9
- import me from "./CommandPaletteTag.vue.js";
10
- import ce from "./CommandPaletteWorkspace.vue.js";
11
- import { commandPaletteBus as V } from "../../libs/event-busses/command-palette-bus.js";
12
- import { useWorkspace as ie } from "../../store/store.js";
13
- import { hotKeyBus as W } from "../../libs/event-busses/hot-keys-bus.js";
14
- const ue = { class: "commandmenu custom-scroll" }, de = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, fe = { for: "commandmenu" }, pe = ["onKeydown"], ve = ["onClick"], Ce = {
1
+ import { defineComponent as q, ref as u, computed as K, watch as F, onMounted as U, onBeforeUnmount as G, openBlock as a, createElementBlock as r, Fragment as d, withDirectives as k, createElementVNode as m, vShow as y, unref as f, createVNode as g, withKeys as $, withModifiers as S, vModelText as Q, renderList as B, toDisplayString as M, normalizeClass as j, createTextVNode as J, createCommentVNode as O, createBlock as X, resolveDynamicComponent as Y, mergeProps as Z, nextTick as T } from "vue";
2
+ import { useModal as ee, ScalarIcon as A } from "@scalar/components";
3
+ import { useRouter as oe } from "vue-router";
4
+ import te from "./CommandPaletteCollection.vue.js";
5
+ import ne from "./CommandPaletteExample.vue.js";
6
+ import ae from "./CommandPaletteImport.vue.js";
7
+ import le from "./CommandPaletteRequest.vue.js";
8
+ import se from "./CommandPaletteServer.vue.js";
9
+ import re from "./CommandPaletteTag.vue.js";
10
+ import me from "./CommandPaletteWorkspace.vue.js";
11
+ import { useWorkspace as ce } from "../../store/store.js";
12
+ const ie = { class: "commandmenu z-overlay custom-scroll" }, ue = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, de = { for: "commandmenu" }, fe = ["onKeydown"], pe = ["onClick"], ve = {
15
13
  key: 0,
16
14
  class: "text-c-3 text-center text-sm p-2 pt-3"
17
- }, he = {
15
+ }, Ce = {
18
16
  name: "TheCommandPalette"
19
- }, ke = {
20
- "Import Collection": le,
21
- "Create Request": se,
22
- "Create Workspace": ce,
23
- "Add Tag": me,
24
- "Add Server": re,
25
- "Create Collection": ne,
26
- "Add Example": ae
27
- }, Ie = /* @__PURE__ */ F({
28
- ...he,
29
- setup(be) {
30
- const A = [
17
+ }, he = {
18
+ "Import Collection": ae,
19
+ "Create Request": le,
20
+ "Create Workspace": me,
21
+ "Add Tag": re,
22
+ "Add Server": se,
23
+ "Create Collection": te,
24
+ "Add Example": ne
25
+ }, Re = /* @__PURE__ */ q({
26
+ ...Ce,
27
+ setup(ke) {
28
+ const D = [
31
29
  {
32
30
  label: "",
33
31
  commands: [
@@ -76,92 +74,92 @@ const ue = { class: "commandmenu custom-scroll" }, de = { class: "bg-b-2 flex it
76
74
  }
77
75
  ]
78
76
  }
79
- ], c = oe(), { push: z } = te(), { activeWorkspace: N } = ie(), k = u(), l = u(""), s = u(null), i = u(-1), D = u([]), p = P(
80
- () => A.reduce((e, o) => {
77
+ ], c = ee(), { push: V } = oe(), { activeWorkspace: W, events: p } = ce(), b = u(), l = u(""), s = u(null), i = u(-1), L = u([]), v = K(
78
+ () => D.reduce((e, o) => {
81
79
  const t = o.commands.filter(
82
80
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
83
81
  );
84
82
  return [...e, ...t];
85
83
  }, [])
86
- ), v = () => {
84
+ ), C = () => {
87
85
  c.hide(), l.value = "", s.value = null, i.value = -1;
88
- }, H = (e) => {
86
+ }, N = (e) => {
89
87
  l.value !== "" && (e == null || e.preventDefault()), s.value = null, T(() => {
90
88
  var o;
91
- return (o = b.value) == null ? void 0 : o.focus();
89
+ return (o = x.value) == null ? void 0 : o.focus();
92
90
  });
93
- }, L = (e) => {
94
- "path" in e ? (z(`/workspace/${N.value.uid}${e.path}`), v()) : s.value = e.name;
95
- }, b = u(), R = ({
91
+ }, R = (e) => {
92
+ "path" in e ? (V(`/workspace/${W.value.uid}${e.path}`), C()) : s.value = e.name;
93
+ }, x = u(), P = ({
96
94
  commandName: e,
97
95
  metaData: o
98
96
  } = {}) => {
99
- s.value = e ?? null, k.value = o, c.show(), T(() => {
97
+ s.value = e ?? null, b.value = o, c.show(), T(() => {
100
98
  var t;
101
- return (t = b.value) == null ? void 0 : t.focus();
99
+ return (t = x.value) == null ? void 0 : t.focus();
102
100
  });
103
101
  };
104
- U(l, (e) => {
105
- e && p.value.length > 0 && (i.value = 0);
102
+ F(l, (e) => {
103
+ e && v.value.length > 0 && (i.value = 0);
106
104
  });
107
- const B = (e, o) => {
108
- var C;
105
+ const z = (e, o) => {
106
+ var h;
109
107
  if (!c.open) return;
110
108
  o.preventDefault();
111
- const t = e === "up" ? -1 : 1, n = p.value.length;
112
- i.value = (i.value + t + n) % n, (C = D.value[i.value]) == null || C.scrollIntoView({
109
+ const t = e === "up" ? -1 : 1, n = v.value.length;
110
+ i.value = (i.value + t + n) % n, (h = L.value[i.value]) == null || h.scrollIntoView({
113
111
  behavior: "smooth",
114
112
  block: "nearest"
115
113
  });
116
- }, x = P(
117
- () => p.value[i.value]
118
- ), q = (e) => {
119
- !x.value || s.value || (e.preventDefault(), e.stopPropagation(), L(x.value));
114
+ }, _ = K(
115
+ () => v.value[i.value]
116
+ ), H = (e) => {
117
+ !_.value || s.value || (e.preventDefault(), e.stopPropagation(), R(_.value));
120
118
  }, E = (e) => {
121
- c.open && e.closeModal && v();
119
+ c.open && e != null && e.closeModal && C();
122
120
  };
123
- return G(() => {
124
- V.on(R), W.on(E);
125
- }), Q(() => {
126
- V.off(R), W.off(E);
121
+ return U(() => {
122
+ p.commandPalette.on(P), p.hotKeys.on(E);
123
+ }), G(() => {
124
+ p.commandPalette.off(P), p.hotKeys.off(E);
127
125
  }), (e, o) => (a(), r(d, null, [
128
- h(m("div", {
129
- class: "commandmenu-clickout",
130
- onClick: o[0] || (o[0] = (t) => v())
126
+ k(m("div", {
127
+ class: "commandmenu-clickout z-overlay",
128
+ onClick: o[0] || (o[0] = (t) => C())
131
129
  }, null, 512), [
132
- [w, f(c).open]
130
+ [y, f(c).open]
133
131
  ]),
134
- h(m("div", ue, [
132
+ k(m("div", ie, [
135
133
  s.value ? (a(), r(d, { key: 1 }, [
136
134
  m("button", {
137
- class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.5 z-10",
135
+ class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.25 z-1",
138
136
  type: "button",
139
137
  onClick: o[4] || (o[4] = (t) => s.value = null)
140
138
  }, [
141
- y(f(S), {
139
+ g(f(A), {
142
140
  icon: "ChevronLeft",
143
141
  size: "md",
144
142
  thickness: "1.5"
145
143
  })
146
144
  ]),
147
- (a(), Y(Z(ke[s.value]), ee(k.value ? { metaData: k.value } : {}, {
148
- onBack: o[5] || (o[5] = (t) => H(t)),
149
- onClose: v
145
+ (a(), X(Y(he[s.value]), Z(b.value ? { metaData: b.value } : {}, {
146
+ onBack: o[5] || (o[5] = (t) => N(t)),
147
+ onClose: C
150
148
  }), null, 16))
151
149
  ], 64)) : (a(), r(d, { key: 0 }, [
152
- m("div", de, [
153
- m("label", fe, [
154
- y(f(S), {
150
+ m("div", ue, [
151
+ m("label", de, [
152
+ g(f(A), {
155
153
  class: "text-c-2 mr-2.5",
156
154
  icon: "Search",
157
155
  size: "md",
158
156
  thickness: "1.5"
159
157
  })
160
158
  ]),
161
- h(m("input", {
159
+ k(m("input", {
162
160
  id: "commandmenu",
163
161
  ref_key: "commandInputRef",
164
- ref: b,
162
+ ref: x,
165
163
  "onUpdate:modelValue": o[1] || (o[1] = (t) => l.value = t),
166
164
  autocomplete: "off",
167
165
  autofocus: "",
@@ -169,59 +167,59 @@ const ue = { class: "commandmenu custom-scroll" }, de = { class: "bg-b-2 flex it
169
167
  placeholder: "Search commands...",
170
168
  type: "text",
171
169
  onKeydown: [
172
- o[2] || (o[2] = g($((t) => B("down", t), ["stop"]), ["down"])),
173
- g($(q, ["stop"]), ["enter"]),
174
- o[3] || (o[3] = g($((t) => B("up", t), ["stop"]), ["up"]))
170
+ o[2] || (o[2] = $(S((t) => z("down", t), ["stop"]), ["down"])),
171
+ $(S(H, ["stop"]), ["enter"]),
172
+ o[3] || (o[3] = $(S((t) => z("up", t), ["stop"]), ["up"]))
175
173
  ]
176
- }, null, 40, pe), [
177
- [j, l.value]
174
+ }, null, 40, fe), [
175
+ [Q, l.value]
178
176
  ])
179
177
  ]),
180
- (a(), r(d, null, K(A, (t) => (a(), r(d, {
178
+ (a(), r(d, null, B(D, (t) => (a(), r(d, {
181
179
  key: t.label
182
180
  }, [
183
- h(m("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, M(t.label), 513), [
181
+ k(m("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, M(t.label), 513), [
184
182
  [
185
- w,
183
+ y,
186
184
  t.commands.filter(
187
185
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
188
186
  ).length > 0
189
187
  ]
190
188
  ]),
191
- (a(!0), r(d, null, K(t.commands.filter(
189
+ (a(!0), r(d, null, B(t.commands.filter(
192
190
  (n) => n.name.toLowerCase().includes(l.value.toLowerCase())
193
- ), (n, C) => {
191
+ ), (n, h) => {
194
192
  var I;
195
193
  return a(), r("div", {
196
194
  key: n.name,
197
195
  ref_for: !0,
198
- ref: (_) => {
199
- _ && (D.value[C] = _);
196
+ ref: (w) => {
197
+ w && (L.value[h] = w);
200
198
  },
201
- class: J(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
202
- "bg-b-2": n.name === ((I = x.value) == null ? void 0 : I.name)
199
+ class: j(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
200
+ "bg-b-2": n.name === ((I = _.value) == null ? void 0 : I.name)
203
201
  }]),
204
- onClick: (_) => L(n)
202
+ onClick: (w) => R(n)
205
203
  }, [
206
- y(f(S), {
204
+ g(f(A), {
207
205
  class: "text-c-2 mr-2.5",
208
206
  icon: n.icon,
209
207
  size: "md",
210
208
  thickness: "1.5"
211
209
  }, null, 8, ["icon"]),
212
- O(" " + M(n.name), 1)
213
- ], 10, ve);
210
+ J(" " + M(n.name), 1)
211
+ ], 10, pe);
214
212
  }), 128))
215
213
  ], 64))), 64)),
216
- p.value.length ? X("", !0) : (a(), r("div", Ce, " No commands found "))
214
+ v.value.length ? O("", !0) : (a(), r("div", ve, " No commands found "))
217
215
  ], 64))
218
216
  ], 512), [
219
- [w, f(c).open]
217
+ [y, f(c).open]
220
218
  ])
221
219
  ], 64));
222
220
  }
223
221
  });
224
222
  export {
225
- ke as PaletteComponents,
226
- Ie as default
223
+ he as PaletteComponents,
224
+ Re as default
227
225
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":";cA2HY,MAAM,EAAE;mBACH,MAAM;;;;cADX,MAAM,EAAE;mBACH,MAAM;;;;AAqIvB,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":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":";cA0HY,MAAM,EAAE;mBACH,MAAM;;;;cADX,MAAM,EAAE;mBACH,MAAM;;;;AAqIvB,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,7 +1,7 @@
1
1
  import o from "./ContextBar.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-ba672e06"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10366d6c"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,15 +1,31 @@
1
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
1
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
2
2
  modelValue: boolean;
3
3
  disabled?: boolean;
4
+ align?: "left" | "center";
5
+ }>, {
6
+ align: string;
4
7
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
8
  "update:modelValue": (v: boolean) => void;
6
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
7
10
  modelValue: boolean;
8
11
  disabled?: boolean;
12
+ align?: "left" | "center";
13
+ }>, {
14
+ align: string;
9
15
  }>>> & {
10
16
  "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
11
- }, {}, {}>;
17
+ }, {
18
+ align: "left" | "center";
19
+ }, {}>;
12
20
  export default _default;
21
+ type __VLS_WithDefaults<P, D> = {
22
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
23
+ default: D[K];
24
+ }> : P[K];
25
+ };
26
+ type __VLS_Prettify<T> = {
27
+ [K in keyof T]: T[K];
28
+ } & {};
13
29
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
30
  type __VLS_TypePropsToOption<T> = {
15
31
  [K in keyof T]-?: {} extends Pick<T, K> ? {
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCheckbox.vue"],"names":[],"mappings":";gBAyCc,OAAO;eACR,OAAO;;;;gBADN,OAAO;eACR,OAAO;;;;AAqGpB,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":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCheckbox.vue"],"names":[],"mappings":";gBA0DgB,OAAO;eACR,OAAO;YACV,MAAM,GAAG,QAAQ;;;;;;gBAFb,OAAO;eACR,OAAO;YACV,MAAM,GAAG,QAAQ;;;;;;WAAjB,MAAM,GAAG,QAAQ;;AAoG7B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,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,36 +1,49 @@
1
- import { defineComponent as a, openBlock as l, createBlock as s, withCtx as n, createElementVNode as t, createVNode as c, unref as d } from "vue";
2
- import { ScalarIcon as i } from "@scalar/components";
3
- import f from "./DataTableCell.vue.js";
4
- const p = ["checked", "disabled"], b = { class: "w-full h-full flex items-center justify-center centered text-border peer-checked:text-c-2 pointer-events-none absolute before:absolute before:opacity-0 group-hover/cell:before:opacity-100 before:border before:rounded before:w-9/12 before:aspect-square before:top-1/2 before:left-1/2 before:transform before:-translate-x-1/2 before:-translate-y-1/2 before:border-[1px]" }, x = /* @__PURE__ */ a({
1
+ import { defineComponent as n, openBlock as s, createBlock as c, withCtx as i, createElementVNode as t, normalizeClass as d, unref as r, createVNode as f } from "vue";
2
+ import { ScalarIcon as p } from "@scalar/components";
3
+ import { cva as b } from "cva";
4
+ import m from "./DataTableCell.vue.js";
5
+ const u = ["checked", "disabled"], v = /* @__PURE__ */ n({
5
6
  __name: "DataTableCheckbox",
6
7
  props: {
7
8
  modelValue: { type: Boolean },
8
- disabled: { type: Boolean }
9
+ disabled: { type: Boolean },
10
+ align: { default: "center" }
9
11
  },
10
12
  emits: ["update:modelValue"],
11
- setup(u) {
12
- return (e, o) => (l(), s(f, { class: "group/cell relative flex min-w-8" }, {
13
- default: n(() => [
13
+ setup(h) {
14
+ const a = b({
15
+ base: "w-8 h-8 flex items-center justify-center text-border peer-checked:text-c-2 pointer-events-none absolute before:absolute before:opacity-0 group-hover/cell:before:opacity-100 before:border before:rounded before:w-9/12 before:aspect-square before:top-1/2 before:left-1/2 before:transform before:-translate-x-1/2 before:-translate-y-1/2 before:border-[1px]",
16
+ variants: {
17
+ align: {
18
+ left: "left-0",
19
+ center: "centered"
20
+ }
21
+ }
22
+ });
23
+ return (e, o) => (s(), c(m, { class: "group/cell relative flex min-w-8" }, {
24
+ default: i(() => [
14
25
  t("input", {
15
26
  checked: e.modelValue,
16
27
  class: "peer absolute inset-0 opacity-0 cursor-pointer",
17
28
  disabled: e.disabled,
18
29
  tabindex: "-1",
19
30
  type: "checkbox",
20
- onChange: o[0] || (o[0] = (r) => e.$emit("update:modelValue", r.target.checked))
21
- }, null, 40, p),
22
- t("div", b, [
23
- c(d(i), {
31
+ onChange: o[0] || (o[0] = (l) => e.$emit("update:modelValue", l.target.checked))
32
+ }, null, 40, u),
33
+ t("div", {
34
+ class: d(r(a)({ align: e.align }))
35
+ }, [
36
+ f(r(p), {
24
37
  icon: "Checkmark",
25
38
  size: "xs",
26
39
  thickness: "2.5"
27
40
  })
28
- ])
41
+ ], 2)
29
42
  ]),
30
43
  _: 1
31
44
  }));
32
45
  }
33
46
  });
34
47
  export {
35
- x as default
48
+ v as default
36
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAgdA,wBAKG"}
1
+ {"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAkdA,wBAKG"}
@@ -1,18 +1,18 @@
1
- import { defineComponent as y, computed as S, openBlock as a, createElementBlock as f, createVNode as n, unref as e, withCtx as o, Fragment as N, renderList as D, createBlock as v, withModifiers as h, createElementVNode as r, normalizeClass as x, createTextVNode as l, toDisplayString as k, createCommentVNode as j } from "vue";
1
+ import { defineComponent as y, computed as S, openBlock as a, createElementBlock as f, createVNode as n, unref as e, withCtx as o, Fragment as N, renderList as D, createBlock as v, withModifiers as h, createElementVNode as r, normalizeClass as w, createTextVNode as l, toDisplayString as x, createCommentVNode as j } from "vue";
2
2
  import { ScalarDropdown as z, ScalarDropdownItem as d, ScalarIcon as c, ScalarDropdownDivider as B, ScalarButton as I } from "@scalar/components";
3
3
  import { useRouter as V } from "vue-router";
4
4
  import { useWorkspace as M } from "../../store/store.js";
5
- const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = { class: "flex items-center justify-center h-4 w-4" }, O = /* @__PURE__ */ r("span", { class: "leading-none" }, "Manage Environments", -1), G = /* @__PURE__ */ y({
5
+ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center whitespace-nowrap" }, $ = { class: "flex items-center justify-center h-4 w-4" }, O = /* @__PURE__ */ r("span", { class: "leading-none" }, "Manage Environments", -1), G = /* @__PURE__ */ y({
6
6
  __name: "EnvironmentSelector",
7
7
  setup(R) {
8
8
  const {
9
9
  environments: u,
10
10
  activeWorkspace: s,
11
- workspaceMutators: w,
11
+ workspaceMutators: k,
12
12
  activeEnvironment: _,
13
13
  isReadOnly: g
14
14
  } = M(), b = V(), m = (i) => {
15
- w.edit(s.value.uid, "activeEnvironmentId", i);
15
+ k.edit(s.value.uid, "activeEnvironmentId", i);
16
16
  }, C = () => b.push(`/workspace/${s.value.uid}/environment`), E = S(() => [
17
17
  // Always add the default environment
18
18
  u.default,
@@ -28,7 +28,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
28
28
  }, {
29
29
  default: o(() => [
30
30
  r("div", {
31
- class: x([
31
+ class: w([
32
32
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
33
33
  e(s).activeEnvironmentId === t.uid ? "bg-blue text-b-1" : "text-transparent"
34
34
  ])
@@ -39,7 +39,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
39
39
  thickness: "3.5"
40
40
  })
41
41
  ], 2),
42
- l(" " + k(t.name), 1)
42
+ l(" " + x(t.name), 1)
43
43
  ]),
44
44
  _: 2
45
45
  }, 1032, ["onClick"]))), 128)),
@@ -49,7 +49,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
49
49
  }, {
50
50
  default: o(() => [
51
51
  r("div", {
52
- class: x([
52
+ class: w([
53
53
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
54
54
  e(s).activeEnvironmentId === "" ? "bg-blue text-b-1" : "text-transparent"
55
55
  ])
@@ -92,7 +92,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
92
92
  var t;
93
93
  return [
94
94
  r("h2", W, [
95
- l(k(((t = e(_)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
95
+ l(x(((t = e(_)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
96
96
  n(e(c), {
97
97
  class: "size-3",
98
98
  icon: "ChevronDown",
@@ -7,7 +7,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
7
7
  isDisable: boolean;
8
8
  isEditable: boolean;
9
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- change: (value: "head" | "get" | "delete" | "options" | "connect" | "patch" | "post" | "put" | "trace") => void;
10
+ change: (value: "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace") => void;
11
11
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
12
12
  isSquare?: boolean;
13
13
  method: string;
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
17
17
  isDisable: boolean;
18
18
  isEditable: boolean;
19
19
  }>>> & {
20
- onChange?: ((value: "head" | "get" | "delete" | "options" | "connect" | "patch" | "post" | "put" | "trace") => any) | undefined;
20
+ onChange?: ((value: "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace") => any) | undefined;
21
21
  }, {
22
22
  isSquare: boolean;
23
23
  isEditable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":";YAyKU,MAAM,GAAG,IAAI;;;;YAAb,MAAM,GAAG,IAAI;;;;AAwQvB,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":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":";YAqKU,MAAM,GAAG,IAAI;;;;YAAb,MAAM,GAAG,IAAI;;;;AAsQvB,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,69 @@
1
- import { defineComponent as w, computed as d, watch as C, openBlock as l, createBlock as S, unref as o, withCtx as B, createElementVNode as t, toDisplayString as f, createVNode as i, createElementBlock as m, Fragment as I, createCommentVNode as h } from "vue";
2
- import { useUrlPrefetcher as z } from "./hooks/useUrlPrefetcher.js";
1
+ import { defineComponent as C, computed as d, watch as S, openBlock as l, createBlock as I, unref as o, withCtx as z, createElementVNode as t, toDisplayString as f, createVNode as i, createElementBlock as a, Fragment as B, createCommentVNode as h } from "vue";
2
+ import { useUrlPrefetcher as D } from "./hooks/useUrlPrefetcher.js";
3
3
  import { getOpenApiDocumentVersion as _ } from "./utils/getOpenApiDocumentVersion.js";
4
- import { isDocument as D } from "./utils/isDocument.js";
5
- import { isUrl as E } from "./utils/isUrl.js";
6
- import { useModal as F, ScalarModal as U, ScalarIcon as x, ScalarCodeBlock as V } from "@scalar/components";
7
- import { normalize as A } from "@scalar/openapi-parser";
8
- import M from "./ImportNowButton.vue.js";
9
- import N from "../../views/Request/components/WorkspaceDropdown.vue.js";
10
- import { useWorkspace as $ } from "../../store/store.js";
11
- import { hotKeyBus as O } from "../../libs/event-busses/hot-keys-bus.js";
4
+ import { isDocument as E } from "./utils/isDocument.js";
5
+ import { isUrl as F } from "./utils/isUrl.js";
6
+ import { useModal as U, ScalarModal as V, ScalarIcon as x, ScalarCodeBlock as A } from "@scalar/components";
7
+ import { normalize as M } from "@scalar/openapi-parser";
8
+ import N from "./ImportNowButton.vue.js";
9
+ import $ from "../../views/Request/components/WorkspaceDropdown.vue.js";
10
+ import { useWorkspace as O } from "../../store/store.js";
12
11
  const P = { class: "flex gap-5 flex-col my-24" }, W = { class: "text-center text-xl font-medium" }, j = { class: "flex justify-center" }, K = { class: "inline-block bg-b-2 py-1 px-4 rounded" }, R = {
13
12
  key: 0,
14
13
  class: "flex gap-2 items-center p-3 font-code text-sm border rounded break-words"
15
14
  }, T = { class: "break-all" }, q = { class: "flex gap-2 items-center p-3 font-code text-sm border rounded" }, G = /* @__PURE__ */ t("div", null, "This doesn’t look like a valid OpenAPI/Swagger document.", -1), H = { class: "bg-b-2 h-48 border rounded custom-scroll" }, J = {
16
15
  key: 2,
17
16
  class: "inline-flex flex-col gap-2 items-center mt-2"
18
- }, ie = /* @__PURE__ */ w({
17
+ }, ne = /* @__PURE__ */ C({
19
18
  __name: "ImportCollectionModal",
20
19
  props: {
21
20
  source: {}
22
21
  },
23
22
  emits: ["importFinished"],
24
23
  setup(v) {
25
- const c = v, { activeWorkspace: k } = $(), { prefetchResult: r, prefetchUrl: g } = z(), s = F();
26
- O.on(() => {
27
- s.hide();
28
- });
29
- const b = d(() => {
24
+ const c = v, { activeWorkspace: k, events: g } = O(), { prefetchResult: r, prefetchUrl: b } = D(), s = U();
25
+ g.hotKeys.on(() => s.hide());
26
+ const y = d(() => {
30
27
  try {
31
- return A(
28
+ return M(
32
29
  r.content || c.source || ""
33
30
  );
34
31
  } catch {
35
32
  return;
36
33
  }
37
- }), y = d(() => {
34
+ }), w = d(() => {
38
35
  var e, n;
39
- return (n = (e = b.value) == null ? void 0 : e.info) == null ? void 0 : n.title;
40
- }), a = d(
36
+ return (n = (e = y.value) == null ? void 0 : e.info) == null ? void 0 : n.title;
37
+ }), m = d(
41
38
  () => _(r.content || c.source || "")
42
39
  );
43
- return C(
40
+ return S(
44
41
  () => c.source,
45
42
  (e) => {
46
- g(e, k.value.proxyUrl), e && (E(e) || D(e) && _(e)) ? s.show() : s.hide();
43
+ b(e, k.value.proxyUrl), e && (F(e) || E(e) && _(e)) ? s.show() : s.hide();
47
44
  }
48
- ), (e, n) => (l(), S(o(U), {
45
+ ), (e, n) => (l(), I(o(V), {
49
46
  size: "md",
50
47
  state: o(s)
51
48
  }, {
52
- default: B(() => {
49
+ default: z(() => {
53
50
  var p, u;
54
51
  return [
55
52
  t("div", P, [
56
- t("div", W, f(y.value ?? "Import Collection"), 1),
53
+ t("div", W, f(w.value ?? "Import Collection"), 1),
57
54
  t("div", j, [
58
55
  t("div", K, [
59
- i(o(N))
56
+ i(o($))
60
57
  ])
61
58
  ]),
62
- o(r).state !== "loading" && o(r).error ? (l(), m("div", R, [
59
+ o(r).state !== "loading" && o(r).error ? (l(), a("div", R, [
63
60
  i(o(x), {
64
61
  class: "text-red flex-shrink-0",
65
62
  icon: "Error",
66
63
  size: "sm"
67
64
  }),
68
65
  t("div", T, f(o(r).error), 1)
69
- ])) : a.value ? h("", !0) : (l(), m(I, { key: 1 }, [
66
+ ])) : m.value ? h("", !0) : (l(), a(B, { key: 1 }, [
70
67
  t("div", q, [
71
68
  i(o(x), {
72
69
  class: "text-red",
@@ -76,14 +73,14 @@ const P = { class: "flex gap-5 flex-col my-24" }, W = { class: "text-center text
76
73
  G
77
74
  ]),
78
75
  t("div", H, [
79
- i(o(V), {
76
+ i(o(A), {
80
77
  content: ((p = o(r).content) == null ? void 0 : p.trim()) || ((u = c.source) == null ? void 0 : u.trim()) || "",
81
78
  copy: !1
82
79
  }, null, 8, ["content"])
83
80
  ])
84
81
  ], 64)),
85
- a.value ? (l(), m("div", J, [
86
- i(M, {
82
+ m.value ? (l(), a("div", J, [
83
+ i(N, {
87
84
  source: e.source,
88
85
  variant: "button",
89
86
  onImportFinished: n[0] || (n[0] = () => e.$emit("importFinished"))
@@ -97,5 +94,5 @@ const P = { class: "flex gap-5 flex-col my-24" }, W = { class: "text-center text
97
94
  }
98
95
  });
99
96
  export {
100
- ie as default
97
+ ne as default
101
98
  };