@scalar/api-client 2.6.1 → 2.8.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 +77 -0
- package/README.md +1 -1
- package/dist/analytics.d.ts +2 -18
- package/dist/analytics.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +66 -42
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
- package/dist/hooks/useAnalytics.d.ts +2 -18
- package/dist/hooks/useAnalytics.d.ts.map +1 -1
- package/dist/hooks/useClientConfig.d.ts +114 -120
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/layouts/App/create-api-client-app.d.ts +1379 -1307
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +2754 -2610
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1379 -1307
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +1379 -1307
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +17 -17
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/send-request/build-request-security.d.ts +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +19 -19
- package/dist/libs/send-request/create-request-operation.test.d.ts +82 -82
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.d.ts +3 -3
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +118 -118
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +127 -127
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +14 -14
- package/dist/store/environment.d.ts +23 -23
- package/dist/store/request-example.d.ts +546 -546
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +194 -194
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +281 -281
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/servers.d.ts +45 -45
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +1379 -1307
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +18 -18
- package/dist/store/tags.d.ts +35 -35
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +47 -47
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts +25 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +30 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +4 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +3 -3
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +104 -98
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +16 -14
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +31 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +6 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +198 -131
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts +4 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +10 -4
- 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 +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +31 -32
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -6
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +54 -54
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +54 -54
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
- package/dist/views/Request/libs/auth.d.ts +2 -2
- package/dist/views/Request/libs/watch-mode.d.ts +4 -4
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +241 -186
- package/package.json +21 -16
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as w, ref as g, computed as l, createBlock as n, openBlock as t, createSlots as _, withCtx as i, createElementBlock as x, createCommentVNode as r, createElementVNode as p, toDisplayString as v, createTextVNode as c, createVNode as B } from "vue";
|
|
2
|
+
import k from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import { processResponseBody as R } from "../helpers/process-response-body.js";
|
|
4
|
+
import { getMediaTypeConfig as T } from "../helpers/media-types.js";
|
|
5
|
+
import V from "./ResponseBodyDownload.vue.js";
|
|
6
|
+
import U from "./ResponseBodyInfo.vue.js";
|
|
7
|
+
import b from "./ResponseBodyPreview.vue.js";
|
|
8
|
+
import C from "./ResponseBodyRaw.vue.js";
|
|
9
|
+
import N from "./ResponseBodyToggle.vue.js";
|
|
10
|
+
const $ = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden"
|
|
13
|
+
}, E = { class: "box-content flex min-h-8 items-center justify-between border-y px-3" }, P = { class: "text-xxs font-code leading-3" }, G = /* @__PURE__ */ w({
|
|
14
|
+
__name: "ResponseBody",
|
|
15
|
+
props: {
|
|
16
|
+
title: {},
|
|
17
|
+
layout: {},
|
|
18
|
+
data: {},
|
|
19
|
+
headers: {}
|
|
20
|
+
},
|
|
21
|
+
setup(d) {
|
|
22
|
+
const s = g(!0), m = l(
|
|
23
|
+
() => !!(a.value?.raw && a.value.preview)
|
|
24
|
+
), f = l(() => s.value || !m.value), y = l(() => !s.value || !m.value), e = l(
|
|
25
|
+
() => R({
|
|
26
|
+
data: d.data,
|
|
27
|
+
headers: d.headers
|
|
28
|
+
})
|
|
29
|
+
), a = l(
|
|
30
|
+
() => T(e.value.mimeType?.essence ?? "")
|
|
31
|
+
);
|
|
32
|
+
return (o, u) => (t(), n(k, {
|
|
33
|
+
class: "max-h-content overflow-y-hidden",
|
|
34
|
+
layout: o.layout
|
|
35
|
+
}, _({
|
|
36
|
+
title: i(() => [
|
|
37
|
+
c(v(o.title), 1)
|
|
38
|
+
]),
|
|
39
|
+
default: i(() => [
|
|
40
|
+
o.data ? (t(), x("div", $, [
|
|
41
|
+
p("div", E, [
|
|
42
|
+
p("span", P, v(e.value.mimeType?.essence), 1),
|
|
43
|
+
m.value ? (t(), n(N, {
|
|
44
|
+
key: 0,
|
|
45
|
+
modelValue: s.value,
|
|
46
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => s.value = h)
|
|
47
|
+
}, null, 8, ["modelValue"])) : r("", !0)
|
|
48
|
+
]),
|
|
49
|
+
a.value?.raw && y.value ? (t(), n(C, {
|
|
50
|
+
key: e.value.dataUrl,
|
|
51
|
+
content: o.data,
|
|
52
|
+
language: a.value.language
|
|
53
|
+
}, null, 8, ["content", "language"])) : r("", !0),
|
|
54
|
+
a.value?.preview && f.value ? (t(), n(b, {
|
|
55
|
+
key: e.value.dataUrl,
|
|
56
|
+
alpha: a.value.alpha,
|
|
57
|
+
mode: a.value.preview,
|
|
58
|
+
src: e.value.dataUrl,
|
|
59
|
+
type: e.value.mimeType?.essence ?? ""
|
|
60
|
+
}, null, 8, ["alpha", "mode", "src", "type"])) : r("", !0),
|
|
61
|
+
!a.value?.raw && !a.value?.preview ? (t(), n(U, { key: 2 }, {
|
|
62
|
+
default: i(() => u[1] || (u[1] = [
|
|
63
|
+
c(" Binary file ")
|
|
64
|
+
])),
|
|
65
|
+
_: 1,
|
|
66
|
+
__: [1]
|
|
67
|
+
})) : r("", !0)
|
|
68
|
+
])) : r("", !0)
|
|
69
|
+
]),
|
|
70
|
+
_: 2
|
|
71
|
+
}, [
|
|
72
|
+
o.data && e.value.dataUrl ? {
|
|
73
|
+
name: "actions",
|
|
74
|
+
fn: i(() => [
|
|
75
|
+
B(V, {
|
|
76
|
+
filename: e.value.attachmentFilename,
|
|
77
|
+
href: e.value.dataUrl,
|
|
78
|
+
type: e.value.mimeType?.essence
|
|
79
|
+
}, null, 8, ["filename", "href", "type"])
|
|
80
|
+
]),
|
|
81
|
+
key: "0"
|
|
82
|
+
} : void 0
|
|
83
|
+
]), 1032, ["layout"]));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
G as default
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyDownload.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
href: string;
|
|
3
|
+
type?: string;
|
|
4
|
+
filename?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ResponseBodyDownload.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue"],"names":[],"mappings":"AAwCA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;AAyEF,wBAMG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as l, computed as p, createElementBlock as a, openBlock as i, withModifiers as d, createVNode as f, createElementVNode as t, unref as m } from "vue";
|
|
2
|
+
import { ScalarIcon as c } from "@scalar/components";
|
|
3
|
+
import { getMediaTypeConfig as u } from "../../../../views/Request/consts/mediaTypes.js";
|
|
4
|
+
const x = ["download", "href"], h = /* @__PURE__ */ l({
|
|
5
|
+
__name: "ResponseBodyDownload",
|
|
6
|
+
props: {
|
|
7
|
+
href: {},
|
|
8
|
+
type: {},
|
|
9
|
+
filename: {}
|
|
10
|
+
},
|
|
11
|
+
setup(s) {
|
|
12
|
+
const n = s, r = p(() => {
|
|
13
|
+
const o = u(n.type ?? "")?.extension ?? ".unknown";
|
|
14
|
+
return n.filename ? n.filename : `response${o}`;
|
|
15
|
+
});
|
|
16
|
+
return (o, e) => (i(), a("a", {
|
|
17
|
+
class: "text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline",
|
|
18
|
+
download: `${r.value}`,
|
|
19
|
+
href: o.href,
|
|
20
|
+
onClick: e[0] || (e[0] = d(() => {
|
|
21
|
+
}, ["stop"]))
|
|
22
|
+
}, [
|
|
23
|
+
f(m(c), {
|
|
24
|
+
icon: "Download",
|
|
25
|
+
size: "xs"
|
|
26
|
+
}),
|
|
27
|
+
e[1] || (e[1] = t("span", null, [
|
|
28
|
+
t("span", null, "Download"),
|
|
29
|
+
t("span", { class: "sr-only" }, "Response Body")
|
|
30
|
+
], -1))
|
|
31
|
+
], 8, x));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
h as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ResponseBodyInfo.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyInfo.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue"],"names":[],"mappings":"AA+BA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAkB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElementBlock as t, openBlock as o, createElementVNode as s, renderSlot as c } from "vue";
|
|
2
|
+
import n from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const r = {}, d = { class: "flex justify-center px-2 py-3" }, f = { class: "text-c-3 p-2 text-sm" };
|
|
4
|
+
function l(e, _) {
|
|
5
|
+
return o(), t("div", d, [
|
|
6
|
+
s("div", f, [
|
|
7
|
+
c(e.$slots, "default")
|
|
8
|
+
])
|
|
9
|
+
]);
|
|
10
|
+
}
|
|
11
|
+
const p = /* @__PURE__ */ n(r, [["render", l]]);
|
|
12
|
+
export {
|
|
13
|
+
p as default
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyPreview.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MediaPreview } from '../../../../views/Request/consts/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
src: string;
|
|
4
|
+
type: string;
|
|
5
|
+
mode: MediaPreview;
|
|
6
|
+
alpha?: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=ResponseBodyPreview.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyPreview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAC;;AA6IF,wBAMG"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as d, ref as p, watch as i, createElementBlock as l, createBlock as y, openBlock as s, normalizeClass as a, createElementVNode as n, withCtx as f, createTextVNode as m } from "vue";
|
|
2
|
+
import v from "./ResponseBodyInfo.vue.js";
|
|
3
|
+
const c = ["src"], k = ["src", "type"], w = ["src", "type"], B = ["data", "type"], $ = /* @__PURE__ */ d({
|
|
4
|
+
__name: "ResponseBodyPreview",
|
|
5
|
+
props: {
|
|
6
|
+
src: {},
|
|
7
|
+
type: {},
|
|
8
|
+
mode: {},
|
|
9
|
+
alpha: { type: Boolean, default: !1 }
|
|
10
|
+
},
|
|
11
|
+
setup(u) {
|
|
12
|
+
const r = p(!1);
|
|
13
|
+
return i(
|
|
14
|
+
() => u.src,
|
|
15
|
+
() => r.value = !1
|
|
16
|
+
), (e, o) => !r.value && e.src ? (s(), l("div", {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: a(["flex justify-center overflow-auto rounded-b", { "bg-preview p-2": e.alpha }])
|
|
19
|
+
}, [
|
|
20
|
+
e.mode === "image" ? (s(), l("img", {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: a(["h-full max-w-full", { rounded: e.alpha }]),
|
|
23
|
+
src: e.src,
|
|
24
|
+
onError: o[0] || (o[0] = (t) => r.value = !0)
|
|
25
|
+
}, null, 42, c)) : e.mode === "video" ? (s(), l("video", {
|
|
26
|
+
key: 1,
|
|
27
|
+
autoplay: "",
|
|
28
|
+
controls: "",
|
|
29
|
+
width: "100%",
|
|
30
|
+
onError: o[1] || (o[1] = (t) => r.value = !0)
|
|
31
|
+
}, [
|
|
32
|
+
n("source", {
|
|
33
|
+
src: e.src,
|
|
34
|
+
type: e.type
|
|
35
|
+
}, null, 8, k)
|
|
36
|
+
], 32)) : e.mode === "audio" ? (s(), l("audio", {
|
|
37
|
+
key: 2,
|
|
38
|
+
class: "my-12",
|
|
39
|
+
controls: "",
|
|
40
|
+
onError: o[2] || (o[2] = (t) => r.value = !0)
|
|
41
|
+
}, [
|
|
42
|
+
n("source", {
|
|
43
|
+
src: e.src,
|
|
44
|
+
type: e.type
|
|
45
|
+
}, null, 8, w)
|
|
46
|
+
], 32)) : (s(), l("object", {
|
|
47
|
+
key: 3,
|
|
48
|
+
class: "aspect-[4/3] w-full",
|
|
49
|
+
data: e.src,
|
|
50
|
+
type: e.type,
|
|
51
|
+
onError: o[3] || (o[3] = (t) => r.value = !0)
|
|
52
|
+
}, null, 40, B))
|
|
53
|
+
], 2)) : (s(), y(v, { key: 1 }, {
|
|
54
|
+
default: f(() => o[4] || (o[4] = [
|
|
55
|
+
m("Preview unavailable")
|
|
56
|
+
])),
|
|
57
|
+
_: 1,
|
|
58
|
+
__: [4]
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
$ as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CodeMirrorLanguage } from '@scalar/use-codemirror';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
content: any;
|
|
4
|
+
language: CodeMirrorLanguage | undefined;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ResponseBodyRaw.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue"],"names":[],"mappings":"AAmEA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAG/E,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,EAAE,kBAAkB,GAAG,SAAS,CAAA;CACzC,CAAC;;AAsGF,wBAMG"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as i, ref as u, useId as p, toRef as r, createElementBlock as m, openBlock as n, createBlock as f, createCommentVNode as _, createElementVNode as c, unref as l } from "vue";
|
|
2
|
+
import { ScalarCodeBlockCopy as g } from "@scalar/components";
|
|
3
|
+
import { prettyPrintJson as k } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useCodeMirror as y } from "@scalar/use-codemirror";
|
|
5
|
+
const b = { class: "scalar-code-block group/code-block body-raw grid min-h-0 overflow-hidden p-px outline-none has-[:focus-visible]:outline" }, v = {
|
|
6
|
+
class: "body-raw-scroller custom-scroll relative pr-1",
|
|
7
|
+
tabindex: "0"
|
|
8
|
+
}, M = /* @__PURE__ */ i({
|
|
9
|
+
__name: "ResponseBodyRaw",
|
|
10
|
+
props: {
|
|
11
|
+
content: {},
|
|
12
|
+
language: {}
|
|
13
|
+
},
|
|
14
|
+
setup(s) {
|
|
15
|
+
const e = s, o = u(null), a = p(), { codeMirror: d } = y({
|
|
16
|
+
codeMirrorRef: o,
|
|
17
|
+
readOnly: !0,
|
|
18
|
+
lineNumbers: !0,
|
|
19
|
+
content: r(() => k(e.content)),
|
|
20
|
+
language: r(() => e.language),
|
|
21
|
+
forceFoldGutter: !0
|
|
22
|
+
}), t = () => d.value?.state.doc.toString() || "";
|
|
23
|
+
return (C, h) => (n(), m("div", b, [
|
|
24
|
+
t() ? (n(), f(l(g), {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "z-context top-2 mr-2",
|
|
27
|
+
content: t(),
|
|
28
|
+
controls: l(a)
|
|
29
|
+
}, null, 8, ["content", "controls"])) : _("", !0),
|
|
30
|
+
c("div", v, [
|
|
31
|
+
c("div", {
|
|
32
|
+
ref_key: "codeMirrorRef",
|
|
33
|
+
ref: o
|
|
34
|
+
}, null, 512)
|
|
35
|
+
])
|
|
36
|
+
]));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
M as default
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyStreaming.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
reader: ReadableStreamDefaultReader<Uint8Array>;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=ResponseBodyStreaming.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyStreaming.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue"],"names":[],"mappings":"AA+GA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC,CAAA;CAChD,CAAC;;AAiLF,wBAMG"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineComponent as y, ref as i, watch as _, nextTick as w, onMounted as h, onBeforeUnmount as k, createBlock as L, openBlock as s, withCtx as p, createElementVNode as l, createElementBlock as d, createCommentVNode as c, toDisplayString as g, unref as u, createVNode as B } from "vue";
|
|
2
|
+
import { useLoadingState as S, ScalarLoading as b } from "@scalar/components";
|
|
3
|
+
import C from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
4
|
+
const T = { class: "flex w-full items-center justify-between" }, E = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "mr-2 flex items-center gap-2"
|
|
7
|
+
}, N = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "text-red bg-b-danger sticky top-0 border-b p-2"
|
|
10
|
+
}, V = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "p-2"
|
|
13
|
+
}, z = /* @__PURE__ */ y({
|
|
14
|
+
__name: "ResponseBodyStreaming",
|
|
15
|
+
props: {
|
|
16
|
+
reader: {}
|
|
17
|
+
},
|
|
18
|
+
setup(f) {
|
|
19
|
+
const e = S(), o = i(""), a = i(null), m = new TextDecoder(), r = i(null), v = () => {
|
|
20
|
+
r.value && (r.value.scrollTop = r.value.scrollHeight);
|
|
21
|
+
};
|
|
22
|
+
_(o, () => {
|
|
23
|
+
w(v);
|
|
24
|
+
});
|
|
25
|
+
async function x() {
|
|
26
|
+
try {
|
|
27
|
+
for (; e.isLoading; ) {
|
|
28
|
+
const { done: n, value: t } = await f.reader.read();
|
|
29
|
+
if (n) {
|
|
30
|
+
e.stopLoading();
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
t && (o.value += m.decode(t, { stream: !0 }));
|
|
34
|
+
}
|
|
35
|
+
} catch (n) {
|
|
36
|
+
console.error("Error reading stream:", n), e.stopLoading(), a.value = n;
|
|
37
|
+
} finally {
|
|
38
|
+
o.value += m.decode();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return h(() => {
|
|
42
|
+
e.startLoading(), x(), a.value = null;
|
|
43
|
+
}), k(() => {
|
|
44
|
+
f.reader.cancel(), e.stopLoading();
|
|
45
|
+
}), (n, t) => (s(), L(C, { class: "max-h-content overflow-y-hidden" }, {
|
|
46
|
+
title: p(() => [
|
|
47
|
+
l("div", T, [
|
|
48
|
+
t[1] || (t[1] = l("div", null, "Body", -1)),
|
|
49
|
+
u(e).isLoading ? (s(), d("div", E, [
|
|
50
|
+
B(u(b), {
|
|
51
|
+
loadingState: u(e),
|
|
52
|
+
size: "xs"
|
|
53
|
+
}, null, 8, ["loadingState"]),
|
|
54
|
+
t[0] || (t[0] = l("span", { class: "text-c-2" }, " Listening… ", -1))
|
|
55
|
+
])) : c("", !0)
|
|
56
|
+
])
|
|
57
|
+
]),
|
|
58
|
+
default: p(() => [
|
|
59
|
+
l("div", {
|
|
60
|
+
ref_key: "contentContainer",
|
|
61
|
+
ref: r,
|
|
62
|
+
class: "text-xxs font-code h-full overflow-auto leading-2 whitespace-pre-wrap"
|
|
63
|
+
}, [
|
|
64
|
+
a.value ? (s(), d("div", N, g(a.value.message), 1)) : c("", !0),
|
|
65
|
+
o.value ? (s(), d("div", V, g(o.value), 1)) : c("", !0)
|
|
66
|
+
], 512)
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
export {
|
|
73
|
+
z as default
|
|
74
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
"update:modelValue": (v: boolean) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=ResponseBodyToggle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyToggle.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue"],"names":[],"mappings":"AA6BA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AA0EF,wBAOG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as u, createElementBlock as r, openBlock as d, createElementVNode as o, withModifiers as l, normalizeClass as n } from "vue";
|
|
2
|
+
const a = { class: "text-c-3 text-xxs -my-1 flex justify-center gap-0.5 rounded p-0.5" }, i = /* @__PURE__ */ u({
|
|
3
|
+
__name: "ResponseBodyToggle",
|
|
4
|
+
props: {
|
|
5
|
+
modelValue: { type: Boolean }
|
|
6
|
+
},
|
|
7
|
+
emits: ["update:modelValue"],
|
|
8
|
+
setup(p) {
|
|
9
|
+
return (e, t) => (d(), r("div", a, [
|
|
10
|
+
o("button", {
|
|
11
|
+
class: n(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": e.modelValue }]),
|
|
12
|
+
type: "button",
|
|
13
|
+
onClick: t[0] || (t[0] = l((s) => e.$emit("update:modelValue", !0), ["stop"]))
|
|
14
|
+
}, " Preview ", 2),
|
|
15
|
+
o("button", {
|
|
16
|
+
class: n(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": !e.modelValue }]),
|
|
17
|
+
type: "button",
|
|
18
|
+
onClick: t[1] || (t[1] = l((s) => e.$emit("update:modelValue", !1), ["stop"]))
|
|
19
|
+
}, " Raw ", 2)
|
|
20
|
+
]));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
i as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
content: string;
|
|
3
|
+
data: unknown;
|
|
4
|
+
headers: {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=ResponseBodyVirtual.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyVirtual.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue"],"names":[],"mappings":"AAmEA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC3C,CAAC;;AAyGF,wBAMG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as l, computed as r, createBlock as i, openBlock as d, createSlots as m, withCtx as a, createElementVNode as c, createVNode as n, unref as f, createTextVNode as p } from "vue";
|
|
2
|
+
import { ScalarVirtualText as u } from "@scalar/components";
|
|
3
|
+
import { formatJsonOrYamlString as x } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import h from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
5
|
+
import { processResponseBody as y } from "../helpers/process-response-body.js";
|
|
6
|
+
import v from "./ResponseBodyDownload.vue.js";
|
|
7
|
+
const S = /* @__PURE__ */ l({
|
|
8
|
+
__name: "ResponseBodyVirtual",
|
|
9
|
+
props: {
|
|
10
|
+
content: {},
|
|
11
|
+
data: {},
|
|
12
|
+
headers: {}
|
|
13
|
+
},
|
|
14
|
+
setup(o) {
|
|
15
|
+
const s = r(() => x(o.content)), e = r(
|
|
16
|
+
() => y({
|
|
17
|
+
data: o.data,
|
|
18
|
+
headers: o.headers
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
return (b, t) => (d(), i(h, { class: "!max-h-100% response-body-virtual overflow-x-auto" }, m({
|
|
22
|
+
title: a(() => [
|
|
23
|
+
t[0] || (t[0] = p("Body"))
|
|
24
|
+
]),
|
|
25
|
+
default: a(() => [
|
|
26
|
+
t[1] || (t[1] = c("div", { class: "font-code text-xxs rounded-t border border-b-0 px-2.5 py-1.5" }, " This response body is massive! Syntax highlighting won't work here. ", -1)),
|
|
27
|
+
n(f(u), {
|
|
28
|
+
containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
|
|
29
|
+
contentClass: "language-plaintext whitespace-pre font-code text-base",
|
|
30
|
+
lineHeight: 20,
|
|
31
|
+
text: s.value
|
|
32
|
+
}, null, 8, ["text"])
|
|
33
|
+
]),
|
|
34
|
+
_: 2
|
|
35
|
+
}, [
|
|
36
|
+
e.value.dataUrl ? {
|
|
37
|
+
name: "actions",
|
|
38
|
+
fn: a(() => [
|
|
39
|
+
n(v, {
|
|
40
|
+
filename: e.value.attachmentFilename,
|
|
41
|
+
href: e.value.dataUrl,
|
|
42
|
+
type: e.value.mimeType?.essence
|
|
43
|
+
}, null, 8, ["filename", "href", "type"])
|
|
44
|
+
]),
|
|
45
|
+
key: "0"
|
|
46
|
+
} : void 0
|
|
47
|
+
]), 1024));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
S as default
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseCookies.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseCookies.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
cookies: {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=ResponseCookies.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseCookies.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseCookies.vue"],"names":[],"mappings":"AA2CA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC3C,CAAC;;AA6GF,wBAMG"}
|