@scalar/api-client 2.18.3 → 2.19.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 (240) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/components/AddressBar/AddressBar.vue2.js +5 -5
  3. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +6 -6
  4. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  5. package/dist/components/ImportCollection/DropEventListener.vue.js +26 -28
  6. package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +1 -1
  7. package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
  8. package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -1
  9. package/dist/components/Search/useSearch.d.ts.map +1 -1
  10. package/dist/components/Search/useSearch.js +16 -16
  11. package/dist/components/Server/index.d.ts +1 -1
  12. package/dist/components/Server/index.d.ts.map +1 -1
  13. package/dist/components/Server/index.js +6 -6
  14. package/dist/components/SideNav/SideNav.vue.js +3 -3
  15. package/dist/components/Sidebar/index.d.ts +1 -2
  16. package/dist/components/Sidebar/index.d.ts.map +1 -1
  17. package/dist/components/index.d.ts +2 -2
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/hooks/index.d.ts +2 -2
  20. package/dist/hooks/index.d.ts.map +1 -1
  21. package/dist/hooks/useResponseBody.d.ts +1 -1
  22. package/dist/hooks/useResponseBody.d.ts.map +1 -1
  23. package/dist/hooks/useResponseBody.js +4 -4
  24. package/dist/hooks/useSidebar.d.ts +1 -1
  25. package/dist/hooks/useSidebar.d.ts.map +1 -1
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/layouts/App/ApiClientApp.vue.js +5 -5
  29. package/dist/layouts/App/MainLayout.vue.js +4 -4
  30. package/dist/layouts/App/create-api-client-app.d.ts +12 -12
  31. package/dist/layouts/App/index.d.ts +1 -1
  32. package/dist/layouts/App/index.d.ts.map +1 -1
  33. package/dist/layouts/Web/ApiClientWeb.vue.js +6 -6
  34. package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
  35. package/dist/layouts/Web/index.d.ts +1 -1
  36. package/dist/layouts/Web/index.d.ts.map +1 -1
  37. package/dist/libs/create-client.d.ts +12 -12
  38. package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
  39. package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -1
  40. package/dist/libs/hot-keys.d.ts +2 -2
  41. package/dist/libs/hot-keys.d.ts.map +1 -1
  42. package/dist/libs/importers/curl.d.ts.map +1 -1
  43. package/dist/libs/index.d.ts +14 -15
  44. package/dist/libs/index.d.ts.map +1 -1
  45. package/dist/libs/index.js +33 -33
  46. package/dist/libs/parse-curl.js +4 -4
  47. package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
  48. package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
  49. package/dist/libs/send-request/create-fetch-body.js +1 -1
  50. package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
  51. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  52. package/dist/libs/send-request/create-fetch-query-params.js +2 -1
  53. package/dist/libs/send-request/index.d.ts +1 -1
  54. package/dist/libs/send-request/index.d.ts.map +1 -1
  55. package/dist/libs/send-request/index.js +4 -4
  56. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
  57. package/dist/libs/send-request/set-request-cookies.js +4 -4
  58. package/dist/store/active-entities.d.ts +1 -1
  59. package/dist/store/collections.d.ts +1 -1
  60. package/dist/store/collections.d.ts.map +1 -1
  61. package/dist/store/collections.js +4 -4
  62. package/dist/store/environment.d.ts +1 -1
  63. package/dist/store/environment.d.ts.map +1 -1
  64. package/dist/store/environment.js +4 -4
  65. package/dist/store/import-spec.d.ts +2 -2
  66. package/dist/store/import-spec.d.ts.map +1 -1
  67. package/dist/store/index.d.ts +1 -1
  68. package/dist/store/index.d.ts.map +1 -1
  69. package/dist/store/request-example.d.ts +1 -1
  70. package/dist/store/request-example.d.ts.map +1 -1
  71. package/dist/store/request-example.js +6 -6
  72. package/dist/store/requests.d.ts +1 -1
  73. package/dist/store/requests.d.ts.map +1 -1
  74. package/dist/store/requests.js +8 -8
  75. package/dist/store/security-schemes.d.ts +1 -1
  76. package/dist/store/security-schemes.d.ts.map +1 -1
  77. package/dist/store/security-schemes.js +4 -4
  78. package/dist/store/servers.d.ts +1 -1
  79. package/dist/store/servers.d.ts.map +1 -1
  80. package/dist/store/servers.js +4 -4
  81. package/dist/store/store.d.ts +12 -12
  82. package/dist/store/tags.d.ts +1 -1
  83. package/dist/store/tags.d.ts.map +1 -1
  84. package/dist/store/tags.js +5 -5
  85. package/dist/store/workspace.d.ts +13 -13
  86. package/dist/store/workspace.d.ts.map +1 -1
  87. package/dist/store/workspace.js +7 -7
  88. package/dist/style.css +1 -1
  89. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -5
  90. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +17 -16
  92. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +3 -3
  93. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -1
  94. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +22 -22
  95. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  96. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +14 -13
  97. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  98. package/dist/v2/blocks/operation-block/helpers/build-request.js +43 -41
  99. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +14 -0
  100. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +1 -0
  101. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +14 -0
  102. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +25 -0
  103. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -0
  104. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +17 -0
  105. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +10 -0
  106. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  108. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +29 -25
  109. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +6 -1
  110. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  111. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +27 -23
  112. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +10 -1
  113. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  114. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +48 -39
  115. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  116. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +49 -46
  117. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +1 -1
  118. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -1
  119. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
  120. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +6 -2
  121. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  122. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  123. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +200 -115
  124. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +4 -4
  125. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  126. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +21 -17
  127. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +16 -10
  128. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  129. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +32 -45
  130. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +16 -13
  131. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  132. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +4 -4
  133. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +32 -33
  134. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +33 -18
  135. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  136. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +106 -106
  137. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +10 -5
  138. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  139. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +60 -31
  140. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +41 -0
  141. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -0
  142. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +25 -0
  143. package/dist/v2/blocks/request-block/helpers/group-by.d.ts +1 -1
  144. package/dist/v2/blocks/request-block/helpers/group-by.d.ts.map +1 -1
  145. package/dist/v2/blocks/request-block/helpers/group-by.js +6 -3
  146. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +13 -0
  147. package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -0
  148. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +7 -0
  149. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  150. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  151. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +61 -63
  152. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +1 -2
  153. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  154. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +2 -2
  155. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +2 -2
  156. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +1 -2
  157. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  158. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
  159. package/dist/v2/components/code-input/CodeInput.vue.d.ts +2 -0
  160. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  161. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  162. package/dist/v2/components/code-input/CodeInput.vue2.js +57 -51
  163. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
  164. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  165. package/dist/v2/components/sidebar/Sidebar.vue.js +31 -26
  166. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +11 -1
  167. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  168. package/dist/v2/components/sidebar/SidebarMenu.vue.js +31 -32
  169. package/dist/v2/features/app/App.vue.d.ts +16 -2
  170. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  171. package/dist/v2/features/app/App.vue.js +53 -48
  172. package/dist/v2/features/app/app-events.d.ts +5 -9
  173. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  174. package/dist/v2/features/app/app-events.js +146 -120
  175. package/dist/v2/features/app/app-state.d.ts +2 -1
  176. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  177. package/dist/v2/features/app/app-state.js +77 -79
  178. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +11 -1
  179. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  180. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  181. package/dist/v2/features/app/components/AppSidebar.vue2.js +78 -75
  182. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +5 -59
  183. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  184. package/dist/v2/features/app/helpers/create-api-client-app.js +9 -8
  185. package/dist/v2/features/app/index.d.ts +5 -1
  186. package/dist/v2/features/app/index.d.ts.map +1 -1
  187. package/dist/v2/features/app/index.js +8 -2
  188. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  189. package/dist/v2/features/modal/Modal.vue.js +1 -1
  190. package/dist/v2/features/modal/Modal.vue2.js +21 -22
  191. package/dist/v2/features/modal/index.d.ts +1 -1
  192. package/dist/v2/features/modal/index.d.ts.map +1 -1
  193. package/dist/v2/features/modal/index.js +4 -4
  194. package/dist/v2/features/modal/modal-events.d.ts +13 -0
  195. package/dist/v2/features/modal/modal-events.d.ts.map +1 -0
  196. package/dist/v2/features/modal/modal-events.js +31 -0
  197. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  198. package/dist/v2/features/operation/Operation.vue.js +30 -43
  199. package/dist/v2/workspace-events.d.ts +25 -0
  200. package/dist/v2/workspace-events.d.ts.map +1 -0
  201. package/dist/v2/workspace-events.js +202 -0
  202. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  203. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  204. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
  205. package/dist/views/Cookies/Cookies.vue2.js +3 -3
  206. package/dist/views/Environment/handle-drag.d.ts +1 -1
  207. package/dist/views/Environment/handle-drag.d.ts.map +1 -1
  208. package/dist/views/Request/RequestRoot.vue2.js +9 -9
  209. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +4 -4
  210. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -4
  211. package/dist/views/Request/RequestSection/RequestSection.vue2.js +5 -5
  212. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -1
  213. package/dist/views/Request/RequestSidebar.vue2.js +6 -6
  214. package/dist/views/Request/RequestSidebarItem.vue2.js +6 -6
  215. package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
  216. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  217. package/dist/views/Request/ResponseSection/index.d.ts +1 -1
  218. package/dist/views/Request/ResponseSection/index.d.ts.map +1 -1
  219. package/dist/views/Request/ResponseSection/index.js +4 -4
  220. package/dist/views/Request/consts/index.d.ts +2 -3
  221. package/dist/views/Request/consts/index.d.ts.map +1 -1
  222. package/dist/views/Request/consts/new-auth-options.d.ts +1 -1
  223. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  224. package/dist/views/Request/handle-drag.d.ts +1 -1
  225. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  226. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  227. package/dist/views/Request/hooks/useOpenApiWatcher.js +14 -14
  228. package/dist/views/Request/libs/auth.d.ts +1 -1
  229. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  230. package/dist/views/Request/libs/index.d.ts +3 -3
  231. package/dist/views/Request/libs/index.d.ts.map +1 -1
  232. package/dist/views/Request/libs/oauth2.js +1 -1
  233. package/dist/views/Request/libs/watch-mode.js +6 -6
  234. package/dist/views/Request/types/index.d.ts +1 -1
  235. package/dist/views/Request/types/index.d.ts.map +1 -1
  236. package/package.json +14 -14
  237. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +0 -18
  238. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +0 -1
  239. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +0 -39
  240. package/dist/v2/features/operation/helpers/get-operation-header.js +0 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7753](https://github.com/scalar/scalar/pull/7753): feat: default headers and global cookies
8
+
9
+ ### Patch Changes
10
+
11
+ - [#7821](https://github.com/scalar/scalar/pull/7821): Fix slot name for menu items
12
+ - [#7786](https://github.com/scalar/scalar/pull/7786): chore: refactor mutators in workspace store
13
+ - [#7806](https://github.com/scalar/scalar/pull/7806): fix: replace star with named exports
14
+ - [#7762](https://github.com/scalar/scalar/pull/7762): fix: only enable required parameters by default
15
+
16
+ #### Updated Dependencies
17
+
18
+ - **@scalar/workspace-store@0.25.0**
19
+ - [#7786](https://github.com/scalar/scalar/pull/7786): chore: refactor mutators in workspace store
20
+ - [#7753](https://github.com/scalar/scalar/pull/7753): feat: default headers and global cookies
21
+ - [#7763](https://github.com/scalar/scalar/pull/7763): fix: normalize securitySchemes 'scheme'
22
+
23
+ - **@scalar/components@0.16.24**
24
+ - [#7802](https://github.com/scalar/scalar/pull/7802): fix: Vue warning because of deprecated icon syntax
25
+
26
+ - **@scalar/json-magic@0.9.2**
27
+ - [#7763](https://github.com/scalar/scalar/pull/7763): fix: correctly execute onAfterNodeProcess for ref nodes
28
+
29
+ - **@scalar/postman-to-openapi@0.4.0**
30
+ - [#7571](https://github.com/scalar/scalar/pull/7571): feat: major refactor, improves everything, keeps all the data now
31
+
32
+ - **@scalar/oas-utils@0.6.21**
33
+
34
+ - **@scalar/sidebar@0.7.14**
35
+
36
+ - **@scalar/use-codemirror@0.13.18**
37
+
38
+ - **@scalar/openapi-parser@0.24.2**
39
+
40
+ ## 2.18.4
41
+
42
+ ### Patch Changes
43
+
44
+ - [#7774](https://github.com/scalar/scalar/pull/7774): Adds exports to V2 client.
45
+
46
+ #### Updated Dependencies
47
+
48
+ - **@scalar/workspace-store@0.24.10**
49
+ - [#7774](https://github.com/scalar/scalar/pull/7774): Adds exports to V2 client.
50
+
51
+ - **@scalar/oas-utils@0.6.20**
52
+
53
+ - **@scalar/sidebar@0.7.13**
54
+
55
+ - **@scalar/components@0.16.23**
56
+
57
+ - **@scalar/use-codemirror@0.13.17**
58
+
3
59
  ## 2.18.3
4
60
 
5
61
  ### Patch Changes
@@ -5,9 +5,9 @@ import { ScalarIconPlay as T } from "@scalar/icons";
5
5
  import D from "../CodeInput/CodeInput.vue.js";
6
6
  import O from "../HttpMethod/HttpMethod.vue.js";
7
7
  import P from "./AddressBarHistory.vue.js";
8
- import K from "../Server/ServerDropdown.vue.js";
9
- import { useWorkspace as Q } from "../../store/store.js";
10
- import { useLayout as W } from "../../hooks/useLayout.js";
8
+ import { useWorkspace as K } from "../../store/store.js";
9
+ import { useLayout as Q } from "../../hooks/useLayout.js";
10
+ import W from "../Server/ServerDropdown.vue.js";
11
11
  const j = ["id"], F = { class: "address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]" }, G = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, J = { class: "z-context-plus flex gap-1" }, X = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, Y = {
12
12
  "aria-hidden": "true",
13
13
  class: "inline-flex items-center gap-1"
@@ -23,7 +23,7 @@ const j = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
23
23
  },
24
24
  emits: ["importCurl"],
25
25
  setup(e) {
26
- const c = I(), { requestMutators: f, events: d } = Q(), { layout: m } = W(), v = s(null), x = s(null), w = (t) => {
26
+ const c = I(), { requestMutators: f, events: d } = K(), { layout: m } = Q(), v = s(null), x = s(null), w = (t) => {
27
27
  e.operation.path !== t && f.edit(e.operation.uid, "path", t);
28
28
  };
29
29
  z(
@@ -95,7 +95,7 @@ const j = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
95
95
  }, null, 8, ["isEditable", "method"])
96
96
  ]),
97
97
  l("div", X, [
98
- e.collection.servers.length ? (b(), $(n(K), {
98
+ e.collection.servers.length ? (b(), $(n(W), {
99
99
  key: 0,
100
100
  collection: e.collection,
101
101
  layout: "client",
@@ -8,16 +8,16 @@ import { useActiveEntities as ee } from "../../store/active-entities.js";
8
8
  import te from "./CommandActionForm.vue.js";
9
9
  import oe from "./CommandActionInput.vue.js";
10
10
  import ae from "./WatchModeToggle.vue.js";
11
- import { isPostmanCollection as P, getPostmanDocumentDetails as le, convertPostmanToOpenApi as V } from "../../libs/postman.js";
12
- import { getOpenApiDocumentDetails as re } from "../../libs/getOpenApiDocumentDetails.js";
11
+ import { useWorkspace as le } from "../../store/store.js";
12
+ import { isPostmanCollection as P, getPostmanDocumentDetails as re, convertPostmanToOpenApi as V } from "../../libs/postman.js";
13
+ import { getOpenApiDocumentDetails as ne } from "../../libs/getOpenApiDocumentDetails.js";
13
14
  import { isUrl as h } from "../../libs/isUrl.js";
14
- import { useFileDialog as ne } from "../../hooks/useFileDialog.js";
15
- import { useWorkspace as ie } from "../../store/store.js";
15
+ import { useFileDialog as ie } from "../../hooks/useFileDialog.js";
16
16
  const se = { class: "flex justify-between" }, ce = { class: "flex w-full flex-row items-center justify-between gap-3" }, Pe = /* @__PURE__ */ J({
17
17
  __name: "CommandPaletteImport",
18
18
  emits: ["close", "back"],
19
19
  setup(ue, { emit: T }) {
20
- const C = T, _ = X(), { activeWorkspace: n, activeCollection: F } = ee(), { importSpecFile: k, importSpecFromUrl: W, events: N } = ie(), { toast: i } = Q(), s = q(), o = A(""), f = A(!0), a = x(() => P(o.value) ? le(o.value) : re(o.value)), S = x(
20
+ const C = T, _ = X(), { activeWorkspace: n, activeCollection: F } = ee(), { importSpecFile: k, importSpecFromUrl: W, events: N } = le(), { toast: i } = Q(), s = q(), o = A(""), f = A(!0), a = x(() => P(o.value) ? re(o.value) : ne(o.value)), S = x(
21
21
  () => a.value ? a.value.type : "json"
22
22
  );
23
23
  function w(e) {
@@ -29,7 +29,7 @@ const se = { class: "flex justify-between" }, ce = { class: "flex w-full flex-ro
29
29
  }
30
30
  });
31
31
  }
32
- const y = x(() => h(o.value)), $ = x(() => !!a.value), { open: B } = ne({
32
+ const y = x(() => h(o.value)), $ = x(() => !!a.value), { open: B } = ie({
33
33
  onChange: (e) => {
34
34
  const t = e?.[0];
35
35
  if (t) {
@@ -1 +1 @@
1
- {"version":3,"file":"DropEventListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/DropEventListener.vue"],"names":[],"mappings":";;;;;AAyVA,wBAMG"}
1
+ {"version":3,"file":"DropEventListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/DropEventListener.vue"],"names":[],"mappings":";;;;;AAqVA,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, ref as y, onMounted as x, onBeforeUnmount as h, createBlock as D, openBlock as p, Transition as E, withCtx as T, createElementBlock as _, createCommentVNode as L, createElementVNode as s, createVNode as C, unref as b } from "vue";
1
+ import { defineComponent as g, ref as y, onMounted as x, onBeforeUnmount as h, createBlock as D, openBlock as p, Transition as E, withCtx as T, createElementBlock as _, createCommentVNode as L, createElementVNode as i, createVNode as C, unref as b } from "vue";
2
2
  import { ScalarIcon as k } from "@scalar/components";
3
3
  const A = {
4
4
  key: 0,
@@ -7,51 +7,49 @@ const A = {
7
7
  __name: "DropEventListener",
8
8
  emits: ["input"],
9
9
  setup(B, { emit: v }) {
10
- const l = v, a = y(!1);
11
- let o = 0;
10
+ const s = v, n = y(!1);
11
+ let a = 0;
12
12
  x(() => {
13
- document.addEventListener("dragenter", m), document.addEventListener("dragleave", f), document.addEventListener("dragover", c), document.addEventListener("drop", u);
13
+ document.addEventListener("dragenter", f), document.addEventListener("dragleave", c), document.addEventListener("dragover", u), document.addEventListener("drop", l);
14
14
  }), h(() => {
15
- document.removeEventListener("dragenter", m), document.removeEventListener("dragover", c), document.removeEventListener("dragleave", f), document.removeEventListener("drop", u);
15
+ document.removeEventListener("dragenter", f), document.removeEventListener("dragover", u), document.removeEventListener("dragleave", c), document.removeEventListener("drop", l);
16
16
  });
17
17
  function d(e) {
18
18
  return e.dataTransfer?.types.includes("text/html") ?? !1;
19
19
  }
20
- function u(e) {
21
- if (e.preventDefault(), a.value = !1, o = 0, !d(e) && e.dataTransfer) {
20
+ function l(e) {
21
+ if (e.preventDefault(), n.value = !1, a = 0, !d(e) && e.dataTransfer) {
22
22
  const t = e.dataTransfer.getData("text").replace(/^blob:/, "");
23
23
  if (t)
24
- l("input", t, null, "drop");
24
+ s("input", t, null, "drop");
25
25
  else if (e.dataTransfer.files.length > 0) {
26
- const n = e.dataTransfer.files[0];
27
- if (!n)
26
+ const r = e.dataTransfer.files[0];
27
+ if (!r)
28
28
  return;
29
- const r = new FileReader();
30
- r.onload = (i) => {
31
- i.target && typeof i.target.result == "string" && l("input", i.target.result, null, "drop");
32
- }, r.readAsText(n);
29
+ const m = new FileReader();
30
+ m.onload = (o) => {
31
+ o.target && typeof o.target.result == "string" && s("input", o.target.result, null, "drop");
32
+ }, m.readAsText(r);
33
33
  }
34
34
  }
35
35
  }
36
- function c(e) {
36
+ function u(e) {
37
37
  e.preventDefault();
38
38
  }
39
- function f(e) {
40
- e.preventDefault(), o--, o === 0 && (a.value = !1);
39
+ function c(e) {
40
+ e.preventDefault(), a--, a === 0 && (n.value = !1);
41
41
  }
42
- function m(e) {
43
- if (e.preventDefault(), o++, !d(e)) {
42
+ function f(e) {
43
+ if (e.preventDefault(), a++, !d(e)) {
44
44
  if (e.dataTransfer) {
45
45
  const t = e.dataTransfer.items;
46
- for (let n = 0; n < t.length; n++) {
47
- const r = t[n];
46
+ for (const r of t)
48
47
  if (r?.kind === "string" || r?.type?.includes("json") || r?.type?.includes("yml") || r?.type?.includes("yaml")) {
49
- a.value = !0;
48
+ n.value = !0;
50
49
  return;
51
50
  }
52
- }
53
51
  }
54
- a.value = !1;
52
+ n.value = !1;
55
53
  }
56
54
  }
57
55
  return (e, t) => (p(), D(E, {
@@ -61,16 +59,16 @@ const A = {
61
59
  leaveToClass: "opacity-0"
62
60
  }, {
63
61
  default: T(() => [
64
- a.value ? (p(), _("div", A, [
65
- s("div", w, [
66
- s("div", null, [
62
+ n.value ? (p(), _("div", A, [
63
+ i("div", w, [
64
+ i("div", null, [
67
65
  C(b(k), {
68
66
  icon: "Download",
69
67
  size: "xl",
70
68
  thickness: "2"
71
69
  })
72
70
  ]),
73
- t[0] || (t[0] = s("div", { class: "text-c-1 m-4 text-center" }, " Drop your OpenAPI document here ", -1))
71
+ t[0] || (t[0] = i("div", { class: "text-c-1 m-4 text-center" }, " Drop your OpenAPI document here ", -1))
74
72
  ])
75
73
  ])) : L("", !0)
76
74
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"get-openapi-version.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/get-openapi-version.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,kBAsCrD"}
1
+ {"version":3,"file":"get-openapi-version.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/get-openapi-version.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,kBAsCrD"}
@@ -1,6 +1,6 @@
1
1
  import type { Collection } from '@scalar/oas-utils/entities/spec';
2
- import type { WorkspaceStore } from '../../../store/index.js';
3
2
  import type { Workspace } from '@scalar/oas-utils/entities/workspace';
3
+ import type { WorkspaceStore } from '../../../store/index.js';
4
4
  export declare function importCollection({ store, workspace, source, watchMode, onSuccess, onError, }: {
5
5
  store: WorkspaceStore;
6
6
  workspace: Workspace | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"import-collection.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/import-collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAGjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,wBAAsB,gBAAgB,CAAC,EACrC,KAAK,EACL,SAAS,EACT,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,GACR,EAAE;IACD,KAAK,EAAE,cAAc,CAAA;IACrB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,KAAK,IAAI,CAAA;IACvD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAChC,iBAuBA"}
1
+ {"version":3,"file":"import-collection.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/utils/import-collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,wBAAsB,gBAAgB,CAAC,EACrC,KAAK,EACL,SAAS,EACT,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,GACR,EAAE;IACD,KAAK,EAAE,cAAc,CAAA;IACrB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,KAAK,IAAI,CAAA;IACvD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAChC,iBAuBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAE9D,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM,GAAG,SAAS;;;iCAmHU,UAAU;eAxHrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM,GAAG,SAAS;MAmH8B;sBApDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;mCArDjB,OAAO,EAAE;EAyHhD"}
1
+ {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAE9D,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAQ/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM,GAAG,SAAS;;;iCAmHU,UAAU;eAxHrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM,GAAG,SAAS;MAmH8B;sBApDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;mCArDjB,OAAO,EAAE;EAyHhD"}
@@ -1,19 +1,19 @@
1
- import { PathId as k } from "../../routes.js";
2
- import { useActiveEntities as F } from "../../store/active-entities.js";
3
- import { isDefined as I, shouldIgnoreEntity as S } from "@scalar/oas-utils/helpers";
4
- import H from "fuse.js";
5
- import { ref as l, watch as y, computed as T, nextTick as L } from "vue";
6
- import { useRouter as M } from "vue-router";
1
+ import { isDefined as k, shouldIgnoreEntity as I } from "@scalar/oas-utils/helpers";
2
+ import F from "fuse.js";
3
+ import { ref as l, watch as S, computed as y, nextTick as H } from "vue";
4
+ import { useRouter as L } from "vue-router";
5
+ import { PathId as T } from "../../routes.js";
6
+ import { useActiveEntities as M } from "../../store/active-entities.js";
7
7
  import { useWorkspace as P } from "../../store/store.js";
8
8
  function N() {
9
- const h = M(), { activeWorkspace: W, activeWorkspaceRequests: f, activeWorkspaceCollections: b } = F(), { requests: E, tags: w } = P(), n = l([]), c = l([]), s = l(0), o = l(""), r = l(null), m = l([]), p = new H(n.value, {
9
+ const h = L(), { activeWorkspace: W, activeWorkspaceRequests: f, activeWorkspaceCollections: b } = M(), { requests: E, tags: w } = P(), n = l([]), c = l([]), s = l(0), o = l(""), r = l(null), m = l([]), p = new F(n.value, {
10
10
  keys: ["title", "description", "body"]
11
11
  }), x = () => {
12
12
  o.value = "", s.value = 0, c.value = [], r.value instanceof HTMLInputElement && r.value.blur();
13
13
  }, d = (e) => {
14
- n.value = e.filter((t) => !S(t)).filter((t) => !!!b.value?.find(
14
+ n.value = e.filter((t) => !I(t)).filter((t) => !!!b.value?.find(
15
15
  (a) => a.requests.includes(t.uid)
16
- )?.tags.map((a) => w[a]).filter(I).filter((a) => t.tags?.includes(a.name)).filter((a) => S(a)).length).map((t) => ({
16
+ )?.tags.map((a) => w[a]).filter(k).filter((a) => t.tags?.includes(a.name)).filter((a) => I(a)).length).map((t) => ({
17
17
  id: t.uid,
18
18
  title: t.summary ?? t.method,
19
19
  description: t.description ?? "",
@@ -22,20 +22,20 @@ function N() {
22
22
  link: h?.resolve({
23
23
  name: "request",
24
24
  params: {
25
- [k.Request]: t.uid,
26
- [k.Workspace]: W.value?.uid
25
+ [T.Request]: t.uid,
26
+ [T.Workspace]: W.value?.uid
27
27
  }
28
28
  })?.href
29
29
  })), p.setCollection(n.value);
30
30
  }, R = () => {
31
31
  s.value = 0, c.value = p.search(o.value);
32
32
  };
33
- y(o, (e) => {
33
+ S(o, (e) => {
34
34
  e.length ? R() : c.value = [];
35
35
  });
36
36
  const A = (e) => {
37
37
  const t = e === "up" ? -1 : 1, i = u.value.length;
38
- s.value = (s.value + t + i) % i, L(() => {
38
+ s.value = (s.value + t + i) % i, H(() => {
39
39
  const v = m.value[s.value];
40
40
  v instanceof HTMLElement && v.scrollIntoView({
41
41
  behavior: "smooth",
@@ -47,8 +47,8 @@ function N() {
47
47
  const e = u.value[s.value];
48
48
  e && g(e);
49
49
  }
50
- }, D = T(() => f.value.map((e) => E[e]).filter(I));
51
- y(
50
+ }, D = y(() => f.value.map((e) => E[e]).filter(k));
51
+ S(
52
52
  f,
53
53
  () => {
54
54
  d(D.value);
@@ -57,7 +57,7 @@ function N() {
57
57
  );
58
58
  const g = (e) => {
59
59
  h.push(e.item.id), x();
60
- }, u = T(() => o.value.length === 0 ? n.value.map((e) => ({
60
+ }, u = y(() => o.value.length === 0 ? n.value.map((e) => ({
61
61
  item: e
62
62
  })) : c.value);
63
63
  return {
@@ -1,4 +1,4 @@
1
- export { default as ServerVariablesForm } from './ServerVariablesForm.vue.js';
2
1
  export { default as ServerDropdown } from './ServerDropdown.vue.js';
3
2
  export { default as ServerSelector } from './ServerSelector.vue.js';
3
+ export { default as ServerVariablesForm } from './ServerVariablesForm.vue.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -1,8 +1,8 @@
1
- import { default as o } from "./ServerVariablesForm.vue.js";
2
- import { default as t } from "./ServerDropdown.vue.js";
3
- import { default as l } from "./ServerSelector.vue.js";
1
+ import { default as o } from "./ServerDropdown.vue.js";
2
+ import { default as t } from "./ServerSelector.vue.js";
3
+ import { default as l } from "./ServerVariablesForm.vue.js";
4
4
  export {
5
- t as ServerDropdown,
6
- l as ServerSelector,
7
- o as ServerVariablesForm
5
+ o as ServerDropdown,
6
+ t as ServerSelector,
7
+ l as ServerVariablesForm
8
8
  };
@@ -7,15 +7,15 @@ import B from "./DownloadAppButton.vue.js";
7
7
  import E from "./SideHelp.vue.js";
8
8
  import _ from "./SideNavGroup.vue.js";
9
9
  import g from "./SideNavRouterLink.vue.js";
10
- import { useActiveEntities as N } from "../../store/active-entities.js";
11
- import { useLayout as V } from "../../hooks/useLayout.js";
10
+ import { useLayout as N } from "../../hooks/useLayout.js";
11
+ import { useActiveEntities as V } from "../../store/active-entities.js";
12
12
  const j = { class: "flex items-center" }, A = { class: "flex items-center" }, R = {
13
13
  key: 0,
14
14
  class: "hidden items-center justify-center sm:ml-1.5 sm:flex"
15
15
  }, J = /* @__PURE__ */ h({
16
16
  __name: "SideNav",
17
17
  setup(W) {
18
- const { currentRoute: a } = S(), { layout: s } = V(), { activeWorkspace: l } = N();
18
+ const { currentRoute: a } = S(), { layout: s } = N(), { activeWorkspace: l } = V();
19
19
  return ($, p) => (r(), o("nav", {
20
20
  "aria-label": "App Navigation",
21
21
  class: f([
@@ -1,3 +1,2 @@
1
- import Sidebar from './Sidebar.vue.js';
2
- export { Sidebar };
1
+ export { default as Sidebar } from './Sidebar.vue.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,eAAe,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA"}
@@ -1,4 +1,4 @@
1
- export * from './AddressBar/index.js';
2
- export * from './Sidebar/index.js';
1
+ export { AddressBar } from './AddressBar/index.js';
3
2
  export { default as OpenApiClientButton } from './OpenApiClientButton.vue.js';
3
+ export { Sidebar } from './Sidebar/index.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
@@ -1,5 +1,5 @@
1
- export * from './useFileDialog.js';
2
- export * from './useLayout.js';
1
+ export { type UseFileDialogOptions, useFileDialog } from './useFileDialog.js';
2
+ export { type ClientLayout, LAYOUT_SYMBOL, useLayout } from './useLayout.js';
3
3
  export { useResponseBody } from './useResponseBody.js';
4
4
  export { useSidebar } from './useSidebar.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,KAAK,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -1,5 +1,5 @@
1
- import MimeType from 'whatwg-mimetype';
2
1
  import type { Ref } from 'vue';
2
+ import MimeType from 'whatwg-mimetype';
3
3
  /**
4
4
  * Processes the response body of an HTTP request.
5
5
  * Extracts MIME type, attachment filename, and generates a data URL.
@@ -1 +1 @@
1
- {"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AACtC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,OAAO,EAAE,GAAG,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC,CAAA;CACnE;;;;EAmCA"}
1
+ {"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AAItC;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,OAAO,EAAE,GAAG,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC,CAAA;CACnE;;;;EAmCA"}
@@ -1,13 +1,13 @@
1
- import { extractFilename as f } from "../libs/extractAttachmentFilename.js";
2
1
  import { computed as n, isRef as c } from "vue";
3
- import v from "whatwg-mimetype";
2
+ import f from "whatwg-mimetype";
3
+ import { extractFilename as v } from "../libs/extractAttachmentFilename.js";
4
4
  function R(t) {
5
5
  const i = (a) => a instanceof Blob, e = n(() => c(t.data) ? t.data.value : t.data), u = n(() => c(t.headers) ? t.headers.value : t.headers), r = n(() => {
6
6
  const a = u.value.find((o) => o.name.toLowerCase() === "content-type")?.value ?? "";
7
- return new v(a);
7
+ return new f(a);
8
8
  }), l = n(() => {
9
9
  const a = u.value.find((o) => o.name.toLowerCase() === "content-disposition")?.value ?? "";
10
- return f(a);
10
+ return v(a);
11
11
  }), s = n(() => i(e.value) ? URL.createObjectURL(e.value) : typeof e.value == "string" ? URL.createObjectURL(new Blob([e.value], { type: r.value.toString() })) : e.value instanceof Object && Object.keys(e.value).length ? URL.createObjectURL(
12
12
  new Blob([JSON.stringify(e.value)], {
13
13
  type: r.value.toString()
@@ -1,5 +1,5 @@
1
- import type { ClientLayout } from '../hooks/useLayout.js';
2
1
  import { type InjectionKey } from 'vue';
2
+ import type { ClientLayout } from '../hooks/useLayout.js';
3
3
  type CollapsedSidebarFolders = Record<string, boolean>;
4
4
  /** Creates the sidebar state so that it can be unique across instances of the client */
5
5
  export declare const createSidebarState: ({ layout }: {
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAmC,MAAM,KAAK,CAAA;AAExE,KAAK,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEtD,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAAI,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE;;;CAQtE,CAAA;AACD,eAAO,MAAM,cAAc,EAAe,YAAY,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAA;AAE7F,2CAA2C;AAC3C,eAAO,MAAM,UAAU;IAqBnB,YAAY;;;;;IAIZ,cAAc;qCAhBwB,MAAM,SAAS,OAAO;+BAG5B,MAAM;4BAGT,OAAO;;CAgBvC,CAAA"}
1
+ {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmC,MAAM,KAAK,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEtD,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAAI,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE;;;CAQtE,CAAA;AACD,eAAO,MAAM,cAAc,EAAe,YAAY,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAA;AAE7F,2CAA2C;AAC3C,eAAO,MAAM,UAAU;IAqBnB,YAAY;;;;;IAIZ,cAAc;qCAhBwB,MAAM,SAAS,OAAO;+BAG5B,MAAM;4BAGT,OAAO;;CAgBvC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import './style.css';
2
- export * from './layouts/App/index.js';
3
- export * from './layouts/Modal/index.js';
2
+ export { ApiClientApp, createApiClientApp } from './layouts/App/index.js';
3
+ export { type ApiClient, createApiClientModal } from './layouts/Modal/index.js';
4
4
  export { useWorkspace } from './store/store.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,KAAK,SAAS,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA"}
@@ -10,8 +10,8 @@ import { useSidebar as V } from "../../hooks/useSidebar.js";
10
10
  import O from "./MainLayout.vue.js";
11
11
  import { useActiveEntities as $ } from "../../store/active-entities.js";
12
12
  import { APP_HOTKEYS as g } from "./hotkeys.js";
13
- import { handleHotKeyDown as R, DEFAULT_HOTKEYS as U } from "../../libs/hot-keys.js";
14
- import { useWorkspace as W } from "../../store/store.js";
13
+ import { useWorkspace as R } from "../../store/store.js";
14
+ import { handleHotKeyDown as U, DEFAULT_HOTKEYS as W } from "../../libs/hot-keys.js";
15
15
  const Y = {
16
16
  id: "scalar-client-app",
17
17
  class: "contents"
@@ -19,13 +19,13 @@ const Y = {
19
19
  __name: "ApiClientApp",
20
20
  emits: ["newTab"],
21
21
  setup(I) {
22
- const p = { ...U, ...g }, i = y(null), u = (e) => {
22
+ const p = { ...W, ...g }, i = y(null), u = (e) => {
23
23
  i.value = e;
24
24
  };
25
25
  L();
26
- const { activeWorkspace: a } = $(), { events: o } = W();
26
+ const { activeWorkspace: a } = $(), { events: o } = R();
27
27
  v(() => N());
28
- const l = (e) => R(e, o.hotKeys, { hotKeys: p }), c = (e) => {
28
+ const l = (e) => U(e, o.hotKeys, { hotKeys: p }), c = (e) => {
29
29
  e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), o.commandPalette.emit());
30
30
  };
31
31
  K(() => {
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as s, createElementBlock as n, openBlock as t, normalizeClass as r, unref as e, createVNode as m, createElementVNode as a, renderSlot as f } from "vue";
2
2
  import c from "../../components/SideNav/SideNav.vue.js";
3
- import d from "../../components/CommandPalette/TheCommandPalette.vue.js";
4
- import { useLayout as i } from "../../hooks/useLayout.js";
3
+ import { useLayout as d } from "../../hooks/useLayout.js";
4
+ import i from "../../components/CommandPalette/TheCommandPalette.vue.js";
5
5
  const k = /* @__PURE__ */ s({
6
6
  __name: "MainLayout",
7
7
  setup(u) {
8
- const { layout: o } = i();
8
+ const { layout: o } = d();
9
9
  return (l, p) => (t(), n("main", {
10
10
  class: r(["flex min-h-0 flex-1 flex-col", e(o) === "web" ? "sm:flex-col" : "sm:flex-row"])
11
11
  }, [
12
12
  m(c, { class: "sidenav order-last sm:order-none" }),
13
- m(e(d)),
13
+ m(e(i)),
14
14
  a("div", {
15
15
  class: r(["flex min-h-0 min-w-0 flex-1 flex-col", {
16
16
  "border sm:mr-1.5 sm:mb-1.5 sm:rounded-lg sm:*:rounded-lg": e(o) === "desktop"