@scalar/api-client 3.19.2 → 3.20.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 +64 -0
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/SectionFilter.vue.d.ts +2 -0
- package/dist/components/SectionFilter.vue.d.ts.map +1 -1
- package/dist/components/SectionFilter.vue.js +1 -1
- package/dist/components/SectionFilter.vue.js.map +1 -1
- package/dist/components/SectionFilter.vue.script.js +11 -8
- package/dist/components/SectionFilter.vue.script.js.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.script.js +5 -3
- package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.script.js +6 -3
- package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js +4 -2
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +3 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -1
- package/dist/style.css +159 -135
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +10 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +46 -5
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js +15 -8
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +4 -2
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +4 -3
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +51 -26
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +28 -8
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js +9 -3
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +6 -4
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +3 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +7 -5
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +40 -7
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +12 -12
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +24 -20
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +6 -4
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +5 -4
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -0
- 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.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +37 -13
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts +3 -3
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js +5 -3
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +3 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +11 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +8 -6
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +109 -56
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +5 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +6 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +7 -5
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +4 -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 +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +22 -14
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +4 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +11 -6
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts +4 -0
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +100 -0
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.d.ts +13 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.js +97 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +3 -1
- 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 +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +42 -29
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +6 -6
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +7 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +21 -16
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +7 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +7 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +105 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +10 -8
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +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/OAuthScopesInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +14 -9
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +6 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
- 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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
- 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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +40 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts +108 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +12 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js +8 -5
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js +8 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js +11 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts +19 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +117 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -1
- 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 +15 -11
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js +8 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +6 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +8 -6
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -4
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.script.js +10 -10
- package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +4 -4
- package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.script.js +8 -5
- package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts +4 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +7 -3
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
- package/dist/v2/components/code-input/code-variable-widget.d.ts +3 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
- package/dist/v2/components/code-input/code-variable-widget.js +6 -3
- package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +0 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +4 -2
- package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.script.js +5 -3
- package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +12 -9
- package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.script.js +5 -3
- package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js +3 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.script.js +3 -1
- package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.script.js +5 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js +9 -5
- package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.script.js +4 -2
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +4 -2
- package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +4 -2
- package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +4 -2
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +2 -2
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.script.js +4 -2
- package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.script.js +12 -10
- package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +5 -3
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +9 -6
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +6 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +22 -10
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
- package/dist/v2/features/localization/index.d.ts +18 -0
- package/dist/v2/features/localization/index.d.ts.map +1 -0
- package/dist/v2/features/localization/index.js +35 -0
- package/dist/v2/features/localization/index.js.map +1 -0
- package/dist/v2/features/localization/locales/ar.d.ts +385 -0
- package/dist/v2/features/localization/locales/ar.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/ar.js +345 -0
- package/dist/v2/features/localization/locales/ar.js.map +1 -0
- package/dist/v2/features/localization/locales/de.d.ts +385 -0
- package/dist/v2/features/localization/locales/de.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/de.js +345 -0
- package/dist/v2/features/localization/locales/de.js.map +1 -0
- package/dist/v2/features/localization/locales/es.d.ts +385 -0
- package/dist/v2/features/localization/locales/es.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/es.js +345 -0
- package/dist/v2/features/localization/locales/es.js.map +1 -0
- package/dist/v2/features/localization/locales/fr.d.ts +385 -0
- package/dist/v2/features/localization/locales/fr.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/fr.js +345 -0
- package/dist/v2/features/localization/locales/fr.js.map +1 -0
- package/dist/v2/features/localization/locales/pt.d.ts +385 -0
- package/dist/v2/features/localization/locales/pt.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/pt.js +345 -0
- package/dist/v2/features/localization/locales/pt.js.map +1 -0
- package/dist/v2/features/localization/locales/ru.d.ts +385 -0
- package/dist/v2/features/localization/locales/ru.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/ru.js +345 -0
- package/dist/v2/features/localization/locales/ru.js.map +1 -0
- package/dist/v2/features/localization/locales/zh-cn.d.ts +385 -0
- package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/zh-cn.js +345 -0
- package/dist/v2/features/localization/locales/zh-cn.js.map +1 -0
- package/dist/v2/features/localization/translations.d.ts +385 -0
- package/dist/v2/features/localization/translations.d.ts.map +1 -0
- package/dist/v2/features/localization/translations.js +345 -0
- package/dist/v2/features/localization/translations.js.map +1 -0
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js +17 -4
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/use-lazy-api-client.d.ts +11 -0
- package/dist/v2/features/modal/use-lazy-api-client.d.ts.map +1 -0
- package/dist/v2/features/modal/use-lazy-api-client.js +48 -0
- package/dist/v2/features/modal/use-lazy-api-client.js.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts +2 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.script.js +50 -12
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +12 -8
- package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.script.js +14 -10
- package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/v2/types/options.d.ts +1 -1
- package/dist/v2/types/options.d.ts.map +1 -1
- package/dist/v2/workspace-events.d.ts +2 -2
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +8 -1
- package/dist/v2/workspace-events.js.map +1 -1
- package/dist/vue-styles.css +124 -125
- package/package.json +22 -11
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { useLocalization } from "../../../features/localization/index.js";
|
|
1
2
|
import DataTable_default from "../../../components/data-table/DataTable.vue.js";
|
|
2
3
|
import DataTableHeader_default from "../../../components/data-table/DataTableHeader.vue.js";
|
|
3
4
|
import DataTableRow_default from "../../../components/data-table/DataTableRow.vue.js";
|
|
4
5
|
import DataTableText_default from "../../../components/data-table/DataTableText.vue.js";
|
|
5
6
|
import CollapsibleSection_default from "../../../components/layout/CollapsibleSection.vue.js";
|
|
6
|
-
import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, unref, withCtx } from "vue";
|
|
7
|
+
import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
7
8
|
//#region src/v2/blocks/response-block/components/ResponseCookies.vue?vue&type=script&setup=true&lang.ts
|
|
8
9
|
var _hoisted_1 = {
|
|
9
10
|
key: 0,
|
|
@@ -17,23 +18,24 @@ var ResponseCookies_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
17
18
|
__name: "ResponseCookies",
|
|
18
19
|
props: { cookies: {} },
|
|
19
20
|
setup(__props) {
|
|
21
|
+
const { translate } = useLocalization();
|
|
20
22
|
return (_ctx, _cache) => {
|
|
21
23
|
return openBlock(), createBlock(unref(CollapsibleSection_default), {
|
|
22
24
|
class: "overflow-auto",
|
|
23
25
|
defaultOpen: false,
|
|
24
26
|
itemCount: __props.cookies.length
|
|
25
27
|
}, {
|
|
26
|
-
title: withCtx(() => [
|
|
28
|
+
title: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.responseCookies.cookies")), 1)]),
|
|
27
29
|
default: withCtx(() => [__props.cookies.length ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(unref(DataTable_default), {
|
|
28
30
|
columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
|
|
29
31
|
scroll: ""
|
|
30
32
|
}, {
|
|
31
33
|
default: withCtx(() => [createVNode(unref(DataTableRow_default), { class: "sr-only !block" }, {
|
|
32
34
|
default: withCtx(() => [createVNode(unref(DataTableHeader_default), null, {
|
|
33
|
-
default: withCtx(() => [
|
|
35
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.responseCookies.cookieName")), 1)]),
|
|
34
36
|
_: 1
|
|
35
37
|
}), createVNode(unref(DataTableHeader_default), null, {
|
|
36
|
-
default: withCtx(() => [
|
|
38
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.responseCookies.cookieValue")), 1)]),
|
|
37
39
|
_: 1
|
|
38
40
|
})]),
|
|
39
41
|
_: 1
|
|
@@ -53,7 +55,7 @@ var ResponseCookies_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
53
55
|
}, 1024);
|
|
54
56
|
}), 128))]),
|
|
55
57
|
_: 1
|
|
56
|
-
})])) : (openBlock(), createElementBlock("div", _hoisted_2, "
|
|
58
|
+
})])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(translate)("apiClient.responseCookies.noCookies")), 1))]),
|
|
57
59
|
_: 1
|
|
58
60
|
}, 8, ["itemCount"]);
|
|
59
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseCookies.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n DataTable,\n DataTableHeader,\n DataTableRow,\n DataTableText,\n} from '@/v2/components/data-table'\nimport { CollapsibleSection } from '@/v2/components/layout'\n\ndefineProps<{\n cookies: { name: string; value: string }[]\n}>()\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"cookies.length\">\n <template #title
|
|
1
|
+
{"version":3,"file":"ResponseCookies.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseCookies.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n DataTable,\n DataTableHeader,\n DataTableRow,\n DataTableText,\n} from '@/v2/components/data-table'\nimport { CollapsibleSection } from '@/v2/components/layout'\nimport { useLocalization } from '@/v2/features/localization'\n\ndefineProps<{\n cookies: { name: string; value: string }[]\n}>()\n\nconst { translate } = useLocalization()\n</script>\n<template>\n <CollapsibleSection\n class=\"overflow-auto\"\n :defaultOpen=\"false\"\n :itemCount=\"cookies.length\">\n <template #title>\n {{ translate('apiClient.responseCookies.cookies') }}\n </template>\n <div\n v-if=\"cookies.length\"\n class=\"max-h-[calc(100%-32px)] overflow-y-auto\">\n <DataTable\n :columns=\"['minmax(auto, min-content)', 'minmax(50%, 1fr)']\"\n scroll>\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>\n {{ translate('apiClient.responseCookies.cookieName') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.responseCookies.cookieValue') }}\n </DataTableHeader>\n </DataTableRow>\n <DataTableRow\n v-for=\"(item, index) in cookies\"\n :key=\"item.name\"\n class=\"group/row text-c-1\">\n <DataTableText\n class=\"bg-b-1 sticky left-0 z-1 max-w-full\"\n :class=\"{ 'border-t-0': index === 0 }\"\n :text=\"item.name\" />\n <DataTableText\n class=\"z-0\"\n :class=\"{ 'border-t-0': index === 0 }\"\n :text=\"item.value\" />\n </DataTableRow>\n </DataTable>\n </div>\n <!-- Empty state -->\n <div\n v-else\n class=\"text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm\">\n {{ translate('apiClient.responseCookies.noCookies') }}\n </div>\n </CollapsibleSection>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAcA,MAAM,EAAE,cAAc,gBAAgB;;uBAGpC,YA0CqB,MAAA,0BAAA,GAAA;IAzCnB,OAAM;IACL,aAAa;IACb,WAAW,QAAA,QAAQ;;IACT,OAAK,cACsC,CAAA,gBAAA,gBAAjD,MAAA,SAAA,CAAS,CAAA,mCAAA,CAAA,GAAA,CAAA,CAAA,CAAA;2BA8BR,CA3BE,QAAA,QAAQ,UAAA,UAAA,GADhB,mBA4BM,OA5BN,YA4BM,CAzBJ,YAwBY,MAAA,iBAAA,GAAA;KAvBT,SAAS,CAAA,6BAAA,kBAAA;KACV,QAAA;;4BAQe,CAPf,YAOe,MAAA,oBAAA,GAAA,EAPD,OAAM,iBAAgB,GAAA;6BAGhB,CAFlB,YAEkB,MAAA,uBAAA,GAAA,MAAA;8BADuC,CAAA,gBAAA,gBAApD,MAAA,SAAA,CAAS,CAAA,sCAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;UAEd,YAEkB,MAAA,uBAAA,GAAA,MAAA;8BADwC,CAAA,gBAAA,gBAArD,MAAA,SAAA,CAAS,CAAA,uCAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;;2BAGhB,mBAYe,UAAA,MAAA,WAXW,QAAA,UAAhB,MAAM,UAAK;0BADrB,YAYe,MAAA,oBAAA,GAAA;OAVZ,KAAK,KAAK;OACX,OAAM;;8BAIgB,CAHtB,YAGsB,MAAA,qBAAA,GAAA;QAFpB,OAAK,eAAA,CAAC,uCAAqC,EAAA,cACnB,UAAK,EAAA,CAAA,CAAA;QAC5B,MAAM,KAAK;uCACd,YAGuB,MAAA,qBAAA,GAAA;QAFrB,OAAK,eAAA,CAAC,OAAK,EAAA,cACa,UAAK,EAAA,CAAA,CAAA;QAC5B,MAAM,KAAK;;;;;;0BAKpB,mBAIM,OAJN,YAIM,gBADD,MAAA,SAAA,CAAS,CAAA,qCAAA,CAAA,GAAA,CAAA,EAAA,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ClientLayout } from '../../../../v2/types/layout';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
/** Wait for the selected external request example before sending. */
|
|
4
|
+
executionDisabled?: boolean;
|
|
3
5
|
/** Client layout */
|
|
4
6
|
layout: ClientLayout;
|
|
5
7
|
/** Total number of performed requests */
|
|
@@ -8,12 +10,12 @@ type __VLS_Props = {
|
|
|
8
10
|
appVersion: string;
|
|
9
11
|
};
|
|
10
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
-
addRequest: () => any;
|
|
12
13
|
sendRequest: () => any;
|
|
14
|
+
addRequest: () => any;
|
|
13
15
|
openCommandPalette: () => any;
|
|
14
16
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
-
onAddRequest?: (() => any) | undefined;
|
|
16
17
|
onSendRequest?: (() => any) | undefined;
|
|
18
|
+
onAddRequest?: (() => any) | undefined;
|
|
17
19
|
onOpenCommandPalette?: (() => any) | undefined;
|
|
18
20
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"names":[],"mappings":"AAqIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC;AAwMF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
|
|
|
2
2
|
import ResponseEmpty_vue_vue_type_script_setup_true_lang_default from "./ResponseEmpty.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/v2/blocks/response-block/components/ResponseEmpty.vue
|
|
5
|
-
var ResponseEmpty_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseEmpty_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ResponseEmpty_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseEmpty_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-8ed574de"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ResponseEmpty_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarHotkey } from '@scalar/components/hotkey'\n\nimport Computer from '@/assets/computer.ascii?raw'\nimport { ScalarAsciiArt } from '@/components/ScalarAsciiArt'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { totalPerformedRequests, layout, appVersion } = defineProps<{\n /** Client layout */\n layout: ClientLayout\n /** Total number of performed requests */\n totalPerformedRequests: number\n /** Application version */\n appVersion: string\n}>()\n\nconst emits = defineEmits<{\n (e: 'addRequest'): void\n (e: 'sendRequest'): void\n (e: 'openCommandPalette'): void\n}>()\n</script>\n<template>\n <div class=\"flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize\">\n <div\n class=\"flex h-[calc(100%_-_50px)] flex-col items-center justify-center\"\n :class=\"{\n 'hidden opacity-0': totalPerformedRequests > 0 && layout !== 'modal',\n }\">\n <div\n v-if=\"layout !== 'modal'\"\n class=\"scalar-version-number\">\n
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarHotkey } from '@scalar/components/hotkey'\n\nimport Computer from '@/assets/computer.ascii?raw'\nimport { ScalarAsciiArt } from '@/components/ScalarAsciiArt'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { totalPerformedRequests, layout, appVersion } = defineProps<{\n /** Wait for the selected external request example before sending. */\n executionDisabled?: boolean\n /** Client layout */\n layout: ClientLayout\n /** Total number of performed requests */\n totalPerformedRequests: number\n /** Application version */\n appVersion: string\n}>()\n\nconst emits = defineEmits<{\n (e: 'addRequest'): void\n (e: 'sendRequest'): void\n (e: 'openCommandPalette'): void\n}>()\n\nconst { translate } = useLocalization()\n</script>\n<template>\n <div class=\"flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize\">\n <div\n class=\"flex h-[calc(100%_-_50px)] flex-col items-center justify-center\"\n :class=\"{\n 'hidden opacity-0': totalPerformedRequests > 0 && layout !== 'modal',\n }\">\n <div\n v-if=\"layout !== 'modal'\"\n class=\"scalar-version-number\">\n {{\n translate('apiClient.responseEmpty.version', { version: appVersion })\n }}\n <div class=\"mt-2\">\n <a\n href=\"https://github.com/scalar/scalar/issues/2669\"\n target=\"_blank\"\n >{{ translate('apiClient.responseEmpty.roadmap') }}</a\n >\n </div>\n </div>\n <a\n class=\"gitbook-show scalar-version-number\"\n href=\"https://www.scalar.com\"\n target=\"_blank\"\n >{{ translate('apiClient.responseEmpty.poweredByScalarcom') }}</a\n >\n <ScalarAsciiArt\n :art=\"Computer\"\n class=\"text-c-3\" />\n </div>\n\n <div\n class=\"text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm\">\n <button\n v-if=\"layout !== 'modal'\"\n class=\"flex items-center gap-1.5\"\n type=\"button\"\n @click=\"emits('openCommandPalette')\">\n {{ translate('apiClient.responseEmpty.getStarted')\n }}<ScalarHotkey\n hotkey=\"k\"\n :modifier=\"['default']\" />\n </button>\n <button\n v-if=\"layout === 'desktop'\"\n class=\"flex items-center gap-1.5\"\n type=\"button\"\n @click=\"emits('addRequest')\">\n {{ translate('apiClient.responseEmpty.newRequest')\n }}<ScalarHotkey hotkey=\"N\" />\n </button>\n <button\n class=\"flex items-center gap-1.5\"\n :disabled=\"executionDisabled\"\n type=\"button\"\n @click=\"emits('sendRequest')\">\n {{ translate('apiClient.responseEmpty.sendRequest')\n }}<ScalarHotkey hotkey=\"↵\" />\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n.scalar-version-number {\n transform: skew(0deg, 13deg);\n width: 76px;\n height: 76px;\n position: absolute;\n margin-left: -36px;\n font-size: 8px;\n font-family: var(--scalar-font-code);\n line-height: 11px;\n margin-top: -113px;\n border-radius: 9px 9px 16px 12px;\n box-shadow: inset 2px 0px 0 2px var(--scalar-background-2);\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-transform: initial;\n text-decoration-color: var(--scalar-color-3);\n}\n.scalar-version-number a {\n font-weight: bold;\n font-weight: bold;\n background: var(--scalar-background-2);\n padding: 2px 4px;\n border-radius: 3px;\n text-decoration: none;\n border: 0.5px solid var(--scalar-border-color);\n}\n\n.gitbook-show {\n display: none;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocalization } from "../../../features/localization/index.js";
|
|
1
2
|
import ScalarAsciiArt_default from "../../../../components/ScalarAsciiArt/ScalarAsciiArt.vue.js";
|
|
2
3
|
import computer_default from "../../../../assets/computer.ascii.virtual.js";
|
|
3
4
|
import { createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
|
|
@@ -8,10 +9,22 @@ var _hoisted_2 = {
|
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "scalar-version-number"
|
|
10
11
|
};
|
|
11
|
-
var _hoisted_3 = { class: "
|
|
12
|
+
var _hoisted_3 = { class: "mt-2" };
|
|
13
|
+
var _hoisted_4 = {
|
|
14
|
+
href: "https://github.com/scalar/scalar/issues/2669",
|
|
15
|
+
target: "_blank"
|
|
16
|
+
};
|
|
17
|
+
var _hoisted_5 = {
|
|
18
|
+
class: "gitbook-show scalar-version-number",
|
|
19
|
+
href: "https://www.scalar.com",
|
|
20
|
+
target: "_blank"
|
|
21
|
+
};
|
|
22
|
+
var _hoisted_6 = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" };
|
|
23
|
+
var _hoisted_7 = ["disabled"];
|
|
12
24
|
var ResponseEmpty_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
13
25
|
__name: "ResponseEmpty",
|
|
14
26
|
props: {
|
|
27
|
+
executionDisabled: { type: Boolean },
|
|
15
28
|
layout: {},
|
|
16
29
|
totalPerformedRequests: {},
|
|
17
30
|
appVersion: {}
|
|
@@ -23,28 +36,22 @@ var ResponseEmpty_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
23
36
|
],
|
|
24
37
|
setup(__props, { emit: __emit }) {
|
|
25
38
|
const emits = __emit;
|
|
39
|
+
const { translate } = useLocalization();
|
|
26
40
|
return (_ctx, _cache) => {
|
|
27
41
|
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", { class: normalizeClass(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", { "hidden opacity-0": __props.totalPerformedRequests > 0 && __props.layout !== "modal" }]) }, [
|
|
28
|
-
__props.layout !== "modal" ? (openBlock(), createElementBlock("div", _hoisted_2, [createTextVNode("
|
|
29
|
-
|
|
30
|
-
target: "_blank"
|
|
31
|
-
}, " Roadmap ")], -1))])) : createCommentVNode("", true),
|
|
32
|
-
_cache[4] || (_cache[4] = createElementVNode("a", {
|
|
33
|
-
class: "gitbook-show scalar-version-number",
|
|
34
|
-
href: "https://www.scalar.com",
|
|
35
|
-
target: "_blank"
|
|
36
|
-
}, " Powered By Scalar.com ", -1)),
|
|
42
|
+
__props.layout !== "modal" ? (openBlock(), createElementBlock("div", _hoisted_2, [createTextVNode(toDisplayString(unref(translate)("apiClient.responseEmpty.version", { version: __props.appVersion })) + " ", 1), createElementVNode("div", _hoisted_3, [createElementVNode("a", _hoisted_4, toDisplayString(unref(translate)("apiClient.responseEmpty.roadmap")), 1)])])) : createCommentVNode("", true),
|
|
43
|
+
createElementVNode("a", _hoisted_5, toDisplayString(unref(translate)("apiClient.responseEmpty.poweredByScalarcom")), 1),
|
|
37
44
|
createVNode(unref(ScalarAsciiArt_default), {
|
|
38
45
|
art: unref(computer_default),
|
|
39
46
|
class: "text-c-3"
|
|
40
47
|
}, null, 8, ["art"])
|
|
41
|
-
], 2), createElementVNode("div",
|
|
48
|
+
], 2), createElementVNode("div", _hoisted_6, [
|
|
42
49
|
__props.layout !== "modal" ? (openBlock(), createElementBlock("button", {
|
|
43
50
|
key: 0,
|
|
44
51
|
class: "flex items-center gap-1.5",
|
|
45
52
|
type: "button",
|
|
46
53
|
onClick: _cache[0] || (_cache[0] = ($event) => emits("openCommandPalette"))
|
|
47
|
-
}, [
|
|
54
|
+
}, [createTextVNode(toDisplayString(unref(translate)("apiClient.responseEmpty.getStarted")), 1), createVNode(unref(ScalarHotkey), {
|
|
48
55
|
hotkey: "k",
|
|
49
56
|
modifier: ["default"]
|
|
50
57
|
})])) : createCommentVNode("", true),
|
|
@@ -53,12 +60,13 @@ var ResponseEmpty_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
53
60
|
class: "flex items-center gap-1.5",
|
|
54
61
|
type: "button",
|
|
55
62
|
onClick: _cache[1] || (_cache[1] = ($event) => emits("addRequest"))
|
|
56
|
-
}, [
|
|
63
|
+
}, [createTextVNode(toDisplayString(unref(translate)("apiClient.responseEmpty.newRequest")), 1), createVNode(unref(ScalarHotkey), { hotkey: "N" })])) : createCommentVNode("", true),
|
|
57
64
|
createElementVNode("button", {
|
|
58
65
|
class: "flex items-center gap-1.5",
|
|
66
|
+
disabled: __props.executionDisabled,
|
|
59
67
|
type: "button",
|
|
60
68
|
onClick: _cache[2] || (_cache[2] = ($event) => emits("sendRequest"))
|
|
61
|
-
}, [
|
|
69
|
+
}, [createTextVNode(toDisplayString(unref(translate)("apiClient.responseEmpty.sendRequest")), 1), createVNode(unref(ScalarHotkey), { hotkey: "↵" })], 8, _hoisted_7)
|
|
62
70
|
])]);
|
|
63
71
|
};
|
|
64
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarHotkey } from '@scalar/components/hotkey'\n\nimport Computer from '@/assets/computer.ascii?raw'\nimport { ScalarAsciiArt } from '@/components/ScalarAsciiArt'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { totalPerformedRequests, layout, appVersion } = defineProps<{\n /** Client layout */\n layout: ClientLayout\n /** Total number of performed requests */\n totalPerformedRequests: number\n /** Application version */\n appVersion: string\n}>()\n\nconst emits = defineEmits<{\n (e: 'addRequest'): void\n (e: 'sendRequest'): void\n (e: 'openCommandPalette'): void\n}>()\n</script>\n<template>\n <div class=\"flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize\">\n <div\n class=\"flex h-[calc(100%_-_50px)] flex-col items-center justify-center\"\n :class=\"{\n 'hidden opacity-0': totalPerformedRequests > 0 && layout !== 'modal',\n }\">\n <div\n v-if=\"layout !== 'modal'\"\n class=\"scalar-version-number\">\n
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseEmpty.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarHotkey } from '@scalar/components/hotkey'\n\nimport Computer from '@/assets/computer.ascii?raw'\nimport { ScalarAsciiArt } from '@/components/ScalarAsciiArt'\nimport { useLocalization } from '@/v2/features/localization'\nimport type { ClientLayout } from '@/v2/types/layout'\n\nconst { totalPerformedRequests, layout, appVersion } = defineProps<{\n /** Wait for the selected external request example before sending. */\n executionDisabled?: boolean\n /** Client layout */\n layout: ClientLayout\n /** Total number of performed requests */\n totalPerformedRequests: number\n /** Application version */\n appVersion: string\n}>()\n\nconst emits = defineEmits<{\n (e: 'addRequest'): void\n (e: 'sendRequest'): void\n (e: 'openCommandPalette'): void\n}>()\n\nconst { translate } = useLocalization()\n</script>\n<template>\n <div class=\"flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize\">\n <div\n class=\"flex h-[calc(100%_-_50px)] flex-col items-center justify-center\"\n :class=\"{\n 'hidden opacity-0': totalPerformedRequests > 0 && layout !== 'modal',\n }\">\n <div\n v-if=\"layout !== 'modal'\"\n class=\"scalar-version-number\">\n {{\n translate('apiClient.responseEmpty.version', { version: appVersion })\n }}\n <div class=\"mt-2\">\n <a\n href=\"https://github.com/scalar/scalar/issues/2669\"\n target=\"_blank\"\n >{{ translate('apiClient.responseEmpty.roadmap') }}</a\n >\n </div>\n </div>\n <a\n class=\"gitbook-show scalar-version-number\"\n href=\"https://www.scalar.com\"\n target=\"_blank\"\n >{{ translate('apiClient.responseEmpty.poweredByScalarcom') }}</a\n >\n <ScalarAsciiArt\n :art=\"Computer\"\n class=\"text-c-3\" />\n </div>\n\n <div\n class=\"text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm\">\n <button\n v-if=\"layout !== 'modal'\"\n class=\"flex items-center gap-1.5\"\n type=\"button\"\n @click=\"emits('openCommandPalette')\">\n {{ translate('apiClient.responseEmpty.getStarted')\n }}<ScalarHotkey\n hotkey=\"k\"\n :modifier=\"['default']\" />\n </button>\n <button\n v-if=\"layout === 'desktop'\"\n class=\"flex items-center gap-1.5\"\n type=\"button\"\n @click=\"emits('addRequest')\">\n {{ translate('apiClient.responseEmpty.newRequest')\n }}<ScalarHotkey hotkey=\"N\" />\n </button>\n <button\n class=\"flex items-center gap-1.5\"\n :disabled=\"executionDisabled\"\n type=\"button\"\n @click=\"emits('sendRequest')\">\n {{ translate('apiClient.responseEmpty.sendRequest')\n }}<ScalarHotkey hotkey=\"↵\" />\n </button>\n </div>\n </div>\n</template>\n<style scoped>\n.scalar-version-number {\n transform: skew(0deg, 13deg);\n width: 76px;\n height: 76px;\n position: absolute;\n margin-left: -36px;\n font-size: 8px;\n font-family: var(--scalar-font-code);\n line-height: 11px;\n margin-top: -113px;\n border-radius: 9px 9px 16px 12px;\n box-shadow: inset 2px 0px 0 2px var(--scalar-background-2);\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-transform: initial;\n text-decoration-color: var(--scalar-color-3);\n}\n.scalar-version-number a {\n font-weight: bold;\n font-weight: bold;\n background: var(--scalar-background-2);\n padding: 2px 4px;\n border-radius: 3px;\n text-decoration: none;\n border: 0.5px solid var(--scalar-border-color);\n}\n\n.gitbook-show {\n display: none;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBA,MAAM,QAAQ;EAMd,MAAM,EAAE,cAAc,gBAAgB;;uBAGpC,mBA4DM,OA5DN,YA4DM,CA3DJ,mBA4BM,OAAA,EA3BJ,OAAK,eAAA,CAAC,mEAAiE,EAAA,oBACjC,QAAA,yBAAsB,KAAQ,QAAA,WAAM,QAAA,CAAA,CAAA,EAAA,GAAA;IAIlE,QAAA,WAAM,WAAA,UAAA,GADd,mBAaM,OAbN,YAaM,CAAA,gBAAA,gBATF,MAAA,SAAA,CAAS,CAAA,mCAAA,EAAA,SAA+C,QAAA,WAAU,CAAA,CAAA,IAClE,KACF,CAAA,GAAA,mBAMM,OANN,YAMM,CALJ,mBAIC,KAJD,YAIC,gBADK,MAAA,SAAA,CAAS,CAAA,iCAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAInB,mBAKC,KALD,YAKC,gBADK,MAAA,SAAA,CAAS,CAAA,4CAAA,CAAA,GAAA,CAAA;IAEf,YAEqB,MAAA,sBAAA,GAAA;KADlB,KAAK,MAAA,gBAAA;KACN,OAAM;;UAGV,mBA4BM,OA5BN,YA4BM;IAzBI,QAAA,WAAM,WAAA,UAAA,GADd,mBASS,UAAA;;KAPP,OAAM;KACN,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAK,oBAAA;wCACV,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,GACV,YAE0B,MAAA,YAAA,GAAA;KAD1B,QAAO;KACN,UAAU,CAAA,SAAA;;IAGP,QAAA,WAAM,aAAA,UAAA,GADd,mBAOS,UAAA;;KALP,OAAM;KACN,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAK,YAAA;wCACV,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,GACV,YAA2B,MAAA,YAAA,GAAA,EAAb,QAAO,IAAG,CAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAE5B,mBAOS,UAAA;KANP,OAAM;KACL,UAAU,QAAA;KACX,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAK,aAAA;wCACV,MAAA,SAAA,CAAS,CAAA,qCAAA,CAAA,GAAA,CAAA,GACV,YAA2B,MAAA,YAAA,GAAA,EAAb,QAAO,IAAG,CAAA,CAAA,GAAA,GAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,0BAA0B;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAkIF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
|
|
|
2
2
|
import ResponseLoadingOverlay_vue_vue_type_script_setup_true_lang_default from "./ResponseLoadingOverlay.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue
|
|
5
|
-
var ResponseLoadingOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseLoadingOverlay_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ResponseLoadingOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ResponseLoadingOverlay_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-28d73262"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ResponseLoadingOverlay_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseLoadingOverlay.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarLoading, useLoadingState } from '@scalar/components/loading'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\n\nconst { eventBus } = defineProps<{\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst loader = useLoadingState()\nconst timeout = ref<ReturnType<typeof setTimeout>>()\n\nconst startLoading = () => {\n // Replace any pending delayed start so overlapping `hooks:on:request:sent` events\n // (rapid send, navigation, double submit) cannot leave an orphaned timer that\n // calls `loader.start()` after the matching request already completed.\n clearTimeout(timeout.value)\n timeout.value = setTimeout(() => loader.start(), 1000)\n}\n\nconst stopLoading = () => {\n clearTimeout(timeout.value)\n timeout.value = undefined\n void loader.clear()\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n stopLoading()\n})\n</script>\n<template>\n <Transition>\n <div\n v-if=\"loader.isActive\"\n class=\"bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6\">\n <ScalarLoading\n class=\"text-c-3\"\n :loader\n size=\"3xl\" />\n <ScalarButton\n variant=\"ghost\"\n @click=\"eventBus.emit('operation:cancel:request')\">\n
|
|
1
|
+
{"version":3,"file":"ResponseLoadingOverlay.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarLoading, useLoadingState } from '@scalar/components/loading'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { eventBus } = defineProps<{\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst loader = useLoadingState()\nconst timeout = ref<ReturnType<typeof setTimeout>>()\n\nconst startLoading = () => {\n // Replace any pending delayed start so overlapping `hooks:on:request:sent` events\n // (rapid send, navigation, double submit) cannot leave an orphaned timer that\n // calls `loader.start()` after the matching request already completed.\n clearTimeout(timeout.value)\n timeout.value = setTimeout(() => loader.start(), 1000)\n}\n\nconst stopLoading = () => {\n clearTimeout(timeout.value)\n timeout.value = undefined\n void loader.clear()\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n stopLoading()\n})\n</script>\n<template>\n <Transition>\n <div\n v-if=\"loader.isActive\"\n class=\"bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6\">\n <ScalarLoading\n class=\"text-c-3\"\n :loader\n size=\"3xl\" />\n <ScalarButton\n variant=\"ghost\"\n @click=\"eventBus.emit('operation:cancel:request')\">\n {{ translate('apiClient.responseLoadingOverlay.cancel') }}\n </ScalarButton>\n </div>\n </Transition>\n</template>\n<style scoped>\n.v-enter-active {\n transition: opacity 0.5s ease;\n}\n\n.v-enter-from {\n opacity: 0;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLocalization } from "../../../features/localization/index.js";
|
|
2
|
+
import { Transition, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, withCtx } from "vue";
|
|
2
3
|
import { ScalarButton } from "@scalar/components/button";
|
|
3
4
|
import { ScalarLoading, useLoadingState } from "@scalar/components/loading";
|
|
4
5
|
//#region src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -10,6 +11,7 @@ var ResponseLoadingOverlay_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
10
11
|
__name: "ResponseLoadingOverlay",
|
|
11
12
|
props: { eventBus: {} },
|
|
12
13
|
setup(__props) {
|
|
14
|
+
const { translate } = useLocalization();
|
|
13
15
|
const loader = useLoadingState();
|
|
14
16
|
const timeout = ref();
|
|
15
17
|
const startLoading = () => {
|
|
@@ -40,7 +42,7 @@ var ResponseLoadingOverlay_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
40
42
|
variant: "ghost",
|
|
41
43
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.eventBus.emit("operation:cancel:request"))
|
|
42
44
|
}, {
|
|
43
|
-
default: withCtx(() => [
|
|
45
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.responseLoadingOverlay.cancel")), 1)]),
|
|
44
46
|
_: 1
|
|
45
47
|
})])) : createCommentVNode("", true)]),
|
|
46
48
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseLoadingOverlay.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarLoading, useLoadingState } from '@scalar/components/loading'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\n\nconst { eventBus } = defineProps<{\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst loader = useLoadingState()\nconst timeout = ref<ReturnType<typeof setTimeout>>()\n\nconst startLoading = () => {\n // Replace any pending delayed start so overlapping `hooks:on:request:sent` events\n // (rapid send, navigation, double submit) cannot leave an orphaned timer that\n // calls `loader.start()` after the matching request already completed.\n clearTimeout(timeout.value)\n timeout.value = setTimeout(() => loader.start(), 1000)\n}\n\nconst stopLoading = () => {\n clearTimeout(timeout.value)\n timeout.value = undefined\n void loader.clear()\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n stopLoading()\n})\n</script>\n<template>\n <Transition>\n <div\n v-if=\"loader.isActive\"\n class=\"bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6\">\n <ScalarLoading\n class=\"text-c-3\"\n :loader\n size=\"3xl\" />\n <ScalarButton\n variant=\"ghost\"\n @click=\"eventBus.emit('operation:cancel:request')\">\n
|
|
1
|
+
{"version":3,"file":"ResponseLoadingOverlay.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseLoadingOverlay.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarLoading, useLoadingState } from '@scalar/components/loading'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { eventBus } = defineProps<{\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst loader = useLoadingState()\nconst timeout = ref<ReturnType<typeof setTimeout>>()\n\nconst startLoading = () => {\n // Replace any pending delayed start so overlapping `hooks:on:request:sent` events\n // (rapid send, navigation, double submit) cannot leave an orphaned timer that\n // calls `loader.start()` after the matching request already completed.\n clearTimeout(timeout.value)\n timeout.value = setTimeout(() => loader.start(), 1000)\n}\n\nconst stopLoading = () => {\n clearTimeout(timeout.value)\n timeout.value = undefined\n void loader.clear()\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startLoading)\n eventBus.on('hooks:on:request:complete', stopLoading)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startLoading)\n eventBus.off('hooks:on:request:complete', stopLoading)\n stopLoading()\n})\n</script>\n<template>\n <Transition>\n <div\n v-if=\"loader.isActive\"\n class=\"bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6\">\n <ScalarLoading\n class=\"text-c-3\"\n :loader\n size=\"3xl\" />\n <ScalarButton\n variant=\"ghost\"\n @click=\"eventBus.emit('operation:cancel:request')\">\n {{ translate('apiClient.responseLoadingOverlay.cancel') }}\n </ScalarButton>\n </div>\n </Transition>\n</template>\n<style scoped>\n.v-enter-active {\n transition: opacity 0.5s ease;\n}\n\n.v-enter-from {\n opacity: 0;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;EAaA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,SAAS,gBAAgB;EAC/B,MAAM,UAAU,IAAmC;EAEnD,MAAM,qBAAqB;GAIzB,aAAa,QAAQ,KAAK;GAC1B,QAAQ,QAAQ,iBAAiB,OAAO,MAAM,GAAG,GAAI;EACvD;EAEA,MAAM,oBAAoB;GACxB,aAAa,QAAQ,KAAK;GAC1B,QAAQ,QAAQ,KAAA;GAChB,OAAY,MAAM;EACpB;EAEA,gBAAgB;GACd,QAAA,SAAS,GAAG,yBAAyB,YAAY;GACjD,QAAA,SAAS,GAAG,6BAA6B,WAAW;EACtD,CAAC;EAED,sBAAsB;GACpB,QAAA,SAAS,IAAI,yBAAyB,YAAY;GAClD,QAAA,SAAS,IAAI,6BAA6B,WAAW;GACrD,YAAY;EACd,CAAC;;uBAGC,YAca,YAAA,MAAA;2BADL,CAXE,MAAA,MAAA,CAAM,CAAC,YAAA,UAAA,GADf,mBAYM,OAZN,YAYM,CATJ,YAGe,MAAA,aAAA,GAAA;KAFb,OAAM;KACL,QAAA,MAAA,MAAA;KACD,MAAK;6BACP,YAIe,MAAA,YAAA,GAAA;KAHb,SAAQ;KACP,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,QAAA,SAAS,KAAI,0BAAA;;4BACqC,CAAA,gBAAA,gBAAvD,MAAA,SAAA,CAAS,CAAA,yCAAA,CAAA,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAA;AAIxF,KAAK,WAAW,GAAG;IACjB,eAAe;IACf,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,0BAA0B;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA4JF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseMetaInformation.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n httpStatusCodes,\n type HttpStatusCode,\n} from '@scalar/helpers/http/http-status-codes'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport prettyMilliseconds from 'pretty-ms'\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { getContentLength } from '@/v2/blocks/response-block/helpers/get-content-length'\n\nconst { response, eventBus } = defineProps<{\n /** Response */\n response: ResponseInstance\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst interval = ref<ReturnType<typeof setInterval>>()\nconst stopwatch = ref(0)\n\nconst stopStopwatch = () => {\n clearInterval(interval.value)\n interval.value = undefined\n stopwatch.value = 0\n}\n\nconst startStopwatch = () => {\n interval.value = setInterval(() => (stopwatch.value += 1000), 1000)\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startStopwatch)\n eventBus.on('hooks:on:request:complete', stopStopwatch)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startStopwatch)\n eventBus.off('hooks:on:request:complete', stopStopwatch)\n stopStopwatch()\n})\n\n/** Status text for the response */\nconst statusCodeInformation = computed((): HttpStatusCode | undefined => {\n const responseStatusCode = response?.status\n\n if (!responseStatusCode) {\n return undefined\n }\n\n return httpStatusCodes[responseStatusCode] ?? undefined\n})\n</script>\n<template>\n <div class=\"text-c-1 flex gap-1.5\">\n <span v-if=\"interval && stopwatch\">{{\n prettyMilliseconds(stopwatch)\n }}</span>\n <template v-else>\n <span>\n <span class=\"sr-only\">
|
|
1
|
+
{"version":3,"file":"ResponseMetaInformation.vue.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n httpStatusCodes,\n type HttpStatusCode,\n} from '@scalar/helpers/http/http-status-codes'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport prettyMilliseconds from 'pretty-ms'\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { getContentLength } from '@/v2/blocks/response-block/helpers/get-content-length'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { response, eventBus } = defineProps<{\n /** Response */\n response: ResponseInstance\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst interval = ref<ReturnType<typeof setInterval>>()\nconst stopwatch = ref(0)\n\nconst stopStopwatch = () => {\n clearInterval(interval.value)\n interval.value = undefined\n stopwatch.value = 0\n}\n\nconst startStopwatch = () => {\n interval.value = setInterval(() => (stopwatch.value += 1000), 1000)\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startStopwatch)\n eventBus.on('hooks:on:request:complete', stopStopwatch)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startStopwatch)\n eventBus.off('hooks:on:request:complete', stopStopwatch)\n stopStopwatch()\n})\n\n/** Status text for the response */\nconst statusCodeInformation = computed((): HttpStatusCode | undefined => {\n const responseStatusCode = response?.status\n\n if (!responseStatusCode) {\n return undefined\n }\n\n return httpStatusCodes[responseStatusCode] ?? undefined\n})\n</script>\n<template>\n <div class=\"text-c-1 flex gap-1.5\">\n <span v-if=\"interval && stopwatch\">{{\n prettyMilliseconds(stopwatch)\n }}</span>\n <template v-else>\n <span>\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.duration')\n }}</span>\n {{ prettyMilliseconds(response.duration) }}\n </span>\n <span v-if=\"getContentLength(response)\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.size')\n }}</span>\n {{ getContentLength(response) }}\n </span>\n <template v-if=\"statusCodeInformation\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.status')\n }}</span>\n <HelpfulLink\n v-if=\"statusCodeInformation.url\"\n class=\"flex items-center gap-1.5\"\n :href=\"statusCodeInformation.url\">\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </HelpfulLink>\n <span v-else>\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </span>\n </template>\n </template>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocalization } from "../../../features/localization/index.js";
|
|
1
2
|
import HelpfulLink_default from "../../../../components/HelpfulLink.vue.js";
|
|
2
3
|
import { getContentLength } from "../helpers/get-content-length.js";
|
|
3
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, withCtx } from "vue";
|
|
@@ -6,8 +7,11 @@ import prettyMilliseconds from "pretty-ms";
|
|
|
6
7
|
//#region src/v2/blocks/response-block/components/ResponseMetaInformation.vue?vue&type=script&setup=true&lang.ts
|
|
7
8
|
var _hoisted_1 = { class: "text-c-1 flex gap-1.5" };
|
|
8
9
|
var _hoisted_2 = { key: 0 };
|
|
9
|
-
var _hoisted_3 = {
|
|
10
|
-
var _hoisted_4 = { key:
|
|
10
|
+
var _hoisted_3 = { class: "sr-only" };
|
|
11
|
+
var _hoisted_4 = { key: 0 };
|
|
12
|
+
var _hoisted_5 = { class: "sr-only" };
|
|
13
|
+
var _hoisted_6 = { class: "sr-only" };
|
|
14
|
+
var _hoisted_7 = { key: 1 };
|
|
11
15
|
var ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
12
16
|
__name: "ResponseMetaInformation",
|
|
13
17
|
props: {
|
|
@@ -15,6 +19,7 @@ var ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default = /*@__P
|
|
|
15
19
|
eventBus: {}
|
|
16
20
|
},
|
|
17
21
|
setup(__props) {
|
|
22
|
+
const { translate } = useLocalization();
|
|
18
23
|
const interval = ref();
|
|
19
24
|
const stopwatch = ref(0);
|
|
20
25
|
const stopStopwatch = () => {
|
|
@@ -42,9 +47,9 @@ var ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default = /*@__P
|
|
|
42
47
|
});
|
|
43
48
|
return (_ctx, _cache) => {
|
|
44
49
|
return openBlock(), createElementBlock("div", _hoisted_1, [interval.value && stopwatch.value ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref(prettyMilliseconds)(stopwatch.value)), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
45
|
-
createElementVNode("span", null, [
|
|
46
|
-
unref(getContentLength)(__props.response) ? (openBlock(), createElementBlock("span",
|
|
47
|
-
statusCodeInformation.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
50
|
+
createElementVNode("span", null, [createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("apiClient.responseMetaInformation.duration")), 1), createTextVNode(" " + toDisplayString(unref(prettyMilliseconds)(__props.response.duration)), 1)]),
|
|
51
|
+
unref(getContentLength)(__props.response) ? (openBlock(), createElementBlock("span", _hoisted_4, [createElementVNode("span", _hoisted_5, toDisplayString(unref(translate)("apiClient.responseMetaInformation.size")), 1), createTextVNode(" " + toDisplayString(unref(getContentLength)(__props.response)), 1)])) : createCommentVNode("", true),
|
|
52
|
+
statusCodeInformation.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("span", _hoisted_6, toDisplayString(unref(translate)("apiClient.responseMetaInformation.status")), 1), statusCodeInformation.value.url ? (openBlock(), createBlock(HelpfulLink_default, {
|
|
48
53
|
key: 0,
|
|
49
54
|
class: "flex items-center gap-1.5",
|
|
50
55
|
href: statusCodeInformation.value.url
|
|
@@ -54,7 +59,7 @@ var ResponseMetaInformation_vue_vue_type_script_setup_true_lang_default = /*@__P
|
|
|
54
59
|
style: normalizeStyle({ backgroundColor: statusCodeInformation.value.color })
|
|
55
60
|
}, null, 4)]),
|
|
56
61
|
_: 1
|
|
57
|
-
}, 8, ["href"])) : (openBlock(), createElementBlock("span",
|
|
62
|
+
}, 8, ["href"])) : (openBlock(), createElementBlock("span", _hoisted_7, [createTextVNode(toDisplayString(__props.response.status) + " " + toDisplayString(statusCodeInformation.value.name) + " ", 1), createElementVNode("span", {
|
|
58
63
|
class: "block h-1.5 w-1.5 rounded-full",
|
|
59
64
|
style: normalizeStyle({ backgroundColor: statusCodeInformation.value.color })
|
|
60
65
|
}, null, 4)]))], 64)) : createCommentVNode("", true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseMetaInformation.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n httpStatusCodes,\n type HttpStatusCode,\n} from '@scalar/helpers/http/http-status-codes'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport prettyMilliseconds from 'pretty-ms'\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { getContentLength } from '@/v2/blocks/response-block/helpers/get-content-length'\n\nconst { response, eventBus } = defineProps<{\n /** Response */\n response: ResponseInstance\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst interval = ref<ReturnType<typeof setInterval>>()\nconst stopwatch = ref(0)\n\nconst stopStopwatch = () => {\n clearInterval(interval.value)\n interval.value = undefined\n stopwatch.value = 0\n}\n\nconst startStopwatch = () => {\n interval.value = setInterval(() => (stopwatch.value += 1000), 1000)\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startStopwatch)\n eventBus.on('hooks:on:request:complete', stopStopwatch)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startStopwatch)\n eventBus.off('hooks:on:request:complete', stopStopwatch)\n stopStopwatch()\n})\n\n/** Status text for the response */\nconst statusCodeInformation = computed((): HttpStatusCode | undefined => {\n const responseStatusCode = response?.status\n\n if (!responseStatusCode) {\n return undefined\n }\n\n return httpStatusCodes[responseStatusCode] ?? undefined\n})\n</script>\n<template>\n <div class=\"text-c-1 flex gap-1.5\">\n <span v-if=\"interval && stopwatch\">{{\n prettyMilliseconds(stopwatch)\n }}</span>\n <template v-else>\n <span>\n <span class=\"sr-only\">
|
|
1
|
+
{"version":3,"file":"ResponseMetaInformation.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/components/ResponseMetaInformation.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n httpStatusCodes,\n type HttpStatusCode,\n} from '@scalar/helpers/http/http-status-codes'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport prettyMilliseconds from 'pretty-ms'\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\n\nimport HelpfulLink from '@/components/HelpfulLink.vue'\nimport type { ResponseInstance } from '@/v2/blocks/operation-block/helpers/send-request'\nimport { getContentLength } from '@/v2/blocks/response-block/helpers/get-content-length'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { response, eventBus } = defineProps<{\n /** Response */\n response: ResponseInstance\n /** Workspace event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst { translate } = useLocalization()\n\nconst interval = ref<ReturnType<typeof setInterval>>()\nconst stopwatch = ref(0)\n\nconst stopStopwatch = () => {\n clearInterval(interval.value)\n interval.value = undefined\n stopwatch.value = 0\n}\n\nconst startStopwatch = () => {\n interval.value = setInterval(() => (stopwatch.value += 1000), 1000)\n}\n\nonMounted(() => {\n eventBus.on('hooks:on:request:sent', startStopwatch)\n eventBus.on('hooks:on:request:complete', stopStopwatch)\n})\n\nonBeforeUnmount(() => {\n eventBus.off('hooks:on:request:sent', startStopwatch)\n eventBus.off('hooks:on:request:complete', stopStopwatch)\n stopStopwatch()\n})\n\n/** Status text for the response */\nconst statusCodeInformation = computed((): HttpStatusCode | undefined => {\n const responseStatusCode = response?.status\n\n if (!responseStatusCode) {\n return undefined\n }\n\n return httpStatusCodes[responseStatusCode] ?? undefined\n})\n</script>\n<template>\n <div class=\"text-c-1 flex gap-1.5\">\n <span v-if=\"interval && stopwatch\">{{\n prettyMilliseconds(stopwatch)\n }}</span>\n <template v-else>\n <span>\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.duration')\n }}</span>\n {{ prettyMilliseconds(response.duration) }}\n </span>\n <span v-if=\"getContentLength(response)\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.size')\n }}</span>\n {{ getContentLength(response) }}\n </span>\n <template v-if=\"statusCodeInformation\">\n <span class=\"sr-only\">{{\n translate('apiClient.responseMetaInformation.status')\n }}</span>\n <HelpfulLink\n v-if=\"statusCodeInformation.url\"\n class=\"flex items-center gap-1.5\"\n :href=\"statusCodeInformation.url\">\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </HelpfulLink>\n <span v-else>\n {{ response.status }} {{ statusCodeInformation.name }}\n <span\n class=\"block h-1.5 w-1.5 rounded-full\"\n :style=\"{ backgroundColor: statusCodeInformation.color }\" />\n </span>\n </template>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,WAAW,IAAoC;EACrD,MAAM,YAAY,IAAI,CAAC;EAEvB,MAAM,sBAAsB;GAC1B,cAAc,SAAS,KAAK;GAC5B,SAAS,QAAQ,KAAA;GACjB,UAAU,QAAQ;EACpB;EAEA,MAAM,uBAAuB;GAC3B,SAAS,QAAQ,kBAAmB,UAAU,SAAS,KAAO,GAAI;EACpE;EAEA,gBAAgB;GACd,QAAA,SAAS,GAAG,yBAAyB,cAAc;GACnD,QAAA,SAAS,GAAG,6BAA6B,aAAa;EACxD,CAAC;EAED,sBAAsB;GACpB,QAAA,SAAS,IAAI,yBAAyB,cAAc;GACpD,QAAA,SAAS,IAAI,6BAA6B,aAAa;GACvD,cAAc;EAChB,CAAC;;EAGD,MAAM,wBAAwB,eAA2C;GACvE,MAAM,qBAAqB,QAAA,UAAU;GAErC,IAAI,CAAC,oBACH;GAGF,OAAO,gBAAgB,uBAAuB,KAAA;EAChD,CAAC;;uBAGC,mBAsCM,OAtCN,YAsCM,CArCQ,SAAA,SAAY,UAAA,SAAA,UAAA,GAAxB,mBAES,QAAA,YAAA,gBADP,MAAA,kBAAA,CAAkB,CAAC,UAAA,KAAS,CAAA,GAAA,CAAA,MAAA,UAAA,GAE9B,mBAiCW,UAAA,EAAA,KAAA,EAAA,GAAA;IAhCT,mBAKO,QAAA,MAAA,CAJL,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,4CAAA,CAAA,GAAA,CAAA,GAAA,gBACF,MACT,gBAAG,MAAA,kBAAA,CAAkB,CAAC,QAAA,SAAS,QAAQ,CAAA,GAAA,CAAA,CAAA,CAAA;IAE7B,MAAA,gBAAA,CAAgB,CAAC,QAAA,QAAQ,KAAA,UAAA,GAArC,mBAKO,QAAA,YAAA,CAJL,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,wCAAA,CAAA,GAAA,CAAA,GAAA,gBACF,MACT,gBAAG,MAAA,gBAAA,CAAgB,CAAC,QAAA,QAAQ,CAAA,GAAA,CAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAEd,sBAAA,SAAA,UAAA,GAAhB,mBAmBW,UAAA,EAAA,KAAA,EAAA,GAAA,CAlBT,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,0CAAA,CAAA,GAAA,CAAA,GAGH,sBAAA,MAAsB,OAAA,UAAA,GAD9B,YAQc,qBAAA;;KANZ,OAAM;KACL,MAAM,sBAAA,MAAsB;;4BACR,CAAA,gBAAA,gBAAlB,QAAA,SAAS,MAAM,IAAG,MAAC,gBAAG,sBAAA,MAAsB,IAAI,IAAG,KACtD,CAAA,GAAA,mBAE8D,QAAA;MAD5D,OAAM;MACL,OAAK,eAAA,EAAA,iBAAqB,sBAAA,MAAsB,MAAK,CAAA;;;qCAE1D,mBAKO,QAAA,YAAA,CAAA,gBAAA,gBAJF,QAAA,SAAS,MAAM,IAAG,MAAC,gBAAG,sBAAA,MAAsB,IAAI,IAAG,KACtD,CAAA,GAAA,mBAE8D,QAAA;KAD5D,OAAM;KACL,OAAK,eAAA,EAAA,iBAAqB,sBAAA,MAAsB,MAAK,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ResponseStreamParser } from './response-stream.js';
|
|
2
|
+
/** Parse MIME delimiter lines, never treating boundary-like body bytes as separators. */
|
|
3
|
+
export declare const createMultipartParser: (contentType: string, emit: (text: string) => void, nesting?: number, prefix?: string) => ResponseStreamParser;
|
|
4
|
+
//# sourceMappingURL=response-stream-multipart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-stream-multipart.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/response-stream-multipart.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAQ7D,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,MAAM,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC5B,gBAAW,EACX,eAAW,KACV,oBAgIF,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { parseMimeType } from "@scalar/helpers/http/mime-type";
|
|
2
|
+
//#region src/v2/blocks/response-block/helpers/response-stream-multipart.ts
|
|
3
|
+
var MAX_PART_SIZE = 8 * 1024 * 1024;
|
|
4
|
+
var MAX_NESTING = 8;
|
|
5
|
+
/** Preserve every byte until MIME boundaries identify a complete part. */
|
|
6
|
+
var decodeBytes = (bytes) => Uint8Array.from(bytes, (char) => char.charCodeAt(0));
|
|
7
|
+
/** Parse MIME delimiter lines, never treating boundary-like body bytes as separators. */
|
|
8
|
+
var createMultipartParser = (contentType, emit, nesting = 0, prefix = "") => {
|
|
9
|
+
const boundary = parseMimeType(contentType).parameters.get("boundary");
|
|
10
|
+
if (!boundary || !/^[0-9A-Za-z'()+_,\-./:=? ]{1,70}$/.test(boundary) || boundary.endsWith(" ")) throw new Error("Multipart response requires a valid boundary parameter.");
|
|
11
|
+
if (nesting >= MAX_NESTING) throw new Error("Multipart nesting exceeds the display limit.");
|
|
12
|
+
const marker = new TextEncoder().encode(`--${boundary}`);
|
|
13
|
+
let buffer = /* @__PURE__ */ new Uint8Array(1024);
|
|
14
|
+
let length = 0;
|
|
15
|
+
let offset = 0;
|
|
16
|
+
let lineOffset = 0;
|
|
17
|
+
let started = false;
|
|
18
|
+
let closed = false;
|
|
19
|
+
let partNumber = 0;
|
|
20
|
+
const emitPart = (part) => {
|
|
21
|
+
if (part.length > MAX_PART_SIZE) throw new Error("Multipart part exceeds the 8 MiB display limit.");
|
|
22
|
+
const separator = part.startsWith("\r\n") ? 0 : part.indexOf("\r\n\r\n");
|
|
23
|
+
if (separator < 0) throw new Error("Multipart part is missing its header separator.");
|
|
24
|
+
const headers = part.slice(0, separator);
|
|
25
|
+
const body = part.slice(separator + (separator === 0 ? 2 : 4));
|
|
26
|
+
const partType = headers.replace(/\r\n[ \t]+/g, " ").match(/^content-type:\s*(.+)$/im)?.[1]?.trim() ?? "text/plain";
|
|
27
|
+
const parsedType = parseMimeType(partType);
|
|
28
|
+
partNumber++;
|
|
29
|
+
const label = `${prefix}${partNumber}`;
|
|
30
|
+
emit(`Part ${label}\n${headers ? `${headers}\n\n` : "\n"}`);
|
|
31
|
+
if (parsedType.type === "multipart") {
|
|
32
|
+
const child = createMultipartParser(partType, emit, nesting + 1, `${label}.`);
|
|
33
|
+
child.push(decodeBytes(body));
|
|
34
|
+
child.finish();
|
|
35
|
+
} else if (parsedType.type === "text" || /(?:json|xml)$/.test(parsedType.subtype)) {
|
|
36
|
+
const text = new TextDecoder(parsedType.parameters.get("charset") ?? "utf-8").decode(decodeBytes(body));
|
|
37
|
+
let formatted = text;
|
|
38
|
+
try {
|
|
39
|
+
formatted = JSON.stringify(JSON.parse(text), null, 2);
|
|
40
|
+
} catch {}
|
|
41
|
+
emit(`${formatted}\n`);
|
|
42
|
+
} else emit(`[Binary part: ${body.length} bytes, base64]\n${btoa(body)}\n`);
|
|
43
|
+
};
|
|
44
|
+
const toByteString = (bytes) => {
|
|
45
|
+
const slices = [];
|
|
46
|
+
for (let index = 0; index < bytes.length; index += 8192) slices.push(String.fromCharCode(...bytes.subarray(index, index + 8192)));
|
|
47
|
+
return slices.join("");
|
|
48
|
+
};
|
|
49
|
+
const drain = (final) => {
|
|
50
|
+
while (!closed && offset + marker.length <= length) {
|
|
51
|
+
const index = offset;
|
|
52
|
+
if (!((index === 0 || buffer[index - 2] === 13 && buffer[index - 1] === 10) && marker.every((byte, position) => buffer[index + position] === byte))) {
|
|
53
|
+
offset++;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const afterMarker = index + marker.length;
|
|
57
|
+
lineOffset = Math.max(lineOffset, afterMarker);
|
|
58
|
+
while (lineOffset + 1 < length && !(buffer[lineOffset] === 13 && buffer[lineOffset + 1] === 10)) lineOffset++;
|
|
59
|
+
const lineEnd = lineOffset + 1 < length ? lineOffset : -1;
|
|
60
|
+
if (lineEnd < 0 && !final) break;
|
|
61
|
+
const suffix = toByteString(buffer.subarray(afterMarker, lineEnd < 0 ? length : lineEnd));
|
|
62
|
+
const closing = /^--[ \t]*$/.test(suffix);
|
|
63
|
+
if (!closing && !/^[ \t]*$/.test(suffix)) {
|
|
64
|
+
offset = afterMarker;
|
|
65
|
+
lineOffset = 0;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (started) emitPart(toByteString(buffer.subarray(0, Math.max(0, index - 2))));
|
|
69
|
+
started = true;
|
|
70
|
+
const consumed = lineEnd < 0 ? length : lineEnd + 2;
|
|
71
|
+
buffer.copyWithin(0, consumed, length);
|
|
72
|
+
length -= consumed;
|
|
73
|
+
closed = closing;
|
|
74
|
+
offset = 0;
|
|
75
|
+
lineOffset = 0;
|
|
76
|
+
}
|
|
77
|
+
if (length > MAX_PART_SIZE + marker.length + 6) throw new Error("Multipart part exceeds the 8 MiB display limit.");
|
|
78
|
+
if (final && !closed) throw new Error("Multipart response ended before its closing boundary.");
|
|
79
|
+
};
|
|
80
|
+
return {
|
|
81
|
+
push: (chunk) => {
|
|
82
|
+
for (let index = 0; index < chunk.length && !closed; index += 65536) {
|
|
83
|
+
const slice = chunk.subarray(index, index + 65536);
|
|
84
|
+
if (length + slice.length > buffer.length) {
|
|
85
|
+
const grown = new Uint8Array(Math.max(buffer.length * 2, length + slice.length));
|
|
86
|
+
grown.set(buffer.subarray(0, length));
|
|
87
|
+
buffer = grown;
|
|
88
|
+
}
|
|
89
|
+
buffer.set(slice, length);
|
|
90
|
+
length += slice.length;
|
|
91
|
+
drain(false);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
finish: () => drain(true)
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
//#endregion
|
|
98
|
+
export { createMultipartParser };
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=response-stream-multipart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-stream-multipart.js","names":[],"sources":["../../../../../src/v2/blocks/response-block/helpers/response-stream-multipart.ts"],"sourcesContent":["import { parseMimeType } from '@scalar/helpers/http/mime-type'\n\nimport type { ResponseStreamParser } from './response-stream'\n\nconst MAX_PART_SIZE = 8 * 1024 * 1024\nconst MAX_NESTING = 8\n\n/** Preserve every byte until MIME boundaries identify a complete part. */\nconst decodeBytes = (bytes: string): Uint8Array => Uint8Array.from(bytes, (char) => char.charCodeAt(0))\n\n/** Parse MIME delimiter lines, never treating boundary-like body bytes as separators. */\nexport const createMultipartParser = (\n contentType: string,\n emit: (text: string) => void,\n nesting = 0,\n prefix = '',\n): ResponseStreamParser => {\n const boundary = parseMimeType(contentType).parameters.get('boundary')\n if (!boundary || !/^[0-9A-Za-z'()+_,\\-./:=? ]{1,70}$/.test(boundary) || boundary.endsWith(' ')) {\n throw new Error('Multipart response requires a valid boundary parameter.')\n }\n if (nesting >= MAX_NESTING) {\n throw new Error('Multipart nesting exceeds the display limit.')\n }\n const marker = new TextEncoder().encode(`--${boundary}`)\n let buffer = new Uint8Array(1024)\n let length = 0\n let offset = 0\n let lineOffset = 0\n let started = false\n let closed = false\n let partNumber = 0\n\n const emitPart = (part: string): void => {\n if (part.length > MAX_PART_SIZE) {\n throw new Error('Multipart part exceeds the 8 MiB display limit.')\n }\n // Empty header sections have only the CRLF separating headers from the body.\n const separator = part.startsWith('\\r\\n') ? 0 : part.indexOf('\\r\\n\\r\\n')\n if (separator < 0) {\n throw new Error('Multipart part is missing its header separator.')\n }\n const headers = part.slice(0, separator)\n const body = part.slice(separator + (separator === 0 ? 2 : 4))\n const unfolded = headers.replace(/\\r\\n[ \\t]+/g, ' ')\n const partType = unfolded.match(/^content-type:\\s*(.+)$/im)?.[1]?.trim() ?? 'text/plain'\n const parsedType = parseMimeType(partType)\n partNumber++\n const label = `${prefix}${partNumber}`\n emit(`Part ${label}\\n${headers ? `${headers}\\n\\n` : '\\n'}`)\n if (parsedType.type === 'multipart') {\n const child = createMultipartParser(partType, emit, nesting + 1, `${label}.`)\n child.push(decodeBytes(body))\n child.finish()\n } else if (parsedType.type === 'text' || /(?:json|xml)$/.test(parsedType.subtype)) {\n const text = new TextDecoder(parsedType.parameters.get('charset') ?? 'utf-8').decode(decodeBytes(body))\n let formatted = text\n try {\n formatted = JSON.stringify(JSON.parse(text), null, 2)\n } catch {\n // Text and XML parts remain readable without JSON interpretation.\n }\n emit(`${formatted}\\n`)\n } else {\n // Base64 preserves binary part bytes without injecting control characters into the UI.\n emit(`[Binary part: ${body.length} bytes, base64]\\n${btoa(body)}\\n`)\n }\n }\n\n // Convert only completed parts, in bounded slices that do not exceed argument limits.\n // Byte strings, decoded text, and base64 can coexist with the buffer: peak memory is\n // several times the 8 MiB part limit, not one copy. The viewer separately caps retained output.\n const toByteString = (bytes: Uint8Array): string => {\n const slices: string[] = []\n for (let index = 0; index < bytes.length; index += 8192) {\n slices.push(String.fromCharCode(...bytes.subarray(index, index + 8192)))\n }\n return slices.join('')\n }\n\n const drain = (final: boolean): void => {\n while (!closed && offset + marker.length <= length) {\n const index = offset\n const matches =\n (index === 0 || (buffer[index - 2] === 13 && buffer[index - 1] === 10)) &&\n marker.every((byte, position) => buffer[index + position] === byte)\n if (!matches) {\n offset++\n continue\n }\n const afterMarker = index + marker.length\n // Remember incomplete delimiter lines too, including long transport padding.\n lineOffset = Math.max(lineOffset, afterMarker)\n while (lineOffset + 1 < length && !(buffer[lineOffset] === 13 && buffer[lineOffset + 1] === 10)) {\n lineOffset++\n }\n const lineEnd = lineOffset + 1 < length ? lineOffset : -1\n if (lineEnd < 0 && !final) {\n break\n }\n const suffix = toByteString(buffer.subarray(afterMarker, lineEnd < 0 ? length : lineEnd))\n const closing = /^--[ \\t]*$/.test(suffix)\n if (!closing && !/^[ \\t]*$/.test(suffix)) {\n offset = afterMarker\n lineOffset = 0\n continue\n }\n if (started) {\n emitPart(toByteString(buffer.subarray(0, Math.max(0, index - 2))))\n }\n started = true\n const consumed = lineEnd < 0 ? length : lineEnd + 2\n buffer.copyWithin(0, consumed, length)\n length -= consumed\n closed = closing\n offset = 0\n lineOffset = 0\n }\n // Keep room for the CRLF and an incomplete delimiter without counting framing as part bytes.\n if (length > MAX_PART_SIZE + marker.length + 6) {\n throw new Error('Multipart part exceeds the 8 MiB display limit.')\n }\n if (final && !closed) {\n throw new Error('Multipart response ended before its closing boundary.')\n }\n }\n\n return {\n push: (chunk) => {\n // Bound each append even when the transport delivers a very large chunk.\n for (let index = 0; index < chunk.length && !closed; index += 65536) {\n const slice = chunk.subarray(index, index + 65536)\n if (length + slice.length > buffer.length) {\n const grown = new Uint8Array(Math.max(buffer.length * 2, length + slice.length))\n grown.set(buffer.subarray(0, length))\n buffer = grown\n }\n buffer.set(slice, length)\n length += slice.length\n drain(false)\n }\n },\n finish: () => drain(true),\n }\n}\n"],"mappings":";;AAIA,IAAM,gBAAgB,IAAI,OAAO;AACjC,IAAM,cAAc;;AAGpB,IAAM,eAAe,UAA8B,WAAW,KAAK,QAAQ,SAAS,KAAK,WAAW,CAAC,CAAC;;AAGtG,IAAa,yBACX,aACA,MACA,UAAU,GACV,SAAS,OACgB;CACzB,MAAM,WAAW,cAAc,WAAW,CAAC,CAAC,WAAW,IAAI,UAAU;CACrE,IAAI,CAAC,YAAY,CAAC,oCAAoC,KAAK,QAAQ,KAAK,SAAS,SAAS,GAAG,GAC3F,MAAM,IAAI,MAAM,yDAAyD;CAE3E,IAAI,WAAW,aACb,MAAM,IAAI,MAAM,8CAA8C;CAEhE,MAAM,SAAS,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK,UAAU;CACvD,IAAI,yBAAS,IAAI,WAAW,IAAI;CAChC,IAAI,SAAS;CACb,IAAI,SAAS;CACb,IAAI,aAAa;CACjB,IAAI,UAAU;CACd,IAAI,SAAS;CACb,IAAI,aAAa;CAEjB,MAAM,YAAY,SAAuB;EACvC,IAAI,KAAK,SAAS,eAChB,MAAM,IAAI,MAAM,iDAAiD;EAGnE,MAAM,YAAY,KAAK,WAAW,MAAM,IAAI,IAAI,KAAK,QAAQ,UAAU;EACvE,IAAI,YAAY,GACd,MAAM,IAAI,MAAM,iDAAiD;EAEnE,MAAM,UAAU,KAAK,MAAM,GAAG,SAAS;EACvC,MAAM,OAAO,KAAK,MAAM,aAAa,cAAc,IAAI,IAAI,EAAE;EAE7D,MAAM,WADW,QAAQ,QAAQ,eAAe,GAC/B,CAAA,CAAS,MAAM,0BAA0B,CAAC,GAAG,EAAE,EAAE,KAAK,KAAK;EAC5E,MAAM,aAAa,cAAc,QAAQ;EACzC;EACA,MAAM,QAAQ,GAAG,SAAS;EAC1B,KAAK,QAAQ,MAAM,IAAI,UAAU,GAAG,QAAQ,QAAQ,MAAM;EAC1D,IAAI,WAAW,SAAS,aAAa;GACnC,MAAM,QAAQ,sBAAsB,UAAU,MAAM,UAAU,GAAG,GAAG,MAAM,EAAE;GAC5E,MAAM,KAAK,YAAY,IAAI,CAAC;GAC5B,MAAM,OAAO;EACf,OAAO,IAAI,WAAW,SAAS,UAAU,gBAAgB,KAAK,WAAW,OAAO,GAAG;GACjF,MAAM,OAAO,IAAI,YAAY,WAAW,WAAW,IAAI,SAAS,KAAK,OAAO,CAAC,CAAC,OAAO,YAAY,IAAI,CAAC;GACtG,IAAI,YAAY;GAChB,IAAI;IACF,YAAY,KAAK,UAAU,KAAK,MAAM,IAAI,GAAG,MAAM,CAAC;GACtD,QAAQ,CAER;GACA,KAAK,GAAG,UAAU,GAAG;EACvB,OAEE,KAAK,iBAAiB,KAAK,OAAO,mBAAmB,KAAK,IAAI,EAAE,GAAG;CAEvE;CAKA,MAAM,gBAAgB,UAA8B;EAClD,MAAM,SAAmB,CAAC;EAC1B,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,MACjD,OAAO,KAAK,OAAO,aAAa,GAAG,MAAM,SAAS,OAAO,QAAQ,IAAI,CAAC,CAAC;EAEzE,OAAO,OAAO,KAAK,EAAE;CACvB;CAEA,MAAM,SAAS,UAAyB;EACtC,OAAO,CAAC,UAAU,SAAS,OAAO,UAAU,QAAQ;GAClD,MAAM,QAAQ;GAId,IAAI,GAFD,UAAU,KAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,QAAQ,OAAO,OACnE,OAAO,OAAO,MAAM,aAAa,OAAO,QAAQ,cAAc,IAAI,IACtD;IACZ;IACA;GACF;GACA,MAAM,cAAc,QAAQ,OAAO;GAEnC,aAAa,KAAK,IAAI,YAAY,WAAW;GAC7C,OAAO,aAAa,IAAI,UAAU,EAAE,OAAO,gBAAgB,MAAM,OAAO,aAAa,OAAO,KAC1F;GAEF,MAAM,UAAU,aAAa,IAAI,SAAS,aAAa;GACvD,IAAI,UAAU,KAAK,CAAC,OAClB;GAEF,MAAM,SAAS,aAAa,OAAO,SAAS,aAAa,UAAU,IAAI,SAAS,OAAO,CAAC;GACxF,MAAM,UAAU,aAAa,KAAK,MAAM;GACxC,IAAI,CAAC,WAAW,CAAC,WAAW,KAAK,MAAM,GAAG;IACxC,SAAS;IACT,aAAa;IACb;GACF;GACA,IAAI,SACF,SAAS,aAAa,OAAO,SAAS,GAAG,KAAK,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;GAEnE,UAAU;GACV,MAAM,WAAW,UAAU,IAAI,SAAS,UAAU;GAClD,OAAO,WAAW,GAAG,UAAU,MAAM;GACrC,UAAU;GACV,SAAS;GACT,SAAS;GACT,aAAa;EACf;EAEA,IAAI,SAAS,gBAAgB,OAAO,SAAS,GAC3C,MAAM,IAAI,MAAM,iDAAiD;EAEnE,IAAI,SAAS,CAAC,QACZ,MAAM,IAAI,MAAM,uDAAuD;CAE3E;CAEA,OAAO;EACL,OAAO,UAAU;GAEf,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,UAAU,CAAC,QAAQ,SAAS,OAAO;IACnE,MAAM,QAAQ,MAAM,SAAS,OAAO,QAAQ,KAAK;IACjD,IAAI,SAAS,MAAM,SAAS,OAAO,QAAQ;KACzC,MAAM,QAAQ,IAAI,WAAW,KAAK,IAAI,OAAO,SAAS,GAAG,SAAS,MAAM,MAAM,CAAC;KAC/E,MAAM,IAAI,OAAO,SAAS,GAAG,MAAM,CAAC;KACpC,SAAS;IACX;IACA,OAAO,IAAI,OAAO,MAAM;IACxB,UAAU,MAAM;IAChB,MAAM,KAAK;GACb;EACF;EACA,cAAc,MAAM,IAAI;CAC1B;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Formats with record framing that can be displayed before the response finishes. */
|
|
2
|
+
type ResponseStreamFormat = 'text' | 'json-lines' | 'json-seq' | 'multipart';
|
|
3
|
+
/** Only opt recognized streaming media types into the reader path. */
|
|
4
|
+
export declare const getResponseStreamFormat: (contentType: string) => ResponseStreamFormat | undefined;
|
|
5
|
+
/** A push parser keeps transport cancellation and UI updates outside the framing logic. */
|
|
6
|
+
export type ResponseStreamParser = {
|
|
7
|
+
push: (chunk: Uint8Array) => void;
|
|
8
|
+
finish: () => void;
|
|
9
|
+
};
|
|
10
|
+
/** Decode complete records while retaining partial UTF-8 characters across network chunks. */
|
|
11
|
+
export declare const createResponseStreamParser: (contentType: string, emit: (text: string) => void) => ResponseStreamParser;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=response-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-stream.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/response-block/helpers/response-stream.ts"],"names":[],"mappings":"AAMA,sFAAsF;AACtF,KAAK,oBAAoB,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAA;AAE5E,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,GAAI,aAAa,MAAM,KAAG,oBAAoB,GAAG,SAgBpF,CAAA;AAED,2FAA2F;AAC3F,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACjC,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAKD,8FAA8F;AAC9F,eAAO,MAAM,0BAA0B,GAAI,aAAa,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAAG,oBAiG9F,CAAA"}
|