@scalar/api-client 2.12.0 → 2.13.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 (178) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -2
  5. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandActionForm.vue.js +14 -14
  7. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +38 -38
  8. package/dist/components/EmptyState.vue.d.ts.map +1 -1
  9. package/dist/components/EmptyState.vue.js +2 -2
  10. package/dist/components/EmptyState.vue2.js +27 -16
  11. package/dist/components/TopNav/TopNav.vue.js +33 -33
  12. package/dist/layouts/App/create-api-client-app.d.ts +28 -28
  13. package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
  14. package/dist/libs/create-client.d.ts +28 -28
  15. package/dist/libs/hot-keys.d.ts +2 -2
  16. package/dist/libs/send-request/create-fetch-body.d.ts +2 -2
  17. package/dist/store/active-entities.d.ts +2 -2
  18. package/dist/store/collections.d.ts +4 -4
  19. package/dist/store/index.d.ts +1 -1
  20. package/dist/store/index.d.ts.map +1 -1
  21. package/dist/store/index.js +8 -8
  22. package/dist/store/request-example.d.ts +12 -12
  23. package/dist/store/store.d.ts +28 -28
  24. package/dist/store/workspace.d.ts +12 -12
  25. package/dist/style.css +1 -1
  26. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
  27. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  28. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +9 -8
  29. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
  30. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
  32. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  33. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  35. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +14 -11
  36. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +22 -22
  37. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
  38. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
  40. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +18 -15
  41. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
  42. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +17 -17
  43. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  45. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +17 -12
  46. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +205 -0
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +52 -52
  50. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  52. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +205 -0
  53. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  55. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -2
  56. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  57. package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
  58. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  59. package/dist/v2/features/app/App.vue.js +126 -103
  60. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -2
  61. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  62. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  63. package/dist/v2/features/app/components/AppSidebar.vue2.js +56 -53
  64. package/dist/v2/features/app/components/DesktopTab.vue.d.ts +26 -0
  65. package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -0
  66. package/dist/v2/features/app/components/DesktopTab.vue.js +7 -0
  67. package/dist/v2/features/app/components/DesktopTab.vue2.js +134 -0
  68. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +9 -4
  69. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  70. package/dist/v2/features/app/components/DesktopTabs.vue.js +47 -13
  71. package/dist/v2/features/app/components/DesktopTabs.vue2.js +2 -4
  72. package/dist/v2/features/app/components/SplashScreen.vue.js +2 -2
  73. package/dist/v2/features/app/components/SplashScreen.vue2.js +2 -2
  74. package/dist/v2/features/app/helpers/routes.js +1 -1
  75. package/dist/v2/features/collection/components/Settings.vue2.js +3 -3
  76. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +61 -0
  77. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -0
  78. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +48 -0
  79. package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +4 -0
  80. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +39 -0
  81. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts.map +1 -0
  82. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +52 -0
  83. package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +4 -0
  84. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts +36 -0
  85. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +1 -0
  86. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.js +78 -0
  87. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +4 -0
  88. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +30 -0
  89. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -0
  90. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +169 -0
  91. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +4 -0
  92. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +34 -0
  93. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -0
  94. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +175 -0
  95. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +4 -0
  96. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +43 -0
  97. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -0
  98. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +7 -0
  99. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +115 -0
  100. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +39 -0
  101. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -0
  102. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +213 -0
  103. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +4 -0
  104. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +38 -0
  105. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -0
  106. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +89 -0
  107. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +4 -0
  108. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts +41 -0
  109. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -0
  110. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +7 -0
  111. package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +172 -0
  112. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +33 -0
  113. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -0
  114. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +40 -0
  115. package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +4 -0
  116. package/dist/v2/features/command-palette/components/index.d.ts +2 -0
  117. package/dist/v2/features/command-palette/components/index.d.ts.map +1 -0
  118. package/dist/v2/features/command-palette/components/index.js +4 -0
  119. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +23 -0
  120. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -0
  121. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +31 -0
  122. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +13 -0
  123. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -0
  124. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +12 -0
  125. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +26 -0
  126. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -0
  127. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +70 -0
  128. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +23 -0
  129. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -0
  130. package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +18 -0
  131. package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts +11 -0
  132. package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts.map +1 -0
  133. package/dist/v2/features/command-palette/helpers/is-postman-collection.js +11 -0
  134. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +202 -0
  135. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -0
  136. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +109 -0
  137. package/dist/v2/features/command-palette/types.d.ts +82 -0
  138. package/dist/v2/features/command-palette/types.d.ts.map +1 -0
  139. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  140. package/dist/v2/features/operation/Operation.vue.js +24 -20
  141. package/dist/v2/helpers/drag-handle-factory.d.ts +1 -2
  142. package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
  143. package/dist/v2/helpers/drag-handle-factory.js +74 -90
  144. package/dist/v2/helpers/get-tab-details.d.ts +43 -0
  145. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -0
  146. package/dist/v2/helpers/get-tab-details.js +34 -0
  147. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  148. package/dist/v2/helpers/is-url.d.ts +2 -0
  149. package/dist/v2/helpers/is-url.d.ts.map +1 -0
  150. package/dist/v2/helpers/is-url.js +5 -0
  151. package/dist/v2/helpers/remove-circular.d.ts +15 -0
  152. package/dist/v2/helpers/remove-circular.d.ts.map +1 -0
  153. package/dist/v2/helpers/remove-circular.js +18 -0
  154. package/dist/v2/helpers/storage.d.ts +4 -6
  155. package/dist/v2/helpers/storage.d.ts.map +1 -1
  156. package/dist/v2/helpers/storage.js +8 -12
  157. package/dist/v2/hooks/use-sidebar-state.d.ts +12 -19
  158. package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
  159. package/dist/v2/hooks/use-sidebar-state.js +20 -18
  160. package/dist/v2/hooks/use-sync-path.d.ts +11 -0
  161. package/dist/v2/hooks/use-sync-path.d.ts.map +1 -0
  162. package/dist/v2/hooks/use-sync-path.js +51 -0
  163. package/dist/v2/hooks/use-tabs.d.ts +31 -0
  164. package/dist/v2/hooks/use-tabs.d.ts.map +1 -0
  165. package/dist/v2/hooks/use-tabs.js +44 -0
  166. package/dist/v2/hooks/use-workspace-client-events.d.ts +5 -2
  167. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  168. package/dist/v2/hooks/use-workspace-client-events.js +91 -36
  169. package/dist/v2/hooks/use-workspace-selector.d.ts +16 -6
  170. package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -1
  171. package/dist/v2/hooks/use-workspace-selector.js +58 -64
  172. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  173. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +78 -78
  174. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +29 -29
  175. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  176. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
  177. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +19 -19
  178. package/package.json +136 -46
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#7431](https://github.com/scalar/scalar/pull/7431) [`61c980c`](https://github.com/scalar/scalar/commit/61c980cebef219685a05f3a4cb1e379984922cd4) Thanks [@DemonHa](https://github.com/DemonHa)! - feat: implememnt command palette
8
+
9
+ - [#7455](https://github.com/scalar/scalar/pull/7455) [`1bc2b45`](https://github.com/scalar/scalar/commit/1bc2b45b6eabd5c5045e77d67f59d202ab04d3fb) Thanks [@DemonHa](https://github.com/DemonHa)! - feat: tabs support on the store
10
+
11
+ - [#7463](https://github.com/scalar/scalar/pull/7463) [`1eafcbe`](https://github.com/scalar/scalar/commit/1eafcbeeaad3e611b9c8f365ce2961772b8e9494) Thanks [@DemonHa](https://github.com/DemonHa)! - feat: rebuild the sidebar when a new example is created
12
+
13
+ ### Patch Changes
14
+
15
+ - [#7465](https://github.com/scalar/scalar/pull/7465) [`9342adc`](https://github.com/scalar/scalar/commit/9342adcd76e26a8e5eff75c1a2abee2c207b1487) Thanks [@marcalexiei](https://github.com/marcalexiei)! - fix: ensure `@scalar/workspace-store` consumers rely only on public exports
16
+
17
+ - [#7460](https://github.com/scalar/scalar/pull/7460) [`62b5210`](https://github.com/scalar/scalar/commit/62b521092bafeb8e83e79222e13378c4a19defc8) Thanks [@hwkr](https://github.com/hwkr)! - feat(components): update and polish ScalarLoading
18
+
19
+ - [#7387](https://github.com/scalar/scalar/pull/7387) [`bfd814a`](https://github.com/scalar/scalar/commit/bfd814a4219660face190041cc4845182b56ab03) Thanks [@geoffgscott](https://github.com/geoffgscott)! - hotfix: patch exports from build tooling bug
20
+
21
+ - [#7416](https://github.com/scalar/scalar/pull/7416) [`86f028d`](https://github.com/scalar/scalar/commit/86f028deb0b456f923edd261f5f4b0fa9b616b7d) Thanks [@amritk](https://github.com/amritk)! - feat: add update method to client v2
22
+
23
+ - Updated dependencies [[`5aa0380`](https://github.com/scalar/scalar/commit/5aa0380adfcd173e58659fb5dd57df363d985583), [`61c980c`](https://github.com/scalar/scalar/commit/61c980cebef219685a05f3a4cb1e379984922cd4), [`1bc2b45`](https://github.com/scalar/scalar/commit/1bc2b45b6eabd5c5045e77d67f59d202ab04d3fb), [`9342adc`](https://github.com/scalar/scalar/commit/9342adcd76e26a8e5eff75c1a2abee2c207b1487), [`fa361d2`](https://github.com/scalar/scalar/commit/fa361d2799e358d582fbb224a7b93d5b6e832c0e), [`62b5210`](https://github.com/scalar/scalar/commit/62b521092bafeb8e83e79222e13378c4a19defc8), [`e04879c`](https://github.com/scalar/scalar/commit/e04879c65602dfb65393876754f5344751b8953d), [`a164d76`](https://github.com/scalar/scalar/commit/a164d76f21437b3a35210d62a996b6c9d483e5a4), [`dd8e9dc`](https://github.com/scalar/scalar/commit/dd8e9dc118d3ae98180e2a93bd6ba11e982abbf8), [`ea13cd2`](https://github.com/scalar/scalar/commit/ea13cd2a44ff1ba7f19abcfcad1e51c9e7a0b75d), [`bfd814a`](https://github.com/scalar/scalar/commit/bfd814a4219660face190041cc4845182b56ab03), [`ea13cd2`](https://github.com/scalar/scalar/commit/ea13cd2a44ff1ba7f19abcfcad1e51c9e7a0b75d), [`612eb05`](https://github.com/scalar/scalar/commit/612eb05f61ad97272206f1b7ff85a725131ca917), [`35af6bf`](https://github.com/scalar/scalar/commit/35af6bfce4bc4ae3d0fc5783ea36e0165e964361), [`86f028d`](https://github.com/scalar/scalar/commit/86f028deb0b456f923edd261f5f4b0fa9b616b7d), [`294f9fc`](https://github.com/scalar/scalar/commit/294f9fc6cfd43cdab110deb1c851883509bc2b84), [`af54a80`](https://github.com/scalar/scalar/commit/af54a80349269a4269a68f6a372f837177a3537c)]:
24
+ - @scalar/components@0.16.5
25
+ - @scalar/sidebar@0.5.0
26
+ - @scalar/workspace-store@0.22.0
27
+ - @scalar/snippetz@0.5.4
28
+ - @scalar/json-magic@0.8.3
29
+ - @scalar/openapi-types@0.5.2
30
+ - @scalar/use-toasts@0.9.1
31
+ - @scalar/helpers@0.1.3
32
+ - @scalar/types@0.5.1
33
+ - @scalar/import@0.4.36
34
+ - @scalar/themes@0.13.25
35
+ - @scalar/use-codemirror@0.12.49
36
+ - @scalar/oas-utils@0.6.5
37
+ - @scalar/analytics-client@1.0.0
38
+ - @scalar/draggable@0.3.0
39
+ - @scalar/icons@0.5.0
40
+ - @scalar/object-utils@1.2.13
41
+ - @scalar/openapi-parser@0.23.4
42
+ - @scalar/postman-to-openapi@0.3.46
43
+ - @scalar/use-hooks@0.3.1
44
+
3
45
  ## 2.12.0
4
46
 
5
47
  ### Minor Changes
@@ -76,8 +76,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
76
76
  onBlur?: ((v: string) => any) | undefined;
77
77
  onCurl?: ((v: string) => any) | undefined;
78
78
  }>, {
79
- nullable: boolean;
80
79
  disabled: boolean;
80
+ nullable: boolean;
81
81
  colorPicker: boolean;
82
82
  emitOnBlur: boolean;
83
83
  extensions: Extension[];
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA2eA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;;kBAUxC,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;IAiMxB,0BAA0B;;0BArJC,MAAM;0BA0BN,MAAM;wBAOR,MAAM;;;;;;;;;;kBAtGf,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;;;;;;cANX,OAAO;cAlBP,OAAO;iBADJ,OAAO;gBAIR,OAAO;gBACP,SAAS,EAAE;sBAGL,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAKd,OAAO;kBAKR,OAAO;;cAkhBZ,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AA9iB1C,wBAmmBC;AAYD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA2eA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;;kBAUxC,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;IAiMxB,0BAA0B;;0BArJC,MAAM;0BA0BN,MAAM;wBAOR,MAAM;;;;;;;;;;kBAtGf,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;;;;;;cAxBX,OAAO;cAkBP,OAAO;iBAnBJ,OAAO;gBAIR,OAAO;gBACP,SAAS,EAAE;sBAGL,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAKd,OAAO;kBAKR,OAAO;;cAkhBZ,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AA9iB1C,wBAmmBC;AAYD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
- import { type useLoadingState } from '@scalar/components';
1
+ import { type LoadingState } from '@scalar/components';
2
2
  type __VLS_Props = {
3
- loading?: ReturnType<typeof useLoadingState>;
3
+ loader?: LoadingState;
4
4
  disabled?: boolean;
5
5
  };
6
6
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_9: {};
@@ -1 +1 @@
1
- {"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AA4CA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAA;AAE3B,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAwEF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,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,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAsB9C,QAAA,MAAM,eAAe;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AAwCA,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAE/E,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAwEF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,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,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAsB9C,QAAA,MAAM,eAAe;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,31 +1,31 @@
1
- import { defineComponent as d, createElementBlock as a, openBlock as r, withModifiers as l, withKeys as m, createElementVNode as t, normalizeProps as p, guardReactiveProps as f, unref as i, renderSlot as s, createVNode as u, withCtx as b, createTextVNode as x } from "vue";
2
- import { useBindCx as c, ScalarButton as g } from "@scalar/components";
3
- const v = { class: "flex gap-2" }, w = { class: "flex max-h-8 flex-1" }, h = /* @__PURE__ */ d({
1
+ import { defineComponent as i, createElementBlock as n, openBlock as r, withModifiers as l, withKeys as m, createElementVNode as t, normalizeProps as p, guardReactiveProps as f, unref as d, renderSlot as s, createVNode as u, withCtx as b, createTextVNode as x } from "vue";
2
+ import { useBindCx as c, ScalarButton as v } from "@scalar/components";
3
+ const w = { class: "flex gap-2" }, B = { class: "flex max-h-8 flex-1" }, h = /* @__PURE__ */ i({
4
4
  __name: "CommandActionForm",
5
5
  props: {
6
- loading: {},
6
+ loader: {},
7
7
  disabled: { type: Boolean, default: !1 }
8
8
  },
9
9
  emits: ["submit", "cancel", "back"],
10
- setup(B) {
11
- const { cx: n } = c();
12
- return (e, o) => (r(), a("form", {
10
+ setup(C) {
11
+ const { cx: a } = c();
12
+ return (e, o) => (r(), n("form", {
13
13
  class: "flex w-full flex-col gap-3",
14
14
  onKeydown: o[0] || (o[0] = m(l(() => {
15
15
  }, ["stop"]), ["enter"])),
16
- onSubmit: o[1] || (o[1] = l((C) => !e.disabled && e.$emit("submit"), ["prevent", "stop"]))
16
+ onSubmit: o[1] || (o[1] = l(($) => !e.disabled && e.$emit("submit"), ["prevent", "stop"]))
17
17
  }, [
18
- t("div", p(f(i(n)("relative flex min-h-20 flex-col rounded"))), [
18
+ t("div", p(f(d(a)("relative flex min-h-20 flex-col rounded"))), [
19
19
  s(e.$slots, "default")
20
20
  ], 16),
21
- t("div", v, [
22
- t("div", w, [
21
+ t("div", w, [
22
+ t("div", B, [
23
23
  s(e.$slots, "options")
24
24
  ]),
25
- u(i(g), {
25
+ u(d(v), {
26
26
  class: "max-h-8 px-3 text-xs",
27
27
  disabled: e.disabled,
28
- loading: e.loading,
28
+ loader: e.loader,
29
29
  type: "submit"
30
30
  }, {
31
31
  default: b(() => [
@@ -34,7 +34,7 @@ const v = { class: "flex gap-2" }, w = { class: "flex max-h-8 flex-1" }, h = /*
34
34
  ])
35
35
  ]),
36
36
  _: 3
37
- }, 8, ["disabled", "loading"])
37
+ }, 8, ["disabled", "loader"])
38
38
  ])
39
39
  ], 32));
40
40
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent as J, ref as L, computed as x, watch as A, createBlock as I, openBlock as l, unref as r, withCtx as p, createElementBlock as d, Fragment as v, createElementVNode as U, createCommentVNode as Y, createVNode as w, createTextVNode as c, toDisplayString as R } from "vue";
1
+ import { defineComponent as J, ref as A, computed as x, watch as L, createBlock as I, openBlock as l, unref as r, withCtx as p, createElementBlock as d, Fragment as v, createElementVNode as U, createCommentVNode as Y, createVNode as g, createTextVNode as u, toDisplayString as R } from "vue";
2
2
  import { useLoadingState as q, ScalarButton as D, ScalarCodeBlock as G, ScalarIcon as H, ScalarTooltip as K } from "@scalar/components";
3
3
  import { useToasts as Q } from "@scalar/use-toasts";
4
4
  import { useRouter as X } from "vue-router";
@@ -13,14 +13,14 @@ import { getOpenApiDocumentDetails as re } from "../../libs/getOpenApiDocumentDe
13
13
  import { isUrl as h } from "../../libs/isUrl.js";
14
14
  import { useFileDialog as ne } from "../../hooks/useFileDialog.js";
15
15
  import { useWorkspace as ie } from "../../store/store.js";
16
- const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-row items-center justify-between gap-3" }, Pe = /* @__PURE__ */ J({
16
+ const se = { class: "flex justify-between" }, ce = { class: "flex w-full flex-row items-center justify-between gap-3" }, Pe = /* @__PURE__ */ J({
17
17
  __name: "CommandPaletteImport",
18
18
  emits: ["close", "back"],
19
- setup(ce, { emit: T }) {
20
- const C = T, _ = X(), { activeWorkspace: n, activeCollection: F } = ee(), { importSpecFile: k, importSpecFromUrl: W, events: N } = ie(), { toast: i } = Q(), s = q(), o = L(""), f = L(!0), a = x(() => P(o.value) ? le(o.value) : re(o.value)), S = x(
19
+ setup(ue, { emit: T }) {
20
+ const C = T, _ = X(), { activeWorkspace: n, activeCollection: F } = ee(), { importSpecFile: k, importSpecFromUrl: W, events: N } = ie(), { toast: i } = Q(), s = q(), o = A(""), f = A(!0), a = x(() => P(o.value) ? le(o.value) : re(o.value)), S = x(
21
21
  () => a.value ? a.value.type : "json"
22
22
  );
23
- function g(e) {
23
+ function w(e) {
24
24
  e && _.push({
25
25
  name: "collection",
26
26
  params: {
@@ -33,8 +33,8 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
33
33
  onChange: (e) => {
34
34
  const t = e?.[0];
35
35
  if (t) {
36
- const u = new FileReader();
37
- u.onload = async (E) => {
36
+ const c = new FileReader();
37
+ c.onload = async (E) => {
38
38
  const b = E.target?.result;
39
39
  try {
40
40
  if (P(b)) {
@@ -42,13 +42,13 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
42
42
  V(b),
43
43
  n.value?.uid ?? ""
44
44
  );
45
- g(m?.collection);
45
+ w(m?.collection);
46
46
  } else {
47
47
  const m = await k(
48
48
  b,
49
49
  n.value?.uid ?? ""
50
50
  );
51
- g(m?.collection);
51
+ w(m?.collection);
52
52
  }
53
53
  i("Import successful", "info"), C("close");
54
54
  } catch (m) {
@@ -56,20 +56,20 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
56
56
  const z = m?.message || "Unknown error";
57
57
  i(`Import failed: ${z}`, "error");
58
58
  }
59
- }, u.readAsText(t);
59
+ }, c.readAsText(t);
60
60
  }
61
61
  },
62
62
  multiple: !1,
63
63
  accept: ".json,.yaml,.yml"
64
64
  });
65
- A(y, (e) => {
65
+ L(y, (e) => {
66
66
  e || (f.value = !1);
67
- }), A(o, (e) => {
67
+ }), L(o, (e) => {
68
68
  h(e) || (f.value = !1);
69
69
  });
70
70
  async function M() {
71
71
  if (!(!o.value || s.isLoading)) {
72
- s.startLoading();
72
+ s.start();
73
73
  try {
74
74
  if (y.value) {
75
75
  const [e, t] = await W(
@@ -80,12 +80,12 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
80
80
  watchMode: f.value
81
81
  }
82
82
  );
83
- if (g(t?.collection), e) {
83
+ if (w(t?.collection), e) {
84
84
  i(
85
85
  "There was a possible CORS error while importing your spec, please make sure this server is allowed in the CORS policy of your OpenAPI document.",
86
86
  "error",
87
87
  { timeout: 5e3 }
88
- ), s.invalidate(2e3, !0);
88
+ ), await s.invalidate();
89
89
  return;
90
90
  }
91
91
  } else if ($.value)
@@ -94,23 +94,23 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
94
94
  V(o.value),
95
95
  n.value?.uid ?? ""
96
96
  );
97
- g(e?.collection), i("Successfully converted Postman collection", "info");
97
+ w(e?.collection), i("Successfully converted Postman collection", "info");
98
98
  } else {
99
99
  const e = await k(
100
100
  o.value,
101
101
  n.value?.uid ?? ""
102
102
  );
103
- g(e?.collection);
103
+ w(e?.collection);
104
104
  }
105
105
  else {
106
- i("Import failed: Invalid URL or OpenAPI document", "error"), s.invalidate(2e3, !0);
106
+ i("Import failed: Invalid URL or OpenAPI document", "error"), await s.invalidate();
107
107
  return;
108
108
  }
109
- s.clear(), C("close"), i("Import successful", "info");
109
+ await s.clear(), C("close"), i("Import successful", "info");
110
110
  } catch (e) {
111
111
  console.error("[importCollection]", e);
112
112
  const t = e?.message || "Unknown error";
113
- s.invalidate(2e3, !0), i(`Import failed: ${t}`, "error");
113
+ await s.invalidate(), i(`Import failed: ${t}`, "error");
114
114
  }
115
115
  }
116
116
  }
@@ -129,19 +129,19 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
129
129
  };
130
130
  return (e, t) => (l(), I(te, {
131
131
  disabled: !o.value.trim(),
132
- loading: r(s),
132
+ loader: r(s),
133
133
  onSubmit: M
134
134
  }, {
135
135
  options: p(() => [
136
- U("div", ue, [
137
- w(r(D), {
136
+ U("div", ce, [
137
+ g(r(D), {
138
138
  class: "hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs",
139
139
  variant: "outlined",
140
140
  onClick: r(B)
141
141
  }, {
142
142
  default: p(() => [
143
- t[5] || (t[5] = c(" JSON, or YAML File ", -1)),
144
- w(r(H), {
143
+ t[5] || (t[5] = u(" JSON, or YAML File ", -1)),
144
+ g(r(H), {
145
145
  class: "text-c-3",
146
146
  icon: "Upload",
147
147
  size: "md"
@@ -149,14 +149,14 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
149
149
  ]),
150
150
  _: 1
151
151
  }, 8, ["onClick"]),
152
- w(r(K), {
152
+ g(r(K), {
153
153
  content: y.value ? "Watch mode automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date." : "Watch mode is only available for URL imports. When enabled it automatically updates the API client when the OpenAPI URL content changes.",
154
154
  placement: "bottom"
155
155
  }, {
156
156
  default: p(() => [
157
- w(ae, {
157
+ g(ae, {
158
158
  modelValue: f.value,
159
- "onUpdate:modelValue": t[2] || (t[2] = (u) => f.value = u),
159
+ "onUpdate:modelValue": t[2] || (t[2] = (c) => f.value = c),
160
160
  disabled: !y.value
161
161
  }, null, 8, ["modelValue", "disabled"])
162
162
  ]),
@@ -165,17 +165,17 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
165
165
  ])
166
166
  ]),
167
167
  submit: p(() => [
168
- t[6] || (t[6] = c(" Import ", -1)),
168
+ t[6] || (t[6] = u(" Import ", -1)),
169
169
  y.value ? (l(), d(v, { key: 0 }, [
170
- c(" from URL ")
170
+ u(" from URL ")
171
171
  ], 64)) : a.value && S.value ? (l(), d(v, { key: 1 }, [
172
172
  a.value.title ? (l(), d(v, { key: 0 }, [
173
- c(' "' + R(a.value.title) + '" ', 1)
173
+ u(' "' + R(a.value.title) + '" ', 1)
174
174
  ], 64)) : (l(), d(v, { key: 1 }, [
175
- c(R(a.value.version), 1)
175
+ u(R(a.value.version), 1)
176
176
  ], 64))
177
177
  ], 64)) : (l(), d(v, { key: 2 }, [
178
- c(" Collection ")
178
+ u(" Collection ")
179
179
  ], 64))
180
180
  ]),
181
181
  default: p(() => [
@@ -183,18 +183,18 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
183
183
  key: 0,
184
184
  modelValue: o.value,
185
185
  placeholder: "OpenAPI/Swagger/Postman URL or cURL",
186
- onOnDelete: t[0] || (t[0] = (u) => C("back", u)),
186
+ onOnDelete: t[0] || (t[0] = (c) => C("back", c)),
187
187
  "onUpdate:modelValue": j
188
188
  }, null, 8, ["modelValue"])) : (l(), d(v, { key: 1 }, [
189
189
  U("div", se, [
190
190
  t[4] || (t[4] = U("div", { class: "text-c-2 min-h-8 w-full py-2 pl-12 text-center text-xs" }, " Preview ", -1)),
191
- w(r(D), {
191
+ g(r(D), {
192
192
  class: "hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs",
193
193
  variant: "ghost",
194
- onClick: t[1] || (t[1] = (u) => o.value = "")
194
+ onClick: t[1] || (t[1] = (c) => o.value = "")
195
195
  }, {
196
196
  default: p(() => [...t[3] || (t[3] = [
197
- c(" Clear ", -1)
197
+ u(" Clear ", -1)
198
198
  ])]),
199
199
  _: 1
200
200
  })
@@ -209,7 +209,7 @@ const se = { class: "flex justify-between" }, ue = { class: "flex w-full flex-ro
209
209
  ], 64))
210
210
  ]),
211
211
  _: 1
212
- }, 8, ["disabled", "loading"]));
212
+ }, 8, ["disabled", "loader"]));
213
213
  }
214
214
  });
215
215
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.vue.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.vue"],"names":[],"mappings":";AAkJA,wBAKG"}
1
+ {"version":3,"file":"EmptyState.vue.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.vue"],"names":[],"mappings":";AA+LA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./EmptyState.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-45a9fc44"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b1211b87"]]);
5
5
  export {
6
- r as default
6
+ a as default
7
7
  };
@@ -1,25 +1,36 @@
1
- import { defineComponent as s, createElementBlock as c, openBlock as n, createElementVNode as e, createVNode as t, unref as r } from "vue";
2
- import { ScalarHotkey as i } from "@scalar/components";
3
- import l from "../assets/keycap.ascii.js";
4
- import o from "./ScalarAsciiArt.vue.js";
5
- const p = { class: "flex-center flex w-full scale-75" }, m = { class: "relative" }, d = { class: "relative -ml-12" }, h = /* @__PURE__ */ s({
1
+ import { defineComponent as c, createElementBlock as i, openBlock as n, createElementVNode as a, createVNode as e, unref as t } from "vue";
2
+ import { ScalarHotkey as o } from "@scalar/components";
3
+ import r from "../assets/keycap.ascii.js";
4
+ import l from "./ScalarAsciiArt.vue.js";
5
+ const p = { class: "flex-center flex w-full scale-75" }, d = { class: "relative" }, m = { class: "relative -ml-12" }, y = { class: "relative -ml-12" }, v = /* @__PURE__ */ c({
6
6
  __name: "EmptyState",
7
- setup(_) {
8
- return (f, a) => (n(), c("div", p, [
9
- e("div", m, [
10
- t(r(i), {
7
+ setup(x) {
8
+ return (_, s) => (n(), i("div", p, [
9
+ a("div", d, [
10
+ e(t(o), {
11
11
  class: "keycap-hotkey right-14 border-transparent py-0 text-xl",
12
12
  hotkey: ""
13
13
  }),
14
- t(o, {
15
- art: r(l),
14
+ e(l, {
15
+ art: t(r),
16
16
  class: "text-c-3 !leading-[6px]"
17
17
  }, null, 8, ["art"])
18
18
  ]),
19
- e("div", d, [
20
- a[0] || (a[0] = e("div", { class: "keycap-hotkey right-16 text-xl" }, "K", -1)),
21
- t(o, {
22
- art: r(l),
19
+ a("div", m, [
20
+ e(t(o), {
21
+ class: "keycap-hotkey right-14 border-transparent py-0 text-xl",
22
+ hotkey: "",
23
+ modifier: ["Shift"]
24
+ }),
25
+ e(l, {
26
+ art: t(r),
27
+ class: "keycap-n !leading-[6px]"
28
+ }, null, 8, ["art"])
29
+ ]),
30
+ a("div", y, [
31
+ s[0] || (s[0] = a("div", { class: "keycap-hotkey right-16 text-xl" }, "P", -1)),
32
+ e(l, {
33
+ art: t(r),
23
34
  class: "keycap-n !leading-[6px]"
24
35
  }, null, 8, ["art"])
25
36
  ])
@@ -27,5 +38,5 @@ const p = { class: "flex-center flex w-full scale-75" }, m = { class: "relative"
27
38
  }
28
39
  });
29
40
  export {
30
- h as default
41
+ v as default
31
42
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as V, reactive as $, ref as j, computed as S, watch as _, onMounted as O, onBeforeUnmount as W, createElementBlock as C, openBlock as c, createElementVNode as v, createVNode as n, unref as a, withCtx as u, createTextVNode as L, createBlock as g, createCommentVNode as D, toDisplayString as K, Fragment as q, renderList as F } from "vue";
1
+ import { defineComponent as V, reactive as $, ref as j, computed as S, watch as _, onMounted as O, onBeforeUnmount as W, createElementBlock as C, openBlock as c, createElementVNode as v, createVNode as n, unref as l, withCtx as u, createTextVNode as L, createBlock as g, createCommentVNode as D, toDisplayString as K, Fragment as q, renderList as F } from "vue";
2
2
  import { ScalarContextMenu as H, ScalarFloating as G, ScalarDropdownMenu as J, ScalarDropdownButton as I, ScalarIcon as d, ScalarHotkey as P } from "@scalar/components";
3
3
  import { LibraryIcon as Q } from "@scalar/icons/library";
4
4
  import { useClipboard as X } from "@scalar/use-hooks/useClipboard";
@@ -7,7 +7,7 @@ import { ROUTES as Z } from "../../constants.js";
7
7
  import { useActiveEntities as ee } from "../../store/active-entities.js";
8
8
  import te from "./TopNavItem.vue.js";
9
9
  import { useWorkspace as oe } from "../../store/store.js";
10
- const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae = { class: "relative flex h-10 flex-1 items-center gap-1.5 overflow-hidden pr-2.5 text-base font-medium" }, ne = {
10
+ const ae = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, le = { class: "relative flex h-10 flex-1 items-center gap-1.5 overflow-hidden pr-2.5 text-base font-medium" }, ne = {
11
11
  key: 0,
12
12
  class: "h-full w-full overflow-hidden"
13
13
  }, de = /* @__PURE__ */ V({
@@ -23,10 +23,10 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
23
23
  icon: "Add",
24
24
  isCollection: !1
25
25
  }
26
- ]), l = j(0), T = S(() => l.value), y = S(() => i.currentRoute.value.name?.toString().startsWith("collection."));
26
+ ]), a = j(0), y = S(() => a.value), T = S(() => i.currentRoute.value.name?.toString().startsWith("collection."));
27
27
  function N() {
28
- if (y.value) {
29
- t[l.value] = {
28
+ if (T.value) {
29
+ t[a.value] = {
30
30
  label: f.value?.info?.title || "Untitled Collection",
31
31
  path: i.currentRoute.value.path,
32
32
  icon: f.value?.["x-scalar-icon"] || "Collection",
@@ -35,7 +35,7 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
35
35
  return;
36
36
  }
37
37
  if (i.currentRoute.value.name?.toString().startsWith("request")) {
38
- t[l.value] = {
38
+ t[a.value] = {
39
39
  label: E.value?.summary || "",
40
40
  path: i.currentRoute.value.path,
41
41
  icon: "ExternalLink",
@@ -47,7 +47,7 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
47
47
  i.currentRoute.value.name?.toString() ?? ""
48
48
  ));
49
49
  if (e) {
50
- t[l.value] = {
50
+ t[a.value] = {
51
51
  label: e.displayName,
52
52
  path: i.currentRoute.value.path,
53
53
  icon: e.icon,
@@ -57,7 +57,7 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
57
57
  }
58
58
  }
59
59
  function h() {
60
- const e = t[l.value]?.path;
60
+ const e = t[a.value]?.path;
61
61
  e && i.push(e);
62
62
  }
63
63
  function m() {
@@ -66,10 +66,10 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
66
66
  path: "",
67
67
  icon: "Add",
68
68
  isCollection: !1
69
- }), l.value = t.length - 1, N();
69
+ }), a.value = t.length - 1, N();
70
70
  }
71
71
  function p(e) {
72
- l.value = e, h();
72
+ a.value = e, h();
73
73
  }
74
74
  _(
75
75
  () => i.currentRoute.value.path,
@@ -79,21 +79,21 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
79
79
  { immediate: !0 }
80
80
  );
81
81
  function x(e) {
82
- t.splice(e, 1), l.value = Math.min(
83
- l.value,
82
+ t.splice(e, 1), a.value = Math.min(
83
+ a.value,
84
84
  t.length - 1
85
85
  ), h();
86
86
  }
87
- const w = (e) => {
87
+ const w = async (e) => {
88
88
  if (!t[e]?.path)
89
89
  return;
90
90
  const o = new URL(window.location.href);
91
- o.pathname = t[e].path, M(o.toString());
91
+ o.pathname = t[e].path, await M(o.toString());
92
92
  }, z = (e) => {
93
- t.splice(0, e), t.splice(1), l.value = 0, h();
93
+ t.splice(0, e), t.splice(1), a.value = 0, h();
94
94
  }, R = (e) => {
95
95
  if (e) {
96
- if (e.addTopNav && m(), e.closeTopNav && x(l.value), e.navigateTopNavLeft && p(Math.max(l.value - 1, 0)), e.navigateTopNavRight && p(Math.min(l.value + 1, t.length - 1)), e.jumpToTab) {
96
+ if (e.addTopNav && m(), e.closeTopNav && x(a.value), e.navigateTopNavLeft && p(Math.max(a.value - 1, 0)), e.navigateTopNavRight && p(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
97
97
  const o = Number(e.jumpToTab.key) - 1;
98
98
  o >= 0 && o < t.length && p(o);
99
99
  }
@@ -113,17 +113,17 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
113
113
  e && B(e);
114
114
  },
115
115
  { immediate: !0 }
116
- ), O(() => k.hotKeys.on(R)), W(() => k.hotKeys.off(R)), (e, o) => (c(), C("nav", le, [
116
+ ), O(() => k.hotKeys.on(R)), W(() => k.hotKeys.off(R)), (e, o) => (c(), C("nav", ae, [
117
117
  o[3] || (o[3] = v("div", { class: "app-drag-region absolute inset-0" }, null, -1)),
118
- v("div", ae, [
118
+ v("div", le, [
119
119
  t.length === 1 ? (c(), C("div", ne, [
120
- n(a(H), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
120
+ n(l(H), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
121
121
  trigger: u(() => [
122
- y.value ? (c(), g(a(Q), {
122
+ T.value ? (c(), g(l(Q), {
123
123
  key: 0,
124
124
  class: "size-3.5 min-w-3.5 stroke-2",
125
- src: a(f)?.["x-scalar-icon"] || "Collection"
126
- }, null, 8, ["src"])) : t[0]?.icon ? (c(), g(a(d), {
125
+ src: l(f)?.["x-scalar-icon"] || "Collection"
126
+ }, null, 8, ["src"])) : t[0]?.icon ? (c(), g(l(d), {
127
127
  key: 1,
128
128
  icon: t[0]?.icon,
129
129
  size: "xs",
@@ -132,34 +132,34 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
132
132
  v("span", null, K(t[0]?.label), 1)
133
133
  ]),
134
134
  content: u(() => [
135
- n(a(G), { placement: "right-start" }, {
135
+ n(l(G), { placement: "right-start" }, {
136
136
  floating: u(() => [
137
- n(a(J), { class: "scalar-app scalar-client" }, {
137
+ n(l(J), { class: "scalar-app scalar-client" }, {
138
138
  default: u(() => [
139
- n(a(I), {
139
+ n(l(I), {
140
140
  class: "flex items-center gap-1.5",
141
141
  onClick: m
142
142
  }, {
143
143
  default: u(() => [
144
- n(a(d), {
144
+ n(l(d), {
145
145
  icon: "AddTab",
146
146
  size: "sm",
147
147
  thickness: "1.5"
148
148
  }),
149
149
  o[1] || (o[1] = L(" New Tab ", -1)),
150
- n(a(P), {
150
+ n(l(P), {
151
151
  class: "bg-b-2 ml-auto",
152
152
  hotkey: "T"
153
153
  })
154
154
  ]),
155
155
  _: 1
156
156
  }),
157
- n(a(I), {
157
+ n(l(I), {
158
158
  class: "flex items-center gap-1.5",
159
- onClick: o[0] || (o[0] = (s) => w(T.value))
159
+ onClick: o[0] || (o[0] = (s) => w(y.value))
160
160
  }, {
161
161
  default: u(() => [
162
- n(a(d), {
162
+ n(l(d), {
163
163
  icon: "Link",
164
164
  size: "sm",
165
165
  thickness: "1.5"
@@ -179,9 +179,9 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
179
179
  })
180
180
  ])) : (c(!0), C(q, { key: 1 }, F(t, (s, r) => (c(), g(te, {
181
181
  key: s.path,
182
- active: r === T.value,
182
+ active: r === y.value,
183
183
  hotkey: (r + 1).toString(),
184
- icon: s.isCollection ? a(f)?.["x-scalar-icon"] || "Collection" : s.icon,
184
+ icon: s.isCollection ? l(f)?.["x-scalar-icon"] || "Collection" : s.icon,
185
185
  isCollection: s.isCollection || !1,
186
186
  label: s.label,
187
187
  onClick: (b) => p(r),
@@ -195,7 +195,7 @@ const le = { class: "mac:pl-[72px] t-app__top-nav relative flex h-10 pl-2" }, ae
195
195
  type: "button",
196
196
  onClick: m
197
197
  }, [
198
- n(a(d), {
198
+ n(l(d), {
199
199
  icon: "Add",
200
200
  size: "sm",
201
201
  thickness: "2.5"