@scalar/api-client 2.1.18 → 2.1.20

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 (213) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  5. package/dist/components/AddressBar/AddressBar.vue2.js +70 -69
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +29 -29
  10. package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
  11. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  12. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  13. package/dist/components/CodeInput/CodeInput.vue2.js +57 -49
  14. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
  19. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
  21. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
  23. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +13 -7
  24. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  25. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  26. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +87 -89
  27. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  28. package/dist/components/ContextBar.vue.js +2 -2
  29. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
  30. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  31. package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
  32. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  33. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
  34. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  35. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  36. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
  37. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
  38. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
  39. package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
  40. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
  41. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
  42. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  43. package/dist/components/SideNav/SideNav.vue.js +1 -1
  44. package/dist/components/SideNav/SideNav.vue2.js +37 -26
  45. package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
  46. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  47. package/dist/components/SideNav/SideNavLink.vue.js +10 -11
  48. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
  49. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  50. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  51. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  52. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  53. package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
  54. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
  55. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  56. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  57. package/dist/components/Sidebar/SidebarListElement.vue2.js +26 -22
  58. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
  59. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  60. package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
  61. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  62. package/dist/components/TopNav/TopNav.vue.js +3 -3
  63. package/dist/components/TopNav/TopNav.vue2.js +41 -40
  64. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  65. package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
  66. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  67. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  68. package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
  69. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
  70. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  71. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
  72. package/dist/constants.d.ts +4 -0
  73. package/dist/constants.d.ts.map +1 -1
  74. package/dist/constants.js +2 -1
  75. package/dist/hooks/useDarkModeState.d.ts +4 -3
  76. package/dist/hooks/useDarkModeState.d.ts.map +1 -1
  77. package/dist/hooks/useDarkModeState.js +36 -21
  78. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  79. package/dist/layouts/App/ApiClientApp.vue.js +40 -44
  80. package/dist/layouts/App/create-api-client-app.d.ts +46 -36
  81. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  82. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  83. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  84. package/dist/layouts/Modal/ApiClientModal.vue2.js +17 -17
  85. package/dist/layouts/Modal/create-api-client-modal.d.ts +92 -72
  86. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  87. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  88. package/dist/layouts/Web/ApiClientWeb.vue.js +30 -34
  89. package/dist/layouts/Web/create-api-client-web.d.ts +46 -36
  90. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  91. package/dist/libs/create-client.d.ts +46 -36
  92. package/dist/libs/create-client.d.ts.map +1 -1
  93. package/dist/libs/event-bus.d.ts +41 -0
  94. package/dist/libs/event-bus.d.ts.map +1 -0
  95. package/dist/libs/event-bus.js +32 -0
  96. package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
  97. package/dist/libs/hot-keys.d.ts.map +1 -0
  98. package/dist/libs/hot-keys.js +45 -0
  99. package/dist/libs/importers/curl.d.ts +3 -0
  100. package/dist/libs/importers/curl.d.ts.map +1 -0
  101. package/dist/libs/importers/curl.js +61 -0
  102. package/dist/libs/importers/index.d.ts +2 -0
  103. package/dist/libs/importers/index.d.ts.map +1 -0
  104. package/dist/libs/importers/index.js +4 -0
  105. package/dist/libs/index.d.ts +4 -1
  106. package/dist/libs/index.d.ts.map +1 -1
  107. package/dist/libs/index.js +31 -31
  108. package/dist/libs/parse-curl.d.ts +12 -0
  109. package/dist/libs/parse-curl.d.ts.map +1 -0
  110. package/dist/libs/parse-curl.js +70 -0
  111. package/dist/libs/send-request.d.ts +4 -1
  112. package/dist/libs/send-request.d.ts.map +1 -1
  113. package/dist/libs/send-request.js +103 -103
  114. package/dist/router.d.ts +2 -1
  115. package/dist/router.d.ts.map +1 -1
  116. package/dist/router.js +33 -24
  117. package/dist/store/collections.d.ts +4 -4
  118. package/dist/store/cookies.d.ts +4 -4
  119. package/dist/store/environment.d.ts +4 -4
  120. package/dist/store/events.d.ts +29 -0
  121. package/dist/store/events.d.ts.map +1 -0
  122. package/dist/store/events.js +31 -0
  123. package/dist/store/request-example.d.ts +4 -4
  124. package/dist/store/requests.d.ts +4 -4
  125. package/dist/store/router-params.d.ts +1 -0
  126. package/dist/store/router-params.d.ts.map +1 -1
  127. package/dist/store/router-params.js +2 -1
  128. package/dist/store/security-schemes.d.ts +4 -4
  129. package/dist/store/servers.d.ts +4 -4
  130. package/dist/store/store.d.ts +92 -72
  131. package/dist/store/store.d.ts.map +1 -1
  132. package/dist/store/store.js +138 -129
  133. package/dist/store/tags.d.ts +4 -4
  134. package/dist/store/workspace.d.ts +4 -4
  135. package/dist/style.css +1 -1
  136. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  137. package/dist/views/Cookies/Cookies.vue2.js +18 -18
  138. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  139. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
  140. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  141. package/dist/views/Request/Request.vue.js +1 -1
  142. package/dist/views/Request/Request.vue2.js +148 -98
  143. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  145. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
  146. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  147. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
  148. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  149. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  150. package/dist/views/Request/RequestSidebar.vue2.js +101 -102
  151. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  153. package/dist/views/Request/RequestSidebarItem.vue2.js +73 -73
  154. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  155. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  156. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +33 -34
  157. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
  158. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  159. package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
  160. package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
  161. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
  162. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
  163. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
  164. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
  165. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  166. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  167. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -33
  168. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  169. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
  170. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +18 -19
  171. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  172. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
  173. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  174. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
  175. package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
  176. package/dist/views/Settings/Settings.vue.d.ts +4 -0
  177. package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
  178. package/dist/views/Settings/Settings.vue.js +4 -0
  179. package/dist/views/Settings/Settings.vue2.js +59 -0
  180. package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
  181. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
  182. package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
  183. package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
  184. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
  185. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
  186. package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
  187. package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
  188. package/package.json +59 -35
  189. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
  190. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
  191. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
  192. package/dist/components/DarkModeToggle/index.d.ts +0 -2
  193. package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
  194. package/dist/components/DarkModeToggle/index.js +0 -4
  195. package/dist/components/ScreenReader.vue.js +0 -7
  196. package/dist/components/ScreenReader.vue2.js +0 -18
  197. package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
  198. package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
  199. package/dist/libs/event-busses/cancel-request-bus.js +0 -5
  200. package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
  201. package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
  202. package/dist/libs/event-busses/command-palette-bus.js +0 -5
  203. package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
  204. package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
  205. package/dist/libs/event-busses/execute-request-bus.js +0 -5
  206. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
  207. package/dist/libs/event-busses/hot-keys-bus.js +0 -47
  208. package/dist/libs/event-busses/index.d.ts +0 -6
  209. package/dist/libs/event-busses/index.d.ts.map +0 -1
  210. package/dist/libs/event-busses/index.js +0 -15
  211. package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
  212. package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
  213. package/dist/libs/event-busses/request-status-bus.js +0 -5
