@scalar/api-client 3.20.0 → 3.21.1
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 +47 -0
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +15 -7
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
- package/dist/style.css +47 -42
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +11 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +2 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -2
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -2
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +3 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +17 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +4 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +8 -5
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +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 +12 -4
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +13 -3
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +7 -2
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +1 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +14 -6
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +5 -3
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +4 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +7 -6
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.script.js +2 -1
- package/dist/v2/components/data-table/DataTable.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/localization/locales/ar.d.ts +4 -0
- package/dist/v2/features/localization/locales/ar.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/ar.js +8 -2
- package/dist/v2/features/localization/locales/ar.js.map +1 -1
- package/dist/v2/features/localization/locales/de.d.ts +4 -0
- package/dist/v2/features/localization/locales/de.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/de.js +8 -2
- package/dist/v2/features/localization/locales/de.js.map +1 -1
- package/dist/v2/features/localization/locales/es.d.ts +4 -0
- package/dist/v2/features/localization/locales/es.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/es.js +8 -2
- package/dist/v2/features/localization/locales/es.js.map +1 -1
- package/dist/v2/features/localization/locales/fr.d.ts +4 -0
- package/dist/v2/features/localization/locales/fr.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/fr.js +8 -2
- package/dist/v2/features/localization/locales/fr.js.map +1 -1
- package/dist/v2/features/localization/locales/pt.d.ts +4 -0
- package/dist/v2/features/localization/locales/pt.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/pt.js +8 -2
- package/dist/v2/features/localization/locales/pt.js.map +1 -1
- package/dist/v2/features/localization/locales/ru.d.ts +4 -0
- package/dist/v2/features/localization/locales/ru.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/ru.js +8 -2
- package/dist/v2/features/localization/locales/ru.js.map +1 -1
- package/dist/v2/features/localization/locales/zh-cn.d.ts +4 -0
- package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/zh-cn.js +8 -2
- package/dist/v2/features/localization/locales/zh-cn.js.map +1 -1
- package/dist/v2/features/localization/translations.d.ts +4 -0
- package/dist/v2/features/localization/translations.d.ts.map +1 -1
- package/dist/v2/features/localization/translations.js +8 -2
- package/dist/v2/features/localization/translations.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -2
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +2 -3
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +8 -7
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +2 -3
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +1 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/helpers/generate-location-id.d.ts +1 -2
- package/dist/v2/helpers/generate-location-id.d.ts.map +1 -1
- package/dist/v2/helpers/generate-location-id.js.map +1 -1
- package/dist/vue-styles.css +40 -40
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-cn.js","names":[],"sources":["../../../../../src/v2/features/localization/locales/zh-cn.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** Built-in API Client translations for zh-cn. */\nexport const zhCn = {\n 'serverVariablesSelect': {\n 'selected': '已选择:',\n },\n 'serverVariablesTextbox': {\n 'value': '值',\n },\n 'sidebarListElementForm': {\n 'cancel': '取消',\n },\n 'requestBlock': {\n 'authentication': '身份验证',\n 'variables': '变量',\n 'cookies': 'Cookie',\n 'headers': '请求头',\n 'queryParameters': '查询参数',\n 'requestBody': '请求体',\n 'requestName': '请求名称',\n 'label': '请求:{name}',\n },\n 'responseBlock': {\n 'response': '响应',\n 'requestHeaders': '请求头',\n 'responseHeaders': '响应头',\n 'body': '正文',\n },\n 'codeInput': {\n 'required': '必填',\n 'exitHint': '按 {escape},然后按 {tab} 退出',\n },\n 'codeInputLite': {\n 'required': '必填',\n },\n 'dataTableInput': {\n 'clearValue': '清除值',\n 'showPassword': '显示密码',\n 'hidePassword': '隐藏密码',\n },\n 'dataTableInputSelect': {\n 'value': '值',\n 'addValue': '添加值',\n },\n 'confirmationForm': {\n 'cancel': '取消',\n 'save': '保存',\n },\n 'collapsibleSection': {\n 'collapsed': '(已折叠)',\n 'item': '项',\n 'items': '项',\n },\n 'modalClientContainer': {\n 'label': 'API 客户端',\n },\n 'serverDropdown': {\n 'server': '服务器:',\n 'addServer': '添加服务器',\n 'updateServers': '更新服务器',\n 'unknownServer': '未知服务器',\n },\n 'sidebar': {\n 'search': '搜索',\n },\n 'sidebarMenu': {\n 'settings': '设置',\n },\n 'sidebarToggle': {\n 'hide': '隐藏侧边栏',\n 'show': '显示侧边栏',\n },\n 'environmentsList': {\n 'addEnvironment': '添加环境',\n },\n 'modal': {\n 'noDocumentSelected': '未选择文档',\n },\n 'operation': {\n 'selectAnOperationToViewDetails': '选择一个操作以查看详情',\n },\n 'header': {\n 'operationSettings': '操作设置',\n 'closeClient': '关闭客户端',\n },\n 'openApiClientButton': {\n 'openAPIClient': '打开 API 客户端',\n },\n 'requestBody': {\n 'noBody': '无请求体',\n 'delete': '删除',\n 'selectFile': '选择文件',\n 'multipartForm': '多部分表单',\n 'formUrlEncoded': 'URL 编码表单',\n 'binaryFile': '二进制文件',\n 'other': '其他',\n 'none': '无',\n },\n 'requestBodyStructured': {\n 'body': '正文',\n },\n 'requestBodyViewToggle': {\n 'form': '表单',\n 'raw': '原始内容',\n 'fixBody': '修正请求体以切换到表单视图',\n },\n 'requestCodeSnippet': {\n 'codeSnippet': '代码片段',\n },\n 'requestTable': {\n 'enabled': '已启用',\n 'key': '键',\n 'value': '值',\n },\n 'requestTableRow': {\n 'key': '键',\n 'value': '值',\n 'delete': '删除',\n 'selectFile': '选择文件',\n 'globalCookieHint': '全局 Cookie 在整个工作区中共享。点击前往查看。',\n 'readOnlyHint': '此属性为只读。若要更改,请覆盖该属性或通过复选框禁用它。',\n 'include': '在请求中包含 {name}',\n 'keyLabel': '{name} 的键',\n 'valueLabel': '{name} 的值',\n 'deleteRow': '删除 {name}',\n 'row': '行',\n },\n 'requestTableTooltip': {\n 'min': '最小值:',\n 'max': '最大值:',\n 'default': '默认值:',\n 'invalid': '输入无效',\n 'moreInformation': '更多信息',\n },\n 'headers': {\n 'headerKey': '头部键',\n 'headerValue': '头部值',\n 'noHeaders': '无头部',\n },\n 'responseBody': {\n 'binaryFile': '二进制文件',\n },\n 'responseBodyPreview': {\n 'previewUnavailable': '无法预览',\n },\n 'responseBodyStreaming': {\n 'body': '正文',\n 'listening': '正在监听…',\n 'cancel': '取消',\n },\n 'responseBodyToggle': {\n 'preview': '预览',\n 'raw': '原始内容',\n },\n 'responseBodyVirtual': {\n 'body': '正文',\n 'largeBodyHint': '此响应体过大,无法进行语法高亮。',\n },\n 'responseCookies': {\n 'cookies': 'Cookie',\n 'cookieName': 'Cookie 名称',\n 'cookieValue': 'Cookie 值',\n 'noCookies': '无 Cookie',\n },\n 'responseEmpty': {\n 'roadmap': '路线图',\n 'poweredByScalarcom': '由 Scalar.com 提供支持',\n 'getStarted': '开始使用',\n 'newRequest': '新建请求',\n 'sendRequest': '发送请求',\n 'version': 'Scalar App V{version} 测试版',\n },\n 'responseLoadingOverlay': {\n 'cancel': '取消',\n },\n 'addressBar': {\n 'path': '路径',\n 'copyUrl': '复制 URL',\n 'send': '发送',\n 'sendRequest': '向 {url} 发送 {method} 请求',\n 'duplicateRequest': '此文档中已存在发往 {path} 的 {method} 请求',\n 'urlPlaceholder': '输入 URL',\n 'webhookUrlPlaceholder': '输入完整的 Webhook URL,例如 https://example.com/hook',\n },\n 'addressBarHistory': {\n 'requestHistory': '请求历史',\n },\n 'environmentSelector': {\n 'noEnvironment': '无环境',\n 'notAvailableInThisContext': '在此上下文中不可用',\n 'environmentHint': '环境可帮助您管理不同上下文中的变量,例如 API 密钥和基础 URL。',\n 'add': '添加环境',\n 'select': '选择环境',\n 'unavailable': '{name}(不可用)',\n 'current': '当前环境:{name}',\n },\n 'deleteRequestAuthModal': {\n 'deleteSecurityScheme': '删除安全方案',\n 'cancel': '取消',\n 'delete': '删除',\n 'confirmation': '此操作无法撤销。您即将从集合中删除安全方案 {name}。',\n },\n 'oauth2': {\n deviceAuthorizationUrl: '设备授权 URL',\n deviceVerificationPrompt: '打开验证页面并输入此代码:',\n waitingForAuthorization: '正在等待授权…',\n cancelDeviceAuthorization: '取消',\n\n 'accessToken': '访问令牌',\n 'refreshUrl': '刷新 URL',\n 'refresh': '刷新',\n 'authUrl': '身份验证 URL',\n 'tokenUrl': '令牌 URL',\n 'redirectUrl': '重定向 URL',\n 'username': '用户名',\n 'password': '密码',\n 'clientID': '客户端 ID',\n 'clientSecret': '客户端密钥',\n 'usePKCE': '使用 PKCE',\n 'credentialsLocation': '凭据位置',\n 'authorize': '授权',\n 'clear': '清除',\n 'failedToauthorize': '授权失败',\n 'failedToRefreshToken': '刷新令牌失败',\n 'optionalRedirectUrl': '可选的重定向 URL',\n },\n 'oauthScopesAddModal': {\n 'name': '名称:',\n 'description': '描述:',\n 'readUserData': '读取用户数据',\n 'edit': '编辑权限范围',\n 'add': '添加权限范围',\n 'save': '保存',\n 'required': '权限范围名称为必填项。',\n 'duplicate': '名为“{name}”的权限范围已存在。',\n },\n 'oauthScopesInput': {\n 'noScopesDefined': '未定义权限范围',\n 'addScope': '添加权限范围',\n 'deselectAll': '取消全选',\n 'selectAll': '全选',\n 'selectedScopes': '已选权限范围:{count} / {total}',\n 'editScope': '编辑 {name}',\n 'deleteScope': '删除 {name}',\n 'selectScope': '选择权限范围 {name}',\n },\n 'openIdConnect': {\n 'discoveryUrl': '发现 URL',\n 'fetchConfiguration': '获取配置',\n 'failedToFetchConfiguration': '获取 OpenID Connect 配置失败',\n },\n 'requestAuthDataTable': {\n 'noauthenticationSelected': '未选择身份验证',\n },\n 'requestAuthTab': {\n 'token': '令牌',\n 'bearerToken': 'Bearer 令牌',\n 'getAToken': '获取令牌',\n 'refresh': '刷新',\n 'username': '用户名',\n 'password': '密码',\n 'name': '名称',\n 'value': '值',\n 'cancel': '取消',\n 'authorize': '授权',\n 'unsupportedCredentials': '浏览器客户端不会发送此 AsyncAPI 安全方案的凭据。',\n 'authorizeVia': '通过 {name} 授权',\n 'unsupportedType': '暂不支持 {type} 类型的安全方案。',\n 'missingType': '安全方案缺少类型,请检查您的 {type} 文档或身份验证配置。',\n 'failedToauthorize': '授权失败',\n 'failedToRefresh': '刷新失败',\n 'configure': '配置 {name}',\n 'mutualTlsHint': '双向 TLS 通过在 TLS 握手期间提供客户端证书来进行身份验证,因此无需在此输入任何内容。',\n },\n 'commandActionForm': {\n 'continue': '继续',\n },\n 'environment': {\n 'thisIsTheActiveEnvironment': '这是当前启用的环境',\n 'active': '已启用',\n 'editEnvironment': '编辑环境',\n 'deleteEnvironment': '删除环境',\n },\n 'environmentCreateModal': {\n 'environmentName': '环境名称',\n 'thisEnvironmentNameIsAlreadyInUse': '此环境名称已被使用。',\n 'update': '更新环境',\n 'add': '添加环境',\n },\n 'environmentDeleteModal': {\n 'cancel': '取消',\n 'deleteEnvironment': '删除环境',\n 'deleteConfirmation': '确定要删除此环境吗?此操作无法撤销。',\n 'title': '删除 {name}',\n },\n 'environmentVariablesDropdown': {\n 'variableSuggestions': '变量建议',\n 'addVariable': '添加变量',\n },\n 'environmentVariablesTable': {\n 'name': '名称',\n 'value': '值',\n 'actions': '操作',\n 'environmentVariableName': '环境变量名称',\n 'environmentVariableValue': '环境变量值',\n },\n 'documentSearchModal': {\n 'documentSearch': '文档搜索',\n 'documentSearchResults': '文档搜索结果',\n 'navigate': '↑↓ 导航',\n 'select': '⏎ 选择',\n 'keyboardInstructions': '按上箭头或下箭头导航,按回车选择,输入文本筛选结果',\n },\n 'searchResult': {\n 'httpMethod': 'HTTP 方法:',\n 'path': '路径:',\n 'description': '描述:',\n 'heading': '标题',\n 'operation': '操作',\n 'tag': '标签',\n },\n 'sectionFilter': {\n 'all': '全部',\n 'auth': '身份验证',\n 'variables': '变量',\n 'cookies': 'Cookie',\n 'headers': '头部',\n 'query': '查询',\n 'body': '正文',\n },\n 'requestParams': {\n 'clearAll': '清除所有{title}',\n 'clear': '清除',\n 'clearOptionalParameters': '清除可选参数',\n },\n 'responseBodyDownload': {\n 'download': '下载响应体',\n 'label': '下载',\n 'body': '响应体',\n },\n 'responseMetaInformation': {\n 'duration': '响应信息,耗时:',\n 'size': ',大小:',\n 'status': ',状态:',\n },\n 'authSelector': {\n 'selectedType': '已选身份验证类型:{type}',\n 'multipleTypes': '已选择多个身份验证类型',\n 'selectType': '选择身份验证类型',\n 'optional': '可选',\n 'required': '必填',\n 'deleteScheme': '删除 {name}',\n 'requiredGroup': '必需的身份验证',\n 'availableGroup': '可用的身份验证',\n 'addGroup': '添加身份验证',\n },\n 'operationBlock': {\n 'webhookUrlRequired': 'Webhook URL 为必填项。请先输入目标地址。',\n 'pathParametersRequired': '路径参数必须有值。',\n },\n 'dataTableCheckbox': {\n 'toggle': '切换',\n },\n 'pillTooltipHost': {\n 'computedAtExecution': '在执行请求时计算',\n 'noValue': '无值',\n },\n 'authOptions': {\n oauth2DeviceAuthorization: 'OAuth2 设备授权',\n 'apiKeyCookie': 'Cookie 中的 API 密钥',\n 'apiKeyHeader': '请求头中的 API 密钥',\n 'apiKeyQuery': '查询参数中的 API 密钥',\n 'httpBasic': 'HTTP Basic',\n 'httpBearer': 'HTTP Bearer',\n 'oauth2Implicit': 'OAuth2 隐式流程',\n 'oauth2Password': 'OAuth2 密码流程',\n 'oauth2ClientCredentials': 'OAuth2 客户端凭据',\n 'oauth2AuthorizationFlow': 'OAuth2 授权码',\n },\n 'deleteSidebarListElement': {\n 'delete': '删除 {name}',\n },\n 'deleteModal': {\n 'delete': '删除 {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,OAAO;CAClB,yBAAyB,EACvB,YAAY,OACd;CACA,0BAA0B,EACxB,SAAS,IACX;CACA,0BAA0B,EACxB,UAAU,KACZ;CACA,gBAAgB;EACd,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,WAAW;EACX,mBAAmB;EACnB,eAAe;EACf,eAAe;EACf,SAAS;CACX;CACA,iBAAiB;EACf,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;EACnB,QAAQ;CACV;CACA,aAAa;EACX,YAAY;EACZ,YAAY;CACd;CACA,iBAAiB,EACf,YAAY,KACd;CACA,kBAAkB;EAChB,cAAc;EACd,gBAAgB;EAChB,gBAAgB;CAClB;CACA,wBAAwB;EACtB,SAAS;EACT,YAAY;CACd;CACA,oBAAoB;EAClB,UAAU;EACV,QAAQ;CACV;CACA,sBAAsB;EACpB,aAAa;EACb,QAAQ;EACR,SAAS;CACX;CACA,wBAAwB,EACtB,SAAS,UACX;CACA,kBAAkB;EAChB,UAAU;EACV,aAAa;EACb,iBAAiB;EACjB,iBAAiB;CACnB;CACA,WAAW,EACT,UAAU,KACZ;CACA,eAAe,EACb,YAAY,KACd;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;CACV;CACA,oBAAoB,EAClB,kBAAkB,OACpB;CACA,SAAS,EACP,sBAAsB,QACxB;CACA,aAAa,EACX,kCAAkC,cACpC;CACA,UAAU;EACR,qBAAqB;EACrB,eAAe;CACjB;CACA,uBAAuB,EACrB,iBAAiB,aACnB;CACA,eAAe;EACb,UAAU;EACV,UAAU;EACV,cAAc;EACd,iBAAiB;EACjB,kBAAkB;EAClB,cAAc;EACd,SAAS;EACT,QAAQ;CACV;CACA,yBAAyB,EACvB,QAAQ,KACV;CACA,yBAAyB;EACvB,QAAQ;EACR,OAAO;EACP,WAAW;CACb;CACA,sBAAsB,EACpB,eAAe,OACjB;CACA,gBAAgB;EACd,WAAW;EACX,OAAO;EACP,SAAS;CACX;CACA,mBAAmB;EACjB,OAAO;EACP,SAAS;EACT,UAAU;EACV,cAAc;EACd,oBAAoB;EACpB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,cAAc;EACd,aAAa;EACb,OAAO;CACT;CACA,uBAAuB;EACrB,OAAO;EACP,OAAO;EACP,WAAW;EACX,WAAW;EACX,mBAAmB;CACrB;CACA,WAAW;EACT,aAAa;EACb,eAAe;EACf,aAAa;CACf;CACA,gBAAgB,EACd,cAAc,QAChB;CACA,uBAAuB,EACrB,sBAAsB,OACxB;CACA,yBAAyB;EACvB,QAAQ;EACR,aAAa;EACb,UAAU;CACZ;CACA,sBAAsB;EACpB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B;EACvB,WAAW;CACb;CACA,eAAe;EACb,2BAA2B;EAC3B,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,2BAA2B;EAC3B,2BAA2B;CAC7B;CACA,4BAA4B,EAC1B,UAAU,YACZ;CACA,eAAe,EACb,UAAU,YACZ;AACF"}
|
|
1
|
+
{"version":3,"file":"zh-cn.js","names":[],"sources":["../../../../../src/v2/features/localization/locales/zh-cn.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** Built-in API Client translations for zh-cn. */\nexport const zhCn = {\n 'serverVariablesSelect': {\n 'selected': '已选择:',\n },\n 'serverVariablesTextbox': {\n 'value': '值',\n },\n 'sidebarListElementForm': {\n 'cancel': '取消',\n },\n 'requestBlock': {\n 'authentication': '身份验证',\n 'variables': '变量',\n 'cookies': 'Cookie',\n 'headers': '请求头',\n 'queryParameters': '查询参数',\n 'queryString': '查询字符串',\n 'queryStringDescription':\n '此参数提供完整的查询字符串,因此无法添加其他命名参数。现有命名参数将在其后发送;重复的键会被保留。',\n 'requestBody': '请求体',\n 'requestName': '请求名称',\n 'label': '请求:{name}',\n },\n 'responseBlock': {\n 'response': '响应',\n 'requestHeaders': '请求头',\n 'responseHeaders': '响应头',\n 'body': '正文',\n },\n 'codeInput': {\n 'required': '必填',\n 'exitHint': '按 {escape},然后按 {tab} 退出',\n },\n 'codeInputLite': {\n 'required': '必填',\n },\n 'dataTableInput': {\n 'clearValue': '清除值',\n 'showPassword': '显示密码',\n 'hidePassword': '隐藏密码',\n },\n 'dataTableInputSelect': {\n 'value': '值',\n 'addValue': '添加值',\n },\n 'confirmationForm': {\n 'cancel': '取消',\n 'save': '保存',\n },\n 'collapsibleSection': {\n 'collapsed': '(已折叠)',\n 'item': '项',\n 'items': '项',\n },\n 'modalClientContainer': {\n 'label': 'API 客户端',\n },\n 'serverDropdown': {\n 'server': '服务器:',\n 'addServer': '添加服务器',\n 'updateServers': '更新服务器',\n 'unknownServer': '未知服务器',\n },\n 'sidebar': {\n 'search': '搜索',\n },\n 'sidebarMenu': {\n 'settings': '设置',\n },\n 'sidebarToggle': {\n 'hide': '隐藏侧边栏',\n 'show': '显示侧边栏',\n },\n 'environmentsList': {\n 'addEnvironment': '添加环境',\n },\n 'modal': {\n 'noDocumentSelected': '未选择文档',\n },\n 'operation': {\n 'selectAnOperationToViewDetails': '选择一个操作以查看详情',\n },\n 'header': {\n 'operationSettings': '操作设置',\n 'closeClient': '关闭客户端',\n },\n 'openApiClientButton': {\n 'openAPIClient': '打开 API 客户端',\n },\n 'requestBody': {\n 'noBody': '无请求体',\n 'delete': '删除',\n 'selectFile': '选择文件',\n 'multipartForm': '多部分表单',\n 'formUrlEncoded': 'URL 编码表单',\n 'binaryFile': '二进制文件',\n 'other': '其他',\n 'none': '无',\n },\n 'requestBodyStructured': {\n 'body': '正文',\n },\n 'requestBodyViewToggle': {\n 'form': '表单',\n 'raw': '原始内容',\n 'fixBody': '修正请求体以切换到表单视图',\n },\n 'requestCodeSnippet': {\n unavailable: '此示例暂无可用的代码示例。',\n 'codeSnippet': '代码片段',\n },\n 'requestTable': {\n 'enabled': '已启用',\n 'key': '键',\n 'value': '值',\n },\n 'requestTableRow': {\n 'key': '键',\n 'value': '值',\n 'delete': '删除',\n 'selectFile': '选择文件',\n 'globalCookieHint': '全局 Cookie 在整个工作区中共享。点击前往查看。',\n 'readOnlyHint': '此属性为只读。若要更改,请覆盖该属性或通过复选框禁用它。',\n 'include': '在请求中包含 {name}',\n 'keyLabel': '{name} 的键',\n 'valueLabel': '{name} 的值',\n 'deleteRow': '删除 {name}',\n 'row': '行',\n },\n 'requestTableTooltip': {\n 'min': '最小值:',\n 'max': '最大值:',\n 'default': '默认值:',\n 'invalid': '输入无效',\n 'moreInformation': '更多信息',\n },\n 'headers': {\n 'headerKey': '头部键',\n 'headerValue': '头部值',\n 'noHeaders': '无头部',\n },\n 'responseBody': {\n 'binaryFile': '二进制文件',\n },\n 'responseBodyPreview': {\n 'previewUnavailable': '无法预览',\n },\n 'responseBodyStreaming': {\n 'body': '正文',\n 'listening': '正在监听…',\n 'cancel': '取消',\n },\n 'responseBodyToggle': {\n 'preview': '预览',\n 'raw': '原始内容',\n },\n 'responseBodyVirtual': {\n 'body': '正文',\n 'largeBodyHint': '此响应体过大,无法进行语法高亮。',\n },\n 'responseCookies': {\n 'cookies': 'Cookie',\n 'cookieName': 'Cookie 名称',\n 'cookieValue': 'Cookie 值',\n 'noCookies': '无 Cookie',\n },\n 'responseEmpty': {\n 'roadmap': '路线图',\n 'poweredByScalarcom': '由 Scalar.com 提供支持',\n 'getStarted': '开始使用',\n 'newRequest': '新建请求',\n 'sendRequest': '发送请求',\n 'version': 'Scalar App V{version} 测试版',\n },\n 'responseLoadingOverlay': {\n 'cancel': '取消',\n },\n 'addressBar': {\n 'path': '路径',\n 'copyUrl': '复制 URL',\n 'send': '发送',\n 'sendRequest': '向 {url} 发送 {method} 请求',\n 'duplicateRequest': '此文档中已存在发往 {path} 的 {method} 请求',\n 'urlPlaceholder': '输入 URL',\n 'webhookUrlPlaceholder': '输入完整的 Webhook URL,例如 https://example.com/hook',\n },\n 'addressBarHistory': {\n 'requestHistory': '请求历史',\n },\n 'environmentSelector': {\n 'noEnvironment': '无环境',\n 'notAvailableInThisContext': '在此上下文中不可用',\n 'environmentHint': '环境可帮助您管理不同上下文中的变量,例如 API 密钥和基础 URL。',\n 'add': '添加环境',\n 'select': '选择环境',\n 'unavailable': '{name}(不可用)',\n 'current': '当前环境:{name}',\n },\n 'deleteRequestAuthModal': {\n 'deleteSecurityScheme': '删除安全方案',\n 'cancel': '取消',\n 'delete': '删除',\n 'confirmation': '此操作无法撤销。您即将从集合中删除安全方案 {name}。',\n },\n 'oauth2': {\n deviceAuthorizationUrl: '设备授权 URL',\n deviceVerificationPrompt: '打开验证页面并输入此代码:',\n waitingForAuthorization: '正在等待授权…',\n cancelDeviceAuthorization: '取消',\n\n 'accessToken': '访问令牌',\n 'refreshUrl': '刷新 URL',\n 'refresh': '刷新',\n 'authUrl': '身份验证 URL',\n 'tokenUrl': '令牌 URL',\n 'redirectUrl': '重定向 URL',\n 'username': '用户名',\n 'password': '密码',\n 'clientID': '客户端 ID',\n 'clientSecret': '客户端密钥',\n 'usePKCE': '使用 PKCE',\n 'credentialsLocation': '凭据位置',\n 'authorize': '授权',\n 'clear': '清除',\n 'failedToauthorize': '授权失败',\n 'failedToRefreshToken': '刷新令牌失败',\n 'optionalRedirectUrl': '可选的重定向 URL',\n },\n 'oauthScopesAddModal': {\n 'name': '名称:',\n 'description': '描述:',\n 'readUserData': '读取用户数据',\n 'edit': '编辑权限范围',\n 'add': '添加权限范围',\n 'save': '保存',\n 'required': '权限范围名称为必填项。',\n 'duplicate': '名为“{name}”的权限范围已存在。',\n },\n 'oauthScopesInput': {\n 'noScopesDefined': '未定义权限范围',\n 'addScope': '添加权限范围',\n 'deselectAll': '取消全选',\n 'selectAll': '全选',\n 'selectedScopes': '已选权限范围:{count} / {total}',\n 'editScope': '编辑 {name}',\n 'deleteScope': '删除 {name}',\n 'selectScope': '选择权限范围 {name}',\n },\n 'openIdConnect': {\n 'discoveryUrl': '发现 URL',\n 'fetchConfiguration': '获取配置',\n 'failedToFetchConfiguration': '获取 OpenID Connect 配置失败',\n },\n 'requestAuthDataTable': {\n 'noauthenticationSelected': '未选择身份验证',\n },\n 'requestAuthTab': {\n 'token': '令牌',\n 'bearerToken': 'Bearer 令牌',\n 'getAToken': '获取令牌',\n 'refresh': '刷新',\n 'username': '用户名',\n 'password': '密码',\n 'name': '名称',\n 'value': '值',\n 'cancel': '取消',\n 'authorize': '授权',\n 'unsupportedCredentials': '浏览器客户端不会发送此 AsyncAPI 安全方案的凭据。',\n 'authorizeVia': '通过 {name} 授权',\n 'unsupportedType': '暂不支持 {type} 类型的安全方案。',\n 'missingType': '安全方案缺少类型,请检查您的 {type} 文档或身份验证配置。',\n 'failedToauthorize': '授权失败',\n 'failedToRefresh': '刷新失败',\n 'configure': '配置 {name}',\n 'mutualTlsHint': '双向 TLS 通过在 TLS 握手期间提供客户端证书来进行身份验证,因此无需在此输入任何内容。',\n },\n 'commandActionForm': {\n 'continue': '继续',\n },\n 'environment': {\n 'thisIsTheActiveEnvironment': '这是当前启用的环境',\n 'active': '已启用',\n 'editEnvironment': '编辑环境',\n 'deleteEnvironment': '删除环境',\n },\n 'environmentCreateModal': {\n 'environmentName': '环境名称',\n 'thisEnvironmentNameIsAlreadyInUse': '此环境名称已被使用。',\n 'update': '更新环境',\n 'add': '添加环境',\n },\n 'environmentDeleteModal': {\n 'cancel': '取消',\n 'deleteEnvironment': '删除环境',\n 'deleteConfirmation': '确定要删除此环境吗?此操作无法撤销。',\n 'title': '删除 {name}',\n },\n 'environmentVariablesDropdown': {\n 'variableSuggestions': '变量建议',\n 'addVariable': '添加变量',\n },\n 'environmentVariablesTable': {\n 'name': '名称',\n 'value': '值',\n 'actions': '操作',\n 'environmentVariableName': '环境变量名称',\n 'environmentVariableValue': '环境变量值',\n },\n 'documentSearchModal': {\n 'documentSearch': '文档搜索',\n 'documentSearchResults': '文档搜索结果',\n 'navigate': '↑↓ 导航',\n 'select': '⏎ 选择',\n 'keyboardInstructions': '按上箭头或下箭头导航,按回车选择,输入文本筛选结果',\n },\n 'searchResult': {\n 'httpMethod': 'HTTP 方法:',\n 'path': '路径:',\n 'description': '描述:',\n 'heading': '标题',\n 'operation': '操作',\n 'tag': '标签',\n },\n 'sectionFilter': {\n 'all': '全部',\n 'auth': '身份验证',\n 'variables': '变量',\n 'cookies': 'Cookie',\n 'headers': '头部',\n 'query': '查询',\n 'body': '正文',\n },\n 'requestParams': {\n 'clearAll': '清除所有{title}',\n 'clear': '清除',\n 'clearOptionalParameters': '清除可选参数',\n },\n 'responseBodyDownload': {\n 'download': '下载响应体',\n 'label': '下载',\n 'body': '响应体',\n },\n 'responseMetaInformation': {\n 'duration': '响应信息,耗时:',\n 'size': ',大小:',\n 'status': ',状态:',\n },\n 'authSelector': {\n 'selectedType': '已选身份验证类型:{type}',\n 'multipleTypes': '已选择多个身份验证类型',\n 'selectType': '选择身份验证类型',\n 'optional': '可选',\n 'required': '必填',\n 'deleteScheme': '删除 {name}',\n 'requiredGroup': '必需的身份验证',\n 'availableGroup': '可用的身份验证',\n 'addGroup': '添加身份验证',\n },\n 'operationBlock': {\n 'webhookUrlRequired': 'Webhook URL 为必填项。请先输入目标地址。',\n 'pathParametersRequired': '路径参数必须有值。',\n 'forbiddenMethod': 'Fetch API 无法发送 {method} 请求。',\n },\n 'dataTableCheckbox': {\n 'toggle': '切换',\n },\n 'pillTooltipHost': {\n 'computedAtExecution': '在执行请求时计算',\n 'noValue': '无值',\n },\n 'authOptions': {\n oauth2DeviceAuthorization: 'OAuth2 设备授权',\n 'apiKeyCookie': 'Cookie 中的 API 密钥',\n 'apiKeyHeader': '请求头中的 API 密钥',\n 'apiKeyQuery': '查询参数中的 API 密钥',\n 'httpBasic': 'HTTP Basic',\n 'httpBearer': 'HTTP Bearer',\n 'oauth2Implicit': 'OAuth2 隐式流程',\n 'oauth2Password': 'OAuth2 密码流程',\n 'oauth2ClientCredentials': 'OAuth2 客户端凭据',\n 'oauth2AuthorizationFlow': 'OAuth2 授权码',\n },\n 'deleteSidebarListElement': {\n 'delete': '删除 {name}',\n },\n 'deleteModal': {\n 'delete': '删除 {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,OAAO;CAClB,yBAAyB,EACvB,YAAY,OACd;CACA,0BAA0B,EACxB,SAAS,IACX;CACA,0BAA0B,EACxB,UAAU,KACZ;CACA,gBAAgB;EACd,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,WAAW;EACX,mBAAmB;EACnB,eAAe;EACf,0BACE;EACF,eAAe;EACf,eAAe;EACf,SAAS;CACX;CACA,iBAAiB;EACf,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;EACnB,QAAQ;CACV;CACA,aAAa;EACX,YAAY;EACZ,YAAY;CACd;CACA,iBAAiB,EACf,YAAY,KACd;CACA,kBAAkB;EAChB,cAAc;EACd,gBAAgB;EAChB,gBAAgB;CAClB;CACA,wBAAwB;EACtB,SAAS;EACT,YAAY;CACd;CACA,oBAAoB;EAClB,UAAU;EACV,QAAQ;CACV;CACA,sBAAsB;EACpB,aAAa;EACb,QAAQ;EACR,SAAS;CACX;CACA,wBAAwB,EACtB,SAAS,UACX;CACA,kBAAkB;EAChB,UAAU;EACV,aAAa;EACb,iBAAiB;EACjB,iBAAiB;CACnB;CACA,WAAW,EACT,UAAU,KACZ;CACA,eAAe,EACb,YAAY,KACd;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;CACV;CACA,oBAAoB,EAClB,kBAAkB,OACpB;CACA,SAAS,EACP,sBAAsB,QACxB;CACA,aAAa,EACX,kCAAkC,cACpC;CACA,UAAU;EACR,qBAAqB;EACrB,eAAe;CACjB;CACA,uBAAuB,EACrB,iBAAiB,aACnB;CACA,eAAe;EACb,UAAU;EACV,UAAU;EACV,cAAc;EACd,iBAAiB;EACjB,kBAAkB;EAClB,cAAc;EACd,SAAS;EACT,QAAQ;CACV;CACA,yBAAyB,EACvB,QAAQ,KACV;CACA,yBAAyB;EACvB,QAAQ;EACR,OAAO;EACP,WAAW;CACb;CACA,sBAAsB;EACpB,aAAa;EACb,eAAe;CACjB;CACA,gBAAgB;EACd,WAAW;EACX,OAAO;EACP,SAAS;CACX;CACA,mBAAmB;EACjB,OAAO;EACP,SAAS;EACT,UAAU;EACV,cAAc;EACd,oBAAoB;EACpB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,cAAc;EACd,aAAa;EACb,OAAO;CACT;CACA,uBAAuB;EACrB,OAAO;EACP,OAAO;EACP,WAAW;EACX,WAAW;EACX,mBAAmB;CACrB;CACA,WAAW;EACT,aAAa;EACb,eAAe;EACf,aAAa;CACf;CACA,gBAAgB,EACd,cAAc,QAChB;CACA,uBAAuB,EACrB,sBAAsB,OACxB;CACA,y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B;EAC1B,mBAAmB;CACrB;CACA,qBAAqB,EACnB,UAAU,KACZ;CACA,mBAAmB;EACjB,uBAAuB;EACvB,WAAW;CACb;CACA,eAAe;EACb,2BAA2B;EAC3B,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,kBAAkB;EAClB,2BAA2B;EAC3B,2BAA2B;CAC7B;CACA,4BAA4B,EAC1B,UAAU,YACZ;CACA,eAAe,EACb,UAAU,YACZ;AACF"}
|
|
@@ -15,6 +15,8 @@ export declare const en: {
|
|
|
15
15
|
cookies: string;
|
|
16
16
|
headers: string;
|
|
17
17
|
queryParameters: string;
|
|
18
|
+
queryString: string;
|
|
19
|
+
queryStringDescription: string;
|
|
18
20
|
requestBody: string;
|
|
19
21
|
requestName: string;
|
|
20
22
|
label: string;
|
|
@@ -104,6 +106,7 @@ export declare const en: {
|
|
|
104
106
|
fixBody: string;
|
|
105
107
|
};
|
|
106
108
|
requestCodeSnippet: {
|
|
109
|
+
unavailable: string;
|
|
107
110
|
codeSnippet: string;
|
|
108
111
|
};
|
|
109
112
|
requestTable: {
|
|
@@ -355,6 +358,7 @@ export declare const en: {
|
|
|
355
358
|
operationBlock: {
|
|
356
359
|
webhookUrlRequired: string;
|
|
357
360
|
pathParametersRequired: string;
|
|
361
|
+
forbiddenMethod: string;
|
|
358
362
|
};
|
|
359
363
|
dataTableCheckbox: {
|
|
360
364
|
toggle: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/localization/translations.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/localization/translations.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuYkB,CAAA"}
|
|
@@ -10,6 +10,8 @@ var en = {
|
|
|
10
10
|
cookies: "Cookies",
|
|
11
11
|
headers: "Headers",
|
|
12
12
|
queryParameters: "Query Parameters",
|
|
13
|
+
queryString: "Query String",
|
|
14
|
+
queryStringDescription: "This parameter supplies the entire query string, so additional named parameters cannot be added. Existing named parameters are sent after it; duplicate keys are preserved.",
|
|
13
15
|
requestBody: "Request Body",
|
|
14
16
|
requestName: "Request Name",
|
|
15
17
|
label: "Request: {name}"
|
|
@@ -80,7 +82,10 @@ var en = {
|
|
|
80
82
|
raw: "Raw",
|
|
81
83
|
fixBody: "Fix the body to switch to the form view"
|
|
82
84
|
},
|
|
83
|
-
requestCodeSnippet: {
|
|
85
|
+
requestCodeSnippet: {
|
|
86
|
+
unavailable: "No code sample available for this example.",
|
|
87
|
+
codeSnippet: "Code Snippet"
|
|
88
|
+
},
|
|
84
89
|
requestTable: {
|
|
85
90
|
enabled: "Enabled",
|
|
86
91
|
key: "Key",
|
|
@@ -317,7 +322,8 @@ var en = {
|
|
|
317
322
|
},
|
|
318
323
|
operationBlock: {
|
|
319
324
|
webhookUrlRequired: "Webhook URL required. Enter a destination first.",
|
|
320
|
-
pathParametersRequired: "Path parameters must have values."
|
|
325
|
+
pathParametersRequired: "Path parameters must have values.",
|
|
326
|
+
forbiddenMethod: "The Fetch API cannot send {method} requests."
|
|
321
327
|
},
|
|
322
328
|
dataTableCheckbox: { toggle: "Toggle" },
|
|
323
329
|
pillTooltipHost: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.js","names":[],"sources":["../../../../src/v2/features/localization/translations.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** English fallback for API Client UI strings. */\nexport const en = {\n serverVariablesSelect: {\n selected: 'Selected:',\n },\n serverVariablesTextbox: {\n value: 'value',\n },\n sidebarListElementForm: {\n cancel: 'Cancel',\n },\n requestBlock: {\n authentication: 'Authentication',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n queryParameters: 'Query Parameters',\n requestBody: 'Request Body',\n requestName: 'Request Name',\n label: 'Request: {name}',\n },\n responseBlock: {\n response: 'Response',\n requestHeaders: 'Request Headers',\n responseHeaders: 'Response Headers',\n body: 'Body',\n },\n codeInput: {\n required: 'Required',\n exitHint: 'Press {escape} then {tab} to exit',\n },\n codeInputLite: {\n required: 'Required',\n },\n dataTableInput: {\n clearValue: 'Clear Value',\n showPassword: 'Show Password',\n hidePassword: 'Hide Password',\n },\n dataTableInputSelect: {\n value: 'Value',\n addValue: 'Add value',\n },\n confirmationForm: {\n cancel: 'Cancel',\n save: 'Save',\n },\n collapsibleSection: {\n collapsed: '(Collapsed)',\n item: 'Item',\n items: 'Items',\n },\n modalClientContainer: {\n label: 'API Client',\n },\n serverDropdown: {\n server: 'Server:',\n addServer: 'Add Server',\n updateServers: 'Update Servers',\n unknownServer: 'Unknown server',\n },\n sidebar: {\n search: 'Search',\n },\n sidebarMenu: {\n settings: 'Settings',\n },\n sidebarToggle: {\n hide: 'Hide sidebar',\n show: 'Show sidebar',\n },\n environmentsList: {\n addEnvironment: 'Add Environment',\n },\n modal: {\n noDocumentSelected: 'No document selected',\n },\n operation: {\n selectAnOperationToViewDetails: 'Select an operation to view details',\n },\n header: {\n operationSettings: 'Operation settings',\n closeClient: 'Close Client',\n },\n openApiClientButton: {\n openAPIClient: 'Open API Client',\n },\n requestBody: {\n noBody: 'No Body',\n delete: 'Delete',\n selectFile: 'Select File',\n multipartForm: 'Multipart Form',\n formUrlEncoded: 'Form URL Encoded',\n binaryFile: 'Binary File',\n other: 'Other',\n none: 'None',\n },\n requestBodyStructured: {\n body: 'Body',\n },\n requestBodyViewToggle: {\n form: 'Form',\n raw: 'Raw',\n fixBody: 'Fix the body to switch to the form view',\n },\n requestCodeSnippet: {\n codeSnippet: 'Code Snippet',\n },\n requestTable: {\n enabled: 'Enabled',\n key: 'Key',\n value: 'Value',\n },\n requestTableRow: {\n key: 'Key',\n value: 'Value',\n delete: 'Delete',\n selectFile: 'Select File',\n globalCookieHint: 'Global cookies are shared across the whole workspace. Click to navigate.',\n readOnlyHint:\n 'This is a readonly property and you can not modify it! If you want to change it you have to override it or disable it using the checkbox',\n include: 'Include {name} in request',\n keyLabel: '{name} Key',\n valueLabel: '{name} Value',\n deleteRow: 'Delete {name}',\n row: 'row',\n },\n requestTableTooltip: {\n min: 'min:',\n max: 'max:',\n default: 'default:',\n invalid: 'Input is invalid',\n moreInformation: 'More Information',\n },\n headers: {\n headerKey: 'Header Key',\n headerValue: 'Header Value',\n noHeaders: 'No headers',\n },\n responseBody: {\n binaryFile: 'Binary file',\n },\n responseBodyPreview: {\n previewUnavailable: 'Preview unavailable',\n },\n responseBodyStreaming: {\n body: 'Body',\n listening: 'Listening\\u2026',\n cancel: 'Cancel',\n },\n responseBodyToggle: {\n preview: 'Preview',\n raw: 'Raw',\n },\n responseBodyVirtual: {\n body: 'Body',\n largeBodyHint: \"This response body is massive! Syntax highlighting won't work here.\",\n },\n responseCookies: {\n cookies: 'Cookies',\n cookieName: 'Cookie Name',\n cookieValue: 'Cookie Value',\n noCookies: 'No cookies',\n },\n responseEmpty: {\n roadmap: 'Roadmap',\n poweredByScalarcom: 'Powered By Scalar.com',\n getStarted: 'Get Started',\n newRequest: 'New Request',\n sendRequest: 'Send Request',\n version: 'Scalar App V{version} Beta',\n },\n responseLoadingOverlay: {\n cancel: 'Cancel',\n },\n addressBar: {\n path: 'Path',\n copyUrl: 'Copy URL',\n send: 'Send',\n sendRequest: 'Send {method} request to {url}',\n duplicateRequest: 'A {method} request to {path} already exists in this document',\n urlPlaceholder: 'Enter a URL',\n webhookUrlPlaceholder: 'Enter the full webhook URL, e.g. https://example.com/hook',\n },\n addressBarHistory: {\n requestHistory: 'Request History',\n },\n environmentSelector: {\n noEnvironment: 'No Environment',\n notAvailableInThisContext: 'Not available in this context',\n environmentHint: 'Environments let you manage variables like API keys and base URLs across different contexts.',\n add: 'Add Environment',\n select: 'Select Environment',\n unavailable: '{name} (Unavailable)',\n current: 'Current environment: {name}',\n },\n deleteRequestAuthModal: {\n deleteSecurityScheme: 'Delete Security Scheme',\n cancel: 'Cancel',\n delete: 'Delete',\n confirmation: \"This cannot be undone. You're about to delete the {name} security scheme from the collection.\",\n },\n oauth2: {\n deviceAuthorizationUrl: 'Device Authorization URL',\n deviceVerificationPrompt: 'Open the verification page and enter this code:',\n waitingForAuthorization: 'Waiting for authorization…',\n cancelDeviceAuthorization: 'Cancel',\n\n accessToken: 'Access Token',\n refreshUrl: 'Refresh URL',\n refresh: 'Refresh',\n authUrl: 'Auth URL',\n tokenUrl: 'Token URL',\n redirectUrl: 'Redirect URL',\n username: 'Username',\n password: 'Password',\n clientID: 'Client ID',\n clientSecret: 'Client Secret',\n usePKCE: 'Use PKCE',\n credentialsLocation: 'Credentials Location',\n authorize: 'Authorize',\n clear: 'Clear',\n failedToauthorize: 'Failed to authorize',\n failedToRefreshToken: 'Failed to refresh token',\n optionalRedirectUrl: 'Optional redirect URL',\n },\n oauthScopesAddModal: {\n name: 'Name:',\n description: 'Description:',\n readUserData: 'Read user data',\n edit: 'Edit Scope',\n add: 'Add Scope',\n save: 'Save',\n required: 'Scope name is required.',\n duplicate: 'A scope named \"{name}\" already exists.',\n },\n oauthScopesInput: {\n noScopesDefined: 'No Scopes Defined',\n addScope: 'Add Scope',\n deselectAll: 'Deselect All',\n selectAll: 'Select All',\n selectedScopes: 'Scopes Selected {count} / {total}',\n editScope: 'Edit {name}',\n deleteScope: 'Delete {name}',\n selectScope: 'Select {name} scope',\n },\n openIdConnect: {\n discoveryUrl: 'Discovery URL',\n fetchConfiguration: 'Fetch Configuration',\n failedToFetchConfiguration: 'Failed to fetch OpenID Connect configuration',\n },\n requestAuthDataTable: {\n noauthenticationSelected: 'No authentication selected',\n },\n requestAuthTab: {\n token: 'Token',\n bearerToken: 'Bearer Token',\n getAToken: 'Get a token',\n refresh: 'Refresh',\n username: 'Username',\n password: 'Password',\n name: 'Name',\n value: 'Value',\n cancel: 'Cancel',\n authorize: 'Authorize',\n unsupportedCredentials: 'Credentials for this AsyncAPI security scheme are not sent by the browser client.',\n authorizeVia: 'Authorize via {name}',\n unsupportedType: 'The {type} security scheme type is not supported yet.',\n missingType:\n 'The security scheme is missing a type, please double check your {type} document or Authentication Configuration',\n failedToauthorize: 'Failed to authorize',\n failedToRefresh: 'Failed to refresh',\n configure: 'Configure {name}',\n mutualTlsHint:\n 'Mutual TLS authenticates with a client certificate presented during the TLS handshake, so there is nothing to enter here.',\n },\n commandActionForm: {\n continue: 'Continue',\n },\n environment: {\n thisIsTheActiveEnvironment: 'This is the active environment',\n active: 'Active',\n editEnvironment: 'Edit Environment',\n deleteEnvironment: 'Delete Environment',\n },\n environmentCreateModal: {\n environmentName: 'Environment name',\n thisEnvironmentNameIsAlreadyInUse: 'This environment name is already in use.',\n update: 'Update Environment',\n add: 'Add Environment',\n },\n environmentDeleteModal: {\n cancel: 'Cancel',\n deleteEnvironment: 'Delete Environment',\n deleteConfirmation: 'Are you sure you want to delete this environment? This action cannot be undone.',\n title: 'Delete {name}',\n },\n environmentVariablesDropdown: {\n variableSuggestions: 'Variable suggestions',\n addVariable: 'Add Variable',\n },\n environmentVariablesTable: {\n name: 'Name',\n value: 'Value',\n actions: 'Actions',\n environmentVariableName: 'Environment Variable Name',\n environmentVariableValue: 'Environment Variable Value',\n },\n documentSearchModal: {\n documentSearch: 'Document Search',\n documentSearchResults: 'Document Search Results',\n navigate: '\\u2191\\u2193 Navigate',\n select: '\\u23ce Select',\n keyboardInstructions: 'Press up arrow / down arrow to navigate, enter to select, type to filter results',\n },\n searchResult: {\n httpMethod: 'HTTP Method:',\n path: 'Path:',\n description: 'Description:',\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n },\n sectionFilter: {\n all: 'All',\n auth: 'Auth',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n query: 'Query',\n body: 'Body',\n },\n requestParams: {\n clearAll: 'Clear All {title}',\n clear: 'Clear',\n clearOptionalParameters: 'Clear optional parameters',\n },\n responseBodyDownload: {\n download: 'Download Response Body',\n label: 'Download',\n body: 'Response Body',\n },\n responseMetaInformation: {\n duration: 'Response Information, Duration:',\n size: ', Size:',\n status: ', Status:',\n },\n authSelector: {\n selectedType: 'Selected Auth Type: {type}',\n multipleTypes: 'Multiple Auth Types Selected',\n selectType: 'Select Auth Type',\n optional: 'Optional',\n required: 'Required',\n deleteScheme: 'Delete {name}',\n requiredGroup: 'Required authentication',\n availableGroup: 'Available authentication',\n addGroup: 'Add new authentication',\n },\n operationBlock: {\n webhookUrlRequired: 'Webhook URL required. Enter a destination first.',\n pathParametersRequired: 'Path parameters must have values.',\n },\n dataTableCheckbox: {\n toggle: 'Toggle',\n },\n pillTooltipHost: {\n computedAtExecution: 'Computed at request execution',\n noValue: 'No value',\n },\n authOptions: {\n oauth2DeviceAuthorization: 'OAuth2 Device Authorization',\n apiKeyCookie: 'API Key in Cookies',\n apiKeyHeader: 'API Key in Headers',\n apiKeyQuery: 'API Key in Query Params',\n httpBasic: 'HTTP Basic',\n httpBearer: 'HTTP Bearer',\n oauth2Implicit: 'Oauth2 Implicit Flow',\n oauth2Password: 'Oauth2 Password Flow',\n oauth2ClientCredentials: 'Oauth2 Client Credentials',\n oauth2AuthorizationFlow: 'Oauth2 Authorization Code',\n },\n deleteSidebarListElement: {\n delete: 'Delete {name}',\n },\n deleteModal: {\n delete: 'Delete {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,KAAK;CAChB,uBAAuB,EACrB,UAAU,YACZ;CACA,wBAAwB,EACtB,OAAO,QACT;CACA,wBAAwB,EACtB,QAAQ,SACV;CACA,cAAc;EACZ,gBAAgB;EAChB,WAAW;EACX,SAAS;EACT,SAAS;EACT,iBAAiB;EACjB,aAAa;EACb,aAAa;EACb,OAAO;CACT;CACA,eAAe;EACb,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;CACA,WAAW;EACT,UAAU;EACV,UAAU;CACZ;CACA,eAAe,EACb,UAAU,WACZ;CACA,gBAAgB;EACd,YAAY;EACZ,cAAc;EACd,cAAc;CAChB;CACA,sBAAsB;EACpB,OAAO;EACP,UAAU;CACZ;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;CACR;CACA,oBAAoB;EAClB,WAAW;EACX,MAAM;EACN,OAAO;CACT;CACA,sBAAsB,EACpB,OAAO,aACT;CACA,gBAAgB;EACd,QAAQ;EACR,WAAW;EACX,eAAe;EACf,eAAe;CACjB;CACA,SAAS,EACP,QAAQ,SACV;CACA,aAAa,EACX,UAAU,WACZ;CACA,eAAe;EACb,MAAM;EACN,MAAM;CACR;CACA,kBAAkB,EAChB,gBAAgB,kBAClB;CACA,OAAO,EACL,oBAAoB,uBACtB;CACA,WAAW,EACT,gCAAgC,sCAClC;CACA,QAAQ;EACN,mBAAmB;EACnB,aAAa;CACf;CACA,qBAAqB,EACnB,eAAe,kBACjB;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,YAAY;EACZ,OAAO;EACP,MAAM;CACR;CACA,uBAAuB,EACrB,MAAM,OACR;CACA,uBAAuB;EACrB,MAAM;EACN,KAAK;EACL,SAAS;CACX;CACA,oBAAoB,EA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M;CACR;CACA,eAAe;EACb,UAAU;EACV,OAAO;EACP,yBAAyB;CAC3B;CACA,sBAAsB;EACpB,UAAU;EACV,OAAO;EACP,MAAM;CACR;CACA,yBAAyB;EACvB,UAAU;EACV,MAAM;EACN,QAAQ;CACV;CACA,cAAc;EACZ,cAAc;EACd,eAAe;EACf,YAAY;EACZ,UAAU;EACV,UAAU;EACV,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,UAAU;CACZ;CACA,gBAAgB;EACd,oBAAoB;EACpB,wBAAwB;CAC1B;CACA,mBAAmB,EACjB,QAAQ,SACV;CACA,iBAAiB;EACf,qBAAqB;EACrB,SAAS;CACX;CACA,aAAa;EACX,2BAA2B;EAC3B,cAAc;EACd,cAAc;EACd,aAAa;EACb,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,yBAAyB;EACzB,yBAAyB;CAC3B;CACA,0BAA0B,EACxB,QAAQ,gBACV;CACA,aAAa,EACX,QAAQ,gBACV;AACF"}
|
|
1
|
+
{"version":3,"file":"translations.js","names":[],"sources":["../../../../src/v2/features/localization/translations.ts"],"sourcesContent":["import type { ApiClientTranslations } from '@scalar/types/api-reference'\n\n/** English fallback for API Client UI strings. */\nexport const en = {\n serverVariablesSelect: {\n selected: 'Selected:',\n },\n serverVariablesTextbox: {\n value: 'value',\n },\n sidebarListElementForm: {\n cancel: 'Cancel',\n },\n requestBlock: {\n authentication: 'Authentication',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n queryParameters: 'Query Parameters',\n queryString: 'Query String',\n queryStringDescription:\n 'This parameter supplies the entire query string, so additional named parameters cannot be added. Existing named parameters are sent after it; duplicate keys are preserved.',\n requestBody: 'Request Body',\n requestName: 'Request Name',\n label: 'Request: {name}',\n },\n responseBlock: {\n response: 'Response',\n requestHeaders: 'Request Headers',\n responseHeaders: 'Response Headers',\n body: 'Body',\n },\n codeInput: {\n required: 'Required',\n exitHint: 'Press {escape} then {tab} to exit',\n },\n codeInputLite: {\n required: 'Required',\n },\n dataTableInput: {\n clearValue: 'Clear Value',\n showPassword: 'Show Password',\n hidePassword: 'Hide Password',\n },\n dataTableInputSelect: {\n value: 'Value',\n addValue: 'Add value',\n },\n confirmationForm: {\n cancel: 'Cancel',\n save: 'Save',\n },\n collapsibleSection: {\n collapsed: '(Collapsed)',\n item: 'Item',\n items: 'Items',\n },\n modalClientContainer: {\n label: 'API Client',\n },\n serverDropdown: {\n server: 'Server:',\n addServer: 'Add Server',\n updateServers: 'Update Servers',\n unknownServer: 'Unknown server',\n },\n sidebar: {\n search: 'Search',\n },\n sidebarMenu: {\n settings: 'Settings',\n },\n sidebarToggle: {\n hide: 'Hide sidebar',\n show: 'Show sidebar',\n },\n environmentsList: {\n addEnvironment: 'Add Environment',\n },\n modal: {\n noDocumentSelected: 'No document selected',\n },\n operation: {\n selectAnOperationToViewDetails: 'Select an operation to view details',\n },\n header: {\n operationSettings: 'Operation settings',\n closeClient: 'Close Client',\n },\n openApiClientButton: {\n openAPIClient: 'Open API Client',\n },\n requestBody: {\n noBody: 'No Body',\n delete: 'Delete',\n selectFile: 'Select File',\n multipartForm: 'Multipart Form',\n formUrlEncoded: 'Form URL Encoded',\n binaryFile: 'Binary File',\n other: 'Other',\n none: 'None',\n },\n requestBodyStructured: {\n body: 'Body',\n },\n requestBodyViewToggle: {\n form: 'Form',\n raw: 'Raw',\n fixBody: 'Fix the body to switch to the form view',\n },\n requestCodeSnippet: {\n unavailable: 'No code sample available for this example.',\n codeSnippet: 'Code Snippet',\n },\n requestTable: {\n enabled: 'Enabled',\n key: 'Key',\n value: 'Value',\n },\n requestTableRow: {\n key: 'Key',\n value: 'Value',\n delete: 'Delete',\n selectFile: 'Select File',\n globalCookieHint: 'Global cookies are shared across the whole workspace. Click to navigate.',\n readOnlyHint:\n 'This is a readonly property and you can not modify it! If you want to change it you have to override it or disable it using the checkbox',\n include: 'Include {name} in request',\n keyLabel: '{name} Key',\n valueLabel: '{name} Value',\n deleteRow: 'Delete {name}',\n row: 'row',\n },\n requestTableTooltip: {\n min: 'min:',\n max: 'max:',\n default: 'default:',\n invalid: 'Input is invalid',\n moreInformation: 'More Information',\n },\n headers: {\n headerKey: 'Header Key',\n headerValue: 'Header Value',\n noHeaders: 'No headers',\n },\n responseBody: {\n binaryFile: 'Binary file',\n },\n responseBodyPreview: {\n previewUnavailable: 'Preview unavailable',\n },\n responseBodyStreaming: {\n body: 'Body',\n listening: 'Listening\\u2026',\n cancel: 'Cancel',\n },\n responseBodyToggle: {\n preview: 'Preview',\n raw: 'Raw',\n },\n responseBodyVirtual: {\n body: 'Body',\n largeBodyHint: \"This response body is massive! Syntax highlighting won't work here.\",\n },\n responseCookies: {\n cookies: 'Cookies',\n cookieName: 'Cookie Name',\n cookieValue: 'Cookie Value',\n noCookies: 'No cookies',\n },\n responseEmpty: {\n roadmap: 'Roadmap',\n poweredByScalarcom: 'Powered By Scalar.com',\n getStarted: 'Get Started',\n newRequest: 'New Request',\n sendRequest: 'Send Request',\n version: 'Scalar App V{version} Beta',\n },\n responseLoadingOverlay: {\n cancel: 'Cancel',\n },\n addressBar: {\n path: 'Path',\n copyUrl: 'Copy URL',\n send: 'Send',\n sendRequest: 'Send {method} request to {url}',\n duplicateRequest: 'A {method} request to {path} already exists in this document',\n urlPlaceholder: 'Enter a URL',\n webhookUrlPlaceholder: 'Enter the full webhook URL, e.g. https://example.com/hook',\n },\n addressBarHistory: {\n requestHistory: 'Request History',\n },\n environmentSelector: {\n noEnvironment: 'No Environment',\n notAvailableInThisContext: 'Not available in this context',\n environmentHint: 'Environments let you manage variables like API keys and base URLs across different contexts.',\n add: 'Add Environment',\n select: 'Select Environment',\n unavailable: '{name} (Unavailable)',\n current: 'Current environment: {name}',\n },\n deleteRequestAuthModal: {\n deleteSecurityScheme: 'Delete Security Scheme',\n cancel: 'Cancel',\n delete: 'Delete',\n confirmation: \"This cannot be undone. You're about to delete the {name} security scheme from the collection.\",\n },\n oauth2: {\n deviceAuthorizationUrl: 'Device Authorization URL',\n deviceVerificationPrompt: 'Open the verification page and enter this code:',\n waitingForAuthorization: 'Waiting for authorization…',\n cancelDeviceAuthorization: 'Cancel',\n\n accessToken: 'Access Token',\n refreshUrl: 'Refresh URL',\n refresh: 'Refresh',\n authUrl: 'Auth URL',\n tokenUrl: 'Token URL',\n redirectUrl: 'Redirect URL',\n username: 'Username',\n password: 'Password',\n clientID: 'Client ID',\n clientSecret: 'Client Secret',\n usePKCE: 'Use PKCE',\n credentialsLocation: 'Credentials Location',\n authorize: 'Authorize',\n clear: 'Clear',\n failedToauthorize: 'Failed to authorize',\n failedToRefreshToken: 'Failed to refresh token',\n optionalRedirectUrl: 'Optional redirect URL',\n },\n oauthScopesAddModal: {\n name: 'Name:',\n description: 'Description:',\n readUserData: 'Read user data',\n edit: 'Edit Scope',\n add: 'Add Scope',\n save: 'Save',\n required: 'Scope name is required.',\n duplicate: 'A scope named \"{name}\" already exists.',\n },\n oauthScopesInput: {\n noScopesDefined: 'No Scopes Defined',\n addScope: 'Add Scope',\n deselectAll: 'Deselect All',\n selectAll: 'Select All',\n selectedScopes: 'Scopes Selected {count} / {total}',\n editScope: 'Edit {name}',\n deleteScope: 'Delete {name}',\n selectScope: 'Select {name} scope',\n },\n openIdConnect: {\n discoveryUrl: 'Discovery URL',\n fetchConfiguration: 'Fetch Configuration',\n failedToFetchConfiguration: 'Failed to fetch OpenID Connect configuration',\n },\n requestAuthDataTable: {\n noauthenticationSelected: 'No authentication selected',\n },\n requestAuthTab: {\n token: 'Token',\n bearerToken: 'Bearer Token',\n getAToken: 'Get a token',\n refresh: 'Refresh',\n username: 'Username',\n password: 'Password',\n name: 'Name',\n value: 'Value',\n cancel: 'Cancel',\n authorize: 'Authorize',\n unsupportedCredentials: 'Credentials for this AsyncAPI security scheme are not sent by the browser client.',\n authorizeVia: 'Authorize via {name}',\n unsupportedType: 'The {type} security scheme type is not supported yet.',\n missingType:\n 'The security scheme is missing a type, please double check your {type} document or Authentication Configuration',\n failedToauthorize: 'Failed to authorize',\n failedToRefresh: 'Failed to refresh',\n configure: 'Configure {name}',\n mutualTlsHint:\n 'Mutual TLS authenticates with a client certificate presented during the TLS handshake, so there is nothing to enter here.',\n },\n commandActionForm: {\n continue: 'Continue',\n },\n environment: {\n thisIsTheActiveEnvironment: 'This is the active environment',\n active: 'Active',\n editEnvironment: 'Edit Environment',\n deleteEnvironment: 'Delete Environment',\n },\n environmentCreateModal: {\n environmentName: 'Environment name',\n thisEnvironmentNameIsAlreadyInUse: 'This environment name is already in use.',\n update: 'Update Environment',\n add: 'Add Environment',\n },\n environmentDeleteModal: {\n cancel: 'Cancel',\n deleteEnvironment: 'Delete Environment',\n deleteConfirmation: 'Are you sure you want to delete this environment? This action cannot be undone.',\n title: 'Delete {name}',\n },\n environmentVariablesDropdown: {\n variableSuggestions: 'Variable suggestions',\n addVariable: 'Add Variable',\n },\n environmentVariablesTable: {\n name: 'Name',\n value: 'Value',\n actions: 'Actions',\n environmentVariableName: 'Environment Variable Name',\n environmentVariableValue: 'Environment Variable Value',\n },\n documentSearchModal: {\n documentSearch: 'Document Search',\n documentSearchResults: 'Document Search Results',\n navigate: '\\u2191\\u2193 Navigate',\n select: '\\u23ce Select',\n keyboardInstructions: 'Press up arrow / down arrow to navigate, enter to select, type to filter results',\n },\n searchResult: {\n httpMethod: 'HTTP Method:',\n path: 'Path:',\n description: 'Description:',\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n },\n sectionFilter: {\n all: 'All',\n auth: 'Auth',\n variables: 'Variables',\n cookies: 'Cookies',\n headers: 'Headers',\n query: 'Query',\n body: 'Body',\n },\n requestParams: {\n clearAll: 'Clear All {title}',\n clear: 'Clear',\n clearOptionalParameters: 'Clear optional parameters',\n },\n responseBodyDownload: {\n download: 'Download Response Body',\n label: 'Download',\n body: 'Response Body',\n },\n responseMetaInformation: {\n duration: 'Response Information, Duration:',\n size: ', Size:',\n status: ', Status:',\n },\n authSelector: {\n selectedType: 'Selected Auth Type: {type}',\n multipleTypes: 'Multiple Auth Types Selected',\n selectType: 'Select Auth Type',\n optional: 'Optional',\n required: 'Required',\n deleteScheme: 'Delete {name}',\n requiredGroup: 'Required authentication',\n availableGroup: 'Available authentication',\n addGroup: 'Add new authentication',\n },\n operationBlock: {\n webhookUrlRequired: 'Webhook URL required. Enter a destination first.',\n pathParametersRequired: 'Path parameters must have values.',\n forbiddenMethod: 'The Fetch API cannot send {method} requests.',\n },\n dataTableCheckbox: {\n toggle: 'Toggle',\n },\n pillTooltipHost: {\n computedAtExecution: 'Computed at request execution',\n noValue: 'No value',\n },\n authOptions: {\n oauth2DeviceAuthorization: 'OAuth2 Device Authorization',\n apiKeyCookie: 'API Key in Cookies',\n apiKeyHeader: 'API Key in Headers',\n apiKeyQuery: 'API Key in Query Params',\n httpBasic: 'HTTP Basic',\n httpBearer: 'HTTP Bearer',\n oauth2Implicit: 'Oauth2 Implicit Flow',\n oauth2Password: 'Oauth2 Password Flow',\n oauth2ClientCredentials: 'Oauth2 Client Credentials',\n oauth2AuthorizationFlow: 'Oauth2 Authorization Code',\n },\n deleteSidebarListElement: {\n delete: 'Delete {name}',\n },\n deleteModal: {\n delete: 'Delete {name}',\n },\n} satisfies ApiClientTranslations\n"],"mappings":";;AAGA,IAAa,KAAK;CAChB,uBAAuB,EACrB,UAAU,YACZ;CACA,wBAAwB,EACtB,OAAO,QACT;CACA,wBAAwB,EACtB,QAAQ,SACV;CACA,cAAc;EACZ,gBAAgB;EAChB,WAAW;EACX,SAAS;EACT,SAAS;EACT,iBAAiB;EACjB,aAAa;EACb,wBACE;EACF,aAAa;EACb,aAAa;EACb,OAAO;CACT;CACA,eAAe;EACb,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,MAAM;CACR;CACA,WAAW;EACT,UAAU;EACV,UAAU;CACZ;CACA,eAAe,EACb,UAAU,WACZ;CACA,gBAAgB;EACd,YAAY;EACZ,cAAc;EACd,cAAc;CAChB;CACA,sBAAsB;EACpB,OAAO;EACP,UAAU;CACZ;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;CACR;CACA,oBAAoB;EAClB,WAAW;EACX,MAAM;EACN,OAAO;CACT;CACA,sBAAsB,EACpB,OAAO,aACT;CACA,gBAAgB;EACd,QAAQ;EACR,WAAW;EACX,eAAe;EACf,eAAe;CACjB;CACA,SAAS,EACP,QAAQ,SACV;CACA,aAAa,EACX,UAAU,WACZ;CACA,eAAe;EACb,MAAM;EACN,MAAM;CACR;CACA,kBAAkB,EAChB,gBAAgB,kBAClB;CACA,OAAO,EACL,oBAAoB,uBACtB;CACA,WAAW,EACT,gCAAgC,sCAClC;CACA,QAAQ;EACN,mBAAmB;EACnB,aAAa;CACf;CACA,qBAAqB,EACnB,eAAe,kBACjB;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,YAAY;EACZ,OAAO;EACP,MAAM;CACR;CACA,uBAAuB,EACrB,MAAM,OACR;CACA,uBAAuB;EACrB,MAAM;EACN,KAAK;EACL,SAAS;CACX;CACA,oBAAoB;EAClB,aAAa;EACb,aAAa;CACf;CACA,cAAc;EACZ,SAAS;EACT,KAAK;EACL,OAAO;CACT;CACA,iBAAiB;EACf,KAAK;EACL,OAAO;EACP,QAAQ;EACR,YAAY;EACZ,kBAAkB;EAClB,cACE;EACF,SAAS;EACT,UAAU;EACV,YAAY;EACZ,WAAW;EACX,KAAK;CACP;CACA,qBAAqB;EACnB,KAAK;EACL,KAAK;EACL,SAAS;EACT,SAAS;EACT,iBAAiB;CACnB;CACA,SAAS;EACP,WAAW;EACX,aAAa;EACb,WAAW;CACb;CACA,cAAc,EACZ,YAAY,cACd;CACA,qBAAqB,EACnB,oBAAoB,sBACtB;CACA,uBAAuB;EACrB,MAAM;EACN,WAAW;EACX,QAAQ;CACV;CACA,oBAAoB;EAClB,SAAS;EACT,KAAK;CACP;CACA,qBAAqB;EACnB,MAAM;EACN,eAAe;CACjB;CACA,iBAAiB;EACf,SAAS;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AyB;CAC3B;CACA,0BAA0B,EACxB,QAAQ,gBACV;CACA,aAAa,EACX,QAAQ,gBACV;AACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ModalState } from '@scalar/components/modal';
|
|
2
|
-
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
3
2
|
import type { ClientPlugin } from '@scalar/oas-utils/helpers';
|
|
4
3
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
5
4
|
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
@@ -17,7 +16,7 @@ export type ModalProps = {
|
|
|
17
16
|
/** The event bus for handling all events */
|
|
18
17
|
eventBus: WorkspaceEventBus;
|
|
19
18
|
/** The method must be initialized and passed in */
|
|
20
|
-
method: ComputedRef<
|
|
19
|
+
method: ComputedRef<string | undefined>;
|
|
21
20
|
/** The example name must be initialized and passed in */
|
|
22
21
|
exampleName: ComputedRef<string | undefined>;
|
|
23
22
|
/** Whether the active route resolves from `document.webhooks`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AA2NA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,GAAG,EACT,MAAM,KAAK,CAAA;AAKZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAKxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAG/E,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qGAAqG;IACrG,QAAQ,EAAE,WAAW,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;IAC7C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACvC,yDAAyD;IACzD,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,kEAAkE;IAClE,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC/B,sEAAsE;IACtE,+BAA+B,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC5D,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,0DAA0D;IAC1D,YAAY,EAAE,qBAAqB,CAAA;IACnC,iDAAiD;IACjD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;CAC5C,CAAA;AAED;;;;GAIG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;aAC0C,mBAAmB;;;;;aAAnB,mBAAmB;iGA8R3E,CAAC"}
|
|
@@ -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<
|
|
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 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 <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.script.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<
|
|
1
|
+
{"version":3,"file":"Modal.vue.script.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 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 <SidebarToggle\n v-model=\"isSidebarOpen\"\n class=\"absolute top-2 left-4 z-10 max-md:top-4\" />\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,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;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;wBAGL,mBAMM,OANN,YAMM,CAHJ,mBAES,QAFT,YAES,gBADP,MAAA,SAAA,CAAS,CAAA,oCAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
1
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
2
|
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
4
3
|
/**
|
|
@@ -11,7 +10,7 @@ import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'
|
|
|
11
10
|
export type RoutePayload = {
|
|
12
11
|
/** API path, or webhook name when `isWebhook` is true. */
|
|
13
12
|
path?: string;
|
|
14
|
-
method?:
|
|
13
|
+
method?: string;
|
|
15
14
|
example?: string;
|
|
16
15
|
documentSlug?: string;
|
|
17
16
|
/** Resolve `path` from the OpenAPI webhooks map. */
|
|
@@ -55,7 +54,7 @@ export declare const resolvePath: (ctx: ResolverContext, path: string | undefine
|
|
|
55
54
|
* When "default" is specified, returns the first valid HTTP method for the given path.
|
|
56
55
|
* This ensures we select a real method rather than metadata keys like "parameters" or "summary".
|
|
57
56
|
*/
|
|
58
|
-
export declare const resolveMethod: (ctx: ResolverContext, path: string | undefined, method: string | undefined, isWebhook?: boolean) =>
|
|
57
|
+
export declare const resolveMethod: (ctx: ResolverContext, path: string | undefined, method: string | undefined, isWebhook?: boolean) => string | undefined;
|
|
59
58
|
/**
|
|
60
59
|
* Resolves the example name from a raw input value.
|
|
61
60
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-route-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-route-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"names":[],"mappings":"AACA,OAA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MAAM,GAAG,SAAS,KAC7B,MAmBF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,cAAc,EAAE,QAAQ,eAAe,KAAG,OAAO,CAAC,YAAY,CAsB3G,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
|
|
1
2
|
import { getOperationEntries } from "@scalar/workspace-store/navigation";
|
|
2
3
|
import { isOpenApiDocument } from "@scalar/workspace-store/schemas/type-guards";
|
|
3
|
-
import {
|
|
4
|
-
import { isHttpMethod } from "@scalar/helpers/http/is-http-method";
|
|
4
|
+
import { forEachPathItemOperation, getPathItemOperation } from "@scalar/workspace-store/helpers/for-each-path-item-operation";
|
|
5
5
|
//#region src/v2/features/modal/helpers/resolve-route-parameters.ts
|
|
6
6
|
/** Type guard to check if an entry is an example. */
|
|
7
7
|
var isExample = (entry) => entry.type === "example";
|
|
@@ -52,12 +52,13 @@ var resolvePath = (ctx, path, isWebhook = false) => {
|
|
|
52
52
|
var resolveMethod = (ctx, path, method, isWebhook = false) => {
|
|
53
53
|
const document = getDocument(ctx);
|
|
54
54
|
if (!document || !path) return;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const pathItem = isWebhook ? document.webhooks?.[path] : document.paths?.[path];
|
|
56
|
+
if (method === "default" && !getPathItemOperation(pathItem, method)) {
|
|
57
|
+
const methods = [];
|
|
58
|
+
forEachPathItemOperation(pathItem, (method) => methods.push(method));
|
|
59
|
+
return methods[0];
|
|
59
60
|
}
|
|
60
|
-
return isHttpMethod(method) ? method : void 0;
|
|
61
|
+
return method && (isHttpMethod(method) || getPathItemOperation(pathItem, method)) ? method : void 0;
|
|
61
62
|
};
|
|
62
63
|
/**
|
|
63
64
|
* Resolves the example name from a raw input value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-route-parameters.js","names":[],"sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"resolve-route-parameters.js","names":[],"sources":["../../../../../src/v2/features/modal/helpers/resolve-route-parameters.ts"],"sourcesContent":["import { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport {\n forEachPathItemOperation,\n getPathItemOperation,\n} from '@scalar/workspace-store/helpers/for-each-path-item-operation'\nimport { getOperationEntries } from '@scalar/workspace-store/navigation'\nimport type { TraversedEntry, TraversedExample } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\n\n/**\n * Payload for routing and opening the API client modal.\n *\n * `path` and `method` are optional so a caller can update `documentSlug` on its own.\n * `route()` fills in whichever fields are missing from its \"default\" placeholders, which\n * resolve to the document's first operation instead of a route that does not exist.\n */\nexport type RoutePayload = {\n /** API path, or webhook name when `isWebhook` is true. */\n path?: string\n method?: string\n example?: string\n documentSlug?: string\n /** Resolve `path` from the OpenAPI webhooks map. */\n isWebhook?: boolean\n}\n\n/** Raw input values that may contain \"default\" placeholders. */\nexport type DefaultEntities = {\n path: string\n method: string\n example: string\n documentSlug: string\n isWebhook?: boolean\n}\n\n/** Context for resolving route parameters from the workspace store. */\ntype ResolverContext = {\n store: WorkspaceStore\n documentSlug: string | undefined\n}\n\n/** Type guard to check if an entry is an example. */\nconst isExample = (entry: TraversedEntry): entry is TraversedExample => entry.type === 'example'\n\n/**\n * Gets the document from the workspace store.\n * Returns undefined if the document slug is not provided or the document does not exist.\n * Modal routing is OpenAPI-only — AsyncAPI docs surface as undefined here.\n */\nconst getDocument = (ctx: ResolverContext) => {\n const doc = ctx.store.workspace.documents[ctx.documentSlug ?? '']\n return isOpenApiDocument(doc) ? doc : undefined\n}\n\n/**\n * Resolves the document slug from a raw input value.\n *\n * When \"default\" is specified and no document exists with that slug,\n * we fall back to the active document or the first available document.\n * Modal routing is OpenAPI-only, so the fallback skips AsyncAPI documents —\n * otherwise opening the modal with default params on a workspace that has\n * an AsyncAPI active or first document would hand a slug back that\n * `getDocument` then resolves to undefined, rendering the modal with\n * `document: null` even when OpenAPI documents exist.\n */\nexport const resolveDocumentSlug = (store: WorkspaceStore, slug: string | undefined): string | undefined => {\n const hasMatchingDocument = slug !== 'default' || store.workspace.documents[slug] !== undefined\n\n if (hasMatchingDocument) {\n return slug\n }\n\n // Prefer the active document when it is OpenAPI; otherwise pick the first\n // OpenAPI document in the workspace.\n const activeSlug = store.workspace['x-scalar-active-document']\n if (activeSlug && isOpenApiDocument(store.workspace.documents[activeSlug])) {\n return activeSlug\n }\n\n return Object.entries(store.workspace.documents).find(([, document]) => isOpenApiDocument(document))?.[0]\n}\n\n/**\n * Resolves the path from a raw input value.\n *\n * When \"default\" is specified, returns the first available path in the document.\n * This is useful for initial navigation when no specific path is requested.\n */\nexport const resolvePath = (ctx: ResolverContext, path: string | undefined, isWebhook = false): string | undefined => {\n const document = getDocument(ctx)\n\n if (!document) {\n return undefined\n }\n\n if (path === 'default') {\n return Object.keys(isWebhook ? (document.webhooks ?? {}) : (document.paths ?? {}))[0]\n }\n\n return path\n}\n\n/**\n * Resolves the HTTP method from a raw input value.\n *\n * When \"default\" is specified, returns the first valid HTTP method for the given path.\n * This ensures we select a real method rather than metadata keys like \"parameters\" or \"summary\".\n */\nexport const resolveMethod = (\n ctx: ResolverContext,\n path: string | undefined,\n method: string | undefined,\n isWebhook = false,\n): string | undefined => {\n const document = getDocument(ctx)\n\n if (!document || !path) {\n return undefined\n }\n\n const pathItem = isWebhook ? document.webhooks?.[path] : document.paths?.[path]\n if (method === 'default' && !getPathItemOperation(pathItem, method)) {\n const methods: string[] = []\n forEachPathItemOperation(pathItem, (method) => methods.push(method))\n return methods[0]\n }\n\n return method && (isHttpMethod(method) || getPathItemOperation(pathItem, method)) ? method : undefined\n}\n\n/**\n * Resolves the example name from a raw input value.\n *\n * When \"default\" is specified, returns the first available example name.\n * Falls back to \"default\" when no examples exist, which signals to use the default request body.\n */\nexport const resolveExampleName = (\n ctx: ResolverContext,\n operation: TraversedEntry | undefined,\n exampleKey: string | undefined,\n): string => {\n const document = getDocument(ctx)\n\n if (!document || operation?.type !== 'operation') {\n return 'default'\n }\n\n const examples = operation.children?.filter(isExample) ?? []\n const matchingExample = examples.find((child) => child.name === exampleKey)\n\n if (matchingExample) {\n return matchingExample.name\n }\n\n if (exampleKey === 'default') {\n return examples[0]?.name ?? 'default'\n }\n\n return 'default'\n}\n\n/**\n * Resolves all route parameters from raw input values to their actual values.\n *\n * This function handles \"default\" placeholders by looking up actual values from the workspace store.\n * It ensures the modal can be opened even when the caller does not know specific paths, methods, or examples.\n */\nexport const resolveRouteParameters = (store: WorkspaceStore, params: DefaultEntities): Partial<RoutePayload> => {\n const documentSlug = resolveDocumentSlug(store, params.documentSlug)\n const ctx: ResolverContext = { store, documentSlug }\n const isWebhook = params.isWebhook ?? false\n\n const path = resolvePath(ctx, params.path, isWebhook)\n const method = resolveMethod(ctx, path, params.method, isWebhook)\n const routeType = isWebhook ? { isWebhook: true as const } : {}\n\n const traversedDocument = getDocument(ctx)?.['x-scalar-navigation']\n\n if (!traversedDocument) {\n return { documentSlug, path, method, example: 'default', ...routeType }\n }\n\n const operations = getOperationEntries(traversedDocument)\n const operation = operations\n .get(`${path}|${method}`)\n ?.find((entry) => entry.type === (isWebhook ? 'webhook' : 'operation'))\n const example = resolveExampleName(ctx, operation, params.example)\n\n return { documentSlug, path, method, example, ...routeType }\n}\n"],"mappings":";;;;;;AA2CA,IAAM,aAAa,UAAqD,MAAM,SAAS;;;;;;AAOvF,IAAM,eAAe,QAAyB;CAC5C,MAAM,MAAM,IAAI,MAAM,UAAU,UAAU,IAAI,gBAAgB;CAC9D,OAAO,kBAAkB,GAAG,IAAI,MAAM,KAAA;AACxC;;;;;;;;;;;;AAaA,IAAa,uBAAuB,OAAuB,SAAiD;CAG1G,IAF4B,SAAS,aAAa,MAAM,UAAU,UAAU,UAAU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AAmD;CAC/G,MAAM,eAAe,oBAAoB,OAAO,OAAO,YAAY;CACnE,MAAM,MAAuB;EAAE;EAAO;CAAa;CACnD,MAAM,YAAY,OAAO,aAAa;CAEtC,MAAM,OAAO,YAAY,KAAK,OAAO,MAAM,SAAS;CACpD,MAAM,SAAS,cAAc,KAAK,MAAM,OAAO,QAAQ,SAAS;CAChE,MAAM,YAAY,YAAY,EAAE,WAAW,KAAc,IAAI,CAAC;CAE9D,MAAM,oBAAoB,YAAY,GAAG,CAAC,GAAG;CAE7C,IAAI,CAAC,mBACH,OAAO;EAAE;EAAc;EAAM;EAAQ,SAAS;EAAW,GAAG;CAAU;CAIxE,MAAM,YADa,oBAAoB,iBACrB,CAAA,CACf,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAC,EACvB,MAAM,UAAU,MAAM,UAAU,YAAY,YAAY,YAAY;CAGxE,OAAO;EAAE;EAAc;EAAM;EAAQ,SAFrB,mBAAmB,KAAK,WAAW,OAAO,OAErB;EAAS,GAAG;CAAU;AAC7D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
1
|
import { createSidebarState } from '@scalar/sidebar';
|
|
3
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
3
|
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
@@ -10,7 +9,7 @@ export type UseModalSidebarReturn = {
|
|
|
10
9
|
getEntryByLocation: (location: {
|
|
11
10
|
document: string;
|
|
12
11
|
path?: string;
|
|
13
|
-
method?:
|
|
12
|
+
method?: string;
|
|
14
13
|
example?: string;
|
|
15
14
|
isWebhook?: boolean;
|
|
16
15
|
}) => TraversedEntry | undefined;
|
|
@@ -36,7 +35,7 @@ export declare const useModalSidebar: ({ workspaceStore, documentSlug, path, met
|
|
|
36
35
|
workspaceStore: WorkspaceStore | null;
|
|
37
36
|
documentSlug: ComputedRef<string | undefined>;
|
|
38
37
|
path: ComputedRef<string | undefined>;
|
|
39
|
-
method: ComputedRef<
|
|
38
|
+
method: ComputedRef<string | undefined>;
|
|
40
39
|
exampleName: ComputedRef<string | undefined>;
|
|
41
40
|
isWebhook?: ComputedRef<boolean>;
|
|
42
41
|
route: (payload: RoutePayload) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-modal-sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/hooks/use-modal-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-modal-sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/hooks/use-modal-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuC,MAAM,iBAAiB,CAAA;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAEhF,OAAO,EAAE,KAAK,WAAW,EAA4B,MAAM,KAAK,CAAA;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAA;AAGxF,MAAM,MAAM,qBAAqB,GAAG;IAClC,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,KAAK,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAA;IAC5D,kBAAkB,EAAE,CAAC,QAAQ,EAAE;QAC7B,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,KAAK,cAAc,GAAG,SAAS,CAAA;CACjC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,GAAI,gFAQ7B;IACD,cAAc,EAAE,cAAc,GAAG,IAAI,CAAA;IACrC,YAAY,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACvC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,SAAS,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAChC,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;CACvC,KAAG,qBAiLH,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-modal-sidebar.js","names":[],"sources":["../../../../../src/v2/features/modal/hooks/use-modal-sidebar.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"use-modal-sidebar.js","names":[],"sources":["../../../../../src/v2/features/modal/hooks/use-modal-sidebar.ts"],"sourcesContent":["import { createSidebarState, generateReverseIndex, getChildEntry } from '@scalar/sidebar'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { getParentEntry } from '@scalar/workspace-store/navigation'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { type ComputedRef, computed, toValue, watch } from 'vue'\n\nimport type { RoutePayload } from '@/v2/features/modal/helpers/resolve-route-parameters'\nimport { generateLocationId } from '@/v2/helpers/generate-location-id'\n\nexport type UseModalSidebarReturn = {\n handleSelectItem: (id: string) => void\n state: ReturnType<typeof createSidebarState<TraversedEntry>>\n getEntryByLocation: (location: {\n document: string\n path?: string\n method?: string\n example?: string\n isWebhook?: boolean\n }) => TraversedEntry | undefined\n}\n\n/**\n * useSidebarState - Custom hook to manage the sidebar state and navigation logic in the Scalar API client\n *\n * This composable manages the sidebar structure, synchronizes selection state\n * with the current route, and provides a handler for selecting sidebar items.\n *\n * Example usage:\n *\n * const { handleSelectItem, sidebarState } = useSidebarState({\n * workspaceStore,\n * workspaceSlug,\n * documentSlug,\n * path,\n * method,\n * exampleName,\n * })\n */\nexport const useModalSidebar = ({\n workspaceStore,\n documentSlug,\n path,\n method,\n exampleName,\n isWebhook,\n route,\n}: {\n workspaceStore: WorkspaceStore | null\n documentSlug: ComputedRef<string | undefined>\n path: ComputedRef<string | undefined>\n method: ComputedRef<string | undefined>\n exampleName: ComputedRef<string | undefined>\n isWebhook?: ComputedRef<boolean>\n route: (payload: RoutePayload) => void\n}): UseModalSidebarReturn => {\n const activeIsWebhook = isWebhook ?? computed(() => false)\n const entries = computed<TraversedEntry[]>(() => {\n const doc = workspaceStore?.workspace.documents[toValue(documentSlug) ?? '']\n return isOpenApiDocument(doc) ? (doc['x-scalar-navigation']?.children ?? []) : []\n })\n const state = createSidebarState(entries)\n\n /**\n * Computed index for fast lookup of sidebar nodes by their unique API location.\n *\n * - Only indexes nodes of type 'operation', or 'example'.\n * - The lookup key is a serialized array of: [operationPath, operationMethod, exampleName?].\n * - Supports precise resolution of sidebar entries given an API \"location\".\n */\n const locationIndex = computed(() =>\n generateReverseIndex({\n items: entries.value,\n nestedKey: 'children',\n filter: (node) => node.type === 'operation' || node.type === 'example' || node.type === 'webhook',\n getId: (node) => {\n if (node.type === 'webhook') {\n return generateLocationId({\n document: toValue(documentSlug) ?? '',\n path: node.name,\n method: node.method,\n isWebhook: true,\n })\n }\n\n const operation = getParentEntry('operation', node)\n return generateLocationId({\n document: toValue(documentSlug) ?? '',\n path: operation?.path,\n method: operation?.method,\n example: node.type === 'example' ? node.name : undefined,\n })\n },\n }),\n )\n\n /**\n * Looks up a sidebar entry by its unique API location.\n * - First tries to find an entry matching all provided properties (including example).\n * - If not found, falls back to matching only the operation (ignores example field).\n * This allows resolving either examples, operations, or documents as appropriate.\n *\n * @param location - Object specifying the document name, path, method, and optional example name.\n * @returns The matching sidebar entry, or undefined if none found.\n *\n * Example:\n * const entry = getEntryByLocation({\n * document: 'pets',\n * path: '/pets',\n * method: 'get',\n * example: 'default',\n * })\n */\n const getEntryByLocation: UseModalSidebarReturn['getEntryByLocation'] = (location) => {\n // Try to find an entry with the most-specific location (including example)\n const entryWithExample = locationIndex.value.get(\n generateLocationId({\n document: location.document,\n path: location.path,\n method: location.method,\n example: location.example,\n isWebhook: location.isWebhook,\n }),\n )\n\n if (entryWithExample) {\n return entryWithExample\n }\n\n // Fallback to the operation (ignoring example) if an example wasn't found or specified\n return locationIndex.value.get(\n generateLocationId({\n document: location.document,\n path: location.path,\n method: location.method,\n isWebhook: location.isWebhook,\n }),\n )\n }\n\n /**\n * Handles item selection from the sidebar and routes navigation accordingly.\n *\n * Example:\n * handleSelectItem('id-of-entry')\n */\n const handleSelectItem = (id: string) => {\n const entry = state.getEntryById(id)\n\n if (!entry) {\n console.warn(`Could not find sidebar entry with id ${id} to select`)\n return\n }\n\n // Navigate to the example page\n if (entry.type === 'operation' || entry.type === 'example') {\n // If we are already in the operation, just toggle expansion\n if (state.isSelected(id)) {\n state.setExpanded(id, !state.isExpanded(id))\n return\n }\n\n const operation = getParentEntry('operation', entry)\n const example = getChildEntry('example', entry)\n\n if (example) {\n state.setSelected(example.id)\n state.setExpanded(example.id, true)\n } else {\n state.setSelected(id)\n }\n\n if (!operation) {\n return\n }\n\n return route({\n documentSlug: toValue(documentSlug),\n path: operation.path,\n method: operation.method,\n example: example?.name ?? 'default',\n })\n }\n\n if (entry.type === 'webhook') {\n state.setSelected(id)\n return route({\n documentSlug: toValue(documentSlug),\n path: entry.name,\n method: entry.method,\n example: 'default',\n isWebhook: true,\n })\n }\n\n state.setExpanded(id, !state.isExpanded(id))\n return\n }\n\n /** Keep the sidebar state in sync with the modal parameters */\n watch(\n [documentSlug, path, method, exampleName, activeIsWebhook],\n ([newDocument, newPath, newMethod, newExample, newIsWebhook]) => {\n if (!newDocument) {\n // Reset selection if no document is selected\n state.setSelected(null)\n return\n }\n\n const entry = getEntryByLocation({\n document: newDocument,\n path: newPath,\n method: newMethod,\n example: newExample,\n isWebhook: newIsWebhook,\n })\n\n if (entry) {\n state.setSelected(entry.id)\n state.setExpanded(entry.id, true)\n }\n },\n {\n immediate: true,\n },\n )\n\n return {\n handleSelectItem,\n state,\n getEntryByLocation,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAa,mBAAmB,EAC9B,gBACA,cACA,MACA,QACA,aACA,WACA,YAS2B;CAC3B,MAAM,kBAAkB,aAAa,eAAe,KAAK;CACzD,MAAM,UAAU,eAAiC;EAC/C,MAAM,MAAM,gBAAgB,UAAU,UAAU,QAAQ,YAAY,KAAK;EACzE,OAAO,kBAAkB,GAAG,IAAK,IAAI,sBAAsB,EAAE,YAAY,CAAC,IAAK,CAAC;CAClF,CAAC;CACD,MAAM,QAAQ,mBAAmB,OAAO;;;;;;;;CASxC,MAAM,gBAAgB,eACpB,qBAAqB;EACnB,OAAO,QAAQ;EACf,WAAW;EACX,SAAS,SAAS,KAAK,SAAS,eAAe,KAAK,SAAS,aAAa,KAAK,SAAS;EACxF,QAAQ,SAAS;GACf,IAAI,KAAK,SAAS,WAChB,OAAO,mBAAmB;IACxB,UAAU,QAAQ,YAAY,KAAK;IACnC,MAAM,KAAK;IACX,QAAQ,KAAK;IACb,WAAW;GACb,CAAC;GAGH,MAAM,YAAY,eAAe,aAAa,IAAI;GAClD,OAAO,mBAAmB;IACxB,UAAU,QAAQ,YAAY,KAAK;IACnC,MAAM,WAAW;IACjB,QAAQ,WAAW;IACnB,SAAS,KAAK,SAAS,YAAY,KAAK,OAAO,KAAA;GACjD,CAAC;EACH;CACF,CAAC,CACH;;;;;;;;;;;;;;;;;;CAmBA,MAAM,sBAAmE,aAAa;EAEpF,MAAM,mBAAmB,cAAc,MAAM,IAC3C,mBAAmB;GACjB,UAAU,SAAS;GACnB,MAAM,SAAS;GACf,QAAQ,SAAS;GACjB,SAAS,SAAS;GAClB,WAAW,SAAS;EACtB,CAAC,CAC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GACN,QAAQ;GACR,SAAS;GACT,WAAW;EACb,CAAC;EAED,IAAI,OAAO;GACT,MAAM,YAAY,MAAM,EAAE;GAC1B,MAAM,YAAY,MAAM,IAAI,IAAI;EAClC;CACF,GACA,EACE,WAAW,KACb,CACF;CAEA,OAAO;EACL;EACA;EACA;CACF;AACF"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
1
|
import type { ClientPlugin } from '@scalar/oas-utils/helpers';
|
|
3
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
@@ -31,7 +30,7 @@ export type OperationProps = {
|
|
|
31
30
|
/** The API path currently selected (e.g. "/users/{id}") */
|
|
32
31
|
path?: string;
|
|
33
32
|
/** The HTTP method for the currently selected API path (e.g. GET, POST) */
|
|
34
|
-
method?:
|
|
33
|
+
method?: string;
|
|
35
34
|
/** The name of the currently selected example (for examples within an endpoint) */
|
|
36
35
|
exampleName?: string;
|
|
37
36
|
/** Resolve the selected entry from the OpenAPI webhooks map. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/operation/Operation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/operation/Operation.vue"],"names":[],"mappings":"AA6SA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAgBvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,EAML,KAAK,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