@scalar/api-client 3.23.1 → 3.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/assets/{computer.ascii.virtual.js → computer.ascii_raw.js} +1 -1
- package/dist/assets/computer.ascii_raw.js.map +1 -0
- package/dist/components/HelpfulLink.vue.js +1 -1
- package/dist/components/HelpfulLink.vue.js.map +1 -1
- package/dist/components/{HelpfulLink.vue.script.js → HelpfulLink.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/HelpfulLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
- package/dist/components/HttpMethod/{HttpMethod.vue.script.js → HttpMethod.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/HttpMethod/index.js +1 -2
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js +2 -2
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js.map +1 -1
- package/dist/components/ScalarAsciiArt/{ScalarAsciiArt.vue.script.js → ScalarAsciiArt.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/ScalarAsciiArt/index.js +1 -2
- package/dist/components/SectionFilter.vue.js +2 -2
- package/dist/components/SectionFilter.vue.js.map +1 -1
- package/dist/components/{SectionFilter.vue.script.js → SectionFilter.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/SectionFilter.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/SectionFilterButton.vue.js +1 -1
- package/dist/components/SectionFilterButton.vue.js.map +1 -1
- package/dist/components/{SectionFilterButton.vue.script.js → SectionFilterButton.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/SectionFilterButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +13 -2
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js.map +1 -1
- package/dist/components/Server/{ServerVariablesForm.vue.script.js → ServerVariablesForm.vue_vue_type_script_setup_true_lang.js} +19 -7
- package/dist/components/Server/ServerVariablesForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +2 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
- package/dist/components/Server/{ServerVariablesSelect.vue.script.js → ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js} +5 -3
- package/dist/components/Server/ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
- package/dist/components/Server/{ServerVariablesTextbox.vue.script.js → ServerVariablesTextbox.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/Server/index.js +1 -2
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/{DeleteSidebarListElement.vue.script.js → DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/{SidebarListElementForm.vue.script.js → SidebarListElementForm.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/Sidebar/index.js +1 -2
- package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js.map +1 -1
- package/dist/components/ViewLayout/{ViewLayout.vue.script.js → ViewLayout.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js.map +1 -1
- package/dist/components/ViewLayout/{ViewLayoutSection.vue.script.js → ViewLayoutSection.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/style.css +145 -107
- package/dist/types/index.d.ts +2 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/{OperationBlock.vue.script.js → OperationBlock.vue_vue_type_script_setup_true_lang.js} +3 -2
- package/dist/v2/blocks/operation-block/{OperationBlock.vue.script.js.map → OperationBlock.vue_vue_type_script_setup_true_lang.js.map} +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/{Header.vue.script.js → Header.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/{OpenApiClientButton.vue.script.js → OpenApiClientButton.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +2 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +3 -3
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/{RequestBlock.vue.script.js → RequestBlock.vue_vue_type_script_setup_true_lang.js} +4 -3
- package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/{RequestBody.vue.script.js → RequestBody.vue_vue_type_script_setup_true_lang.js} +9 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/{RequestBodyForm.vue.script.js → RequestBodyForm.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js +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 → RequestBodyStructured.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js +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 → RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +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 → RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +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 → RequestParams.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/{RequestTable.vue.script.js → RequestTable.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +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 → RequestTableRow.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +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 → RequestTableTooltip.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +2 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js +2 -1
- package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/structured-body-codec.js.map +1 -1
- package/dist/v2/blocks/request-block/index.js +1 -2
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +2 -2
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/{ResponseBlock.vue.script.js → ResponseBlock.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/Headers.vue.js +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 → Headers.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/{ResponseBody.vue.script.js → ResponseBody.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +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 → ResponseBodyDownload.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/{ResponseBodyPreview.vue.script.js → ResponseBodyPreview.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/{ResponseBodyRaw.vue.script.js → ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +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 → ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js} +2 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +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 → ResponseBodyToggle.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/{ResponseBodyVirtual.vue.script.js → ResponseBodyVirtual.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +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 → ResponseCookies.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/{ResponseEmpty.vue.script.js → ResponseEmpty.vue_vue_type_script_setup_true_lang.js} +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/{ResponseLoadingOverlay.vue.script.js → ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +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 → ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts +1 -1
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -1
- package/dist/v2/blocks/response-block/helpers/process-response-body.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +1 -1
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/response-stream.js +1 -1
- package/dist/v2/blocks/response-block/helpers/response-stream.js.map +1 -1
- package/dist/v2/blocks/response-block/index.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/{AddressBar.vue.script.js → AddressBar.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +2 -2
- 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 → AddressBarHistory.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +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 → EnvironmentSelector.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/index.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +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 → AuthSelector.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +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 → DeleteRequestAuthModal.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +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 +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 → OAuth2.vue_vue_type_script_setup_true_lang.js} +3 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/{OAuth2Metadata.vue.script.js → OAuth2Metadata.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +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 → OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +2 -2
- 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 → OAuthScopesInput.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +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 → OpenIDConnect.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +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 → RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/{RequestAuthDataTableInput.vue.script.js → RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +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 → RequestAuthTab.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.d.ts +1 -1
- 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 +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +7 -5
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +1 -2
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +3 -3
- package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
- package/dist/v2/components/code-input/{CodeInput.vue.script.js → CodeInput.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/code-input/CodeInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.js +3 -3
- package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
- package/dist/v2/components/code-input/{CodeInputLite.vue.script.js → CodeInputLite.vue_vue_type_script_setup_true_lang.js} +4 -2
- package/dist/v2/components/code-input/CodeInputLite.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.js +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
- package/dist/v2/components/code-input/{PillTooltipHost.vue.script.js → PillTooltipHost.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts +2 -2
- package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
- package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
- package/dist/v2/components/context-menu/ContextMenu.vue.js +2 -2
- package/dist/v2/components/context-menu/ContextMenu.vue.js.map +1 -1
- package/dist/v2/components/context-menu/{ContextMenu.vue.script.js → ContextMenu.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/context-menu/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/context-menu/index.js +1 -2
- package/dist/v2/components/data-table/DataTable.vue.js +1 -1
- package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
- package/dist/v2/components/data-table/{DataTable.vue.script.js → DataTable.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/data-table/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/data-table/DataTableCell.vue.js +1 -1
- package/dist/v2/components/data-table/DataTableCell.vue.js.map +1 -1
- package/dist/v2/components/data-table/{DataTableCell.vue.script.js → DataTableCell.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/data-table/DataTableCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
- package/dist/v2/components/data-table/{DataTableCheckbox.vue.script.js → DataTableCheckbox.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.js +1 -1
- package/dist/v2/components/data-table/DataTableHeader.vue.js.map +1 -1
- package/dist/v2/components/data-table/{DataTableHeader.vue.script.js → DataTableHeader.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/data-table/DataTableHeader.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
- package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
- package/dist/v2/components/data-table/{DataTableInput.vue.script.js → DataTableInput.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
- package/dist/v2/components/data-table/{DataTableInputSelect.vue.script.js → DataTableInputSelect.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/data-table/DataTableRow.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableText.vue.js +1 -1
- package/dist/v2/components/data-table/DataTableText.vue.js.map +1 -1
- package/dist/v2/components/data-table/{DataTableText.vue.script.js → DataTableText.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/data-table/DataTableText.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.js +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
- package/dist/v2/components/forms/{ConfirmationForm.vue.script.js → ConfirmationForm.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/forms/index.js +1 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
- package/dist/v2/components/layout/{CollapsibleSection.vue.script.js → CollapsibleSection.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/layout/ValueEmitter.vue.js +1 -1
- package/dist/v2/components/layout/ValueEmitter.vue.js.map +1 -1
- package/dist/v2/components/layout/{ValueEmitter.vue.script.js → ValueEmitter.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/layout/ValueEmitter.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/modals/DeleteModal.vue.js +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
- package/dist/v2/components/modals/{DeleteModal.vue.script.js → DeleteModal.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/modals/DeleteModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/modals/ModalClientContainer.vue.js +2 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
- package/dist/v2/components/modals/{ModalClientContainer.vue.script.js → ModalClientContainer.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/modals/index.js +1 -2
- package/dist/v2/components/resize/Resize.vue.js +3 -3
- package/dist/v2/components/resize/Resize.vue.js.map +1 -1
- package/dist/v2/components/resize/{Resize.vue.script.js → Resize.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/resize/Resize.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
- package/dist/v2/components/server/{ServerDropdown.vue.script.js → ServerDropdown.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/server/ServerDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.js +2 -2
- package/dist/v2/components/server/ServerDropdownItem.vue.js.map +1 -1
- package/dist/v2/components/server/{ServerDropdownItem.vue.script.js → ServerDropdownItem.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/server/index.js +1 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
- package/dist/v2/components/sidebar/{Sidebar.vue.script.js → Sidebar.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
- package/dist/v2/components/sidebar/{SidebarMenu.vue.script.js → SidebarMenu.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.js +2 -2
- package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
- package/dist/v2/components/sidebar/{SidebarToggle.vue.script.js → SidebarToggle.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +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 → CommandActionForm.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +1 -1
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/{CommandActionInput.vue.script.js → CommandActionInput.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/command-palette/components/CommandActionInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
- package/dist/v2/features/environments/{EnvironmentsList.vue.script.js → EnvironmentsList.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/components/Environment.vue.js +1 -1
- package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
- package/dist/v2/features/environments/components/{Environment.vue.script.js → Environment.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/environments/components/Environment.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +1 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js.map +1 -1
- package/dist/v2/features/environments/components/{EnvironmentColors.vue.script.js → EnvironmentColors.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/{EnvironmentCreateModal.vue.script.js → EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/{EnvironmentDeleteModal.vue.script.js → EnvironmentDeleteModal.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
- package/dist/v2/features/environments/components/{EnvironmentVariablesDropdown.vue.script.js → EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +2 -2
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
- package/dist/v2/features/environments/components/{EnvironmentVariablesTable.vue.script.js → EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/environments/index.js +1 -2
- package/dist/v2/features/modal/Modal.vue.d.ts +2 -2
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/{Modal.vue.script.js → Modal.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/modal/Modal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
- package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js.map +1 -1
- package/dist/v2/features/modal/helpers/types.d.ts +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
- package/dist/v2/features/modal/index.d.ts +1 -1
- package/dist/v2/features/modal/modal-events.d.ts +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/{Operation.vue.script.js → Operation.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/operation/Operation.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/operation/index.js +1 -2
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js +2 -2
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
- package/dist/v2/features/search/components/{DocumentSearchModal.vue.script.js → DocumentSearchModal.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/search/components/SearchResult.vue.d.ts +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.js +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
- package/dist/v2/features/search/components/{SearchResult.vue.script.js → SearchResult.vue_vue_type_script_setup_true_lang.js} +1 -1
- package/dist/v2/features/search/components/SearchResult.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
- package/dist/v2/hooks/index.js +1 -2
- package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
- package/dist/v2/types/options.d.ts +2 -2
- package/dist/vue-styles.css +6 -6
- package/package.json +31 -31
- package/dist/assets/computer.ascii.virtual.js.map +0 -1
- package/dist/components/HelpfulLink.vue.script.js.map +0 -1
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +0 -1
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.script.js.map +0 -1
- package/dist/components/SectionFilter.vue.script.js.map +0 -1
- package/dist/components/SectionFilterButton.vue.script.js.map +0 -1
- package/dist/components/Server/ServerVariablesForm.vue.script.js.map +0 -1
- package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +0 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +0 -1
- package/dist/components/ViewLayout/ViewLayout.vue.script.js.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js.map +0 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +0 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +0 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +0 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +0 -1
- package/dist/v2/components/code-input/CodeInput.vue.script.js.map +0 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +0 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +0 -1
- package/dist/v2/components/context-menu/ContextMenu.vue.script.js.map +0 -1
- package/dist/v2/components/data-table/DataTable.vue.script.js.map +0 -1
- package/dist/v2/components/data-table/DataTableCell.vue.script.js.map +0 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +0 -1
- package/dist/v2/components/data-table/DataTableHeader.vue.script.js.map +0 -1
- package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +0 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +0 -1
- package/dist/v2/components/data-table/DataTableText.vue.script.js.map +0 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +0 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +0 -1
- package/dist/v2/components/layout/ValueEmitter.vue.script.js.map +0 -1
- package/dist/v2/components/modals/DeleteModal.vue.script.js.map +0 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +0 -1
- package/dist/v2/components/resize/Resize.vue.script.js.map +0 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js.map +0 -1
- package/dist/v2/components/server/ServerDropdownItem.vue.script.js.map +0 -1
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +0 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +0 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +0 -1
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js.map +0 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +0 -1
- package/dist/v2/features/environments/components/Environment.vue.script.js.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +0 -1
- package/dist/v2/features/modal/Modal.vue.script.js.map +0 -1
- package/dist/v2/features/operation/Operation.vue.script.js.map +0 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +0 -1
- package/dist/v2/features/search/components/SearchResult.vue.script.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentDeleteModal.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","_toDisplayString","_createVNode","_createTextVNode"],"sources":["../../../../../src/v2/features/environments/components/EnvironmentDeleteModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { state, name = 'unknown' } = defineProps<{\n state: ModalState\n name: string | null\n}>()\n\nconst emit = defineEmits<{\n (event: 'cancel'): void\n (event: 'submit'): void\n}>()\n\nconst { translate } = useLocalization()\n</script>\n\n<template>\n <ScalarModal\n bodyClass=\"border-t-0 rounded-t-lg flex flex-col gap-4\"\n size=\"xxs\"\n :state=\"state\"\n :title=\"\n translate('apiClient.environmentDeleteModal.title', { name: name ?? '' })\n \">\n <p class=\"text-c-2 text-sm leading-normal text-pretty\">\n {{ translate('apiClient.environmentDeleteModal.deleteConfirmation') }}\n </p>\n <div class=\"flex justify-between\">\n <ScalarButton\n size=\"sm\"\n variant=\"outlined\"\n @click=\"\n () => {\n emit('cancel')\n state.hide()\n }\n \">\n {{ translate('apiClient.environmentDeleteModal.cancel') }}\n </ScalarButton>\n <ScalarButton\n size=\"sm\"\n variant=\"danger\"\n @click=\"\n () => {\n emit('submit')\n state.hide()\n }\n \">\n {{ translate('apiClient.environmentDeleteModal.deleteEnvironment') }}\n </ScalarButton>\n </div>\n </ScalarModal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAWA,MAAM,OAAO;EAKb,MAAM,EAAE,cAAc,gBAAgB;;GAIpC,OAAAA,UAAA,GAAAC,YAkCcC,MAAA,WAAA,GAAA;IAjCZ,WAAU;IACV,MAAK;IACJ,OAAO,QAAA;IACP,OAAcA,MAAA,SAAA,CAAS,CAAA,0CAAA,EAAA,MAAmD,QAAA,QAAI,GAAA,CAAA;;IAG/E,SAAAC,cAEI,CAFJC,mBAEI,KAFJ,YAEIC,gBADCH,MAAA,SAAA,CAAS,CAAA,qDAAA,CAAA,GAAA,CAAA,GAEdE,mBAuBM,OAvBN,YAuBM,CAtBJE,YAUeJ,MAAA,YAAA,GAAA;KATb,MAAK;KACL,SAAQ;KACP,SAAK,OAAA,OAAA,OAAA,W;MAAiC,KAAI,QAAA;MAAuB,QAAA,MAAM,KAAI;;;KAM5E,SAAAC,cAA0D,CAAvDI,gBAAAF,gBAAAH,MAAA,SAAA,CAAS,CAAA,yCAAA,CAAA,GAAA,CAAA,C;;I,IAEdI,YAUeJ,MAAA,YAAA,GAAA;KATb,MAAK;KACL,SAAQ;KACP,SAAK,OAAA,OAAA,OAAA,W;MAAiC,KAAI,QAAA;MAAuB,QAAA,MAAM,KAAI;;;KAM5E,SAAAC,cAAqE,CAAlEI,gBAAAF,gBAAAH,MAAA,SAAA,CAAS,CAAA,oDAAA,CAAA,GAAA,CAAA,C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import EnvironmentVariablesDropdown_vue_vue_type_script_setup_true_lang_default from "./EnvironmentVariablesDropdown.
|
|
1
|
+
import EnvironmentVariablesDropdown_vue_vue_type_script_setup_true_lang_default from "./EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js";
|
|
2
2
|
//#region src/v2/features/environments/components/EnvironmentVariablesDropdown.vue
|
|
3
3
|
var EnvironmentVariablesDropdown_default = EnvironmentVariablesDropdown_vue_vue_type_script_setup_true_lang_default;
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariablesDropdown.vue.js","names":[],"sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarTeleport } from '@scalar/components/teleport'\nimport { ScalarIconPlus } from '@scalar/icons'\nimport { POPULAR_CONTEXT_FUNCTION_KEYS } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { onClickOutside } from '@vueuse/core'\nimport Fuse from 'fuse.js'\nimport { computed, onMounted, ref, watch, type CSSProperties } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n query,\n environment,\n dropdownPosition,\n contextFunctionItems = [],\n listboxId,\n} = defineProps<{\n query: string\n environment?: XScalarEnvironment\n dropdownPosition?: { left: number; top: number }\n /** Runtime placeholders such as `{{$guid}}`, shown with environment variables */\n contextFunctionItems?: { key: string; description: string }[]\n /**\n * Id for the `role=\"listbox\"` element. When set, each option also receives a\n * stable id so the owning combobox input can reference the active option via\n * `aria-activedescendant` (W3C combobox pattern).\n */\n listboxId?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'select', variable: string): void\n (e: 'redirect'): void\n /**\n * Fired when the user dismisses the panel by clicking outside. The owning\n * combobox needs this to clear its `aria-expanded`/`aria-controls` state,\n * which would otherwise keep pointing at a listbox that is no longer mounted.\n */\n (e: 'close'): void\n}>()\n\nconst { translate } = useLocalization()\n\ntype DropdownRow =\n | { kind: 'env'; key: string; secondary: string }\n | { kind: 'context'; key: string; secondary: string }\n\nconst isOpen = ref(true)\nconst dropdownRef = ref<HTMLElement | null>(null)\nconst selectedVariableIndex = ref(0)\n\nconst redirectToEnvironment = () => {\n emit('redirect')\n isOpen.value = false\n // The panel is gone, so tell the combobox to drop its aria-expanded /\n // aria-controls — otherwise they keep pointing at a dismissed listbox.\n emit('close')\n}\n\n/** Normalize the variables to have a name and value */\nconst normalizedVariables = computed(() =>\n (environment?.variables ?? []).map((v) => ({\n key: v.name,\n value: typeof v.value === 'string' ? v.value : v.value.default,\n })),\n)\n\nconst contextRows = computed((): DropdownRow[] =>\n contextFunctionItems.map((item) => ({\n kind: 'context',\n key: item.key,\n secondary: item.description,\n })),\n)\n\nconst envRows = computed((): DropdownRow[] =>\n normalizedVariables.value\n .filter(({ key, value }) => key !== '' || value !== '')\n .map(({ key, value }) => ({\n kind: 'env' as const,\n key,\n secondary: value,\n })),\n)\n\ntype FuseRow = DropdownRow & { fuseText: string }\n\nconst envFuseSource = computed((): FuseRow[] =>\n envRows.value.map((row) => ({\n ...row,\n fuseText: `${row.key} ${row.secondary}`,\n })),\n)\n\nconst contextFuseSource = computed((): FuseRow[] =>\n contextRows.value.map((row) => ({\n ...row,\n fuseText: `${row.key} ${row.secondary}`,\n })),\n)\n\nconst fuseEnv = computed(\n () =>\n new Fuse(envFuseSource.value, {\n keys: ['fuseText'],\n threshold: 0.35,\n }),\n)\n\nconst fuseContext = computed(\n () =>\n new Fuse(contextFuseSource.value, {\n keys: ['fuseText'],\n threshold: 0.35,\n }),\n)\n\nconst popularContextRows = computed((): DropdownRow[] => {\n const byKey = new Map(contextFunctionItems.map((c) => [c.key, c]))\n return POPULAR_CONTEXT_FUNCTION_KEYS.flatMap((key) => {\n const item = byKey.get(key)\n return item\n ? [\n {\n kind: 'context' as const,\n key: item.key,\n secondary: item.description,\n },\n ]\n : []\n })\n})\n\nconst DROPDOWN_LIMIT = 12\n\nconst filteredVariables = computed((): DropdownRow[] => {\n if (!query.trim()) {\n const envSlice = envRows.value.slice(-4)\n return [...envSlice, ...popularContextRows.value]\n }\n\n const q = query.trim()\n const envMatches = fuseEnv.value\n .search(q, { limit: DROPDOWN_LIMIT })\n .map((res) => {\n const { kind, key, secondary } = res.item\n return { kind, key, secondary }\n })\n\n const remaining = DROPDOWN_LIMIT - envMatches.length\n const contextMatches =\n remaining > 0\n ? fuseContext.value.search(q, { limit: remaining }).map((res) => {\n const { kind, key, secondary } = res.item\n return { kind, key, secondary }\n })\n : []\n\n return [...envMatches, ...contextMatches]\n})\n\nconst optionId = (index: number): string | undefined =>\n listboxId ? `${listboxId}-option-${index}` : undefined\n\n/**\n * Id of the currently highlighted option, for the combobox's\n * `aria-activedescendant`. Undefined when there is no list to point at.\n */\nconst activeOptionId = computed((): string | undefined =>\n filteredVariables.value.length\n ? optionId(selectedVariableIndex.value)\n : undefined,\n)\n\nconst selectVariable = (variableKey: string): void => {\n emit('select', variableKey)\n}\n\n// Narrowing the query shrinks the list; keep the highlight in range so both the\n// visible selection and `aria-activedescendant` never reference a dropped option.\nwatch(\n () => filteredVariables.value.length,\n (length) => {\n if (selectedVariableIndex.value > length - 1) {\n selectedVariableIndex.value = Math.max(0, length - 1)\n }\n },\n)\n\nconst handleArrowKey = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = filteredVariables.value.length\n\n if (length === 0) {\n return\n }\n\n selectedVariableIndex.value =\n (selectedVariableIndex.value + offset + length) % length\n}\n\nconst handleSelect = () => {\n if (selectedVariableIndex.value >= 0) {\n const selectedVariable =\n filteredVariables.value[selectedVariableIndex.value]\n if (selectedVariable) {\n selectVariable(selectedVariable.key)\n }\n }\n}\n\ndefineExpose({\n handleArrowKey,\n handleSelect,\n activeOptionId,\n})\n\nonMounted(() => {\n // Reset selected index to the first item when dropdown opens\n selectedVariableIndex.value = 0\n})\n\nconst dropdownStyle = computed<CSSProperties>(() => {\n return {\n left: (dropdownPosition?.left ?? 0) + 'px',\n // Add a 5px offset from the editor\n top: (dropdownPosition?.top ?? 0) + 5 + 'px',\n }\n})\n\nonClickOutside(\n dropdownRef,\n () => {\n isOpen.value = false\n emit('close')\n },\n { ignore: [dropdownRef] },\n)\n</script>\n<template>\n <ScalarTeleport\n v-if=\"isOpen\"\n class=\"scalar-client\">\n <div\n ref=\"dropdownRef\"\n class=\"custom-scroll z-context bg-b-1 dark:bg-b-1.5 fixed top-0 left-0 flex max-h-[60svh] w-56 flex-col rounded border p-0.75 shadow-lg\"\n :style=\"dropdownStyle\"\n @mousedown.prevent>\n <!--\n Always rendered (even with no matches) so the combobox's `aria-controls`\n always resolves to a real listbox; an empty list simply has no options.\n -->\n <ul\n :id=\"listboxId\"\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesDropdown.variableSuggestions',\n )\n \"\n class=\"gap-1/2 flex flex-col\"\n role=\"listbox\">\n <template\n v-for=\"(item, index) in filteredVariables\"\n :key=\"`${item.kind}-${item.key}`\">\n <li\n :id=\"optionId(index)\"\n :aria-selected=\"index === selectedVariableIndex\"\n class=\"font-code text-xxs hover:bg-b-3 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150\"\n :class=\"{ 'bg-b-3': index === selectedVariableIndex }\"\n role=\"option\"\n @click=\"selectVariable(item.key)\">\n <div class=\"flex items-center gap-2 whitespace-nowrap\">\n <span\n v-if=\"item.kind === 'env'\"\n class=\"h-2.25 w-2.25 min-w-2.25 rounded-full\"\n :style=\"{\n backgroundColor: environment?.color,\n }\" />\n <span\n v-else\n class=\"text-c-3 bg-b-3 flex h-4.5 min-w-4.5 items-center justify-center rounded px-0.5 font-sans text-[9px] font-semibold\">\n fn\n </span>\n {{ item.key }}\n </div>\n <span\n class=\"max-w-[9rem] overflow-hidden text-right text-ellipsis whitespace-nowrap\">\n {{ item.secondary }}\n </span>\n </li>\n </template>\n </ul>\n <ScalarButton\n v-if=\"!filteredVariables.length\"\n class=\"font-code text-xxs bg-b-inherit hover:bg-b-3 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150\"\n variant=\"outlined\"\n @click=\"redirectToEnvironment\">\n <ScalarIconPlus class=\"size-3\" />{{\n translate('apiClient.environmentVariablesDropdown.addVariable')\n }}\n </ScalarButton>\n </div>\n </ScalarTeleport>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesDropdown.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarTeleport } from '@scalar/components/teleport'\nimport { ScalarIconPlus } from '@scalar/icons'\nimport { POPULAR_CONTEXT_FUNCTION_KEYS } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { onClickOutside } from '@vueuse/core'\nimport Fuse from 'fuse.js'\nimport { computed, onMounted, ref, watch, type CSSProperties } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n query,\n environment,\n dropdownPosition,\n contextFunctionItems = [],\n listboxId,\n} = defineProps<{\n query: string\n environment?: XScalarEnvironment\n dropdownPosition?: { left: number; top: number }\n /** Runtime placeholders such as `{{$guid}}`, shown with environment variables */\n contextFunctionItems?: { key: string; description: string }[]\n /**\n * Id for the `role=\"listbox\"` element. When set, each option also receives a\n * stable id so the owning combobox input can reference the active option via\n * `aria-activedescendant` (W3C combobox pattern).\n */\n listboxId?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'select', variable: string): void\n (e: 'redirect'): void\n /**\n * Fired when the user dismisses the panel by clicking outside. The owning\n * combobox needs this to clear its `aria-expanded`/`aria-controls` state,\n * which would otherwise keep pointing at a listbox that is no longer mounted.\n */\n (e: 'close'): void\n}>()\n\nconst { translate } = useLocalization()\n\ntype DropdownRow =\n | { kind: 'env'; key: string; secondary: string }\n | { kind: 'context'; key: string; secondary: string }\n\nconst isOpen = ref(true)\nconst dropdownRef = ref<HTMLElement | null>(null)\nconst selectedVariableIndex = ref(0)\n\nconst redirectToEnvironment = () => {\n emit('redirect')\n isOpen.value = false\n // The panel is gone, so tell the combobox to drop its aria-expanded /\n // aria-controls — otherwise they keep pointing at a dismissed listbox.\n emit('close')\n}\n\n/** Normalize the variables to have a name and value */\nconst normalizedVariables = computed(() =>\n (environment?.variables ?? []).map((v) => ({\n key: v.name,\n value: typeof v.value === 'string' ? v.value : v.value.default,\n })),\n)\n\nconst contextRows = computed((): DropdownRow[] =>\n contextFunctionItems.map((item) => ({\n kind: 'context',\n key: item.key,\n secondary: item.description,\n })),\n)\n\nconst envRows = computed((): DropdownRow[] =>\n normalizedVariables.value\n .filter(({ key, value }) => key !== '' || value !== '')\n .map(({ key, value }) => ({\n kind: 'env' as const,\n key,\n secondary: value,\n })),\n)\n\ntype FuseRow = DropdownRow & { fuseText: string }\n\nconst envFuseSource = computed((): FuseRow[] =>\n envRows.value.map((row) => ({\n ...row,\n fuseText: `${row.key} ${row.secondary}`,\n })),\n)\n\nconst contextFuseSource = computed((): FuseRow[] =>\n contextRows.value.map((row) => ({\n ...row,\n fuseText: `${row.key} ${row.secondary}`,\n })),\n)\n\nconst fuseEnv = computed(\n () =>\n new Fuse(envFuseSource.value, {\n keys: ['fuseText'],\n threshold: 0.35,\n }),\n)\n\nconst fuseContext = computed(\n () =>\n new Fuse(contextFuseSource.value, {\n keys: ['fuseText'],\n threshold: 0.35,\n }),\n)\n\nconst popularContextRows = computed((): DropdownRow[] => {\n const byKey = new Map(contextFunctionItems.map((c) => [c.key, c]))\n return POPULAR_CONTEXT_FUNCTION_KEYS.flatMap((key) => {\n const item = byKey.get(key)\n return item\n ? [\n {\n kind: 'context' as const,\n key: item.key,\n secondary: item.description,\n },\n ]\n : []\n })\n})\n\nconst DROPDOWN_LIMIT = 12\n\nconst filteredVariables = computed((): DropdownRow[] => {\n if (!query.trim()) {\n const envSlice = envRows.value.slice(-4)\n return [...envSlice, ...popularContextRows.value]\n }\n\n const q = query.trim()\n const envMatches = fuseEnv.value\n .search(q, { limit: DROPDOWN_LIMIT })\n .map((res) => {\n const { kind, key, secondary } = res.item\n return { kind, key, secondary }\n })\n\n const remaining = DROPDOWN_LIMIT - envMatches.length\n const contextMatches =\n remaining > 0\n ? fuseContext.value.search(q, { limit: remaining }).map((res) => {\n const { kind, key, secondary } = res.item\n return { kind, key, secondary }\n })\n : []\n\n return [...envMatches, ...contextMatches]\n})\n\nconst optionId = (index: number): string | undefined =>\n listboxId ? `${listboxId}-option-${index}` : undefined\n\n/**\n * Id of the currently highlighted option, for the combobox's\n * `aria-activedescendant`. Undefined when there is no list to point at.\n */\nconst activeOptionId = computed((): string | undefined =>\n filteredVariables.value.length\n ? optionId(selectedVariableIndex.value)\n : undefined,\n)\n\nconst selectVariable = (variableKey: string): void => {\n emit('select', variableKey)\n}\n\n// Narrowing the query shrinks the list; keep the highlight in range so both the\n// visible selection and `aria-activedescendant` never reference a dropped option.\nwatch(\n () => filteredVariables.value.length,\n (length) => {\n if (selectedVariableIndex.value > length - 1) {\n selectedVariableIndex.value = Math.max(0, length - 1)\n }\n },\n)\n\nconst handleArrowKey = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = filteredVariables.value.length\n\n if (length === 0) {\n return\n }\n\n selectedVariableIndex.value =\n (selectedVariableIndex.value + offset + length) % length\n}\n\nconst handleSelect = () => {\n if (selectedVariableIndex.value >= 0) {\n const selectedVariable =\n filteredVariables.value[selectedVariableIndex.value]\n if (selectedVariable) {\n selectVariable(selectedVariable.key)\n }\n }\n}\n\ndefineExpose({\n handleArrowKey,\n handleSelect,\n activeOptionId,\n})\n\nonMounted(() => {\n // Reset selected index to the first item when dropdown opens\n selectedVariableIndex.value = 0\n})\n\nconst dropdownStyle = computed<CSSProperties>(() => {\n return {\n left: (dropdownPosition?.left ?? 0) + 'px',\n // Add a 5px offset from the editor\n top: (dropdownPosition?.top ?? 0) + 5 + 'px',\n }\n})\n\nonClickOutside(\n dropdownRef,\n () => {\n isOpen.value = false\n emit('close')\n },\n { ignore: [dropdownRef] },\n)\n</script>\n<template>\n <ScalarTeleport\n v-if=\"isOpen\"\n class=\"scalar-client\">\n <div\n ref=\"dropdownRef\"\n class=\"custom-scroll z-context bg-b-1 dark:bg-b-1.5 fixed top-0 left-0 flex max-h-[60svh] w-56 flex-col rounded border p-0.75 shadow-lg\"\n :style=\"dropdownStyle\"\n @mousedown.prevent>\n <!--\n Always rendered (even with no matches) so the combobox's `aria-controls`\n always resolves to a real listbox; an empty list simply has no options.\n -->\n <ul\n :id=\"listboxId\"\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesDropdown.variableSuggestions',\n )\n \"\n class=\"gap-1/2 flex flex-col\"\n role=\"listbox\">\n <template\n v-for=\"(item, index) in filteredVariables\"\n :key=\"`${item.kind}-${item.key}`\">\n <li\n :id=\"optionId(index)\"\n :aria-selected=\"index === selectedVariableIndex\"\n class=\"font-code text-xxs hover:bg-b-3 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150\"\n :class=\"{ 'bg-b-3': index === selectedVariableIndex }\"\n role=\"option\"\n @click=\"selectVariable(item.key)\">\n <div class=\"flex items-center gap-2 whitespace-nowrap\">\n <span\n v-if=\"item.kind === 'env'\"\n class=\"h-2.25 w-2.25 min-w-2.25 rounded-full\"\n :style=\"{\n backgroundColor: environment?.color,\n }\" />\n <span\n v-else\n class=\"text-c-3 bg-b-3 flex h-4.5 min-w-4.5 items-center justify-center rounded px-0.5 font-sans text-[9px] font-semibold\">\n fn\n </span>\n {{ item.key }}\n </div>\n <span\n class=\"max-w-[9rem] overflow-hidden text-right text-ellipsis whitespace-nowrap\">\n {{ item.secondary }}\n </span>\n </li>\n </template>\n </ul>\n <ScalarButton\n v-if=\"!filteredVariables.length\"\n class=\"font-code text-xxs bg-b-inherit hover:bg-b-3 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150\"\n variant=\"outlined\"\n @click=\"redirectToEnvironment\">\n <ScalarIconPlus class=\"size-3\" />{{\n translate('apiClient.environmentVariablesDropdown.addVariable')\n }}\n </ScalarButton>\n </div>\n </ScalarTeleport>\n</template>\n"],"mappings":""}
|
|
@@ -197,4 +197,4 @@ var EnvironmentVariablesDropdown_vue_vue_type_script_setup_true_lang_default = /
|
|
|
197
197
|
//#endregion
|
|
198
198
|
export { EnvironmentVariablesDropdown_vue_vue_type_script_setup_true_lang_default as default };
|
|
199
199
|
|
|
200
|
-
//# sourceMappingURL=EnvironmentVariablesDropdown.
|
|
200
|
+
//# sourceMappingURL=EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","_normalizeStyle","_withModifiers","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createTextVNode","_toDisplayString","_createVNode","_createCommentVNode"],"sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarTeleport } from '@scalar/components/teleport'\nimport { ScalarIconPlus } from '@scalar/icons'\nimport { POPULAR_CONTEXT_FUNCTION_KEYS } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { onClickOutside } from '@vueuse/core'\nimport Fuse from 'fuse.js'\nimport { computed, onMounted, ref, watch, type CSSProperties } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n query,\n environment,\n dropdownPosition,\n contextFunctionItems = [],\n listboxId,\n} = defineProps<{\n query: string\n environment?: XScalarEnvironment\n dropdownPosition?: { left: number; top: number }\n /** Runtime placeholders such as `{{$guid}}`, shown with environment variables */\n contextFunctionItems?: { key: string; description: string }[]\n /**\n * Id for the `role=\"listbox\"` element. When set, each option also receives a\n * stable id so the owning combobox input can reference the active option via\n * `aria-activedescendant` (W3C combobox pattern).\n */\n listboxId?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'select', variable: string): void\n (e: 'redirect'): void\n /**\n * Fired when the user dismisses the panel by clicking outside. The owning\n * combobox needs this to clear its `aria-expanded`/`aria-controls` state,\n * which would otherwise keep pointing at a listbox that is no longer mounted.\n */\n (e: 'close'): void\n}>()\n\nconst { translate } = useLocalization()\n\ntype DropdownRow =\n | { kind: 'env'; key: string; secondary: string }\n | { kind: 'context'; key: string; secondary: string }\n\nconst isOpen = ref(true)\nconst dropdownRef = ref<HTMLElement | null>(null)\nconst selectedVariableIndex = ref(0)\n\nconst redirectToEnvironment = () => {\n emit('redirect')\n isOpen.value = false\n // The panel is gone, so tell the combobox to drop its aria-expanded /\n // aria-controls — otherwise they keep pointing at a dismissed listbox.\n emit('close')\n}\n\n/** Normalize the variables to have a name and value */\nconst normalizedVariables = computed(() =>\n (environment?.variables ?? []).map((v) => ({\n key: v.name,\n value: typeof v.value === 'string' ? v.value : v.value.default,\n })),\n)\n\nconst contextRows = computed((): DropdownRow[] =>\n contextFunctionItems.map((item) => ({\n kind: 'context',\n key: item.key,\n secondary: item.description,\n })),\n)\n\nconst envRows = computed((): DropdownRow[] =>\n normalizedVariables.value\n .filter(({ key, value }) => key !== '' || value !== '')\n .map(({ key, value }) => ({\n kind: 'env' as const,\n key,\n secondary: value,\n })),\n)\n\ntype FuseRow = DropdownRow & { fuseText: string }\n\nconst envFuseSource = computed((): FuseRow[] =>\n envRows.value.map((row) => ({\n ...row,\n fuseText: `${row.key} ${row.secondary}`,\n })),\n)\n\nconst contextFuseSource = computed((): FuseRow[] =>\n contextRows.value.map((row) => ({\n ...row,\n fuseText: `${row.key} ${row.secondary}`,\n })),\n)\n\nconst fuseEnv = computed(\n () =>\n new Fuse(envFuseSource.value, {\n keys: ['fuseText'],\n threshold: 0.35,\n }),\n)\n\nconst fuseContext = computed(\n () =>\n new Fuse(contextFuseSource.value, {\n keys: ['fuseText'],\n threshold: 0.35,\n }),\n)\n\nconst popularContextRows = computed((): DropdownRow[] => {\n const byKey = new Map(contextFunctionItems.map((c) => [c.key, c]))\n return POPULAR_CONTEXT_FUNCTION_KEYS.flatMap((key) => {\n const item = byKey.get(key)\n return item\n ? [\n {\n kind: 'context' as const,\n key: item.key,\n secondary: item.description,\n },\n ]\n : []\n })\n})\n\nconst DROPDOWN_LIMIT = 12\n\nconst filteredVariables = computed((): DropdownRow[] => {\n if (!query.trim()) {\n const envSlice = envRows.value.slice(-4)\n return [...envSlice, ...popularContextRows.value]\n }\n\n const q = query.trim()\n const envMatches = fuseEnv.value\n .search(q, { limit: DROPDOWN_LIMIT })\n .map((res) => {\n const { kind, key, secondary } = res.item\n return { kind, key, secondary }\n })\n\n const remaining = DROPDOWN_LIMIT - envMatches.length\n const contextMatches =\n remaining > 0\n ? fuseContext.value.search(q, { limit: remaining }).map((res) => {\n const { kind, key, secondary } = res.item\n return { kind, key, secondary }\n })\n : []\n\n return [...envMatches, ...contextMatches]\n})\n\nconst optionId = (index: number): string | undefined =>\n listboxId ? `${listboxId}-option-${index}` : undefined\n\n/**\n * Id of the currently highlighted option, for the combobox's\n * `aria-activedescendant`. Undefined when there is no list to point at.\n */\nconst activeOptionId = computed((): string | undefined =>\n filteredVariables.value.length\n ? optionId(selectedVariableIndex.value)\n : undefined,\n)\n\nconst selectVariable = (variableKey: string): void => {\n emit('select', variableKey)\n}\n\n// Narrowing the query shrinks the list; keep the highlight in range so both the\n// visible selection and `aria-activedescendant` never reference a dropped option.\nwatch(\n () => filteredVariables.value.length,\n (length) => {\n if (selectedVariableIndex.value > length - 1) {\n selectedVariableIndex.value = Math.max(0, length - 1)\n }\n },\n)\n\nconst handleArrowKey = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = filteredVariables.value.length\n\n if (length === 0) {\n return\n }\n\n selectedVariableIndex.value =\n (selectedVariableIndex.value + offset + length) % length\n}\n\nconst handleSelect = () => {\n if (selectedVariableIndex.value >= 0) {\n const selectedVariable =\n filteredVariables.value[selectedVariableIndex.value]\n if (selectedVariable) {\n selectVariable(selectedVariable.key)\n }\n }\n}\n\ndefineExpose({\n handleArrowKey,\n handleSelect,\n activeOptionId,\n})\n\nonMounted(() => {\n // Reset selected index to the first item when dropdown opens\n selectedVariableIndex.value = 0\n})\n\nconst dropdownStyle = computed<CSSProperties>(() => {\n return {\n left: (dropdownPosition?.left ?? 0) + 'px',\n // Add a 5px offset from the editor\n top: (dropdownPosition?.top ?? 0) + 5 + 'px',\n }\n})\n\nonClickOutside(\n dropdownRef,\n () => {\n isOpen.value = false\n emit('close')\n },\n { ignore: [dropdownRef] },\n)\n</script>\n<template>\n <ScalarTeleport\n v-if=\"isOpen\"\n class=\"scalar-client\">\n <div\n ref=\"dropdownRef\"\n class=\"custom-scroll z-context bg-b-1 dark:bg-b-1.5 fixed top-0 left-0 flex max-h-[60svh] w-56 flex-col rounded border p-0.75 shadow-lg\"\n :style=\"dropdownStyle\"\n @mousedown.prevent>\n <!--\n Always rendered (even with no matches) so the combobox's `aria-controls`\n always resolves to a real listbox; an empty list simply has no options.\n -->\n <ul\n :id=\"listboxId\"\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesDropdown.variableSuggestions',\n )\n \"\n class=\"gap-1/2 flex flex-col\"\n role=\"listbox\">\n <template\n v-for=\"(item, index) in filteredVariables\"\n :key=\"`${item.kind}-${item.key}`\">\n <li\n :id=\"optionId(index)\"\n :aria-selected=\"index === selectedVariableIndex\"\n class=\"font-code text-xxs hover:bg-b-3 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150\"\n :class=\"{ 'bg-b-3': index === selectedVariableIndex }\"\n role=\"option\"\n @click=\"selectVariable(item.key)\">\n <div class=\"flex items-center gap-2 whitespace-nowrap\">\n <span\n v-if=\"item.kind === 'env'\"\n class=\"h-2.25 w-2.25 min-w-2.25 rounded-full\"\n :style=\"{\n backgroundColor: environment?.color,\n }\" />\n <span\n v-else\n class=\"text-c-3 bg-b-3 flex h-4.5 min-w-4.5 items-center justify-center rounded px-0.5 font-sans text-[9px] font-semibold\">\n fn\n </span>\n {{ item.key }}\n </div>\n <span\n class=\"max-w-[9rem] overflow-hidden text-right text-ellipsis whitespace-nowrap\">\n {{ item.secondary }}\n </span>\n </li>\n </template>\n </ul>\n <ScalarButton\n v-if=\"!filteredVariables.length\"\n class=\"font-code text-xxs bg-b-inherit hover:bg-b-3 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150\"\n variant=\"outlined\"\n @click=\"redirectToEnvironment\">\n <ScalarIconPlus class=\"size-3\" />{{\n translate('apiClient.environmentVariablesDropdown.addVariable')\n }}\n </ScalarButton>\n </div>\n </ScalarTeleport>\n</template>\n"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import EnvironmentVariablesTable_vue_vue_type_script_setup_true_lang_default from "./EnvironmentVariablesTable.
|
|
3
|
-
/* empty css
|
|
2
|
+
import EnvironmentVariablesTable_vue_vue_type_script_setup_true_lang_default from "./EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region src/v2/features/environments/components/EnvironmentVariablesTable.vue
|
|
5
5
|
var EnvironmentVariablesTable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(EnvironmentVariablesTable_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4b7f675d"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariablesTable.vue.js","names":[],"sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarIconTrash } from '@scalar/icons'\nimport type {\n CollectionType,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { computed } from 'vue'\n\nimport { CodeInputLite } from '@/v2/components/code-input'\nimport {\n DataTable,\n DataTableCell,\n DataTableHeader,\n DataTableRow,\n} from '@/v2/components/data-table'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { environment, environmentName, eventBus, collectionType } = defineProps<\n {\n environment: XScalarEnvironment\n environmentName: string\n eventBus: WorkspaceEventBus\n } & CollectionType\n>()\n\nconst { translate } = useLocalization()\n\n/** Column widths: Name, Value, Actions (delete button) */\nconst COLUMNS = ['1fr', '1fr', '36px']\n\n/** Adds an empty row at the end for creating new variables */\nconst displayRows = computed<\n {\n name: string\n value: string\n }[]\n>(() => {\n /** Normalize the variables to have a name and value */\n const variableRows = environment.variables.map((v) => ({\n name: v.name,\n value: typeof v.value === 'string' ? v.value : v.value.default,\n }))\n\n const lastRow = environment.variables.at(-1)\n const hasContentInLastRow =\n lastRow && (lastRow.name !== '' || lastRow.value !== '')\n\n // Add the extra row at the end\n if (!lastRow || hasContentInLastRow) {\n return [...variableRows, { name: '', value: '' }]\n }\n\n return variableRows\n})\n\n/** Updates an existing variable or creates a new one */\nconst handleVariableChange = (\n name: string,\n value: string,\n index: number,\n): void => {\n const isNewVariable = index >= environment.variables.length\n\n /**\n * Do not allow adding a new variable with an empty name on the last row,\n * we allow it on other rows as it will delete the row\n */\n if (!name && isNewVariable) {\n return\n }\n\n // Adding a new variable\n if (index >= environment.variables.length) {\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName,\n variable: { name, value },\n collectionType,\n })\n return\n }\n\n // Updating\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName,\n variable: { name, value },\n index,\n collectionType,\n })\n}\n\n/** Deletes a variable by index */\nconst handleVariableDelete = (index: number): void =>\n eventBus.emit('environment:delete:environment-variable', {\n environmentName,\n index,\n collectionType,\n })\n</script>\n<template>\n <!-- Environment variables table -->\n <DataTable\n class=\"group/table data-table h-min flex-1 rounded\"\n :columns=\"COLUMNS\">\n <!-- Accessibility header row -->\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.name') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.value') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.actions') }}\n </DataTableHeader>\n </DataTableRow>\n\n <!-- Variable rows -->\n <DataTableRow\n v-for=\"(row, index) in displayRows\"\n :key=\"index\"\n class=\"group/row\">\n <!-- Name -->\n <DataTableCell>\n <CodeInputLite\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesTable.environmentVariableName',\n )\n \"\n :environment=\"undefined\"\n :modelValue=\"row.name\"\n :placeholder=\"translate('apiClient.environmentVariablesTable.name')\"\n @update:modelValue=\"\n (name) => handleVariableChange(name, row.value, index)\n \" />\n </DataTableCell>\n\n <!-- Value -->\n <DataTableCell>\n <CodeInputLite\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesTable.environmentVariableValue',\n )\n \"\n :environment=\"undefined\"\n :modelValue=\"row.value\"\n :placeholder=\"translate('apiClient.environmentVariablesTable.value')\"\n @update:modelValue=\"\n (value) => handleVariableChange(row.name, value, index)\n \" />\n </DataTableCell>\n\n <!-- Delete button -->\n <DataTableCell class=\"flex items-center justify-center\">\n <ScalarButton\n v-if=\"index < environment.variables.length\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 hidden h-fit rounded p-1 group-focus-within:flex group-hover/row:flex\"\n size=\"sm\"\n variant=\"ghost\"\n @click=\"handleVariableDelete(index)\">\n <ScalarIconTrash class=\"size-3.5\" />\n </ScalarButton>\n </DataTableCell>\n </DataTableRow>\n </DataTable>\n</template>\n<style scoped>\n:deep(.code-input-lite__editor) {\n background-color: transparent;\n font-family: var(--scalar-font);\n font-size: var(--scalar-small);\n padding: 5px 8px;\n}\n:deep(.scalar-pill:not(:last-of-type)) {\n margin-right: 0.15em;\n}\n:deep(.scalar-pill:not(:first-of-type)) {\n margin-left: 0.5px;\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesTable.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarIconTrash } from '@scalar/icons'\nimport type {\n CollectionType,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { computed } from 'vue'\n\nimport { CodeInputLite } from '@/v2/components/code-input'\nimport {\n DataTable,\n DataTableCell,\n DataTableHeader,\n DataTableRow,\n} from '@/v2/components/data-table'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { environment, environmentName, eventBus, collectionType } = defineProps<\n {\n environment: XScalarEnvironment\n environmentName: string\n eventBus: WorkspaceEventBus\n } & CollectionType\n>()\n\nconst { translate } = useLocalization()\n\n/** Column widths: Name, Value, Actions (delete button) */\nconst COLUMNS = ['1fr', '1fr', '36px']\n\n/** Adds an empty row at the end for creating new variables */\nconst displayRows = computed<\n {\n name: string\n value: string\n }[]\n>(() => {\n /** Normalize the variables to have a name and value */\n const variableRows = environment.variables.map((v) => ({\n name: v.name,\n value: typeof v.value === 'string' ? v.value : v.value.default,\n }))\n\n const lastRow = environment.variables.at(-1)\n const hasContentInLastRow =\n lastRow && (lastRow.name !== '' || lastRow.value !== '')\n\n // Add the extra row at the end\n if (!lastRow || hasContentInLastRow) {\n return [...variableRows, { name: '', value: '' }]\n }\n\n return variableRows\n})\n\n/** Updates an existing variable or creates a new one */\nconst handleVariableChange = (\n name: string,\n value: string,\n index: number,\n): void => {\n const isNewVariable = index >= environment.variables.length\n\n /**\n * Do not allow adding a new variable with an empty name on the last row,\n * we allow it on other rows as it will delete the row\n */\n if (!name && isNewVariable) {\n return\n }\n\n // Adding a new variable\n if (index >= environment.variables.length) {\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName,\n variable: { name, value },\n collectionType,\n })\n return\n }\n\n // Updating\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName,\n variable: { name, value },\n index,\n collectionType,\n })\n}\n\n/** Deletes a variable by index */\nconst handleVariableDelete = (index: number): void =>\n eventBus.emit('environment:delete:environment-variable', {\n environmentName,\n index,\n collectionType,\n })\n</script>\n<template>\n <!-- Environment variables table -->\n <DataTable\n class=\"group/table data-table h-min flex-1 rounded\"\n :columns=\"COLUMNS\">\n <!-- Accessibility header row -->\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.name') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.value') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.actions') }}\n </DataTableHeader>\n </DataTableRow>\n\n <!-- Variable rows -->\n <DataTableRow\n v-for=\"(row, index) in displayRows\"\n :key=\"index\"\n class=\"group/row\">\n <!-- Name -->\n <DataTableCell>\n <CodeInputLite\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesTable.environmentVariableName',\n )\n \"\n :environment=\"undefined\"\n :modelValue=\"row.name\"\n :placeholder=\"translate('apiClient.environmentVariablesTable.name')\"\n @update:modelValue=\"\n (name) => handleVariableChange(name, row.value, index)\n \" />\n </DataTableCell>\n\n <!-- Value -->\n <DataTableCell>\n <CodeInputLite\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesTable.environmentVariableValue',\n )\n \"\n :environment=\"undefined\"\n :modelValue=\"row.value\"\n :placeholder=\"translate('apiClient.environmentVariablesTable.value')\"\n @update:modelValue=\"\n (value) => handleVariableChange(row.name, value, index)\n \" />\n </DataTableCell>\n\n <!-- Delete button -->\n <DataTableCell class=\"flex items-center justify-center\">\n <ScalarButton\n v-if=\"index < environment.variables.length\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 hidden h-fit rounded p-1 group-focus-within:flex group-hover/row:flex\"\n size=\"sm\"\n variant=\"ghost\"\n @click=\"handleVariableDelete(index)\">\n <ScalarIconTrash class=\"size-3.5\" />\n </ScalarButton>\n </DataTableCell>\n </DataTableRow>\n </DataTable>\n</template>\n<style scoped>\n:deep(.code-input-lite__editor) {\n background-color: transparent;\n font-family: var(--scalar-font);\n font-size: var(--scalar-small);\n padding: 5px 8px;\n}\n:deep(.scalar-pill:not(:last-of-type)) {\n margin-right: 0.15em;\n}\n:deep(.scalar-pill:not(:first-of-type)) {\n margin-left: 0.5px;\n}\n</style>\n"],"mappings":""}
|
|
@@ -156,4 +156,4 @@ var EnvironmentVariablesTable_vue_vue_type_script_setup_true_lang_default = /*@_
|
|
|
156
156
|
//#endregion
|
|
157
157
|
export { EnvironmentVariablesTable_vue_vue_type_script_setup_true_lang_default as default };
|
|
158
158
|
|
|
159
|
-
//# sourceMappingURL=EnvironmentVariablesTable.
|
|
159
|
+
//# sourceMappingURL=EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","DataTable","_withCtx","_createVNode","DataTableRow","DataTableHeader","_createTextVNode","_toDisplayString","_createElementBlock","_Fragment","_renderList","DataTableCell","CodeInputLite","_createCommentVNode"],"sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarIconTrash } from '@scalar/icons'\nimport type {\n CollectionType,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { computed } from 'vue'\n\nimport { CodeInputLite } from '@/v2/components/code-input'\nimport {\n DataTable,\n DataTableCell,\n DataTableHeader,\n DataTableRow,\n} from '@/v2/components/data-table'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst { environment, environmentName, eventBus, collectionType } = defineProps<\n {\n environment: XScalarEnvironment\n environmentName: string\n eventBus: WorkspaceEventBus\n } & CollectionType\n>()\n\nconst { translate } = useLocalization()\n\n/** Column widths: Name, Value, Actions (delete button) */\nconst COLUMNS = ['1fr', '1fr', '36px']\n\n/** Adds an empty row at the end for creating new variables */\nconst displayRows = computed<\n {\n name: string\n value: string\n }[]\n>(() => {\n /** Normalize the variables to have a name and value */\n const variableRows = environment.variables.map((v) => ({\n name: v.name,\n value: typeof v.value === 'string' ? v.value : v.value.default,\n }))\n\n const lastRow = environment.variables.at(-1)\n const hasContentInLastRow =\n lastRow && (lastRow.name !== '' || lastRow.value !== '')\n\n // Add the extra row at the end\n if (!lastRow || hasContentInLastRow) {\n return [...variableRows, { name: '', value: '' }]\n }\n\n return variableRows\n})\n\n/** Updates an existing variable or creates a new one */\nconst handleVariableChange = (\n name: string,\n value: string,\n index: number,\n): void => {\n const isNewVariable = index >= environment.variables.length\n\n /**\n * Do not allow adding a new variable with an empty name on the last row,\n * we allow it on other rows as it will delete the row\n */\n if (!name && isNewVariable) {\n return\n }\n\n // Adding a new variable\n if (index >= environment.variables.length) {\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName,\n variable: { name, value },\n collectionType,\n })\n return\n }\n\n // Updating\n eventBus.emit('environment:upsert:environment-variable', {\n environmentName,\n variable: { name, value },\n index,\n collectionType,\n })\n}\n\n/** Deletes a variable by index */\nconst handleVariableDelete = (index: number): void =>\n eventBus.emit('environment:delete:environment-variable', {\n environmentName,\n index,\n collectionType,\n })\n</script>\n<template>\n <!-- Environment variables table -->\n <DataTable\n class=\"group/table data-table h-min flex-1 rounded\"\n :columns=\"COLUMNS\">\n <!-- Accessibility header row -->\n <DataTableRow class=\"sr-only !block\">\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.name') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.value') }}\n </DataTableHeader>\n <DataTableHeader>\n {{ translate('apiClient.environmentVariablesTable.actions') }}\n </DataTableHeader>\n </DataTableRow>\n\n <!-- Variable rows -->\n <DataTableRow\n v-for=\"(row, index) in displayRows\"\n :key=\"index\"\n class=\"group/row\">\n <!-- Name -->\n <DataTableCell>\n <CodeInputLite\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesTable.environmentVariableName',\n )\n \"\n :environment=\"undefined\"\n :modelValue=\"row.name\"\n :placeholder=\"translate('apiClient.environmentVariablesTable.name')\"\n @update:modelValue=\"\n (name) => handleVariableChange(name, row.value, index)\n \" />\n </DataTableCell>\n\n <!-- Value -->\n <DataTableCell>\n <CodeInputLite\n :aria-label=\"\n translate(\n 'apiClient.environmentVariablesTable.environmentVariableValue',\n )\n \"\n :environment=\"undefined\"\n :modelValue=\"row.value\"\n :placeholder=\"translate('apiClient.environmentVariablesTable.value')\"\n @update:modelValue=\"\n (value) => handleVariableChange(row.name, value, index)\n \" />\n </DataTableCell>\n\n <!-- Delete button -->\n <DataTableCell class=\"flex items-center justify-center\">\n <ScalarButton\n v-if=\"index < environment.variables.length\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 hidden h-fit rounded p-1 group-focus-within:flex group-hover/row:flex\"\n size=\"sm\"\n variant=\"ghost\"\n @click=\"handleVariableDelete(index)\">\n <ScalarIconTrash class=\"size-3.5\" />\n </ScalarButton>\n </DataTableCell>\n </DataTableRow>\n </DataTable>\n</template>\n<style scoped>\n:deep(.code-input-lite__editor) {\n background-color: transparent;\n font-family: var(--scalar-font);\n font-size: var(--scalar-small);\n padding: 5px 8px;\n}\n:deep(.scalar-pill:not(:last-of-type)) {\n margin-right: 0.15em;\n}\n:deep(.scalar-pill:not(:first-of-type)) {\n margin-left: 0.5px;\n}\n</style>\n"],"mappings":"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"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { EnvironmentsList_default as EnvironmentsList };
|
|
1
|
+
export { default as EnvironmentsList } from "./EnvironmentsList.vue.js";
|
|
@@ -4,8 +4,8 @@ import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
|
4
4
|
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
5
5
|
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
6
6
|
import { type ComputedRef, type MaybeRefOrGetter, type Ref } from 'vue';
|
|
7
|
-
import { type UseModalSidebarReturn } from '
|
|
8
|
-
import type { ApiClientOptions, ApiClientOptionsRef } from '
|
|
7
|
+
import { type UseModalSidebarReturn } from './hooks/use-modal-sidebar.js';
|
|
8
|
+
import type { ApiClientOptions, ApiClientOptionsRef } from '../../types/options.js';
|
|
9
9
|
export type ModalProps = {
|
|
10
10
|
/** The workspace store must be initialized and passed in */
|
|
11
11
|
workspaceStore: WorkspaceStore;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Modal_vue_vue_type_script_setup_true_lang_default from "./Modal.
|
|
1
|
+
import Modal_vue_vue_type_script_setup_true_lang_default from "./Modal.vue_vue_type_script_setup_true_lang.js";
|
|
2
2
|
//#region src/v2/features/modal/Modal.vue
|
|
3
3
|
var Modal_default = Modal_vue_vue_type_script_setup_true_lang_default;
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.js","names":[],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<string | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n getConfiguredSecuritySchemes: () =>\n options.value.authentication?.securitySchemes,\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <!--\n The toggle keeps its place inside the panel while the header row is wide\n enough for the address bar to centre itself clear of it. Below `lg` the\n bar fills the row and its method chip reaches the panel edge, so the\n toggle moves onto the backdrop and mirrors the close button in the\n opposite corner, leaving the whole row to the bar.\n -->\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-lg:fixed max-lg:top-2 max-lg:left-2\"\n variant=\"overlay\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Modal.vue.js","names":["_sfc_main"],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<string | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n getConfiguredSecuritySchemes: () =>\n options.value.authentication?.securitySchemes,\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <!--\n The toggle keeps its place inside the panel while the header row is wide\n enough for the address bar to centre itself clear of it. Below `lg` the\n bar fills the row and its method chip reaches the panel edge, so the\n toggle moves onto the backdrop and mirrors the close button in the\n opposite corner, leaving the whole row to the bar.\n -->\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-lg:fixed max-lg:top-2 max-lg:left-2\"\n variant=\"overlay\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":""}
|
package/dist/v2/features/modal/{Modal.vue.script.js → Modal.vue_vue_type_script_setup_true_lang.js}
RENAMED
|
@@ -161,4 +161,4 @@ var Modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
161
161
|
//#endregion
|
|
162
162
|
export { Modal_vue_vue_type_script_setup_true_lang_default as default };
|
|
163
163
|
|
|
164
|
-
//# sourceMappingURL=Modal.
|
|
164
|
+
//# sourceMappingURL=Modal.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","ModalClientContainer","_unref","_withCtx","_createVNode","_createElementBlock","SidebarToggle","_withDirectives","Sidebar","_vShow","Operation","_createElementVNode","_toDisplayString"],"sources":["../../../../src/v2/features/modal/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type ModalProps = {\n /** The workspace store must be initialized and passed in */\n workspaceStore: WorkspaceStore\n /** The document must be initialized and passed in. OpenAPI-only — the modal has no AsyncAPI path. */\n document: ComputedRef<OpenApiDocument | null>\n /** The path must be initialized and passed in */\n path: ComputedRef<string | undefined>\n /** The event bus for handling all events */\n eventBus: WorkspaceEventBus\n /** The method must be initialized and passed in */\n method: ComputedRef<string | undefined>\n /** The example name must be initialized and passed in */\n exampleName: ComputedRef<string | undefined>\n /** Whether the active route resolves from `document.webhooks`. */\n isWebhook: ComputedRef<boolean>\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection: Ref<Record<string, number>>\n /** Controls the visibility of the modal */\n modalState: ModalState\n /** The sidebar state must be initialized and passed in */\n sidebarState: UseModalSidebarReturn\n /** Api client plugins to include in the modal */\n plugins: ClientPlugin[]\n /** Subset of the configuration options for the modal */\n options: MaybeRefOrGetter<ApiClientOptions>\n}\n\n/**\n * Scalar Api Client Modal\n *\n * This component is used to render the API Client Modal\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarListboxOption } from '@scalar/components/listbox'\nimport type { ModalState } from '@scalar/components/modal'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getActiveEnvironment } from '@scalar/workspace-store/request-example'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n onBeforeUnmount,\n ref,\n watch,\n type ComputedRef,\n type MaybeRefOrGetter,\n type Ref,\n} from 'vue'\n\nimport ModalClientContainer from '@/v2/components/modals/ModalClientContainer.vue'\nimport { Sidebar, SidebarToggle } from '@/v2/components/sidebar'\nimport { provideLocalization } from '@/v2/features/localization'\nimport { type UseModalSidebarReturn } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport { initializeModalEvents } from '@/v2/features/modal/modal-events'\nimport Operation from '@/v2/features/operation/Operation.vue'\nimport { useGlobalHotKeys } from '@/v2/hooks/use-global-hot-keys'\nimport { useScrollLock } from '@/v2/hooks/use-scroll-lock'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\nconst {\n document,\n eventBus,\n modalState,\n options,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n} = defineProps<\n Omit<ModalProps, 'options'> & { options: ApiClientOptionsRef }\n>()\n\nconst { translate, locale, direction } = provideLocalization(\n () => options.value.localization,\n)\n\nconst activeWorkspace: ScalarListboxOption = {\n label: 'default',\n id: 'default',\n}\n\n/** Controls the visibility of the sidebar. */\nconst isSidebarOpen = ref(false)\n\n/** Initialize modal events */\ninitializeModalEvents({\n getConfiguredSecuritySchemes: () =>\n options.value.authentication?.securitySchemes,\n eventBus,\n isSidebarOpen,\n requestBodyCompositionSelection,\n sidebarState,\n modalState,\n store: workspaceStore,\n})\n\n/** Register global hotkeys for the app, passing the workspace event bus and layout state */\nuseGlobalHotKeys(eventBus, 'modal', () => !modalState.open)\n\n/** Clean up on close */\nconst cleanUp = () => {\n eventBus.emit('operation:cancel:request')\n}\n\nconst isLocked = useScrollLock(() => {\n if (typeof window !== 'undefined') {\n return window.document.body\n }\n return null\n})\n\nwatch(\n () => modalState.open,\n (open) => {\n // Make sure scrolling is locked or unlocked when the modal is opened or closed\n isLocked.value = open\n\n if (!open) {\n cleanUp()\n }\n },\n)\n\n// Ensure we add our scalar wrapper class to the headless ui root\nonBeforeUnmount(() => cleanUp())\n\n/** Default sidebar width in pixels. */\nconst DEFAULT_SIDEBAR_WIDTH = 288\n\n/** Width of the sidebar, with fallback to default. */\nconst sidebarWidth = computed(\n () =>\n workspaceStore?.workspace?.['x-scalar-sidebar-width'] ??\n DEFAULT_SIDEBAR_WIDTH,\n)\n\n/** Handler for sidebar width changes. */\nconst handleSidebarWidthUpdate = (width: number) =>\n workspaceStore?.update('x-scalar-sidebar-width', width)\n\n/**\n * Merged environment variables from workspace and document levels.\n * Variables from both sources are combined, with document variables\n * taking precedence in case of naming conflicts.\n */\nconst environment = computed(\n () => getActiveEnvironment(workspaceStore, document.value).environment,\n)\n\ndefineExpose({\n sidebarWidth,\n environment,\n})\n</script>\n\n<template>\n <ModalClientContainer\n :dir=\"direction\"\n :lang=\"locale\"\n :modalState>\n <!-- Toasts -->\n <ScalarToasts />\n\n <!-- If we have a document, path and method, render the operation -->\n <main\n v-if=\"document.value && path?.value && method?.value\"\n class=\"relative flex h-full min-h-0 w-full flex-1\">\n <!--\n The toggle keeps its place inside the panel while the header row is wide\n enough for the address bar to centre itself clear of it. Below `lg` the\n bar fills the row and its method chip reaches the panel edge, so the\n toggle moves onto the backdrop and mirrors the close button in the\n opposite corner, leaving the whole row to the bar.\n -->\n <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-lg:fixed max-lg:top-2 max-lg:left-2\"\n variant=\"overlay\" />\n <Sidebar\n v-show=\"isSidebarOpen\"\n v-model:sidebarWidth=\"sidebarWidth\"\n :activeWorkspace=\"activeWorkspace\"\n class=\"h-full max-md:absolute! max-md:z-5 max-md:w-full!\"\n :documents=\"[document.value]\"\n :eventBus\n :isDroppable=\"() => false\"\n layout=\"modal\"\n :sidebarState=\"sidebarState.state\"\n :workspaces=\"[]\"\n @selectItem=\"sidebarState.handleSelectItem\"\n @update:sidebarWidth=\"handleSidebarWidthUpdate\" />\n <Operation\n :activeWorkspace=\"activeWorkspace\"\n class=\"flex-1\"\n :document=\"document.value\"\n :documentSlug=\"document.value['x-scalar-navigation']?.name ?? ''\"\n :environment\n :eventBus\n :exampleName=\"exampleName?.value\"\n :isActive=\"modalState.open\"\n :isWebhook=\"isWebhook.value\"\n layout=\"modal\"\n :method=\"method?.value\"\n :options\n :path=\"path?.value\"\n :plugins\n :requestBodyCompositionSelection=\"requestBodyCompositionSelection.value\"\n :workspaceStore />\n </main>\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\">\n <span class=\"text-c-3\">{{\n translate('apiClient.modal.noDocumentSelected')\n }}</span>\n </div>\n </ModalClientContainer>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EA,MAAM,EAAE,WAAW,QAAQ,cAAc,0BACjC,QAAA,QAAQ,MAAM,YACtB;EAEA,MAAM,kBAAuC;GAC3C,OAAO;GACP,IAAI;EACN;;EAGA,MAAM,gBAAgB,IAAI,KAAK;;EAG/B,sBAAsB;GACpB,oCACE,QAAA,QAAQ,MAAM,gBAAgB;GAChC,UAAO,QAAA;GACP;GACA,iCAA8B,QAAA;GAC9B,cAAW,QAAA;GACX,YAAS,QAAA;GACT,OAAO,QAAA;EACT,CAAC;;EAGD,iBAAiB,QAAA,UAAU,eAAe,CAAC,QAAA,WAAW,IAAI;;EAG1D,MAAM,gBAAgB;GACpB,QAAA,SAAS,KAAK,0BAA0B;EAC1C;EAEA,MAAM,WAAW,oBAAoB;GACnC,IAAI,OAAO,WAAW,aACpB,OAAO,OAAO,SAAS;GAEzB,OAAO;EACT,CAAC;EAED,YACQ,QAAA,WAAW,OAChB,SAAS;GAER,SAAS,QAAQ;GAEjB,IAAI,CAAC,MACH,QAAQ;EAEZ,CACF;EAGA,sBAAsB,QAAQ,CAAC;;EAG/B,MAAM,wBAAwB;;EAG9B,MAAM,eAAe,eAEjB,QAAA,gBAAgB,YAAY,6BAC5B,qBACJ;;EAGA,MAAM,4BAA4B,UAChC,QAAA,gBAAgB,OAAO,0BAA0B,KAAK;;;;;;EAOxD,MAAM,cAAc,eACZ,qBAAqB,QAAA,gBAAgB,QAAA,SAAS,KAAK,CAAC,CAAC,WAC7D;EAEA,SAAa;GACX;GACA;EACF,CAAC;;GAIC,OAAAA,UAAA,GAAAC,YA6DuBC,8BAAA;IA5DpB,KAAKC,MAAA,SAAA;IACL,MAAMA,MAAA,MAAA;IACN,YAAA,QAAA;;IAED,SAAAC,cAAgB,CAAhBC,YAAgBF,MAAA,YAAA,CAAA,GAIR,QAAA,SAAS,SAAS,QAAA,MAAM,SAAS,QAAA,QAAQ,SADjDH,UAAA,GAAAM,mBA4CO,QA5CP,YA4CO;KAlCLD,YAGsBF,MAAAI,qBAAA,GAAA;MAFX,YAAA,cAAA;MAAA,uBAAA,OAAA,OAAA,OAAA,MAAA,WAAA,cAAa,QAAA;MACtB,OAAM;MACN,SAAQ;;KACVC,eAAAH,YAYoDF,MAAAM,eAAA,GAAA;MAV1C,cAAc,aAAA;M,0BAAA,OAAA,OAAA,OAAA,MAAA,WAAA,aAAY,QAAA,SAUZ,wB;MATJ;MAClB,OAAM;MACL,WAAS,CAAG,QAAA,SAAS,KAAK;MAC1B,UAAA,QAAA;MACA,mBAAa;MACd,QAAO;MACN,cAAc,QAAA,aAAa;MAC3B,YAAY,CAAA;MACZ,cAAY,QAAA,aAAa;;;;;;;K,KAVlB,CAAAC,OAAA,cAAA,KAAa,C;KAYvBL,YAgBoBM,mBAAA;MAfA;MAClB,OAAM;MACL,UAAU,QAAA,SAAS;MACnB,cAAc,QAAA,SAAS,MAAK,sBAAA,EAAyB,QAAI;MACzD,aAAA,YAAA;MACA,UAAA,QAAA;MACA,aAAa,QAAA,aAAa;MAC1B,UAAU,QAAA,WAAW;MACrB,WAAW,QAAA,UAAU;MACtB,QAAO;MACN,QAAQ,QAAA,QAAQ;MAChB,SAAA,QAAA;MACA,MAAM,QAAA,MAAM;MACZ,SAAA,QAAA;MACA,iCAAiC,QAAA,gCAAgC;MACjE,gBAAA,QAAA;;;;;;;;;;;;;;;;I,OAGLX,UAAA,GAAAM,mBAMM,OANN,YAMM,CAHJM,mBAES,QAFT,YAESC,gBADPV,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,C"}
|
|
@@ -3,8 +3,8 @@ import { type ClientPlugin } from '@scalar/oas-utils/helpers';
|
|
|
3
3
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
4
|
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
5
5
|
import { type App, type MaybeRefOrGetter } from 'vue';
|
|
6
|
-
import { type RoutePayload } from '
|
|
7
|
-
import type { ApiClientOptions } from '
|
|
6
|
+
import { type RoutePayload } from './resolve-route-parameters.js';
|
|
7
|
+
import type { ApiClientOptions } from '../../../types/options.js';
|
|
8
8
|
type CreateApiClientOptions = {
|
|
9
9
|
/** Element to mount the client modal to. */
|
|
10
10
|
el: HTMLElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-client-modal.js","names":[],"sources":["../../../../../src/v2/features/modal/helpers/create-api-client-modal.ts"],"sourcesContent":["import { type ModalState, useModal } from '@scalar/components/modal'\nimport { type ClientPlugin, subscribePluginEvents } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus, createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { type App, type MaybeRefOrGetter, computed, createApp, isRef, reactive, ref, toValue, watch } from 'vue'\n\nimport {\n type DefaultEntities,\n type RoutePayload,\n resolveRouteParameters,\n} from '@/v2/features/modal/helpers/resolve-route-parameters'\nimport { useModalSidebar } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport Modal, { type ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\ntype CreateApiClientOptions = {\n /** Element to mount the client modal to. */\n el: HTMLElement | null\n /**\n * Will attempt to mount the references immediately.\n * For SSR this may need to be disabled and handled manually on the client side.\n */\n mountOnInitialize?: boolean\n /** You can pass in an event bus if you have one already, or we will create one */\n eventBus?: WorkspaceEventBus\n /** The workspace store must be initialized and passed in. */\n workspaceStore: WorkspaceStore\n /** Api client plugins to include in the modal */\n plugins?: ClientPlugin[]\n /** Subset of the configuration options for the modal, if you want it to be reactive ensure its a ref */\n options?: MaybeRefOrGetter<ApiClientOptions>\n}\n\nexport type ApiClientModal = {\n app: App\n open: (payload?: RoutePayload) => void\n mount: (mountingEl: HTMLElement | null) => void\n route: (payload: RoutePayload) => void\n updateOptions: (nextOptions: ApiClientOptions, overwrite?: boolean) => void\n modalState: ModalState\n}\n\n/**\n * Monotonic counter used to give every modal Vue app a unique `idPrefix`.\n *\n * Vue derives `useId()` values (and therefore our teleport target ids) from the app's\n * `idPrefix`. When more than one client app mounts on the same page — for example, the\n * API reference embeds this modal alongside another client instance — a shared prefix\n * makes both apps emit identical ids. A teleported popover then resolves to the first\n * matching target in the DOM, which can be a hidden app, so the popover never appears.\n * A per-app suffix keeps the ids unique across instances.\n */\nlet modalAppCount = 0\n\n/**\n * Creates the API Client Modal.\n *\n * The modal does not require a router. Instead, navigation is handled by setting\n * active entities directly through the returned `route` function.\n */\nexport const createApiClientModal = ({\n el,\n eventBus = createWorkspaceEventBus({\n debug: import.meta.env.DEV,\n }),\n mountOnInitialize = true,\n plugins = [],\n workspaceStore,\n options = {},\n}: CreateApiClientOptions): ApiClientModal => {\n const requestBodyCompositionSelection = ref<Record<string, number>>({})\n\n /** This is to ensure that the options are a ref if they are not already, useful for react */\n const optionsRef: ApiClientOptionsRef = isRef(options) ? options : ref(toValue(options))\n\n const defaultEntities: DefaultEntities = {\n path: 'default',\n method: 'default',\n example: 'default',\n documentSlug: workspaceStore.workspace['x-scalar-active-document'] || 'default',\n isWebhook: false,\n }\n\n const parameters = reactive<DefaultEntities>({ ...defaultEntities })\n\n /** Navigate to the specified path, method, and example. */\n const route = (payload: RoutePayload): void => {\n Object.assign(parameters, defaultEntities, payload)\n }\n\n /** Resolved parameters from the workspace store. */\n const resolvedParameters = computed(() => resolveRouteParameters(workspaceStore, parameters))\n const documentSlug = computed(() => resolvedParameters.value.documentSlug)\n const path = computed(() => resolvedParameters.value.path)\n const method = computed(() => resolvedParameters.value.method)\n const exampleName = computed(() => resolvedParameters.value.example)\n const isWebhook = computed(() => resolvedParameters.value.isWebhook ?? false)\n /** The document from the workspace store. Modal is OpenAPI-only; AsyncAPI docs surface as null. */\n const document = computed(() => {\n const doc = workspaceStore.workspace.documents[documentSlug.value ?? '']\n return isOpenApiDocument(doc) ? doc : null\n })\n\n /** Sidebar state and selection handling. */\n const sidebarState = useModalSidebar({\n workspaceStore,\n documentSlug: documentSlug,\n path: path,\n method: method,\n exampleName: exampleName,\n isWebhook,\n route,\n })\n\n const modalState = useModal()\n\n const app = createApp(Modal, {\n document,\n eventBus,\n exampleName,\n isWebhook,\n method,\n modalState,\n path,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n options: optionsRef,\n } satisfies ModalProps)\n\n /** Initialize plugins and subscribe to event bus events */\n const pluginUnsubscribes: (() => void)[] = []\n for (const plugin of plugins) {\n plugin.lifecycle?.onInit?.()\n\n pluginUnsubscribes.push(subscribePluginEvents(eventBus, plugin))\n }\n\n /** Clean up plugin lifecycle and event bus subscriptions when the app is unmounted */\n app.onUnmount(() => {\n for (const unsub of pluginUnsubscribes) {\n unsub()\n }\n for (const plugin of plugins) {\n plugin.lifecycle?.onDestroy?.()\n }\n })\n\n // Update the active proxy when the proxyUrl changes\n watch(\n () => toValue(optionsRef).proxyUrl,\n (newProxyUrl) => workspaceStore.update('x-scalar-active-proxy', newProxyUrl),\n { immediate: true },\n )\n\n // Use a unique id prefix to prevent collisions with other Vue apps on the page.\n // The suffix keeps the prefix unique even when several client apps mount together.\n app.config.idPrefix = `scalar-client-${modalAppCount++}`\n\n /** Mount the modal to a given element. */\n const mount = (mountingEl: HTMLElement | null = el): void => {\n if (!mountingEl) {\n console.error(\n '[@scalar/api-client] Could not create the API client Modal.',\n 'Invalid HTML element provided.',\n 'Read more: https://github.com/scalar/scalar/tree/main/packages/api-client',\n )\n return\n }\n app.mount(mountingEl)\n }\n\n if (mountOnInitialize) {\n mount()\n }\n\n return {\n /** The Vue app instance for the modal. Use with caution. */\n app,\n /** Open the modal and optionally navigate to a specific route. */\n open: (payload?: RoutePayload): void => {\n // This path does not carry a composition selection, so clear any selection left over from a\n // previously opened operation. (The event-driven open path re-establishes it from its payload.)\n requestBodyCompositionSelection.value = {}\n modalState.open = true\n if (payload) {\n route(payload)\n }\n },\n /** Mount the modal to a given element. */\n mount,\n /** Navigate to the specified path, method, and example. */\n route,\n /** Controls the visibility of the modal. */\n modalState,\n /**\n * Merge new options into the current modal options.\n *\n * @param newOptions - The new options to merge into the current modal options.\n * @param overwrite - Whether to overwrite the current modal options with the new options. If false, the new options will be merged with the current options.\n */\n updateOptions: (newOptions: ApiClientOptions, overwrite = false): void => {\n optionsRef.value = overwrite\n ? newOptions\n : {\n ...optionsRef.value,\n ...newOptions,\n }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqDA,IAAI,gBAAgB;;;;;;;AAQpB,IAAa,wBAAwB,EACnC,IACA,WAAW,wBAAwB,EACjC,OAAA,MACF,CAAC,GACD,oBAAoB,MACpB,UAAU,CAAC,GACX,gBACA,UAAU,CAAC,QACiC;CAC5C,MAAM,kCAAkC,IAA4B,CAAC,CAAC;;CAGtE,MAAM,aAAkC,MAAM,OAAO,IAAI,UAAU,IAAI,QAAQ,OAAO,CAAC;CAEvF,MAAM,kBAAmC;EACvC,MAAM;EACN,QAAQ;EACR,SAAS;EACT,cAAc,eAAe,UAAU,+BAA+B;EACtE,WAAW;CACb;CAEA,MAAM,aAAa,SAA0B,EAAE,GAAG,gBAAgB,CAAC;;CAGnE,MAAM,SAAS,YAAgC;EAC7C,OAAO,OAAO,YAAY,iBAAiB,OAAO;CACpD;;CAGA,MAAM,qBAAqB,eAAe,uBAAuB,gBAAgB,UAAU,CAAC;CAC5F,MAAM,eAAe,eAAe,mBAAmB,MAAM,YAAY;CACzE,MAAM,OAAO,eAAe,mBAAmB,MAAM,IAAI;CACzD,MAAM,SAAS,eAAe,mBAAmB,MAAM,MAAM;CAC7D,MAAM,cAAc,eAAe,mBAAmB,MAAM,OAAO;CACnE,MAAM,YAAY,eAAe,mBAAmB,MAAM,aAAa,KAAK;;CAE5E,MAAM,WAAW,eAAe;EAC9B,MAAM,MAAM,eAAe,UAAU,UAAU,aAAa,SAAS;EACrE,OAAO,kBAAkB,GAAG,IAAI,MAAM;CACxC,CAAC;;CAGD,MAAM,eAAe,gBAAgB;EACnC;EACc;EACR;EACE;EACK;EACb;EACA;CACF,CAAC;CAED,MAAM,aAAa,SAAS;CAE5B,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"create-api-client-modal.js","names":["Modal"],"sources":["../../../../../src/v2/features/modal/helpers/create-api-client-modal.ts"],"sourcesContent":["import { type ModalState, useModal } from '@scalar/components/modal'\nimport { type ClientPlugin, subscribePluginEvents } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { type WorkspaceEventBus, createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { type App, type MaybeRefOrGetter, computed, createApp, isRef, reactive, ref, toValue, watch } from 'vue'\n\nimport {\n type DefaultEntities,\n type RoutePayload,\n resolveRouteParameters,\n} from '@/v2/features/modal/helpers/resolve-route-parameters'\nimport { useModalSidebar } from '@/v2/features/modal/hooks/use-modal-sidebar'\nimport Modal, { type ModalProps } from '@/v2/features/modal/Modal.vue'\nimport type { ApiClientOptions, ApiClientOptionsRef } from '@/v2/types/options'\n\ntype CreateApiClientOptions = {\n /** Element to mount the client modal to. */\n el: HTMLElement | null\n /**\n * Will attempt to mount the references immediately.\n * For SSR this may need to be disabled and handled manually on the client side.\n */\n mountOnInitialize?: boolean\n /** You can pass in an event bus if you have one already, or we will create one */\n eventBus?: WorkspaceEventBus\n /** The workspace store must be initialized and passed in. */\n workspaceStore: WorkspaceStore\n /** Api client plugins to include in the modal */\n plugins?: ClientPlugin[]\n /** Subset of the configuration options for the modal, if you want it to be reactive ensure its a ref */\n options?: MaybeRefOrGetter<ApiClientOptions>\n}\n\nexport type ApiClientModal = {\n app: App\n open: (payload?: RoutePayload) => void\n mount: (mountingEl: HTMLElement | null) => void\n route: (payload: RoutePayload) => void\n updateOptions: (nextOptions: ApiClientOptions, overwrite?: boolean) => void\n modalState: ModalState\n}\n\n/**\n * Monotonic counter used to give every modal Vue app a unique `idPrefix`.\n *\n * Vue derives `useId()` values (and therefore our teleport target ids) from the app's\n * `idPrefix`. When more than one client app mounts on the same page — for example, the\n * API reference embeds this modal alongside another client instance — a shared prefix\n * makes both apps emit identical ids. A teleported popover then resolves to the first\n * matching target in the DOM, which can be a hidden app, so the popover never appears.\n * A per-app suffix keeps the ids unique across instances.\n */\nlet modalAppCount = 0\n\n/**\n * Creates the API Client Modal.\n *\n * The modal does not require a router. Instead, navigation is handled by setting\n * active entities directly through the returned `route` function.\n */\nexport const createApiClientModal = ({\n el,\n eventBus = createWorkspaceEventBus({\n debug: import.meta.env.DEV,\n }),\n mountOnInitialize = true,\n plugins = [],\n workspaceStore,\n options = {},\n}: CreateApiClientOptions): ApiClientModal => {\n const requestBodyCompositionSelection = ref<Record<string, number>>({})\n\n /** This is to ensure that the options are a ref if they are not already, useful for react */\n const optionsRef: ApiClientOptionsRef = isRef(options) ? options : ref(toValue(options))\n\n const defaultEntities: DefaultEntities = {\n path: 'default',\n method: 'default',\n example: 'default',\n documentSlug: workspaceStore.workspace['x-scalar-active-document'] || 'default',\n isWebhook: false,\n }\n\n const parameters = reactive<DefaultEntities>({ ...defaultEntities })\n\n /** Navigate to the specified path, method, and example. */\n const route = (payload: RoutePayload): void => {\n Object.assign(parameters, defaultEntities, payload)\n }\n\n /** Resolved parameters from the workspace store. */\n const resolvedParameters = computed(() => resolveRouteParameters(workspaceStore, parameters))\n const documentSlug = computed(() => resolvedParameters.value.documentSlug)\n const path = computed(() => resolvedParameters.value.path)\n const method = computed(() => resolvedParameters.value.method)\n const exampleName = computed(() => resolvedParameters.value.example)\n const isWebhook = computed(() => resolvedParameters.value.isWebhook ?? false)\n /** The document from the workspace store. Modal is OpenAPI-only; AsyncAPI docs surface as null. */\n const document = computed(() => {\n const doc = workspaceStore.workspace.documents[documentSlug.value ?? '']\n return isOpenApiDocument(doc) ? doc : null\n })\n\n /** Sidebar state and selection handling. */\n const sidebarState = useModalSidebar({\n workspaceStore,\n documentSlug: documentSlug,\n path: path,\n method: method,\n exampleName: exampleName,\n isWebhook,\n route,\n })\n\n const modalState = useModal()\n\n const app = createApp(Modal, {\n document,\n eventBus,\n exampleName,\n isWebhook,\n method,\n modalState,\n path,\n plugins,\n requestBodyCompositionSelection,\n sidebarState,\n workspaceStore,\n options: optionsRef,\n } satisfies ModalProps)\n\n /** Initialize plugins and subscribe to event bus events */\n const pluginUnsubscribes: (() => void)[] = []\n for (const plugin of plugins) {\n plugin.lifecycle?.onInit?.()\n\n pluginUnsubscribes.push(subscribePluginEvents(eventBus, plugin))\n }\n\n /** Clean up plugin lifecycle and event bus subscriptions when the app is unmounted */\n app.onUnmount(() => {\n for (const unsub of pluginUnsubscribes) {\n unsub()\n }\n for (const plugin of plugins) {\n plugin.lifecycle?.onDestroy?.()\n }\n })\n\n // Update the active proxy when the proxyUrl changes\n watch(\n () => toValue(optionsRef).proxyUrl,\n (newProxyUrl) => workspaceStore.update('x-scalar-active-proxy', newProxyUrl),\n { immediate: true },\n )\n\n // Use a unique id prefix to prevent collisions with other Vue apps on the page.\n // The suffix keeps the prefix unique even when several client apps mount together.\n app.config.idPrefix = `scalar-client-${modalAppCount++}`\n\n /** Mount the modal to a given element. */\n const mount = (mountingEl: HTMLElement | null = el): void => {\n if (!mountingEl) {\n console.error(\n '[@scalar/api-client] Could not create the API client Modal.',\n 'Invalid HTML element provided.',\n 'Read more: https://github.com/scalar/scalar/tree/main/packages/api-client',\n )\n return\n }\n app.mount(mountingEl)\n }\n\n if (mountOnInitialize) {\n mount()\n }\n\n return {\n /** The Vue app instance for the modal. Use with caution. */\n app,\n /** Open the modal and optionally navigate to a specific route. */\n open: (payload?: RoutePayload): void => {\n // This path does not carry a composition selection, so clear any selection left over from a\n // previously opened operation. (The event-driven open path re-establishes it from its payload.)\n requestBodyCompositionSelection.value = {}\n modalState.open = true\n if (payload) {\n route(payload)\n }\n },\n /** Mount the modal to a given element. */\n mount,\n /** Navigate to the specified path, method, and example. */\n route,\n /** Controls the visibility of the modal. */\n modalState,\n /**\n * Merge new options into the current modal options.\n *\n * @param newOptions - The new options to merge into the current modal options.\n * @param overwrite - Whether to overwrite the current modal options with the new options. If false, the new options will be merged with the current options.\n */\n updateOptions: (newOptions: ApiClientOptions, overwrite = false): void => {\n optionsRef.value = overwrite\n ? newOptions\n : {\n ...optionsRef.value,\n ...newOptions,\n }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqDA,IAAI,gBAAgB;;;;;;;AAQpB,IAAa,wBAAwB,EACnC,IACA,WAAW,wBAAwB,EACjC,OAAA,MACF,CAAC,GACD,oBAAoB,MACpB,UAAU,CAAC,GACX,gBACA,UAAU,CAAC,QACiC;CAC5C,MAAM,kCAAkC,IAA4B,CAAC,CAAC;;CAGtE,MAAM,aAAkC,MAAM,OAAO,IAAI,UAAU,IAAI,QAAQ,OAAO,CAAC;CAEvF,MAAM,kBAAmC;EACvC,MAAM;EACN,QAAQ;EACR,SAAS;EACT,cAAc,eAAe,UAAU,+BAA+B;EACtE,WAAW;CACb;CAEA,MAAM,aAAa,SAA0B,EAAE,GAAG,gBAAgB,CAAC;;CAGnE,MAAM,SAAS,YAAgC;EAC7C,OAAO,OAAO,YAAY,iBAAiB,OAAO;CACpD;;CAGA,MAAM,qBAAqB,eAAe,uBAAuB,gBAAgB,UAAU,CAAC;CAC5F,MAAM,eAAe,eAAe,mBAAmB,MAAM,YAAY;CACzE,MAAM,OAAO,eAAe,mBAAmB,MAAM,IAAI;CACzD,MAAM,SAAS,eAAe,mBAAmB,MAAM,MAAM;CAC7D,MAAM,cAAc,eAAe,mBAAmB,MAAM,OAAO;CACnE,MAAM,YAAY,eAAe,mBAAmB,MAAM,aAAa,KAAK;;CAE5E,MAAM,WAAW,eAAe;EAC9B,MAAM,MAAM,eAAe,UAAU,UAAU,aAAa,SAAS;EACrE,OAAO,kBAAkB,GAAG,IAAI,MAAM;CACxC,CAAC;;CAGD,MAAM,eAAe,gBAAgB;EACnC;EACc;EACR;EACE;EACK;EACb;EACA;CACF,CAAC;CAED,MAAM,aAAa,SAAS;CAE5B,MAAM,MAAM,UAAUA,eAAO;EAC3B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;CACX,CAAsB;;CAGtB,MAAM,qBAAqC,CAAC;CAC5C,KAAK,MAAM,UAAU,SAAS;EAC5B,OAAO,WAAW,SAAS;EAE3B,mBAAmB,KAAK,sBAAsB,UAAU,MAAM,CAAC;CACjE;;CAGA,IAAI,gBAAgB;EAClB,KAAK,MAAM,SAAS,oBAClB,MAAM;EAER,KAAK,MAAM,UAAU,SACnB,OAAO,WAAW,YAAY;CAElC,CAAC;CAGD,YACQ,QAAQ,UAAU,CAAC,CAAC,WACzB,gBAAgB,eAAe,OAAO,yBAAyB,WAAW,GAC3E,EAAE,WAAW,KAAK,CACpB;CAIA,IAAI,OAAO,WAAW,iBAAiB;;CAGvC,MAAM,SAAS,aAAiC,OAAa;EAC3D,IAAI,CAAC,YAAY;GACf,QAAQ,MACN,+DACA,kCACA,2EACF;GACA;EACF;EACA,IAAI,MAAM,UAAU;CACtB;CAEA,IAAI,mBACF,MAAM;CAGR,OAAO;;EAEL;;EAEA,OAAO,YAAiC;GAGtC,gCAAgC,QAAQ,CAAC;GACzC,WAAW,OAAO;GAClB,IAAI,SACF,MAAM,OAAO;EAEjB;;EAEA;;EAEA;;EAEA;;;;;;;EAOA,gBAAgB,YAA8B,YAAY,UAAgB;GACxE,WAAW,QAAQ,YACf,aACA;IACE,GAAG,WAAW;IACd,GAAG;GACL;EACN;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-hidden-clients-config.js","names":[],"sources":["../../../../../src/v2/features/modal/helpers/map-hidden-clients-config.ts"],"sourcesContent":["import { objectKeys } from '@scalar/helpers/object/object-keys'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { AvailableClient, TargetId } from '@scalar/types/snippetz'\nimport { AVAILABLE_CLIENTS, type AvailableClients, GROUPED_CLIENTS } from '@scalar/types/snippetz'\n\n/**\n * Map the old hiddenClients config to the new httpClients config.\n * Filters out clients based on the configuration and returns the remaining clients.\n */\nexport const mapHiddenClientsConfig = (hiddenClients: ApiReferenceConfiguration['hiddenClients']): AvailableClients => {\n // Early return for boolean true - hide all clients\n if (hiddenClients === true) {\n return []\n }\n\n // Early return for falsy values or empty arrays - show all clients\n if (!hiddenClients || (Array.isArray(hiddenClients) && hiddenClients.length === 0)) {\n return AVAILABLE_CLIENTS\n }\n\n // Start with all clients visible and remove hidden ones\n const visibleClientsSet = new Set<AvailableClient>(AVAILABLE_CLIENTS)\n\n // Handle array config: ['js/fetch', 'js/axios', 'java', 'fetch', 'axios']\n if (Array.isArray(hiddenClients)) {\n for (const item of hiddenClients) {\n // Check if item is a target group first\n const group = GROUPED_CLIENTS[item as TargetId]\n\n // Item is a target group (e.g., 'java', 'ruby') - hide all clients in the group\n if (group) {\n for (const client of group) {\n visibleClientsSet.delete(`${item}/${client}` as AvailableClient)\n }\n }\n\n // Item is a full client ID (e.g., 'js/fetch') - hide this specific client\n else if (item.includes('/')) {\n visibleClientsSet.delete(item as AvailableClient)\n }\n\n // Item is a client name suffix (e.g., 'fetch', 'axios') - hide all matching clients\n else {\n for (const language of objectKeys(GROUPED_CLIENTS)) {\n visibleClientsSet.delete(`${language}/${item}` as AvailableClient)\n }\n }\n }\n }\n\n // Handle object config: { node: true, python: ['requests'] }\n else if (typeof hiddenClients === 'object') {\n for (const [targetId, clients] of Object.entries(hiddenClients)) {\n if (clients === true) {\n // Hide all clients for this target\n const group = GROUPED_CLIENTS[targetId as TargetId]\n if (group) {\n for (const client of group) {\n visibleClientsSet.delete(`${targetId}/${client}` as AvailableClient)\n }\n }\n } else if (Array.isArray(clients)) {\n // Hide specific clients for this target\n for (const client of clients) {\n // Try both formats: 'fetch' and 'js/fetch'\n visibleClientsSet.delete(client as AvailableClient)\n visibleClientsSet.delete(`${targetId}/${client}` as AvailableClient)\n }\n }\n }\n }\n\n return Array.from(visibleClientsSet)\n}\n"],"mappings":";;;;;;;AASA,IAAa,0BAA0B,kBAAgF;CAErH,IAAI,kBAAkB,MACpB,OAAO,CAAC;CAIV,IAAI,CAAC,iBAAkB,MAAM,QAAQ,aAAa,KAAK,cAAc,WAAW,GAC9E,OAAO;CAIT,MAAM,oBAAoB,IAAI,IAAqB,iBAAiB;CAGpE,IAAI,MAAM,QAAQ,aAAa,GAC7B,KAAK,MAAM,QAAQ,eAAe;EAEhC,MAAM,QAAQ,gBAAgB;EAG9B,IAAI,OACF,KAAK,MAAM,UAAU,OACnB,kBAAkB,OAAO,GAAG,KAAK,GAAG,QAA2B;OAK9D,IAAI,KAAK,SAAS,GAAG,GACxB,kBAAkB,OAAO,IAAuB;OAKhD,KAAK,MAAM,YAAY,WAAW,eAAe,GAC/C,kBAAkB,OAAO,GAAG,SAAS,GAAG,MAAyB;CAGvE;MAIG,IAAI,OAAO,kBAAkB;
|
|
1
|
+
{"version":3,"file":"map-hidden-clients-config.js","names":[],"sources":["../../../../../src/v2/features/modal/helpers/map-hidden-clients-config.ts"],"sourcesContent":["import { objectKeys } from '@scalar/helpers/object/object-keys'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { AvailableClient, TargetId } from '@scalar/types/snippetz'\nimport { AVAILABLE_CLIENTS, type AvailableClients, GROUPED_CLIENTS } from '@scalar/types/snippetz'\n\n/**\n * Map the old hiddenClients config to the new httpClients config.\n * Filters out clients based on the configuration and returns the remaining clients.\n */\nexport const mapHiddenClientsConfig = (hiddenClients: ApiReferenceConfiguration['hiddenClients']): AvailableClients => {\n // Early return for boolean true - hide all clients\n if (hiddenClients === true) {\n return []\n }\n\n // Early return for falsy values or empty arrays - show all clients\n if (!hiddenClients || (Array.isArray(hiddenClients) && hiddenClients.length === 0)) {\n return AVAILABLE_CLIENTS\n }\n\n // Start with all clients visible and remove hidden ones\n const visibleClientsSet = new Set<AvailableClient>(AVAILABLE_CLIENTS)\n\n // Handle array config: ['js/fetch', 'js/axios', 'java', 'fetch', 'axios']\n if (Array.isArray(hiddenClients)) {\n for (const item of hiddenClients) {\n // Check if item is a target group first\n const group = GROUPED_CLIENTS[item as TargetId]\n\n // Item is a target group (e.g., 'java', 'ruby') - hide all clients in the group\n if (group) {\n for (const client of group) {\n visibleClientsSet.delete(`${item}/${client}` as AvailableClient)\n }\n }\n\n // Item is a full client ID (e.g., 'js/fetch') - hide this specific client\n else if (item.includes('/')) {\n visibleClientsSet.delete(item as AvailableClient)\n }\n\n // Item is a client name suffix (e.g., 'fetch', 'axios') - hide all matching clients\n else {\n for (const language of objectKeys(GROUPED_CLIENTS)) {\n visibleClientsSet.delete(`${language}/${item}` as AvailableClient)\n }\n }\n }\n }\n\n // Handle object config: { node: true, python: ['requests'] }\n else if (typeof hiddenClients === 'object') {\n for (const [targetId, clients] of Object.entries(hiddenClients)) {\n if (clients === true) {\n // Hide all clients for this target\n const group = GROUPED_CLIENTS[targetId as TargetId]\n if (group) {\n for (const client of group) {\n visibleClientsSet.delete(`${targetId}/${client}` as AvailableClient)\n }\n }\n } else if (Array.isArray(clients)) {\n // Hide specific clients for this target\n for (const client of clients) {\n // Try both formats: 'fetch' and 'js/fetch'\n visibleClientsSet.delete(client as AvailableClient)\n visibleClientsSet.delete(`${targetId}/${client}` as AvailableClient)\n }\n }\n }\n }\n\n return Array.from(visibleClientsSet)\n}\n"],"mappings":";;;;;;;AASA,IAAa,0BAA0B,kBAAgF;CAErH,IAAI,kBAAkB,MACpB,OAAO,CAAC;CAIV,IAAI,CAAC,iBAAkB,MAAM,QAAQ,aAAa,KAAK,cAAc,WAAW,GAC9E,OAAO;CAIT,MAAM,oBAAoB,IAAI,IAAqB,iBAAiB;CAGpE,IAAI,MAAM,QAAQ,aAAa,GAC7B,KAAK,MAAM,QAAQ,eAAe;EAEhC,MAAM,QAAQ,gBAAgB;EAG9B,IAAI,OACF,KAAK,MAAM,UAAU,OACnB,kBAAkB,OAAO,GAAG,KAAK,GAAG,QAA2B;OAK9D,IAAI,KAAK,SAAS,GAAG,GACxB,kBAAkB,OAAO,IAAuB;OAKhD,KAAK,MAAM,YAAY,WAAW,eAAe,GAC/C,kBAAkB,OAAO,GAAG,SAAS,GAAG,MAAyB;CAGvE;MAIG,IAAI,OAAO,kBAAkB,UAC3B;OAAA,MAAM,CAAC,UAAU,YAAY,OAAO,QAAQ,aAAa,GAC5D,IAAI,YAAY,MAAM;GAEpB,MAAM,QAAQ,gBAAgB;GAC9B,IAAI,OACF,KAAK,MAAM,UAAU,OACnB,kBAAkB,OAAO,GAAG,SAAS,GAAG,QAA2B;EAGzE,OAAO,IAAI,MAAM,QAAQ,OAAO,GAE9B,KAAK,MAAM,UAAU,SAAS;GAE5B,kBAAkB,OAAO,MAAyB;GAClD,kBAAkB,OAAO,GAAG,SAAS,GAAG,QAA2B;EACrE;;CAKN,OAAO,MAAM,KAAK,iBAAiB;AACrC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ApiClientOptions, ApiClientOptionsRef } from '
|
|
1
|
+
export type { ApiClientOptions, ApiClientOptionsRef } from '../../../types/options.js';
|
|
2
2
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { createSidebarState } from '@scalar/sidebar';
|
|
|
2
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
3
|
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
4
4
|
import { type ComputedRef } from 'vue';
|
|
5
|
-
import type { RoutePayload } from '
|
|
5
|
+
import type { RoutePayload } from '../helpers/resolve-route-parameters.js';
|
|
6
6
|
export type UseModalSidebarReturn = {
|
|
7
7
|
handleSelectItem: (id: string) => void;
|
|
8
8
|
state: ReturnType<typeof createSidebarState<TraversedEntry>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ApiClientOptions } from '
|
|
1
|
+
export type { ApiClientOptions } from '../../types/options.js';
|
|
2
2
|
export { type ApiClientModal, createApiClientModal } from './helpers/create-api-client-modal.js';
|
|
3
3
|
export { mapHiddenClientsConfig } from './helpers/map-hidden-clients-config.js';
|
|
4
4
|
export type { RoutePayload } from './helpers/resolve-route-parameters.js';
|
|
@@ -3,7 +3,7 @@ import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
|
|
|
3
3
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
4
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
5
5
|
import { type Ref } from 'vue';
|
|
6
|
-
import type { UseModalSidebarReturn } from '
|
|
6
|
+
import type { UseModalSidebarReturn } from './hooks/use-modal-sidebar.js';
|
|
7
7
|
export declare function initializeModalEvents({ eventBus, isSidebarOpen, requestBodyCompositionSelection, sidebarState, modalState, store, getConfiguredSecuritySchemes, }: {
|
|
8
8
|
eventBus: WorkspaceEventBus;
|
|
9
9
|
isSidebarOpen: Ref<boolean>;
|
|
@@ -4,8 +4,8 @@ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
|
4
4
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
5
|
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
6
6
|
import { type MaybeRefOrGetter } from 'vue';
|
|
7
|
-
import type { ClientLayout } from '
|
|
8
|
-
import type { ApiClientOptions } from '
|
|
7
|
+
import type { ClientLayout } from '../../types/layout.js';
|
|
8
|
+
import type { ApiClientOptions } from '../../types/options.js';
|
|
9
9
|
/**
|
|
10
10
|
* Operation example page
|
|
11
11
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Operation_vue_vue_type_script_setup_true_lang_default from "./Operation.
|
|
1
|
+
import Operation_vue_vue_type_script_setup_true_lang_default from "./Operation.vue_vue_type_script_setup_true_lang.js";
|
|
2
2
|
//#region src/v2/features/operation/Operation.vue
|
|
3
3
|
var Operation_default = Operation_vue_vue_type_script_setup_true_lang_default;
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.js","names":[],"sources":["../../../../src/v2/features/operation/Operation.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Operation example page\n *\n * Displays an operation with a specific example selected\n * - View example request data\n * - Modify example request data\n * - Send example request\n */\nexport default {}\n\nexport type OperationProps = {\n /** Hidden modals keep their operation mounted without downloading examples. */\n isActive?: boolean\n /** The slug of the currently selected document in the workspace */\n documentSlug: string\n /** The currently active document — OpenAPI-only, the operation page has no AsyncAPI path */\n document: OpenApiDocument | null\n /** The workspace event bus */\n eventBus: WorkspaceEventBus\n /** The layout of the client */\n layout: ClientLayout\n /** The API path currently selected (e.g. \"/users/{id}\") */\n path?: string\n /** The HTTP method for the currently selected API path (e.g. GET, POST) */\n method?: string\n /** The name of the currently selected example (for examples within an endpoint) */\n exampleName?: string\n /** Resolve the selected entry from the OpenAPI webhooks map. */\n isWebhook?: boolean\n /** The currently active environment */\n environment: XScalarEnvironment\n /** The workspace store */\n workspaceStore: WorkspaceStore\n /** Client plugins */\n plugins: ClientPlugin[]\n /** App or modal options forwarded to operation/auth blocks */\n options?: MaybeRefOrGetter<ApiClientOptions>\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getOperationExamples,\n resolveOperationExamples,\n} from '@scalar/workspace-store/helpers/operation-examples'\nimport {\n EXTERNAL_EXAMPLES,\n useExampleVisibility,\n useExternalExamples,\n} from '@scalar/workspace-store/helpers/use-external-examples'\nimport {\n getActiveProxyUrl,\n getRequestExampleContext,\n getSelectedBodyContentType,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n provide,\n ref,\n toValue,\n type ComponentPublicInstance,\n type MaybeRefOrGetter,\n} from 'vue'\n\nimport { OperationBlock } from '@/v2/blocks/operation-block'\nimport { APP_VERSION } from '@/v2/constants'\nimport {\n provideLocalization,\n useLocalization,\n} from '@/v2/features/localization'\nimport { mapHiddenClientsConfig } from '@/v2/features/modal/helpers/map-hidden-clients-config'\nimport type { ClientLayout } from '@/v2/types/layout'\nimport type { ApiClientOptions } from '@/v2/types/options'\n\nconst {\n isActive = true,\n document,\n layout,\n eventBus,\n path,\n method,\n environment,\n exampleName,\n options,\n workspaceStore,\n plugins,\n documentSlug,\n isWebhook = false,\n} = defineProps<\n OperationProps & {\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n }\n>()\n\nconst inheritedLocalization = useLocalization()\nconst { translate, locale, direction } = provideLocalization(\n () =>\n toValue(options)?.localization ?? {\n locale: inheritedLocalization.locale.value,\n direction: inheritedLocalization.direction.value,\n translations: inheritedLocalization.translations.value,\n },\n)\n\n/**\n * Shared request-example context (operation, servers, auth scope, cookies). Recomputed when any\n * underlying workspace or route input changes — same reactivity as the previous local computeds.\n */\nconst requestExample = computed(() => {\n if (!path || !method || !exampleName || !document) {\n return null\n }\n\n const result = getRequestExampleContext(\n workspaceStore,\n documentSlug,\n { path, method, exampleName, isWebhook },\n {\n baseServerUrl: toValue(options)?.baseServerURL,\n fallbackDocument: document,\n isElectron: isElectron(),\n layout: layout === 'web' ? 'web' : 'other',\n servers: toValue(options)?.servers,\n appVersion: APP_VERSION,\n authentication: toValue(options)?.authentication,\n },\n )\n\n return result.ok ? result.data : null\n})\n\nconst sourceOperation = computed(() => requestExample.value?.operation ?? null)\nconst getResolver = (): ReturnType<WorkspaceStore['externalExamples']> =>\n workspaceStore.externalExamples(documentSlug)\nprovide(EXTERNAL_EXAMPLES, getResolver)\nconst contentType = computed(\n () =>\n getSelectedBodyContentType(\n getResolvedRef(sourceOperation.value?.requestBody),\n exampleName,\n ) ?? undefined,\n)\nconst container = ref<ComponentPublicInstance | null>(null)\nconst visible = useExampleVisibility(container)\nconst externalExamples = useExternalExamples(\n () =>\n sourceOperation.value\n ? getOperationExamples(\n sourceOperation.value,\n exampleName ?? '',\n contentType.value,\n )\n : [],\n () => isActive && visible.value,\n getResolver,\n)\nconst operation = computed(() =>\n sourceOperation.value\n ? resolveOperationExamples(\n sourceOperation.value,\n exampleName ?? '',\n contentType.value,\n externalExamples.resolve,\n )\n : null,\n)\nconst workspaceCookies = computed(\n () => requestExample.value?.cookies.workspace ?? [],\n)\nconst documentCookies = computed(\n () => requestExample.value?.cookies.document ?? [],\n)\nconst servers = computed(() => requestExample.value?.servers.list ?? [])\nconst selectedServer = computed(\n () => requestExample.value?.servers.selected ?? null,\n)\nconst serverMeta = computed(\n () => requestExample.value?.servers.meta ?? { type: 'document' as const },\n)\n\nconst securitySchemes = computed(\n () => requestExample.value?.security.schemes ?? {},\n)\n\nconst selectedSecurity = computed(\n () =>\n requestExample.value?.security.selected ?? {\n selectedIndex: -1,\n selectedSchemes: [],\n },\n)\nconst selectedSecuritySchemes = computed(\n () => requestExample.value?.security.selectedSchemes ?? [],\n)\nconst securityRequirements = computed(\n () => requestExample.value?.security.requirements ?? [],\n)\nconst authMeta = computed(\n () => requestExample.value?.security.meta ?? { type: 'document' as const },\n)\n\nconst defaultHeaders = computed(\n () => requestExample.value?.headers.default ?? {},\n)\n\n/** Combine environments from document and workspace into a unique array of environment names */\nconst environments = computed(() => {\n return Array.from(\n new Set(\n Object.keys({\n ...document?.['x-scalar-environments'],\n ...workspaceStore.workspace['x-scalar-environments'],\n }),\n ),\n )\n})\n\n/** Temporarily use the old config.hiddenClients until we migrate to the new httpClients config */\nconst httpClients = computed(() =>\n mapHiddenClientsConfig(toValue(options)?.hiddenClients),\n)\n</script>\n\n<template>\n <!-- Operation exists -->\n <template v-if=\"path && method && exampleName && operation && document\">\n <OperationBlock\n ref=\"container\"\n :activeEnvironment=\"\n workspaceStore.workspace['x-scalar-active-environment']\n \"\n :appVersion=\"APP_VERSION\"\n :authMeta\n :defaultHeaders\n :dir=\"direction\"\n :document\n :documentCookies\n :documentSecurity=\"document?.security ?? []\"\n :documentSlug\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :environment\n :environments\n :eventBus\n :exampleKey=\"exampleName\"\n :externalExamplesFailed=\"externalExamples.failed.value\"\n :externalExamplesPending=\"externalExamples.pending.value\"\n :hideClientButton=\"toValue(options)?.hideClientButton ?? false\"\n :history=\"workspaceStore.history.getHistory(documentSlug, path, method)\"\n :httpClients\n :isWebhook\n :lang=\"locale\"\n :layout\n :method\n :operation\n :options\n :path\n :plugins=\"plugins\"\n :proxyUrl=\"\n getActiveProxyUrl(\n workspaceStore.workspace['x-scalar-active-proxy'],\n layout === 'web' ? 'web' : 'other',\n ) ?? ''\n \"\n :requestBodyCompositionSelection\n :securityRequirements=\"securityRequirements\"\n :securitySchemes\n :selectedClient=\"workspaceStore.workspace['x-scalar-default-client']\"\n :selectedSecurity=\"selectedSecurity\"\n :selectedSecuritySchemes=\"selectedSecuritySchemes\"\n :server=\"selectedServer\"\n :serverMeta\n :servers\n :sourceOperation=\"sourceOperation ?? undefined\"\n :workspaceCookies\n @retry:externalExamples=\"externalExamples.retry\" />\n </template>\n\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\"\n :dir=\"direction\"\n :lang=\"locale\">\n <span class=\"text-c-3\">{{\n translate('apiClient.operation.selectAnOperationToViewDetails')\n }}</span>\n </div>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Operation.vue.js","names":["_sfc_main"],"sources":["../../../../src/v2/features/operation/Operation.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Operation example page\n *\n * Displays an operation with a specific example selected\n * - View example request data\n * - Modify example request data\n * - Send example request\n */\nexport default {}\n\nexport type OperationProps = {\n /** Hidden modals keep their operation mounted without downloading examples. */\n isActive?: boolean\n /** The slug of the currently selected document in the workspace */\n documentSlug: string\n /** The currently active document — OpenAPI-only, the operation page has no AsyncAPI path */\n document: OpenApiDocument | null\n /** The workspace event bus */\n eventBus: WorkspaceEventBus\n /** The layout of the client */\n layout: ClientLayout\n /** The API path currently selected (e.g. \"/users/{id}\") */\n path?: string\n /** The HTTP method for the currently selected API path (e.g. GET, POST) */\n method?: string\n /** The name of the currently selected example (for examples within an endpoint) */\n exampleName?: string\n /** Resolve the selected entry from the OpenAPI webhooks map. */\n isWebhook?: boolean\n /** The currently active environment */\n environment: XScalarEnvironment\n /** The workspace store */\n workspaceStore: WorkspaceStore\n /** Client plugins */\n plugins: ClientPlugin[]\n /** App or modal options forwarded to operation/auth blocks */\n options?: MaybeRefOrGetter<ApiClientOptions>\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getOperationExamples,\n resolveOperationExamples,\n} from '@scalar/workspace-store/helpers/operation-examples'\nimport {\n EXTERNAL_EXAMPLES,\n useExampleVisibility,\n useExternalExamples,\n} from '@scalar/workspace-store/helpers/use-external-examples'\nimport {\n getActiveProxyUrl,\n getRequestExampleContext,\n getSelectedBodyContentType,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n provide,\n ref,\n toValue,\n type ComponentPublicInstance,\n type MaybeRefOrGetter,\n} from 'vue'\n\nimport { OperationBlock } from '@/v2/blocks/operation-block'\nimport { APP_VERSION } from '@/v2/constants'\nimport {\n provideLocalization,\n useLocalization,\n} from '@/v2/features/localization'\nimport { mapHiddenClientsConfig } from '@/v2/features/modal/helpers/map-hidden-clients-config'\nimport type { ClientLayout } from '@/v2/types/layout'\nimport type { ApiClientOptions } from '@/v2/types/options'\n\nconst {\n isActive = true,\n document,\n layout,\n eventBus,\n path,\n method,\n environment,\n exampleName,\n options,\n workspaceStore,\n plugins,\n documentSlug,\n isWebhook = false,\n} = defineProps<\n OperationProps & {\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n }\n>()\n\nconst inheritedLocalization = useLocalization()\nconst { translate, locale, direction } = provideLocalization(\n () =>\n toValue(options)?.localization ?? {\n locale: inheritedLocalization.locale.value,\n direction: inheritedLocalization.direction.value,\n translations: inheritedLocalization.translations.value,\n },\n)\n\n/**\n * Shared request-example context (operation, servers, auth scope, cookies). Recomputed when any\n * underlying workspace or route input changes — same reactivity as the previous local computeds.\n */\nconst requestExample = computed(() => {\n if (!path || !method || !exampleName || !document) {\n return null\n }\n\n const result = getRequestExampleContext(\n workspaceStore,\n documentSlug,\n { path, method, exampleName, isWebhook },\n {\n baseServerUrl: toValue(options)?.baseServerURL,\n fallbackDocument: document,\n isElectron: isElectron(),\n layout: layout === 'web' ? 'web' : 'other',\n servers: toValue(options)?.servers,\n appVersion: APP_VERSION,\n authentication: toValue(options)?.authentication,\n },\n )\n\n return result.ok ? result.data : null\n})\n\nconst sourceOperation = computed(() => requestExample.value?.operation ?? null)\nconst getResolver = (): ReturnType<WorkspaceStore['externalExamples']> =>\n workspaceStore.externalExamples(documentSlug)\nprovide(EXTERNAL_EXAMPLES, getResolver)\nconst contentType = computed(\n () =>\n getSelectedBodyContentType(\n getResolvedRef(sourceOperation.value?.requestBody),\n exampleName,\n ) ?? undefined,\n)\nconst container = ref<ComponentPublicInstance | null>(null)\nconst visible = useExampleVisibility(container)\nconst externalExamples = useExternalExamples(\n () =>\n sourceOperation.value\n ? getOperationExamples(\n sourceOperation.value,\n exampleName ?? '',\n contentType.value,\n )\n : [],\n () => isActive && visible.value,\n getResolver,\n)\nconst operation = computed(() =>\n sourceOperation.value\n ? resolveOperationExamples(\n sourceOperation.value,\n exampleName ?? '',\n contentType.value,\n externalExamples.resolve,\n )\n : null,\n)\nconst workspaceCookies = computed(\n () => requestExample.value?.cookies.workspace ?? [],\n)\nconst documentCookies = computed(\n () => requestExample.value?.cookies.document ?? [],\n)\nconst servers = computed(() => requestExample.value?.servers.list ?? [])\nconst selectedServer = computed(\n () => requestExample.value?.servers.selected ?? null,\n)\nconst serverMeta = computed(\n () => requestExample.value?.servers.meta ?? { type: 'document' as const },\n)\n\nconst securitySchemes = computed(\n () => requestExample.value?.security.schemes ?? {},\n)\n\nconst selectedSecurity = computed(\n () =>\n requestExample.value?.security.selected ?? {\n selectedIndex: -1,\n selectedSchemes: [],\n },\n)\nconst selectedSecuritySchemes = computed(\n () => requestExample.value?.security.selectedSchemes ?? [],\n)\nconst securityRequirements = computed(\n () => requestExample.value?.security.requirements ?? [],\n)\nconst authMeta = computed(\n () => requestExample.value?.security.meta ?? { type: 'document' as const },\n)\n\nconst defaultHeaders = computed(\n () => requestExample.value?.headers.default ?? {},\n)\n\n/** Combine environments from document and workspace into a unique array of environment names */\nconst environments = computed(() => {\n return Array.from(\n new Set(\n Object.keys({\n ...document?.['x-scalar-environments'],\n ...workspaceStore.workspace['x-scalar-environments'],\n }),\n ),\n )\n})\n\n/** Temporarily use the old config.hiddenClients until we migrate to the new httpClients config */\nconst httpClients = computed(() =>\n mapHiddenClientsConfig(toValue(options)?.hiddenClients),\n)\n</script>\n\n<template>\n <!-- Operation exists -->\n <template v-if=\"path && method && exampleName && operation && document\">\n <OperationBlock\n ref=\"container\"\n :activeEnvironment=\"\n workspaceStore.workspace['x-scalar-active-environment']\n \"\n :appVersion=\"APP_VERSION\"\n :authMeta\n :defaultHeaders\n :dir=\"direction\"\n :document\n :documentCookies\n :documentSecurity=\"document?.security ?? []\"\n :documentSlug\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :environment\n :environments\n :eventBus\n :exampleKey=\"exampleName\"\n :externalExamplesFailed=\"externalExamples.failed.value\"\n :externalExamplesPending=\"externalExamples.pending.value\"\n :hideClientButton=\"toValue(options)?.hideClientButton ?? false\"\n :history=\"workspaceStore.history.getHistory(documentSlug, path, method)\"\n :httpClients\n :isWebhook\n :lang=\"locale\"\n :layout\n :method\n :operation\n :options\n :path\n :plugins=\"plugins\"\n :proxyUrl=\"\n getActiveProxyUrl(\n workspaceStore.workspace['x-scalar-active-proxy'],\n layout === 'web' ? 'web' : 'other',\n ) ?? ''\n \"\n :requestBodyCompositionSelection\n :securityRequirements=\"securityRequirements\"\n :securitySchemes\n :selectedClient=\"workspaceStore.workspace['x-scalar-default-client']\"\n :selectedSecurity=\"selectedSecurity\"\n :selectedSecuritySchemes=\"selectedSecuritySchemes\"\n :server=\"selectedServer\"\n :serverMeta\n :servers\n :sourceOperation=\"sourceOperation ?? undefined\"\n :workspaceCookies\n @retry:externalExamples=\"externalExamples.retry\" />\n </template>\n\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\"\n :dir=\"direction\"\n :lang=\"locale\">\n <span class=\"text-c-3\">{{\n translate('apiClient.operation.selectAnOperationToViewDetails')\n }}</span>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -193,4 +193,4 @@ var Operation_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
193
193
|
//#endregion
|
|
194
194
|
export { Operation_vue_vue_type_script_setup_true_lang_default as default };
|
|
195
195
|
|
|
196
|
-
//# sourceMappingURL=Operation.
|
|
196
|
+
//# sourceMappingURL=Operation.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Operation.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","OperationBlock","_createElementBlock","_createElementVNode","_toDisplayString"],"sources":["../../../../src/v2/features/operation/Operation.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Operation example page\n *\n * Displays an operation with a specific example selected\n * - View example request data\n * - Modify example request data\n * - Send example request\n */\nexport default {}\n\nexport type OperationProps = {\n /** Hidden modals keep their operation mounted without downloading examples. */\n isActive?: boolean\n /** The slug of the currently selected document in the workspace */\n documentSlug: string\n /** The currently active document — OpenAPI-only, the operation page has no AsyncAPI path */\n document: OpenApiDocument | null\n /** The workspace event bus */\n eventBus: WorkspaceEventBus\n /** The layout of the client */\n layout: ClientLayout\n /** The API path currently selected (e.g. \"/users/{id}\") */\n path?: string\n /** The HTTP method for the currently selected API path (e.g. GET, POST) */\n method?: string\n /** The name of the currently selected example (for examples within an endpoint) */\n exampleName?: string\n /** Resolve the selected entry from the OpenAPI webhooks map. */\n isWebhook?: boolean\n /** The currently active environment */\n environment: XScalarEnvironment\n /** The workspace store */\n workspaceStore: WorkspaceStore\n /** Client plugins */\n plugins: ClientPlugin[]\n /** App or modal options forwarded to operation/auth blocks */\n options?: MaybeRefOrGetter<ApiClientOptions>\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isElectron } from '@scalar/helpers/general/is-electron'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n getOperationExamples,\n resolveOperationExamples,\n} from '@scalar/workspace-store/helpers/operation-examples'\nimport {\n EXTERNAL_EXAMPLES,\n useExampleVisibility,\n useExternalExamples,\n} from '@scalar/workspace-store/helpers/use-external-examples'\nimport {\n getActiveProxyUrl,\n getRequestExampleContext,\n getSelectedBodyContentType,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport {\n computed,\n provide,\n ref,\n toValue,\n type ComponentPublicInstance,\n type MaybeRefOrGetter,\n} from 'vue'\n\nimport { OperationBlock } from '@/v2/blocks/operation-block'\nimport { APP_VERSION } from '@/v2/constants'\nimport {\n provideLocalization,\n useLocalization,\n} from '@/v2/features/localization'\nimport { mapHiddenClientsConfig } from '@/v2/features/modal/helpers/map-hidden-clients-config'\nimport type { ClientLayout } from '@/v2/types/layout'\nimport type { ApiClientOptions } from '@/v2/types/options'\n\nconst {\n isActive = true,\n document,\n layout,\n eventBus,\n path,\n method,\n environment,\n exampleName,\n options,\n workspaceStore,\n plugins,\n documentSlug,\n isWebhook = false,\n} = defineProps<\n OperationProps & {\n /** Selected anyOf/oneOf request-body variants keyed by schema path */\n requestBodyCompositionSelection?: Record<string, number>\n }\n>()\n\nconst inheritedLocalization = useLocalization()\nconst { translate, locale, direction } = provideLocalization(\n () =>\n toValue(options)?.localization ?? {\n locale: inheritedLocalization.locale.value,\n direction: inheritedLocalization.direction.value,\n translations: inheritedLocalization.translations.value,\n },\n)\n\n/**\n * Shared request-example context (operation, servers, auth scope, cookies). Recomputed when any\n * underlying workspace or route input changes — same reactivity as the previous local computeds.\n */\nconst requestExample = computed(() => {\n if (!path || !method || !exampleName || !document) {\n return null\n }\n\n const result = getRequestExampleContext(\n workspaceStore,\n documentSlug,\n { path, method, exampleName, isWebhook },\n {\n baseServerUrl: toValue(options)?.baseServerURL,\n fallbackDocument: document,\n isElectron: isElectron(),\n layout: layout === 'web' ? 'web' : 'other',\n servers: toValue(options)?.servers,\n appVersion: APP_VERSION,\n authentication: toValue(options)?.authentication,\n },\n )\n\n return result.ok ? result.data : null\n})\n\nconst sourceOperation = computed(() => requestExample.value?.operation ?? null)\nconst getResolver = (): ReturnType<WorkspaceStore['externalExamples']> =>\n workspaceStore.externalExamples(documentSlug)\nprovide(EXTERNAL_EXAMPLES, getResolver)\nconst contentType = computed(\n () =>\n getSelectedBodyContentType(\n getResolvedRef(sourceOperation.value?.requestBody),\n exampleName,\n ) ?? undefined,\n)\nconst container = ref<ComponentPublicInstance | null>(null)\nconst visible = useExampleVisibility(container)\nconst externalExamples = useExternalExamples(\n () =>\n sourceOperation.value\n ? getOperationExamples(\n sourceOperation.value,\n exampleName ?? '',\n contentType.value,\n )\n : [],\n () => isActive && visible.value,\n getResolver,\n)\nconst operation = computed(() =>\n sourceOperation.value\n ? resolveOperationExamples(\n sourceOperation.value,\n exampleName ?? '',\n contentType.value,\n externalExamples.resolve,\n )\n : null,\n)\nconst workspaceCookies = computed(\n () => requestExample.value?.cookies.workspace ?? [],\n)\nconst documentCookies = computed(\n () => requestExample.value?.cookies.document ?? [],\n)\nconst servers = computed(() => requestExample.value?.servers.list ?? [])\nconst selectedServer = computed(\n () => requestExample.value?.servers.selected ?? null,\n)\nconst serverMeta = computed(\n () => requestExample.value?.servers.meta ?? { type: 'document' as const },\n)\n\nconst securitySchemes = computed(\n () => requestExample.value?.security.schemes ?? {},\n)\n\nconst selectedSecurity = computed(\n () =>\n requestExample.value?.security.selected ?? {\n selectedIndex: -1,\n selectedSchemes: [],\n },\n)\nconst selectedSecuritySchemes = computed(\n () => requestExample.value?.security.selectedSchemes ?? [],\n)\nconst securityRequirements = computed(\n () => requestExample.value?.security.requirements ?? [],\n)\nconst authMeta = computed(\n () => requestExample.value?.security.meta ?? { type: 'document' as const },\n)\n\nconst defaultHeaders = computed(\n () => requestExample.value?.headers.default ?? {},\n)\n\n/** Combine environments from document and workspace into a unique array of environment names */\nconst environments = computed(() => {\n return Array.from(\n new Set(\n Object.keys({\n ...document?.['x-scalar-environments'],\n ...workspaceStore.workspace['x-scalar-environments'],\n }),\n ),\n )\n})\n\n/** Temporarily use the old config.hiddenClients until we migrate to the new httpClients config */\nconst httpClients = computed(() =>\n mapHiddenClientsConfig(toValue(options)?.hiddenClients),\n)\n</script>\n\n<template>\n <!-- Operation exists -->\n <template v-if=\"path && method && exampleName && operation && document\">\n <OperationBlock\n ref=\"container\"\n :activeEnvironment=\"\n workspaceStore.workspace['x-scalar-active-environment']\n \"\n :appVersion=\"APP_VERSION\"\n :authMeta\n :defaultHeaders\n :dir=\"direction\"\n :document\n :documentCookies\n :documentSecurity=\"document?.security ?? []\"\n :documentSlug\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :environment\n :environments\n :eventBus\n :exampleKey=\"exampleName\"\n :externalExamplesFailed=\"externalExamples.failed.value\"\n :externalExamplesPending=\"externalExamples.pending.value\"\n :hideClientButton=\"toValue(options)?.hideClientButton ?? false\"\n :history=\"workspaceStore.history.getHistory(documentSlug, path, method)\"\n :httpClients\n :isWebhook\n :lang=\"locale\"\n :layout\n :method\n :operation\n :options\n :path\n :plugins=\"plugins\"\n :proxyUrl=\"\n getActiveProxyUrl(\n workspaceStore.workspace['x-scalar-active-proxy'],\n layout === 'web' ? 'web' : 'other',\n ) ?? ''\n \"\n :requestBodyCompositionSelection\n :securityRequirements=\"securityRequirements\"\n :securitySchemes\n :selectedClient=\"workspaceStore.workspace['x-scalar-default-client']\"\n :selectedSecurity=\"selectedSecurity\"\n :selectedSecuritySchemes=\"selectedSecuritySchemes\"\n :server=\"selectedServer\"\n :serverMeta\n :servers\n :sourceOperation=\"sourceOperation ?? undefined\"\n :workspaceCookies\n @retry:externalExamples=\"externalExamples.retry\" />\n </template>\n\n <!-- Empty state -->\n <div\n v-else\n class=\"flex h-full w-full items-center justify-center\"\n :dir=\"direction\"\n :lang=\"locale\">\n <span class=\"text-c-3\">{{\n translate('apiClient.operation.selectAnOperationToViewDetails')\n }}</span>\n </div>\n</template>\n"],"mappings":"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"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Operation_default as Operation };
|
|
1
|
+
export { default as Operation } from "./Operation.vue.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import DocumentSearchModal_vue_vue_type_script_setup_true_lang_default from "./DocumentSearchModal.
|
|
3
|
-
/* empty css
|
|
2
|
+
import DocumentSearchModal_vue_vue_type_script_setup_true_lang_default from "./DocumentSearchModal.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region src/v2/features/search/components/DocumentSearchModal.vue
|
|
5
5
|
var DocumentSearchModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(DocumentSearchModal_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6ea0d1fb"]]);
|
|
6
6
|
//#endregion
|