@scalar/api-client 3.23.2 → 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 +9 -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 +137 -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.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} +1 -1
- 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
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentSearchModal.vue.js","names":[],"sources":["../../../../../src/v2/features/search/components/DocumentSearchModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\nimport { ScalarSearchInput } from '@scalar/components/search-input'\nimport { ScalarSearchResultList } from '@scalar/components/search-results'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { nanoid } from 'nanoid'\nimport { computed, ref, watch } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport { useDocumentSearch } from '@/v2/features/search/hooks/use-document-search'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n /** Controls the visibility of the search modal. */\n modalState: ModalState\n /** The document whose entries should be searched. */\n document: OpenApiDocument | undefined\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the user picks a result, passing the navigation id. */\n (e: 'select', id: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n/** Base id for the search form. */\nconst id = nanoid()\nconst listboxId = `${id}-search-result`\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useDocumentSearch(() => props.document)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/**\n * Reset the query every time the modal is opened so users always start from a\n * clean state. Matches the reference search modal behaviour.\n */\nwatch(\n () => props.modalState.open,\n (open) => {\n if (open) {\n query.value = ''\n selectedIndex.value = undefined\n }\n },\n)\n\n/** Keyboard navigation, wrapping around the ends of the result list. */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = results.value.length\n if (length === 0) {\n return\n }\n\n if (typeof selectedIndex.value === 'number') {\n selectedIndex.value = (selectedIndex.value + offset + length) % length\n return\n }\n\n selectedIndex.value = offset === -1 ? length - 1 : 0\n}\n\nfunction handleSelect(idx: number | undefined) {\n if (typeof idx !== 'number' || !results.value[idx]) {\n return\n }\n\n const result = results.value[idx]\n props.modalState.hide()\n emit('select', result.item.id)\n}\n\n/**\n * aria-activedescendant for the combobox. Each result item must render the\n * matching id for assistive tech to announce the selection correctly.\n */\nconst activeDescendantId = computed(() => {\n const selectedResult = results.value[selectedIndex.value ?? -1]\n return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n\n<template>\n <ScalarModal\n :aria-label=\"translate('apiClient.documentSearchModal.documentSearch')\"\n :state=\"modalState\"\n variant=\"search\">\n <div\n class=\"mb-0 flex flex-col\"\n role=\"search\">\n <ScalarSearchInput\n v-model=\"query\"\n :aria-activedescendant=\"activeDescendantId\"\n aria-autocomplete=\"list\"\n :aria-controls=\"listboxId\"\n :aria-describedby=\"instructionsId\"\n role=\"combobox\"\n @blur=\"selectedIndex = undefined\"\n @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n </div>\n <ScalarSearchResultList\n :id=\"listboxId\"\n :aria-label=\"\n translate('apiClient.documentSearchModal.documentSearchResults')\n \"\n class=\"custom-scroll px-1 pb-1\"\n :noResults=\"!results.length\">\n <template #query>\n {{ query }}\n </template>\n <SearchResult\n v-for=\"(result, idx) in results\"\n :id=\"`search-result-${result.item.id}`\"\n :key=\"result.refIndex\"\n :isSelected=\"selectedIndex === idx\"\n :result=\"result\"\n @click.prevent=\"() => handleSelect(idx)\" />\n </ScalarSearchResultList>\n <div\n :id=\"instructionsId\"\n class=\"ref-search-meta\">\n <span\n aria-hidden=\"true\"\n class=\"contents\">\n <span>{{ translate('apiClient.documentSearchModal.navigate') }}</span>\n <span>{{ translate('apiClient.documentSearchModal.select') }}</span>\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.documentSearchModal.keyboardInstructions')\n }}</span>\n </div>\n </ScalarModal>\n</template>\n\n<style scoped>\n.ref-search-meta {\n background: var(--scalar-background-1);\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-bottom-right-radius: var(--scalar-radius-lg);\n padding: 6px 12px;\n font-size: var(--scalar-font-size-4);\n color: var(--scalar-color-3);\n font-weight: var(--scalar-semibold);\n display: flex;\n gap: 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"DocumentSearchModal.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/features/search/components/DocumentSearchModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\nimport { ScalarSearchInput } from '@scalar/components/search-input'\nimport { ScalarSearchResultList } from '@scalar/components/search-results'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { nanoid } from 'nanoid'\nimport { computed, ref, watch } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport { useDocumentSearch } from '@/v2/features/search/hooks/use-document-search'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n /** Controls the visibility of the search modal. */\n modalState: ModalState\n /** The document whose entries should be searched. */\n document: OpenApiDocument | undefined\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the user picks a result, passing the navigation id. */\n (e: 'select', id: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n/** Base id for the search form. */\nconst id = nanoid()\nconst listboxId = `${id}-search-result`\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useDocumentSearch(() => props.document)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/**\n * Reset the query every time the modal is opened so users always start from a\n * clean state. Matches the reference search modal behaviour.\n */\nwatch(\n () => props.modalState.open,\n (open) => {\n if (open) {\n query.value = ''\n selectedIndex.value = undefined\n }\n },\n)\n\n/** Keyboard navigation, wrapping around the ends of the result list. */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = results.value.length\n if (length === 0) {\n return\n }\n\n if (typeof selectedIndex.value === 'number') {\n selectedIndex.value = (selectedIndex.value + offset + length) % length\n return\n }\n\n selectedIndex.value = offset === -1 ? length - 1 : 0\n}\n\nfunction handleSelect(idx: number | undefined) {\n if (typeof idx !== 'number' || !results.value[idx]) {\n return\n }\n\n const result = results.value[idx]\n props.modalState.hide()\n emit('select', result.item.id)\n}\n\n/**\n * aria-activedescendant for the combobox. Each result item must render the\n * matching id for assistive tech to announce the selection correctly.\n */\nconst activeDescendantId = computed(() => {\n const selectedResult = results.value[selectedIndex.value ?? -1]\n return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n\n<template>\n <ScalarModal\n :aria-label=\"translate('apiClient.documentSearchModal.documentSearch')\"\n :state=\"modalState\"\n variant=\"search\">\n <div\n class=\"mb-0 flex flex-col\"\n role=\"search\">\n <ScalarSearchInput\n v-model=\"query\"\n :aria-activedescendant=\"activeDescendantId\"\n aria-autocomplete=\"list\"\n :aria-controls=\"listboxId\"\n :aria-describedby=\"instructionsId\"\n role=\"combobox\"\n @blur=\"selectedIndex = undefined\"\n @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n </div>\n <ScalarSearchResultList\n :id=\"listboxId\"\n :aria-label=\"\n translate('apiClient.documentSearchModal.documentSearchResults')\n \"\n class=\"custom-scroll px-1 pb-1\"\n :noResults=\"!results.length\">\n <template #query>\n {{ query }}\n </template>\n <SearchResult\n v-for=\"(result, idx) in results\"\n :id=\"`search-result-${result.item.id}`\"\n :key=\"result.refIndex\"\n :isSelected=\"selectedIndex === idx\"\n :result=\"result\"\n @click.prevent=\"() => handleSelect(idx)\" />\n </ScalarSearchResultList>\n <div\n :id=\"instructionsId\"\n class=\"ref-search-meta\">\n <span\n aria-hidden=\"true\"\n class=\"contents\">\n <span>{{ translate('apiClient.documentSearchModal.navigate') }}</span>\n <span>{{ translate('apiClient.documentSearchModal.select') }}</span>\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.documentSearchModal.keyboardInstructions')\n }}</span>\n </div>\n </ScalarModal>\n</template>\n\n<style scoped>\n.ref-search-meta {\n background: var(--scalar-background-1);\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-bottom-right-radius: var(--scalar-radius-lg);\n padding: 6px 12px;\n font-size: var(--scalar-font-size-4);\n color: var(--scalar-color-3);\n font-weight: var(--scalar-semibold);\n display: flex;\n gap: 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n"],"mappings":""}
|
|
@@ -126,4 +126,4 @@ var DocumentSearchModal_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
126
126
|
//#endregion
|
|
127
127
|
export { DocumentSearchModal_vue_vue_type_script_setup_true_lang_default as default };
|
|
128
128
|
|
|
129
|
-
//# sourceMappingURL=DocumentSearchModal.
|
|
129
|
+
//# sourceMappingURL=DocumentSearchModal.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentSearchModal.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","_createVNode","_isRef","_withKeys","_withModifiers","_createTextVNode","_toDisplayString","_createElementBlock","_Fragment","_renderList","SearchResult"],"sources":["../../../../../src/v2/features/search/components/DocumentSearchModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\nimport { ScalarSearchInput } from '@scalar/components/search-input'\nimport { ScalarSearchResultList } from '@scalar/components/search-results'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'\nimport { nanoid } from 'nanoid'\nimport { computed, ref, watch } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport { useDocumentSearch } from '@/v2/features/search/hooks/use-document-search'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n /** Controls the visibility of the search modal. */\n modalState: ModalState\n /** The document whose entries should be searched. */\n document: OpenApiDocument | undefined\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the user picks a result, passing the navigation id. */\n (e: 'select', id: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n/** Base id for the search form. */\nconst id = nanoid()\nconst listboxId = `${id}-search-result`\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useDocumentSearch(() => props.document)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/**\n * Reset the query every time the modal is opened so users always start from a\n * clean state. Matches the reference search modal behaviour.\n */\nwatch(\n () => props.modalState.open,\n (open) => {\n if (open) {\n query.value = ''\n selectedIndex.value = undefined\n }\n },\n)\n\n/** Keyboard navigation, wrapping around the ends of the result list. */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = results.value.length\n if (length === 0) {\n return\n }\n\n if (typeof selectedIndex.value === 'number') {\n selectedIndex.value = (selectedIndex.value + offset + length) % length\n return\n }\n\n selectedIndex.value = offset === -1 ? length - 1 : 0\n}\n\nfunction handleSelect(idx: number | undefined) {\n if (typeof idx !== 'number' || !results.value[idx]) {\n return\n }\n\n const result = results.value[idx]\n props.modalState.hide()\n emit('select', result.item.id)\n}\n\n/**\n * aria-activedescendant for the combobox. Each result item must render the\n * matching id for assistive tech to announce the selection correctly.\n */\nconst activeDescendantId = computed(() => {\n const selectedResult = results.value[selectedIndex.value ?? -1]\n return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n\n<template>\n <ScalarModal\n :aria-label=\"translate('apiClient.documentSearchModal.documentSearch')\"\n :state=\"modalState\"\n variant=\"search\">\n <div\n class=\"mb-0 flex flex-col\"\n role=\"search\">\n <ScalarSearchInput\n v-model=\"query\"\n :aria-activedescendant=\"activeDescendantId\"\n aria-autocomplete=\"list\"\n :aria-controls=\"listboxId\"\n :aria-describedby=\"instructionsId\"\n role=\"combobox\"\n @blur=\"selectedIndex = undefined\"\n @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n </div>\n <ScalarSearchResultList\n :id=\"listboxId\"\n :aria-label=\"\n translate('apiClient.documentSearchModal.documentSearchResults')\n \"\n class=\"custom-scroll px-1 pb-1\"\n :noResults=\"!results.length\">\n <template #query>\n {{ query }}\n </template>\n <SearchResult\n v-for=\"(result, idx) in results\"\n :id=\"`search-result-${result.item.id}`\"\n :key=\"result.refIndex\"\n :isSelected=\"selectedIndex === idx\"\n :result=\"result\"\n @click.prevent=\"() => handleSelect(idx)\" />\n </ScalarSearchResultList>\n <div\n :id=\"instructionsId\"\n class=\"ref-search-meta\">\n <span\n aria-hidden=\"true\"\n class=\"contents\">\n <span>{{ translate('apiClient.documentSearchModal.navigate') }}</span>\n <span>{{ translate('apiClient.documentSearchModal.select') }}</span>\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.documentSearchModal.keyboardInstructions')\n }}</span>\n </div>\n </ScalarModal>\n</template>\n\n<style scoped>\n.ref-search-meta {\n background: var(--scalar-background-1);\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-bottom-right-radius: var(--scalar-radius-lg);\n padding: 6px 12px;\n font-size: var(--scalar-font-size-4);\n color: var(--scalar-color-3);\n font-weight: var(--scalar-semibold);\n display: flex;\n gap: 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import SearchResult_vue_vue_type_script_setup_true_lang_default from "./SearchResult.
|
|
1
|
+
import SearchResult_vue_vue_type_script_setup_true_lang_default from "./SearchResult.vue_vue_type_script_setup_true_lang.js";
|
|
2
2
|
//#region src/v2/features/search/components/SearchResult.vue
|
|
3
3
|
var SearchResult_default = SearchResult_vue_vue_type_script_setup_true_lang_default;
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.vue.js","names":[],"sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport type { FuseData } from '@/v2/features/search/types'\n\ndefineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n}>()\n\nconst { translate } = useLocalization()\n\n/**\n * Icon used for each search result type. Operations use the terminal glyph to\n * match the sidebar's operation indicator, tags and headings use their closest\n * semantic equivalents.\n */\nconst ENTRY_ICONS: { [x in FuseData['type']]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n}\n\nconst ENTRY_LABELS = computed(() => ({\n heading: translate('apiClient.searchResult.heading'),\n operation: translate('apiClient.searchResult.operation'),\n tag: translate('apiClient.searchResult.tag'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span>\n <span class=\"sr-only\">{{ ENTRY_LABELS[result.item.type] }}: </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type === 'operation' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\"\n >{{ translate('apiClient.searchResult.httpMethod') }}\n {{ result.item.method ?? 'get' }}\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.path')\n }}</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.description')\n }}</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"SearchResult.vue.js","names":["_sfc_main"],"sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport type { FuseData } from '@/v2/features/search/types'\n\ndefineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n}>()\n\nconst { translate } = useLocalization()\n\n/**\n * Icon used for each search result type. Operations use the terminal glyph to\n * match the sidebar's operation indicator, tags and headings use their closest\n * semantic equivalents.\n */\nconst ENTRY_ICONS: { [x in FuseData['type']]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n}\n\nconst ENTRY_LABELS = computed(() => ({\n heading: translate('apiClient.searchResult.heading'),\n operation: translate('apiClient.searchResult.operation'),\n tag: translate('apiClient.searchResult.tag'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span>\n <span class=\"sr-only\">{{ ENTRY_LABELS[result.item.type] }}: </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type === 'operation' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\"\n >{{ translate('apiClient.searchResult.httpMethod') }}\n {{ result.item.method ?? 'get' }}\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.path')\n }}</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.description')\n }}</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":""}
|
|
@@ -72,4 +72,4 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
72
72
|
//#endregion
|
|
73
73
|
export { SearchResult_vue_vue_type_script_setup_true_lang_default as default };
|
|
74
74
|
|
|
75
|
-
//# sourceMappingURL=SearchResult.
|
|
75
|
+
//# sourceMappingURL=SearchResult.vue_vue_type_script_setup_true_lang.js.map
|
package/dist/v2/features/search/components/SearchResult.vue_vue_type_script_setup_true_lang.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResult.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_createSlots","_withCtx","_createElementVNode","_toDisplayString","_createTextVNode","_createVNode"],"sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\nimport type { FuseData } from '@/v2/features/search/types'\n\ndefineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n}>()\n\nconst { translate } = useLocalization()\n\n/**\n * Icon used for each search result type. Operations use the terminal glyph to\n * match the sidebar's operation indicator, tags and headings use their closest\n * semantic equivalents.\n */\nconst ENTRY_ICONS: { [x in FuseData['type']]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n}\n\nconst ENTRY_LABELS = computed(() => ({\n heading: translate('apiClient.searchResult.heading'),\n operation: translate('apiClient.searchResult.operation'),\n tag: translate('apiClient.searchResult.tag'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span>\n <span class=\"sr-only\">{{ ENTRY_LABELS[result.item.type] }}: </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type === 'operation' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\"\n >{{ translate('apiClient.searchResult.httpMethod') }}\n {{ result.item.method ?? 'get' }}\n </span>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.path')\n }}</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{\n translate('apiClient.searchResult.description')\n }}</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAqBA,MAAM,EAAE,cAAc,gBAAgB;;;;;;EAOtC,MAAM,cAAgE;GACpE,SAAS;GACT,WAAW;GACX,KAAK;EACP;EAEA,MAAM,eAAe,gBAAgB;GACnC,SAAS,UAAU,gCAAgC;GACnD,WAAW,UAAU,kCAAkC;GACvD,KAAK,UAAU,4BAA4B;EAC7C,EAAE;;GAIA,OAAAA,UAAA,GAAAC,YAsCyBC,MAAA,sBAAA,GAAA;IArCtB,IAAI,QAAA;IACJ,MAAM,YAAY,QAAA,OAAO,KAAK;IAC9B,UAAU,QAAA;;IACX,SAAAE,cAIO,CAJPC,mBAIO,QAAA,MAAA;KAHLA,mBAAwE,QAAxE,YAAwEC,gBAA/C,aAAA,MAAa,QAAA,OAAO,KAAK,KAAI,IAAI,SAAO,CAAA;KAAOC,gBAAA,MACxED,gBAAG,QAAA,OAAO,KAAK,KAAK,IAAG,KACvB,CAAA;KAAA,OAAA,OAAA,OAAA,KAAAD,mBAA8B,QAAA,EAAxB,OAAM,UAAS,GAAC,KAAC,EAAA;;;G,IAGR,QAAA,OAAO,KAAK,SAAI,gBAA6B,QAAA,OAAO,KAAK,UAAU,QAAA,OAAO,KAAK,SAAiB,QAAA,OAAO,KAAK,SAAS,QAAA,OAAO,KAAK,Q;IAK/I,MAAA;IACD,IAAAD,cAYO,CAZPC,mBAYO,QAZP,YAYO;KAXLG,YAE0CN,MAAA,UAAA,GAAA;MADxC,eAAY;MACX,QAAQ,QAAA,OAAO,KAAK,UAAM;;KAC7BG,mBAGO,QAHP,YAGOC,gBAFDJ,MAAA,SAAA,CAAS,CAAA,mCAAA,CAAA,IAAwC,MACrDI,gBAAG,QAAA,OAAO,KAAK,UAAM,KAAA,GAAA,CAAA;KAEvBD,mBAES,QAFT,YAESC,gBADPJ,MAAA,SAAA,CAAS,CAAA,6BAAA,CAAA,GAAA,CAAA;KACFK,gBAAA,MACTD,gBAAG,QAAA,OAAO,KAAK,IAAI,GAAA,CAAA;;;G,IAIV,QAAA,OAAO,KAAK,c;IACtB,MAAA;IACD,IAAAF,cAES,CAFTC,mBAES,QAFT,YAESC,gBADPJ,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,GACFK,gBAAA,MACTD,gBAAG,QAAA,OAAO,KAAK,WAAW,GAAA,CAAA,C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
2
|
-
import type { FuseData } from '
|
|
2
|
+
import type { FuseData } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Create a search index from a list of entries.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { ClientLayout } from '
|
|
2
|
+
import type { ClientLayout } from '../types/layout.js';
|
|
3
3
|
/**
|
|
4
4
|
* Handles global keyboard shortcuts.
|
|
5
5
|
* Checks modifier keys and input context before emitting events.
|
package/dist/v2/hooks/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { useGlobalHotKeys };
|
|
1
|
+
export { useGlobalHotKeys } from "./use-global-hot-keys.js";
|