@scalar/api-client 2.14.1 → 2.17.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 (293) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/dist/hooks/useResponseBody.js +6 -6
  3. package/dist/libs/errors.d.ts +1 -0
  4. package/dist/libs/errors.d.ts.map +1 -1
  5. package/dist/libs/errors.js +1 -0
  6. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  7. package/dist/libs/send-request/create-request-operation.js +41 -35
  8. package/dist/style.css +1 -1
  9. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +28 -38
  10. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +81 -65
  12. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -23
  13. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
  15. package/dist/v2/blocks/operation-block/components/Header.vue2.js +29 -38
  16. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +10 -0
  17. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -0
  18. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +22 -0
  19. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +31 -0
  20. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -0
  21. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +31 -0
  22. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +3 -9
  23. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  24. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +56 -0
  25. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +10 -3
  26. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
  27. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +46 -0
  28. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +45 -0
  29. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -0
  30. package/dist/v2/blocks/operation-block/helpers/build-request.js +66 -0
  31. package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +9 -0
  32. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts +16 -0
  33. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts.map +1 -0
  34. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +4 -0
  35. package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +17 -0
  36. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +9 -3
  37. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  38. package/dist/v2/blocks/operation-block/helpers/get-example.js +21 -0
  39. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +53 -0
  40. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -0
  41. package/dist/v2/blocks/operation-block/helpers/send-request.js +120 -0
  42. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +1 -1
  43. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  45. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
  46. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +89 -110
  47. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +2 -2
  48. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -1
  49. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +8 -13
  50. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
  51. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +22 -28
  52. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +19 -8
  53. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  54. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -24
  55. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +12 -0
  56. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -0
  57. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +20 -0
  58. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts +10 -0
  59. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts.map +1 -0
  60. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +4 -0
  61. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +14 -12
  62. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
  63. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +191 -169
  64. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  65. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +10 -10
  66. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +2 -1
  67. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  68. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +15 -19
  69. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +2 -2
  70. package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -1
  71. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  72. package/dist/v2/blocks/operation-code-sample/types.d.ts +16 -0
  73. package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
  74. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +15 -10
  75. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  76. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  77. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +202 -160
  78. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
  79. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  80. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
  81. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +60 -51
  82. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
  83. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
  84. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
  85. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
  86. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -2
  87. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
  89. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -4
  90. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  92. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +3 -2
  93. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  94. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +146 -147
  95. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
  96. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
  97. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
  98. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
  99. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  100. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  101. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +21 -15
  102. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
  103. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
  104. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +13 -3
  105. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
  106. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
  108. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
  109. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/response-block/components/Headers.vue.js +27 -27
  111. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
  112. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
  113. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
  114. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
  115. package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
  116. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +4 -15
  117. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  118. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  119. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +117 -71
  120. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
  121. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
  122. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
  123. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
  124. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +59 -56
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  128. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
  129. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  130. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -24
  131. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
  132. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  133. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +44 -43
  134. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
  135. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
  137. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
  138. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  139. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
  140. package/dist/v2/components/code-input/CodeInput.vue.d.ts +16 -6
  141. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  142. package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
  143. package/dist/v2/components/code-input/CodeInput.vue2.js +81 -65
  144. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
  145. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
  146. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
  147. package/dist/v2/components/resize/index.d.ts +0 -1
  148. package/dist/v2/components/resize/index.d.ts.map +1 -1
  149. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +9 -5
  150. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  151. package/dist/v2/components/sidebar/Sidebar.vue.js +51 -46
  152. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
  153. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  154. package/dist/v2/features/app/App.vue.d.ts +3 -0
  155. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  156. package/dist/v2/features/app/App.vue.js +130 -143
  157. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
  158. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  159. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  160. package/dist/v2/features/app/components/AppSidebar.vue2.js +216 -106
  161. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
  162. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  163. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts +22 -0
  164. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +1 -0
  165. package/dist/v2/features/app/components/ItemDecorator.vue.js +138 -0
  166. package/dist/v2/features/app/components/ItemDecorator.vue2.js +4 -0
  167. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
  168. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
  169. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
  170. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  171. package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
  172. package/dist/v2/features/app/helpers/routes.d.ts +32 -6
  173. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  174. package/dist/v2/features/app/helpers/routes.js +25 -16
  175. package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
  176. package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
  177. package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
  178. package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
  179. package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
  180. package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
  181. package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
  182. package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
  183. package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
  184. package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
  185. package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
  186. package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
  187. package/dist/v2/features/app/hooks/use-workspace-client-app-events.js +156 -0
  188. package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
  189. package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
  190. package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
  191. package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
  192. package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
  193. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
  194. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  195. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  196. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
  197. package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
  198. package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
  199. package/dist/v2/features/collection/components/Environment.vue.js +32 -1
  200. package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
  201. package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
  202. package/dist/v2/features/collection/components/Servers.vue.js +142 -2
  203. package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
  204. package/dist/v2/features/collection/components/Settings.vue.js +58 -2
  205. package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
  206. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +8 -0
  207. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  208. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +76 -68
  209. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +8 -0
  210. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
  211. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +83 -75
  212. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +4 -0
  213. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
  214. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +32 -34
  215. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +16 -0
  216. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  217. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +24 -21
  218. package/dist/v2/features/modal/Modal.vue.d.ts +23 -1
  219. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  220. package/dist/v2/features/modal/Modal.vue.js +1 -1
  221. package/dist/v2/features/modal/Modal.vue2.js +118 -31
  222. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
  223. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  224. package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
  225. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
  226. package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
  227. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
  228. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
  229. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
  230. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
  231. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
  232. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
  233. package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
  234. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  235. package/dist/v2/features/operation/Operation.vue.js +59 -28
  236. package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
  237. package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
  238. package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
  239. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
  240. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
  241. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
  242. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
  243. package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
  244. package/dist/v2/features/operation/index.d.ts +0 -1
  245. package/dist/v2/features/operation/index.d.ts.map +1 -1
  246. package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
  247. package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
  248. package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
  249. package/dist/v2/features/settings/DocumentSettings.vue.js +2 -2
  250. package/dist/v2/features/settings/DocumentSettings.vue2.js +1 -1
  251. package/dist/v2/helpers/generate-location-id.d.ts +19 -0
  252. package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
  253. package/dist/v2/helpers/generate-location-id.js +10 -0
  254. package/dist/v2/helpers/get-active-environment.d.ts +5 -0
  255. package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
  256. package/dist/v2/helpers/get-active-environment.js +22 -0
  257. package/dist/v2/helpers/get-tab-details.d.ts +2 -2
  258. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
  259. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  260. package/dist/v2/helpers/plugins.d.ts +59 -0
  261. package/dist/v2/helpers/plugins.d.ts.map +1 -0
  262. package/dist/v2/helpers/plugins.js +11 -0
  263. package/dist/v2/helpers/storage.d.ts.map +1 -1
  264. package/dist/v2/helpers/storage.js +5 -5
  265. package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
  266. package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
  267. package/dist/v2/hooks/use-scroll-lock.js +21 -0
  268. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
  269. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
  270. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
  271. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
  272. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  273. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  274. package/package.json +19 -19
  275. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
  276. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
  277. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
  278. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
  279. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
  280. package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
  281. package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
  282. package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
  283. package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
  284. package/dist/v2/hooks/use-sync-path.js +0 -51
  285. package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
  286. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
  287. package/dist/v2/hooks/use-workspace-client-events.js +0 -112
  288. package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
  289. package/dist/v2/plugins.d.ts +0 -44
  290. package/dist/v2/plugins.d.ts.map +0 -1
  291. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
  292. /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
  293. /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