@@ -1,89 +1,101 @@
1
- import { defineComponent as h, computed as u, ref as x, openBlock as r, createBlock as n, withCtx as d, createVNode as i, unref as y, createElementVNode as f, createTextVNode as C, createCommentVNode as l, createElementBlock as A, Fragment as B } from "vue";
2
- import S from "../../../components/ContextBar.vue.js";
3
- import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import g from "./ResponseBody.vue.js";
5
- import E from "./ResponseEmpty.vue.js";
6
- import H from "./ResponseLoadingOverlay.vue.js";
7
- import N from "./ResponseMetaInformation.vue.js";
8
- import { ScalarIcon as R } from "@scalar/components";
9
- import V from "./ResponseCookies.vue.js";
10
- import L from "./ResponseHeaders.vue.js";
11
- const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ h({
1
+ import { defineComponent as A, computed as i, ref as C, openBlock as t, createBlock as a, withCtx as d, createVNode as c, unref as S, createElementVNode as f, createTextVNode as B, createCommentVNode as l, createElementBlock as v, Fragment as _ } from "vue";
2
+ import g from "../../../components/ContextBar.vue.js";
3
+ import H from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import R from "./ResponseBody.vue.js";
5
+ import V from "./ResponseEmpty.vue.js";
6
+ import $ from "./ResponseLoadingOverlay.vue.js";
7
+ import E from "./ResponseMetaInformation.vue.js";
8
+ import { ScalarIcon as I } from "@scalar/components";
9
+ import L from "./ResponseBodyVirtual.vue.js";
10
+ /* empty css */
11
+ import N from "./ResponseCookies.vue.js";
12
+ import O from "./ResponseHeaders.vue.js";
13
+ const T = { class: "flex items-center flex-1" }, q = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, z = 5e6, J = /* @__PURE__ */ A({
12
14
  __name: "ResponseSection",
13
15
  props: {
14
16
  response: {}
15
17
  },
16
- setup(v) {
17
- const a = v, c = u(() => {
18
- var s;
19
- const o = (s = a.response) == null ? void 0 : s.headers;
20
- return o ? Object.keys(o).map((e) => ({
21
- name: e,
22
- value: o[e],
18
+ setup(k) {
19
+ const r = k, p = i(() => {
20
+ var n;
21
+ const e = (n = r.response) == null ? void 0 : n.headers;
22
+ return e ? Object.keys(e).map((o) => ({
23
+ name: o,
24
+ value: e[o],
23
25
  required: !1
24
26
  })).filter(
25
- (e) => ![
27
+ (o) => ![
26
28
  "rest-api-client-content-length",
27
29
  "X-API-Client-Content-Length"
28
- ].includes(e.name)
30
+ ].includes(o.name)
29
31
  ) : [];
30
- }), k = u(
32
+ }), y = i(
31
33
  () => {
32
- var o;
33
- return ((o = a.response) == null ? void 0 : o.cookieHeaderKeys.flatMap((s) => {
34
- var m, p;
35
- const e = (p = (m = a.response) == null ? void 0 : m.headers) == null ? void 0 : p[s];
36
- return e ? {
37
- name: s,
38
- value: e,
34
+ var e;
35
+ return ((e = r.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((n) => {
36
+ var m, u;
37
+ const o = (u = (m = r.response) == null ? void 0 : m.headers) == null ? void 0 : u[n];
38
+ return o ? {
39
+ name: n,
40
+ value: o,
39
41
  required: !1
40
42
  } : [];
41
43
  })) ?? [];
42
44
  }
43
- ), _ = ["All", "Cookies", "Headers", "Body"], t = x("All");
44
- return (o, s) => (r(), n($, null, {
45
+ ), h = ["All", "Cookies", "Headers", "Body"], s = C("All"), x = i(
46
+ () => {
47
+ var e;
48
+ return typeof ((e = r.response) == null ? void 0 : e.data) == "string" && r.response.data.length > z;
49
+ }
50
+ );
51
+ return (e, n) => (t(), a(H, null, {
45
52
  title: d(() => [
46
- i(y(R), {
53
+ c(S(I), {
47
54
  class: "text-c-3 mr-2 rotate-180",
48
55
  icon: "ExternalLink",
49
56
  size: "sm",
50
57
  thickness: "2.5"
51
58
  }),
52
- f("div", q, [
53
- C(" Response "),
54
- o.response ? (r(), n(N, {
59
+ f("div", T, [
60
+ B(" Response "),
61
+ e.response ? (t(), a(E, {
55
62
  key: 0,
56
- response: o.response
63
+ response: e.response
57
64
  }, null, 8, ["response"])) : l("", !0),
58
- i(S, {
59
- activeSection: t.value,
60
- sections: _,
61
- onSetActiveSection: s[0] || (s[0] = (e) => t.value = e)
65
+ c(g, {
66
+ activeSection: s.value,
67
+ sections: h,
68
+ onSetActiveSection: n[0] || (n[0] = (o) => s.value = o)
62
69
  }, null, 8, ["activeSection"])
63
70
  ])
64
71
  ]),
65
72
  default: d(() => {
66
- var e;
73
+ var o;
67
74
  return [
68
- f("div", I, [
69
- o.response ? (r(), A(B, { key: 1 }, [
70
- t.value === "All" || t.value === "Cookies" ? (r(), n(V, {
75
+ f("div", q, [
76
+ e.response ? (t(), v(_, { key: 1 }, [
77
+ s.value === "All" || s.value === "Cookies" ? (t(), a(N, {
71
78
  key: 0,
72
- cookies: k.value
79
+ cookies: y.value
73
80
  }, null, 8, ["cookies"])) : l("", !0),
74
- t.value === "All" || t.value === "Headers" ? (r(), n(L, {
81
+ s.value === "All" || s.value === "Headers" ? (t(), a(O, {
75
82
  key: 1,
76
- headers: c.value
83
+ headers: p.value
77
84
  }, null, 8, ["headers"])) : l("", !0),
78
- t.value === "All" || t.value === "Body" ? (r(), n(g, {
79
- key: 2,
80
- active: !0,
81
- data: (e = a.response) == null ? void 0 : e.data,
82
- headers: c.value,
83
- title: "Body"
84
- }, null, 8, ["data", "headers"])) : l("", !0)
85
- ], 64)) : (r(), n(E, { key: 0 })),
86
- i(H)
85
+ s.value === "All" || s.value === "Body" ? (t(), v(_, { key: 2 }, [
86
+ x.value ? (t(), a(L, {
87
+ key: 0,
88
+ content: r.response.data
89
+ }, null, 8, ["content"])) : (t(), a(R, {
90
+ key: 1,
91
+ active: !0,
92
+ data: (o = r.response) == null ? void 0 : o.data,
93
+ headers: p.value,
94
+ title: "Body"
95
+ }, null, 8, ["data", "headers"]))
96
+ ], 64)) : l("", !0)
97
+ ], 64)) : (t(), a(V, { key: 0 })),
98
+ c($)
87
99
  ])
88
100
  ];
89
101
  }),
@@ -92,5 +104,5 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
92
104
  }
93
105
  });
94
106
  export {
95
- X as default
107
+ J as default
96
108
  };
@@ -1,26 +1,25 @@
1
- import { defineComponent as R, computed as O, ref as M, openBlock as u, createElementBlock as W, createElementVNode as o, createVNode as t, unref as e, withCtx as s, Fragment as A, renderList as I, createBlock as x, withModifiers as r, normalizeClass as L, toDisplayString as z } from "vue";
2
- import U from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
- import V from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
4
- import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as q, ScalarButton as S, ScalarDropdownDivider as F, ScalarModal as N } from "@scalar/components";
5
- import { useRouter as P } from "vue-router";
6
- import { useWorkspace as Y } from "../../../store/store.js";
7
- import { commandPaletteBus as G } from "../../../libs/event-busses/command-palette-bus.js";
1
+ import { defineComponent as O, computed as A, ref as M, openBlock as u, createElementBlock as W, createElementVNode as o, createVNode as t, unref as e, withCtx as s, Fragment as I, renderList as L, createBlock as x, withModifiers as r, normalizeClass as U, toDisplayString as z } from "vue";
2
+ import V from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
+ import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
4
+ import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as F, ScalarButton as S, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
5
+ import { useRouter as Y } from "vue-router";
6
+ import { useWorkspace as G } from "../../../store/store.js";
8
7
  const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = /* @__PURE__ */ o("span", null, "Rename", -1), Z = /* @__PURE__ */ o("span", null, "Delete", -1), ee = /* @__PURE__ */ o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
9
8
  /* @__PURE__ */ o("div", { class: "flex items-center text-c-2" }, [
10
9
  /* @__PURE__ */ o("span", null, "Only workspace cannot be deleted.")
11
10
  ])
12
- ], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), ue = /* @__PURE__ */ R({
11
+ ], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), pe = /* @__PURE__ */ O({
13
12
  __name: "WorkspaceDropdown",
14
13
  setup(oe) {
15
- const { activeWorkspace: f, workspaces: d, workspaceMutators: _ } = Y(), { push: g } = P(), T = (n) => {
14
+ const { activeWorkspace: f, workspaces: d, workspaceMutators: _, events: T } = G(), { push: g } = Y(), E = (n) => {
16
15
  n !== f.value.uid && g(`/workspace/${n}`);
17
- }, b = O(() => Object.keys(d).length === 1), E = () => G.emit({ commandName: "Create Workspace" }), h = M(""), c = M(""), v = C(), w = C(), y = (n) => {
18
- h.value = d[n].name, c.value = n, v.show();
19
- }, j = (n) => {
20
- n.trim() && (_.edit(c.value, "name", n.trim()), v.hide());
16
+ }, b = A(() => Object.keys(d).length === 1), j = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), c = M(""), h = C(), w = C(), y = (n) => {
17
+ v.value = d[n].name, c.value = n, h.show();
18
+ }, B = (n) => {
19
+ n.trim() && (_.edit(c.value, "name", n.trim()), h.hide());
21
20
  }, D = (n) => {
22
- h.value = d[n].name, c.value = n, w.show();
23
- }, B = async () => {
21
+ v.value = d[n].name, c.value = n, w.show();
22
+ }, R = async () => {
24
23
  if (!b.value) {
25
24
  const n = f.value.uid === c.value, a = { ...d };
26
25
  if (delete a[c.value], _.delete(c.value), n) {
@@ -34,14 +33,14 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
34
33
  o("div", H, [
35
34
  t(e($), null, {
36
35
  items: s(() => [
37
- (u(!0), W(A, null, I(e(d), (p, l) => (u(), x(e(m), {
36
+ (u(!0), W(I, null, L(e(d), (p, l) => (u(), x(e(m), {
38
37
  key: l,
39
38
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
40
- onClick: r((k) => T(l), ["stop"])
39
+ onClick: r((k) => E(l), ["stop"])
41
40
  }, {
42
41
  default: s(() => [
43
42
  o("div", {
44
- class: L([
43
+ class: U([
45
44
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
46
45
  e(f).uid === l ? "bg-blue text-b-1" : "text-transparent"
47
46
  ])
@@ -71,7 +70,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
71
70
  ]),
72
71
  _: 2
73
72
  }, 1032, ["onMousedown", "onTouchend"]),
74
- b.value ? (u(), x(e(q), {
73
+ b.value ? (u(), x(e(F), {
75
74
  key: 0,
76
75
  class: "z-10",
77
76
  side: "bottom"
@@ -140,10 +139,10 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
140
139
  ]),
141
140
  _: 2
142
141
  }, 1032, ["onClick"]))), 128)),
143
- t(e(F)),
142
+ t(e(P)),
144
143
  t(e(m), {
145
144
  class: "flex items-center gap-1.5",
146
- onClick: E
145
+ onClick: j
147
146
  }, {
148
147
  default: s(() => [
149
148
  o("div", se, [
@@ -186,25 +185,25 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
186
185
  title: "Delete workspace"
187
186
  }, {
188
187
  default: s(() => [
189
- t(U, {
190
- variableName: h.value,
188
+ t(V, {
189
+ variableName: v.value,
191
190
  warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
192
191
  onClose: a[2] || (a[2] = (p) => e(w).hide()),
193
- onDelete: B
192
+ onDelete: R
194
193
  }, null, 8, ["variableName"])
195
194
  ]),
196
195
  _: 1
197
196
  }, 8, ["state"]),
198
197
  t(e(N), {
199
198
  size: "xxs",
200
- state: e(v),
199
+ state: e(h),
201
200
  title: "Rename Workspace"
202
201
  }, {
203
202
  default: s(() => [
204
- t(V, {
205
- name: h.value,
206
- onClose: a[3] || (a[3] = (p) => e(v).hide()),
207
- onEdit: j
203
+ t(q, {
204
+ name: v.value,
205
+ onClose: a[3] || (a[3] = (p) => e(h).hide()),
206
+ onEdit: B
208
207
  }, null, 8, ["name"])
209
208
  ]),
210
209
  _: 1
@@ -213,5 +212,5 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
213
212
  }
214
213
  });
215
214
  export {
216
- ue as default
215
+ pe as default
217
216
  };
@@ -0,0 +1,4 @@
1
+ import { type DefineComponent } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
3
+ export default _default;
4
+ //# sourceMappingURL=Settings.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/Settings.vue"],"names":[],"mappings":"AA0DA,OAAO,EAAE,KAAK,eAAe,EAAO,MAAM,KAAK,CAAA;;AAuI/C,wBAKG"}
@@ -0,0 +1,4 @@
1
+ import f from "./Settings.vue2.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,59 @@
1
+ import { defineComponent as i, ref as m, openBlock as a, createBlock as r, withCtx as e, createVNode as o, unref as s, createElementVNode as c, createElementBlock as f, Fragment as p, renderList as u, createTextVNode as _, toDisplayString as d, resolveDynamicComponent as x } from "vue";
2
+ import b from "../../components/Sidebar/SidebarList.vue.js";
3
+ import S from "../../components/Sidebar/SidebarListElement.vue.js";
4
+ import g from "../../components/ViewLayout/ViewLayout.vue.js";
5
+ import v from "../../components/ViewLayout/ViewLayoutContent.vue.js";
6
+ import y from "./SettingsGeneral.vue.js";
7
+ import C from "../../components/Sidebar/Sidebar.vue.js";
8
+ const L = { class: "flex-1" }, T = /* @__PURE__ */ i({
9
+ __name: "Settings",
10
+ setup(V) {
11
+ const l = {
12
+ general: {
13
+ component: y,
14
+ title: "general"
15
+ }
16
+ }, n = m("general");
17
+ return (k, h) => (a(), r(g, null, {
18
+ default: e(() => [
19
+ o(s(C), { title: "Settings" }, {
20
+ content: e(() => [
21
+ c("div", L, [
22
+ o(b, null, {
23
+ default: e(() => [
24
+ (a(), f(p, null, u(l, (t) => o(S, {
25
+ key: t.title,
26
+ class: "text-xs capitalize",
27
+ isCopyable: !1,
28
+ isDeletable: !1,
29
+ variable: {
30
+ uid: t.title,
31
+ name: t.title
32
+ }
33
+ }, {
34
+ default: e(() => [
35
+ _(d(t.title), 1)
36
+ ]),
37
+ _: 2
38
+ }, 1032, ["variable"])), 64))
39
+ ]),
40
+ _: 1
41
+ })
42
+ ])
43
+ ]),
44
+ _: 1
45
+ }),
46
+ o(v, { class: "flex-1" }, {
47
+ default: e(() => [
48
+ (a(), r(x(l[n.value].component)))
49
+ ]),
50
+ _: 1
51
+ })
52
+ ]),
53
+ _: 1
54
+ }));
55
+ }
56
+ });
57
+ export {
58
+ T as default
59
+ };
@@ -1,3 +1,3 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
2
  export default _default;
3
- //# sourceMappingURL=DarkModeIconToggle.vue.d.ts.map
3
+ //# sourceMappingURL=SettingsGeneral.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsGeneral.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneral.vue"],"names":[],"mappings":";AA2bA,wBAKG"}
@@ -0,0 +1,124 @@
1
+ import { defineComponent as w, openBlock as f, createBlock as v, withCtx as t, createTextVNode as a, createElementVNode as s, createVNode as e, unref as l, createElementBlock as y, Fragment as b, renderList as S, withModifiers as C, normalizeClass as $, toDisplayString as u } from "vue";
2
+ import V from "../../components/DataTable/DataTable.vue.js";
3
+ import D from "../../components/DataTable/DataTableCell.vue.js";
4
+ import P from "../../components/DataTable/DataTableCheckbox.vue.js";
5
+ import n from "../../components/DataTable/DataTableRow.vue.js";
6
+ import p from "../../components/DataTable/DataTableText.vue.js";
7
+ import z from "../../components/ViewLayout/ViewLayoutSection.vue.js";
8
+ import { ScalarDropdown as B, ScalarDropdownItem as T, ScalarIcon as d, ScalarButton as U } from "@scalar/components";
9
+ import { themeLabels as _ } from "@scalar/themes";
10
+ import I from "./SettingsGeneralMode.vue.js";
11
+ import { useWorkspace as N } from "../../store/store.js";
12
+ const W = { class: "flex flex-col p-2" }, j = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Y = /* @__PURE__ */ w({
13
+ __name: "SettingsGeneral",
14
+ setup(E) {
15
+ const { activeWorkspace: r, workspaceMutators: h, proxyUrl: i, setProxyUrl: c } = N(), x = () => {
16
+ i.value ? c("") : c("https://proxy.scalar.com");
17
+ }, k = [
18
+ "default",
19
+ "alternate",
20
+ "moon",
21
+ "purple",
22
+ "solarized",
23
+ "bluePlanet",
24
+ "saturn",
25
+ "kepler",
26
+ "mars",
27
+ "deepSpace"
28
+ ], g = (m) => {
29
+ h.edit(r.value.uid, "themeId", m);
30
+ };
31
+ return (m, G) => (f(), v(z, null, {
32
+ title: t(() => [
33
+ a("General")
34
+ ]),
35
+ default: t(() => [
36
+ s("div", W, [
37
+ e(V, { columns: ["", ""] }, {
38
+ default: t(() => [
39
+ e(n, null, {
40
+ default: t(() => [
41
+ e(p, { text: "Use Scalar Proxy" }),
42
+ e(P, {
43
+ align: "left",
44
+ modelValue: !!l(i),
45
+ "onUpdate:modelValue": x
46
+ }, null, 8, ["modelValue"])
47
+ ]),
48
+ _: 1
49
+ }),
50
+ e(n, null, {
51
+ default: t(() => [
52
+ e(p, { text: "Theme Picker" }),
53
+ e(D, null, {
54
+ default: t(() => [
55
+ e(l(B), null, {
56
+ items: t(() => [
57
+ (f(), y(b, null, S(k, (o) => e(l(T), {
58
+ key: o,
59
+ class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
60
+ onClick: C((L) => g(o), ["stop"])
61
+ }, {
62
+ default: t(() => [
63
+ s("div", {
64
+ class: $([
65
+ "flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
66
+ l(r).themeId === o ? "bg-blue text-b-1" : "text-transparent"
67
+ ])
68
+ }, [
69
+ e(l(d), {
70
+ class: "size-2.5",
71
+ icon: "Checkmark",
72
+ thickness: "3.5"
73
+ })
74
+ ], 2),
75
+ a(" " + u(l(_)[o]), 1)
76
+ ]),
77
+ _: 2
78
+ }, 1032, ["onClick"])), 64))
79
+ ]),
80
+ default: t(() => [
81
+ e(l(U), {
82
+ class: "font-normal h-full justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
83
+ fullWidth: "",
84
+ variant: "ghost"
85
+ }, {
86
+ default: t(() => [
87
+ s("h2", j, [
88
+ a(u(l(_)[l(r).themeId]) + " ", 1),
89
+ e(l(d), {
90
+ class: "size-2.5",
91
+ icon: "ChevronDown",
92
+ thickness: "3.5"
93
+ })
94
+ ])
95
+ ]),
96
+ _: 1
97
+ })
98
+ ]),
99
+ _: 1
100
+ })
101
+ ]),
102
+ _: 1
103
+ })
104
+ ]),
105
+ _: 1
106
+ }),
107
+ e(n, null, {
108
+ default: t(() => [
109
+ e(I)
110
+ ]),
111
+ _: 1
112
+ })
113
+ ]),
114
+ _: 1
115
+ })
116
+ ])
117
+ ]),
118
+ _: 1
119
+ }));
120
+ }
121
+ });
122
+ export {
123
+ Y as default
124
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SettingsGeneral.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
3
+ //# sourceMappingURL=SettingsGeneralMode.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsGeneralMode.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneralMode.vue"],"names":[],"mappings":";AAgUA,wBAKG"}
@@ -0,0 +1,78 @@
1
+ import { defineComponent as u, ref as d, openBlock as p, createElementBlock as _, Fragment as h, createVNode as e, withCtx as o, unref as r, withModifiers as n, createTextVNode as a, createElementVNode as k, toDisplayString as v } from "vue";
2
+ import M from "../../components/DataTable/DataTableCell.vue.js";
3
+ import S from "../../components/DataTable/DataTableText.vue.js";
4
+ import { ScalarDropdown as D, ScalarDropdownItem as s, ScalarButton as g, ScalarIcon as x } from "@scalar/components";
5
+ import { useDarkModeState as y } from "../../hooks/useDarkModeState.js";
6
+ const w = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, I = /* @__PURE__ */ u({
7
+ __name: "SettingsGeneralMode",
8
+ setup(C) {
9
+ const { colorMode: c, setDarkMode: l } = y(), t = d("System Preference");
10
+ c.value === "system" ? t.value = "System Preference" : c.value === "dark" ? t.value = "Dark" : t.value = "Light";
11
+ const i = () => {
12
+ l(null), t.value = "System Preference";
13
+ }, f = () => {
14
+ l(!1), t.value = "Light";
15
+ }, m = () => {
16
+ l(!0), t.value = "Dark";
17
+ };
18
+ return (P, L) => (p(), _(h, null, [
19
+ e(S, { text: "Mode" }),
20
+ e(M, null, {
21
+ default: o(() => [
22
+ e(r(D), null, {
23
+ items: o(() => [
24
+ e(r(s), {
25
+ onClick: n(i, ["stop"])
26
+ }, {
27
+ default: o(() => [
28
+ a(" System Preference ")
29
+ ]),
30
+ _: 1
31
+ }),
32
+ e(r(s), {
33
+ onClick: n(f, ["stop"])
34
+ }, {
35
+ default: o(() => [
36
+ a(" Light Mode ")
37
+ ]),
38
+ _: 1
39
+ }),
40
+ e(r(s), {
41
+ onClick: n(m, ["stop"])
42
+ }, {
43
+ default: o(() => [
44
+ a(" Dark Mode ")
45
+ ]),
46
+ _: 1
47
+ })
48
+ ]),
49
+ default: o(() => [
50
+ e(r(g), {
51
+ class: "font-normal h-full justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
52
+ fullWidth: "",
53
+ variant: "ghost"
54
+ }, {
55
+ default: o(() => [
56
+ k("h2", w, [
57
+ a(v(t.value) + " ", 1),
58
+ e(r(x), {
59
+ class: "size-2.5",
60
+ icon: "ChevronDown",
61
+ thickness: "3.5"
62
+ })
63
+ ])
64
+ ]),
65
+ _: 1
66
+ })
67
+ ]),
68
+ _: 1
69
+ })
70
+ ]),
71
+ _: 1
72
+ })
73
+ ], 64));
74
+ }
75
+ });
76
+ export {
77
+ I as default
78
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SettingsGeneralMode.vue.js";
2
+ export {
3
+ f as default
4
+ };