@scalar/api-client 2.12.0 → 2.14.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.
- package/CHANGELOG.md +66 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +14 -14
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +38 -38
- package/dist/components/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/EmptyState.vue.js +2 -2
- package/dist/components/EmptyState.vue2.js +27 -16
- package/dist/components/TopNav/TopNav.vue.js +33 -33
- package/dist/layouts/App/create-api-client-app.d.ts +28 -28
- package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
- package/dist/libs/create-client.d.ts +28 -28
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/send-request/create-fetch-body.d.ts +2 -2
- package/dist/store/active-entities.d.ts +2 -2
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +8 -8
- package/dist/store/request-example.d.ts +12 -12
- package/dist/store/store.d.ts +28 -28
- package/dist/store/workspace.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +9 -8
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +14 -11
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +22 -22
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +18 -15
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +17 -17
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +17 -12
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +52 -52
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +90 -75
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +126 -103
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -2
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +56 -53
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +26 -0
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/DesktopTab.vue.js +7 -0
- package/dist/v2/features/app/components/DesktopTab.vue2.js +134 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +9 -4
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +47 -13
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +2 -4
- package/dist/v2/features/app/components/SplashScreen.vue.js +2 -2
- package/dist/v2/features/app/components/SplashScreen.vue2.js +2 -2
- package/dist/v2/features/app/helpers/routes.js +1 -1
- package/dist/v2/features/collection/components/Settings.vue2.js +3 -3
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +61 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +48 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +52 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts +36 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.js +78 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +30 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +169 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +34 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +175 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +43 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +115 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +213 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +38 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +89 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts +41 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +7 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +172 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +33 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +40 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/index.d.ts +2 -0
- package/dist/v2/features/command-palette/components/index.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/index.js +4 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +31 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +13 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +12 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +26 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +70 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +18 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts +11 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +11 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +202 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +109 -0
- package/dist/v2/features/command-palette/types.d.ts +82 -0
- package/dist/v2/features/command-palette/types.d.ts.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +24 -20
- package/dist/v2/helpers/drag-handle-factory.d.ts +1 -2
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
- package/dist/v2/helpers/drag-handle-factory.js +84 -99
- package/dist/v2/helpers/get-tab-details.d.ts +43 -0
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -0
- package/dist/v2/helpers/get-tab-details.js +34 -0
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/is-url.d.ts +2 -0
- package/dist/v2/helpers/is-url.d.ts.map +1 -0
- package/dist/v2/helpers/is-url.js +5 -0
- package/dist/v2/helpers/remove-circular.d.ts +15 -0
- package/dist/v2/helpers/remove-circular.d.ts.map +1 -0
- package/dist/v2/helpers/remove-circular.js +18 -0
- package/dist/v2/helpers/storage.d.ts +4 -6
- package/dist/v2/helpers/storage.d.ts.map +1 -1
- package/dist/v2/helpers/storage.js +8 -12
- package/dist/v2/hooks/use-sidebar-state.d.ts +12 -19
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
- package/dist/v2/hooks/use-sidebar-state.js +36 -30
- package/dist/v2/hooks/use-sync-path.d.ts +11 -0
- package/dist/v2/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/hooks/use-sync-path.js +51 -0
- package/dist/v2/hooks/use-tabs.d.ts +31 -0
- package/dist/v2/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/hooks/use-tabs.js +44 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts +5 -2
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +91 -36
- package/dist/v2/hooks/use-workspace-selector.d.ts +16 -6
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-selector.js +58 -64
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +78 -78
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +19 -19
- package/dist/views/Request/libs/oauth2.d.ts +2 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +66 -53
- package/package.json +134 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#7477](https://github.com/scalar/scalar/pull/7477) [`9ec8adf`](https://github.com/scalar/scalar/commit/9ec8adfea017333dee5bc3949104232f7dc57f4a) Thanks [@DemonHa](https://github.com/DemonHa)! - fix: correctly sort documents on the workspace
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#7483](https://github.com/scalar/scalar/pull/7483) [`f446bbc`](https://github.com/scalar/scalar/commit/f446bbc0b8aec7fa7314603fd48471f06c1318d5) Thanks [@hanspagel](https://github.com/hanspagel)! - fix: can not use relative URLs in oauth security schemes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`8842799`](https://github.com/scalar/scalar/commit/884279984b144082e85b699014e77ed71e9ae6a5), [`18a7bcd`](https://github.com/scalar/scalar/commit/18a7bcd8ad00f9f7ee09a562167593c7ed07e01d), [`18a7bcd`](https://github.com/scalar/scalar/commit/18a7bcd8ad00f9f7ee09a562167593c7ed07e01d), [`9ec8adf`](https://github.com/scalar/scalar/commit/9ec8adfea017333dee5bc3949104232f7dc57f4a), [`cc4de25`](https://github.com/scalar/scalar/commit/cc4de2587b36f0d169b01c1bf312ba91b67e3e0c)]:
|
|
14
|
+
- @scalar/workspace-store@0.22.1
|
|
15
|
+
- @scalar/use-codemirror@0.13.0
|
|
16
|
+
- @scalar/helpers@0.2.0
|
|
17
|
+
- @scalar/use-hooks@0.3.2
|
|
18
|
+
- @scalar/oas-utils@0.6.6
|
|
19
|
+
- @scalar/sidebar@0.5.1
|
|
20
|
+
- @scalar/components@0.16.6
|
|
21
|
+
- @scalar/import@0.4.37
|
|
22
|
+
- @scalar/json-magic@0.8.4
|
|
23
|
+
- @scalar/object-utils@1.2.14
|
|
24
|
+
- @scalar/postman-to-openapi@0.3.47
|
|
25
|
+
- @scalar/openapi-parser@0.23.5
|
|
26
|
+
|
|
27
|
+
## 2.13.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- [#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
|
|
32
|
+
|
|
33
|
+
- [#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
|
|
34
|
+
|
|
35
|
+
- [#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
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- [#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
|
|
40
|
+
|
|
41
|
+
- [#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
|
|
42
|
+
|
|
43
|
+
- [#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
|
|
44
|
+
|
|
45
|
+
- [#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
|
|
46
|
+
|
|
47
|
+
- 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)]:
|
|
48
|
+
- @scalar/components@0.16.5
|
|
49
|
+
- @scalar/sidebar@0.5.0
|
|
50
|
+
- @scalar/workspace-store@0.22.0
|
|
51
|
+
- @scalar/snippetz@0.5.4
|
|
52
|
+
- @scalar/json-magic@0.8.3
|
|
53
|
+
- @scalar/openapi-types@0.5.2
|
|
54
|
+
- @scalar/use-toasts@0.9.1
|
|
55
|
+
- @scalar/helpers@0.1.3
|
|
56
|
+
- @scalar/types@0.5.1
|
|
57
|
+
- @scalar/import@0.4.36
|
|
58
|
+
- @scalar/themes@0.13.25
|
|
59
|
+
- @scalar/use-codemirror@0.12.49
|
|
60
|
+
- @scalar/oas-utils@0.6.5
|
|
61
|
+
- @scalar/analytics-client@1.0.0
|
|
62
|
+
- @scalar/draggable@0.3.0
|
|
63
|
+
- @scalar/icons@0.5.0
|
|
64
|
+
- @scalar/object-utils@1.2.13
|
|
65
|
+
- @scalar/openapi-parser@0.23.4
|
|
66
|
+
- @scalar/postman-to-openapi@0.3.46
|
|
67
|
+
- @scalar/use-hooks@0.3.1
|
|
68
|
+
|
|
3
69
|
## 2.12.0
|
|
4
70
|
|
|
5
71
|
### 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;;;;;;;
|
|
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
|
|
1
|
+
import { type LoadingState } from '@scalar/components';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
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":"
|
|
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
|
|
2
|
-
import { useBindCx as c, ScalarButton as
|
|
3
|
-
const
|
|
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
|
-
|
|
6
|
+
loader: {},
|
|
7
7
|
disabled: { type: Boolean, default: !1 }
|
|
8
8
|
},
|
|
9
9
|
emits: ["submit", "cancel", "back"],
|
|
10
|
-
setup(
|
|
11
|
-
const { cx:
|
|
12
|
-
return (e, o) => (r(),
|
|
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((
|
|
16
|
+
onSubmit: o[1] || (o[1] = l(($) => !e.disabled && e.$emit("submit"), ["prevent", "stop"]))
|
|
17
17
|
}, [
|
|
18
|
-
t("div", p(f(
|
|
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",
|
|
22
|
-
t("div",
|
|
21
|
+
t("div", w, [
|
|
22
|
+
t("div", B, [
|
|
23
23
|
s(e.$slots, "options")
|
|
24
24
|
]),
|
|
25
|
-
u(
|
|
25
|
+
u(d(v), {
|
|
26
26
|
class: "max-h-8 px-3 text-xs",
|
|
27
27
|
disabled: e.disabled,
|
|
28
|
-
|
|
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", "
|
|
37
|
+
}, 8, ["disabled", "loader"])
|
|
38
38
|
])
|
|
39
39
|
], 32));
|
|
40
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as J, ref as
|
|
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" },
|
|
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(
|
|
20
|
-
const C = T, _ = X(), { activeWorkspace: n, activeCollection: F } = ee(), { importSpecFile: k, importSpecFromUrl: W, events: N } = ie(), { toast: i } = Q(), s = q(), o =
|
|
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
|
|
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
|
|
37
|
-
|
|
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
|
-
|
|
45
|
+
w(m?.collection);
|
|
46
46
|
} else {
|
|
47
47
|
const m = await k(
|
|
48
48
|
b,
|
|
49
49
|
n.value?.uid ?? ""
|
|
50
50
|
);
|
|
51
|
-
|
|
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
|
-
},
|
|
59
|
+
}, c.readAsText(t);
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
multiple: !1,
|
|
63
63
|
accept: ".json,.yaml,.yml"
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
L(y, (e) => {
|
|
66
66
|
e || (f.value = !1);
|
|
67
|
-
}),
|
|
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.
|
|
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 (
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
103
|
+
w(e?.collection);
|
|
104
104
|
}
|
|
105
105
|
else {
|
|
106
|
-
i("Import failed: Invalid URL or OpenAPI document", "error"), s.invalidate(
|
|
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(
|
|
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
|
-
|
|
132
|
+
loader: r(s),
|
|
133
133
|
onSubmit: M
|
|
134
134
|
}, {
|
|
135
135
|
options: p(() => [
|
|
136
|
-
U("div",
|
|
137
|
-
|
|
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] =
|
|
144
|
-
|
|
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
|
-
|
|
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
|
-
|
|
157
|
+
g(ae, {
|
|
158
158
|
modelValue: f.value,
|
|
159
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
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] =
|
|
168
|
+
t[6] || (t[6] = u(" Import ", -1)),
|
|
169
169
|
y.value ? (l(), d(v, { key: 0 }, [
|
|
170
|
-
|
|
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
|
-
|
|
173
|
+
u(' "' + R(a.value.title) + '" ', 1)
|
|
174
174
|
], 64)) : (l(), d(v, { key: 1 }, [
|
|
175
|
-
|
|
175
|
+
u(R(a.value.version), 1)
|
|
176
176
|
], 64))
|
|
177
177
|
], 64)) : (l(), d(v, { key: 2 }, [
|
|
178
|
-
|
|
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] = (
|
|
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
|
-
|
|
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] = (
|
|
194
|
+
onClick: t[1] || (t[1] = (c) => o.value = "")
|
|
195
195
|
}, {
|
|
196
196
|
default: p(() => [...t[3] || (t[3] = [
|
|
197
|
-
|
|
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", "
|
|
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":";
|
|
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
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b1211b87"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,25 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarHotkey as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const p = { class: "flex-center flex w-full scale-75" }, m = { class: "relative" },
|
|
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 (
|
|
9
|
-
|
|
10
|
-
t(
|
|
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
|
-
|
|
15
|
-
art: r
|
|
14
|
+
e(l, {
|
|
15
|
+
art: t(r),
|
|
16
16
|
class: "text-c-3 !leading-[6px]"
|
|
17
17
|
}, null, 8, ["art"])
|
|
18
18
|
]),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
]),
|
|
26
|
+
]), a = j(0), y = S(() => a.value), T = S(() => i.currentRoute.value.name?.toString().startsWith("collection."));
|
|
27
27
|
function N() {
|
|
28
|
-
if (
|
|
29
|
-
t[
|
|
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[
|
|
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[
|
|
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[
|
|
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
|
-
}),
|
|
69
|
+
}), a.value = t.length - 1, N();
|
|
70
70
|
}
|
|
71
71
|
function p(e) {
|
|
72
|
-
|
|
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),
|
|
83
|
-
|
|
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),
|
|
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(
|
|
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",
|
|
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",
|
|
118
|
+
v("div", le, [
|
|
119
119
|
t.length === 1 ? (c(), C("div", ne, [
|
|
120
|
-
n(
|
|
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
|
-
|
|
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:
|
|
126
|
-
}, null, 8, ["src"])) : t[0]?.icon ? (c(), g(
|
|
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(
|
|
135
|
+
n(l(G), { placement: "right-start" }, {
|
|
136
136
|
floating: u(() => [
|
|
137
|
-
n(
|
|
137
|
+
n(l(J), { class: "scalar-app scalar-client" }, {
|
|
138
138
|
default: u(() => [
|
|
139
|
-
n(
|
|
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(
|
|
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(
|
|
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(
|
|
157
|
+
n(l(I), {
|
|
158
158
|
class: "flex items-center gap-1.5",
|
|
159
|
-
onClick: o[0] || (o[0] = (s) => w(
|
|
159
|
+
onClick: o[0] || (o[0] = (s) => w(y.value))
|
|
160
160
|
}, {
|
|
161
161
|
default: u(() => [
|
|
162
|
-
n(
|
|
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 ===
|
|
182
|
+
active: r === y.value,
|
|
183
183
|
hotkey: (r + 1).toString(),
|
|
184
|
-
icon: s.isCollection ?
|
|
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(
|
|
198
|
+
n(l(d), {
|
|
199
199
|
icon: "Add",
|
|
200
200
|
size: "sm",
|
|
201
201
|
thickness: "2.5"
|