@scalar/api-client 2.1.45 → 2.1.47

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 (192) 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 +66 -58
  5. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  6. package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
  7. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  8. package/dist/components/AddressBar/AddressBarServer.vue.js +40 -39
  9. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  10. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  11. package/dist/components/CodeInput/CodeInput.vue2.js +7 -7
  12. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  13. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +32 -26
  14. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +14 -9
  16. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  18. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +15 -10
  19. package/dist/components/ContextBar.vue.d.ts +1 -1
  20. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  21. package/dist/components/ContextBar.vue.js +2 -2
  22. package/dist/components/ContextBar.vue2.js +30 -19
  23. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  24. package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
  25. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  26. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  27. package/dist/components/DataTable/DataTableInput.vue2.js +10 -10
  28. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  29. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -18
  30. package/dist/components/Form/Form.vue.js +15 -15
  31. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  32. package/dist/components/ImportCollection/DropEventListener.vue.d.ts +2 -2
  33. package/dist/components/ImportCollection/DropEventListener.vue.js +6 -6
  34. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
  35. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -21
  36. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -0
  37. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  38. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +87 -74
  39. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  40. package/dist/components/ImportCollection/ImportNowButton.vue.js +14 -13
  41. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +2 -2
  42. package/dist/components/ImportCollection/PasteEventListener.vue.js +5 -5
  43. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
  44. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
  45. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +10 -5
  46. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  47. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +43 -33
  48. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -0
  49. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  50. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +31 -21
  51. package/dist/components/Search/useSearch.d.ts +2 -0
  52. package/dist/components/Search/useSearch.d.ts.map +1 -1
  53. package/dist/components/Search/useSearch.js +25 -24
  54. package/dist/components/SideNav/DownloadAppButton.vue.d.ts +3 -0
  55. package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -0
  56. package/dist/components/SideNav/DownloadAppButton.vue.js +7 -0
  57. package/dist/components/SideNav/DownloadAppButton.vue2.js +33 -0
  58. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
  59. package/dist/components/SideNav/SideHelp.vue.js +55 -53
  60. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  61. package/dist/components/SideNav/SideNav.vue.js +82 -5
  62. package/dist/components/SideNav/SideNav.vue2.js +2 -72
  63. package/dist/components/{SubpageHeader.vue.d.ts → SideNav/SideNavGroup.vue.d.ts} +3 -3
  64. package/dist/components/SideNav/SideNavGroup.vue.d.ts.map +1 -0
  65. package/dist/components/SideNav/SideNavGroup.vue.js +16 -0
  66. package/dist/components/SideNav/SideNavGroup.vue2.js +4 -0
  67. package/dist/components/SideNav/SideNavLink.vue.d.ts +5 -5
  68. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  69. package/dist/components/SideNav/SideNavLink.vue.js +31 -34
  70. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +25 -0
  71. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -0
  72. package/dist/components/SideNav/SideNavRouterLink.vue.js +29 -0
  73. package/dist/components/SideNav/SideNavRouterLink.vue2.js +4 -0
  74. package/dist/components/Sidebar/SidebarButton.vue.d.ts +1 -4
  75. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  76. package/dist/components/Sidebar/SidebarButton.vue.js +17 -17
  77. package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
  78. package/dist/components/Sidebar/SidebarToggle.vue.js +16 -15
  79. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  80. package/dist/components/TopNav/TopNav.vue.js +2 -2
  81. package/dist/components/TopNav/TopNav.vue2.js +14 -14
  82. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  83. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  84. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +31 -31
  85. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  86. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +13 -21
  87. package/dist/hooks/index.d.ts +2 -1
  88. package/dist/hooks/index.d.ts.map +1 -1
  89. package/dist/hooks/index.js +6 -4
  90. package/dist/hooks/useLayout.d.ts +13 -0
  91. package/dist/hooks/useLayout.d.ts.map +1 -0
  92. package/dist/hooks/useLayout.js +7 -0
  93. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  94. package/dist/layouts/App/ApiClientApp.vue.js +37 -37
  95. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  96. package/dist/layouts/App/MainLayout.vue.js +21 -13
  97. package/dist/layouts/App/create-api-client-app.d.ts +28 -28
  98. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  99. package/dist/layouts/App/create-api-client-app.js +10 -8
  100. package/dist/layouts/Modal/ApiClientModal.vue.d.ts +3 -1
  101. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  102. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  103. package/dist/layouts/Modal/ApiClientModal.vue2.js +37 -25
  104. package/dist/layouts/Modal/create-api-client-modal.d.ts +56 -56
  105. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  106. package/dist/layouts/Modal/create-api-client-modal.js +8 -7
  107. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  108. package/dist/layouts/Web/ApiClientWeb.vue.js +30 -30
  109. package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
  110. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  111. package/dist/layouts/Web/create-api-client-web.js +9 -7
  112. package/dist/libs/create-client.d.ts +35 -29
  113. package/dist/libs/create-client.d.ts.map +1 -1
  114. package/dist/libs/create-client.js +55 -42
  115. package/dist/libs/hot-keys.d.ts +1 -1
  116. package/dist/router.d.ts +4 -41
  117. package/dist/router.d.ts.map +1 -1
  118. package/dist/router.js +18 -149
  119. package/dist/routes.d.ts +150 -0
  120. package/dist/routes.d.ts.map +1 -0
  121. package/dist/routes.js +182 -0
  122. package/dist/store/collections.d.ts +4 -4
  123. package/dist/store/cookies.d.ts +4 -4
  124. package/dist/store/request-example.d.ts +4 -4
  125. package/dist/store/requests.d.ts +4 -4
  126. package/dist/store/router-params.js +1 -1
  127. package/dist/store/security-schemes.d.ts +4 -4
  128. package/dist/store/store.d.ts +56 -56
  129. package/dist/store/store.d.ts.map +1 -1
  130. package/dist/store/store.js +90 -90
  131. package/dist/store/tags.d.ts +4 -4
  132. package/dist/store/workspace.d.ts +4 -4
  133. package/dist/style.css +1 -1
  134. package/dist/views/Cookies/CookieRaw.vue.js +10 -10
  135. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  136. package/dist/views/Cookies/Cookies.vue2.js +52 -53
  137. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  138. package/dist/views/Environment/Environment.vue2.js +79 -80
  139. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  140. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +20 -15
  141. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  142. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +146 -108
  143. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestParams.vue.js +53 -52
  145. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  146. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  147. package/dist/views/Request/RequestSection/RequestSection.vue2.js +102 -97
  148. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  149. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  150. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  151. package/dist/views/Request/RequestSection/RequestTable.vue2.js +44 -40
  152. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  153. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  154. package/dist/views/Request/RequestSidebar.vue2.js +152 -134
  155. package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -2
  156. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  157. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  158. package/dist/views/Request/RequestSidebarItem.vue2.js +129 -115
  159. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +6 -6
  160. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  161. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  162. package/dist/views/Request/RequestSubpageHeader.vue2.js +36 -34
  163. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  164. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
  165. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
  166. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +13 -10
  167. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
  168. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
  169. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +0 -2
  170. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
  171. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
  172. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  173. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +3 -3
  174. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +32 -33
  175. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  176. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +61 -55
  177. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  178. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +32 -25
  179. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  180. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  181. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +102 -70
  182. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  183. package/dist/views/Request/components/WorkspaceDropdown.vue.js +60 -50
  184. package/dist/views/Request/types/sidebar-item.d.ts +2 -1
  185. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  186. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  187. package/dist/views/Servers/Servers.vue2.js +12 -7
  188. package/package.json +10 -8
  189. package/dist/components/SubpageHeader.vue.d.ts.map +0 -1
  190. package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
  191. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +0 -7
  192. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +0 -1
