@redocly/theme 0.70.0-next.0 → 0.70.0-next.2
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/lib/components/Button/Button.js +5 -2
- package/lib/components/Button/variables.js +14 -5
- package/lib/components/Dropdown/Dropdown.js +0 -7
- package/lib/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.d.ts +11 -0
- package/lib/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.js +7 -0
- package/lib/components/Search/SearchAiConversationInput.js +10 -6
- package/lib/components/Search/SearchAiDialog.js +8 -1
- package/lib/components/Search/SearchItem.js +9 -1
- package/lib/components/SplitButton/SplitButton.d.ts +1 -0
- package/lib/components/SplitButton/SplitButton.js +2 -2
- package/lib/components/Tooltip/AnchorTooltip.js +17 -27
- package/lib/components/Tooltip/JsTooltip.js +34 -46
- package/lib/components/Tooltip/Tooltip.js +1 -2
- package/lib/core/constants/search.d.ts +1 -1
- package/lib/core/constants/search.js +1 -1
- package/lib/core/hooks/catalog/use-catalog-entity-schema.js +2 -2
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +1 -1
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/menu/use-nested-menu.js +2 -2
- package/lib/core/hooks/use-anchor-positioning.d.ts +3 -0
- package/lib/core/hooks/use-anchor-positioning.js +21 -0
- package/lib/core/hooks/use-dialog-hotkeys.js +4 -2
- package/lib/core/hooks/use-theme-hooks.js +0 -1
- package/lib/core/types/hooks.d.ts +0 -3
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/search.d.ts +2 -0
- package/lib/core/utils/load-and-navigate.js +3 -3
- package/package.json +3 -3
- package/src/components/Button/Button.tsx +5 -2
- package/src/components/Button/variables.ts +14 -5
- package/src/components/Dropdown/Dropdown.tsx +0 -7
- package/src/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.tsx +19 -0
- package/src/components/Search/SearchAiConversationInput.tsx +13 -7
- package/src/components/Search/SearchAiDialog.tsx +16 -1
- package/src/components/Search/SearchItem.tsx +14 -0
- package/src/components/SplitButton/SplitButton.tsx +3 -0
- package/src/components/Tooltip/AnchorTooltip.tsx +17 -27
- package/src/components/Tooltip/JsTooltip.tsx +55 -62
- package/src/components/Tooltip/Tooltip.tsx +1 -2
- package/src/core/constants/search.ts +1 -1
- package/src/core/hooks/__mocks__/index.ts +1 -0
- package/src/core/hooks/__mocks__/use-anchor-positioning.ts +3 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +0 -3
- package/src/core/hooks/catalog/use-catalog-entity-schema.ts +2 -2
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +1 -2
- package/src/core/hooks/code-walkthrough/__mocks__/mock-intersection-observer.ts +1 -2
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +1 -1
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/menu/use-nested-menu.ts +2 -2
- package/src/core/hooks/use-anchor-positioning.ts +22 -0
- package/src/core/hooks/use-dialog-hotkeys.ts +11 -5
- package/src/core/hooks/use-theme-hooks.ts +0 -1
- package/src/core/types/hooks.ts +0 -1
- package/src/core/types/l10n.ts +3 -0
- package/src/core/types/search.ts +2 -0
- package/src/core/utils/load-and-navigate.ts +3 -3
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.send' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.searchItem.enum' | 'search.searchItem.example' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -24,9 +24,9 @@ function loadAndNavigate(_a) {
|
|
|
24
24
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
25
25
|
const loader = window['__LOADER'];
|
|
26
26
|
const result = yield (0, with_load_progress_1.withLoadProgress)(loader.tryLoad(pathname));
|
|
27
|
-
// @ts-
|
|
27
|
+
// @ts-expect-error
|
|
28
28
|
if (result === null || result === void 0 ? void 0 : result.redirectTo) {
|
|
29
|
-
// @ts-
|
|
29
|
+
// @ts-expect-error
|
|
30
30
|
return loadAndNavigate({ navigate, to: result.redirectTo, origin, options });
|
|
31
31
|
}
|
|
32
32
|
if (result && lastNavigatedPath === to) {
|
|
@@ -34,7 +34,7 @@ function loadAndNavigate(_a) {
|
|
|
34
34
|
// origin is used to prevent infinite loop when navigating from post message (from wysiwyg)
|
|
35
35
|
navigate({ pathname, search, hash }, Object.assign(Object.assign({}, options), { state: { origin }, unstable_flushSync: true }));
|
|
36
36
|
}
|
|
37
|
-
// @ts-
|
|
37
|
+
// @ts-expect-error
|
|
38
38
|
if ((_b = result.props) === null || _b === void 0 ? void 0 : _b.disableAutoScroll)
|
|
39
39
|
return;
|
|
40
40
|
if (hash) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.70.0-next.
|
|
3
|
+
"version": "0.70.0-next.2",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"webpack": "5.105.2"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@redocly/config": "0.
|
|
74
|
+
"@redocly/config": "0.57.0",
|
|
75
75
|
"@tanstack/react-query": "5.62.3",
|
|
76
76
|
"@tanstack/react-virtual": "3.13.0",
|
|
77
77
|
"@xyflow/react": "12.8.3",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"lodash.debounce": "^4.0.8",
|
|
85
85
|
"lodash.throttle": "4.1.1",
|
|
86
86
|
"nprogress": "0.2.0",
|
|
87
|
-
"openapi-sampler": "^1.7.
|
|
87
|
+
"openapi-sampler": "^1.7.6",
|
|
88
88
|
"react-calendar": "5.1.0",
|
|
89
89
|
"react-date-picker": "11.0.0"
|
|
90
90
|
},
|
|
@@ -123,7 +123,9 @@ const StyledButton = styled.button<{
|
|
|
123
123
|
height: var(--button-icon-size);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
/* A button that owns an open menu keeps its hovered appearance. */
|
|
127
|
+
&:hover,
|
|
128
|
+
&[aria-expanded='true'] {
|
|
127
129
|
background-color: var(--button-bg-color-hover);
|
|
128
130
|
color: var(--button-color-hover);
|
|
129
131
|
border-color: var(--button-border-color-hover);
|
|
@@ -145,7 +147,8 @@ const StyledButton = styled.button<{
|
|
|
145
147
|
border-color: var(--button-border-color-danger);
|
|
146
148
|
background-color: var(--button-bg-color-danger);
|
|
147
149
|
|
|
148
|
-
&:hover
|
|
150
|
+
&:hover,
|
|
151
|
+
&[aria-expanded='true'] {
|
|
149
152
|
color: var(--button-content-color-danger-hover);
|
|
150
153
|
border-color: var(--button-border-color-danger-hover);
|
|
151
154
|
background-color: var(--button-bg-color-danger-hover);
|
|
@@ -249,20 +249,29 @@ export const button = css`
|
|
|
249
249
|
--button-group-divider-opacity: 1;
|
|
250
250
|
--button-group-divider-color-disabled: var(--color-warm-grey-2); // @presenter Color
|
|
251
251
|
|
|
252
|
-
.button-group-primary {
|
|
253
|
-
--button-group-divider-color: var(--button-
|
|
252
|
+
.button-group-primary .button {
|
|
253
|
+
--button-group-divider-color: var(--button-color); // @presenter Color
|
|
254
254
|
--button-group-divider-opacity: 0.32;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
.button-group-secondary {
|
|
258
|
-
--button-group-divider-color: var(--button-
|
|
257
|
+
.button-group-secondary .button {
|
|
258
|
+
--button-group-divider-color: var(--button-color); // @presenter Color
|
|
259
259
|
--button-group-divider-opacity: 0.12;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
.button-group-outlined {
|
|
262
|
+
.button-group-outlined .button {
|
|
263
263
|
--button-group-divider-color: var(--button-border-color); // @presenter Color
|
|
264
264
|
--button-group-divider-opacity: 1;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
.button-group-primary .button.button-tone-danger,
|
|
268
|
+
.button-group-secondary .button.button-tone-danger {
|
|
269
|
+
--button-group-divider-color: var(--button-content-color-danger); // @presenter Color
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.button-group-outlined .button.button-tone-danger {
|
|
273
|
+
--button-group-divider-color: var(--button-border-color-danger); // @presenter Color
|
|
274
|
+
}
|
|
275
|
+
|
|
267
276
|
// @tokens End
|
|
268
277
|
`;
|
|
@@ -216,13 +216,6 @@ const DropdownWrapper = styled.div`
|
|
|
216
216
|
position: relative;
|
|
217
217
|
|
|
218
218
|
text-decoration: none;
|
|
219
|
-
|
|
220
|
-
/* The trigger keeps its hovered appearance while the menu is open. */
|
|
221
|
-
> .button[aria-expanded='true'] {
|
|
222
|
-
background-color: var(--button-bg-color-hover);
|
|
223
|
-
color: var(--button-color-hover);
|
|
224
|
-
border-color: var(--button-border-color-hover);
|
|
225
|
-
}
|
|
226
219
|
`;
|
|
227
220
|
|
|
228
221
|
const ChildrenWrapper = styled.div<{
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Named after the OpenAPI fields, not the labels Replay shows, so renaming a label cannot
|
|
2
|
+
// silently change what a project matches on. Only schemes that take a single credential are
|
|
3
|
+
// here: Replay renders no slot for the rest, which `setValue` could not fill anyway.
|
|
4
|
+
export type ReplaySecurityType = 'oauth2' | 'openIdConnect' | 'apiKey' | 'http-bearer';
|
|
5
|
+
|
|
6
|
+
export type ReplaySecuritySchemeActionsProps = {
|
|
7
|
+
schemeId: string | null;
|
|
8
|
+
securityType: ReplaySecurityType;
|
|
9
|
+
environment: string;
|
|
10
|
+
// Undefined for an operation with no documented id, and in the workflow tab, which has no operation.
|
|
11
|
+
operationId?: string;
|
|
12
|
+
value: string;
|
|
13
|
+
setValue: (value: string) => void;
|
|
14
|
+
apiId?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function ReplaySecuritySchemeActions(_props: ReplaySecuritySchemeActionsProps) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
@@ -30,18 +30,24 @@ export function SearchAiConversationInput({
|
|
|
30
30
|
const { translate } = useTranslate();
|
|
31
31
|
|
|
32
32
|
const inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);
|
|
33
|
+
const wasGeneratingResponseRef = useRef(isGeneratingResponse);
|
|
33
34
|
const [query, setQuery] = useState('');
|
|
34
35
|
|
|
35
36
|
useEffect(() => {
|
|
36
|
-
|
|
37
|
+
const wasGeneratingResponse = wasGeneratingResponseRef.current;
|
|
38
|
+
wasGeneratingResponseRef.current = isGeneratingResponse;
|
|
39
|
+
|
|
40
|
+
if (wasGeneratingResponse && !isGeneratingResponse) {
|
|
37
41
|
requestAnimationFrame(() => {
|
|
38
42
|
inputRef.current?.focus();
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
}, [isGeneratingResponse]);
|
|
42
46
|
|
|
47
|
+
const isDisabled = disabled || isGeneratingResponse || query.trim().length === 0;
|
|
48
|
+
|
|
43
49
|
const handleSendMessage = () => {
|
|
44
|
-
if (
|
|
50
|
+
if (isDisabled) return;
|
|
45
51
|
|
|
46
52
|
setQuery('');
|
|
47
53
|
onMessageSent(query);
|
|
@@ -59,8 +65,6 @@ export function SearchAiConversationInput({
|
|
|
59
65
|
}
|
|
60
66
|
};
|
|
61
67
|
|
|
62
|
-
const isDisabled = disabled || isGeneratingResponse || query.trim().length === 0;
|
|
63
|
-
|
|
64
68
|
const commonProps = {
|
|
65
69
|
placeholder:
|
|
66
70
|
placeholder || translate('search.ai.followUpQuestion', 'Ask a follow up question?'),
|
|
@@ -91,7 +95,8 @@ export function SearchAiConversationInput({
|
|
|
91
95
|
)}
|
|
92
96
|
|
|
93
97
|
<SendButton
|
|
94
|
-
|
|
98
|
+
aria-label={translate('search.ai.send', 'Send question')}
|
|
99
|
+
aria-disabled={isDisabled}
|
|
95
100
|
size="small"
|
|
96
101
|
icon={
|
|
97
102
|
<SendIcon
|
|
@@ -176,11 +181,12 @@ const SendButton = styled(Button)`
|
|
|
176
181
|
border-radius: var(--search-ai-conversation-input-send-button-border-radius);
|
|
177
182
|
padding: var(--search-ai-conversation-input-send-button-padding);
|
|
178
183
|
|
|
179
|
-
&:hover {
|
|
184
|
+
&:hover:not([aria-disabled='true']) {
|
|
180
185
|
background-color: var(--search-ai-conversation-input-send-button-bg-color-hover);
|
|
181
186
|
}
|
|
182
187
|
|
|
183
|
-
|
|
188
|
+
&[aria-disabled='true'] {
|
|
189
|
+
cursor: default;
|
|
184
190
|
background-color: var(--search-ai-conversation-input-send-button-bg-color-disabled);
|
|
185
191
|
border: var(--search-ai-conversation-input-send-button-border-disabled);
|
|
186
192
|
}
|
|
@@ -58,6 +58,17 @@ export function SearchAiDialog({
|
|
|
58
58
|
const { translate } = useTranslate();
|
|
59
59
|
|
|
60
60
|
const conversationEndRef = React.useRef<HTMLDivElement>(null);
|
|
61
|
+
const wrapperRef = React.useRef<HTMLDivElement>(null);
|
|
62
|
+
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
requestAnimationFrame(() => {
|
|
65
|
+
wrapperRef.current
|
|
66
|
+
?.querySelector<HTMLElement>(
|
|
67
|
+
'[data-component-name="Search/SearchAiConversationInput"] :is(input, textarea):not(:disabled)',
|
|
68
|
+
)
|
|
69
|
+
?.focus();
|
|
70
|
+
});
|
|
71
|
+
}, []);
|
|
61
72
|
|
|
62
73
|
const suggestions = aiAssistant?.suggestions ?? [];
|
|
63
74
|
|
|
@@ -167,7 +178,11 @@ export function SearchAiDialog({
|
|
|
167
178
|
);
|
|
168
179
|
|
|
169
180
|
return (
|
|
170
|
-
<SearchAiDialogWrapper
|
|
181
|
+
<SearchAiDialogWrapper
|
|
182
|
+
ref={wrapperRef}
|
|
183
|
+
data-component-name="Search/SearchAiDialog"
|
|
184
|
+
className={className}
|
|
185
|
+
>
|
|
171
186
|
{!conversation.length && (
|
|
172
187
|
<WelcomeWrapper>
|
|
173
188
|
<AiStarsIcon
|
|
@@ -123,6 +123,20 @@ export function SearchItem({
|
|
|
123
123
|
{searchHighlight(parameter.name)}
|
|
124
124
|
</div>
|
|
125
125
|
<div>{searchHighlight(parameter.description)}</div>
|
|
126
|
+
{parameter.enum ? (
|
|
127
|
+
<div>
|
|
128
|
+
{translate('search.searchItem.enum', 'Enum')}
|
|
129
|
+
{': '}
|
|
130
|
+
{searchHighlight(parameter.enum)}
|
|
131
|
+
</div>
|
|
132
|
+
) : null}
|
|
133
|
+
{parameter.example ? (
|
|
134
|
+
<div>
|
|
135
|
+
{translate('search.searchItem.example', 'Example')}
|
|
136
|
+
{': '}
|
|
137
|
+
{searchHighlight(parameter.example)}
|
|
138
|
+
</div>
|
|
139
|
+
) : null}
|
|
126
140
|
</SearchItemPlace>
|
|
127
141
|
) : (
|
|
128
142
|
shouldShowPath && (
|
|
@@ -14,6 +14,7 @@ export type SplitButtonProps = {
|
|
|
14
14
|
children: ComponentProps<typeof Dropdown>['children'];
|
|
15
15
|
variant?: ButtonGroupVariant;
|
|
16
16
|
size?: ButtonGroupSize;
|
|
17
|
+
tone?: ButtonProps['tone'];
|
|
17
18
|
placement?: 'top' | 'bottom';
|
|
18
19
|
alignment?: 'start' | 'end';
|
|
19
20
|
portalled?: boolean;
|
|
@@ -31,6 +32,7 @@ export function SplitButton(props: SplitButtonProps): JSX.Element {
|
|
|
31
32
|
children,
|
|
32
33
|
variant,
|
|
33
34
|
size,
|
|
35
|
+
tone,
|
|
34
36
|
placement = 'bottom',
|
|
35
37
|
alignment = 'end',
|
|
36
38
|
portalled,
|
|
@@ -63,6 +65,7 @@ export function SplitButton(props: SplitButtonProps): JSX.Element {
|
|
|
63
65
|
aria-haspopup="menu"
|
|
64
66
|
variant={variant}
|
|
65
67
|
size={size}
|
|
68
|
+
tone={tone}
|
|
66
69
|
disabled={disabled}
|
|
67
70
|
/>
|
|
68
71
|
}
|
|
@@ -132,15 +132,13 @@ const PLACEMENTS = {
|
|
|
132
132
|
$withArrow &&
|
|
133
133
|
css`
|
|
134
134
|
&::after {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
border-top-style: solid;
|
|
139
|
-
border-radius: 2px;
|
|
135
|
+
width: 16px;
|
|
136
|
+
height: 8px;
|
|
137
|
+
clip-path: path('M0 0H16L9.414 6.586A2 2 0 0 1 6.586 6.586Z');
|
|
140
138
|
bottom: 0;
|
|
141
|
-
${$arrowPosition === 'left' && 'left:
|
|
139
|
+
${$arrowPosition === 'left' && 'left: 22px; transform: translateY(100%);'}
|
|
142
140
|
${$arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, 100%);'}
|
|
143
|
-
${$arrowPosition === 'right' && 'right:
|
|
141
|
+
${$arrowPosition === 'right' && 'right: 22px; transform: translateY(100%);'}
|
|
144
142
|
}
|
|
145
143
|
`}
|
|
146
144
|
`,
|
|
@@ -166,15 +164,13 @@ const PLACEMENTS = {
|
|
|
166
164
|
$withArrow &&
|
|
167
165
|
css`
|
|
168
166
|
&::after {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
border-bottom-style: solid;
|
|
173
|
-
border-radius: 0 0 2px 2px;
|
|
167
|
+
width: 16px;
|
|
168
|
+
height: 8px;
|
|
169
|
+
clip-path: path('M0 8H16L9.414 1.414A2 2 0 0 0 6.586 1.414Z');
|
|
174
170
|
top: 0;
|
|
175
|
-
${$arrowPosition === 'left' && 'left:
|
|
171
|
+
${$arrowPosition === 'left' && 'left: 22px; transform: translateY(-100%);'}
|
|
176
172
|
${$arrowPosition === 'center' && 'left: 50%; transform: translate(-50%, -100%);'}
|
|
177
|
-
${$arrowPosition === 'right' && 'right:
|
|
173
|
+
${$arrowPosition === 'right' && 'right: 22px; transform: translateY(-100%);'}
|
|
178
174
|
}
|
|
179
175
|
`}
|
|
180
176
|
`,
|
|
@@ -188,11 +184,9 @@ const PLACEMENTS = {
|
|
|
188
184
|
$withArrow &&
|
|
189
185
|
css`
|
|
190
186
|
&::after {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
border-left-style: solid;
|
|
195
|
-
border-radius: 2px 0 0 2px;
|
|
187
|
+
width: 8px;
|
|
188
|
+
height: 16px;
|
|
189
|
+
clip-path: path('M0 0V16L6.586 9.414A2 2 0 0 0 6.586 6.586Z');
|
|
196
190
|
right: -9px;
|
|
197
191
|
top: 50%;
|
|
198
192
|
transform: translateY(-50%);
|
|
@@ -209,11 +203,9 @@ const PLACEMENTS = {
|
|
|
209
203
|
$withArrow &&
|
|
210
204
|
css`
|
|
211
205
|
&::after {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
border-right-style: solid;
|
|
216
|
-
border-radius: 0 2px 2px 0;
|
|
206
|
+
width: 8px;
|
|
207
|
+
height: 16px;
|
|
208
|
+
clip-path: path('M8 0V16L1.414 9.414A2 2 0 0 1 1.414 6.586Z');
|
|
217
209
|
left: -9px;
|
|
218
210
|
top: 50%;
|
|
219
211
|
transform: translateY(-50%);
|
|
@@ -263,9 +255,7 @@ const TooltipBody = styled.span.attrs<{ $anchorName: string }>(({ $anchorName })
|
|
|
263
255
|
|
|
264
256
|
content: ' ';
|
|
265
257
|
display: inline-block;
|
|
266
|
-
|
|
267
|
-
height: 0;
|
|
268
|
-
border-color: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
258
|
+
background: var(--tooltip-arrow-color, var(--tooltip-bg-color));
|
|
269
259
|
}
|
|
270
260
|
|
|
271
261
|
background: var(--tooltip-bg-color);
|