@scalar/api-client 2.18.0 → 2.18.3
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 +85 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +52 -52
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +15 -15
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -33
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +112 -112
- package/dist/components/CommandPalette/CommandActionForm.vue.js +18 -18
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +25 -25
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +14 -14
- package/dist/components/DataTable/DataTable.vue.js +17 -17
- package/dist/components/DataTable/DataTableCell.vue.js +9 -9
- package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
- package/dist/components/DataTable/DataTableInput.vue2.js +48 -48
- package/dist/components/DataTable/DataTableInputSelect.vue.js +35 -35
- package/dist/components/DataTable/DataTableText.vue.js +10 -10
- package/dist/components/Form/Form.vue.js +32 -32
- package/dist/components/Form/LabelInput.vue2.js +15 -15
- package/dist/components/HelpfulLink.vue.js +7 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +22 -22
- package/dist/components/IconSelector.vue.js +16 -16
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +50 -50
- package/dist/components/ImportCollection/ImportNowButton.vue.js +23 -23
- package/dist/components/ImportCollection/PrefetchError.vue.js +8 -8
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -7
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +16 -16
- package/dist/components/SectionFilter.vue2.js +21 -21
- package/dist/components/SectionFilterButton.vue.js +7 -7
- package/dist/components/Server/ServerDropdown.vue.js +32 -32
- package/dist/components/Server/ServerDropdownItem.vue2.js +39 -39
- package/dist/components/Server/ServerSelector.vue.js +27 -27
- package/dist/components/Server/ServerVariablesForm.vue.js +26 -26
- package/dist/components/Server/ServerVariablesSelect.vue.js +21 -21
- package/dist/components/Server/ServerVariablesTextbox.vue.js +10 -10
- package/dist/components/Server/types.d.ts +2 -1
- package/dist/components/Server/types.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +18 -18
- package/dist/components/SideNav/SideNavRouterLink.vue.js +13 -13
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +11 -11
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue2.js +28 -28
- package/dist/components/Sidebar/SidebarButton.vue.js +12 -12
- package/dist/components/Sidebar/SidebarListElement.vue2.js +34 -34
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +33 -33
- package/dist/components/TopNav/TopNavItem.vue2.js +41 -41
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +43 -43
- package/dist/data/httpHeaders.d.ts +2 -1
- package/dist/data/httpHeaders.d.ts.map +1 -1
- package/dist/hooks/useClientConfig.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/hooks/useSidebar.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.js +5 -5
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +5 -5
- package/dist/plugins/plugin-manager.d.ts +0 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/routes.d.ts +0 -10
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +0 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +40 -32
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
- package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +83 -82
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
- 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 +1 -3
- package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
- package/dist/v2/components/data-table/DataTable.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
- package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
- package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
- package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
- package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
- package/dist/v2/components/resize/Resize.vue2.js +11 -11
- package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
- package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
- package/dist/v2/features/app/App.vue.js +25 -25
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +55 -61
- package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
- package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
- package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
- package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
- package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
- package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
- package/dist/v2/features/collection/components/Environment.vue.js +10 -10
- package/dist/v2/features/collection/components/Form.vue.js +21 -21
- package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
- package/dist/v2/features/collection/components/Servers.vue.js +37 -37
- package/dist/v2/features/collection/components/Settings.vue.js +22 -22
- package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
- package/dist/v2/features/command-palette/types.d.ts +11 -10
- package/dist/v2/features/command-palette/types.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
- package/dist/v2/features/environments/components/Environment.vue.js +16 -16
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +57 -56
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +5 -4
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +41 -39
- package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
- package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
- package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
- package/dist/v2/features/search/types.d.ts +5 -4
- package/dist/v2/features/search/types.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
- package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
- package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +0 -2
- package/dist/v2/helpers/plugins.d.ts +2 -2
- package/dist/v2/helpers/plugins.d.ts.map +1 -1
- package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
- package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
- package/dist/views/Cookies/CookieModal.vue2.js +26 -26
- package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
- package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
- package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
- package/dist/views/Request/Request.vue2.js +55 -55
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
- package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
- package/dist/views/Request/RequestSection/index.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
- package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
- package/package.json +24 -24
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
- package/dist/components/ScreenReader.vue.d.ts +0 -20
- package/dist/components/ScreenReader.vue.d.ts.map +0 -1
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
- package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, ref as N, computed as E, watch as _, createBlock as f, openBlock as l, unref as s, withCtx as p, createElementVNode as c, createVNode as i, createElementBlock as r, createTextVNode as I, createCommentVNode as v, withKeys as C, withModifiers as h, Fragment as S, renderList as O, withDirectives as K, toDisplayString as D, vShow as R, normalizeClass as V, resolveDynamicComponent as X, mergeProps as A, nextTick as Q } from "vue";
|
|
2
2
|
import { Dialog as F, DialogPanel as q, DialogTitle as H } from "@headlessui/vue";
|
|
3
|
-
import { ScalarIcon as
|
|
3
|
+
import { ScalarIcon as x } from "@scalar/components";
|
|
4
4
|
import { useRouter as W } from "vue-router";
|
|
5
5
|
import j from "./CommandPaletteDocument.vue.js";
|
|
6
6
|
import G from "./CommandPaletteExample.vue.js";
|
|
@@ -11,13 +11,13 @@ import Z from "./CommandPaletteTag.vue.js";
|
|
|
11
11
|
const ee = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5"
|
|
14
|
-
}, te = { class: "bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)" },
|
|
14
|
+
}, te = { class: "bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)" }, ae = { for: "commandmenu" }, ne = ["value", "onKeydown"], oe = ["id", "onClick"], le = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "text-c-3 p-2 pt-3 text-center text-sm"
|
|
17
17
|
}, re = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "flex-1 p-1.5"
|
|
20
|
-
}, se = {},
|
|
20
|
+
}, se = {}, ye = /* @__PURE__ */ $({
|
|
21
21
|
...se,
|
|
22
22
|
__name: "TheCommandPalette",
|
|
23
23
|
props: {
|
|
@@ -25,137 +25,137 @@ const ee = {
|
|
|
25
25
|
workspaceStore: {},
|
|
26
26
|
eventBus: {}
|
|
27
27
|
},
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
28
|
+
setup(e) {
|
|
29
|
+
const T = {
|
|
30
30
|
"import-from-openapi-swagger-postman-curl": J,
|
|
31
31
|
"create-document": j,
|
|
32
32
|
"create-request": Y,
|
|
33
33
|
"add-tag": Z,
|
|
34
34
|
"add-example": G,
|
|
35
35
|
"import-curl-command": U
|
|
36
|
-
},
|
|
37
|
-
() =>
|
|
36
|
+
}, B = W(), m = N(-1), y = N(null), u = E(
|
|
37
|
+
() => e.paletteState.filteredCommands.value.flatMap((t) => t.commands)
|
|
38
38
|
), d = E(
|
|
39
|
-
() =>
|
|
39
|
+
() => u.value[m.value]
|
|
40
40
|
);
|
|
41
|
-
|
|
42
|
-
() =>
|
|
43
|
-
(
|
|
44
|
-
|
|
41
|
+
_(
|
|
42
|
+
() => e.paletteState.filterQuery.value,
|
|
43
|
+
(t) => {
|
|
44
|
+
m.value = t && u.value.length > 0 ? 0 : -1;
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
if (!
|
|
47
|
+
const P = (t) => {
|
|
48
|
+
e.paletteState.setFilterQuery(t), t.trim().toLowerCase().startsWith("curl") && e.paletteState.open("import-curl-command", { curl: t });
|
|
49
|
+
}, k = (t, a) => {
|
|
50
|
+
if (!e.paletteState.isOpen.value)
|
|
51
51
|
return;
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
!d.value ||
|
|
57
|
-
},
|
|
58
|
-
if (
|
|
59
|
-
|
|
52
|
+
a.preventDefault();
|
|
53
|
+
const n = t === "up" ? -1 : 1, o = u.value.length;
|
|
54
|
+
m.value = (m.value + n + o) % o;
|
|
55
|
+
}, z = (t) => {
|
|
56
|
+
!d.value || e.paletteState.activeCommand.value || (t.preventDefault(), t.stopPropagation(), b(d.value));
|
|
57
|
+
}, b = (t) => {
|
|
58
|
+
if (t.type === "route") {
|
|
59
|
+
B.push(t.to), w();
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
t.type === "folder" && e.paletteState.open(t.id, void 0);
|
|
63
63
|
}, g = () => {
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
64
|
+
e.paletteState.reset(), Q(() => y.value?.focus());
|
|
65
|
+
}, L = () => {
|
|
66
|
+
e.paletteState.close();
|
|
67
|
+
}, M = (...t) => {
|
|
68
|
+
e.paletteState.open(...t);
|
|
69
69
|
}, w = () => {
|
|
70
|
-
|
|
70
|
+
e.paletteState.close(), m.value = -1;
|
|
71
71
|
};
|
|
72
|
-
return (
|
|
72
|
+
return (t, a) => (l(), f(s(F), {
|
|
73
73
|
open: e.paletteState.isOpen.value,
|
|
74
74
|
onClose: w
|
|
75
75
|
}, {
|
|
76
|
-
default:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
default:
|
|
80
|
-
|
|
81
|
-
default:
|
|
76
|
+
default: p(() => [
|
|
77
|
+
a[4] || (a[4] = c("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
|
|
78
|
+
i(s(q), { class: "commandmenu z-overlay flex flex-col" }, {
|
|
79
|
+
default: p(() => [
|
|
80
|
+
i(s(H), { class: "sr-only" }, {
|
|
81
|
+
default: p(() => [...a[3] || (a[3] = [
|
|
82
82
|
I("API Client Command Menu", -1)
|
|
83
83
|
])]),
|
|
84
84
|
_: 1
|
|
85
85
|
}),
|
|
86
86
|
e.paletteState.activeCommand.value ? (l(), r("div", re, [
|
|
87
|
-
|
|
87
|
+
c("button", {
|
|
88
88
|
class: "hover:bg-b-3 text-c-3 active:text-c-1 absolute z-1 mt-[0.5px] rounded p-1.5",
|
|
89
89
|
type: "button",
|
|
90
90
|
onClick: g
|
|
91
91
|
}, [
|
|
92
|
-
|
|
92
|
+
i(s(x), {
|
|
93
93
|
icon: "ChevronLeft",
|
|
94
94
|
size: "md",
|
|
95
95
|
thickness: "1.5"
|
|
96
96
|
})
|
|
97
97
|
]),
|
|
98
|
-
e.paletteState.activeCommand.value ? (l(),
|
|
98
|
+
e.paletteState.activeCommand.value ? (l(), f(X(T[e.paletteState.activeCommand.value]), A({ key: 0 }, {
|
|
99
99
|
workspaceStore: e.workspaceStore,
|
|
100
100
|
eventBus: e.eventBus,
|
|
101
101
|
...e.paletteState.activeCommandProps.value
|
|
102
102
|
}, {
|
|
103
103
|
onBack: g,
|
|
104
|
-
onClose:
|
|
105
|
-
onOpenCommand:
|
|
104
|
+
onClose: L,
|
|
105
|
+
onOpenCommand: M
|
|
106
106
|
}), null, 16)) : v("", !0)
|
|
107
107
|
])) : (l(), r("div", ee, [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
c("div", te, [
|
|
109
|
+
c("label", ae, [
|
|
110
|
+
i(s(x), {
|
|
111
111
|
class: "text-c-2 mr-2.5",
|
|
112
112
|
icon: "Search",
|
|
113
113
|
size: "md",
|
|
114
114
|
thickness: "1.5"
|
|
115
115
|
})
|
|
116
116
|
]),
|
|
117
|
-
|
|
117
|
+
c("input", {
|
|
118
118
|
id: "commandmenu",
|
|
119
119
|
ref_key: "commandInputRef",
|
|
120
|
-
ref:
|
|
120
|
+
ref: y,
|
|
121
121
|
autocomplete: "off",
|
|
122
122
|
autofocus: "",
|
|
123
123
|
class: "w-full rounded border-none bg-none py-1.5 text-sm focus:outline-none",
|
|
124
124
|
placeholder: "Search commands...",
|
|
125
125
|
type: "text",
|
|
126
126
|
value: e.paletteState.filterQuery.value,
|
|
127
|
-
onInput:
|
|
127
|
+
onInput: a[0] || (a[0] = (n) => P(n.target.value)),
|
|
128
128
|
onKeydown: [
|
|
129
|
-
|
|
130
|
-
C(h(
|
|
131
|
-
|
|
129
|
+
a[1] || (a[1] = C(h((n) => k("down", n), ["stop"]), ["down"])),
|
|
130
|
+
C(h(z, ["stop"]), ["enter"]),
|
|
131
|
+
a[2] || (a[2] = C(h((n) => k("up", n), ["stop"]), ["up"]))
|
|
132
132
|
]
|
|
133
|
-
}, null, 40,
|
|
133
|
+
}, null, 40, ne)
|
|
134
134
|
]),
|
|
135
|
-
(l(!0), r(S, null, O(e.paletteState.filteredCommands.value, (
|
|
136
|
-
key:
|
|
135
|
+
(l(!0), r(S, null, O(e.paletteState.filteredCommands.value, (n) => (l(), r(S, {
|
|
136
|
+
key: n.label
|
|
137
137
|
}, [
|
|
138
|
-
K(
|
|
139
|
-
[R,
|
|
138
|
+
K(c("div", { class: "text-c-3 mt-2 mb-1 px-2 text-xs font-medium" }, D(n.label), 513), [
|
|
139
|
+
[R, n.commands.length > 0]
|
|
140
140
|
]),
|
|
141
|
-
(l(!0), r(S, null, O(
|
|
142
|
-
id:
|
|
143
|
-
key:
|
|
141
|
+
(l(!0), r(S, null, O(n.commands, (o) => (l(), r("button", {
|
|
142
|
+
id: o.id,
|
|
143
|
+
key: o.id,
|
|
144
144
|
class: V(["commandmenu-item hover:bg-b-2 flex w-full cursor-pointer items-center rounded px-2 py-1.5 text-left text-sm", {
|
|
145
|
-
"bg-b-2":
|
|
145
|
+
"bg-b-2": o.id === d.value?.id
|
|
146
146
|
}]),
|
|
147
147
|
type: "button",
|
|
148
|
-
onClick: (
|
|
148
|
+
onClick: (me) => b(o)
|
|
149
149
|
}, [
|
|
150
|
-
"icon" in
|
|
150
|
+
"icon" in o ? (l(), f(s(x), {
|
|
151
151
|
key: 0,
|
|
152
152
|
class: "text-c-2 mr-2.5",
|
|
153
|
-
icon:
|
|
153
|
+
icon: o.icon,
|
|
154
154
|
size: "md",
|
|
155
155
|
thickness: "1.5"
|
|
156
156
|
}, null, 8, ["icon"])) : v("", !0),
|
|
157
|
-
I(" " +
|
|
158
|
-
], 10,
|
|
157
|
+
I(" " + D(o.name), 1)
|
|
158
|
+
], 10, oe))), 128))
|
|
159
159
|
], 64))), 128)),
|
|
160
160
|
e.paletteState.filteredCommands.value.length ? v("", !0) : (l(), r("div", le, " No commands found "))
|
|
161
161
|
]))
|
|
@@ -168,5 +168,5 @@ const ee = {
|
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
export {
|
|
171
|
-
|
|
171
|
+
ye as default
|
|
172
172
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as u, computed as
|
|
2
|
-
import { ScalarIcon as
|
|
1
|
+
import { defineComponent as u, computed as r, createElementBlock as i, openBlock as f, normalizeClass as o, createElementVNode as p, createVNode as d, createTextVNode as g, unref as n } from "vue";
|
|
2
|
+
import { ScalarIcon as x, ScalarToggle as V } from "@scalar/components";
|
|
3
3
|
const b = {}, N = /* @__PURE__ */ u({
|
|
4
4
|
...b,
|
|
5
5
|
__name: "WatchModeToggle",
|
|
@@ -8,28 +8,28 @@ const b = {}, N = /* @__PURE__ */ u({
|
|
|
8
8
|
disabled: { type: Boolean, default: !1 }
|
|
9
9
|
},
|
|
10
10
|
emits: ["update:modelValue"],
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
get: () =>
|
|
14
|
-
set: (
|
|
11
|
+
setup(e, { emit: m }) {
|
|
12
|
+
const s = m, l = r({
|
|
13
|
+
get: () => e.modelValue,
|
|
14
|
+
set: (a) => s("update:modelValue", a)
|
|
15
15
|
});
|
|
16
|
-
return (
|
|
16
|
+
return (a, t) => (f(), i("label", {
|
|
17
17
|
class: o(["text-c-2 flex items-center gap-2 rounded p-3 py-1.5 text-sm select-none", e.disabled ? "cursor-default" : "cursor-pointer"]),
|
|
18
18
|
for: "watch-toggle"
|
|
19
19
|
}, [
|
|
20
|
-
|
|
20
|
+
p("span", {
|
|
21
21
|
class: o(["text-c-1 flex items-center gap-1 text-xs font-medium", { "text-c-3": !e.modelValue }])
|
|
22
22
|
}, [
|
|
23
|
-
|
|
23
|
+
d(n(x), {
|
|
24
24
|
icon: "Watch",
|
|
25
25
|
size: "sm"
|
|
26
26
|
}),
|
|
27
27
|
t[1] || (t[1] = g(" Watch Mode ", -1))
|
|
28
28
|
], 2),
|
|
29
|
-
|
|
29
|
+
d(n(V), {
|
|
30
30
|
id: "watch-toggle",
|
|
31
31
|
modelValue: l.value,
|
|
32
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
32
|
+
"onUpdate:modelValue": t[0] || (t[0] = (c) => l.value = c),
|
|
33
33
|
disabled: e.disabled
|
|
34
34
|
}, null, 8, ["modelValue", "disabled"])
|
|
35
35
|
], 2));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Represents parsed details from an OpenAPI or Swagger specification.
|
|
3
3
|
* Used to display information about imported API descriptions in the command palette.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
type OpenApiDocumentDetails = {
|
|
6
6
|
/** The API specification version (e.g., "OpenAPI 3.1.0" or "Swagger 2.0"). */
|
|
7
7
|
version: string;
|
|
8
8
|
/** The format of the specification document. */
|
|
@@ -20,4 +20,5 @@ export type OpenApiDocumentDetails = {
|
|
|
20
20
|
* - Document does not contain OpenAPI or Swagger version information
|
|
21
21
|
*/
|
|
22
22
|
export declare const getOpenApiDocumentDetails: (input: string | null) => OpenApiDocumentDetails | undefined;
|
|
23
|
+
export {};
|
|
23
24
|
//# sourceMappingURL=get-openapi-document-details.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-openapi-document-details.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/helpers/get-openapi-document-details.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"get-openapi-document-details.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/helpers/get-openapi-document-details.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,KAAK,sBAAsB,GAAG;IAC5B,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,kEAAkE;IAClE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAA;AAmED;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GAAI,OAAO,MAAM,GAAG,IAAI,KAAG,sBAAsB,GAAG,SAazF,CAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Represents the extracted details from a Postman collection.
|
|
3
3
|
* Used to display collection metadata in the command palette import UI.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
type PostmanDocumentDetails = {
|
|
6
6
|
/** The document format type. */
|
|
7
7
|
type: string;
|
|
8
8
|
/** The name of the Postman collection. */
|
|
@@ -20,4 +20,5 @@ export type PostmanDocumentDetails = {
|
|
|
20
20
|
* @returns The collection details if valid, null otherwise
|
|
21
21
|
*/
|
|
22
22
|
export declare const getPostmanDocumentDetails: (content: string) => PostmanDocumentDetails | null;
|
|
23
|
+
export {};
|
|
23
24
|
//# sourceMappingURL=get-postman-document-details.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-postman-document-details.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/helpers/get-postman-document-details.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"get-postman-document-details.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/helpers/get-postman-document-details.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,KAAK,sBAAsB,GAAG;IAC5B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,KAAG,sBAAsB,GAAG,IAgBpF,CAAA"}
|
|
@@ -33,7 +33,7 @@ export type Command = FolderCommand | RouteCommand | HiddenFolderCommand;
|
|
|
33
33
|
* A group of related commands with a label.
|
|
34
34
|
* Used to organize commands into categories in the palette.
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
type CommandGroup = {
|
|
37
37
|
/** Label for the command group (empty string for unlabeled groups) */
|
|
38
38
|
label: string;
|
|
39
39
|
/** List of commands in this group */
|
|
@@ -43,7 +43,7 @@ export type CommandGroup = {
|
|
|
43
43
|
* Available commands in the command palette.
|
|
44
44
|
* Organized into groups for better UX and discoverability.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
declare const commands: [{
|
|
47
47
|
readonly label: "";
|
|
48
48
|
readonly commands: [{
|
|
49
49
|
readonly type: "folder";
|
|
@@ -126,7 +126,7 @@ type FlatCommand = (typeof commands)[number]['commands'][number];
|
|
|
126
126
|
export type FolderCommandIds = Extract<FlatCommand, {
|
|
127
127
|
type: 'folder';
|
|
128
128
|
}>['id'];
|
|
129
|
-
|
|
129
|
+
type HiddenFolderCommandIds = Extract<FlatCommand, {
|
|
130
130
|
type: 'hidden-folder';
|
|
131
131
|
}>['id'];
|
|
132
132
|
/** Command IDs that map to UI components (folder and hidden-folder types) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-command-palette-state.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/hooks/use-command-palette-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAiB,MAAM,KAAK,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAQlD,6DAA6D;AAC7D,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,aAAa,GAAG,WAAW,GAAG;IACjC,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,QAAQ,CAAA;IACd,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED,KAAK,mBAAmB,GAAG,WAAW,GAAG;IACvC,IAAI,EAAE,eAAe,CAAA;IACrB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED,KAAK,YAAY,GAAG,WAAW,GAAG;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,gBAAgB,CAAA;IACpB,IAAI,EAAE,QAAQ,CAAA;CACf,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,aAAa,GAAG,YAAY,GAAG,mBAAmB,CAAA;AAExE;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"use-command-palette-state.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/hooks/use-command-palette-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAiB,MAAM,KAAK,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAQlD,6DAA6D;AAC7D,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;CAC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B,0DAA0D;IAC1D,gBAAgB,EAAE,WAAW,CAAC,SAAS,YAAY,EAAE,CAAC,CAAA;IACtD;;;OAGG;IACH,IAAI,EAAE,WAAW,CAAA;IACjB,kDAAkD;IAClD,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,sDAAsD;IACtD,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,yCAAyC;IACzC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,sBAAsB,QAAO,4BAmFzC,CAAA"}
|
|
@@ -6,7 +6,7 @@ import type { CommandPropsMap, OpenCommandEvent, UiCommandIds } from '../../../v
|
|
|
6
6
|
* Default props that all command components receive.
|
|
7
7
|
* These are injected automatically by the command palette.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
type DefaultCommandProps = {
|
|
10
10
|
/** The workspace store for accessing documents and operations */
|
|
11
11
|
workspaceStore: WorkspaceStore;
|
|
12
12
|
/** Event bus for emitting workspace events */
|
|
@@ -15,32 +15,32 @@ export type DefaultCommandProps = {
|
|
|
15
15
|
'onOpen-command': OpenCommandEvent;
|
|
16
16
|
};
|
|
17
17
|
/** Helper type to make all properties writable */
|
|
18
|
-
|
|
18
|
+
type Writable<T> = {
|
|
19
19
|
-readonly [K in keyof T]: T[K];
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* Extracts the props type from a Vue component.
|
|
23
23
|
* Strips out VNode and Vue-specific props to get only user-defined props.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
type ComponentProps<C extends Component> = C extends new (...args: any) => {
|
|
26
26
|
$props: infer P;
|
|
27
27
|
} ? Omit<P, keyof VNodeProps | keyof AllowedComponentProps> : never;
|
|
28
28
|
/**
|
|
29
29
|
* Maps command IDs to their actual component props.
|
|
30
30
|
* Used for validating that components accept the correct props.
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
type CommandComponentPropsMap<T extends Record<string, Component>> = {
|
|
33
33
|
[K in keyof T]: ComponentProps<T[K]>;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
36
|
* Maps command IDs to their expected props (default props + command-specific props).
|
|
37
37
|
* This is what each command component should accept.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
type ExpectedCommandComponentPropsMap = {
|
|
40
40
|
[K in UiCommandIds]: DefaultCommandProps & (CommandPropsMap[K] extends undefined ? unknown : CommandPropsMap[K]);
|
|
41
41
|
};
|
|
42
42
|
/** Helper type to flatten and display complex types in IDE tooltips */
|
|
43
|
-
|
|
43
|
+
type Prettify<T> = {
|
|
44
44
|
[K in keyof T]: T[K];
|
|
45
45
|
} & {};
|
|
46
46
|
/**
|
|
@@ -49,7 +49,7 @@ export type Prettify<T> = {
|
|
|
49
49
|
*
|
|
50
50
|
* Using literals prevents union collapse (true | never = true, but 'valid' | object stays distinct).
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
type AssertPropsMatch<Actual, Expected> = [Actual] extends [Expected] ? 'valid' : {
|
|
53
53
|
status: 'invalid';
|
|
54
54
|
actual: Prettify<Actual>;
|
|
55
55
|
expected: Prettify<Expected>;
|
|
@@ -59,16 +59,16 @@ export type AssertPropsMatch<Actual, Expected> = [Actual] extends [Expected] ? '
|
|
|
59
59
|
* Validates that all command components have the correct props.
|
|
60
60
|
* This type is used at the type-checking level to ensure type safety.
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
type CommandComponentPropsCheck<T extends Record<string, Component>> = {
|
|
63
63
|
[K in UiCommandIds]: AssertPropsMatch<Writable<CommandComponentPropsMap<T>[K]>, Partial<ExpectedCommandComponentPropsMap[K]>>;
|
|
64
64
|
};
|
|
65
65
|
/** All validation results for command components */
|
|
66
|
-
|
|
66
|
+
type PropsCheckResults<T extends Record<string, Component>> = CommandComponentPropsCheck<T>[keyof CommandComponentPropsCheck<T>];
|
|
67
67
|
/**
|
|
68
68
|
* Filter to show only invalid components.
|
|
69
69
|
* Makes error messages clearer by excluding valid components.
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
type InvalidComponents<T extends Record<string, Component>> = {
|
|
72
72
|
[K in keyof CommandComponentPropsCheck<T> as CommandComponentPropsCheck<T>[K] extends 'valid' ? never : K]: CommandComponentPropsCheck<T>[K];
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
@@ -79,4 +79,5 @@ export type InvalidComponents<T extends Record<string, Component>> = {
|
|
|
79
79
|
export type AssertAllValid<T extends Record<string, Component>> = PropsCheckResults<T> extends 'valid' ? PropsCheckResults<T> extends {
|
|
80
80
|
status: 'invalid';
|
|
81
81
|
} ? Prettify<InvalidComponents<T>> : PropsCheckResults<T> : Prettify<InvalidComponents<T>>;
|
|
82
|
+
export {};
|
|
82
83
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/command-palette/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,YAAY,EACb,MAAM,+DAA+D,CAAA;AAEtE;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/command-palette/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAA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E,GAChD,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAC9B,iBAAiB,CAAC,CAAC,CAAC,GACtB,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { defineComponent as E, ref as y, createElementBlock as u, openBlock as
|
|
2
|
-
import { useModal as d, ScalarButton as
|
|
3
|
-
import { ScalarIconPlus as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as E, ref as y, createElementBlock as u, openBlock as c, Fragment as v, createElementVNode as T, createVNode as r, renderList as x, createBlock as b, unref as i, withCtx as g, createTextVNode as h } from "vue";
|
|
2
|
+
import { useModal as d, ScalarButton as k } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as M } from "@scalar/icons";
|
|
4
|
+
import N from "./components/EnvironmentCreateModal.vue.js";
|
|
5
|
+
import S from "./components/EnvironmentDeleteModal.vue.js";
|
|
6
|
+
import w from "./components/Environment.vue.js";
|
|
7
|
+
const C = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, A = /* @__PURE__ */ E({
|
|
8
8
|
__name: "EnvironmentsList",
|
|
9
9
|
props: {
|
|
10
10
|
environments: {},
|
|
11
11
|
eventBus: {},
|
|
12
12
|
collectionType: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
environmentName:
|
|
20
|
-
collectionType:
|
|
14
|
+
setup(e) {
|
|
15
|
+
const s = d(), m = d(), t = y(null), f = (n) => {
|
|
16
|
+
t.value = n, m.show();
|
|
17
|
+
}, p = () => {
|
|
18
|
+
t.value && e.eventBus.emit("environment:delete:environment", {
|
|
19
|
+
environmentName: t.value,
|
|
20
|
+
collectionType: e.collectionType
|
|
21
21
|
});
|
|
22
|
-
}, a = (
|
|
23
|
-
|
|
22
|
+
}, a = (n) => {
|
|
23
|
+
t.value = n ?? null, s.show();
|
|
24
24
|
};
|
|
25
|
-
return (
|
|
26
|
-
(
|
|
27
|
-
key:
|
|
25
|
+
return (n, o) => (c(), u(v, null, [
|
|
26
|
+
(c(!0), u(v, null, x(Object.entries(e.environments), ([l, B]) => (c(), b(w, {
|
|
27
|
+
key: l,
|
|
28
28
|
collectionType: e.collectionType,
|
|
29
29
|
environment: B,
|
|
30
|
-
environmentName:
|
|
30
|
+
environmentName: l,
|
|
31
31
|
eventBus: e.eventBus,
|
|
32
|
-
onDelete: () =>
|
|
33
|
-
onEdit: () => a(
|
|
32
|
+
onDelete: () => f(l),
|
|
33
|
+
onEdit: () => a(l)
|
|
34
34
|
}, null, 8, ["collectionType", "environment", "environmentName", "eventBus", "onDelete", "onEdit"]))), 128)),
|
|
35
|
-
T("div",
|
|
36
|
-
|
|
35
|
+
T("div", C, [
|
|
36
|
+
r(i(k), {
|
|
37
37
|
class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
|
|
38
38
|
size: "sm",
|
|
39
39
|
variant: "ghost",
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: o[0] || (o[0] = () => a())
|
|
41
41
|
}, {
|
|
42
|
-
default:
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
default: g(() => [
|
|
43
|
+
r(i(M)),
|
|
44
|
+
o[1] || (o[1] = h(" Add Environment ", -1))
|
|
45
45
|
]),
|
|
46
46
|
_: 1
|
|
47
47
|
})
|
|
48
48
|
]),
|
|
49
|
-
|
|
49
|
+
r(N, {
|
|
50
50
|
collectionType: e.collectionType,
|
|
51
51
|
environments: e.environments,
|
|
52
52
|
eventBus: e.eventBus,
|
|
53
|
-
selectedEnvironmentName:
|
|
54
|
-
state:
|
|
53
|
+
selectedEnvironmentName: t.value,
|
|
54
|
+
state: i(s)
|
|
55
55
|
}, null, 8, ["collectionType", "environments", "eventBus", "selectedEnvironmentName", "state"]),
|
|
56
|
-
|
|
57
|
-
name:
|
|
58
|
-
state:
|
|
59
|
-
onSubmit:
|
|
56
|
+
r(S, {
|
|
57
|
+
name: t.value,
|
|
58
|
+
state: i(m),
|
|
59
|
+
onSubmit: p
|
|
60
60
|
}, null, 8, ["name", "state"])
|
|
61
61
|
], 64));
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
A as default
|
|
66
66
|
};
|