@@ -1,34 +1,39 @@
1
- import { defineComponent as y, computed as S, openBlock as c, createElementBlock as f, createVNode as n, unref as e, withCtx as r, Fragment as N, renderList as D, createBlock as v, withModifiers as x, createElementVNode as s, normalizeClass as h, createTextVNode as d, toDisplayString as w, createCommentVNode as j } from "vue";
2
- import { ScalarDropdown as z, ScalarDropdownItem as u, ScalarIcon as l, ScalarDropdownDivider as B, ScalarButton as I } from "@scalar/components";
1
+ import { defineComponent as y, computed as S, openBlock as c, createElementBlock as f, createVNode as n, unref as e, withCtx as r, Fragment as N, renderList as D, createBlock as v, withModifiers as h, createElementVNode as s, normalizeClass as w, createTextVNode as d, toDisplayString as x, createCommentVNode as j } from "vue";
2
+ import { ScalarDropdown as z, ScalarDropdownItem as m, ScalarIcon as l, 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-xs flex gap-1.5 items-center whitespace-nowrap" }, $ = { class: "flex items-center justify-center h-4 w-4" }, A = /* @__PURE__ */ y({
5
+ const W = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap" }, O = { class: "flex items-center justify-center h-4 w-4" }, A = /* @__PURE__ */ y({
6
6
  __name: "EnvironmentSelector",
7
- setup(O) {
7
+ setup(R) {
8
8
  const {
9
- environments: m,
9
+ environments: u,
10
10
  activeWorkspace: i,
11
11
  workspaceMutators: k,
12
12
  activeEnvironment: g,
13
13
  isReadOnly: C
14
14
  } = M(), E = V(), p = (a) => {
15
15
  k.edit(i.value.uid, "activeEnvironmentId", a);
16
- }, _ = () => E.push(`/workspace/${i.value.uid}/environment`), b = S(() => [
16
+ }, _ = () => E.push({
17
+ name: "environment",
18
+ params: {
19
+ environment: i.value.uid
20
+ }
21
+ }), b = S(() => [
17
22
  // Always add the default environment
18
- m.default,
19
- ...Object.values(m).filter((a) => a.uid !== "default")
23
+ u.default,
24
+ ...Object.values(u).filter((a) => a.uid !== "default")
20
25
  ]);
21
26
  return (a, o) => (c(), f("div", null, [
22
27
  n(e(z), null, {
23
28
  items: r(() => [
24
- (c(!0), f(N, null, D(b.value, (t) => (c(), v(e(u), {
29
+ (c(!0), f(N, null, D(b.value, (t) => (c(), v(e(m), {
25
30
  key: t.uid,
26
31
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
27
- onClick: x((R) => p(t.uid), ["stop"])
32
+ onClick: h(($) => p(t.uid), ["stop"])
28
33
  }, {
29
34
  default: r(() => [
30
35
  s("div", {
31
- class: h([
36
+ class: w([
32
37
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
33
38
  e(i).activeEnvironmentId === t.uid ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
34
39
  ])
@@ -39,17 +44,17 @@ const W = { class: "font-medium m-0 text-xs flex gap-1.5 items-center whitespace
39
44
  thickness: "3.5"
40
45
  })
41
46
  ], 2),
42
- d(" " + w(t.name), 1)
47
+ d(" " + x(t.name), 1)
43
48
  ]),
44
49
  _: 2
45
50
  }, 1032, ["onClick"]))), 128)),
46
- n(e(u), {
51
+ n(e(m), {
47
52
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
48
- onClick: o[0] || (o[0] = x((t) => p(""), ["stop"]))
53
+ onClick: o[0] || (o[0] = h((t) => p(""), ["stop"]))
49
54
  }, {
50
55
  default: r(() => [
51
56
  s("div", {
52
- class: h([
57
+ class: w([
53
58
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
54
59
  e(i).activeEnvironmentId === "" ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
55
60
  ])
@@ -65,13 +70,13 @@ const W = { class: "font-medium m-0 text-xs flex gap-1.5 items-center whitespace
65
70
  _: 1
66
71
  }),
67
72
  n(e(B)),
68
- e(C) ? j("", !0) : (c(), v(e(u), {
73
+ e(C) ? j("", !0) : (c(), v(e(m), {
69
74
  key: 0,
70
75
  class: "flex items-center gap-1.5",
71
76
  onClick: _
72
77
  }, {
73
78
  default: r(() => [
74
- s("div", $, [
79
+ s("div", O, [
75
80
  n(e(l), {
76
81
  icon: "Brackets",
77
82
  size: "sm"
@@ -92,7 +97,7 @@ const W = { class: "font-medium m-0 text-xs flex gap-1.5 items-center whitespace
92
97
  var t;
93
98
  return [
94
99
  s("h2", W, [
95
- d(w(((t = e(g)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
100
+ d(x(((t = e(g)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
96
101
  n(e(l), {
97
102
  class: "size-3",
98
103
  icon: "ChevronDown",
@@ -1,9 +1,9 @@
1
- import { defineComponent as m, openBlock as t, createBlock as o, withCtx as l, createElementBlock as n, toDisplayString as s, renderSlot as p, createElementVNode as c, Fragment as i, renderList as u, normalizeClass as f, createVNode as _, createTextVNode as k, createCommentVNode as y } from "vue";
2
- import h from "../DataTable/DataTable.vue.js";
3
- import V from "../DataTable/DataTableInput.vue.js";
1
+ import { defineComponent as m, openBlock as t, createBlock as a, withCtx as l, createElementBlock as n, toDisplayString as d, renderSlot as p, createElementVNode as c, Fragment as i, renderList as u, normalizeClass as f, createVNode as _, createTextVNode as k, createCommentVNode as y } from "vue";
2
+ import V from "../DataTable/DataTable.vue.js";
3
+ import h from "../DataTable/DataTableInput.vue.js";
4
4
  import b from "../DataTable/DataTableRow.vue.js";
5
5
  import g from "../ViewLayout/ViewLayoutSection.vue.js";
6
- const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5 p-2 md:p-5" }, w = /* @__PURE__ */ m({
6
+ const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5 p-2 md:p-5" }, E = /* @__PURE__ */ m({
7
7
  __name: "Form",
8
8
  props: {
9
9
  title: {},
@@ -11,30 +11,30 @@ const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5 p
11
11
  data: {},
12
12
  onUpdate: { type: Function }
13
13
  },
14
- setup(U) {
15
- return (e, B) => (t(), o(g, null, {
14
+ setup(S) {
15
+ return (e, U) => (t(), a(g, null, {
16
16
  title: l(() => [
17
- e.title ? (t(), n("span", C, s(e.title), 1)) : p(e.$slots, "title", { key: 1 })
17
+ e.title ? (t(), n("span", C, d(e.title), 1)) : p(e.$slots, "title", { key: 1 })
18
18
  ]),
19
19
  default: l(() => [
20
20
  c("div", N, [
21
- Object.keys(e.data).length > 0 ? (t(), o(h, {
21
+ Object.keys(e.data).length > 0 ? (t(), a(V, {
22
22
  key: 0,
23
23
  columns: [""]
24
24
  }, {
25
25
  default: l(() => [
26
- (t(!0), n(i, null, u(e.options, (a, r) => (t(), o(b, {
26
+ (t(!0), n(i, null, u(e.options, (o, r) => (t(), a(b, {
27
27
  key: r,
28
28
  class: f({ "border-t": r === 0 })
29
29
  }, {
30
30
  default: l(() => [
31
- _(V, {
32
- modelValue: String(e.data[a.key] ?? ""),
33
- placeholder: a.placeholder,
34
- "onUpdate:modelValue": (d) => e.onUpdate(a.key, d)
31
+ _(h, {
32
+ modelValue: String(e.data[o.key] ?? ""),
33
+ placeholder: o.placeholder,
34
+ "onUpdate:modelValue": (s) => e.onUpdate(o.key, s)
35
35
  }, {
36
36
  default: l(() => [
37
- k(s(a.label), 1)
37
+ k(d(o.label), 1)
38
38
  ]),
39
39
  _: 2
40
40
  }, 1032, ["modelValue", "placeholder", "onUpdate:modelValue"])
@@ -51,5 +51,5 @@ const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5 p
51
51
  }
52
52
  });
53
53
  export {
54
- w as default
54
+ E as default
55
55
  };
@@ -4,9 +4,9 @@ type __VLS_Props = {
4
4
  isEditable?: boolean;
5
5
  };
6
6
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- change: (value: "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace") => any;
7
+ change: (value: "head" | "delete" | "get" | "connect" | "options" | "patch" | "post" | "put" | "trace") => any;
8
8
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onChange?: ((value: "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace") => any) | undefined;
9
+ onChange?: ((value: "head" | "delete" | "get" | "connect" | "options" | "patch" | "post" | "put" | "trace") => any) | undefined;
10
10
  }>, {
11
11
  isSquare: boolean;
12
12
  isEditable: boolean;
@@ -1,7 +1,7 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
- input: (value: string) => any;
2
+ input: (value: string, integration: null, eventType: "drop") => any;
3
3
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
- onInput?: ((value: string) => any) | undefined;
4
+ onInput?: ((value: string, integration: null, eventType: "drop") => any) | undefined;
5
5
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
6
  export default _default;
7
7
  //# sourceMappingURL=DropEventListener.vue.d.ts.map
@@ -7,26 +7,26 @@ const A = {
7
7
  __name: "DropEventListener",
8
8
  emits: ["input"],
9
9
  setup(B, { emit: v }) {
10
- const d = v, r = y(!1);
10
+ const l = v, r = y(!1);
11
11
  let o = 0;
12
12
  x(() => {
13
13
  document.addEventListener("dragenter", m), document.addEventListener("dragleave", f), document.addEventListener("dragover", u), document.addEventListener("drop", c);
14
14
  }), h(() => {
15
15
  document.removeEventListener("dragenter", m), document.removeEventListener("dragover", u), document.removeEventListener("dragleave", f), document.removeEventListener("drop", c);
16
16
  });
17
- function l(e) {
17
+ function d(e) {
18
18
  var t;
19
19
  return ((t = e.dataTransfer) == null ? void 0 : t.types.includes("text/html")) ?? !1;
20
20
  }
21
21
  async function c(e) {
22
- if (e.preventDefault(), r.value = !1, o = 0, !l(e) && e.dataTransfer) {
22
+ if (e.preventDefault(), r.value = !1, o = 0, !d(e) && e.dataTransfer) {
23
23
  const t = e.dataTransfer.getData("text").replace(/^blob:/, "");
24
24
  if (t)
25
- d("input", t);
25
+ l("input", t, null, "drop");
26
26
  else if (e.dataTransfer.files.length > 0) {
27
27
  const a = e.dataTransfer.files[0], n = new FileReader();
28
28
  n.onload = async (s) => {
29
- s.target && typeof s.target.result == "string" && d("input", s.target.result);
29
+ s.target && typeof s.target.result == "string" && l("input", s.target.result, null, "drop");
30
30
  }, n.readAsText(a);
31
31
  }
32
32
  }
@@ -38,7 +38,7 @@ const A = {
38
38
  e.preventDefault(), o--, o === 0 && (r.value = !1);
39
39
  }
40
40
  function m(e) {
41
- if (e.preventDefault(), o++, !l(e)) {
41
+ if (e.preventDefault(), o++, !d(e)) {
42
42
  if (e.dataTransfer) {
43
43
  const t = e.dataTransfer.items;
44
44
  for (let a = 0; a < t.length; a++) {
@@ -1 +1 @@
1
- {"version":3,"file":"ImportCollectionListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionListener.vue"],"names":[],"mappings":"AA0FA,iBAAS,cAAc;WAqHT,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ImportCollectionListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionListener.vue"],"names":[],"mappings":"AAqGA,iBAAS,cAAc;WAqHT,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,32 +1,33 @@
1
- import { defineComponent as u, ref as i, openBlock as c, createElementBlock as m, Fragment as s, createVNode as n, renderSlot as p, nextTick as f } from "vue";
2
- import _ from "./DropEventListener.vue.js";
3
- import d from "./ImportCollectionModal.vue.js";
1
+ import { defineComponent as m, ref as r, openBlock as s, createElementBlock as p, Fragment as f, createVNode as n, renderSlot as _, nextTick as v } from "vue";
2
+ import d from "./DropEventListener.vue.js";
3
+ import I from "./ImportCollectionModal.vue.js";
4
4
  /* empty css */
5
- import v from "./PasteEventListener.vue.js";
6
- import I from "./UrlQueryParameterChecker.vue.js";
7
- const B = /* @__PURE__ */ u({
5
+ import y from "./PasteEventListener.vue.js";
6
+ import $ from "./UrlQueryParameterChecker.vue.js";
7
+ const C = /* @__PURE__ */ m({
8
8
  __name: "ImportCollectionListener",
9
- setup($) {
10
- const e = i(null), t = i(null);
11
- async function a() {
12
- e.value = null, t.value = null, await f();
9
+ setup(g) {
10
+ const e = r(null), t = r(null), o = r(null);
11
+ async function u() {
12
+ e.value = null, t.value = null, o.value = null, await v();
13
13
  }
14
- async function o(r, l = null) {
15
- await a(), e.value = r, t.value = l;
14
+ async function l(a, i = null, c) {
15
+ await u(), e.value = a, t.value = i, o.value = c;
16
16
  }
17
- return (r, l) => (c(), m(s, null, [
18
- n(d, {
17
+ return (a, i) => (s(), p(f, null, [
18
+ n(I, {
19
+ eventType: o.value,
19
20
  integration: t.value,
20
21
  source: e.value,
21
- onImportFinished: a
22
- }, null, 8, ["integration", "source"]),
23
- n(v, { onInput: o }),
24
- n(_, { onInput: o }),
25
- n(I, { onInput: o }),
26
- p(r.$slots, "default")
22
+ onImportFinished: u
23
+ }, null, 8, ["eventType", "integration", "source"]),
24
+ n(y, { onInput: l }),
25
+ n(d, { onInput: l }),
26
+ n($, { onInput: l }),
27
+ _(a.$slots, "default")
27
28
  ], 64));
28
29
  }
29
30
  });
30
31
  export {
31
- B as default
32
+ C as default
32
33
  };
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  source: string | null;
3
3
  integration: string | null;
4
+ eventType: 'drop' | 'paste' | 'query' | null;
4
5
  };
5
6
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
7
  importFinished: () => any;
@@ -1 +1 @@
1
- {"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":"AA+SA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B,CAAC;;;;;;AAwWF,wBAQG"}
1
+ {"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":"AAyUA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,CAAA;CAC7C,CAAC;;;;;;AAiYF,wBAQG"}
@@ -1,128 +1,141 @@
1
- import { defineComponent as z, ref as S, computed as i, watch as p, onMounted as B, onUnmounted as F, openBlock as c, createBlock as g, unref as r, withCtx as O, createElementVNode as t, normalizeClass as T, createElementBlock as m, Fragment as f, createVNode as a, createCommentVNode as x, toDisplayString as q, createTextVNode as w } from "vue";
2
- import E from "../CommandPalette/WatchModeToggle.vue.js";
1
+ import { defineComponent as j, ref as z, computed as l, watch as f, onMounted as S, onUnmounted as B, openBlock as c, createBlock as g, unref as i, withCtx as E, createElementVNode as t, normalizeClass as F, createElementBlock as m, Fragment as x, createVNode as a, createCommentVNode as h, toDisplayString as q, createTextVNode as k } from "vue";
2
+ import R from "../CommandPalette/WatchModeToggle.vue.js";
3
3
  import W from "./ImportNowButton.vue.js";
4
4
  import K from "./IntegrationLogo.vue.js";
5
- import R from "./PrefetchError.vue.js";
6
- import G from "./WorkspaceSelector.vue.js";
7
- import { useUrlPrefetcher as H } from "./hooks/useUrlPrefetcher.js";
8
- import { getOpenApiDocumentVersion as k } from "./utils/getOpenApiDocumentVersion.js";
9
- import { isDocument as I } from "./utils/isDocument.js";
10
- import { isUrl as h } from "./utils/isUrl.js";
11
- import { useModal as J, ScalarModal as Q, ScalarIcon as X } from "@scalar/components";
12
- import { isLocalUrl as Y } from "@scalar/oas-utils/helpers";
13
- import { normalize as Z } from "@scalar/openapi-parser";
14
- import { useWorkspace as ee } from "../../store/store.js";
15
- const te = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, oe = { class: "text-center text-md font-bold mb-2 line-clamp-1" }, se = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, ne = { class: "flex justify-center" }, re = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, le = {
5
+ import G from "./PrefetchError.vue.js";
6
+ import H from "./WorkspaceSelector.vue.js";
7
+ import { useUrlPrefetcher as J } from "./hooks/useUrlPrefetcher.js";
8
+ import { getOpenApiDocumentVersion as I } from "./utils/getOpenApiDocumentVersion.js";
9
+ import { isDocument as U } from "./utils/isDocument.js";
10
+ import { isUrl as A } from "./utils/isUrl.js";
11
+ import { useModal as Q, ScalarModal as X, ScalarIcon as Y } from "@scalar/components";
12
+ import { isLocalUrl as Z } from "@scalar/oas-utils/helpers";
13
+ import { normalize as ee } from "@scalar/openapi-parser";
14
+ import { useWorkspace as te } from "../../store/store.js";
15
+ const oe = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, se = { class: "text-center text-md font-bold mb-2 line-clamp-1" }, re = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, ne = { class: "flex justify-center" }, ie = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, le = {
16
16
  key: 0,
17
17
  class: "text-sm overflow-hidden mt-5 pt-4 border-t-1/2"
18
- }, ie = { class: "flex items-center justify-center" }, ce = { class: "flex flex-col justify-center items-center pb-8" }, ae = { class: "text-center flex items-center flex-col" }, me = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, de = {
18
+ }, ce = { class: "flex items-center justify-center" }, ae = { class: "flex flex-col justify-center items-center pb-8" }, de = { class: "text-center flex items-center flex-col" }, me = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, ue = {
19
19
  href: "https://scalar.com/download",
20
20
  target: "_blank"
21
- }, Le = /* @__PURE__ */ z({
21
+ }, Le = /* @__PURE__ */ j({
22
22
  __name: "ImportCollectionModal",
23
23
  props: {
24
24
  source: {},
25
- integration: {}
25
+ integration: {},
26
+ eventType: {}
26
27
  },
27
28
  emits: ["importFinished"],
28
- setup(A) {
29
- const n = A, { activeWorkspace: L, events: U } = ee(), { prefetchResult: s, prefetchUrl: C } = H(), l = J(), d = S(!0);
30
- U.hotKeys.on(() => l.hide());
31
- const M = i(() => {
29
+ setup(L) {
30
+ const s = L, { activeWorkspace: v, events: P } = te(), { prefetchResult: r, prefetchUrl: y, resetPrefetchResult: C } = J(), n = Q(), u = z(!0);
31
+ P.hotKeys.on(() => n.hide());
32
+ const D = l(() => {
32
33
  try {
33
- return Z(
34
- s.content || n.source || ""
34
+ return ee(
35
+ r.content || s.source || ""
35
36
  );
36
37
  } catch {
37
38
  return;
38
39
  }
39
- }), V = i(() => {
40
+ }), M = l(() => {
40
41
  var o, e;
41
- return (e = (o = M.value) == null ? void 0 : o.info) == null ? void 0 : e.title;
42
- }), v = i(
43
- () => k(s.content || n.source || "")
42
+ return (e = (o = D.value) == null ? void 0 : o.info) == null ? void 0 : e.title;
43
+ }), b = l(
44
+ () => I(r.content || s.source || "")
44
45
  );
45
- p(
46
- () => n.source,
47
- (o) => {
48
- h(o) && C(o, L.value.proxyUrl), o && (h(o) || I(o) && k(o)) ? l.show() : l.hide();
46
+ f(
47
+ () => s.source,
48
+ async (o) => {
49
+ if (C(), A(o)) {
50
+ if (s.eventType && ["paste", "drop"].includes(s.eventType)) {
51
+ const { error: d } = await y(
52
+ o,
53
+ v.value.proxyUrl
54
+ );
55
+ d ? n.hide() : n.show();
56
+ return;
57
+ }
58
+ y(o, v.value.proxyUrl), n.show();
59
+ return;
60
+ }
61
+ o && U(o) && I(o) ? n.show() : n.hide();
49
62
  }
50
63
  );
51
- const D = i(() => !!n.source && h(n.source)), N = i(() => !!n.source && I(n.source)), P = i(() => s.url && Y(s.url)), u = (o) => {
52
- document.body.classList.remove("has-no-import-url"), (D.value || N.value) && l.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
53
- }, $ = () => {
64
+ const V = l(() => !!s.source && A(s.source)), N = l(() => !!s.source && U(s.source)), O = l(() => r.url && Z(r.url)), p = (o) => {
65
+ document.body.classList.remove("has-no-import-url"), (V.value || N.value) && n.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
66
+ }, T = () => {
54
67
  document.body.classList.remove("has-import-url"), document.body.classList.add("has-no-import-url");
55
68
  };
56
- return p(
57
- () => l.open,
69
+ return f(
70
+ () => n.open,
58
71
  (o) => {
59
- o ? u() : $();
72
+ o ? p() : T();
60
73
  }
61
- ), p(
62
- () => n.source,
74
+ ), f(
75
+ () => s.source,
63
76
  () => {
64
- u();
77
+ p();
65
78
  }
66
- ), B(() => {
67
- u();
68
- }), F(() => {
79
+ ), S(() => {
80
+ p();
81
+ }), B(() => {
69
82
  document.body.classList.remove("has-import-url"), document.body.classList.remove("has-no-import-url");
70
- }), (o, e) => (c(), g(r(Q), {
83
+ }), (o, e) => (c(), g(i(X), {
71
84
  size: "full",
72
- state: r(l)
85
+ state: i(n)
73
86
  }, {
74
- default: O(() => {
75
- var y, b, _;
87
+ default: E(() => {
88
+ var d, _, w;
76
89
  return [
77
- t("div", te, [
90
+ t("div", oe, [
78
91
  t("div", {
79
- class: T(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": r(s).state === "loading" }])
92
+ class: F(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": i(r).state === "loading" }])
80
93
  }, [
81
- r(s).error && r(s).state === "idle" && !v.value ? (c(), m(f, { key: 0 }, [
94
+ i(r).error && i(r).state === "idle" && !b.value ? (c(), m(x, { key: 0 }, [
82
95
  e[2] || (e[2] = t("div", { class: "text-center text-md font-bold mb-2 line-clamp-1" }, " No OpenAPI document found ", -1)),
83
- a(R, {
84
- url: ((y = r(s)) == null ? void 0 : y.input) || n.source
96
+ a(G, {
97
+ url: ((d = i(r)) == null ? void 0 : d.input) || s.source
85
98
  }, null, 8, ["url"])
86
- ], 64)) : (c(), m(f, { key: 1 }, [
87
- P.value ? (c(), g(K, {
99
+ ], 64)) : (c(), m(x, { key: 1 }, [
100
+ O.value ? (c(), g(K, {
88
101
  key: 0,
89
102
  integration: o.integration
90
- }, null, 8, ["integration"])) : x("", !0),
91
- t("div", oe, q(V.value || "Untitled Collection"), 1),
103
+ }, null, 8, ["integration"])) : h("", !0),
104
+ t("div", se, q(M.value || "Untitled Collection"), 1),
92
105
  e[5] || (e[5] = t("div", { class: "text-c-1 text-sm font-medium text-center text-balance" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
93
- v.value ? (c(), m(f, { key: 1 }, [
94
- t("div", se, [
106
+ b.value ? (c(), m(x, { key: 1 }, [
107
+ t("div", re, [
95
108
  a(W, {
96
- source: ((b = r(s)) == null ? void 0 : b.url) ?? o.source,
109
+ source: ((_ = i(r)) == null ? void 0 : _.url) ?? o.source,
97
110
  variant: "button",
98
- watchMode: d.value,
111
+ watchMode: u.value,
99
112
  onImportFinished: e[0] || (e[0] = () => o.$emit("importFinished"))
100
113
  }, null, 8, ["source", "watchMode"])
101
114
  ]),
102
115
  t("div", ne, [
103
- t("div", re, [
104
- e[3] || (e[3] = w(" Import to: ")),
105
- a(G)
116
+ t("div", ie, [
117
+ e[3] || (e[3] = k(" Import to: ")),
118
+ a(H)
106
119
  ])
107
120
  ]),
108
- (_ = r(s)) != null && _.url ? (c(), m("div", le, [
109
- t("div", ie, [
110
- a(E, {
111
- modelValue: d.value,
112
- "onUpdate:modelValue": e[1] || (e[1] = (j) => d.value = j),
121
+ (w = i(r)) != null && w.url ? (c(), m("div", le, [
122
+ t("div", ce, [
123
+ a(R, {
124
+ modelValue: u.value,
125
+ "onUpdate:modelValue": e[1] || (e[1] = ($) => u.value = $),
113
126
  disableToolTip: !0
114
127
  }, null, 8, ["modelValue"])
115
128
  ]),
116
129
  e[4] || (e[4] = t("div", { class: "pt-0 text-center text-balance font-medium text-xs text-c-3" }, " Automatically update your API client when the OpenAPI document content changes. ", -1))
117
- ])) : x("", !0)
118
- ], 64)) : x("", !0)
130
+ ])) : h("", !0)
131
+ ], 64)) : h("", !0)
119
132
  ], 64))
120
133
  ], 2),
121
- t("div", ce, [
122
- t("div", ae, [
134
+ t("div", ae, [
135
+ t("div", de, [
123
136
  t("div", me, [
124
- t("a", de, [
125
- a(r(X), {
137
+ t("a", ue, [
138
+ a(i(Y), {
126
139
  icon: "Logo",
127
140
  size: "xl"
128
141
  })
@@ -135,7 +148,7 @@ const te = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden
135
148
  target: "_blank"
136
149
  }, " Download Desktop App "),
137
150
  t("br"),
138
- w(" free · open-source · offline first ")
151
+ k(" free · open-source · offline first ")
139
152
  ], -1))
140
153
  ])
141
154
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":"AA8GA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AA6KF,wBAOG"}
1
+ {"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":"AA+GA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AA8KF,wBAOG"}
@@ -1,5 +1,5 @@
1
- import { defineComponent as C, openBlock as s, createElementBlock as v, Fragment as b, createBlock as u, unref as m, withCtx as p, createTextVNode as c, createCommentVNode as g } from "vue";
2
- import { isUrl as x } from "./utils/isUrl.js";
1
+ import { defineComponent as C, openBlock as s, createElementBlock as v, Fragment as x, createBlock as u, unref as p, withCtx as m, createTextVNode as c, createCommentVNode as b } from "vue";
2
+ import { isUrl as g } from "./utils/isUrl.js";
3
3
  import { ScalarButton as l } from "@scalar/components";
4
4
  import { useToasts as B } from "@scalar/use-toasts";
5
5
  import { useRouter as F } from "vue-router";
@@ -13,15 +13,16 @@ const z = /* @__PURE__ */ C({
13
13
  },
14
14
  emits: ["importFinished"],
15
15
  setup(f, { emit: d }) {
16
- const o = f, k = d, w = F(), { importSpecFromUrl: y, importSpecFile: h, activeWorkspace: r } = I(), { toast: n } = B();
16
+ const o = f, y = d, k = F(), { importSpecFromUrl: w, importSpecFile: h, activeWorkspace: r } = I(), { toast: n } = B();
17
17
  async function i() {
18
18
  try {
19
19
  if (o.source) {
20
- if (x(o.source)) {
21
- const [e, t] = await y(
20
+ if (g(o.source)) {
21
+ const [e, t] = await w(
22
22
  o.source,
23
23
  r.value.uid,
24
24
  {
25
+ proxy: r.value.proxyUrl,
25
26
  watchMode: o.watchMode
26
27
  }
27
28
  );
@@ -33,7 +34,7 @@ const z = /* @__PURE__ */ C({
33
34
  );
34
35
  a(e);
35
36
  }
36
- n("Import successful", "info"), k("importFinished");
37
+ n("Import successful", "info"), y("importFinished");
37
38
  }
38
39
  } catch (e) {
39
40
  console.error("[importCollection]", e);
@@ -42,7 +43,7 @@ const z = /* @__PURE__ */ C({
42
43
  }
43
44
  }
44
45
  function a(e) {
45
- e && w.push({
46
+ e && k.push({
46
47
  name: "request",
47
48
  params: {
48
49
  workspace: r.value.uid,
@@ -50,19 +51,19 @@ const z = /* @__PURE__ */ C({
50
51
  }
51
52
  });
52
53
  }
53
- return (e, t) => e.source ? (s(), v(b, { key: 0 }, [
54
- e.variant === "button" ? (s(), u(m(l), {
54
+ return (e, t) => e.source ? (s(), v(x, { key: 0 }, [
55
+ e.variant === "button" ? (s(), u(p(l), {
55
56
  key: 0,
56
57
  class: "py-2.5 px-6 rounded-lg font-bold h-fit mt-3 w-full",
57
58
  size: "md",
58
59
  type: "button",
59
60
  onClick: i
60
61
  }, {
61
- default: p(() => t[0] || (t[0] = [
62
+ default: m(() => t[0] || (t[0] = [
62
63
  c(" Import Collection ")
63
64
  ])),
64
65
  _: 1
65
- })) : (s(), u(m(l), {
66
+ })) : (s(), u(p(l), {
66
67
  key: 1,
67
68
  class: "text-[21px] py-2.5 px-6 rounded-lg font-bold h-fit",
68
69
  size: "md",
@@ -70,12 +71,12 @@ const z = /* @__PURE__ */ C({
70
71
  variant: "ghost",
71
72
  onClick: i
72
73
  }, {
73
- default: p(() => t[1] || (t[1] = [
74
+ default: m(() => t[1] || (t[1] = [
74
75
  c(" Try it in the browser ")
75
76
  ])),
76
77
  _: 1
77
78
  }))
78
- ], 64)) : g("", !0);
79
+ ], 64)) : b("", !0);
79
80
  }
80
81
  });
81
82
  export {
@@ -1,7 +1,7 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
- input: (value: string) => any;
2
+ input: (value: string, integration: null, eventType: "paste") => any;
3
3
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
- onInput?: ((value: string) => any) | undefined;
4
+ onInput?: ((value: string, integration: null, eventType: "paste") => any) | undefined;
5
5
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
6
  export default _default;
7
7
  //# sourceMappingURL=PasteEventListener.vue.d.ts.map