@scalar/api-client 2.1.52 → 2.2.0

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 (190) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue2.js +35 -42
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
  10. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  11. package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
  12. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  13. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  14. package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
  15. package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
  16. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
  19. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
  21. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
  23. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
  25. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  26. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
  27. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
  28. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
  29. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  30. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  31. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
  32. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  33. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  34. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  35. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
  36. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  37. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  38. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
  39. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  40. package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
  41. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
  42. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  43. package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
  44. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  45. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
  46. package/dist/components/Search/useSearch.d.ts.map +1 -1
  47. package/dist/components/Search/useSearch.js +20 -19
  48. package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
  49. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  50. package/dist/components/TopNav/TopNav.vue.js +1 -1
  51. package/dist/components/TopNav/TopNav.vue2.js +20 -19
  52. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  53. package/dist/hooks/index.js +3 -2
  54. package/dist/hooks/useLayout.d.ts +2 -0
  55. package/dist/hooks/useLayout.d.ts.map +1 -1
  56. package/dist/hooks/useLayout.js +4 -3
  57. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  58. package/dist/layouts/App/ApiClientApp.vue.js +38 -37
  59. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  60. package/dist/layouts/App/MainLayout.vue.js +3 -3
  61. package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
  62. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  63. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  64. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  65. package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
  66. package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
  67. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  68. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  69. package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
  70. package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
  71. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  72. package/dist/libs/create-client.d.ts +673 -1236
  73. package/dist/libs/create-client.d.ts.map +1 -1
  74. package/dist/libs/create-client.js +91 -102
  75. package/dist/libs/hot-keys.d.ts +1 -1
  76. package/dist/libs/send-request.d.ts +2 -3
  77. package/dist/libs/send-request.d.ts.map +1 -1
  78. package/dist/libs/send-request.js +127 -123
  79. package/dist/store/active-entities.d.ts +333 -0
  80. package/dist/store/active-entities.d.ts.map +1 -0
  81. package/dist/store/active-entities.js +97 -0
  82. package/dist/store/collections.d.ts +4 -274
  83. package/dist/store/collections.d.ts.map +1 -1
  84. package/dist/store/cookies.d.ts +4 -4
  85. package/dist/store/environment.d.ts +4 -4
  86. package/dist/store/import-spec.d.ts +0 -54
  87. package/dist/store/import-spec.d.ts.map +1 -1
  88. package/dist/store/index.js +4 -3
  89. package/dist/store/request-example.d.ts +4 -4
  90. package/dist/store/requests.d.ts +15 -15
  91. package/dist/store/security-schemes.d.ts +527 -317
  92. package/dist/store/security-schemes.d.ts.map +1 -1
  93. package/dist/store/security-schemes.js +33 -41
  94. package/dist/store/servers.d.ts +4 -4
  95. package/dist/store/store-context.d.ts +0 -3
  96. package/dist/store/store-context.d.ts.map +1 -1
  97. package/dist/store/store.d.ts +640 -5297
  98. package/dist/store/store.d.ts.map +1 -1
  99. package/dist/store/store.js +111 -189
  100. package/dist/store/tags.d.ts +4 -4
  101. package/dist/store/workspace.d.ts +14 -24
  102. package/dist/store/workspace.d.ts.map +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  105. package/dist/views/Cookies/CookieForm.vue.js +14 -13
  106. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  107. package/dist/views/Cookies/CookieRaw.vue.js +14 -13
  108. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
  109. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  110. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  111. package/dist/views/Request/Request.vue.js +2 -2
  112. package/dist/views/Request/Request.vue2.js +92 -92
  113. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
  114. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  115. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
  116. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
  117. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  118. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
  119. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  120. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  121. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
  122. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  123. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
  124. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  125. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  127. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  128. package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
  129. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
  131. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  132. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
  133. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  134. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  135. package/dist/views/Request/RequestSection/RequestSection.vue2.js +19 -18
  136. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  137. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  138. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  139. package/dist/views/Request/RequestSidebar.vue2.js +72 -73
  140. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  141. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  142. package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
  143. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  145. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
  146. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  147. package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
  148. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  149. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  150. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +23 -22
  151. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  152. package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
  153. package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
  154. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  155. package/dist/views/Request/consts/new-auth-options.js +16 -8
  156. package/dist/views/Request/handle-drag.d.ts +2 -1
  157. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  158. package/dist/views/Request/handle-drag.js +23 -25
  159. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  160. package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
  161. package/dist/views/Request/libs/auth.d.ts +1 -29
  162. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  163. package/dist/views/Request/libs/auth.js +2 -9
  164. package/dist/views/Request/libs/index.js +6 -8
  165. package/dist/views/Request/libs/live-sync.d.ts +6 -5
  166. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  167. package/dist/views/Request/libs/live-sync.js +164 -185
  168. package/dist/views/Request/libs/oauth2.d.ts +6 -10
  169. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  170. package/dist/views/Request/libs/oauth2.js +54 -69
  171. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  172. package/dist/views/Servers/ServerForm.vue.js +14 -13
  173. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  174. package/dist/views/Servers/Servers.vue2.js +18 -17
  175. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  176. package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
  177. package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
  178. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
  179. package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
  180. package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
  181. package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
  182. package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
  183. package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
  184. package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
  185. package/package.json +8 -8
  186. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
  187. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
  188. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
  189. package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
  190. package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
