@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,65 +1,68 @@
1
- import { defineComponent as w, ref as M, openBlock as l, createElementBlock as c, Fragment as k, createElementVNode as m, unref as a, createVNode as i, withModifiers as y, createCommentVNode as u, withCtx as N, createBlock as $ } from "vue";
2
- import x from "./Actions/DeleteSidebarListElement.vue.js";
3
- import { useModal as D, ScalarIcon as d, ScalarModal as S } from "@scalar/components";
4
- import { useClipboard as A } from "../../hooks/useClipboard.js";
5
- const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" }, I = /* @__PURE__ */ w({
1
+ import { defineComponent as y, ref as h, openBlock as n, createElementBlock as i, Fragment as w, createElementVNode as k, unref as a, createVNode as r, createCommentVNode as s, withModifiers as M, withCtx as D, createBlock as N } from "vue";
2
+ import $ from "./Actions/DeleteSidebarListElement.vue.js";
3
+ import { useModal as B, ScalarIcon as m, ScalarModal as S } from "@scalar/components";
4
+ import { useClipboard as x } from "../../hooks/useClipboard.js";
5
+ const A = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" }, I = /* @__PURE__ */ y({
6
6
  __name: "SidebarListElementActions",
7
7
  props: {
8
8
  variable: {},
9
- warningMessage: {}
9
+ warningMessage: {},
10
+ isCopyable: { type: Boolean },
11
+ isDeletable: { type: Boolean }
10
12
  },
11
13
  emits: ["delete"],
