@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,77 +1,70 @@
1
- const P = (e) => e.type.startsWith("oauth"), y = () => {
1
+ const w = () => {
2
2
  const e = new Uint8Array(32);
3
3
  return crypto.getRandomValues(e), btoa(String.fromCharCode(...e)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
4
- }, _ = async (e, r) => {
5
- if (r === "plain") return e;
6
- const a = new TextEncoder().encode(e), s = await crypto.subtle.digest("SHA-256", a);
7
- return btoa(String.fromCharCode(...new Uint8Array(s))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
8
- }, S = async (e, r, d) => {
4
+ }, _ = async (e, i) => {
5
+ if (i === "plain") return e;
6
+ const s = new TextEncoder().encode(e), t = await crypto.subtle.digest("SHA-256", s);
7
+ return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
8
+ }, y = async (e, i) => {
9
9
  try {
10
- const a = e.flow.selectedScopes.join(" ");
11
- if (e.flow.type === "clientCredentials" || e.flow.type === "password")
12
- return g(
13
- e,
14
- r,
15
- a
16
- );
10
+ if (!e) return [new Error("Flow not found"), null];
11
+ const a = e.selectedScopes.join(" ");
12
+ if (e.type === "clientCredentials" || e.type === "password")
13
+ return m(e, a);
17
14
  {
18
- const s = (Math.random() + 1).toString(36).substring(7), t = new URL(e.flow.authorizationUrl);
19
- let c = null;
20
- if (e.flow.type === "implicit")
15
+ const s = (Math.random() + 1).toString(36).substring(7), t = new URL(e.authorizationUrl);
16
+ let o = null;
17
+ if (e.type === "implicit")
21
18
  t.searchParams.set("response_type", "token");
22
- else if (e.flow.type === "authorizationCode" && (t.searchParams.set("response_type", "code"), e.flow["x-usePkce"] !== "no")) {
23
- const o = y(), i = await _(
24
- o,
25
- e.flow["x-usePkce"]
19
+ else if (e.type === "authorizationCode" && (t.searchParams.set("response_type", "code"), e["x-usePkce"] !== "no")) {
20
+ const r = w(), c = await _(
21
+ r,
22
+ e["x-usePkce"]
26
23
  );
27
- c = {
28
- codeVerifier: o,
29
- codeChallenge: i,
30
- codeChallengeMethod: e.flow["x-usePkce"] === "SHA-256" ? "S256" : "plain"
31
- }, t.searchParams.set("code_challenge", i), t.searchParams.set(
24
+ o = {
25
+ codeVerifier: r,
26
+ codeChallenge: c,
27
+ codeChallengeMethod: e["x-usePkce"] === "SHA-256" ? "S256" : "plain"
28
+ }, t.searchParams.set("code_challenge", c), t.searchParams.set(
32
29
  "code_challenge_method",
33
- c.codeChallengeMethod
30
+ o.codeChallengeMethod
34
31
  );
35
32
  }
36
- if (e.flow["x-scalar-redirect-uri"].startsWith("/")) {
37
- const o = d.url || window.location.origin + window.location.pathname, i = new URL(
38
- e.flow["x-scalar-redirect-uri"],
39
- o
33
+ if (e["x-scalar-redirect-uri"].startsWith("/")) {
34
+ const r = i.url || window.location.origin + window.location.pathname, c = new URL(
35
+ e["x-scalar-redirect-uri"],
36
+ r
40
37
  ).toString();
41
- t.searchParams.set("redirect_uri", i);
38
+ t.searchParams.set("redirect_uri", c);
42
39
  } else
43
- t.searchParams.set(
44
- "redirect_uri",
45
- e.flow["x-scalar-redirect-uri"]
46
- );
40
+ t.searchParams.set("redirect_uri", e["x-scalar-redirect-uri"]);
47
41
  t.searchParams.set("client_id", e["x-scalar-client-id"]), t.searchParams.set("state", s), a && t.searchParams.set("scope", a);
48
42
  const n = window.open(t, "openAuth2Window", "left=100,top=100,width=800,height=600");
49
- return n ? new Promise((o) => {
50
- const i = setInterval(() => {
51
- var h;
52
- let w = null, u = null;
43
+ return n ? new Promise((r) => {
44
+ const c = setInterval(() => {
45
+ var p;
46
+ let d = null, u = null;
53
47
  try {
54
48
  const l = new URL(n.location.href).searchParams;
55
- w = l.get("access_token"), u = l.get("code");
56
- const p = new URLSearchParams(
49
+ d = l.get("access_token"), u = l.get("code");
50
+ const g = new URLSearchParams(
57
51
  n.location.href.split("#")[1]
58
52
  );
59
- w || (w = p.get("access_token")), u || (u = p.get("code"));
53
+ d || (d = g.get("access_token")), u || (u = g.get("code"));
60
54
  } catch {
61
55
  }
62
- if (n.closed || w || u)
63
- if (clearInterval(i), n.close(), w) {
64
- const l = (h = n.location.href.match(/state=([^&]*)/)) == null ? void 0 : h[1];
65
- o(l === s ? [null, w] : [new Error("State mismatch"), null]);
56
+ if (n.closed || d || u)
57
+ if (clearInterval(c), n.close(), d) {
58
+ const l = (p = n.location.href.match(/state=([^&]*)/)) == null ? void 0 : p[1];
59
+ r(l === s ? [null, d] : [new Error("State mismatch"), null]);
66
60
  } else u ? new URL(
67
61
  n.location.href
68
- ).searchParams.get("state") === s ? g(
62
+ ).searchParams.get("state") === s ? m(
69
63
  e,
70
- r,
71
64
  a,
72
65
  u,
73
- c
74
- ).then(o) : o([new Error("State mismatch"), null]) : (clearInterval(i), o([
66
+ o
67
+ ).then(r) : r([new Error("State mismatch"), null]) : (clearInterval(c), r([
75
68
  new Error("Window was closed without granting authorization"),
76
69
  null
77
70
  ]));
@@ -81,27 +74,20 @@ const P = (e) => e.type.startsWith("oauth"), y = () => {
81
74
  } catch {
82
75
  return [new Error("Failed to authorize oauth2 flow"), null];
83
76
  }
84
- }, g = async (e, r, d, a, s) => {
85
- if (!("clientSecret" in r))
86
- return [
87
- new Error(
88
- "Authorize Servers only works for Password, Client Credentials or Authorization Code flow"
89
- ),
90
- null
91
- ];
92
- if (!e.flow) return [new Error("OAuth2 flow was not defined"), null];
77
+ }, m = async (e, i, a, s) => {
78
+ if (!e) return [new Error("OAuth2 flow was not defined"), null];
93
79
  const t = new URLSearchParams();
94
- t.set("client_id", e["x-scalar-client-id"]), d && t.set("scope", d), r.clientSecret && t.set("client_secret", r.clientSecret), "x-scalar-redirect-uri" in e.flow && t.set("redirect_uri", e.flow["x-scalar-redirect-uri"]), a ? (t.set("code", a), t.set("grant_type", "authorization_code"), s && t.set("code_verifier", s.codeVerifier)) : r.type === "oauth-password" ? (t.set("grant_type", "password"), t.set("username", r.username), t.set("password", r.password)) : t.set("grant_type", "client_credentials");
80
+ t.set("client_id", e["x-scalar-client-id"]), i && t.set("scope", i), e.clientSecret && t.set("client_secret", e.clientSecret), "x-scalar-redirect-uri" in e && e["x-scalar-redirect-uri"] && t.set("redirect_uri", e["x-scalar-redirect-uri"]), a ? (t.set("code", a), t.set("grant_type", "authorization_code"), s && t.set("code_verifier", s.codeVerifier)) : e.type === "password" ? (t.set("grant_type", "password"), t.set("username", e.username), t.set("password", e.password)) : t.set("grant_type", "client_credentials");
95
81
  try {
96
- const c = {
82
+ const o = {
97
83
  "Content-Type": "application/x-www-form-urlencoded"
98
84
  };
99
- e["x-scalar-client-id"] && r.clientSecret && (c.Authorization = `Basic ${btoa(`${e["x-scalar-client-id"]}:${r.clientSecret}`)}`);
100
- const f = await fetch(e.flow.tokenUrl, {
85
+ o.Authorization = `Basic ${btoa(`${e["x-scalar-client-id"]}:${e.clientSecret}`)}`;
86
+ const h = await fetch(e.tokenUrl, {
101
87
  method: "POST",
102
- headers: c,
88
+ headers: o,
103
89
  body: t
104
- }), { access_token: n } = await f.json();
90
+ }), { access_token: n } = await h.json();
105
91
  return [null, n];
106
92
  } catch {
107
93
  return [
@@ -113,8 +99,7 @@ const P = (e) => e.type.startsWith("oauth"), y = () => {
113
99
  }
114
100
  };
115
101
  export {
116
- S as authorizeOauth2,
117
- g as authorizeServers,
118
- _ as generateCodeChallenge,
119
- P as isOauth2Example
102
+ y as authorizeOauth2,
103
+ m as authorizeServers,
104
+ _ as generateCodeChallenge
120
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ServerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/ServerForm.vue"],"names":[],"mappings":";AAyNA,wBAMG"}
1
+ {"version":3,"file":"ServerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/ServerForm.vue"],"names":[],"mappings":";AA6NA,wBAMG"}
@@ -1,18 +1,19 @@
1
- import { defineComponent as S, computed as l, openBlock as u, createElementBlock as d, Fragment as b, createVNode as g, createBlock as y, createCommentVNode as p } from "vue";
1
+ import { defineComponent as S, computed as l, openBlock as n, createElementBlock as d, Fragment as b, createVNode as g, createBlock as y, createCommentVNode as p } from "vue";
2
2
  import m from "../../components/Form/Form.vue.js";
3
- import { useRoute as O } from "vue-router";
4
- import { useWorkspace as V } from "../../store/store.js";
5
- const j = { class: "w-full" }, L = /* @__PURE__ */ S({
3
+ import { useActiveEntities as O } from "../../store/active-entities.js";
4
+ import { useRoute as V } from "vue-router";
5
+ import { useWorkspace as j } from "../../store/store.js";
6
+ const B = { class: "w-full" }, N = /* @__PURE__ */ S({
6
7
  __name: "ServerForm",
7
- setup(B) {
8
- const { activeCollection: a, servers: v, serverMutators: n } = V(), f = [
8
+ setup(C) {
9
+ const { activeCollection: a } = O(), { servers: v, serverMutators: u } = j(), f = [
9
10
  { label: "URL", key: "url", placeholder: "https://void.scalar.com/api" },
10
11
  {
11
12
  label: "Label",
12
13
  key: "description",
13
14
  placeholder: "Production"
14
15
  }
15
- ], c = O(), o = l(
16
+ ], c = V(), o = l(
16
17
  () => {
17
18
  var e, t;
18
19
  return v[a.value && c.params.server === "default" ? (e = a.value) == null ? void 0 : e.servers[0] : ((t = a.value) == null ? void 0 : t.servers.find(
@@ -20,9 +21,9 @@ const j = { class: "w-full" }, L = /* @__PURE__ */ S({
20
21
  )) ?? ""];
21
22
  }
22
23
  ), _ = (e, t) => {
23
- a.value && n.edit(o.value.uid, e, t);
24
+ a.value && u.edit(o.value.uid, e, t);
24
25
  }, k = (e, t) => {
25
- a.value && n.edit(o.value.uid, `variables.${e}.value`, t);
26
+ a.value && u.edit(o.value.uid, `variables.${e}.value`, t);
26
27
  }, h = l(
27
28
  () => {
28
29
  var e;
@@ -43,15 +44,15 @@ const j = { class: "w-full" }, L = /* @__PURE__ */ S({
43
44
  return e[t] = (r.default ?? ((s = r == null ? void 0 : r.enum) == null ? void 0 : s[0]) ?? "").toString(), e;
44
45
  }, {})
45
46
  );
46
- return (e, t) => (u(), d("div", j, [
47
- o.value ? (u(), d(b, { key: 0 }, [
47
+ return (e, t) => (n(), d("div", B, [
48
+ o.value ? (n(), d(b, { key: 0 }, [
48
49
  g(m, {
49
50
  data: o.value,
50
51
  onUpdate: _,
51
52
  options: f,
52
53
  title: "Server"
53
54
  }, null, 8, ["data"]),
54
- Object.keys(i.value).length ? (u(), y(m, {
55
+ Object.keys(i.value).length ? (n(), y(m, {
55
56
  key: 0,
56
57
  data: i.value,
57
58
  onUpdate: k,
@@ -63,5 +64,5 @@ const j = { class: "w-full" }, L = /* @__PURE__ */ S({
63
64
  }
64
65
  });
65
66
  export {
66
- L as default
67
+ N as default
67
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAgOA,wBAMG"}
1
+ {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAoOA,wBAMG"}
@@ -1,20 +1,21 @@
1
- import { defineComponent as p, openBlock as s, createBlock as m, withCtx as e, createVNode as r, unref as n, createElementVNode as _, createElementBlock as v, Fragment as S, renderList as x, createTextVNode as b } from "vue";
1
+ import { defineComponent as d, openBlock as a, createBlock as m, withCtx as e, createVNode as r, unref as n, createElementVNode as _, createElementBlock as v, Fragment as S, renderList as x, createTextVNode as b } from "vue";
2
2
  import k from "../../components/Sidebar/SidebarButton.vue.js";
3
3
  import h from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import L from "../../components/Sidebar/SidebarListElement.vue.js";
5
5
  import V from "../../components/ViewLayout/ViewLayout.vue.js";
6
6
  import w from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
- import { serverSchema as C } from "@scalar/oas-utils/entities/spec";
7
+ import { useActiveEntities as C } from "../../store/active-entities.js";
8
+ import { serverSchema as E } from "@scalar/oas-utils/entities/spec";
8
9
  import { useRouter as y } from "vue-router";
9
10
  import B from "./ServerForm.vue.js";
10
- import { useWorkspace as E } from "../../store/store.js";
11
- import N from "../../components/Sidebar/Sidebar.vue.js";
12
- const $ = { class: "flex-1" }, G = /* @__PURE__ */ p({
11
+ import { useWorkspace as N } from "../../store/store.js";
12
+ import A from "../../components/Sidebar/Sidebar.vue.js";
13
+ const $ = { class: "flex-1" }, J = /* @__PURE__ */ d({
13
14
  __name: "Servers",
14
15
  setup(g) {
15
- const { activeCollection: t, servers: u, serverMutators: c } = E(), { push: f } = y(), d = () => {
16
+ const { activeCollection: t } = C(), { servers: u, serverMutators: c } = N(), { push: f } = y(), p = () => {
16
17
  if (!t.value) return;
17
- const o = C.parse({ url: "http://localhost" });
18
+ const o = E.parse({ url: "http://localhost" });
18
19
  c.add(o, t.value.uid), f({
19
20
  name: "servers",
20
21
  params: {
@@ -22,21 +23,21 @@ const $ = { class: "flex-1" }, G = /* @__PURE__ */ p({
22
23
  }
23
24
  });
24
25
  };
25
- return (o, l) => (s(), m(V, null, {
26
+ return (o, i) => (a(), m(V, null, {
26
27
  default: e(() => [
27
- r(n(N), { title: "Servers" }, {
28
+ r(n(A), { title: "Servers" }, {
28
29
  content: e(() => [
29
30
  _("div", $, [
30
31
  r(h, null, {
31
32
  default: e(() => {
32
- var i;
33
+ var l;
33
34
  return [
34
- (s(!0), v(S, null, x((i = n(t)) == null ? void 0 : i.servers, (a) => (s(), m(L, {
35
- key: a,
35
+ (a(!0), v(S, null, x((l = n(t)) == null ? void 0 : l.servers, (s) => (a(), m(L, {
36
+ key: s,
36
37
  class: "text-xs",
37
38
  variable: {
38
- name: n(u)[a].url ?? "",
39
- uid: a
39
+ name: n(u)[s].url ?? "",
40
+ uid: s
40
41
  }
41
42
  }, null, 8, ["variable"]))), 128))
42
43
  ];
@@ -46,8 +47,8 @@ const $ = { class: "flex-1" }, G = /* @__PURE__ */ p({
46
47
  ])
47
48
  ]),
48
49
  button: e(() => [
49
- r(k, { click: d }, {
50
- title: e(() => l[0] || (l[0] = [
50
+ r(k, { click: p }, {
51
+ title: e(() => i[0] || (i[0] = [
51
52
  b("Add Server")
52
53
  ])),
53
54
  _: 1
@@ -67,5 +68,5 @@ const $ = { class: "flex-1" }, G = /* @__PURE__ */ p({
67
68
  }
68
69
  });
69
70
  export {
70
- G as default
71
+ J as default
71
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsGeneral.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneral.vue"],"names":[],"mappings":";AAqoBA,wBAMG"}
1
+ {"version":3,"file":"SettingsGeneral.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneral.vue"],"names":[],"mappings":";AA+2BA,wBAMG"}