@@ -1,12 +1,13 @@
1
- import w from "fuse.js";
2
- import { ref as a, watch as T, computed as W, nextTick as x } from "vue";
3
- import { useRouter as I } from "vue-router";
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, {
1
+ import { useActiveEntities as w } from "../../store/active-entities.js";
2
+ import T from "fuse.js";
3
+ import { ref as a, watch as W, computed as x, nextTick as A } from "vue";
4
+ import { useRouter as E } from "vue-router";
5
+ import { useWorkspace as I } from "../../store/store.js";
6
+ function M() {
7
+ const m = E(), { activeWorkspace: f, activeWorkspaceRequests: d } = w(), { requests: R } = I(), o = a([]), u = a([]), s = a(0), c = a(""), l = a(null), n = a([]), i = new T(o.value, {
7
8
  keys: ["title", "description", "body"]
8
9
  }), k = () => {
9
- u.value = "", s.value = 0, c.value = [], l.value instanceof HTMLInputElement && l.value.blur();
10
+ c.value = "", s.value = 0, u.value = [], l.value instanceof HTMLInputElement && l.value.blur();
10
11
  }, S = (t) => {
11
12
  o.value = t.map((e) => ({
12
13
  id: e.uid,
@@ -17,10 +18,10 @@ function H() {
17
18
  link: `/workspace/${f.value.uid}/request/${e.uid}`
18
19
  })), i.setCollection(o.value);
19
20
  }, b = () => {
20
- s.value = 0, c.value = i.search(u.value);
21
+ s.value = 0, u.value = i.search(c.value);
21
22
  }, y = (t) => {
22
- const e = t === "up" ? -1 : 1, v = r.value.length;
23
- s.value = (s.value + e + v) % v, x(() => {
23
+ const e = t === "up" ? -1 : 1, h = r.value.length;
24
+ s.value = (s.value + e + h) % h, A(() => {
24
25
  const p = n.value[s.value];
25
26
  p instanceof HTMLElement && p.scrollIntoView({
26
27
  behavior: "smooth",
@@ -28,29 +29,29 @@ function H() {
28
29
  });
29
30
  });
30
31
  }, g = () => {
31
- s.value >= 0 && h(
32
+ s.value >= 0 && v(
32
33
  r.value[s.value]
33
34
  );
34
35
  };
35
- T(
36
+ W(
36
37
  d,
37
38
  (t) => {
38
39
  S(t.map((e) => R[e]));
39
40
  },
40
41
  { immediate: !0 }
41
42
  );
42
- const h = (t) => {
43
+ const v = (t) => {
43
44
  m.push(t.item.id), k();
44
- }, r = W(
45
- () => u.value.length === 0 ? o.value.map((t) => ({
45
+ }, r = x(
46
+ () => c.value.length === 0 ? o.value.map((t) => ({
46
47
  item: t
47
- })) : c.value
48
+ })) : u.value
48
49
  );
49
50
  return {
50
- searchText: u,
51
+ searchText: c,
51
52
  searchResultsWithPlaceholderResults: r,
52
53
  selectedSearchResult: s,
53
- onSearchResultClick: h,
54
+ onSearchResultClick: v,
54
55
  fuseSearch: b,
55
56
  searchInputRef: l,
56
57
  searchResultRefs: n,
@@ -59,5 +60,5 @@ function H() {
59
60
  };
60
61
  }
61
62
  export {
62
- H as useSearch
63
+ M as useSearch
63
64
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as r, openBlock as i, createBlock as n, unref as o, withCtx as a, renderSlot as c } from "vue";
2
- import p from "./SideNavLink.vue.js";
3
- import { RouterLink as s } from "vue-router";
4
- import { useWorkspace as m } from "../../store/store.js";
5
- const v = /* @__PURE__ */ r({
1
+ import { defineComponent as i, openBlock as n, createBlock as r, unref as o, withCtx as a, renderSlot as c } from "vue";
2
+ import s from "./SideNavLink.vue.js";
3
+ import { useActiveEntities as p } from "../../store/active-entities.js";
4
+ import { RouterLink as m } from "vue-router";
5
+ const k = /* @__PURE__ */ i({
6
6
  __name: "SideNavRouterLink",
7
7
  props: {
8
8
  icon: {},
@@ -10,9 +10,9 @@ const v = /* @__PURE__ */ r({
10
10
  active: { type: Boolean }
11
11
  },
12
12
  setup(f) {
13
- const { activeWorkspace: t } = m();
14
- return (e, u) => (i(), n(p, {
15
- is: o(s),
13
+ const { activeWorkspace: t } = p();
14
+ return (e, u) => (n(), r(s, {
15
+ is: o(m),
16
16
  active: e.active,
17
17
  icon: e.icon,
18
18
  to: `/workspace/${o(t).uid}/${e.name}`
@@ -25,5 +25,5 @@ const v = /* @__PURE__ */ r({
25
25
  }
26
26
  });
27
27
  export {
28
- v as default
28
+ k as default
29
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AA8QA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAiaF,wBAOG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAiRA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAkaF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNav.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-b07590ec"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4e5c93a2"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,21 +1,22 @@
1
- import { defineComponent as z, reactive as A, ref as M, computed as j, watch as w, onMounted as B, onBeforeUnmount as E, openBlock as m, createElementBlock as b, createElementVNode as f, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as x, Fragment as V, renderList as D, createBlock as K } from "vue";
1
+ import { defineComponent as $, reactive as z, ref as E, computed as M, watch as w, onMounted as j, onBeforeUnmount as B, openBlock as m, createElementBlock as b, createElementVNode as f, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as x, Fragment as V, renderList as D, createBlock as K } from "vue";
2
2
  import q from "../ScalarHotkey.vue.js";
3
3
  import { ROUTES as F } from "../../constants.js";
4
- import { ScalarContextMenu as H, ScalarIcon as d, ScalarDropdown as W, ScalarDropdownItem as _ } from "@scalar/components";
5
- import { capitalize as G } from "@scalar/oas-utils/helpers";
6
- import { useClipboard as J } from "@scalar/use-hooks/useClipboard";
7
- import P from "./TopNavItem.vue.js";
8
- import { useWorkspace as Q } from "../../store/store.js";
9
- const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-2.5 relative overflow-hidden" }, Z = {
4
+ import { useActiveEntities as H } from "../../store/active-entities.js";
5
+ import { ScalarContextMenu as W, ScalarIcon as d, ScalarDropdown as G, ScalarDropdownItem as _ } from "@scalar/components";
6
+ import { capitalize as J } from "@scalar/oas-utils/helpers";
7
+ import { useClipboard as P } from "@scalar/use-hooks/useClipboard";
8
+ import Q from "./TopNavItem.vue.js";
9
+ import { useWorkspace as X } from "../../store/store.js";
10
+ const Y = { class: "flex h-10 t-app__top-nav" }, Z = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-2.5 relative overflow-hidden" }, ee = {
10
11
  key: 0,
11
12
  class: "h-full w-full overflow-hidden"
12
- }, re = /* @__PURE__ */ z({
13
+ }, ue = /* @__PURE__ */ $({
13
14
  __name: "TopNav",
14
15
  props: {
15
16
  openNewTab: {}
16
17
  },
17
18
  setup(I) {
18
- const L = I, { activeRequest: S, router: i, events: g } = Q(), { copyToClipboard: U } = J(), t = A([{ label: "", path: "", icon: "Add" }]), a = M(0), T = j(() => a.value);
19
+ const L = I, { activeRequest: S, router: i } = H(), { events: g } = X(), { copyToClipboard: U } = P(), t = z([{ label: "", path: "", icon: "Add" }]), a = E(0), T = M(() => a.value);
19
20
  function k() {
20
21
  var o;
21
22
  const e = F.find((c) => i.currentRoute.value.name == c.name);
@@ -24,7 +25,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
24
25
  path: i.currentRoute.value.path,
25
26
  icon: e.icon
26
27
  } : t[a.value] = {
27
- label: G(e == null ? void 0 : e.name) || "",
28
+ label: J(e == null ? void 0 : e.name) || "",
28
29
  path: i.currentRoute.value.path,
29
30
  icon: e.icon
30
31
  });
@@ -64,7 +65,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
64
65
  }
65
66
  e.jumpToLastTab && r(t.length - 1);
66
67
  }
67
- }, $ = (e) => {
68
+ }, A = (e) => {
68
69
  t.push({
69
70
  label: e.name,
70
71
  path: e.uid,
@@ -74,14 +75,14 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
74
75
  return w(
75
76
  () => L.openNewTab,
76
77
  (e) => {
77
- e && $(e);
78
+ e && A(e);
78
79
  },
79
80
  { immediate: !0 }
80
- ), B(() => g.hotKeys.on(C)), E(() => g.hotKeys.off(C)), (e, o) => (m(), b("nav", X, [
81
+ ), j(() => g.hotKeys.on(C)), B(() => g.hotKeys.off(C)), (e, o) => (m(), b("nav", Y, [
81
82
  o[3] || (o[3] = f("div", { class: "t-app__top-nav-draggable" }, null, -1)),
82
- f("div", Y, [
83
- t.length === 1 ? (m(), b("div", Z, [
84
- n(l(H), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
83
+ f("div", Z, [
84
+ t.length === 1 ? (m(), b("div", ee, [
85
+ n(l(W), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
85
86
  trigger: u(() => [
86
87
  n(l(d), {
87
88
  icon: t[0].icon,
@@ -91,7 +92,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
91
92
  f("span", null, O(t[0].label), 1)
92
93
  ]),
93
94
  content: u(() => [
94
- n(l(W), {
95
+ n(l(G), {
95
96
  class: "scalar-client",
96
97
  static: ""
97
98
  }, {
@@ -134,7 +135,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
134
135
  ]),
135
136
  _: 1
136
137
  })
137
- ])) : (m(!0), b(V, { key: 1 }, D(t, (c, s) => (m(), K(P, {
138
+ ])) : (m(!0), b(V, { key: 1 }, D(t, (c, s) => (m(), K(Q, {
138
139
  key: s,
139
140
  active: s === T.value,
140
141
  hotkey: (s + 1).toString(),
@@ -162,5 +163,5 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
162
163
  }
163
164
  });
164
165
  export {
165
- re as default
166
+ ue as default
166
167
  };
@@ -6,14 +6,14 @@ type __VLS_Props = {
6
6
  icon: Icon;
7
7
  };
8
8
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
- click: () => any;
10
9
  close: () => any;
10
+ click: () => any;
11
11
  newTab: () => any;
12
12
  copyUrl: () => any;
13
13
  closeOtherTabs: () => any;
14
14
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
- onClick?: (() => any) | undefined;
16
15
  onClose?: (() => any) | undefined;
16
+ onClick?: (() => any) | undefined;
17
17
  onNewTab?: (() => any) | undefined;
18
18
  onCopyUrl?: (() => any) | undefined;
19
19
  onCloseOtherTabs?: (() => any) | undefined;
@@ -1,10 +1,11 @@
1
1
  import { keyMap as r } from "./useKeyMap.js";
2
2
  import { useFileDialog as t } from "./useFileDialog.js";
3
3
  import { useSidebar as f } from "./useSidebar.js";
4
- import { useLayout as u } from "./useLayout.js";
4
+ import { LAYOUT_SYMBOL as u, useLayout as x } from "./useLayout.js";
5
5
  export {
6
+ u as LAYOUT_SYMBOL,
6
7
  r as keyMap,
7
8
  t as useFileDialog,
8
- u as useLayout,
9
+ x as useLayout,
9
10
  f as useSidebar
10
11
  };
@@ -1,7 +1,9 @@
1
+ import { type InjectionKey } from 'vue';
1
2
  /**
2
3
  * The layout of the client
3
4
  */
4
5
  export type ClientLayout = 'modal' | 'web' | 'desktop';
6
+ export declare const LAYOUT_SYMBOL: InjectionKey<ClientLayout>;
5
7
  /**
6
8
  * Get the current client layout
7
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"useLayout.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayout.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;AAEtD;;;;GAIG;AACH,eAAO,MAAM,SAAS;;CAEpB,CAAA"}
1
+ {"version":3,"file":"useLayout.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;AACtD,eAAO,MAAM,aAAa,EAAe,YAAY,CAAC,YAAY,CAAC,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,SAAS;;CAEpB,CAAA"}
@@ -1,7 +1,8 @@
1
1
  import { inject as o } from "vue";
2
- const e = () => ({
3
- layout: o("layout") ?? "desktop"
2
+ const t = Symbol(), s = () => ({
3
+ layout: o(t) ?? "desktop"
4
4
  });
5
5
  export {
6
- e as useLayout
6
+ t as LAYOUT_SYMBOL,
7
+ s as useLayout
7
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cA8H8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8KjD,wBAMG"}
1
+ {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cAgI8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8KjD,wBAMG"}
@@ -1,58 +1,59 @@
1
- import { defineComponent as v, ref as T, onBeforeMount as _, onMounted as y, onBeforeUnmount as h, computed as k, openBlock as n, createElementBlock as K, Fragment as C, createElementVNode as N, createVNode as r, unref as a, createBlock as m, withCtx as p, KeepAlive as E, resolveDynamicComponent as H, createCommentVNode as S } from "vue";
2
- import b from "../../components/TopNav/TopNav.vue.js";
3
- import A from "./MainLayout.vue.js";
4
- import { addScalarClassesToHeadless as B } from "@scalar/components";
5
- import { getThemeStyles as D } from "@scalar/themes";
6
- import { useColorMode as L } from "@scalar/use-hooks/useColorMode";
7
- import { ScalarToasts as M } from "@scalar/use-toasts";
8
- import { RouterView as P } from "vue-router";
9
- import { APP_HOTKEYS as V } from "./hotkeys.js";
10
- import { DEFAULT_HOTKEYS as W, handleHotKeyDown as g } from "../../libs/hot-keys.js";
11
- import { useWorkspace as x } from "../../store/store.js";
12
- const F = ["innerHTML"], Z = /* @__PURE__ */ v({
1
+ import { defineComponent as T, ref as _, onBeforeMount as y, onMounted as h, onBeforeUnmount as v, computed as K, openBlock as t, createElementBlock as C, Fragment as k, createElementVNode as E, createVNode as r, unref as a, createBlock as m, withCtx as p, KeepAlive as N, resolveDynamicComponent as H, createCommentVNode as b } from "vue";
2
+ import A from "../../components/TopNav/TopNav.vue.js";
3
+ import S from "./MainLayout.vue.js";
4
+ import { useActiveEntities as B } from "../../store/active-entities.js";
5
+ import { addScalarClassesToHeadless as D } from "@scalar/components";
6
+ import { getThemeStyles as L } from "@scalar/themes";
7
+ import { useColorMode as M } from "@scalar/use-hooks/useColorMode";
8
+ import { ScalarToasts as P } from "@scalar/use-toasts";
9
+ import { RouterView as V } from "vue-router";
10
+ import { APP_HOTKEYS as g } from "./hotkeys.js";
11
+ import { DEFAULT_HOTKEYS as x, handleHotKeyDown as F } from "../../libs/hot-keys.js";
12
+ import { useWorkspace as O } from "../../store/store.js";
13
+ const U = ["innerHTML"], oe = /* @__PURE__ */ T({
13
14
  __name: "ApiClientApp",
14
15
  emits: ["newTab"],
15
- setup(O) {
16
- const d = { ...W, ...V }, l = T(null), u = (e) => {
16
+ setup(W) {
17
+ const d = { ...x, ...g }, l = _(null), u = (e) => {
17
18
  l.value = e;
18
19
  };
19
- L();
20
- const o = x(), { events: t } = o;
21
- _(() => B());
22
- const s = (e) => g(e, t.hotKeys, { hotKeys: d }), c = (e) => {
23
- e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), t.commandPalette.emit());
20
+ M();
21
+ const { activeWorkspace: n } = B(), { events: o } = O();
22
+ y(() => D());
23
+ const s = (e) => F(e, o.hotKeys, { hotKeys: d }), i = (e) => {
24
+ e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), o.commandPalette.emit());
24
25
  };
25
- y(() => {
26
- window.addEventListener("keydown", s), t.hotKeys.on(c);
27
- }), h(() => {
28
- window.removeEventListener("keydown", s), t.hotKeys.off(c);
26
+ h(() => {
27
+ window.addEventListener("keydown", s), o.hotKeys.on(i);
28
+ }), v(() => {
29
+ window.removeEventListener("keydown", s), o.hotKeys.off(i);
29
30
  });
30
- const f = k(
31
- () => o.activeWorkspace.value && `<style>${D(o.activeWorkspace.value.themeId)}</style>`
31
+ const f = K(
32
+ () => n.value && `<style>${L(n.value.themeId)}</style>`
32
33
  );
33
- return (e, U) => {
34
- var i;
35
- return n(), K(C, null, [
36
- N("div", { innerHTML: f.value }, null, 8, F),
37
- r(b, { openNewTab: l.value }, null, 8, ["openNewTab"]),
38
- (i = a(o).activeWorkspace.value) != null && i.uid ? (n(), m(A, { key: 0 }, {
34
+ return (e, Y) => {
35
+ var c;
36
+ return t(), C(k, null, [
37
+ E("div", { innerHTML: f.value }, null, 8, U),
38
+ r(A, { openNewTab: l.value }, null, 8, ["openNewTab"]),
39
+ (c = a(n)) != null && c.uid ? (t(), m(S, { key: 0 }, {
39
40
  default: p(() => [
40
- r(a(P), { onNewTab: u }, {
41
+ r(a(V), { onNewTab: u }, {
41
42
  default: p(({ Component: w }) => [
42
- (n(), m(E, null, [
43
- (n(), m(H(w)))
43
+ (t(), m(N, null, [
44
+ (t(), m(H(w)))
44
45
  ], 1024))
45
46
  ]),
46
47
  _: 1
47
48
  })
48
49
  ]),
49
50
  _: 1
50
- })) : S("", !0),
51
- r(a(M))
51
+ })) : b("", !0),
52
+ r(a(P))
52
53
  ], 64);
53
54
  };
54
55
  }
55
56
  });
56
57
  export {
57
- Z as default
58
+ oe as default
58
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MainLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/MainLayout.vue"],"names":[],"mappings":"AA0CA,iBAAS,cAAc;WAmET,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAUD,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":"MainLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/MainLayout.vue"],"names":[],"mappings":"AA0CA,iBAAS,cAAc;WAoET,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAUD,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,4 +1,4 @@
1
- import { defineComponent as s, openBlock as t, createElementBlock as n, normalizeClass as r, unref as e, createVNode as m, createElementVNode as a, renderSlot as f } from "vue";
1
+ import { defineComponent as s, openBlock as n, createElementBlock as t, normalizeClass as r, unref as e, createVNode as m, createElementVNode as a, renderSlot as f } from "vue";
2
2
  import c from "../../components/SideNav/SideNav.vue.js";
3
3
  import d from "../../components/CommandPalette/TheCommandPalette.vue.js";
4
4
  import { useLayout as i } from "../../hooks/useLayout.js";
@@ -6,10 +6,10 @@ const b = /* @__PURE__ */ s({
6
6
  __name: "MainLayout",
7
7
  setup(u) {
8
8
  const { layout: o } = i();
9
- return (l, p) => (t(), n("main", {
9
+ return (l, p) => (n(), t("main", {
10
10
  class: r(["flex flex-col sm:flex-row min-h-0 flex-1", e(o) === "web" ? "sm:flex-col" : "sm:flex-row"])
11
11
  }, [
12
- m(c, { class: "order-last sm:order-none" }),
12
+ m(c, { class: "order-last sm:order-none sidenav" }),
13
13
  m(e(d)),
14
14
  a("div", {
15
15
  class: r(["flex flex-1 flex-col min-w-0 min-h-0", {