@scalar/api-client 2.11.0 → 2.12.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 (370) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue2.js +35 -29
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
  6. package/dist/hooks/useClientConfig.d.ts +3 -0
  7. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  8. package/dist/layouts/App/create-api-client-app.d.ts +17 -17
  9. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  10. package/dist/layouts/Web/create-api-client-web.d.ts +17 -17
  11. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  12. package/dist/libs/create-client.d.ts +18 -18
  13. package/dist/libs/create-client.d.ts.map +1 -1
  14. package/dist/libs/errors.d.ts +1 -0
  15. package/dist/libs/errors.d.ts.map +1 -1
  16. package/dist/libs/errors.js +2 -1
  17. package/dist/libs/find-request.d.ts +1 -1
  18. package/dist/libs/send-request/create-request-operation.d.ts +4 -4
  19. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  20. package/dist/libs/send-request/create-request-operation.js +60 -51
  21. package/dist/store/active-entities.d.ts +1 -1
  22. package/dist/store/active-entities.d.ts.map +1 -1
  23. package/dist/store/collections.d.ts.map +1 -1
  24. package/dist/store/requests.d.ts +11 -11
  25. package/dist/store/security-schemes.d.ts.map +1 -1
  26. package/dist/store/store.d.ts +10 -10
  27. package/dist/store/store.d.ts.map +1 -1
  28. package/dist/style.css +1 -1
  29. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +80 -22
  30. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +51 -48
  32. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +3 -3
  33. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  35. package/dist/v2/blocks/operation-block/components/Header.vue2.js +32 -33
  36. package/dist/v2/blocks/{scalar-operation-block/components/OperationBlock.vue.d.ts → request-block/RequestBlock.vue.d.ts} +3 -3
  37. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -0
  38. package/dist/v2/blocks/request-block/RequestBlock.vue.js +7 -0
  39. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +223 -0
  40. package/dist/v2/blocks/{scalar-operation-block/components/OperationBody.vue.d.ts → request-block/components/RequestBody.vue.d.ts} +1 -1
  41. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -0
  42. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +7 -0
  43. package/dist/v2/blocks/{scalar-operation-block/components/OperationBody.vue2.js → request-block/components/RequestBody.vue2.js} +15 -15
  44. package/dist/v2/blocks/{scalar-operation-block/components/OperationParams.vue.d.ts → request-block/components/RequestParams.vue.d.ts} +1 -1
  45. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -0
  46. package/dist/v2/blocks/{scalar-operation-block/components/OperationParams.vue.js → request-block/components/RequestParams.vue.js} +24 -24
  47. package/dist/v2/blocks/request-block/components/RequestParams.vue2.js +4 -0
  48. package/dist/v2/blocks/{scalar-operation-block/components/OperationTable.vue.d.ts → request-block/components/RequestTable.vue.d.ts} +2 -2
  49. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -0
  50. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +7 -0
  51. package/dist/v2/blocks/{scalar-operation-block/components/OperationTable.vue2.js → request-block/components/RequestTable.vue2.js} +8 -8
  52. package/dist/v2/blocks/{scalar-operation-block/components/OperationTableRow.vue.d.ts → request-block/components/RequestTableRow.vue.d.ts} +1 -1
  53. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -0
  54. package/dist/v2/blocks/{scalar-operation-block/components/OperationTableRow.vue.js → request-block/components/RequestTableRow.vue.js} +52 -53
  55. package/dist/v2/blocks/request-block/components/RequestTableRow.vue2.js +4 -0
  56. package/dist/v2/blocks/{scalar-operation-block/components/OperationTableTooltip.vue.d.ts → request-block/components/RequestTableTooltip.vue.d.ts} +1 -1
  57. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -0
  58. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +7 -0
  59. package/dist/v2/blocks/{scalar-operation-block/components/OperationTableTooltip.vue2.js → request-block/components/RequestTableTooltip.vue2.js} +7 -7
  60. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +24 -0
  61. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -0
  62. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +29 -0
  63. package/dist/v2/blocks/request-block/helpers/files.d.ts.map +1 -0
  64. package/dist/v2/blocks/request-block/helpers/get-parameter-content.d.ts.map +1 -0
  65. package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +1 -0
  66. package/dist/v2/blocks/request-block/helpers/get-parameter-schema.d.ts.map +1 -0
  67. package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -0
  68. package/dist/v2/blocks/request-block/helpers/group-by.d.ts.map +1 -0
  69. package/dist/v2/blocks/request-block/helpers/validate-parameter.d.ts.map +1 -0
  70. package/dist/v2/blocks/request-block/index.d.ts +2 -0
  71. package/dist/v2/blocks/request-block/index.d.ts.map +1 -0
  72. package/dist/v2/blocks/request-block/index.js +4 -0
  73. package/dist/v2/blocks/{scalar-response-block/components → response-block}/ResponseBlock.vue.d.ts +3 -3
  74. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -0
  75. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +7 -0
  76. package/dist/v2/blocks/{scalar-response-block/components → response-block}/ResponseBlock.vue2.js +25 -25
  77. package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -0
  78. package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -0
  79. package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBody.vue.js +2 -2
  80. package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBody.vue2.js +4 -4
  81. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
  82. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
  83. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
  84. package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyPreview.vue.js +1 -1
  85. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
  86. package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyRaw.vue.js +1 -1
  87. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
  88. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
  89. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
  90. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -0
  91. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
  92. package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseEmpty.vue.js +2 -2
  93. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
  94. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +7 -0
  95. package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseMetaInformation.vue.d.ts +0 -1
  96. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
  97. package/dist/v2/blocks/response-block/helpers/extract-filename.d.ts.map +1 -0
  98. package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts.map +1 -0
  99. package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -0
  100. package/dist/v2/blocks/response-block/helpers/process-response-body.d.ts.map +1 -0
  101. package/dist/v2/blocks/response-block/index.d.ts +2 -0
  102. package/dist/v2/blocks/response-block/index.d.ts.map +1 -0
  103. package/dist/v2/blocks/response-block/index.js +4 -0
  104. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +4 -3
  105. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  106. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  107. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +68 -68
  108. package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -0
  109. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  110. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  111. package/dist/v2/components/code-input/CodeInput.vue2.js +29 -28
  112. package/dist/v2/components/resize/Resize.vue.d.ts.map +1 -1
  113. package/dist/v2/components/resize/Resize.vue.js +2 -2
  114. package/dist/v2/components/server/ServerDropdown.vue.d.ts +5 -5
  115. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  116. package/dist/v2/components/server/ServerDropdown.vue.js +38 -43
  117. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +1 -1
  118. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  119. package/dist/v2/components/server/ServerDropdownItem.vue.js +2 -2
  120. package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -29
  121. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +24 -4
  122. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  123. package/dist/v2/components/sidebar/Sidebar.vue.js +54 -49
  124. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +18 -9
  125. package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
  126. package/dist/v2/components/sidebar/SidebarMenu.vue.js +36 -43
  127. package/dist/v2/features/app/App.vue.d.ts +0 -3
  128. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  129. package/dist/v2/features/app/App.vue.js +130 -93
  130. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +36 -4
  131. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  132. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  133. package/dist/v2/features/app/components/AppSidebar.vue2.js +68 -59
  134. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts +15 -0
  135. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts.map +1 -0
  136. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +56 -0
  137. package/dist/v2/features/app/components/CreateWorkspaceModal.vue2.js +4 -0
  138. package/dist/v2/{components/TempReplaceMe.vue.d.ts → features/app/components/SplashScreen.vue.d.ts} +1 -1
  139. package/dist/v2/features/app/components/SplashScreen.vue.d.ts.map +1 -0
  140. package/dist/v2/features/app/components/SplashScreen.vue.js +7 -0
  141. package/dist/v2/features/app/components/SplashScreen.vue2.js +18 -0
  142. package/dist/v2/features/app/components/WebTopNav.vue.d.ts +26 -5
  143. package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
  144. package/dist/v2/features/app/components/WebTopNav.vue.js +18 -19
  145. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +1 -2
  146. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  147. package/dist/v2/features/app/helpers/create-api-client-app.js +8 -8
  148. package/dist/v2/features/app/helpers/routes.d.ts +6 -31
  149. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  150. package/dist/v2/features/app/helpers/routes.js +4 -9
  151. package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
  152. package/dist/v2/features/collection/DocumentCollection.vue2.js +44 -51
  153. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
  154. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +25 -25
  155. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  156. package/dist/v2/features/collection/components/Authentication.vue2.js +9 -7
  157. package/dist/v2/features/collection/components/Cookies.vue.d.ts +13 -1
  158. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  159. package/dist/v2/features/collection/components/Cookies.vue.js +2 -7
  160. package/dist/v2/features/collection/components/Cookies.vue2.js +32 -0
  161. package/dist/v2/features/collection/components/Environment.vue2.js +2 -0
  162. package/dist/v2/features/collection/components/Overview.vue2.js +10 -8
  163. package/dist/v2/features/collection/components/Servers.vue2.js +26 -24
  164. package/dist/v2/features/collection/components/Settings.vue.d.ts +13 -15
  165. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  166. package/dist/v2/features/collection/components/Settings.vue.js +2 -5
  167. package/dist/v2/features/collection/components/Settings.vue2.js +51 -92
  168. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts +6 -22
  169. package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
  170. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +3 -3
  171. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +121 -88
  172. package/dist/v2/features/global-cookies/index.d.ts +1 -1
  173. package/dist/v2/features/global-cookies/index.d.ts.map +1 -1
  174. package/dist/v2/features/global-cookies/index.js +2 -2
  175. package/dist/v2/features/modal/Modal.vue.d.ts +0 -2
  176. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  177. package/dist/v2/features/modal/Modal.vue.js +3 -3
  178. package/dist/v2/features/modal/Modal.vue2.js +28 -61
  179. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
  180. package/dist/v2/features/modal/helpers/create-api-client-modal.js +8 -9
  181. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  182. package/dist/v2/features/operation/Operation.vue.js +32 -25
  183. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +12 -0
  184. package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -0
  185. package/dist/v2/features/operation/helpers/get-security-requirements.js +4 -0
  186. package/dist/v2/features/search/components/SearchButton.vue.d.ts +12 -0
  187. package/dist/v2/features/search/components/SearchButton.vue.d.ts.map +1 -0
  188. package/dist/v2/features/search/components/SearchButton.vue.js +71 -0
  189. package/dist/v2/features/search/components/SearchButton.vue2.js +4 -0
  190. package/dist/v2/features/search/components/SearchModal.vue.d.ts +11 -0
  191. package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -0
  192. package/dist/v2/features/search/components/SearchModal.vue.js +7 -0
  193. package/dist/v2/features/search/components/SearchModal.vue2.js +101 -0
  194. package/dist/v2/features/search/components/SearchResult.vue.d.ts +10 -0
  195. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -0
  196. package/dist/v2/features/search/components/SearchResult.vue.js +80 -0
  197. package/dist/v2/features/search/components/SearchResult.vue2.js +4 -0
  198. package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +9 -0
  199. package/dist/v2/features/search/helpers/create-fuse-instance.d.ts.map +1 -0
  200. package/dist/v2/features/search/helpers/create-fuse-instance.js +43 -0
  201. package/dist/v2/features/search/helpers/create-search-index.d.ts +7 -0
  202. package/dist/v2/features/search/helpers/create-search-index.d.ts.map +1 -0
  203. package/dist/v2/features/search/helpers/create-search-index.js +63 -0
  204. package/dist/v2/features/search/hooks/use-search-index.d.ts +14 -0
  205. package/dist/v2/features/search/hooks/use-search-index.d.ts.map +1 -0
  206. package/dist/v2/features/search/hooks/use-search-index.js +24 -0
  207. package/dist/v2/features/search/index.d.ts +3 -0
  208. package/dist/v2/features/search/index.d.ts.map +1 -0
  209. package/dist/v2/features/search/index.js +6 -0
  210. package/dist/v2/features/search/types.d.ts +24 -0
  211. package/dist/v2/features/search/types.d.ts.map +1 -0
  212. package/dist/v2/features/settings/{Settings.vue.d.ts → CollectionSettings.vue.d.ts} +2 -2
  213. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -0
  214. package/dist/v2/features/settings/CollectionSettings.vue.js +266 -0
  215. package/dist/v2/features/settings/CollectionSettings.vue2.js +4 -0
  216. package/dist/v2/features/settings/DocumentSettings.vue.d.ts +19 -0
  217. package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -0
  218. package/dist/v2/features/settings/DocumentSettings.vue.js +7 -0
  219. package/dist/v2/features/settings/DocumentSettings.vue2.js +106 -0
  220. package/dist/v2/features/settings/index.d.ts +2 -1
  221. package/dist/v2/features/settings/index.d.ts.map +1 -1
  222. package/dist/v2/features/settings/index.js +4 -2
  223. package/dist/v2/helpers/drag-handle-factory.d.ts +17 -0
  224. package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -0
  225. package/dist/v2/helpers/drag-handle-factory.js +135 -0
  226. package/dist/v2/helpers/handle-hotkeys.d.ts +23 -0
  227. package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -0
  228. package/dist/v2/helpers/handle-hotkeys.js +56 -0
  229. package/dist/v2/helpers/slugify.d.ts +9 -0
  230. package/dist/v2/helpers/slugify.d.ts.map +1 -0
  231. package/dist/v2/helpers/slugify.js +4 -0
  232. package/dist/v2/helpers/storage.d.ts +25 -0
  233. package/dist/v2/helpers/storage.d.ts.map +1 -0
  234. package/dist/v2/helpers/storage.js +20 -0
  235. package/dist/v2/hooks/use-color-mode.d.ts +20 -0
  236. package/dist/v2/hooks/use-color-mode.d.ts.map +1 -0
  237. package/dist/v2/hooks/use-color-mode.js +24 -0
  238. package/dist/v2/hooks/use-document-watcher.d.ts +9 -7
  239. package/dist/v2/hooks/use-document-watcher.d.ts.map +1 -1
  240. package/dist/v2/hooks/use-document-watcher.js +66 -0
  241. package/dist/v2/hooks/use-global-hot-keys.d.ts +10 -0
  242. package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -0
  243. package/dist/v2/hooks/use-global-hot-keys.js +9 -0
  244. package/dist/v2/hooks/use-sidebar-state.d.ts +4 -3
  245. package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
  246. package/dist/v2/hooks/use-sidebar-state.js +46 -30
  247. package/dist/v2/hooks/use-workspace-client-events.d.ts +8 -2
  248. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  249. package/dist/v2/hooks/use-workspace-client-events.js +51 -102
  250. package/dist/v2/hooks/use-workspace-selector.d.ts +18 -0
  251. package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -0
  252. package/dist/v2/hooks/use-workspace-selector.js +87 -0
  253. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  254. package/dist/views/Request/RequestRoot.vue.js +2 -2
  255. package/dist/views/Request/RequestRoot.vue2.js +86 -77
  256. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  257. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  258. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  259. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  260. package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -24
  261. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  262. package/package.json +30 -29
  263. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +0 -1
  264. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +0 -7
  265. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +0 -262
  266. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +0 -1
  267. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +0 -7
  268. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +0 -1
  269. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +0 -4
  270. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +0 -1
  271. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +0 -7
  272. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +0 -1
  273. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +0 -4
  274. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +0 -1
  275. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +0 -7
  276. package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +0 -1
  277. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +0 -1
  278. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +0 -1
  279. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +0 -1
  280. package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +0 -1
  281. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +0 -1
  282. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +0 -1
  283. package/dist/v2/blocks/scalar-operation-block/index.d.ts +0 -2
  284. package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +0 -1
  285. package/dist/v2/blocks/scalar-operation-block/index.js +0 -4
  286. package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +0 -1
  287. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +0 -1
  288. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +0 -7
  289. package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +0 -1
  290. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +0 -1
  291. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +0 -1
  292. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +0 -1
  293. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +0 -1
  294. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +0 -1
  295. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +0 -1
  296. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +0 -1
  297. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +0 -1
  298. package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +0 -1
  299. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +0 -1
  300. package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +0 -7
  301. package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +0 -1
  302. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +0 -1
  303. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +0 -1
  304. package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +0 -1
  305. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +0 -1
  306. package/dist/v2/blocks/scalar-response-block/index.d.ts +0 -2
  307. package/dist/v2/blocks/scalar-response-block/index.d.ts.map +0 -1
  308. package/dist/v2/blocks/scalar-response-block/index.js +0 -4
  309. package/dist/v2/components/TempReplaceMe.vue.d.ts.map +0 -1
  310. package/dist/v2/components/TempReplaceMe.vue.js +0 -12
  311. package/dist/v2/features/global-cookies/components/GlobalCookies.vue.d.ts +0 -32
  312. package/dist/v2/features/global-cookies/components/GlobalCookies.vue.d.ts.map +0 -1
  313. package/dist/v2/features/global-cookies/components/GlobalCookies.vue.js +0 -7
  314. package/dist/v2/features/global-cookies/components/GlobalCookies.vue2.js +0 -58
  315. package/dist/v2/features/settings/Settings.vue.d.ts.map +0 -1
  316. package/dist/v2/features/settings/Settings.vue.js +0 -268
  317. package/dist/v2/features/settings/Settings.vue2.js +0 -4
  318. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/files.d.ts +0 -0
  319. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/files.js +0 -0
  320. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-parameter-content.d.ts +0 -0
  321. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-parameter-content.js +0 -0
  322. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-parameter-example.d.ts +0 -0
  323. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-parameter-example.js +0 -0
  324. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-parameter-schema.d.ts +0 -0
  325. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-parameter-schema.js +0 -0
  326. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-request-body-example.d.ts +0 -0
  327. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/get-request-body-example.js +0 -0
  328. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/group-by.d.ts +0 -0
  329. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/group-by.js +0 -0
  330. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/validate-parameter.d.ts +0 -0
  331. /package/dist/v2/blocks/{scalar-operation-block → request-block}/helpers/validate-parameter.js +0 -0
  332. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/Headers.vue.d.ts +0 -0
  333. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/Headers.vue.js +0 -0
  334. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/Headers.vue2.js +0 -0
  335. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBody.vue.d.ts +0 -0
  336. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyDownload.vue.d.ts +0 -0
  337. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyDownload.vue.js +0 -0
  338. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyDownload.vue2.js +0 -0
  339. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyInfo.vue.d.ts +0 -0
  340. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyInfo.vue.js +0 -0
  341. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyPreview.vue.d.ts +0 -0
  342. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyPreview.vue2.js +0 -0
  343. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyRaw.vue.d.ts +0 -0
  344. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyRaw.vue2.js +0 -0
  345. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyStreaming.vue.d.ts +0 -0
  346. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyStreaming.vue.js +0 -0
  347. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyStreaming.vue2.js +0 -0
  348. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyToggle.vue.d.ts +0 -0
  349. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyToggle.vue.js +0 -0
  350. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyToggle.vue2.js +0 -0
  351. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyVirtual.vue.d.ts +0 -0
  352. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyVirtual.vue.js +0 -0
  353. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseBodyVirtual.vue3.js +0 -0
  354. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseCookies.vue.d.ts +0 -0
  355. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseCookies.vue.js +0 -0
  356. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseCookies.vue2.js +0 -0
  357. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseEmpty.vue.d.ts +0 -0
  358. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseEmpty.vue2.js +0 -0
  359. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseLoadingOverlay.vue.d.ts +0 -0
  360. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseLoadingOverlay.vue2.js +0 -0
  361. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseMetaInformation.vue.js +0 -0
  362. /package/dist/v2/blocks/{scalar-response-block → response-block}/components/ResponseMetaInformation.vue2.js +0 -0
  363. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/extract-filename.d.ts +0 -0
  364. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/extract-filename.js +0 -0
  365. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/get-content-length.d.ts +0 -0
  366. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/get-content-length.js +0 -0
  367. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/media-types.d.ts +0 -0
  368. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/media-types.js +0 -0
  369. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/process-response-body.d.ts +0 -0
  370. /package/dist/v2/blocks/{scalar-response-block → response-block}/helpers/process-response-body.js +0 -0