12
- setup(p, { emit: v }) {
13
- const { variable: b } = p, f = v, t = M({ action: "None", name: "" }), n = D(), { copyToClipboard: g } = A();
14
- function C(e) {
15
- t.value = { action: e, name: b.name }, n.show();
14
+ setup(d, { emit: p }) {
15
+ const { variable: b } = d, v = p, t = h({ action: "None", name: "" }), l = B(), { copyToClipboard: f } = x();
16
+ function g(e) {
17
+ t.value = { action: e, name: b.name }, l.show();
16
18
  }
17
- function r() {
18
- n.hide(), t.value = { action: "None", name: "" };
19
+ function u() {
20
+ l.hide(), t.value = { action: "None", name: "" };
19
21
  }
20
- function h(e) {
21
- f("delete", e), r();
22
+ function C(e) {
23
+ v("delete", e), u();
22
24
  }
23
- return (e, o) => (l(), c(k, null, [
24
- m("div", B, [
25
- m("button", {
25
+ return (e, o) => (n(), i(w, null, [
26
+ k("div", A, [
27
+ e.isCopyable ? (n(), i("button", {
28
+ key: 0,
26
29
  class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]",
27
30
  type: "button",
28
- onClick: o[0] || (o[0] = (s) => a(g)(e.variable.name))
31
+ onClick: o[0] || (o[0] = (c) => a(f)(e.variable.name))
29
32
  }, [
30
- i(a(d), {
33
+ r(a(m), {
31
34
  class: "h-3 w-3",
32
35
  icon: "Clipboard"
33
36
  })
34
- ]),
35
- e.variable.isDefault ? u("", !0) : (l(), c("button", {
36
- key: 0,
37
+ ])) : s("", !0),
38
+ !e.variable.isDefault && e.isDeletable ? (n(), i("button", {
39
+ key: 1,
37
40
  class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1",
38
41
  type: "button",
39
- onClick: o[1] || (o[1] = y((s) => C(
42
+ onClick: o[1] || (o[1] = M((c) => g(
40
43
  "Delete"
41
44
  /* Delete */
42
45
  ), ["prevent"]))
43
46
  }, [
44
- i(a(d), {
47
+ r(a(m), {
45
48
  class: "h-3.5 w-3.5",
46
49
  icon: "Close"
47
50
  })
48
- ]))
51
+ ])) : s("", !0)
49
52
  ]),
50
- i(a(S), {
53
+ r(a(S), {
51
54
  size: "sm",
52
- state: a(n),
55
+ state: a(l),
53
56
  title: `${t.value.action} ${t.value.name}`
54
57
  }, {
55
- default: N(() => [
56
- t.value.action === "Delete" ? (l(), $(x, {
58
+ default: D(() => [
59
+ t.value.action === "Delete" ? (n(), N($, {
57
60
  key: 0,
58
61
  variableName: t.value.name,
59
62
  warningMessage: e.warningMessage,
60
- onClose: r,
61
- onDelete: o[2] || (o[2] = (s) => h(e.variable.uid))
62
- }, null, 8, ["variableName", "warningMessage"])) : u("", !0)
63
+ onClose: u,
64
+ onDelete: o[2] || (o[2] = (c) => C(e.variable.uid))
65
+ }, null, 8, ["variableName", "warningMessage"])) : s("", !0)
63
66
  ]),
64
67
  _: 1
65
68
  }, 8, ["state", "title"])
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";gBAoQc;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;gBAApC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;AAwdlD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";gBAoRc;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;gBAApC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;;AA2dlD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNav.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a66e94b"]]);
3
+ import f from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ f(o, [["__scopeId", "data-v-f3ff8743"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,23 +1,22 @@
1
- import { defineComponent as z, reactive as A, ref as B, computed as M, watch as y, onMounted as j, onBeforeUnmount as E, openBlock as d, createElementBlock as g, createElementVNode as f, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as C, Fragment as V, renderList as D, createBlock as q, pushScopeId as K, popScopeId as F } from "vue";
1
+ import { defineComponent as z, reactive as A, ref as M, computed as j, watch as C, onMounted as B, onBeforeUnmount as E, openBlock as d, createElementBlock as g, createElementVNode as h, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as x, Fragment as V, renderList as D, createBlock as K, pushScopeId as q, popScopeId as F } from "vue";
2
2
  import H from "../ScalarHotkey.vue.js";
3
3
  import { ROUTES as W } from "../../constants.js";
4
4
  import { useClipboard as G } from "../../hooks/useClipboard.js";
5
- import { ScalarContextMenu as J, ScalarIcon as h, ScalarDropdown as P, ScalarDropdownItem as x } from "@scalar/components";
5
+ import { ScalarContextMenu as J, ScalarIcon as f, ScalarDropdown as P, ScalarDropdownItem as I } from "@scalar/components";
6
6
  import { capitalize as Q } from "@scalar/oas-utils/helpers";
7
7
  import X from "./TopNavItem.vue.js";
8
8
  import { useWorkspace as Y } from "../../store/store.js";
9
- import { hotKeyBus as I } from "../../libs/event-busses/hot-keys-bus.js";
10
- const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-10 t-app__top-nav" }, te = /* @__PURE__ */ Z(() => /* @__PURE__ */ f("div", { class: "t-app__top-nav-draggable" }, null, -1)), oe = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-1 relative overflow-hidden" }, ae = {
9
+ const Z = (c) => (q("data-v-f3ff8743"), c = c(), F(), c), ee = { class: "flex h-10 t-app__top-nav" }, te = /* @__PURE__ */ Z(() => /* @__PURE__ */ h("div", { class: "t-app__top-nav-draggable" }, null, -1)), oe = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-1 relative overflow-hidden" }, ae = {
11
10
  key: 0,
12
11
  class: "h-full w-full overflow-hidden"
13
- }, de = /* @__PURE__ */ z({
12
+ }, me = /* @__PURE__ */ z({
14
13
  __name: "TopNav",
15
14
  props: {
16
15
  openNewTab: {}
17
16
  },
18
- setup(s) {
19
- const S = s, { activeRequest: L, router: i } = Y(), { copyToClipboard: U } = G(), t = A([{ label: "", path: "", icon: "Add" }]), o = B(0), T = M(() => o.value);
20
- function k() {
17
+ setup(c) {
18
+ const S = c, { activeRequest: L, router: i, events: T } = Y(), { copyToClipboard: U } = G(), t = A([{ label: "", path: "", icon: "Add" }]), o = M(0), k = j(() => o.value);
19
+ function _() {
21
20
  var a;
22
21
  const e = W.find((p) => i.currentRoute.value.name == p.name);
23
22
  e && ((e == null ? void 0 : e.name) === "request" ? t[o.value] = {
@@ -34,35 +33,37 @@ const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-
34
33
  i.push(t[o.value].path);
35
34
  }
36
35
  function m() {
37
- t.push({ label: "", path: "", icon: "Add" }), o.value = t.length - 1, k();
36
+ t.push({ label: "", path: "", icon: "Add" }), o.value = t.length - 1, _();
38
37
  }
39
38
  function r(e) {
40
39
  o.value = e, v();
41
40
  }
42
- y(
41
+ C(
43
42
  () => i.currentRoute.value.path,
44
43
  () => {
45
- k();
44
+ _();
46
45
  },
47
46
  { immediate: !0 }
48
47
  );
49
- function _(e) {
48
+ function N(e) {
50
49
  t.splice(e, 1), o.value = Math.min(
51
50
  o.value,
52
51
  t.length - 1
53
52
  ), v();
54
53
  }
55
- const N = (e) => {
54
+ const y = (e) => {
56
55
  const a = new URL(window.location.href);
57
56
  a.pathname = t[e].path, U(a.toString());
58
57
  }, R = (e) => {
59
58
  t.splice(0, e), t.splice(1), o.value = 0, v();
60
59
  }, w = (e) => {
61
- if (e.addTopNav && m(), e.closeTopNav && _(o.value), e.navigateTopNavLeft && r(Math.max(o.value - 1, 0)), e.navigateTopNavRight && r(Math.min(o.value + 1, t.length - 1)), e.jumpToTab) {
62
- const a = Number(e.jumpToTab.key) - 1;
63
- a >= 0 && a < t.length && r(a);
60
+ if (e) {
61
+ if (e.addTopNav && m(), e.closeTopNav && N(o.value), e.navigateTopNavLeft && r(Math.max(o.value - 1, 0)), e.navigateTopNavRight && r(Math.min(o.value + 1, t.length - 1)), e.jumpToTab) {
62
+ const a = Number(e.jumpToTab.key) - 1;
63
+ a >= 0 && a < t.length && r(a);
64
+ }
65
+ e.jumpToLastTab && r(t.length - 1);
64
66
  }
65
- e.jumpToLastTab && r(t.length - 1);
66
67
  }, $ = (e) => {
67
68
  t.push({
68
69
  label: e.name,
@@ -70,24 +71,24 @@ const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-
70
71
  icon: "ExternalLink"
71
72
  });
72
73
  };
73
- return y(
74
+ return C(
74
75
  () => S.openNewTab,
75
76
  (e) => {
76
77
  e && $(e);
77
78
  },
78
79
  { immediate: !0 }
79
- ), j(() => I.on(w)), E(() => I.off(w)), (e, a) => (d(), g("nav", ee, [
80
+ ), B(() => T.hotKeys.on(w)), E(() => T.hotKeys.off(w)), (e, a) => (d(), g("nav", ee, [
80
81
  te,
81
- f("div", oe, [
82
+ h("div", oe, [
82
83
  t.length === 1 ? (d(), g("div", ae, [
83
84
  n(l(J), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
84
85
  trigger: u(() => [
85
- n(l(h), {
86
+ n(l(f), {
86
87
  icon: t[0].icon,
87
88
  size: "xs",
88
89
  thickness: "2.5"
89
90
  }, null, 8, ["icon"]),
90
- f("span", null, O(t[0].label), 1)
91
+ h("span", null, O(t[0].label), 1)
91
92
  ]),
92
93
  content: u(() => [
93
94
  n(l(P), {
@@ -95,17 +96,17 @@ const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-
95
96
  static: ""
96
97
  }, {
97
98
  items: u(() => [
98
- n(l(x), {
99
+ n(l(I), {
99
100
  class: "flex items-center gap-1.5",
100
101
  onClick: m
101
102
  }, {
102
103
  default: u(() => [
103
- n(l(h), {
104
+ n(l(f), {
104
105
  icon: "AddTab",
105
106
  size: "sm",
106
107
  thickness: "1.5"
107
108
  }),
108
- C(" New Tab "),
109
+ x(" New Tab "),
109
110
  n(H, {
110
111
  class: "bg-b-2 ml-auto",
111
112
  hotkey: "T"
@@ -113,17 +114,17 @@ const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-
113
114
  ]),
114
115
  _: 1
115
116
  }),
116
- n(l(x), {
117
+ n(l(I), {
117
118
  class: "flex items-center gap-1.5",
118
- onClick: a[0] || (a[0] = (p) => N(T.value))
119
+ onClick: a[0] || (a[0] = (p) => y(k.value))
119
120
  }, {
120
121
  default: u(() => [
121
- n(l(h), {
122
+ n(l(f), {
122
123
  icon: "Link",
123
124
  size: "sm",
124
125
  thickness: "1.5"
125
126
  }),
126
- C(" Copy URL ")
127
+ x(" Copy URL ")
127
128
  ]),
128
129
  _: 1
129
130
  })
@@ -133,24 +134,24 @@ const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-
133
134
  ]),
134
135
  _: 1
135
136
  })
136
- ])) : (d(!0), g(V, { key: 1 }, D(t, (p, c) => (d(), q(X, {
137
- key: c,
138
- active: c === T.value,
139
- hotkey: (c + 1).toString(),
137
+ ])) : (d(!0), g(V, { key: 1 }, D(t, (p, s) => (d(), K(X, {
138
+ key: s,
139
+ active: s === k.value,
140
+ hotkey: (s + 1).toString(),
140
141
  icon: p.icon,
141
142
  label: p.label,
142
- onClick: (b) => r(c),
143
- onClose: (b) => _(c),
144
- onCloseOtherTabs: (b) => R(c),
145
- onCopyUrl: (b) => N(c),
143
+ onClick: (b) => r(s),
144
+ onClose: (b) => N(s),
145
+ onCloseOtherTabs: (b) => R(s),
146
+ onCopyUrl: (b) => y(s),
146
147
  onNewTab: m
147
148
  }, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
148
- f("button", {
149
+ h("button", {
149
150
  class: "text-c-3 hover:bg-b-3 p-1.5 rounded webkit-app-no-drag",
150
151
  type: "button",
151
152
  onClick: m
152
153
  }, [
153
- n(l(h), {
154
+ n(l(f), {
154
155
  icon: "Add",
155
156
  size: "xs",
156
157
  thickness: "2.5"
@@ -161,5 +162,5 @@ const Z = (s) => (K("data-v-9a66e94b"), s = s(), F(), s), ee = { class: "flex h-
161
162
  }
162
163
  });
163
164
  export {
164
- de as default
165
+ me as default
165
166
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBAyBM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBA2BM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,12 +1,12 @@
1
- import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
- import l from "../../_virtual/_plugin-vue_export-helper.js";
3
- const n = {}, c = { class: "flex flex-col min-h-0 flex-1 xl:overflow-hidden md:flex-row leading-3 z-0" };
4
- function f(e, s) {
5
- return o(), r("div", c, [
6
- t(e.$slots, "default")
1
+ import { openBlock as o, createElementBlock as d, renderSlot as r } from "vue";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ const i = {}, l = { class: "divide-y md:divide-y-0 divide-1 flex flex-col min-h-0 flex-1 xl:overflow-hidden md:flex-row leading-3" };
4
+ function n(e, c) {
5
+ return o(), d("div", l, [
6
+ r(e.$slots, "default")
7
7
  ]);
8
8
  }
9
- const a = /* @__PURE__ */ l(n, [["render", f]]);
9
+ const a = /* @__PURE__ */ t(i, [["render", n]]);
10
10
  export {
11
11
  a as default
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAiFA,iBAAS,cAAc;;;QA+IK,GAAG;;;QACD,GAAG;;;QACH,GAAG;EAkBhC;AACD,QAAA,MAAM,eAAe;kBAxLH,OAAO;gBACT,MAAM;;;;;kBADJ,OAAO;gBACT,MAAM;;;;;iBADJ,OAAO;eACT,MAAM;MA6LpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAiFA,iBAAS,cAAc;;;QAgJK,GAAG;;;QACD,GAAG;;;QACH,GAAG;EAkBhC;AACD,QAAA,MAAM,eAAe;kBAzLH,OAAO;gBACT,MAAM;;;;;kBADJ,OAAO;gBACT,MAAM;;;;;iBADJ,OAAO;eACT,MAAM;MA8LpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -40,7 +40,7 @@ const x = { class: "flex flex-1 items-center gap-1.5 text-c-1" }, g = {
40
40
  ]),
41
41
  _: 2
42
42
  }, 1024),
43
- i(o(h), { class: "rounded-b" }, {
43
+ i(o(h), { class: "rounded-b diclosure-panel" }, {
44
44
  default: n(() => [
45
45
  l(e.$slots, "default", { open: t })
46
46
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutContent.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBA6BM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayoutContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutContent.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBA4BM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
2
2
  import d from "../../_virtual/_plugin-vue_export-helper.js";
3
- const l = {}, c = { class: "border-t-1/2 md:border-t-0 divide divide-y xl:divide-y-0 xl:divide-x-1/2 flex xl:flex-row flex-col custom-scroll pr-0 rounded" };
3
+ const l = {}, c = { class: "border-t-1/2 md:border-t-0 divide divide-y xl:divide-y-0 xl:divide-x-1/2 flex xl:flex-row flex-col custom-scroll pr-0" };
4
4
  function i(e, n) {
5
5
  return o(), r("div", c, [
6
6
  t(e.$slots, "default")
@@ -1 +1 @@
1
- {"version":3,"file":"ViewLayoutSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutSection.vue"],"names":[],"mappings":"AA8BA,iBAAS,cAAc;mBA6CI,GAAG;qBACD,GAAG;EAc/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ViewLayoutSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutSection.vue"],"names":[],"mappings":"AA8BA,iBAAS,cAAc;mBA8CI,GAAG;qBACD,GAAG;EAc/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,20 +1,20 @@
1
- import { defineComponent as n, openBlock as r, createElementBlock as s, unref as o, createElementVNode as d, renderSlot as l } from "vue";
2
- import { nanoid as i } from "nanoid";
1
+ import { defineComponent as n, openBlock as r, createElementBlock as s, unref as t, createElementVNode as i, renderSlot as o } from "vue";
2
+ import { nanoid as d } from "nanoid";
3
3
  const a = ["aria-labelledby"], c = ["id"], u = /* @__PURE__ */ n({
4
4
  __name: "ViewLayoutSection",
5
5
  setup(m) {
6
- const e = i();
7
- return (t, p) => (r(), s("section", {
8
- "aria-labelledby": o(e),
9
- class: "flex xl:min-w-0 xl:flex-1 flex-col xl:custom-scroll bg-b-1"
6
+ const e = d();
7
+ return (l, p) => (r(), s("section", {
8
+ "aria-labelledby": t(e),
9
+ class: "flex h-full xl:min-w-0 xl:flex-1 flex-col xl:custom-scroll bg-b-1"
10
10
  }, [
11
- d("div", {
12
- id: o(e),
13
- class: "xl:min-h-header flex items-center border-b-1/2 p-2 md:px-4 md:py-2.5 xl:px-6 xl:pr-5 text-sm font-medium sticky top-0 bg-b-1 z-20 rounded-t xl:rounded-none"
11
+ i("div", {
12
+ id: t(e),
13
+ class: "min-h-11 xl:min-h-header flex items-center border-b-1/2 px-3.5 py-2 md:px-4 md:py-2.5 xl:px-6 xl:pr-5 text-sm font-medium sticky top-0 bg-b-1 xl:rounded-none"
14
14
  }, [
15
- l(t.$slots, "title")
15
+ o(l.$slots, "title")
16
16
  ], 8, c),
17
- l(t.$slots, "default")
17
+ o(l.$slots, "default")
18
18
  ], 8, a));
19
19
  }
20
20
  });
@@ -10,5 +10,9 @@ export declare const ROUTES: readonly [{
10
10
  readonly prettyName: "Env Vars";
11
11
  readonly name: "environment";
12
12
  readonly icon: "Brackets";
13
+ }, {
14
+ readonly prettyName: "Settings";
15
+ readonly name: "settings";
16
+ readonly icon: "Settings";
13
17
  }];
14
18
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;EAMT,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;EAOT,CAAA"}
package/dist/constants.js CHANGED
@@ -1,7 +1,8 @@
1
1
  const e = [
2
2
  { prettyName: "Request", name: "request", icon: "ExternalLink" },
3
3
  { prettyName: "Cookies", name: "cookies", icon: "Cookie" },
4
- { prettyName: "Env Vars", name: "environment", icon: "Brackets" }
4
+ { prettyName: "Env Vars", name: "environment", icon: "Brackets" },
5
+ { prettyName: "Settings", name: "settings", icon: "Settings" }
5
6
  // { prettyName: 'Servers', name: 'servers', icon: 'Server' },
6
7
  // { label: 'Git Sync', icon: 'Branch', path: '/git-sync' },
7
8
  ];
@@ -1,7 +1,8 @@
1
1
  /** This hook helps with retrieving the dark mode setting from local storage or from system settings. */
2
- export declare function useDarkModeState(isDarkInitially?: boolean): {
3
- isDark: import("vue").Ref<boolean>;
2
+ export declare function useDarkModeState(): {
3
+ colorMode: import("vue").Ref<"light" | "dark" | "system">;
4
4
  toggleDarkMode: () => void;
5
- setDarkMode: (value: boolean) => void;
5
+ setDarkMode: (value: boolean | null) => void;
6
+ getSystemModePreference: () => boolean;
6
7
  };
7
8
  //# sourceMappingURL=useDarkModeState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDarkModeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useDarkModeState.ts"],"names":[],"mappings":"AAKA,wGAAwG;AACxG,wBAAgB,gBAAgB,CAAC,eAAe,CAAC,EAAE,OAAO;;;yBAoC5B,OAAO;EA8BpC"}
1
+ {"version":3,"file":"useDarkModeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useDarkModeState.ts"],"names":[],"mappings":"AAIA,wGAAwG;AACxG,wBAAgB,gBAAgB;;;yBAYF,OAAO,GAAG,IAAI;;EA+E3C"}
@@ -1,31 +1,46 @@
1
- import { ref as s, watch as f } from "vue";
2
- const t = s(!1);
3
- function c(a) {
4
- var n;
5
- const r = () => {
6
- var o, i;
7
- const e = typeof window < "u" ? (o = window.localStorage) == null ? void 0 : o.getItem("isDark") : null;
8
- return typeof e == "string" ? !!JSON.parse(e) : !!(typeof window < "u" && typeof (window == null ? void 0 : window.matchMedia) == "function" && ((i = window == null ? void 0 : window.matchMedia("(prefers-color-scheme: dark)")) != null && i.matches));
9
- }, d = () => {
1
+ import { ref as r, watch as l, onMounted as s, onUnmounted as c } from "vue";
2
+ const o = r("dark");
3
+ function f() {
4
+ const a = () => {
10
5
  var e;
11
- t.value = !t.value, typeof window < "u" && ((e = window == null ? void 0 : window.localStorage) == null || e.setItem("isDark", JSON.stringify(t.value)));
6
+ o.value = o.value === "dark" ? "light" : "dark", typeof window < "u" && ((e = window == null ? void 0 : window.localStorage) == null || e.setItem("colorMode", o.value));
12
7
  };
13
- function l(e) {
14
- var o;
15
- t.value = e, typeof window < "u" && ((o = window == null ? void 0 : window.localStorage) == null || o.setItem("isDark", JSON.stringify(t.value)));
8
+ function i(e) {
9
+ var d;
10
+ o.value = e === null ? "system" : e ? "dark" : "light", typeof window < "u" && ((d = window == null ? void 0 : window.localStorage) == null || d.setItem("colorMode", o.value));
16
11
  }
17
- return t.value = (typeof window > "u" ? null : JSON.parse(((n = window.localStorage) == null ? void 0 : n.getItem("isDark")) || "null")) ?? a ?? r(), f(
18
- t,
12
+ const t = () => {
13
+ var e;
14
+ return typeof window < "u" && typeof (window == null ? void 0 : window.matchMedia) == "function" ? (e = window == null ? void 0 : window.matchMedia("(prefers-color-scheme: dark)")) == null ? void 0 : e.matches : !1;
15
+ }, n = (e) => {
16
+ typeof document < "u" && (e === null ? (document.body.classList.toggle("dark-mode", t()), document.body.classList.toggle("light-mode", !t())) : (document.body.classList.toggle("dark-mode", e === !0), document.body.classList.toggle("light-mode", e === !1)));
17
+ };
18
+ return o.value = typeof window > "u" ? "dark" : localStorage.getItem("colorMode") || "dark", n(
19
+ o.value === "dark" || o.value === "system" && t()
20
+ ), l(
21
+ o,
19
22
  (e) => {
20
- typeof document > "u" || (document.body.classList.toggle("dark-mode", e), document.body.classList.toggle("light-mode", !e));
23
+ n(
24
+ e === "dark" || e === "system" && t()
25
+ );
21
26
  },
22
27
  { immediate: !0 }
23
- ), {
24
- isDark: t,
25
- toggleDarkMode: d,
26
- setDarkMode: l
28
+ ), s(() => {
29
+ if (typeof window < "u" && typeof window.matchMedia == "function") {
30
+ const e = window.matchMedia("(prefers-color-scheme: dark)"), d = () => {
31
+ o.value === "system" && n(t());
32
+ };
33
+ e.addEventListener("change", d), c(() => {
34
+ e.removeEventListener("change", d);
35
+ });
36
+ }
37
+ }), {
38
+ colorMode: o,
39
+ toggleDarkMode: a,
40
+ setDarkMode: i,
41
+ getSystemModePreference: t
27
42
  };
28
43
  }
29
44
  export {
30
- c as useDarkModeState
45
+ f as useDarkModeState
31
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cA0I8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAoMjD,wBAMG"}
1
+ {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cAyH8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAgMjD,wBAMG"}