@@ -1,29 +1,30 @@
1
- import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as n, Fragment as Q, createBlock as c, createCommentVNode as f, normalizeClass as G, createElementVNode as w, toDisplayString as J, mergeProps as X, unref as T, withKeys as b, withModifiers as D, createTextVNode as V, renderSlot as $ } from "vue";
2
- import { useCodeMirror as Y, useDropdown as Z, colorPicker as _ } from "@scalar/use-codemirror";
3
- import { nanoid as ee } from "nanoid";
1
+ import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as o, Fragment as Q, createBlock as c, createCommentVNode as f, normalizeClass as G, createElementVNode as w, toDisplayString as J, mergeProps as X, unref as F, withKeys as b, withModifiers as T, createTextVNode as V, renderSlot as $ } from "vue";
2
+ import { isDefined as Y } from "@scalar/helpers/array/is-defined";
3
+ import { useCodeMirror as Z, useDropdown as _, colorPicker as ee } from "@scalar/use-codemirror";
4
+ import { nanoid as te } from "nanoid";
4
5
  import B from "../data-table/DataTableInputSelect.vue.js";
5
- import te from "../../features/environments/components/EnvironmentVariablesDropdown.vue.js";
6
- import { pillPlugin as le, backspaceCommand as ne } from "./code-variable-widget.js";
7
- const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
6
+ import le from "../../features/environments/components/EnvironmentVariablesDropdown.vue.js";
7
+ import { pillPlugin as ne, backspaceCommand as oe } from "./code-variable-widget.js";
8
+ const ae = { class: "whitespace-nowrap" }, re = ["id"], ie = {
8
9
  key: 0,
9
10
  class: "z-context text-c-2 absolute right-1.5 bottom-1 hidden font-sans group-has-[:focus-visible]/input:block",
10
11
  role: "alert"
11
- }, ie = {
12
+ }, ue = {
12
13
  key: 5,
13
14
  class: "centered-y text-orange absolute right-7 text-xs"
14
- }, ue = {
15
+ }, de = {
15
16
  key: 6,
16
17
  class: "centered-y absolute right-0 flex h-full items-center p-1.5 group-has-[.cm-focused]:z-1"
17
- }, de = {
18
+ }, se = {
18
19
  key: 7,
19
20
  class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pt-px pr-2 opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.alert]:shadow-none group-[.error]:bg-transparent group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
