@scalar/api-client 2.8.1 → 2.9.1

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 (444) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue2.js +9 -10
  3. package/dist/components/CodeInput/CodeInput.vue2.js +5 -5
  4. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/CommandActionForm.vue.js +10 -10
  6. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +3 -3
  7. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +3 -3
  8. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +18 -20
  9. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +2 -2
  10. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +1 -1
  11. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +13 -14
  12. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +3 -3
  13. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +3 -3
  14. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +22 -24
  15. package/dist/components/CommandPalette/WatchModeToggle.vue.js +1 -1
  16. package/dist/components/DataTable/DataTableInput.vue2.js +1 -1
  17. package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -9
  18. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -10
  19. package/dist/components/IconSelector.vue.js +1 -1
  20. package/dist/components/ImportCollection/DropEventListener.vue.js +12 -12
  21. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +8 -8
  22. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +1 -1
  23. package/dist/components/ImportCollection/ImportNowButton.vue.js +14 -16
  24. package/dist/components/ImportCollection/PasteEventListener.vue.js +1 -1
  25. package/dist/components/ImportCollection/PrefetchError.vue.js +2 -2
  26. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +5 -7
  27. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -1
  28. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  29. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +3 -3
  30. package/dist/components/OpenApiClientButton.vue2.js +1 -1
  31. package/dist/components/Server/ServerSelector.vue.js +1 -2
  32. package/dist/components/SideNav/SideHelp.vue.js +13 -19
  33. package/dist/components/SideNav/SideNav.vue.js +4 -5
  34. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +4 -5
  35. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  36. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  37. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  38. package/dist/components/TopNav/TopNav.vue.js +8 -10
  39. package/dist/components/TopNav/TopNavItem.vue2.js +8 -12
  40. package/dist/hooks/index.d.ts +0 -1
  41. package/dist/hooks/index.d.ts.map +1 -1
  42. package/dist/hooks/index.js +9 -11
  43. package/dist/hooks/useClientConfig.d.ts +3 -0
  44. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  45. package/dist/index.d.ts +1 -2
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +8 -15
  48. package/dist/layouts/App/create-api-client-app.d.ts +3646 -3645
  49. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  50. package/dist/layouts/App/create-api-client-app.js +24 -18
  51. package/dist/layouts/Modal/create-api-client-modal.d.ts +5 -8089
  52. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  53. package/dist/layouts/Modal/create-api-client-modal.js +28 -46
  54. package/dist/layouts/Modal/index.d.ts +2 -2
  55. package/dist/layouts/Modal/index.d.ts.map +1 -1
  56. package/dist/layouts/Modal/index.js +2 -5
  57. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  58. package/dist/layouts/Web/create-api-client-web.js +15 -12
  59. package/dist/libs/create-client.d.ts +2 -2
  60. package/dist/libs/create-client.d.ts.map +1 -1
  61. package/dist/libs/postman.d.ts +1 -1
  62. package/dist/libs/postman.d.ts.map +1 -1
  63. package/dist/libs/postman.js +12 -12
  64. package/dist/libs/validate-parameters.d.ts +10 -2
  65. package/dist/libs/validate-parameters.d.ts.map +1 -1
  66. package/dist/libs/validate-parameters.js +13 -6
  67. package/dist/routes.d.ts +3 -184
  68. package/dist/routes.d.ts.map +1 -1
  69. package/dist/routes.js +6 -6
  70. package/dist/store/active-entities.d.ts +1 -1
  71. package/dist/store/active-entities.d.ts.map +1 -1
  72. package/dist/store/active-entities.js +2 -2
  73. package/dist/store/router-params.d.ts.map +1 -1
  74. package/dist/style.css +1 -1
  75. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +5 -5
  76. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  77. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  78. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +3 -3
  79. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +3 -4
  80. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +1 -0
  81. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
  82. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +2 -2
  83. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +7 -8
  84. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +44 -55
  85. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +16 -18
  86. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +41 -46
  87. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  88. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +3 -0
  89. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
  90. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
  91. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +201 -187
  92. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
  93. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +8 -10
  94. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +2 -3
  95. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +2 -4
  96. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +14 -16
  97. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +3 -0
  98. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -1
  99. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +3 -3
  100. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +87 -85
  101. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +10 -11
  102. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +4 -5
  103. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +1 -1
  104. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +3 -3
  105. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +1 -1
  106. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +5 -5
  107. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +9 -10
  108. package/dist/v2/components/TempReplaceMe.vue.d.ts +3 -0
  109. package/dist/v2/components/TempReplaceMe.vue.d.ts.map +1 -0
  110. package/dist/v2/components/TempReplaceMe.vue.js +12 -0
  111. package/dist/v2/components/code-input/CodeInput.test.d.ts +2 -0
  112. package/dist/v2/components/code-input/CodeInput.test.d.ts.map +1 -0
  113. package/dist/v2/components/code-input/CodeInput.vue.d.ts +140 -0
  114. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -0
  115. package/dist/v2/components/code-input/CodeInput.vue.js +8 -0
  116. package/dist/v2/components/code-input/CodeInput.vue2.js +202 -0
  117. package/dist/v2/components/code-input/code-variable-widget.d.ts +21 -0
  118. package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -0
  119. package/dist/v2/components/code-input/code-variable-widget.js +106 -0
  120. package/dist/v2/components/code-input/code-variable-widget.test.d.ts +2 -0
  121. package/dist/v2/components/code-input/code-variable-widget.test.d.ts.map +1 -0
  122. package/dist/v2/components/code-input/index.d.ts +2 -0
  123. package/dist/v2/components/code-input/index.d.ts.map +1 -0
  124. package/dist/v2/components/code-input/index.js +4 -0
  125. package/dist/v2/components/data-table/DataTable.vue.d.ts +22 -0
  126. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -0
  127. package/dist/v2/components/data-table/DataTable.vue.js +38 -0
  128. package/dist/v2/components/data-table/DataTable.vue2.js +4 -0
  129. package/dist/v2/components/data-table/DataTableCell.vue.d.ts +19 -0
  130. package/dist/v2/components/data-table/DataTableCell.vue.d.ts.map +1 -0
  131. package/dist/v2/components/data-table/DataTableCell.vue.js +26 -0
  132. package/dist/v2/components/data-table/DataTableCell.vue2.js +4 -0
  133. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +14 -0
  134. package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -0
  135. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +53 -0
  136. package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +4 -0
  137. package/dist/v2/components/data-table/DataTableHeader.vue.d.ts +13 -0
  138. package/dist/v2/components/data-table/DataTableHeader.vue.d.ts.map +1 -0
  139. package/dist/v2/components/data-table/DataTableHeader.vue.js +18 -0
  140. package/dist/v2/components/data-table/DataTableHeader.vue2.js +4 -0
  141. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +53 -0
  142. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -0
  143. package/dist/v2/components/data-table/DataTableInput.vue.js +7 -0
  144. package/dist/v2/components/data-table/DataTableInput.vue2.js +117 -0
  145. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +16 -0
  146. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -0
  147. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +146 -0
  148. package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +4 -0
  149. package/dist/v2/components/data-table/DataTableRow.vue.d.ts +13 -0
  150. package/dist/v2/components/data-table/DataTableRow.vue.d.ts.map +1 -0
  151. package/dist/v2/components/data-table/DataTableRow.vue.js +12 -0
  152. package/dist/v2/components/data-table/DataTableText.vue.d.ts +16 -0
  153. package/dist/v2/components/data-table/DataTableText.vue.d.ts.map +1 -0
  154. package/dist/v2/components/data-table/DataTableText.vue.js +23 -0
  155. package/dist/v2/components/data-table/DataTableText.vue2.js +4 -0
  156. package/dist/v2/components/data-table/index.d.ts +9 -0
  157. package/dist/v2/components/data-table/index.d.ts.map +1 -0
  158. package/dist/v2/components/data-table/index.js +18 -0
  159. package/dist/v2/components/resize/Resize.vue.d.ts +20 -0
  160. package/dist/v2/components/resize/Resize.vue.d.ts.map +1 -0
  161. package/dist/v2/components/resize/Resize.vue.js +8 -0
  162. package/dist/v2/components/resize/Resize.vue2.js +36 -0
  163. package/dist/v2/components/resize/index.d.ts +3 -0
  164. package/dist/v2/components/resize/index.d.ts.map +1 -0
  165. package/dist/v2/components/resize/index.js +4 -0
  166. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +39 -0
  167. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -0
  168. package/dist/v2/components/sidebar/Sidebar.vue.js +95 -0
  169. package/dist/v2/components/sidebar/Sidebar.vue2.js +4 -0
  170. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +13 -0
  171. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -0
  172. package/dist/v2/components/sidebar/SidebarMenu.vue.js +63 -0
  173. package/dist/v2/components/sidebar/SidebarMenu.vue2.js +4 -0
  174. package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts +10 -0
  175. package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -0
  176. package/dist/v2/components/sidebar/SidebarToggle.vue.js +52 -0
  177. package/dist/v2/components/sidebar/SidebarToggle.vue2.js +4 -0
  178. package/dist/v2/components/sidebar/index.d.ts +4 -0
  179. package/dist/v2/components/sidebar/index.d.ts.map +1 -0
  180. package/dist/v2/components/sidebar/index.js +8 -0
  181. package/dist/v2/features/app/App.test.d.ts +2 -0
  182. package/dist/v2/features/app/App.test.d.ts.map +1 -0
  183. package/dist/v2/features/app/App.vue.d.ts +16 -0
  184. package/dist/v2/features/app/App.vue.d.ts.map +1 -0
  185. package/dist/v2/features/app/App.vue.js +87 -0
  186. package/dist/v2/features/app/App.vue3.js +5 -0
  187. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +30 -0
  188. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -0
  189. package/dist/v2/features/app/components/AppSidebar.vue.js +7 -0
  190. package/dist/v2/features/app/components/AppSidebar.vue2.js +117 -0
  191. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +6 -0
  192. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -0
  193. package/dist/v2/features/app/components/DesktopTabs.vue.js +15 -0
  194. package/dist/v2/features/app/components/DesktopTabs.vue2.js +6 -0
  195. package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts +3 -0
  196. package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -0
  197. package/dist/v2/features/app/components/DownloadAppButton.vue.js +7 -0
  198. package/dist/v2/features/app/components/DownloadAppButton.vue2.js +19 -0
  199. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +16 -0
  200. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -0
  201. package/dist/v2/features/app/components/WebTopNav.vue.js +28 -0
  202. package/dist/v2/features/app/components/WebTopNav.vue2.js +4 -0
  203. package/dist/v2/features/app/components/index.d.ts +2 -0
  204. package/dist/v2/features/app/components/index.d.ts.map +1 -0
  205. package/dist/v2/features/app/components/index.js +5 -0
  206. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +25 -0
  207. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -0
  208. package/dist/v2/features/app/helpers/create-api-client-app.js +21 -0
  209. package/dist/v2/features/app/helpers/routes.d.ts +106 -0
  210. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -0
  211. package/dist/v2/features/app/helpers/routes.js +109 -0
  212. package/dist/v2/features/app/index.d.ts +2 -0
  213. package/dist/v2/features/app/index.d.ts.map +1 -0
  214. package/dist/v2/features/app/index.js +4 -0
  215. package/dist/v2/features/collection/DocumentCollection.test.d.ts +2 -0
  216. package/dist/v2/features/collection/DocumentCollection.test.d.ts.map +1 -0
  217. package/dist/v2/features/collection/DocumentCollection.vue.d.ts +12 -0
  218. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -0
  219. package/dist/v2/features/collection/DocumentCollection.vue.js +4 -0
  220. package/dist/v2/features/collection/DocumentCollection.vue2.js +95 -0
  221. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +10 -0
  222. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -0
  223. package/dist/v2/features/collection/WorkspaceCollection.vue.js +4 -0
  224. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +40 -0
  225. package/dist/v2/features/collection/components/Authentication.test.d.ts +2 -0
  226. package/dist/v2/features/collection/components/Authentication.test.d.ts.map +1 -0
  227. package/dist/v2/features/collection/components/Authentication.vue.d.ts +48 -0
  228. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -0
  229. package/dist/v2/features/collection/components/Authentication.vue.js +7 -0
  230. package/dist/v2/features/collection/components/Authentication.vue2.js +50 -0
  231. package/dist/v2/features/collection/components/Cookies.vue.d.ts +3 -0
  232. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -0
  233. package/dist/v2/features/collection/components/Cookies.vue.js +9 -0
  234. package/dist/v2/features/collection/components/Environment.test.d.ts +2 -0
  235. package/dist/v2/features/collection/components/Environment.test.d.ts.map +1 -0
  236. package/dist/v2/features/collection/components/Environment.vue.d.ts +15 -0
  237. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -0
  238. package/dist/v2/features/collection/components/Environment.vue.js +4 -0
  239. package/dist/v2/features/collection/components/Environment.vue2.js +29 -0
  240. package/dist/v2/features/collection/components/Form.vue.d.ts +29 -0
  241. package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -0
  242. package/dist/v2/features/collection/components/Form.vue.js +83 -0
  243. package/dist/v2/features/collection/components/Form.vue2.js +4 -0
  244. package/dist/v2/features/collection/components/LabelInput.test.d.ts +2 -0
  245. package/dist/v2/features/collection/components/LabelInput.test.d.ts.map +1 -0
  246. package/dist/v2/features/collection/components/LabelInput.vue.d.ts +10 -0
  247. package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -0
  248. package/dist/v2/features/collection/components/LabelInput.vue.js +7 -0
  249. package/dist/v2/features/collection/components/LabelInput.vue2.js +29 -0
  250. package/dist/v2/features/collection/components/Overview.test.d.ts +2 -0
  251. package/dist/v2/features/collection/components/Overview.test.d.ts.map +1 -0
  252. package/dist/v2/features/collection/components/Overview.vue.d.ts +15 -0
  253. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -0
  254. package/dist/v2/features/collection/components/Overview.vue.js +7 -0
  255. package/dist/v2/features/collection/components/Overview.vue2.js +89 -0
  256. package/dist/v2/features/collection/components/Servers.test.d.ts +2 -0
  257. package/dist/v2/features/collection/components/Servers.test.d.ts.map +1 -0
  258. package/dist/v2/features/collection/components/Servers.vue.d.ts +33 -0
  259. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -0
  260. package/dist/v2/features/collection/components/Servers.vue.js +4 -0
  261. package/dist/v2/features/collection/components/Servers.vue2.js +120 -0
  262. package/dist/v2/features/collection/components/Settings.test.d.ts +2 -0
  263. package/dist/v2/features/collection/components/Settings.test.d.ts.map +1 -0
  264. package/dist/v2/features/collection/components/Settings.vue.d.ts +17 -0
  265. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -0
  266. package/dist/v2/features/collection/components/Settings.vue.js +7 -0
  267. package/dist/v2/features/collection/components/Settings.vue2.js +100 -0
  268. package/dist/v2/features/collection/components/Tabs.test.d.ts +2 -0
  269. package/dist/v2/features/collection/components/Tabs.test.d.ts.map +1 -0
  270. package/dist/v2/features/collection/components/Tabs.vue.d.ts +6 -0
  271. package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +1 -0
  272. package/dist/v2/features/collection/components/Tabs.vue.js +46 -0
  273. package/dist/v2/features/collection/components/Tabs.vue2.js +4 -0
  274. package/dist/v2/features/environments/EnvironmentsList.test.d.ts +2 -0
  275. package/dist/v2/features/environments/EnvironmentsList.test.d.ts.map +1 -0
  276. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +9 -0
  277. package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -0
  278. package/dist/v2/features/environments/EnvironmentsList.vue.js +66 -0
  279. package/dist/v2/features/environments/EnvironmentsList.vue2.js +4 -0
  280. package/dist/v2/features/environments/components/Environment.test.d.ts +2 -0
  281. package/dist/v2/features/environments/components/Environment.test.d.ts.map +1 -0
  282. package/dist/v2/features/environments/components/Environment.vue.d.ts +16 -0
  283. package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -0
  284. package/dist/v2/features/environments/components/Environment.vue.js +53 -0
  285. package/dist/v2/features/environments/components/Environment.vue2.js +4 -0
  286. package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts +2 -0
  287. package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts.map +1 -0
  288. package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts +10 -0
  289. package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -0
  290. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +121 -0
  291. package/dist/v2/features/environments/components/EnvironmentColors.vue2.js +4 -0
  292. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts +12 -0
  293. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -0
  294. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +85 -0
  295. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue2.js +4 -0
  296. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +14 -0
  297. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -0
  298. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +53 -0
  299. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue2.js +4 -0
  300. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +21 -0
  301. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -0
  302. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +109 -0
  303. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +4 -0
  304. package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts +2 -0
  305. package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts.map +1 -0
  306. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts +10 -0
  307. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -0
  308. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +7 -0
  309. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +136 -0
  310. package/dist/v2/features/environments/index.d.ts +2 -0
  311. package/dist/v2/features/environments/index.d.ts.map +1 -0
  312. package/dist/v2/features/environments/index.js +4 -0
  313. package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts +2 -0
  314. package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts.map +1 -0
  315. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts +25 -0
  316. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -0
  317. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +7 -0
  318. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +156 -0
  319. package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts +2 -0
  320. package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts.map +1 -0
  321. package/dist/v2/features/global-cookies/components/GlobalCookies.vue.d.ts +32 -0
  322. package/dist/v2/features/global-cookies/components/GlobalCookies.vue.d.ts.map +1 -0
  323. package/dist/v2/features/global-cookies/components/GlobalCookies.vue.js +7 -0
  324. package/dist/v2/features/global-cookies/components/GlobalCookies.vue2.js +58 -0
  325. package/dist/v2/features/global-cookies/index.d.ts +2 -0
  326. package/dist/v2/features/global-cookies/index.d.ts.map +1 -0
  327. package/dist/v2/features/global-cookies/index.js +4 -0
  328. package/dist/v2/features/modal/Modal.vue.d.ts +16 -0
  329. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -0
  330. package/dist/v2/features/modal/Modal.vue.js +7 -0
  331. package/dist/v2/features/modal/Modal.vue2.js +81 -0
  332. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +53 -0
  333. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -0
  334. package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -0
  335. package/dist/v2/features/modal/index.d.ts +2 -0
  336. package/dist/v2/features/modal/index.d.ts.map +1 -0
  337. package/dist/v2/features/modal/index.js +4 -0
  338. package/dist/v2/features/operation/Operation.test.d.ts +2 -0
  339. package/dist/v2/features/operation/Operation.test.d.ts.map +1 -0
  340. package/dist/v2/features/operation/Operation.vue.d.ts +79 -0
  341. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -0
  342. package/dist/v2/features/operation/Operation.vue.js +124 -0
  343. package/dist/v2/features/operation/Operation.vue2.js +4 -0
  344. package/dist/v2/features/operation/components/Header.test.d.ts +2 -0
  345. package/dist/v2/features/operation/components/Header.test.d.ts.map +1 -0
  346. package/dist/v2/features/operation/components/Header.vue.d.ts +85 -0
  347. package/dist/v2/features/operation/components/Header.vue.d.ts.map +1 -0
  348. package/dist/v2/features/operation/components/Header.vue.js +7 -0
  349. package/dist/v2/features/operation/components/Header.vue2.js +97 -0
  350. package/dist/v2/features/operation/index.d.ts +3 -0
  351. package/dist/v2/features/operation/index.d.ts.map +1 -0
  352. package/dist/v2/features/operation/index.js +4 -0
  353. package/dist/v2/features/settings/Settings.test.d.ts +2 -0
  354. package/dist/v2/features/settings/Settings.test.d.ts.map +1 -0
  355. package/dist/v2/features/settings/Settings.vue.d.ts +22 -0
  356. package/dist/v2/features/settings/Settings.vue.d.ts.map +1 -0
  357. package/dist/v2/features/settings/Settings.vue.js +268 -0
  358. package/dist/v2/features/settings/Settings.vue2.js +4 -0
  359. package/dist/v2/features/settings/components/Appearance.vue.d.ts +10 -0
  360. package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +1 -0
  361. package/dist/v2/features/settings/components/Appearance.vue.js +88 -0
  362. package/dist/v2/features/settings/components/Appearance.vue2.js +4 -0
  363. package/dist/v2/features/settings/components/Section.vue.d.ts +14 -0
  364. package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -0
  365. package/dist/v2/features/settings/components/Section.vue.js +24 -0
  366. package/dist/v2/features/settings/components/Section.vue2.js +4 -0
  367. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +9 -0
  368. package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -0
  369. package/dist/v2/features/settings/helpers/get-theme-colors.js +17 -0
  370. package/dist/v2/features/settings/index.d.ts +2 -0
  371. package/dist/v2/features/settings/index.d.ts.map +1 -0
  372. package/dist/v2/features/settings/index.js +4 -0
  373. package/dist/v2/helpers/test-utils.d.ts +4 -0
  374. package/dist/v2/helpers/test-utils.d.ts.map +1 -0
  375. package/dist/v2/hooks/use-document-watcher.d.ts +28 -0
  376. package/dist/v2/hooks/use-document-watcher.d.ts.map +1 -0
  377. package/dist/v2/hooks/use-document-watcher.test.d.ts +2 -0
  378. package/dist/v2/hooks/use-document-watcher.test.d.ts.map +1 -0
  379. package/dist/v2/hooks/use-workspace-client-events.d.ts +9 -0
  380. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -0
  381. package/dist/v2/hooks/use-workspace-client-events.js +27 -0
  382. package/dist/v2/plugins.d.ts +44 -0
  383. package/dist/v2/plugins.d.ts.map +1 -0
  384. package/dist/v2/types/layout.d.ts +10 -0
  385. package/dist/v2/types/layout.d.ts.map +1 -0
  386. package/dist/views/Collection/Collection.vue2.js +6 -6
  387. package/dist/views/Collection/CollectionCookies.vue2.js +3 -3
  388. package/dist/views/Collection/CollectionEnvironment.vue2.js +12 -13
  389. package/dist/views/Collection/CollectionScripts.vue2.js +3 -3
  390. package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
  391. package/dist/views/Collection/CollectionServerForm.vue.js +42 -62
  392. package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
  393. package/dist/views/Collection/CollectionServers.vue2.js +43 -50
  394. package/dist/views/Collection/CollectionSettings.vue.js +2 -2
  395. package/dist/views/Collection/CollectionSettings.vue2.js +5 -6
  396. package/dist/views/Collection/CollectionSync.vue2.js +3 -3
  397. package/dist/views/Collection/components/EnvironmentForm.vue2.js +10 -12
  398. package/dist/views/Collection/components/MarkdownInput.vue2.js +2 -4
  399. package/dist/views/Cookies/CookieModal.vue2.js +6 -6
  400. package/dist/views/Cookies/Cookies.vue2.js +6 -6
  401. package/dist/views/Environment/Environment.vue2.js +5 -6
  402. package/dist/views/Environment/EnvironmentModal.vue.js +13 -14
  403. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +8 -9
  404. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  405. package/dist/views/Request/RequestRoot.vue.js +2 -2
  406. package/dist/views/Request/RequestRoot.vue2.js +79 -80
  407. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +10 -11
  408. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -55
  409. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +10 -12
  410. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +2 -2
  411. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +39 -44
  412. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  413. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  414. package/dist/views/Request/RequestSection/RequestBody.vue2.js +96 -78
  415. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +3 -3
  416. package/dist/views/Request/RequestSection/RequestParams.vue.js +2 -3
  417. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  418. package/dist/views/Request/RequestSection/RequestSection.vue2.js +55 -55
  419. package/dist/views/Request/RequestSection/RequestTable.vue2.js +15 -17
  420. package/dist/views/Request/RequestSidebar.vue2.js +7 -8
  421. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  422. package/dist/views/Request/RequestSidebarItem.vue2.js +31 -32
  423. package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
  424. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +13 -16
  425. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +11 -13
  426. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +4 -5
  427. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +4 -5
  428. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +1 -1
  429. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +3 -3
  430. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +4 -4
  431. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +11 -13
  432. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +7 -8
  433. package/dist/views/Request/components/WorkspaceDropdown.vue.js +11 -14
  434. package/dist/views/Request/libs/oauth2.d.ts +1 -1
  435. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  436. package/dist/views/Settings/SettingsGeneral.vue.js +40 -42
  437. package/dist/views/Settings/components/SettingsAppearance.vue.js +8 -11
  438. package/package.json +31 -26
  439. package/dist/hooks/useKeyMap.d.ts +0 -2
  440. package/dist/hooks/useKeyMap.d.ts.map +0 -1
  441. package/dist/hooks/useKeyMap.js +0 -9
  442. package/dist/router.d.ts +0 -8
  443. package/dist/router.d.ts.map +0 -1
  444. package/dist/router.js +0 -20
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAIzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAwSJ,QAAA,IAAI,OAAO,IAAU,EAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAmC7C,QAAA,MAAM,eAAe;;;;;;;;;;;cA3VN,OAAO;cAIP,OAAO;kBAOH,OAAO;2BARE,OAAO;6EAgWjC,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import t from "./DataTableInput.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f4b9c7c5"]]);
5
+ export {
6
+ c as default
7
+ };
@@ -0,0 +1,117 @@
1
+ import { defineComponent as g, ref as d, computed as B, createBlock as s, openBlock as a, normalizeClass as C, withCtx as $, createElementBlock as i, createCommentVNode as u, createElementVNode as I, renderSlot as p, createTextVNode as O, Fragment as h, mergeProps as v, unref as m } from "vue";
2
+ import { ScalarIconButton as E } from "@scalar/components";
3
+ import { ScalarIconEye as S, ScalarIconEyeSlash as A } from "@scalar/icons";
4
+ import W from "../../../components/CodeInput/CodeInput.vue.js";
5
+ import q from "./DataTableCell.vue.js";
6
+ import F from "./DataTableInputSelect.vue.js";
7
+ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly", "type", "value"], D = {
8
+ key: 1,
9
+ class: "centered-y text-orange absolute right-7 text-xs"
10
+ }, J = /* @__PURE__ */ g({
11
+ inheritAttrs: !1,
12
+ __name: "DataTableInput",
13
+ props: {
14
+ id: {},
15
+ type: {},
16
+ containerClass: {},
17
+ required: { type: Boolean, default: !1 },
18
+ modelValue: {},
19
+ canAddCustomEnumValue: { type: Boolean, default: !0 },
20
+ readOnly: { type: Boolean, default: !1 },
21
+ enum: {},
22
+ min: {},
23
+ max: {},
24
+ environment: {},
25
+ envVariables: {},
26
+ description: {},
27
+ lineWrapping: { type: Boolean, default: !1 }
28
+ },
29
+ emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
30
+ setup(c, { emit: V }) {
31
+ const n = c, t = V, r = d(!0), w = d(!1), f = d(null), k = () => {
32
+ w.value || t("inputBlur");
33
+ }, y = B(
34
+ () => n.type === "password" ? "text" : n.type ?? "text"
35
+ ), b = () => {
36
+ !n.enum?.length && !n.readOnly && f.value?.focus();
37
+ };
38
+ return (e, l) => (a(), s(q, {
39
+ class: C(["relative flex", e.containerClass])
40
+ }, {
41
+ default: $(() => [
42
+ e.$slots.default ? (a(), i("div", {
43
+ key: 0,
44
+ class: "text-c-1 flex items-center pr-0 pl-3",
45
+ for: e.id ?? "",
46
+ onClick: b
47
+ }, [
48
+ p(e.$slots, "default", {}, void 0, !0),
49
+ l[5] || (l[5] = O(": ", -1))
50
+ ], 8, T)) : u("", !0),
51
+ I("div", N, [
52
+ n.enum && n.enum.length ? (a(), s(F, {
53
+ key: 0,
54
+ canAddCustomValue: n.canAddCustomEnumValue,
55
+ modelValue: n.modelValue,
56
+ value: n.enum,
57
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => t("update:modelValue", o))
58
+ }, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (a(), i(h, { key: 1 }, [
59
+ r.value && e.type === "password" ? (a(), i("input", v({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
60
+ autocomplete: "off",
61
+ class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1", { "scalar-password-input": e.type === "password" }],
62
+ "data-1p-ignore": "",
63
+ readOnly: e.readOnly,
64
+ spellcheck: "false",
65
+ type: y.value,
66
+ value: e.modelValue,
67
+ onInput: l[1] || (l[1] = (o) => t(
68
+ "update:modelValue",
69
+ o.target.value ?? ""
70
+ ))
71
+ }), null, 16, P)) : (a(), s(W, v({ key: 1 }, e.$attrs, {
72
+ id: e.id,
73
+ ref_key: "codeInput",
74
+ ref: f,
75
+ class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1", [
76
+ e.type === "password" && e.description && "pr-12",
77
+ e.description && "pr-8",
78
+ e.type === "password" && "scalar-password-input"
79
+ ]],
80
+ description: e.description,
81
+ disableCloseBrackets: "",
82
+ disableTabIndent: "",
83
+ envVariables: e.envVariables,
84
+ environment: e.environment,
85
+ lineWrapping: !!e.lineWrapping,
86
+ max: e.max,
87
+ min: e.min,
88
+ modelValue: e.modelValue ?? "",
89
+ readOnly: e.readOnly,
90
+ required: !!e.required,
91
+ spellcheck: "false",
92
+ type: y.value,
93
+ onBlur: k,
94
+ onFocus: l[2] || (l[2] = (o) => t("inputFocus")),
95
+ "onUpdate:modelValue": l[3] || (l[3] = (o) => t("update:modelValue", o))
96
+ }), null, 16, ["id", "class", "description", "envVariables", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type"]))
97
+ ], 64))
98
+ ]),
99
+ e.$slots.warning ? (a(), i("div", D, [
100
+ p(e.$slots, "warning", {}, void 0, !0)
101
+ ])) : u("", !0),
102
+ p(e.$slots, "icon", {}, void 0, !0),
103
+ e.type === "password" ? (a(), s(m(E), {
104
+ key: 2,
105
+ class: "-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25",
106
+ icon: r.value ? m(S) : m(A),
107
+ label: r.value ? "Show Password" : "Hide Password",
108
+ onClick: l[4] || (l[4] = (o) => r.value = !r.value)
109
+ }, null, 8, ["icon", "label"])) : u("", !0)
110
+ ]),
111
+ _: 3
112
+ }, 8, ["class"]));
113
+ }
114
+ });
115
+ export {
116
+ J as default
117
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ modelValue: string | number;
3
+ value?: string[];
4
+ default?: string | number | undefined;
5
+ canAddCustomValue?: boolean;
6
+ type?: string | undefined;
7
+ };
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (v: string) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
12
+ }>, {
13
+ canAddCustomValue: boolean;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
16
+ //# sourceMappingURL=DataTableInputSelect.vue.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,146 @@
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";
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
+ __name: "DataTableInputSelect",
5
+ props: {
6
+ modelValue: {},
7
+ value: {},
8
+ default: {},
9
+ canAddCustomValue: { type: Boolean, default: !0 },
10
+ type: {}
11
+ },
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) => {
16
+ c("update:modelValue", e);
17
+ });
18
+ const g = (e) => {
19
+ c("update:modelValue", e), d.value = !1;
20
+ }, j = () => {
21
+ r.value.trim() && g(r.value);
22
+ }, A = () => {
23
+ r.value.trim() || c("update:modelValue", ""), d.value = !1;
24
+ }, I = (e) => u.modelValue.toString() === e;
25
+ S(d, (e) => {
26
+ e && E(() => {
27
+ x.value?.focus();
28
+ });
29
+ });
30
+ const k = m(() => u.modelValue !== void 0 ? u.modelValue : u.default), w = m(() => {
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(
34
+ () => p.value.map((e) => ({ id: e, label: e, value: e }))
35
+ ), O = (e) => {
36
+ const l = e.map((t) => t.value);
37
+ c("update:modelValue", l.join(", "));
38
+ };
39
+ return (e, l) => (o(), f("div", q, [
40
+ e.type === "array" ? (o(), v(a(F), {
41
+ key: 0,
42
+ modelValue: w.value,
43
+ options: N.value,
44
+ "onUpdate:modelValue": O
45
+ }, {
46
+ default: s(() => [
47
+ n(a(b), {
48
+ class: "custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none",
49
+ fullWidth: "",
50
+ variant: "ghost"
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), {
55
+ icon: "ChevronDown",
56
+ size: "md",
57
+ class: "min-w-4"
58
+ })
59
+ ]),
60
+ _: 1
61
+ })
62
+ ]),
63
+ _: 1
64
+ }, 8, ["modelValue", "options"])) : d.value ? K((o(), f("input", {
65
+ key: 1,
66
+ ref_key: "inputRef",
67
+ ref: x,
68
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => r.value = t),
69
+ class: "text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none",
70
+ placeholder: "Value",
71
+ type: "text",
72
+ onBlur: A,
73
+ onKeyup: M(j, ["enter"])
74
+ }, null, 544)), [
75
+ [R, r.value]
76
+ ]) : (o(), v(a(L), {
77
+ key: 2,
78
+ resize: "",
79
+ value: k.value
80
+ }, {
81
+ items: s(() => [
82
+ (o(!0), f(_, null, U(p.value, (t) => (o(), v(a(D), {
83
+ key: t,
84
+ class: "group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
85
+ value: t,
86
+ onClick: (Q) => g(t)
87
+ }, {
88
+ default: s(() => [
89
+ i("div", {
90
+ class: $([
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"
93
+ ])
94
+ }, [
95
+ n(a(h), {
96
+ class: "size-2.5",
97
+ icon: "Checkmark",
98
+ thickness: "3"
99
+ })
100
+ ], 2),
101
+ i("span", J, y(t), 1)
102
+ ]),
103
+ _: 2
104
+ }, 1032, ["value", "onClick"]))), 128)),
105
+ e.canAddCustomValue ? (o(), f(_, { key: 0 }, [
106
+ p.value.length ? (o(), v(a(W), { key: 0 })) : C("", !0),
107
+ n(a(D), {
108
+ class: "flex items-center gap-1.5",
109
+ onClick: l[1] || (l[1] = (t) => d.value = !0)
110
+ }, {
111
+ default: s(() => [
112
+ i("div", P, [
113
+ n(a(h), {
114
+ icon: "Add",
115
+ size: "sm"
116
+ })
117
+ ]),
118
+ l[2] || (l[2] = i("span", null, "Add value", -1))
119
+ ]),
120
+ _: 1
121
+ })
122
+ ], 64)) : C("", !0)
123
+ ]),
124
+ default: s(() => [
125
+ n(a(b), {
126
+ class: "size-full justify-start gap-1.5 overflow-auto px-2 py-1.5 font-normal whitespace-nowrap outline-none",
127
+ variant: "ghost"
128
+ }, {
129
+ default: s(() => [
130
+ i("span", H, y(k.value || "Select a value"), 1),
131
+ n(a(h), {
132
+ icon: "ChevronDown",
133
+ size: "md"
134
+ })
135
+ ]),
136
+ _: 1
137
+ })
138
+ ]),
139
+ _: 1
140
+ }, 8, ["value"]))
141
+ ]));
142
+ }
143
+ });
144
+ export {
145
+ Z as default
146
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DataTableInputSelect.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
13
+ //# sourceMappingURL=DataTableRow.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableRow.vue"],"names":[],"mappings":"AAuBA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAkB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { createElementBlock as t, openBlock as o, renderSlot as r } from "vue";
2
+ import c from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ const n = {}, s = { class: "group contents" };
4
+ function a(e, l) {
5
+ return o(), t("tr", s, [
6
+ r(e.$slots, "default")
7
+ ]);
8
+ }
9
+ const d = /* @__PURE__ */ c(n, [["render", a]]);
10
+ export {
11
+ d as default
12
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ text?: string | number;
3
+ };
4
+ declare var __VLS_5: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_5) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
16
+ //# sourceMappingURL=DataTableText.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableText.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableText.vue"],"names":[],"mappings":"AAkBA,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB,CAAC;AAmCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB/C,QAAA,MAAM,eAAe,kSAMnB,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"}
@@ -0,0 +1,23 @@
1
+ import { defineComponent as t, createBlock as a, openBlock as o, withCtx as r, createElementVNode as s, renderSlot as n, createTextVNode as p, toDisplayString as l } from "vue";
2
+ import c from "./DataTableCell.vue.js";
3
+ const i = { class: "flex-1 px-2 py-1.5 whitespace-nowrap" }, x = /* @__PURE__ */ t({
4
+ __name: "DataTableText",
5
+ props: {
6
+ text: {}
7
+ },
8
+ setup(_) {
9
+ return (e, f) => (o(), a(c, { class: "relative flex" }, {
10
+ default: r(() => [
11
+ s("span", i, [
12
+ n(e.$slots, "default", {}, () => [
13
+ p(l(e.text), 1)
14
+ ])
15
+ ])
16
+ ]),
17
+ _: 3
18
+ }));
19
+ }
20
+ });
21
+ export {
22
+ x as default
23
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DataTableText.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,9 @@
1
+ export { default as DataTable } from './DataTable.vue.js';
2
+ export { default as DataTableCell } from './DataTableCell.vue.js';
3
+ export { default as DataTableCheckbox } from './DataTableCheckbox.vue.js';
4
+ export { default as DataTableHeader } from './DataTableHeader.vue.js';
5
+ export { default as DataTableInput } from './DataTableInput.vue.js';
6
+ export { default as DataTableInputSelect } from './DataTableInputSelect.vue.js';
7
+ export { default as DataTableRow } from './DataTableRow.vue.js';
8
+ export { default as DataTableText } from './DataTableText.vue.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { default as t } from "./DataTable.vue.js";
2
+ import { default as o } from "./DataTableCell.vue.js";
3
+ import { default as f } from "./DataTableCheckbox.vue.js";
4
+ import { default as u } from "./DataTableHeader.vue.js";
5
+ import { default as b } from "./DataTableInput.vue.js";
6
+ import { default as T } from "./DataTableInputSelect.vue.js";
7
+ import { default as s } from "./DataTableRow.vue.js";
8
+ import { default as c } from "./DataTableText.vue.js";
9
+ export {
10
+ t as DataTable,
11
+ o as DataTableCell,
12
+ f as DataTableCheckbox,
13
+ u as DataTableHeader,
14
+ b as DataTableInput,
15
+ T as DataTableInputSelect,
16
+ s as DataTableRow,
17
+ c as DataTableText
18
+ };
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ /** Provided resizable child width */
3
+ width: number;
4
+ };
5
+ type __VLS_Slots = {
6
+ default?(): unknown;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:width": (value: number) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:width"?: ((value: number) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
20
+ //# sourceMappingURL=Resize.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Resize.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/resize/Resize.vue"],"names":[],"mappings":"AA2GA,KAAK,WAAW,GAAG;IACjB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAQF,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,IAAI,OAAO,CAAA;CACpB,CAAC;AA4FF,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"}
@@ -0,0 +1,8 @@
1
+ import o from "./Resize.vue2.js";
2
+ /* empty css */
3
+ /* empty css */
4
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bbcd6c0c"]]);
6
+ export {
7
+ e as default
8
+ };
@@ -0,0 +1,36 @@
1
+ import { defineComponent as f, ref as v, createElementBlock as h, openBlock as g, normalizeStyle as p, renderSlot as w, createElementVNode as E } from "vue";
2
+ const l = "scalar-dragging", D = /* @__PURE__ */ f({
3
+ __name: "Resize",
4
+ props: {
5
+ width: {}
6
+ },
7
+ emits: ["update:width"],
8
+ setup(n, { emit: m }) {
9
+ const s = m, o = v(!1), r = (t) => {
10
+ t.preventDefault();
11
+ const d = t.clientX, c = n.width, a = (u) => {
12
+ o.value = !0, document.body.classList.add(l);
13
+ let e = c + u.clientX - d;
14
+ e > 420 && (e = 420 + (e - 420) * 0.2), e < 240 && (e = 240), s("update:width", e);
15
+ }, i = () => {
16
+ o.value = !1, document.body.classList.remove(l), document.documentElement.removeEventListener("mousemove", a, !1), document.documentElement.removeEventListener("mouseup", i, !1), n.width > 420 ? s("update:width", 360) : n.width < 240 && s("update:width", 240);
17
+ };
18
+ document.documentElement.addEventListener("mousemove", a, !1), document.documentElement.addEventListener("mouseup", i, !1);
19
+ };
20
+ return (t, d) => (g(), h("div", {
21
+ class: "relative",
22
+ style: p({
23
+ width: `${t.width}px`
24
+ })
25
+ }, [
26
+ w(t.$slots, "default", {}, void 0, !0),
27
+ E("div", {
28
+ class: "resizer",
29
+ onMousedown: r
30
+ }, null, 32)
31
+ ], 4));
32
+ }
33
+ });
34
+ export {
35
+ D as default
36
+ };
@@ -0,0 +1,3 @@
1
+ /** biome-ignore-all lint/performance/noBarrelFile: Component entry point */
2
+ export { default as Resize } from './Resize.vue.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,4 @@
1
+ import { default as f } from "./Resize.vue.js";
2
+ export {
3
+ f as Resize
4
+ };
@@ -0,0 +1,39 @@
1
+ import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
2
+ import type { ClientLayout } from '../../../v2/types/layout';
3
+ type __VLS_Props = {
4
+ /** All documents to display sidebar items for */
5
+ documents: Record<string, WorkspaceDocument>;
6
+ /** Layout for the client */
7
+ layout: ClientLayout;
8
+ };
9
+ type __VLS_Slots = {
10
+ /** Slot to add the workspace button */
11
+ workspaceButton?(): unknown;
12
+ /** Slot to add additional content to the footer */
13
+ footer?(): unknown;
14
+ };
15
+ type __VLS_PublicProps = __VLS_Props & {
16
+ /** Propagate up the workspace model to the parent */
17
+ 'workspace'?: string;
18
+ /** Controls the visibility of the sidebar */
19
+ 'isSidebarOpen': boolean;
20
+ /** Controls the width of the sidebar */
21
+ 'sidebarWidth': number;
22
+ };
23
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "update:workspace": (value: string) => any;
25
+ "update:isSidebarOpen": (value: boolean) => any;
26
+ "update:sidebarWidth": (value: number) => any;
27
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
+ "onUpdate:workspace"?: ((value: string) => any) | undefined;
29
+ "onUpdate:isSidebarOpen"?: ((value: boolean) => any) | undefined;
30
+ "onUpdate:sidebarWidth"?: ((value: number) => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
33
+ export default _default;
34
+ type __VLS_WithSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
39
+ //# sourceMappingURL=Sidebar.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAIlF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKrD,KAAK,WAAW,GAAG;IACjB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC5C,4BAA4B;IAC5B,MAAM,EAAE,YAAY,CAAA;CACrB,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,eAAe,CAAC,IAAI,OAAO,CAAA;IAC3B,mDAAmD;IACnD,MAAM,CAAC,IAAI,OAAO,CAAA;CACnB,CAAC;AA+CF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AAkLF,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"}
@@ -0,0 +1,95 @@
1
+ import { defineComponent as v, mergeModels as w, computed as y, useModel as u, ref as g, createBlock as a, openBlock as r, unref as l, withCtx as s, createVNode as h, renderSlot as b, createElementVNode as S, createCommentVNode as c } from "vue";
2
+ import { ScalarIconButton as x, ScalarSidebarSearchInput as O } from "@scalar/components";
3
+ import { ScalarIconMagnifyingGlass as M } from "@scalar/icons";
4
+ import { createSidebarState as V, ScalarSidebar as B } from "@scalar/sidebar";
5
+ import E from "./SidebarMenu.vue.js";
6
+ import W from "./SidebarToggle.vue.js";
7
+ import $ from "../resize/Resize.vue.js";
8
+ const C = { class: "bg-sidebar-b-1 sticky top-0 z-1 flex flex-col gap-3 px-3 pt-3" }, G = { class: "flex items-center justify-between" }, R = /* @__PURE__ */ v({
9
+ __name: "Sidebar",
10
+ props: /* @__PURE__ */ w({
11
+ documents: {},
12
+ layout: {}
13
+ }, {
14
+ workspace: {
15
+ default: "default"
16
+ },
17
+ workspaceModifiers: {},
18
+ isSidebarOpen: { type: Boolean, required: !0 },
19
+ isSidebarOpenModifiers: {},
20
+ sidebarWidth: {
21
+ required: !0,
22
+ default: 288
23
+ },
24
+ sidebarWidthModifiers: {}
25
+ }),
26
+ emits: ["update:workspace", "update:isSidebarOpen", "update:sidebarWidth"],
27
+ setup(i) {
28
+ const d = y(() => {
29
+ const t = Object.entries(i.documents).map(
30
+ ([e, o]) => ({
31
+ id: e,
32
+ type: "document",
33
+ title: o.info.title ?? e,
34
+ children: o["x-scalar-navigation"]?.children ?? []
35
+ })
36
+ );
37
+ return V(t);
38
+ }), k = (t, ...e) => {
39
+ console.log("[LOG] event name: ", t), console.log("[LOG]", ...e);
40
+ }, p = u(i, "workspace"), m = u(i, "isSidebarOpen"), n = g(!1), f = u(i, "sidebarWidth");
41
+ return (t, e) => (r(), a(l($), {
42
+ width: f.value,
43
+ "onUpdate:width": e[4] || (e[4] = (o) => f.value = o),
44
+ class: "flex flex-col"
45
+ }, {
46
+ default: s(() => [
47
+ h(l(B), {
48
+ class: "flex w-auto flex-1",
49
+ isExpanded: d.value.isExpanded,
50
+ isSelected: d.value.isSelected,
51
+ items: d.value.items.value,
52
+ layout: "client",
53
+ onReorder: e[3] || (e[3] = (...o) => k("reorder", ...o))
54
+ }, {
55
+ search: s(() => [
56
+ S("div", C, [
57
+ S("div", G, [
58
+ t.layout === "desktop" ? (r(), a(E, {
59
+ key: 0,
60
+ workspace: p.value,
61
+ "onUpdate:workspace": e[0] || (e[0] = (o) => p.value = o)
62
+ }, null, 8, ["workspace"])) : t.layout === "modal" ? (r(), a(W, {
63
+ key: 1,
64
+ modelValue: m.value,
65
+ "onUpdate:modelValue": e[1] || (e[1] = (o) => m.value = o)
66
+ }, null, 8, ["modelValue"])) : c("", !0),
67
+ t.layout !== "web" ? (r(), a(l(x), {
68
+ key: 2,
69
+ icon: l(M),
70
+ label: "Search",
71
+ onClick: e[2] || (e[2] = (o) => n.value = !n.value)
72
+ }, null, 8, ["icon"])) : c("", !0)
73
+ ]),
74
+ n.value || t.layout === "web" ? (r(), a(l(O), {
75
+ key: 0,
76
+ autofocus: t.layout !== "web"
77
+ }, null, 8, ["autofocus"])) : c("", !0)
78
+ ])
79
+ ]),
80
+ before: s(() => [
81
+ b(t.$slots, "workspaceButton")
82
+ ]),
83
+ footer: s(() => [
84
+ b(t.$slots, "footer")
85
+ ]),
86
+ _: 3
87
+ }, 8, ["isExpanded", "isSelected", "items"])
88
+ ]),
89
+ _: 3
90
+ }, 8, ["width"]));
91
+ }
92
+ });
93
+ export {
94
+ R as default
95
+ };