@scalar/api-client 2.1.51 → 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 (201) hide show
  1. package/CHANGELOG.md +47 -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 +16 -15
  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/IconSelector.vue.js +2 -2
  38. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  39. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
  40. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  41. package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
  42. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
  43. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  44. package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
  45. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  46. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
  47. package/dist/components/Search/useSearch.d.ts.map +1 -1
  48. package/dist/components/Search/useSearch.js +20 -19
  49. package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
  50. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  51. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  52. package/dist/components/Sidebar/Sidebar.vue2.js +37 -39
  53. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  54. package/dist/components/TopNav/TopNav.vue.js +1 -1
  55. package/dist/components/TopNav/TopNav.vue2.js +20 -19
  56. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  57. package/dist/hooks/index.js +3 -2
  58. package/dist/hooks/useLayout.d.ts +2 -0
  59. package/dist/hooks/useLayout.d.ts.map +1 -1
  60. package/dist/hooks/useLayout.js +4 -3
  61. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  62. package/dist/layouts/App/ApiClientApp.vue.js +38 -37
  63. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  64. package/dist/layouts/App/MainLayout.vue.js +3 -3
  65. package/dist/layouts/App/create-api-client-app.d.ts +670 -1232
  66. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  67. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  68. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  69. package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
  70. package/dist/layouts/Modal/create-api-client-modal.d.ts +1384 -2508
  71. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  72. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  73. package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
  74. package/dist/layouts/Web/create-api-client-web.d.ts +670 -1232
  75. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  76. package/dist/libs/create-client.d.ts +675 -1236
  77. package/dist/libs/create-client.d.ts.map +1 -1
  78. package/dist/libs/create-client.js +100 -95
  79. package/dist/libs/hot-keys.d.ts +1 -1
  80. package/dist/libs/send-request.d.ts +3 -7
  81. package/dist/libs/send-request.d.ts.map +1 -1
  82. package/dist/libs/send-request.js +126 -119
  83. package/dist/libs/string-template.d.ts.map +1 -1
  84. package/dist/libs/string-template.js +23 -22
  85. package/dist/store/active-entities.d.ts +333 -0
  86. package/dist/store/active-entities.d.ts.map +1 -0
  87. package/dist/store/active-entities.js +97 -0
  88. package/dist/store/collections.d.ts +4 -274
  89. package/dist/store/collections.d.ts.map +1 -1
  90. package/dist/store/cookies.d.ts +4 -4
  91. package/dist/store/environment.d.ts +4 -4
  92. package/dist/store/import-spec.d.ts +0 -54
  93. package/dist/store/import-spec.d.ts.map +1 -1
  94. package/dist/store/index.js +4 -3
  95. package/dist/store/request-example.d.ts +4 -4
  96. package/dist/store/requests.d.ts +15 -15
  97. package/dist/store/security-schemes.d.ts +527 -317
  98. package/dist/store/security-schemes.d.ts.map +1 -1
  99. package/dist/store/security-schemes.js +33 -41
  100. package/dist/store/servers.d.ts +4 -4
  101. package/dist/store/store-context.d.ts +0 -3
  102. package/dist/store/store-context.d.ts.map +1 -1
  103. package/dist/store/store.d.ts +640 -5297
  104. package/dist/store/store.d.ts.map +1 -1
  105. package/dist/store/store.js +111 -189
  106. package/dist/store/tags.d.ts +4 -4
  107. package/dist/store/workspace.d.ts +14 -24
  108. package/dist/store/workspace.d.ts.map +1 -1
  109. package/dist/style.css +1 -1
  110. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  111. package/dist/views/Cookies/CookieForm.vue.js +14 -13
  112. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  113. package/dist/views/Cookies/CookieRaw.vue.js +14 -13
  114. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
  115. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  116. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  117. package/dist/views/Request/Request.vue.js +2 -2
  118. package/dist/views/Request/Request.vue2.js +94 -94
  119. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
  120. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  121. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
  122. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
  123. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  124. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
  125. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  127. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
  128. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  129. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
  130. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  131. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  132. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  133. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  134. package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
  135. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  136. package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
  137. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  138. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
  139. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  140. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  141. package/dist/views/Request/RequestSection/RequestSection.vue2.js +19 -18
  142. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  143. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +27 -27
  145. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  146. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  147. package/dist/views/Request/RequestSidebar.vue2.js +74 -75
  148. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  149. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  150. package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
  151. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  153. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
  154. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  155. package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
  156. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  157. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  158. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +35 -15
  159. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  160. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  161. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +23 -22
  162. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  163. package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
  164. package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
  165. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  166. package/dist/views/Request/consts/new-auth-options.js +16 -8
  167. package/dist/views/Request/handle-drag.d.ts +2 -1
  168. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  169. package/dist/views/Request/handle-drag.js +23 -25
  170. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  171. package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
  172. package/dist/views/Request/libs/auth.d.ts +1 -29
  173. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  174. package/dist/views/Request/libs/auth.js +2 -9
  175. package/dist/views/Request/libs/index.js +6 -8
  176. package/dist/views/Request/libs/live-sync.d.ts +6 -5
  177. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  178. package/dist/views/Request/libs/live-sync.js +164 -185
  179. package/dist/views/Request/libs/oauth2.d.ts +6 -10
  180. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  181. package/dist/views/Request/libs/oauth2.js +54 -69
  182. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  183. package/dist/views/Servers/ServerForm.vue.js +14 -13
  184. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  185. package/dist/views/Servers/Servers.vue2.js +18 -17
  186. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  187. package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
  188. package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
  189. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
  190. package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
  191. package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
  192. package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
  193. package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
  194. package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
  195. package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
  196. package/package.json +12 -12
  197. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
  198. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
  199. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
  200. package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
  201. package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