20
- }, se = {
21
+ }, fe = {
21
22
  inheritAttrs: !1
22
- }, ge = /* @__PURE__ */ W({
23
- ...se,
23
+ }, ve = /* @__PURE__ */ W({
24
+ ...fe,
24
25
  __name: "CodeInput",
25
26
  props: {
26
- modelValue: {},
27
+ modelValue: { type: [String, Number, Boolean] },
27
28
  environment: {},
28
29
  type: {},
29
30
  disabled: { type: Boolean, default: !1 },
@@ -31,7 +32,7 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
31
32
  layout: { default: "desktop" },
32
33
  enum: {},
33
34
  examples: {},
34
- default: {},
35
+ default: { type: [String, Number, Boolean] },
35
36
  nullable: { type: Boolean, default: !1 },
36
37
  placeholder: {},
37
38
  required: { type: Boolean },
@@ -47,18 +48,19 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
47
48
  emitOnBlur: { type: Boolean, default: !0 },
48
49
  withVariables: { type: Boolean, default: !0 },
49
50
  importCurl: { type: Boolean, default: !1 },
51
+ alwaysEmitChange: { type: Boolean, default: !1 },
50
52
  handleFieldChange: { type: Function },
51
53
  handleFieldSubmit: { type: Function }
52
54
  },
53
55
  emits: ["update:modelValue", "submit", "blur", "curl", "redirectToEnvironment"],
54
- setup(t, { expose: M, emit: R }) {
55
- const u = R, k = j(), q = k.id || `id-${ee()}`, p = d(!1), A = s(() => t.enum?.length ? !1 : t.type === "boolean" || Array.isArray(t.type) && t.type.includes("boolean")), x = s(() => t.nullable ? ["true", "false", "null"] : ["true", "false"]), I = s(() => Array.isArray(t.type) ? t.type.find((e) => e !== "null") ?? "string" : t.type), C = (e) => {
56
- if (e !== t.modelValue) {
56
+ setup(t, { expose: I, emit: M }) {
57
+ const u = M, k = j(), N = k.id || `id-${te()}`, y = d(!1), R = s(() => t.enum?.length ? !1 : t.type === "boolean" || Array.isArray(t.type) && t.type.includes("boolean")), x = s(() => t.nullable ? ["true", "false", "null"] : ["true", "false"]), q = s(() => Array.isArray(t.type) ? t.type.find((e) => e !== "null") ?? "string" : t.type), C = (e) => {
58
+ if (!(!t.alwaysEmitChange && e === t.modelValue)) {
57
59
  if (t.importCurl && e.trim().toLowerCase().startsWith("curl")) {
58
- u("curl", e), o.value && o.value.dispatch({
60
+ u("curl", e), n.value && n.value.dispatch({
59
61
  changes: {
60
62
  from: 0,
61
- to: o.value.state.doc.length,
63
+ to: n.value.state.doc.length,
62
64
  insert: String(t.modelValue)
63
65
  }
64
66
  });
@@ -66,31 +68,31 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
66
68
  }
67
69
  t.handleFieldChange ? t.handleFieldChange(e) : u("update:modelValue", e);
68
70
  }
69
- }, y = (e) => {
71
+ }, h = (e) => {
70
72
  t.handleFieldSubmit ? t.handleFieldSubmit(e) : u("submit", e);
71
73
  }, S = (e) => {
72
- p.value = !1, t.emitOnBlur && t.modelValue && y(e), u("blur", e);
74
+ y.value = !1, t.emitOnBlur && t.modelValue && h(e), u("blur", e);
73
75
  }, g = (e) => {
74
76
  u("update:modelValue", e);
75
- }, N = () => {
77
+ }, A = () => {
76
78
  const e = [...t.extensions];
77
- return t.colorPicker && e.push(_), e;
79
+ return t.colorPicker && e.push(ee), e;
78
80
  }, O = s(
79
- () => le({
81
+ () => ne({
80
82
  environment: t.environment,
81
83
  isReadOnly: t.layout === "modal"
82
84
  })
83
85
  ), z = s(() => [
84
- ...N(),
86
+ ...A(),
85
87
  O.value,
86
- ne
87
- ]), E = d(null), { codeMirror: o } = Y({
88
+ oe
89
+ ]), E = d(null), { codeMirror: n } = Z({
88
90
  content: r(() => String(t.modelValue ?? "")),
89
91
  onChange: (e) => {
90
92
  C(e), L();
91
93
  },
92
94
  onFocus: () => {
93
- p.value = !0;
95
+ y.value = !0;
94
96
  },
95
97
  onBlur: S,
96
98
  codeMirrorRef: E,
@@ -103,59 +105,73 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
103
105
  extensions: z,
104
106
  placeholder: r(() => t.placeholder)
105
107
  });
106
- H(o, () => {
107
- o.value && Object.hasOwn(k, "autofocus") && o.value.focus();
108
+ H(n, () => {
109
+ n.value && Object.hasOwn(k, "autofocus") && n.value.focus();
108
110
  });
109
- const h = d(!1), F = d(""), P = d({ left: 0, top: 0 }), v = d(null), { handleDropdownSelect: K, updateDropdownVisibility: L } = Z({
110
- codeMirror: o,
111
- query: F,
112
- showDropdown: h,
113
- dropdownPosition: P
114
- }), U = s(() => h.value && t.withVariables && t.layout !== "modal" && !!t.environment), m = (e, l) => {
115
- if (h.value) {
111
+ const p = d(!1), P = d(""), D = d({ left: 0, top: 0 }), v = d(null), { handleDropdownSelect: K, updateDropdownVisibility: L } = _({
112
+ codeMirror: n,
113
+ query: P,
114
+ showDropdown: p,
115
+ dropdownPosition: D
116
+ }), U = s(() => p.value && t.withVariables && t.layout !== "modal" && !!t.environment), m = (e, l) => {
117
+ if (p.value) {
116
118
  e === "down" || e === "up" ? (l.preventDefault(), v.value?.handleArrowKey(e)) : e === "enter" && (l.preventDefault(), v.value?.handleSelect());
117
119
  return;
118
120
  }
119
- e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement && y(l.target.textContent ?? "");
121
+ e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement && h(l.target.textContent ?? "");
120
122
  };
121
- return M({
122
- focus: () => o.value?.focus(),
123
- isFocused: p,
123
+ return I({
124
+ /**
125
+ * Focus the codemirror element
126
+ *
127
+ * @param cursorAtEnd boolean place the cursor at the end of the input
128
+ */
129
+ focus: (e) => {
130
+ if (!n.value || (n.value.focus(), !Y(e)))
131
+ return;
132
+ const l = e === "start" ? 0 : e === "end" ? n.value.state.doc.length : e;
133
+ n.value.dispatch({
134
+ selection: { anchor: l },
135
+ scrollIntoView: !0
136
+ });
137
+ },
138
+ isFocused: y,
124
139
  handleChange: C,
125
- handleSubmit: y,
140
+ handleSubmit: h,
126
141
  handleBlur: S,
127
142
  booleanOptions: x,
128
- codeMirror: o,
129
- modelValue: t.modelValue
130
- }), (e, l) => (n(), i(Q, null, [
131
- e.disabled ? (n(), i("div", {
143
+ codeMirror: n,
144
+ modelValue: t.modelValue,
145
+ cursorPosition: () => n.value?.state.selection.main.head
146
+ }), (e, l) => (o(), i(Q, null, [
147
+ e.disabled ? (o(), i("div", {
132
148
  key: 0,
133
149
  class: G(["text-c-2 flex cursor-default items-center justify-center", e.layout === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
134
150
  "data-testid": "code-input-disabled"
135
151
  }, [
136
- w("span", oe, J(e.modelValue), 1)
137
- ], 2)) : t.enum?.length ? (n(), c(B, {
152
+ w("span", ae, J(e.modelValue), 1)
153
+ ], 2)) : t.enum?.length ? (o(), c(B, {
138
154
  key: 1,
139
155
  default: t.default,
140
156
  modelValue: e.modelValue,
141
- type: I.value,
157
+ type: q.value,
142
158
  value: t.enum,
143
159
  "onUpdate:modelValue": g
144
- }, null, 8, ["default", "modelValue", "type", "value"])) : A.value ? (n(), c(B, {
160
+ }, null, 8, ["default", "modelValue", "type", "value"])) : R.value ? (o(), c(B, {
145
161
  key: 2,
146
162
  default: t.default,
147
163
  modelValue: e.modelValue,
148
164
  value: x.value,
149
165
  "onUpdate:modelValue": g
150
- }, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (n(), c(B, {
166
+ }, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (o(), c(B, {
151
167
  key: 3,
152
168
  default: t.default,
153
169
  modelValue: e.modelValue,
154
170
  value: e.examples,
155
171
  "onUpdate:modelValue": g
156
- }, null, 8, ["default", "modelValue", "value"])) : (n(), i("div", X({
172
+ }, null, 8, ["default", "modelValue", "value"])) : (o(), i("div", X({
157
173
  key: 4,
158
- id: T(q)
174
+ id: F(N)
159
175
  }, e.$attrs, {
160
176
  ref_key: "codeMirrorRef",
161
177
  ref: E,
@@ -164,40 +180,40 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
164
180
  "flow-code-input--error": e.error
165
181
  }],
166
182
  onKeydown: [
167
- l[0] || (l[0] = b(D((a) => m("down", a), ["stop"]), ["down"])),
183
+ l[0] || (l[0] = b(T((a) => m("down", a), ["stop"]), ["down"])),
168
184
  l[1] || (l[1] = b((a) => m("enter", a), ["enter"])),
169
185
  l[2] || (l[2] = b((a) => m("escape", a), ["escape"])),
170
- l[3] || (l[3] = b(D((a) => m("up", a), ["stop"]), ["up"]))
186
+ l[3] || (l[3] = b(T((a) => m("up", a), ["stop"]), ["up"]))
171
187
  ]
172
188
  }), [
173
- e.disableTabIndent ? f("", !0) : (n(), i("div", re, [...l[5] || (l[5] = [
189
+ e.disableTabIndent ? f("", !0) : (o(), i("div", ie, [...l[5] || (l[5] = [
174
190
  V(" Press ", -1),
175
191
  w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
176
192
  V(" then ", -1),
177
193
  w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
178
194
  V(" to exit ", -1)
179
195
  ])]))
180
- ], 16, ae)),
181
- e.$slots.warning ? (n(), i("div", ie, [
196
+ ], 16, re)),
197
+ e.$slots.warning ? (o(), i("div", ue, [
182
198
  $(e.$slots, "warning", {}, void 0, !0)
183
199
  ])) : f("", !0),
184
- e.$slots.icon ? (n(), i("div", ue, [
200
+ e.$slots.icon ? (o(), i("div", de, [
185
201
  $(e.$slots, "icon", {}, void 0, !0)
186
202
  ])) : f("", !0),
187
- e.required ? (n(), i("div", de, " Required ")) : f("", !0),
188
- U.value && e.environment ? (n(), c(te, {
203
+ e.required ? (o(), i("div", se, " Required ")) : f("", !0),
204
+ U.value && e.environment ? (o(), c(le, {
189
205
  key: 8,
190
206
  ref_key: "dropdownRef",
191
207
  ref: v,
192
- dropdownPosition: P.value,
208
+ dropdownPosition: D.value,
193
209
  environment: e.environment,
194
- query: F.value,
210
+ query: P.value,
195
211
  onRedirect: l[4] || (l[4] = (a) => u("redirectToEnvironment")),
196
- onSelect: T(K)
212
+ onSelect: F(K)
197
213
  }, null, 8, ["dropdownPosition", "environment", "query", "onSelect"])) : f("", !0)
198
214
  ], 64));
199
215
  }
200
216
  });
201
217
  export {
202
- ge as default
218
+ ve as default
203
219
  };
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
- modelValue: string | number;
2
+ modelValue: string | number | boolean;
3
3
  value?: string[];
4
- default?: string | number | undefined;
4
+ default?: string | number | boolean | undefined;
5
5
  canAddCustomValue?: boolean;
6
6
  type?: string | undefined;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"names":[],"mappings":"AA4LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAC;;;;;;uBAFoB,OAAO;;AA2Z/B,wBAQG"}
1
+ {"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInputSelect.vue"],"names":[],"mappings":"AA4LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IAC/C,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAC;;;;;;uBAFoB,OAAO;;AA2Z/B,wBAQG"}
@@ -1,18 +1,18 @@
1
- import { defineComponent as T, computed as m, ref as V, watch as S, nextTick as E, createElementBlock as f, openBlock as o, createBlock as v, withDirectives as K, unref as a, withCtx as s, createVNode as n, createElementVNode as i, toDisplayString as y, withKeys as M, vModelText as R, createCommentVNode as C, Fragment as _, renderList as U, normalizeClass as $ } from "vue";
2
- import { ScalarComboboxMultiselect as F, ScalarButton as b, ScalarIcon as h, ScalarDropdown as L, ScalarDropdownItem as D, ScalarDropdownDivider as W } from "@scalar/components";
1
+ import { defineComponent as T, computed as m, ref as y, watch as k, nextTick as E, createElementBlock as f, openBlock as o, createBlock as v, withDirectives as K, unref as a, withCtx as n, createVNode as s, createElementVNode as i, toDisplayString as V, withKeys as M, vModelText as R, createCommentVNode as C, Fragment as _, renderList as U, normalizeClass as $ } from "vue";
2
+ import { ScalarComboboxMultiselect as F, ScalarButton as b, ScalarIcon as h, ScalarDropdown as L, ScalarDropdownItem as B, ScalarDropdownDivider as W } from "@scalar/components";
3
3
  const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-full pr-10 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline" }, G = { class: "text-c-1 whitespace-nowrap" }, H = { class: "text-c-1 overflow-hidden text-ellipsis" }, J = { class: "overflow-hidden text-ellipsis" }, P = { class: "flex h-4 w-4 items-center justify-center" }, Z = /* @__PURE__ */ T({
4
4
  __name: "DataTableInputSelect",
5
5
  props: {
6
- modelValue: {},
6
+ modelValue: { type: [String, Number, Boolean] },
7
7
  value: {},
8
- default: {},
8
+ default: { type: [String, Number, Boolean] },
9
9
  canAddCustomValue: { type: Boolean, default: !0 },
10
10
  type: {}
11
11
  },
12
12
  emits: ["update:modelValue"],
13
- setup(z, { emit: B }) {
14
- const u = z, c = B, p = m(() => u.value ?? []), d = V(!1), r = V(""), x = V(null);
15
- S(r, (e) => {
13
+ setup(D, { emit: z }) {
14
+ const u = D, c = z, p = m(() => u.value ?? []), d = y(!1), r = y(""), x = y(null);
15
+ k(r, (e) => {
16
16
  c("update:modelValue", e);
17
17
  });
18
18
  const g = (e) => {
@@ -21,40 +21,40 @@ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-f
21
21
  r.value.trim() && g(r.value);
22
22
  }, A = () => {
23
23
  r.value.trim() || c("update:modelValue", ""), d.value = !1;
24
- }, I = (e) => u.modelValue.toString() === e;
25
- S(d, (e) => {
24
+ }, N = (e) => u.modelValue.toString() === e;
25
+ k(d, (e) => {
26
26
  e && E(() => {
27
27
  x.value?.focus();
28
28
  });
29
29
  });
30
- const k = m(() => u.modelValue !== void 0 ? u.modelValue : u.default), w = m(() => {
30
+ const S = m(() => u.modelValue !== void 0 ? u.modelValue : u.default), w = m(() => {
31
31
  const e = new Set(u.modelValue.toString().split(", "));
32
- return p.value.filter((l) => e.has(l)).map((l) => ({ id: l, label: l, value: l }));
33
- }), N = m(
32
+ return p.value.filter((t) => e.has(t)).map((t) => ({ id: t, label: t, value: t }));
33
+ }), I = m(
34
34
  () => p.value.map((e) => ({ id: e, label: e, value: e }))
35
35
  ), O = (e) => {
36
- const l = e.map((t) => t.value);
37
- c("update:modelValue", l.join(", "));
36
+ const t = e.map((l) => l.value);
37
+ c("update:modelValue", t.join(", "));
38
38
  };
39
- return (e, l) => (o(), f("div", q, [
39
+ return (e, t) => (o(), f("div", q, [
40
40
  e.type === "array" ? (o(), v(a(F), {
41
41
  key: 0,
42
42
  modelValue: w.value,
43
- options: N.value,
43
+ options: I.value,
44
44
  "onUpdate:modelValue": O
45
45
  }, {
46
- default: s(() => [
47
- n(a(b), {
46
+ default: n(() => [
47
+ s(a(b), {
48
48
  class: "custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none",
49
49
  fullWidth: "",
50
50
  variant: "ghost"
51
51
  }, {
52
- default: s(() => [
53
- i("span", G, y(w.value.length > 0 ? w.value.map((t) => t.label).join(", ") : "Select a value"), 1),
54
- n(a(h), {
52
+ default: n(() => [
53
+ i("span", G, V(w.value.length > 0 ? w.value.map((l) => l.label).join(", ") : "Select a value"), 1),
54
+ s(a(h), {
55
+ class: "min-w-4",
55
56
  icon: "ChevronDown",
56
- size: "md",
57
- class: "min-w-4"
57
+ size: "md"
58
58
  })
59
59
  ]),
60
60
  _: 1
@@ -65,7 +65,7 @@ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-f
65
65
  key: 1,
66
66
  ref_key: "inputRef",
67
67
  ref: x,
68
- "onUpdate:modelValue": l[0] || (l[0] = (t) => r.value = t),
68
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => r.value = l),
69
69
  class: "text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none",
70
70
  placeholder: "Value",
71
71
  type: "text",
@@ -76,59 +76,59 @@ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-f
76
76
  ]) : (o(), v(a(L), {
77
77
  key: 2,
78
78
  resize: "",
79
- value: k.value
79
+ value: S.value
80
80
  }, {
81
- items: s(() => [
82
- (o(!0), f(_, null, U(p.value, (t) => (o(), v(a(D), {
83
- key: t,
81
+ items: n(() => [
82
+ (o(!0), f(_, null, U(p.value, (l) => (o(), v(a(B), {
83
+ key: l,
84
84
  class: "group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
85
- value: t,
86
- onClick: (Q) => g(t)
85
+ value: l,
86
+ onClick: (Q) => g(l)
87
87
  }, {
88
- default: s(() => [
88
+ default: n(() => [
89
89
  i("div", {
90
90
  class: $([
91
91
  "flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
92
- I(t) ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
92
+ N(l) ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
93
93
  ])
94
94
  }, [
95
- n(a(h), {
95
+ s(a(h), {
96
96
  class: "size-2.5",
97
97
  icon: "Checkmark",
98
98
  thickness: "3"
99
99
  })
100
100
  ], 2),
101
- i("span", J, y(t), 1)
101
+ i("span", J, V(l), 1)
102
102
  ]),
103
103
  _: 2
104
104
  }, 1032, ["value", "onClick"]))), 128)),
105
105
  e.canAddCustomValue ? (o(), f(_, { key: 0 }, [
106
106
  p.value.length ? (o(), v(a(W), { key: 0 })) : C("", !0),
107
- n(a(D), {
107
+ s(a(B), {
108
108
  class: "flex items-center gap-1.5",
109
- onClick: l[1] || (l[1] = (t) => d.value = !0)
109
+ onClick: t[1] || (t[1] = (l) => d.value = !0)
110
110
  }, {
111
- default: s(() => [
111
+ default: n(() => [
112
112
  i("div", P, [
113
- n(a(h), {
113
+ s(a(h), {
114
114
  icon: "Add",
115
115
  size: "sm"
116
116
  })
117
117
  ]),
118
- l[2] || (l[2] = i("span", null, "Add value", -1))
118
+ t[2] || (t[2] = i("span", null, "Add value", -1))
119
119
  ]),
120
120
  _: 1
121
121
  })
122
122
  ], 64)) : C("", !0)
123
123
  ]),
124
- default: s(() => [
125
- n(a(b), {
124
+ default: n(() => [
125
+ s(a(b), {
126
126
  class: "size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none",
127
127
  variant: "ghost"
128
128
  }, {
129
- default: s(() => [
130
- i("span", H, y(k.value || "Select a value"), 1),
131
- n(a(h), {
129
+ default: n(() => [
130
+ i("span", H, V(S.value ?? "Select a value"), 1),
131
+ s(a(h), {
132
132
  icon: "ChevronDown",
133
133
  size: "md"
134
134
  })
@@ -1,3 +1,2 @@
1
- /** biome-ignore-all lint/performance/noBarrelFile: Component entry point */
2
1
  export { default as Resize } from './Resize.vue.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/resize/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/resize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA"}
@@ -2,7 +2,7 @@ import { type DraggingItem, type HoveredItem, type SidebarState } from '@scalar/
2
2
  import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
3
3
  import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
4
4
  import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
5
- import type { Workspace } from '../../../v2/hooks/use-workspace-selector.js';
5
+ import type { Workspace } from '../../../v2/features/app/hooks/use-workspace-selector.js';
6
6
  import type { ClientLayout } from '../../../v2/types/layout';
7
7
  type __VLS_Props = {
8
8
  /** All documents to display sidebar items for */
@@ -27,17 +27,22 @@ type __VLS_Props = {
27
27
  type __VLS_Slots = {
28
28
  /** Slot to add the workspace button */
29
29
  workspaceButton?(): unknown;
30
+ /** Slot to add additional content to the decorator */
31
+ decorator?(props: {
32
+ item: TraversedEntry;
33
+ }): unknown;
30
34
  /** Slot to add additional content to the footer */
31
35
  footer?(): unknown;
36
+ /** Slot to add additional content to the empty folder */
37
+ empty?(props: {
38
+ item: TraversedEntry;
39
+ }): unknown;
32
40
  };
33
41
  type __VLS_PublicProps = __VLS_Props & {
34
- /** Controls the visibility of the sidebar */
35
- 'isSidebarOpen': boolean;
36
42
  /** Controls the width of the sidebar */
37
43
  'sidebarWidth': number;
38
44
  };
39
45
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
40
- "update:isSidebarOpen": (value: boolean) => any;
41
46
  "update:sidebarWidth": (value: number) => any;
42
47
  } & {
43
48
  "create:workspace": () => any;
@@ -49,7 +54,6 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
49
54
  "onSelect:workspace"?: ((id?: string | undefined) => any) | undefined;
50
55
  onSelectItem?: ((id: string) => any) | undefined;
51
56
  onReorder?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
52
- "onUpdate:isSidebarOpen"?: ((value: boolean) => any) | undefined;
53
57
  "onUpdate:sidebarWidth"?: ((value: number) => any) | undefined;
54
58
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
55
59
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AA6IA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAKhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD,KAAK,WAAW,GAAG;IACjB,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAA;IACpB,qCAAqC;IACrC,eAAe,EAAE,SAAS,CAAA;IAC1B,2CAA2C;IAC3C,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,kEAAkE;IAClE,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EACR,OAAO,GACP,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAA;CACxE,CAAC;AAeF,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,eAAe,CAAC,IAAI,OAAO,CAAA;IAC3B,mDAAmD;IACnD,MAAM,CAAC,IAAI,OAAO,CAAA;CACnB,CAAC;AAsBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AA4MF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AAyJA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAIhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAA;IACpB,qCAAqC;IACrC,eAAe,EAAE,SAAS,CAAA;IAC1B,2CAA2C;IAC3C,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,kEAAkE;IAClE,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EACR,OAAO,GACP,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAA;CACxE,CAAC;AAeF,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,eAAe,CAAC,IAAI,OAAO,CAAA;IAC3B,sDAAsD;IACtD,SAAS,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;IACpD,mDAAmD;IACnD,MAAM,CAAC,IAAI,OAAO,CAAA;IAClB,yDAAyD;IACzD,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAA;CACjD,CAAC;AAiBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AAqNF,QAAA,MAAM,eAAe;;;;;;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}