@@ -0,0 +1,266 @@
1
+ import { defineComponent as $, createElementBlock as x, openBlock as a, createVNode as n, withCtx as l, createElementVNode as s, createBlock as u, createCommentVNode as p, unref as r, normalizeClass as c, createTextVNode as i, toDisplayString as g, Fragment as U, renderList as w, normalizeStyle as h } from "vue";
2
+ import { cva as M, ScalarButton as m, cx as y, ScalarIcon as k } from "@scalar/components";
3
+ import { themeLabels as P } from "@scalar/themes";
4
+ import B from "../../../components/ImportCollection/IntegrationLogo.vue.js";
5
+ import L from "./components/Appearance.vue.js";
6
+ import b from "./components/Section.vue.js";
7
+ import { getThemeColors as C } from "./helpers/get-theme-colors.js";
8
+ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }, V = { class: "bg-c-accent text-b-1 flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] border-transparent p-1" }, A = { class: "flex flex-col gap-2" }, E = { class: "grid grid-cols-2 gap-2" }, F = { class: "flex items-center gap-2" }, O = { class: "flex items-center gap-1" }, D = { class: "grid grid-cols-2 gap-2" }, W = { class: "flex items-center gap-2" }, _ = { class: "flex items-center gap-1" }, q = { class: "size-7 rounded-xl" }, v = "https://proxy.scalar.com", I = /* @__PURE__ */ $({
9
+ __name: "CollectionSettings",
10
+ props: {
11
+ activeProxyUrl: {},
12
+ customProxyUrl: {},
13
+ activeThemeId: {},
14
+ colorMode: {}
15
+ },
16
+ emits: ["update:proxyUrl", "update:themeId", "update:colorMode"],
17
+ setup(G, { emit: T }) {
18
+ const d = T, S = [
19
+ "default",
20
+ "alternate",
21
+ "purple",
22
+ "solarized",
23
+ "saturn",
24
+ "kepler"
25
+ ], z = ["elysiajs", "fastify"], f = M({
26
+ base: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",
27
+ variants: {
28
+ active: {
29
+ true: "bg-primary text-c-1 hover:bg-inherit",
30
+ false: "bg-b-1 hover:bg-b-2"
31
+ }
32
+ }
33
+ });
34
+ return (o, e) => (a(), x("div", N, [
35
+ n(b, null, {
36
+ title: l(() => [...e[4] || (e[4] = [
37
+ i(" CORS Proxy ", -1)
38
+ ])]),
39
+ description: l(() => [...e[5] || (e[5] = [
40
+ i(" Browsers block cross-origin requests for security. We provide a public proxy to ", -1),
41
+ s("a", {
42
+ class: "hover:text-c-1 underline-offset-2",
43
+ href: "https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",
44
+ target: "_blank"
45
+ }, " bypass CORS issues ", -1),
46
+ i(" . Check the ", -1),
47
+ s("a", {
48
+ class: "hover:text-c-1 underline-offset-2",
49
+ href: "https://github.com/scalar/scalar/tree/main/projects/proxy-scalar-com",
50
+ target: "_blank"
51
+ }, " source code on GitHub ", -1),
52
+ i(" . ", -1)
53
+ ])]),
54
+ default: l(() => [
55
+ s("div", R, [
56
+ n(r(m), {
57
+ class: c(
58
+ r(y)(
59
+ r(f)({
60
+ active: o.activeProxyUrl === v
61
+ })
62
+ )
63
+ ),
64
+ onClick: e[0] || (e[0] = (t) => d("update:proxyUrl", v))
65
+ }, {
66
+ default: l(() => [
67
+ s("div", {
68
+ class: c(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
69
+ "bg-c-accent text-b-1 border-transparent": o.activeProxyUrl === v
70
+ }])
71
+ }, [
72
+ o.activeProxyUrl === v ? (a(), u(r(k), {
73
+ key: 0,
74
+ icon: "Checkmark",
75
+ size: "xs",
76
+ thickness: "3.5"
77
+ })) : p("", !0)
78
+ ], 2),
79
+ e[6] || (e[6] = i(" Use proxy.scalar.com (default) ", -1))
80
+ ]),
81
+ _: 1
82
+ }, 8, ["class"]),
83
+ o.customProxyUrl && o.customProxyUrl !== v ? (a(), u(r(m), {
84
+ key: 0,
85
+ class: c(
86
+ r(y)(
87
+ r(f)({
88
+ active: o.activeProxyUrl === o.customProxyUrl
89
+ })
90
+ )
91
+ ),
92
+ onClick: e[1] || (e[1] = (t) => d("update:proxyUrl", o.customProxyUrl))
93
+ }, {
94
+ default: l(() => [
95
+ s("div", V, [
96
+ o.customProxyUrl === o.activeProxyUrl ? (a(), u(r(k), {
97
+ key: 0,
98
+ icon: "Checkmark",
99
+ size: "xs",
100
+ thickness: "3.5"
101
+ })) : p("", !0)
102
+ ]),
103
+ i(" Use custom proxy (" + g(o.customProxyUrl) + ") ", 1)
104
+ ]),
105
+ _: 1
106
+ }, 8, ["class"])) : p("", !0),
107
+ n(r(m), {
108
+ class: c(r(y)(r(f)({ active: !o.activeProxyUrl }))),
109
+ onClick: e[2] || (e[2] = (t) => d("update:proxyUrl", null))
110
+ }, {
111
+ default: l(() => [
112
+ s("div", {
113
+ class: c([
114
+ "flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",
115
+ !o.activeProxyUrl && "bg-c-accent text-b-1 border-transparent"
116
+ ])
117
+ }, [
118
+ o.activeProxyUrl ? p("", !0) : (a(), u(r(k), {
119
+ key: 0,
120
+ icon: "Checkmark",
121
+ size: "xs",
122
+ thickness: "3.5"
123
+ }))
124
+ ], 2),
125
+ e[7] || (e[7] = i(" Skip the proxy ", -1))
126
+ ]),
127
+ _: 1
128
+ }, 8, ["class"])
129
+ ])
130
+ ]),
131
+ _: 1
132
+ }),
133
+ n(b, null, {
134
+ title: l(() => [...e[8] || (e[8] = [
135
+ i(" Themes ", -1)
136
+ ])]),
137
+ description: l(() => [...e[9] || (e[9] = [
138
+ i(" We've got a whole rainbow of themes for you to play with: ", -1)
139
+ ])]),
140
+ default: l(() => [
141
+ s("div", A, [
142
+ s("div", E, [
143
+ (a(), x(U, null, w(S, (t) => n(r(m), {
144
+ key: t,
145
+ class: c(
146
+ r(y)(
147
+ r(f)({
148
+ active: o.activeThemeId === t
149
+ })
150
+ )
151
+ ),
152
+ onClick: (j) => d("update:themeId", t)
153
+ }, {
154
+ default: l(() => [
155
+ s("div", F, [
156
+ s("div", {
157
+ class: c(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
158
+ "bg-c-accent text-b-1 border-transparent": o.activeThemeId === t
159
+ }])
160
+ }, [
161
+ o.activeThemeId === t ? (a(), u(r(k), {
162
+ key: 0,
163
+ icon: "Checkmark",
164
+ size: "xs",
165
+ thickness: "3.5"
166
+ })) : p("", !0)
167
+ ], 2),
168
+ i(" " + g(r(P)[t]), 1)
169
+ ]),
170
+ s("div", O, [
171
+ s("span", {
172
+ class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
173
+ style: h({
174
+ backgroundColor: r(C)(t).light
175
+ })
176
+ }, null, 4),
177
+ s("span", {
178
+ class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
179
+ style: h({
180
+ backgroundColor: r(C)(t).dark
181
+ })
182
+ }, null, 4),
183
+ s("span", {
184
+ class: "border-c-3 inline-block h-5 w-5 rounded-full",
185
+ style: h({
186
+ backgroundColor: r(C)(t).accent
187
+ })
188
+ }, null, 4)
189
+ ])
190
+ ]),
191
+ _: 2
192
+ }, 1032, ["class", "onClick"])), 64))
193
+ ])
194
+ ])
195
+ ]),
196
+ _: 1
197
+ }),
198
+ n(b, null, {
199
+ title: l(() => [...e[10] || (e[10] = [
200
+ i(" Framework Themes ", -1)
201
+ ])]),
202
+ description: l(() => [...e[11] || (e[11] = [
203
+ i(" Are you a real fan? Show your support by using your favorite framework's theme! ", -1)
204
+ ])]),
205
+ default: l(() => [
206
+ s("div", D, [
207
+ (a(), x(U, null, w(z, (t) => n(r(m), {
208
+ key: t,
209
+ class: c(
210
+ r(y)(
211
+ r(f)({
212
+ active: o.activeThemeId === t
213
+ })
214
+ )
215
+ ),
216
+ onClick: (j) => d("update:themeId", t)
217
+ }, {
218
+ default: l(() => [
219
+ s("div", W, [
220
+ s("div", {
221
+ class: c(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
222
+ "bg-c-accent text-b-1 border-transparent": o.activeThemeId === t
223
+ }])
224
+ }, [
225
+ o.activeThemeId === t ? (a(), u(r(k), {
226
+ key: 0,
227
+ icon: "Checkmark",
228
+ size: "xs",
229
+ thickness: "3.5"
230
+ })) : p("", !0)
231
+ ], 2),
232
+ i(" " + g(r(P)[t]), 1)
233
+ ]),
234
+ s("div", _, [
235
+ s("div", q, [
236
+ n(B, { integration: t }, null, 8, ["integration"])
237
+ ])
238
+ ])
239
+ ]),
240
+ _: 2
241
+ }, 1032, ["class", "onClick"])), 64))
242
+ ])
243
+ ]),
244
+ _: 1
245
+ }),
246
+ n(b, null, {
247
+ title: l(() => [...e[12] || (e[12] = [
248
+ i(" Appearance ", -1)
249
+ ])]),
250
+ description: l(() => [...e[13] || (e[13] = [
251
+ i(" Choose between light, dark, or system-based appearance for your workspace. ", -1)
252
+ ])]),
253
+ default: l(() => [
254
+ n(L, {
255
+ colorMode: o.colorMode,
256
+ "onUpdate:colorMode": e[3] || (e[3] = (t) => d("update:colorMode", t))
257
+ }, null, 8, ["colorMode"])
258
+ ]),
259
+ _: 1
260
+ })
261
+ ]));
262
+ }
263
+ });
264
+ export {
265
+ I as default
266
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CollectionSettings.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ /** Document source url if available */
3
+ documentUrl?: string;
4
+ /** Watch mode status if also document url is provided */
5
+ watchMode?: boolean;
6
+ /** Document title */
7
+ title: string;
8
+ /** Whether the document is a draft document */
9
+ isDraftDocument?: boolean;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ "delete:document": () => any;
13
+ "update:watchMode": (value: boolean) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onDelete:document"?: (() => any) | undefined;
16
+ "onUpdate:watchMode"?: ((value: boolean) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ export default _default;
19
+ //# sourceMappingURL=DocumentSettings.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/DocumentSettings.vue"],"names":[],"mappings":"AAmKA,KAAK,WAAW,GAAG;IACjB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;;;;;;;;AAgUF,wBAOG"}
@@ -0,0 +1,7 @@
1
+ import t from "./DocumentSettings.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-07248003"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,106 @@
1
+ import { defineComponent as w, createElementBlock as a, openBlock as d, Fragment as i, createElementVNode as e, createVNode as n, unref as o, createTextVNode as u, toDisplayString as x, withCtx as m } from "vue";
2
+ import { useModal as v, ScalarToggle as D, ScalarIcon as f, ScalarButton as y, ScalarModal as k } from "@scalar/components";
3
+ import M from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
4
+ const U = { class: "flex flex-col gap-12" }, C = { class: "flex flex-col gap-2" }, N = { class: "bg-b-2 rounded-lg border text-sm" }, S = { class: "bg-b-1 flex items-center justify-between gap-4 rounded-t-lg p-3" }, B = { class: "text-c-1 flex items-center overflow-x-auto border-t py-1.5 whitespace-nowrap" }, V = { class: "flex items-center" }, T = ["href"], A = { class: "flex flex-col gap-4" }, E = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, _ = /* @__PURE__ */ w({
5
+ __name: "DocumentSettings",
6
+ props: {
7
+ documentUrl: {},
8
+ watchMode: { type: Boolean },
9
+ title: {},
10
+ isDraftDocument: { type: Boolean, default: !1 }
11
+ },
12
+ emits: ["delete:document", "update:watchMode"],
13
+ setup(p, { emit: g }) {
14
+ const r = g, s = v(), b = () => {
15
+ p.isDraftDocument || s.show();
16
+ }, h = () => {
17
+ r("delete:document"), s.hide();
18
+ };
19
+ return (l, t) => (d(), a(i, null, [
20
+ e("div", U, [
21
+ e("div", C, [
22
+ t[5] || (t[5] = e("div", { class: "flex h-8 items-center" }, [
23
+ e("h3", { class: "font-bold" }, "Features")
24
+ ], -1)),
25
+ e("div", N, [
26
+ e("div", S, [
27
+ t[2] || (t[2] = e("div", null, [
28
+ e("h4", null, "Watch Mode"),
29
+ e("p", { class: "text-c-2 mt-1" }, " When enabled, the OpenAPI document will be polled for changes. The collection will be updated automatically. ")
30
+ ], -1)),
31
+ n(o(D), {
32
+ class: "w-4",
33
+ disabled: !l.documentUrl,
34
+ modelValue: l.watchMode ?? !1,
35
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => r("update:watchMode", c))
36
+ }, null, 8, ["disabled", "modelValue"])
37
+ ]),
38
+ e("div", B, [
39
+ e("div", V, [
40
+ l.documentUrl ? (d(), a(i, { key: 0 }, [
41
+ t[3] || (t[3] = e("span", { class: "bg-b-2 sticky left-0 pr-2 pl-3" }, "Source", -1)),
42
+ e("a", {
43
+ class: "text-c-2 group rounded pr-3 no-underline hover:underline",
44
+ href: l.documentUrl,
45
+ target: "_blank"
46
+ }, [
47
+ u(x(l.documentUrl) + " ", 1),
48
+ n(o(f), {
49
+ class: "ml-1 hidden w-2.5 group-hover:inline",
50
+ icon: "ExternalLink"
51
+ })
52
+ ], 8, T)
53
+ ], 64)) : (d(), a(i, { key: 1 }, [
54
+ n(o(f), {
55
+ class: "text-c-2 mr-2 ml-3 w-4",
56
+ icon: "NotAllowed",
57
+ size: "sm"
58
+ }),
59
+ t[4] || (t[4] = e("span", { class: "text-c-2 pr-3" }, " No URL configured. Try importing an OpenAPI document from an URL. ", -1))
60
+ ], 64))
61
+ ])
62
+ ])
63
+ ])
64
+ ]),
65
+ e("div", A, [
66
+ t[8] || (t[8] = e("h3", { class: "font-bold" }, "Danger Zone", -1)),
67
+ e("div", E, [
68
+ t[7] || (t[7] = e("div", null, [
69
+ e("h4", null, "Delete Collection"),
70
+ e("p", { class: "text-c-2 mt-1" }, " Be careful, my friend. Once deleted, there is no way to recover the collection. ")
71
+ ], -1)),
72
+ n(o(y), {
73
+ class: "custom-scroll h-8 gap-1.5 px-2.5 font-medium whitespace-nowrap shadow-none focus:outline-none",
74
+ variant: "danger",
75
+ disabled: l.isDraftDocument,
76
+ onClick: b
77
+ }, {
78
+ default: m(() => [...t[6] || (t[6] = [
79
+ u(" Delete Collection ", -1)
80
+ ])]),
81
+ _: 1
82
+ }, 8, ["disabled"])
83
+ ])
84
+ ])
85
+ ]),
86
+ n(o(k), {
87
+ size: "xxs",
88
+ state: o(s),
89
+ title: `Delete ${l.title}`
90
+ }, {
91
+ default: m(() => [
92
+ n(M, {
93
+ variableName: l.title ?? "",
94
+ warningMessage: "This action cannot be undone.",
95
+ onClose: t[1] || (t[1] = (c) => o(s).hide()),
96
+ onDelete: h
97
+ }, null, 8, ["variableName"])
98
+ ]),
99
+ _: 1
100
+ }, 8, ["state", "title"])
101
+ ], 64));
102
+ }
103
+ });
104
+ export {
105
+ _ as default
106
+ };
@@ -1,2 +1,3 @@
1
- export { default as Settings } from './Settings.vue.js';
1
+ export { default as CollectionSettings } from './CollectionSettings.vue.js';
2
+ export { default as DocumentSettings } from './DocumentSettings.vue.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,4 +1,6 @@
1
- import { default as a } from "./Settings.vue.js";
1
+ import { default as o } from "./CollectionSettings.vue.js";
2
+ import { default as f } from "./DocumentSettings.vue.js";
2
3
  export {
3
- a as Settings
4
+ o as CollectionSettings,
5
+ f as DocumentSettings
4
6
  };
@@ -0,0 +1,17 @@
1
+ import type { DraggingItem, HoveredItem } from '@scalar/draggable';
2
+ import { type SidebarState } from '@scalar/sidebar';
3
+ import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
+ import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
5
+ import { type MaybeRefOrGetter } from 'vue';
6
+ /**
7
+ * Factory function that creates drag and drop handlers for sidebar items.
8
+ * Handles reordering and moving of documents, tags, and operations.
9
+ */
10
+ export declare const dragHandleFactory: ({ store: _store, sidebarState, }: {
11
+ store: MaybeRefOrGetter<WorkspaceStore | null>;
12
+ sidebarState: SidebarState<TraversedEntry>;
13
+ }) => {
14
+ handleDragEnd: (_draggingItem: DraggingItem, _hoveredItem: HoveredItem) => boolean;
15
+ isDroppable: (_draggingItem: DraggingItem, _hoveredItem: HoveredItem) => boolean;
16
+ };
17
+ //# sourceMappingURL=drag-handle-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag-handle-factory.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/drag-handle-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGlE,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,iBAAiB,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAIpE,OAAO,KAAK,EAEV,cAAc,EAGf,MAAM,4CAA4C,CAAA;AAInD,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,KAAK,CAAA;AA6XpD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,kCAG/B;IACD,KAAK,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC9C,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAC3C;mCAKuC,YAAY,gBAAgB,WAAW,KAAG,OAAO;iCA2DnD,YAAY,gBAAgB,WAAW,KAAG,OAAO;CAwEtF,CAAA"}
@@ -0,0 +1,135 @@
1
+ import { dereference as F } from "@scalar/openapi-parser";
2
+ import { getParentEntry as i } from "@scalar/sidebar";
3
+ import { getResolvedRef as b } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import { unpackProxyObject as x } from "@scalar/workspace-store/helpers/unpack-proxy";
5
+ import { toValue as w } from "vue";
6
+ const l = {
7
+ /** Insert before the hovered item */
8
+ BEFORE: 0,
9
+ /** Insert after the hovered item */
10
+ AFTER: 1,
11
+ /** Drop into the hovered item */
12
+ INTO: 2
13
+ }, B = (n, t, e, o) => {
14
+ if (t === -1 || e === -1 || t === e)
15
+ return null;
16
+ const c = [...n], [s] = c.splice(t, 1);
17
+ if (s === void 0)
18
+ return null;
19
+ const u = A(t, e, o, c.length);
20
+ return c.splice(u, 0, s), x(c, { depth: 1 });
21
+ }, A = (n, t, e, o) => {
22
+ const c = n < t;
23
+ return e === l.AFTER ? c ? t : t + 1 : e === l.BEFORE ? c ? t - 1 : t : e === l.INTO ? o : t;
24
+ }, h = (n, t) => t.includes(n.type), p = (n) => n.offset < l.INTO, E = (n) => n.offset === l.INTO, y = (n, t) => !n.parent || !t.parent ? !1 : n.parent.id === t.parent.id, m = ({
25
+ store: n,
26
+ entry: t
27
+ }) => {
28
+ const e = i("document", t);
29
+ if (!e)
30
+ return null;
31
+ const o = n.workspace.documents[e.name];
32
+ return o ? t.type === "document" ? o : t.type === "tag" ? o.tags?.find((c) => c.name === t.name) ?? null : t.type === "operation" ? b(o.paths?.[t.path]?.[t.method]) ?? null : null : null;
33
+ }, O = ({ store: n, entry: t }) => {
34
+ const e = i("document", t);
35
+ e && n.buildSidebar(e.name);
36
+ }, P = (n, t) => n["x-scalar-order"] ?? t.children?.map((o) => o.id) ?? [], T = (n, t, e, o) => {
37
+ const c = t.parent;
38
+ if (!c || !h(c, ["tag", "document"]))
39
+ return !1;
40
+ const s = m({ store: n, entry: c });
41
+ if (!s)
42
+ return !1;
43
+ const u = P(s, c), r = u.findIndex((d) => d === t.id), a = u.findIndex((d) => d === e.id), f = B(u, r, a, o);
44
+ return f ? (s["x-scalar-order"] = f, O({ store: n, entry: c }), !0) : !1;
45
+ }, k = (n, t, e) => {
46
+ const o = new Set(n.tags ?? []);
47
+ e && o.add(e.name), t && o.delete(t.name), n.tags = Array.from(o);
48
+ }, N = (n, t, e, o) => {
49
+ n.paths?.[e.path]?.[e.method] && delete n.paths[e.path][e.method], t.paths ? (t.paths[e.path] || (t.paths[e.path] = {}), t.paths[e.path][e.method] = o) : t.paths = {
50
+ [e.path]: {
51
+ [e.method]: o
52
+ }
53
+ };
54
+ }, j = (n, t, e) => {
55
+ const { schema: o } = F(n);
56
+ return o.paths?.[t]?.[e];
57
+ }, M = (n, t, e) => {
58
+ const o = i("document", t), c = i("document", e);
59
+ if (!o || !c)
60
+ return !1;
61
+ const s = m({ store: n, entry: o }), u = m({ store: n, entry: c });
62
+ if (!s || !u)
63
+ return !1;
64
+ const r = j(
65
+ x(s),
66
+ t.path,
67
+ t.method
68
+ );
69
+ if (!r)
70
+ return !1;
71
+ const a = i("tag", t) ?? null, f = i("tag", e) ?? null;
72
+ return k(r, a, f), N(s, u, t, r), O({ store: n, entry: t }), O({ store: n, entry: e }), !0;
73
+ }, S = (n, t, e, o) => {
74
+ const c = n.workspace["x-scalar-order"] ?? Object.keys(n.workspace.documents), s = c.findIndex((a) => a === t.id), u = c.findIndex((a) => a === e.id), r = B(c, s, u, o);
75
+ return r ? (n.update("x-scalar-order", r), !0) : !1;
76
+ }, z = ({
77
+ store: n,
78
+ sidebarState: t
79
+ }) => ({
80
+ handleDragEnd: (c, s) => {
81
+ const u = w(n);
82
+ if (!u)
83
+ return !1;
84
+ const r = t.getEntryById(c.id), a = t.getEntryById(s.id);
85
+ if (!r || !a)
86
+ return !1;
87
+ if (r.type === "document")
88
+ return a.type !== "document" || !p(s) ? !1 : S(u, r, a, s.offset);
89
+ if (r.type === "tag")
90
+ return a.type !== "tag" || !p(s) || !y(r, a) ? !1 : T(
91
+ u,
92
+ r,
93
+ a,
94
+ s.offset
95
+ );
96
+ if (r.type === "operation") {
97
+ if (p(s) && y(r, a))
98
+ return T(
99
+ u,
100
+ r,
101
+ a,
102
+ s.offset
103
+ );
104
+ if (h(a, ["tag", "document"]) && E(s))
105
+ return M(u, r, a);
106
+ }
107
+ return !1;
108
+ },
109
+ isDroppable: (c, s) => {
110
+ const u = w(n);
111
+ if (!u)
112
+ return !1;
113
+ const r = t.getEntryById(c.id), a = t.getEntryById(s.id);
114
+ if (!r || !a || r.type === "example")
115
+ return !1;
116
+ if (r.type === "document")
117
+ return a.type === "document" && p(s);
118
+ if (r.type === "tag")
119
+ return p(s) && y(r, a);
120
+ if (r.type === "operation") {
121
+ const f = i("document", a), d = i("document", r);
122
+ if (!f || !d)
123
+ return !1;
124
+ const D = m({ store: u, entry: f });
125
+ if (!D)
126
+ return !1;
127
+ const R = y(r, a);
128
+ return p(s) && !R ? !1 : R ? p(s) || E(s) && h(a, ["tag", "document"]) : E(s) && h(a, ["tag", "document"]) && (d.id === f.id || D.paths?.[r.path]?.[r.method] === void 0);
129
+ }
130
+ return !1;
131
+ }
132
+ });
133
+ export {
134
+ z as dragHandleFactory
135
+ };
@@ -0,0 +1,23 @@
1
+ import type { ApiReferenceEvents, WorkspaceEventBus } from '@scalar/workspace-store/events';
2
+ import type { ClientLayout } from '../../v2/types/layout';
3
+ type HotKeyModifiers = ('altKey' | 'ctrlKey' | 'shiftKey' | 'metaKey' | 'default')[];
4
+ /** Hotkey configuration */
5
+ export type HotKeyConfig = Record<string | number, {
6
+ event: keyof ApiReferenceEvents;
7
+ modifiers: HotKeyModifiers;
8
+ }>;
9
+ /** Default hotkeys available in most contexts */
10
+ export declare const DEFAULT_HOTKEYS: HotKeyConfig;
11
+ /** Hotkey map by layout, we can allow the user to override this later */
12
+ export declare const HOTKEYS: Record<ClientLayout, HotKeyConfig>;
13
+ /**
14
+ * Handles global keyboard shortcuts.
15
+ * Checks modifier keys and input context before emitting events.
16
+ *
17
+ * @param event - the keyboard event
18
+ * @param eventBus - event bus for emitting hotkey actions
19
+ * @param layout - client layout
20
+ */
21
+ export declare const handleHotkeys: (event: KeyboardEvent, eventBus: WorkspaceEventBus, layout: ClientLayout) => void;
22
+ export {};
23
+ //# sourceMappingURL=handle-hotkeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-hotkeys.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/handle-hotkeys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAE3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,eAAe,GAAG,CAAC,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC,EAAE,CAAA;AAEpF,2BAA2B;AAC3B,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;IAAC,SAAS,EAAE,eAAe,CAAA;CAAE,CAAC,CAAA;AAEnH,iDAAiD;AACjD,eAAO,MAAM,eAAe,EAAE,YAK7B,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,YAAY,CA2BtD,CAAA;AAkCD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,aAAa,EAAE,UAAU,iBAAiB,EAAE,QAAQ,YAAY,KAAG,IA6BvG,CAAA"}