@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,10 +1,10 @@
1
- import { defineComponent as r, onMounted as s, onBeforeUnmount as c } from "vue";
2
- const u = /* @__PURE__ */ r({
1
+ import { defineComponent as i, onMounted as r, onBeforeUnmount as c } from "vue";
2
+ const u = /* @__PURE__ */ i({
3
3
  __name: "PasteEventListener",
4
4
  emits: ["input"],
5
5
  setup(m, { emit: o }) {
6
- const i = o;
7
- s(() => {
6
+ const s = o;
7
+ r(() => {
8
8
  document.addEventListener("paste", n);
9
9
  }), c(() => {
10
10
  document.removeEventListener("paste", n);
@@ -13,7 +13,7 @@ const u = /* @__PURE__ */ r({
13
13
  const t = e.target;
14
14
  if (!(t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable)) && e.clipboardData) {
15
15
  const a = e.clipboardData.getData("text");
16
- a && i("input", a);
16
+ a && s("input", a, null, "paste");
17
17
  }
18
18
  }
19
19
  return (e, t) => null;
@@ -1,7 +1,7 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
- input: (url: string, integration: string | null) => any;
2
+ input: (url: string, integration: string | null, eventType: "query") => any;
3
3
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
- onInput?: ((url: string, integration: string | null) => any) | undefined;
4
+ onInput?: ((url: string, integration: string | null, eventType: "query") => any) | undefined;
5
5
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
6
  export default _default;
7
7
  //# sourceMappingURL=UrlQueryParameterChecker.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;AA8FA,wBAMG"}
1
+ {"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;AAkHA,wBAMG"}
@@ -2,12 +2,17 @@ import { defineComponent as a, onMounted as o } from "vue";
2
2
  const c = /* @__PURE__ */ a({
3
3
  __name: "UrlQueryParameterChecker",
4
4
  emits: ["input"],
5
- setup(i, { emit: r }) {
6
- const n = r;
5
+ setup(u, { emit: t }) {
6
+ const n = t;
7
7
  return o(() => {
8
- const e = new URLSearchParams(window.location.search), t = e.get("url");
9
- t && n("input", t, e.get("integration"));
10
- }), (e, t) => null;
8
+ const e = new URLSearchParams(window.location.search), r = e.get("url");
9
+ r && n(
10
+ "input",
11
+ r,
12
+ e.get("integration"),
13
+ "query"
14
+ );
15
+ }), (e, r) => null;
11
16
  }
12
17
  });
13
18
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AAiaA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA2bA,wBAKG"}
@@ -1,77 +1,87 @@
1
- import { defineComponent as y, ref as D, openBlock as d, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as r, renderList as W, createBlock as N, withModifiers as h, normalizeClass as M, toDisplayString as k, withDirectives as $, vModelText as z, createTextVNode as B } from "vue";
2
- import { useModal as V, ScalarDropdown as j, ScalarDropdownItem as v, ScalarIcon as u, ScalarDropdownDivider as T, ScalarButton as _, ScalarModal as E } from "@scalar/components";
1
+ import { defineComponent as y, ref as W, openBlock as d, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as o, renderList as D, createBlock as N, withModifiers as k, normalizeClass as M, toDisplayString as h, withDirectives as z, vModelText as B, createTextVNode as V } from "vue";
2
+ import { useModal as j, ScalarDropdown as T, ScalarDropdownItem as v, ScalarIcon as m, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as E } from "@scalar/components";
3
3
  import { useToasts as I } from "@scalar/use-toasts";
4
4
  import { useRouter as A } from "vue-router";
5
5
  import { useWorkspace as F } from "../../store/store.js";
6
6
  const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, R = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, U = { class: "text-ellipsis overflow-hidden" }, q = { class: "flex items-center justify-center h-4 w-4" }, Y = /* @__PURE__ */ y({
7
7
  __name: "WorkspaceSelector",
8
8
  setup(G) {
9
- const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push: m } = A(), c = V(), { toast: f } = I(), a = D(""), C = (l) => {
10
- l !== i.value.uid && m(`/workspace/${l}`);
9
+ const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push: u } = A(), c = j(), { toast: f } = I(), r = W(""), C = (n) => {
10
+ n !== i.value.uid && u({
11
+ name: "workspace",
12
+ params: {
13
+ workspace: n
14
+ }
15
+ });
11
16
  }, S = () => {
12
- if (!a.value.trim()) {
17
+ if (!r.value.trim()) {
13
18
  f("Please enter a name before creating a workspace.", "error");
14
19
  return;
15
20
  }
16
- const l = g.add({
17
- name: a.value
21
+ const n = g.add({
22
+ name: r.value
18
23
  });
19
- m(`/workspace/${l.uid}`), f(`Created new workspace '${a.value}'`), a.value = "", c.hide();
24
+ f(`Created new workspace '${n.name}'`), u({
25
+ name: "workspace",
26
+ params: {
27
+ workspace: n.uid
28
+ }
29
+ }), r.value = "", c.hide();
20
30
  };
21
- return (l, o) => (d(), x(w, null, [
31
+ return (n, a) => (d(), x(w, null, [
22
32
  t("div", L, [
23
- s(e(j), null, {
24
- items: r(() => [
25
- (d(!0), x(w, null, W(e(b), (n, p) => (d(), N(e(v), {
33
+ s(e(T), null, {
34
+ items: o(() => [
35
+ (d(!0), x(w, null, D(e(b), (l, p) => (d(), N(e(v), {
26
36
  key: p,
27
37
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
28
- onClick: h((H) => C(p), ["stop"])
38
+ onClick: k((H) => C(p), ["stop"])
29
39
  }, {
30
- default: r(() => [
40
+ default: o(() => [
31
41
  t("div", {
32
42
  class: M([
33
43
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
34
44
  e(i).uid === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
35
45
  ])
36
46
  }, [
37
- s(e(u), {
47
+ s(e(m), {
38
48
  class: "size-2.5",
39
49
  icon: "Checkmark",
40
50
  thickness: "3.5"
41
51
  })
42
52
  ], 2),
43
- t("span", U, k(n.name), 1)
53
+ t("span", U, h(l.name), 1)
44
54
  ]),
45
55
  _: 2
46
56
  }, 1032, ["onClick"]))), 128)),
47
- s(e(T)),
57
+ s(e($)),
48
58
  s(e(v), {
49
59
  class: "flex items-center gap-1.5",
50
- onClick: o[0] || (o[0] = (n) => e(c).show())
60
+ onClick: a[0] || (a[0] = (l) => e(c).show())
51
61
  }, {
52
- default: r(() => [
62
+ default: o(() => [
53
63
  t("div", q, [
54
- s(e(u), {
64
+ s(e(m), {
55
65
  class: "h-2.5",
56
66
  icon: "Add",
57
67
  thickness: "3"
58
68
  })
59
69
  ]),
60
- o[2] || (o[2] = t("span", null, "New Workspace", -1))
70
+ a[2] || (a[2] = t("span", null, "New Workspace", -1))
61
71
  ]),
62
72
  _: 1
63
73
  })
64
74
  ]),
65
- default: r(() => [
75
+ default: o(() => [
66
76
  s(e(_), {
67
77
  class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
68
78
  fullWidth: "",
69
79
  variant: "ghost"
70
80
  }, {
71
- default: r(() => [
81
+ default: o(() => [
72
82
  t("div", P, [
73
- t("h2", R, k(e(i).name), 1),
74
- s(e(u), {
83
+ t("h2", R, h(e(i).name), 1),
84
+ s(e(m), {
75
85
  class: "size-3",
76
86
  icon: "ChevronDown",
77
87
  thickness: "3"
@@ -90,26 +100,26 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
90
100
  state: e(c),
91
101
  variant: "form"
92
102
  }, {
93
- default: r(() => [
103
+ default: o(() => [
94
104
  t("form", {
95
105
  class: "flex gap-1 rounded",
96
- onSubmit: h(S, ["prevent"])
106
+ onSubmit: k(S, ["prevent"])
97
107
  }, [
98
- $(t("input", {
99
- "onUpdate:modelValue": o[1] || (o[1] = (n) => a.value = n),
108
+ z(t("input", {
109
+ "onUpdate:modelValue": a[1] || (a[1] = (l) => r.value = l),
100
110
  class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
101
111
  placeholder: "New Workspace",
102
112
  type: "text"
103
113
  }, null, 512), [
104
- [z, a.value]
114
+ [B, r.value]
105
115
  ]),
106
116
  s(e(_), {
107
117
  class: "max-h-8 text-xs p-0 px-3",
108
- disabled: !a.value.trim(),
118
+ disabled: !r.value.trim(),
109
119
  type: "submit"
110
120
  }, {
111
- default: r(() => o[3] || (o[3] = [
112
- B(" Continue ")
121
+ default: o(() => a[3] || (a[3] = [
122
+ V(" Continue ")
113
123
  ])),
114
124
  _: 1
115
125
  }, 8, ["disabled"])
@@ -35,5 +35,6 @@ export declare function useUrlPrefetcher(): {
35
35
  input: string;
36
36
  error: any;
37
37
  }>;
38
+ resetPrefetchResult: () => Promise<void>;
38
39
  };
39
40
  //# sourceMappingURL=useUrlPrefetcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAuGX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;;;;;;;;;EAmBjB"}
1
+ {"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAiHX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;;;;;;;;;;EAoBjB"}
@@ -1,16 +1,25 @@
1
- import { resolve as a } from "@scalar/import";
2
- import { redirectToProxy as i, fetchWithProxyFallback as f } from "@scalar/oas-utils/helpers";
3
- import { reactive as d } from "vue";
4
- import { isUrl as h } from "../../../libs/isUrl.js";
5
- function v() {
6
- const l = d({
1
+ import { resolve as i } from "@scalar/import";
2
+ import { redirectToProxy as f, fetchWithProxyFallback as d } from "@scalar/oas-utils/helpers";
3
+ import { reactive as h } from "vue";
4
+ import { isUrl as m } from "../../../libs/isUrl.js";
5
+ function b() {
6
+ const n = h({
7
7
  state: "idle",
8
8
  content: null,
9
9
  url: null,
10
10
  input: null,
11
11
  error: null
12
12
  });
13
- async function u(t, r) {
13
+ async function u() {
14
+ Object.assign(n, {
15
+ state: "idle",
16
+ content: null,
17
+ url: null,
18
+ input: null,
19
+ error: null
20
+ });
21
+ }
22
+ async function s(t, r) {
14
23
  if (!t)
15
24
  return {
16
25
  state: "idle",
@@ -20,8 +29,8 @@ function v() {
20
29
  error: null
21
30
  };
22
31
  try {
23
- const e = await a(t, {
24
- fetch: (c) => fetch(r ? i(r, c) : c, {
32
+ const e = await i(t, {
33
+ fetch: (c) => fetch(r ? f(r, c) : c, {
25
34
  cache: "no-cache"
26
35
  })
27
36
  });
@@ -35,7 +44,7 @@ function v() {
35
44
  input: t,
36
45
  error: `Could not find an OpenAPI document in ${t}`
37
46
  };
38
- if (!h(e))
47
+ if (!m(e))
39
48
  return {
40
49
  state: "idle",
41
50
  content: null,
@@ -43,13 +52,13 @@ function v() {
43
52
  input: t,
44
53
  error: "Oops, we got invalid content for the given URL."
45
54
  };
46
- const o = e, n = await f(o, {
55
+ const o = e, l = await d(o, {
47
56
  proxy: r,
48
57
  cache: "no-cache"
49
58
  });
50
- return n.ok ? {
59
+ return l.ok ? {
51
60
  state: "idle",
52
- content: await n.text(),
61
+ content: await l.text(),
53
62
  url: o,
54
63
  error: null
55
64
  } : {
@@ -57,7 +66,7 @@ function v() {
57
66
  content: null,
58
67
  url: null,
59
68
  input: t,
60
- error: `Couldn't fetch ${o}, got error ${[n.status, n.statusText].join(" ").trim()}.`
69
+ error: `Couldn't fetch ${o}, got error ${[l.status, l.statusText].join(" ").trim()}.`
61
70
  };
62
71
  } catch (e) {
63
72
  return console.error("[prefetchDocument]", e), {
@@ -69,22 +78,23 @@ function v() {
69
78
  };
70
79
  }
71
80
  }
72
- async function s(t, r) {
73
- Object.assign(l, {
81
+ async function a(t, r) {
82
+ Object.assign(n, {
74
83
  state: "loading",
75
84
  content: null,
76
85
  url: null,
77
86
  input: t,
78
87
  error: null
79
88
  });
80
- const e = await u(t, r);
81
- return Object.assign(l, e), e;
89
+ const e = await s(t, r);
90
+ return Object.assign(n, e), e;
82
91
  }
83
92
  return {
84
- prefetchResult: l,
85
- prefetchUrl: s
93
+ prefetchResult: n,
94
+ prefetchUrl: a,
95
+ resetPrefetchResult: u
86
96
  };
87
97
  }
88
98
  export {
89
- v as useUrlPrefetcher
99
+ b as useUrlPrefetcher
90
100
  };
@@ -11,6 +11,7 @@ export declare function useSearch(): {
11
11
  httpVerb: string;
12
12
  id: string;
13
13
  path: string;
14
+ link: string;
14
15
  }>[]>;
15
16
  selectedSearchResult: import("vue").Ref<number, number>;
16
17
  onSearchResultClick: (entry: FuseResult<{
@@ -19,6 +20,7 @@ export declare function useSearch(): {
19
20
  httpVerb: string;
20
21
  id: string;
21
22
  path: string;
23
+ link: string;
22
24
  }>) => void;
23
25
  fuseSearch: () => void;
24
26
  searchInputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAKd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;;;iCA4EsB,UAAU;eAhFrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;MA4E0C;sBA1CjC,IAAI;;;uCAKe,IAAI,GAAG,MAAM;;EAmExD"}
1
+ {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAKd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCA6EsB,UAAU;eAlFrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MA6E0C;sBA1CjC,IAAI;;;uCAKe,IAAI,GAAG,MAAM;;EAmExD"}
@@ -1,11 +1,11 @@
1
- import g from "fuse.js";
2
- import { ref as a, watch as T, computed as w, nextTick as x } from "vue";
1
+ import w from "fuse.js";
2
+ import { ref as a, watch as T, computed as W, nextTick as x } from "vue";
3
3
  import { useRouter as I } from "vue-router";
4
- import { useWorkspace as W } from "../../store/store.js";
5
- function F() {
6
- const p = I(), { activeWorkspaceRequests: f, requests: d } = W(), o = a([]), c = a([]), s = a(0), u = a(""), l = a(null), r = a([]), i = new g(o.value, {
4
+ import { useWorkspace as A } from "../../store/store.js";
5
+ function H() {
6
+ const m = I(), { activeWorkspace: f, activeWorkspaceRequests: d, requests: R } = A(), o = a([]), c = a([]), s = a(0), u = a(""), l = a(null), n = a([]), i = new w(o.value, {
7
7
  keys: ["title", "description", "body"]
8
- }), R = () => {
8
+ }), k = () => {
9
9
  u.value = "", s.value = 0, c.value = [], l.value instanceof HTMLInputElement && l.value.blur();
10
10
  }, S = (t) => {
11
11
  o.value = t.map((e) => ({
@@ -13,50 +13,51 @@ function F() {
13
13
  title: e.summary ?? e.method,
14
14
  description: e.description ?? "",
15
15
  httpVerb: e.method,
16
- path: e.path
16
+ path: e.path,
17
+ link: `/workspace/${f.value.uid}/request/${e.uid}`
17
18
  })), i.setCollection(o.value);
18
- }, k = () => {
19
+ }, b = () => {
19
20
  s.value = 0, c.value = i.search(u.value);
20
- }, b = (t) => {
21
- const e = t === "up" ? -1 : 1, v = n.value.length;
21
+ }, y = (t) => {
22
+ const e = t === "up" ? -1 : 1, v = r.value.length;
22
23
  s.value = (s.value + e + v) % v, x(() => {
23
- const m = r.value[s.value];
24
- m instanceof HTMLElement && m.scrollIntoView({
24
+ const p = n.value[s.value];
25
+ p instanceof HTMLElement && p.scrollIntoView({
25
26
  behavior: "smooth",
26
27
  block: "center"
27
28
  });
28
29
  });
29
- }, y = () => {
30
+ }, g = () => {
30
31
  s.value >= 0 && h(
31
- n.value[s.value]
32
+ r.value[s.value]
32
33
  );
33
34
  };
34
35
  T(
35
- f,
36
+ d,
36
37
  (t) => {
37
- S(t.map((e) => d[e]));
38
+ S(t.map((e) => R[e]));
38
39
  },
39
40
  { immediate: !0 }
40
41
  );
41
42
  const h = (t) => {
42
- p.push(t.item.id), R();
43
- }, n = w(
43
+ m.push(t.item.id), k();
44
+ }, r = W(
44
45
  () => u.value.length === 0 ? o.value.map((t) => ({
45
46
  item: t
46
47
  })) : c.value
47
48
  );
48
49
  return {
49
50
  searchText: u,
50
- searchResultsWithPlaceholderResults: n,
51
+ searchResultsWithPlaceholderResults: r,
51
52
  selectedSearchResult: s,
52
53
  onSearchResultClick: h,
53
- fuseSearch: k,
54
+ fuseSearch: b,
54
55
  searchInputRef: l,
55
- searchResultRefs: r,
56
- navigateSearchResults: b,
57
- selectSearchResult: y
56
+ searchResultRefs: n,
57
+ navigateSearchResults: y,
58
+ selectSearchResult: g
58
59
  };
59
60
  }
60
61
  export {
61
- F as useSearch
62
+ H as useSearch
62
63
  };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=DownloadAppButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DownloadAppButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/DownloadAppButton.vue"],"names":[],"mappings":";AA6IA,wBAMG"}
@@ -0,0 +1,7 @@
1
+ import o from "./DownloadAppButton.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c896207d"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as e, openBlock as a, createBlock as m, withCtx as o, createVNode as s, unref as t, createElementVNode as r, normalizeClass as c } from "vue";
2
+ import p from "./SideNavLink.vue.js";
3
+ import { ScalarIcon as l } from "@scalar/components";
4
+ import { useLayout as i } from "../../hooks/useLayout.js";
5
+ const h = /* @__PURE__ */ e({
6
+ __name: "DownloadAppButton",
7
+ setup(u) {
8
+ const { layout: n } = i();
9
+ return (d, _) => (a(), m(p, {
10
+ class: "download-app-button sm:px-3 gap-2 !px-3 !py-1.5",
11
+ href: "https://scalar.com/download?utm_source=web_client&utm_medium=download_button&utm_campaign=topnav",
12
+ icon: "Download",
13
+ target: "_blank"
14
+ }, {
15
+ icon: o(() => [
16
+ s(t(l), {
17
+ icon: "Download",
18
+ size: "sm",
19
+ thickness: "2"
20
+ })
21
+ ]),
22
+ default: o(() => [
23
+ r("span", {
24
+ class: c(["text-sm font-medium sr-only", { "sm:not-sr-only": t(n) === "web" }])
25
+ }, " Download App ", 2)
26
+ ]),
27
+ _: 1
28
+ }));
29
+ }
30
+ });
31
+ export {
32
+ h as default
33
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"SideHelp.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideHelp.vue"],"names":[],"mappings":";AAgUA,wBAMG"}
1
+ {"version":3,"file":"SideHelp.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideHelp.vue"],"names":[],"mappings":";AA2TA,wBAMG"}