@@ -1,29 +1,26 @@
1
- import { defineComponent as S, openBlock as o, createElementBlock as y, createElementVNode as t, createStaticVNode as j, createVNode as d, unref as e, normalizeClass as u, withCtx as p, createBlock as n, createCommentVNode as c, createTextVNode as b, toDisplayString as v, Fragment as z, renderList as B, normalizeStyle as g } from "vue";
2
- import { ScalarButton as m, ScalarIcon as k } from "@scalar/components";
3
- import { themeLabels as N } from "@scalar/themes";
4
- import P from "./SettingsGeneralMode.vue.js";
5
- import { useWorkspace as U } from "../../store/store.js";
6
- const V = { class: "bg-b-1 w-full h-full overflow-auto" }, $ = { class: "flex flex-col px-5 py-5 max-w-[720px] ml-auto mr-auto w-full" }, T = { class: "gap-2 mt-4 mb-8 flex flex-col" }, W = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, E = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, G = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, L = { class: "flex flex-col gap-2" }, O = { class: "grid grid-cols-2 gap-2" }, R = { class: "flex items-center gap-2" }, q = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, D = { class: "flex items-center gap-1" }, X = /* @__PURE__ */ S({
1
+ import { defineComponent as T, openBlock as a, createElementBlock as h, createElementVNode as r, createVNode as n, withCtx as l, createTextVNode as i, unref as e, normalizeClass as c, createBlock as d, createCommentVNode as f, toDisplayString as v, Fragment as C, renderList as U, normalizeStyle as w } from "vue";
2
+ import B from "../../components/ImportCollection/IntegrationLogo.vue.js";
3
+ import { useActiveEntities as A } from "../../store/active-entities.js";
4
+ import { ScalarButton as p, ScalarIcon as m } from "@scalar/components";
5
+ import { themeLabels as j } from "@scalar/themes";
6
+ import E from "./components/SettingsAppearance.vue.js";
7
+ import g from "./components/SettingsSection.vue.js";
8
+ import { useWorkspace as L } from "../../store/store.js";
9
+ const N = { class: "bg-b-1 w-full h-full overflow-auto" }, R = { class: "px-5 py-5 max-w-[720px] ml-auto mr-auto w-full" }, V = { class: "flex flex-col gap-8" }, W = { class: "flex flex-col gap-2" }, F = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, O = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, P = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, D = { class: "flex flex-col gap-2" }, G = { class: "grid grid-cols-2 gap-2" }, q = { class: "flex items-center gap-2" }, H = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, M = { class: "flex items-center gap-1" }, X = { class: "grid grid-cols-2 gap-2" }, Y = { class: "flex items-center gap-2" }, J = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, K = { class: "flex items-center gap-1" }, Q = { class: "rounded-xl size-7" }, b = "https://proxy.scalar.com", ne = /* @__PURE__ */ T({
7
10
  __name: "SettingsGeneral",
8
- setup(F) {
9
- const {
10
- activeWorkspace: i,
11
- workspaceMutators: w,
12
- proxyUrl: l,
13
- setProxyUrl: x,
14
- defaultProxyUrl: a
15
- } = U(), _ = [
11
+ setup(Z) {
12
+ const { activeWorkspace: o } = A(), { proxyUrl: u, workspaceMutators: x } = L(), S = [
16
13
  "default",
17
14
  "alternate",
18
- "moon",
15
+ // 'moon',
19
16
  "purple",
20
17
  "solarized",
21
- "bluePlanet",
18
+ // 'bluePlanet',
22
19
  "saturn",
23
- "kepler",
24
- "mars",
25
- "deepSpace"
26
- ], h = (f) => ({
20
+ "kepler"
21
+ // 'mars',
22
+ // 'deepSpace',
23
+ ], z = ["elysiajs", "fastify"], y = (k) => ({
27
24
  default: { light: "#fff", dark: "#0f0f0f", accent: "#0099ff" },
28
25
  alternate: { light: "#f9f9f9", dark: "#131313", accent: "#e7e7e7" },
29
26
  moon: { light: "#ccc9b3", dark: "#313332", accent: "#645b0f" },
@@ -35,138 +32,233 @@ const V = { class: "bg-b-1 w-full h-full overflow-auto" }, $ = { class: "flex fl
35
32
  mars: { light: "#f2efe8", dark: "#321116", accent: "#c75549" },
36
33
  deepSpace: { light: "#f4f4f5", dark: "#09090b", accent: "#8ab4f8" },
37
34
  none: { light: "#ffffff", dark: "#000000", accent: "#3b82f6" }
38
- })[f] || { light: "#ffffff", dark: "#000000", accent: "#3b82f6" }, C = (f) => {
39
- w.edit(i.value.uid, "themeId", f);
35
+ })[k] || { light: "#ffffff", dark: "#000000", accent: "#3b82f6" }, _ = (k) => {
36
+ x.edit(o.value.uid, "themeId", k);
40
37
  };
41
- return (f, r) => (o(), y("div", V, [
42
- t("div", $, [
43
- t("div", null, [
44
- t("div", null, [
45
- r[5] || (r[5] = j('<h2 class="font-bold text-xl mb-5 mt-10">Settings</h2><h3 class="font-bold mb-1">CORS Proxy</h3><p class="text-c-2 mb-2 leading-[21px]"> Browsers block cross-origin requests for security. We provide a public proxy to <a class="hover:text-c-1 underline-offset-2" href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_blank">bypass CORS issues</a>. Check the <a class="hover:text-c-1 underline-offset-2" href="https://github.com/scalar/scalar/tree/main/examples/proxy-server" target="_blank">source code on GitHub</a>. </p>', 3)),
46
- t("div", T, [
47
- d(e(m), {
48
- class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", { "bg-b-2 text-c-1": e(l) }]),
49
- variant: e(l) ? "primary" : "secondary",
50
- onClick: r[0] || (r[0] = (s) => e(x)("https://proxy.scalar.com"))
51
- }, {
52
- default: p(() => [
53
- t("div", W, [
54
- e(l) === "https://proxy.scalar.com" ? (o(), n(e(k), {
55
- key: 0,
56
- icon: "Checkmark",
57
- size: "xs",
58
- thickness: "3.5"
59
- })) : c("", !0)
38
+ return (k, t) => (a(), h("div", N, [
39
+ r("div", R, [
40
+ r("div", V, [
41
+ t[13] || (t[13] = r("div", null, [
42
+ r("h2", { class: "font-bold text-xl mt-10" }, "Settings")
43
+ ], -1)),
44
+ n(g, null, {
45
+ title: l(() => t[3] || (t[3] = [
46
+ i("CORS Proxy")
47
+ ])),
48
+ description: l(() => t[4] || (t[4] = [
49
+ i(" Browsers block cross-origin requests for security. We provide a public proxy to "),
50
+ r("a", {
51
+ class: "hover:text-c-1 underline-offset-2",
52
+ href: "https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",
53
+ target: "_blank"
54
+ }, " bypass CORS issues ", -1),
55
+ i(" . Check the "),
56
+ r("a", {
57
+ class: "hover:text-c-1 underline-offset-2",
58
+ href: "https://github.com/scalar/scalar/tree/main/examples/proxy-server",
59
+ target: "_blank"
60
+ }, " source code on GitHub ", -1),
61
+ i(" . ")
62
+ ])),
63
+ default: l(() => [
64
+ r("div", W, [
65
+ n(e(p), {
66
+ class: c(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", {
67
+ "bg-b-2 text-c-1": e(o).proxyUrl === b
68
+ }]),
69
+ variant: e(o).proxyUrl === b ? "primary" : "secondary",
70
+ onClick: t[0] || (t[0] = (s) => e(x).edit(
71
+ e(o).uid,
72
+ "proxyUrl",
73
+ b
74
+ ))
75
+ }, {
76
+ default: l(() => [
77
+ r("div", F, [
78
+ e(o).proxyUrl === b ? (a(), d(e(m), {
79
+ key: 0,
80
+ icon: "Checkmark",
81
+ size: "xs",
82
+ thickness: "3.5"
83
+ })) : f("", !0)
84
+ ]),
85
+ t[5] || (t[5] = i(" Use proxy.scalar.com (default) "))
60
86
  ]),
61
- r[3] || (r[3] = b(" Use proxy.scalar.com (default) "))
62
- ]),
63
- _: 1
64
- }, 8, ["class", "variant"]),
65
- e(a) && e(a) !== "https://proxy.scalar.com" ? (o(), n(e(m), {
66
- key: 0,
67
- class: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2",
68
- variant: "primary",
69
- onClick: r[1] || (r[1] = (s) => e(x)(e(a)))
70
- }, {
71
- default: p(() => [
72
- t("div", E, [
73
- e(l) === e(a) ? (o(), n(e(k), {
74
- key: 0,
75
- icon: "Checkmark",
76
- size: "xs",
77
- thickness: "3.5"
78
- })) : c("", !0)
87
+ _: 1
88
+ }, 8, ["class", "variant"]),
89
+ e(u) && e(u) !== b ? (a(), d(e(p), {
90
+ key: 0,
91
+ class: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2",
92
+ variant: "primary",
93
+ onClick: t[1] || (t[1] = (s) => e(x).edit(
94
+ e(o).uid,
95
+ "proxyUrl",
96
+ e(u)
97
+ ))
98
+ }, {
99
+ default: l(() => [
100
+ r("div", O, [
101
+ e(o).proxyUrl === e(u) ? (a(), d(e(m), {
102
+ key: 0,
103
+ icon: "Checkmark",
104
+ size: "xs",
105
+ thickness: "3.5"
106
+ })) : f("", !0)
107
+ ]),
108
+ i(" Use custom proxy (" + v(e(u)) + ") ", 1)
79
109
  ]),
80
- b(" Use custom proxy (" + v(e(a)) + ") ", 1)
81
- ]),
82
- _: 1
83
- })) : c("", !0),
84
- d(e(m), {
85
- class: u(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", { "bg-b-2 text-c-1": !e(l) }]),
86
- variant: e(l) ? "secondary" : "primary",
87
- onClick: r[2] || (r[2] = (s) => e(x)(""))
88
- }, {
89
- default: p(() => [
90
- t("div", G, [
91
- e(l) ? c("", !0) : (o(), n(e(k), {
92
- key: 0,
93
- icon: "Checkmark",
94
- size: "xs",
95
- thickness: "3.5"
96
- }))
110
+ _: 1
111
+ })) : f("", !0),
112
+ n(e(p), {
113
+ class: c(["w-full shadow-none text-c-1 justify-start pl-2 gap-2 bg-b-1 border-1/2", { "bg-b-2 text-c-1": !e(o).proxyUrl }]),
114
+ variant: e(o).proxyUrl ? "secondary" : "primary",
115
+ onClick: t[2] || (t[2] = (s) => e(x).edit(e(o).uid, "proxyUrl", ""))
116
+ }, {
117
+ default: l(() => [
118
+ r("div", P, [
119
+ e(o).proxyUrl ? f("", !0) : (a(), d(e(m), {
120
+ key: 0,
121
+ icon: "Checkmark",
122
+ size: "xs",
123
+ thickness: "3.5"
124
+ }))
125
+ ]),
126
+ t[6] || (t[6] = i(" Skip the proxy "))
97
127
  ]),
98
- r[4] || (r[4] = b(" Skip the proxy "))
99
- ]),
100
- _: 1
101
- }, 8, ["class", "variant"])
102
- ])
103
- ]),
104
- t("div", null, [
105
- r[6] || (r[6] = t("h3", { class: "font-bold mb-1" }, "Theme", -1)),
106
- r[7] || (r[7] = t("p", { class: "text-c-2 mb-4 leading-[21px]" }, " We’ve got a whole rainbow of themes for you to play with: ", -1)),
107
- t("div", L, [
108
- t("div", O, [
109
- (o(), y(z, null, B(_, (s) => d(e(m), {
128
+ _: 1
129
+ }, 8, ["class", "variant"])
130
+ ])
131
+ ]),
132
+ _: 1
133
+ }),
134
+ n(g, null, {
135
+ title: l(() => t[7] || (t[7] = [
136
+ i("Themes")
137
+ ])),
138
+ description: l(() => t[8] || (t[8] = [
139
+ i(" We’ve got a whole rainbow of themes for you to play with: ")
140
+ ])),
141
+ default: l(() => [
142
+ r("div", D, [
143
+ r("div", G, [
144
+ (a(), h(C, null, U(S, (s) => n(e(p), {
145
+ key: s,
146
+ class: c(["px-2 flex items-center justify-between gap-2 text-c-1 border-1/2", [
147
+ e(o).themeId === s ? "bg-b-2" : "bg-b-1"
148
+ ]]),
149
+ variant: "ghost",
150
+ onClick: ($) => _(s)
151
+ }, {
152
+ default: l(() => [
153
+ r("div", q, [
154
+ r("div", {
155
+ class: c(["flex items-center justify-center w-5 h-5 rounded-full border-2 border-c-3", {
156
+ "bg-primary": e(o).themeId === s
157
+ }])
158
+ }, [
159
+ r("div", H, [
160
+ e(o).themeId === s ? (a(), d(e(m), {
161
+ key: 0,
162
+ icon: "Checkmark",
163
+ size: "xs",
164
+ thickness: "3.5"
165
+ })) : f("", !0)
166
+ ])
167
+ ], 2),
168
+ i(" " + v(e(j)[s]), 1)
169
+ ]),
170
+ r("div", M, [
171
+ r("span", {
172
+ class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
173
+ style: w({
174
+ backgroundColor: y(s).light
175
+ })
176
+ }, null, 4),
177
+ r("span", {
178
+ class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
179
+ style: w({
180
+ backgroundColor: y(s).dark
181
+ })
182
+ }, null, 4),
183
+ r("span", {
184
+ class: "inline-block w-5 h-5 rounded-full border-c-3",
185
+ style: w({
186
+ backgroundColor: y(s).accent
187
+ })
188
+ }, null, 4)
189
+ ])
190
+ ]),
191
+ _: 2
192
+ }, 1032, ["class", "onClick"])), 64))
193
+ ])
194
+ ])
195
+ ]),
196
+ _: 1
197
+ }),
198
+ n(g, null, {
199
+ title: l(() => t[9] || (t[9] = [
200
+ i("Framework Themes")
201
+ ])),
202
+ description: l(() => t[10] || (t[10] = [
203
+ i(" Are you a real fan? Show your support by using your favorite framework’s theme! ")
204
+ ])),
205
+ default: l(() => [
206
+ r("div", X, [
207
+ (a(), h(C, null, U(z, (s) => n(e(p), {
110
208
  key: s,
111
- class: u(["px-2", [
112
- "flex items-center justify-between gap-2 text-c-1 border-1/2",
113
- e(i).themeId === s ? "bg-b-2" : "bg-b-1"
209
+ class: c(["px-2 flex items-center justify-between gap-2 text-c-1 border-1/2", [
210
+ e(o).themeId === s ? "bg-b-2" : "bg-b-1"
114
211
  ]]),
115
212
  variant: "ghost",
116
- onClick: (H) => C(s)
213
+ onClick: ($) => _(s)
117
214
  }, {
118
- default: p(() => [
119
- t("div", R, [
120
- t("div", {
121
- class: u(["flex items-center justify-center w-5 h-5 rounded-full border-2 border-c-3", {
122
- "bg-primary": e(i).themeId === s
215
+ default: l(() => [
216
+ r("div", Y, [
217
+ r("div", {
218
+ class: c(["flex items-center justify-center w-5 h-5 rounded-full border-2 border-c-3", {
219
+ "bg-primary": e(o).themeId === s
123
220
  }])
124
221
  }, [
125
- t("div", q, [
126
- e(i).themeId === s ? (o(), n(e(k), {
222
+ r("div", J, [
223
+ e(o).themeId === s ? (a(), d(e(m), {
127
224
  key: 0,
128
225
  icon: "Checkmark",
129
226
  size: "xs",
130
227
  thickness: "3.5"
131
- })) : c("", !0)
228
+ })) : f("", !0)
132
229
  ])
133
230
  ], 2),
134
- b(" " + v(e(N)[s]), 1)
231
+ i(" " + v(e(j)[s]), 1)
135
232
  ]),
136
- t("div", D, [
137
- t("span", {
138
- class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
139
- style: g({
140
- backgroundColor: h(s).light
141
- })
142
- }, null, 4),
143
- t("span", {
144
- class: "inline-block w-5 h-5 rounded-full border-c-3 -mr-3",
145
- style: g({
146
- backgroundColor: h(s).dark
147
- })
148
- }, null, 4),
149
- t("span", {
150
- class: "inline-block w-5 h-5 rounded-full border-c-3",
151
- style: g({
152
- backgroundColor: h(s).accent
153
- })
154
- }, null, 4)
233
+ r("div", K, [
234
+ r("div", Q, [
235
+ n(B, { integration: s }, null, 8, ["integration"])
236
+ ])
155
237
  ])
156
238
  ]),
157
239
  _: 2
158
240
  }, 1032, ["class", "onClick"])), 64))
159
241
  ])
160
- ])
161
- ]),
162
- t("div", null, [
163
- d(P)
164
- ])
242
+ ]),
243
+ _: 1
244
+ }),
245
+ n(g, null, {
246
+ title: l(() => t[11] || (t[11] = [
247
+ i("Appearance")
248
+ ])),
249
+ description: l(() => t[12] || (t[12] = [
250
+ i(" Choose between light, dark, or system-based appearance for your workspace. ")
251
+ ])),
252
+ default: l(() => [
253
+ n(E)
254
+ ]),
255
+ _: 1
256
+ })
165
257
  ])
166
258
  ])
167
259
  ]));
168
260
  }
169
261
  });
170
262
  export {
171
- X as default
263
+ ne as default
172
264
  };
@@ -1,3 +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>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
2
2
  export default _default;
3
- //# sourceMappingURL=SettingsGeneralMode.vue.d.ts.map
3
+ //# sourceMappingURL=SettingsAppearance.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsAppearance.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Settings/components/SettingsAppearance.vue"],"names":[],"mappings":";AA0RA,wBAMG"}
@@ -0,0 +1,74 @@
1
+ import { defineComponent as k, openBlock as o, createElementBlock as x, createVNode as l, unref as e, normalizeClass as n, withCtx as d, createElementVNode as i, createBlock as a, createCommentVNode as c, createTextVNode as f } from "vue";
2
+ import { ScalarButton as u, ScalarIcon as m } from "@scalar/components";
3
+ import { useColorMode as b } from "@scalar/use-hooks/useColorMode";
4
+ const g = { class: "flex flex-col gap-2" }, y = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, w = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, C = { class: "flex items-center justify-center w-5 h-5 rounded-full border-[1.5px] p-1" }, z = /* @__PURE__ */ k({
5
+ __name: "SettingsAppearance",
6
+ setup(h) {
7
+ const { colorMode: s, setColorMode: r } = b();
8
+ return (v, t) => (o(), x("div", g, [
9
+ l(e(u), {
10
+ class: n([
11
+ "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
12
+ e(s) === "system" ? "bg-b-2 text-c-1" : "bg-b-1"
13
+ ]),
14
+ onClick: t[0] || (t[0] = (p) => e(r)("system"))
15
+ }, {
16
+ default: d(() => [
17
+ i("div", y, [
18
+ e(s) === "system" ? (o(), a(e(m), {
19
+ key: 0,
20
+ icon: "Checkmark",
21
+ size: "xs",
22
+ thickness: "3.5"
23
+ })) : c("", !0)
24
+ ]),
25
+ t[3] || (t[3] = f(" System Preference (default) "))
26
+ ]),
27
+ _: 1
28
+ }, 8, ["class"]),
29
+ l(e(u), {
30
+ class: n([
31
+ "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border-1/2",
32
+ e(s) === "light" ? "bg-b-2 text-c-1" : "bg-b-1"
33
+ ]),
34
+ onClick: t[1] || (t[1] = (p) => e(r)("light"))
35
+ }, {
36
+ default: d(() => [
37
+ i("div", w, [
38
+ e(s) === "light" ? (o(), a(e(m), {
39
+ key: 0,
40
+ icon: "Checkmark",
41
+ size: "xs",
42
+ thickness: "3.5"
43
+ })) : c("", !0)
44
+ ]),
45
+ t[4] || (t[4] = f(" Light Mode Always "))
46
+ ]),
47
+ _: 1
48
+ }, 8, ["class"]),
49
+ l(e(u), {
50
+ class: n([
51
+ "w-full shadow-none text-c-1 justify-start pl-2 gap-2 mb-8 border-1/2",
52
+ e(s) === "dark" ? "bg-b-2 text-c-1" : "bg-b-1"
53
+ ]),
54
+ onClick: t[2] || (t[2] = (p) => e(r)("dark"))
55
+ }, {
56
+ default: d(() => [
57
+ i("div", C, [
58
+ e(s) === "dark" ? (o(), a(e(m), {
59
+ key: 0,
60
+ icon: "Checkmark",
61
+ size: "xs",
62
+ thickness: "3.5"
63
+ })) : c("", !0)
64
+ ]),
65
+ t[5] || (t[5] = f(" Dark Mode Always "))
66
+ ]),
67
+ _: 1
68
+ }, 8, ["class"])
69
+ ]));
70
+ }
71
+ });
72
+ export {
73
+ z as default
74
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SettingsAppearance.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,24 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: Readonly<{
4
+ title?: () => string;
5
+ description?: () => string;
6
+ default: () => any;
7
+ }> & {
8
+ title?: () => string;
9
+ description?: () => string;
10
+ default: () => any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
24
+ //# sourceMappingURL=SettingsSection.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Settings/components/SettingsSection.vue"],"names":[],"mappings":"AAwCA,iBAAS,cAAc;WAgDT,OAAO,IAA6B;;gBA1DxC,MAAM,MAAM;sBACN,MAAM,MAAM;iBACjB,MAAM,GAAG;;gBAFV,MAAM,MAAM;sBACN,MAAM,MAAM;iBACjB,MAAM,GAAG;;;;EA6DnB;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,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"}
@@ -0,0 +1,24 @@
1
+ import { defineComponent as n, openBlock as t, createElementBlock as o, renderSlot as s, createCommentVNode as l } from "vue";
2
+ const i = { class: "flex flex-col gap-2" }, r = {
3
+ key: 0,
4
+ class: "font-bold"
5
+ }, c = {
6
+ key: 1,
7
+ class: "text-c-2 mb-4 leading-[21px]"
8
+ }, m = /* @__PURE__ */ n({
9
+ __name: "SettingsSection",
10
+ setup(a) {
11
+ return (e, d) => (t(), o("div", i, [
12
+ e.$slots.title ? (t(), o("h3", r, [
13
+ s(e.$slots, "title")
14
+ ])) : l("", !0),
15
+ e.$slots.description ? (t(), o("p", c, [
16
+ s(e.$slots, "description")
17
+ ])) : l("", !0),
18
+ s(e.$slots, "default")
19
+ ]));
20
+ }
21
+ });
22
+ export {
23
+ m as default
24
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SettingsSection.vue.js";
2
+ export {
3
+ f as default
4
+ };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.51",
21
+ "version": "2.2.0",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -155,20 +155,20 @@
155
155
  "whatwg-mimetype": "^4.0.0",
156
156
  "yaml": "^2.4.5",
157
157
  "zod": "^3.23.8",
158
- "@scalar/components": "0.12.71",
159
158
  "@scalar/draggable": "0.1.7",
160
- "@scalar/icons": "0.1.1",
161
- "@scalar/import": "0.1.1",
162
- "@scalar/oas-utils": "0.2.76",
159
+ "@scalar/icons": "0.1.2",
160
+ "@scalar/oas-utils": "0.2.78",
161
+ "@scalar/import": "0.1.2",
163
162
  "@scalar/object-utils": "1.1.12",
164
- "@scalar/openapi-parser": "0.8.9",
163
+ "@scalar/openapi-parser": "0.8.10",
165
164
  "@scalar/openapi-types": "0.1.5",
166
- "@scalar/themes": "0.9.48",
167
- "@scalar/types": "0.0.19",
168
- "@scalar/use-codemirror": "0.11.38",
169
- "@scalar/use-hooks": "0.1.0",
165
+ "@scalar/themes": "0.9.49",
166
+ "@scalar/types": "0.0.20",
167
+ "@scalar/use-hooks": "0.1.2",
170
168
  "@scalar/use-toasts": "0.7.7",
171
- "@scalar/use-tooltip": "1.0.4"
169
+ "@scalar/use-tooltip": "1.0.4",
170
+ "@scalar/use-codemirror": "0.11.40",
171
+ "@scalar/components": "0.12.73"
172
172
  },
173
173
  "devDependencies": {
174
174
  "@types/js-cookie": "^3.0.6",
@@ -182,7 +182,7 @@
182
182
  "tailwindcss": "^3.4.4",
183
183
  "tailwindcss-color-mix": "^0.0.8",
184
184
  "type-fest": "^4.20.0",
185
- "vite": "^5.4.9",
185
+ "vite": "^5.4.10",
186
186
  "vite-svg-loader": "^5.1.0",
187
187
  "vitest": "^1.6.0",
188
188
  "@scalar/build-tooling": "0.1.12",
@@ -1,16 +0,0 @@
1
- type __VLS_Props = {
2
- state: {
3
- open: boolean;
4
- show: () => void;
5
- hide: () => void;
6
- };
7
- };
8
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
- submit: (id: string) => any;
10
- close: () => any;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
- onSubmit?: ((id: string) => any) | undefined;
13
- onClose?: (() => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
- export default _default;
16
- //# sourceMappingURL=RequestAuthModal.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestAuthModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue"],"names":[],"mappings":"AA+LA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;CAC7D,CAAC;;;;;;;;AAkRF,wBAQG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SettingsGeneralMode.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneralMode.vue"],"names":[],"mappings":";AAsSA,wBAKG"}