@redocly/theme 0.71.0-next.5 → 0.71.0-next.6
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/Feedback/Mood.js +1 -1
- package/lib/components/Feedback/Rating.js +1 -1
- package/lib/components/Feedback/Scale.js +1 -1
- package/lib/components/Feedback/Sentiment.js +1 -1
- package/lib/components/Filter/Filter.js +1 -1
- package/lib/components/MCP/McpConnectionTabs.d.ts +1 -1
- package/lib/components/MCP/McpConnectionTabs.js +24 -1
- package/lib/components/MissingTranslationNotice/MissingTranslationNotice.d.ts +11 -0
- package/lib/components/MissingTranslationNotice/MissingTranslationNotice.js +83 -0
- package/lib/components/MissingTranslationNotice/variables.d.ts +1 -0
- package/lib/components/MissingTranslationNotice/variables.dark.d.ts +1 -0
- package/lib/components/MissingTranslationNotice/variables.dark.js +10 -0
- package/lib/components/MissingTranslationNotice/variables.js +29 -0
- package/lib/components/PageActions/PageActions.js +1 -0
- package/lib/components/Select/Select.js +1 -2
- package/lib/core/hooks/use-active-section-id.js +8 -0
- package/lib/core/hooks/use-page-actions.d.ts +1 -1
- package/lib/core/hooks/use-page-actions.js +18 -2
- package/lib/core/styles/dark.js +4 -2
- package/lib/core/styles/global.js +70 -68
- package/lib/core/types/hooks.d.ts +2 -5
- package/lib/core/types/l10n.d.ts +2 -1
- package/lib/core/utils/mcp.d.ts +1 -0
- package/lib/core/utils/mcp.js +4 -0
- package/lib/icons/McpIcon/McpIcon.d.ts +25 -0
- package/lib/icons/McpIcon/McpIcon.js +24 -0
- package/lib/icons/TranslateIcon/TranslateIcon.d.ts +25 -0
- package/lib/icons/TranslateIcon/TranslateIcon.js +21 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/layouts/CodeWalkthroughLayout.js +9 -1
- package/lib/layouts/DocumentationLayout.js +2 -0
- package/package.json +3 -3
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +1 -1
- package/src/components/Feedback/Mood.tsx +1 -1
- package/src/components/Feedback/Rating.tsx +1 -1
- package/src/components/Feedback/Scale.tsx +1 -1
- package/src/components/Feedback/Sentiment.tsx +1 -1
- package/src/components/Filter/Filter.tsx +2 -2
- package/src/components/MCP/McpConnectionTabs.tsx +56 -2
- package/src/components/MissingTranslationNotice/MissingTranslationNotice.tsx +113 -0
- package/src/components/MissingTranslationNotice/variables.dark.ts +7 -0
- package/src/components/MissingTranslationNotice/variables.ts +26 -0
- package/src/components/PageActions/PageActions.tsx +1 -0
- package/src/components/Search/FilterFields/SearchFilterFieldSelect.tsx +1 -1
- package/src/components/Select/Select.tsx +1 -2
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -1
- package/src/core/hooks/use-active-section-id.ts +13 -0
- package/src/core/hooks/use-codeblock-tabs-controls.ts +1 -1
- package/src/core/hooks/use-page-actions.ts +27 -4
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +2 -0
- package/src/core/types/hooks.ts +2 -2
- package/src/core/types/l10n.ts +12 -2
- package/src/core/utils/mcp.ts +4 -0
- package/src/icons/McpIcon/McpIcon.tsx +37 -0
- package/src/icons/TranslateIcon/TranslateIcon.tsx +22 -0
- package/src/index.ts +3 -0
- package/src/layouts/CodeWalkthroughLayout.tsx +11 -1
- package/src/layouts/DocumentationLayout.tsx +2 -0
- package/src/markdoc/tags/code-walkthrough.ts +1 -1
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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.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.usedTools' | '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.ai.actions.copy' | 'search.ai.actions.like' | 'search.ai.actions.dislike' | '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.accountHint' | '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' | 'navigationTabs.label' | '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.label' | '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.grokTitle' | 'page.actions.grokButtonText' | 'page.actions.grokDescription' | '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.claude' | 'page.actions.connectMcp.claudeDescription' | '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' | 'promptTag.copy.buttonText' | 'promptTag.showPrompt' | 'promptTag.hidePrompt' | 'promptTag.showFullPrompt' | 'promptTag.showLess' | 'promptTag.openIn.cursor' | 'promptTag.openIn.cursorDescription' | 'promptTag.openIn.claude' | 'promptTag.openIn.claudeDescription' | 'promptTag.openIn.chatgpt' | 'promptTag.openIn.chatgptDescription' | '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.deepLink.tooltip' | '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' | 'graphql.tryIt' | 'graphql.loading' | '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' | 'consent.title' | 'consent.message' | 'consent.privacyPolicy' | 'consent.customize' | 'consent.rejectAll' | 'consent.acceptAll' | 'consent.acceptAllCookies' | 'consent.savePreferences' | 'consent.dialog.title' | 'consent.dialog.description' | 'consent.dialog.close' | 'consent.alwaysOn' | 'consent.alwaysOff' | 'consent.gpcNotice' | 'consent.category.necessary.title' | 'consent.category.necessary.description' | 'consent.category.analytics.title' | 'consent.category.analytics.description' | 'consent.category.marketing.title' | 'consent.category.marketing.description' | 'consent.settingsLink';
|
|
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.usedTools' | '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.ai.actions.copy' | 'search.ai.actions.like' | 'search.ai.actions.dislike' | '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.accountHint' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.grokBuild.headline' | 'page.mcpNotAllowed.snippets.grokApp.headline' | 'page.mcpNotAllowed.snippets.grokApp.instruction' | 'page.mcpNotAllowed.snippets.grokApp.openConnectors' | '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.grok' | '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' | 'navigationTabs.label' | '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.label' | '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.grokTitle' | 'page.actions.grokButtonText' | 'page.actions.grokDescription' | '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.claude' | 'page.actions.connectMcp.claudeDescription' | '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.copyUrl' | 'page.actions.connectMcp.copyUrlDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'promptTag.copy.buttonText' | 'promptTag.showPrompt' | 'promptTag.hidePrompt' | 'promptTag.showFullPrompt' | 'promptTag.showLess' | 'promptTag.openIn.cursor' | 'promptTag.openIn.cursorDescription' | 'promptTag.openIn.claude' | 'promptTag.openIn.claudeDescription' | 'promptTag.openIn.chatgpt' | 'promptTag.openIn.chatgptDescription' | '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.deepLink.tooltip' | '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' | 'graphql.tryIt' | 'graphql.loading' | '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' | 'consent.title' | 'consent.message' | 'consent.privacyPolicy' | 'consent.customize' | 'consent.rejectAll' | 'consent.acceptAll' | 'consent.acceptAllCookies' | 'consent.savePreferences' | 'consent.dialog.title' | 'consent.dialog.description' | 'consent.dialog.close' | 'consent.alwaysOn' | 'consent.alwaysOff' | 'consent.gpcNotice' | 'consent.category.necessary.title' | 'consent.category.necessary.description' | 'consent.category.analytics.title' | 'consent.category.analytics.description' | 'consent.category.marketing.title' | 'consent.category.marketing.description' | 'consent.settingsLink' | 'missingTranslationNotice.title' | 'missingTranslationNotice.content' | 'missingTranslationNotice.close';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
6
|
+
showMissingTranslationNotice?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export type TFunction = (value?: TranslationKey | (string & {
|
|
8
9
|
_?: never;
|
package/lib/core/utils/mcp.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export declare function isMCPOption(value: unknown): value is MCPOption;
|
|
|
3
3
|
export declare function generateMCPDeepLink(clientType: MCPClientType, config: McpConnectionParams): string;
|
|
4
4
|
export declare function slugifyMcpServerName(name: string): string;
|
|
5
5
|
export declare function generateClaudeCodeCommand(config: McpConnectionParams): string;
|
|
6
|
+
export declare function generateGrokBuildCommand(config: McpConnectionParams): string;
|
|
6
7
|
export declare function generateCodexCommand(config: McpConnectionParams): string;
|
|
7
8
|
export declare function generateMcpInstallPrompt(config: McpConnectionParams): string;
|
package/lib/core/utils/mcp.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.isMCPOption = isMCPOption;
|
|
|
4
4
|
exports.generateMCPDeepLink = generateMCPDeepLink;
|
|
5
5
|
exports.slugifyMcpServerName = slugifyMcpServerName;
|
|
6
6
|
exports.generateClaudeCodeCommand = generateClaudeCodeCommand;
|
|
7
|
+
exports.generateGrokBuildCommand = generateGrokBuildCommand;
|
|
7
8
|
exports.generateCodexCommand = generateCodexCommand;
|
|
8
9
|
exports.generateMcpInstallPrompt = generateMcpInstallPrompt;
|
|
9
10
|
const mcp_1 = require("../constants/mcp");
|
|
@@ -53,6 +54,9 @@ function slugifyMcpServerName(name) {
|
|
|
53
54
|
function generateClaudeCodeCommand(config) {
|
|
54
55
|
return `claude mcp add --transport http ${slugifyMcpServerName(config.serverName)} ${config.url}`;
|
|
55
56
|
}
|
|
57
|
+
function generateGrokBuildCommand(config) {
|
|
58
|
+
return `grok mcp add --transport http ${slugifyMcpServerName(config.serverName)} ${config.url}`;
|
|
59
|
+
}
|
|
56
60
|
function generateCodexCommand(config) {
|
|
57
61
|
return `codex mcp add ${slugifyMcpServerName(config.serverName)} --url ${config.url}`;
|
|
58
62
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
declare const Icon: (props: IconProps) => React.JSX.Element;
|
|
4
|
+
export declare const McpIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<{
|
|
5
|
+
color?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
'data-component-name'?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name" | "size" | keyof React.SVGProps<SVGSVGElement>> & {
|
|
10
|
+
color?: string;
|
|
11
|
+
size?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
'data-component-name'?: string;
|
|
14
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name"> & Partial<Pick<import("styled-components").FastOmit<{
|
|
15
|
+
color?: string;
|
|
16
|
+
size?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
'data-component-name'?: string;
|
|
19
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name" | "size" | keyof React.SVGProps<SVGSVGElement>> & {
|
|
20
|
+
color?: string;
|
|
21
|
+
size?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
'data-component-name'?: string;
|
|
24
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">>> & string & Omit<typeof Icon, keyof React.Component<any, {}, any>>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.McpIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "14 13 150 154", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M23.5996 85.2532L86.2021 22.6507C94.8457 14.0071 108.86 14.0071 117.503 22.6507C126.147 31.2942 126.147 45.3083 117.503 53.9519L70.2254 101.23", strokeWidth: "11", strokeLinecap: "round" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M70.8789 100.578L117.504 53.952C126.148 45.3083 140.163 45.3083 148.806 53.952L149.132 54.278C157.776 62.9216 157.776 76.9357 149.132 85.5792L92.5139 142.198C89.6327 145.079 89.6327 149.75 92.5139 152.631L104.14 164.257", strokeWidth: "11", strokeLinecap: "round" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M101.853 38.3013L55.553 84.6011C46.9094 93.2447 46.9094 107.258 55.553 115.902C64.1966 124.546 78.2106 124.546 86.8543 115.902L133.154 69.6025", strokeWidth: "11", strokeLinecap: "round" })));
|
|
14
|
+
exports.McpIcon = (0, styled_components_1.default)(Icon).attrs({
|
|
15
|
+
'data-component-name': 'icons/McpIcon/McpIcon',
|
|
16
|
+
}) `
|
|
17
|
+
path {
|
|
18
|
+
stroke: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
height: ${({ size }) => size || '16px'};
|
|
22
|
+
width: ${({ size }) => size || '16px'};
|
|
23
|
+
`;
|
|
24
|
+
//# sourceMappingURL=McpIcon.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
declare const Icon: (props: IconProps) => React.JSX.Element;
|
|
4
|
+
export declare const TranslateIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<{
|
|
5
|
+
color?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
'data-component-name'?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name" | "size" | keyof React.SVGProps<SVGSVGElement>> & {
|
|
10
|
+
color?: string;
|
|
11
|
+
size?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
'data-component-name'?: string;
|
|
14
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name"> & Partial<Pick<import("styled-components").FastOmit<{
|
|
15
|
+
color?: string;
|
|
16
|
+
size?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
'data-component-name'?: string;
|
|
19
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name" | "size" | keyof React.SVGProps<SVGSVGElement>> & {
|
|
20
|
+
color?: string;
|
|
21
|
+
size?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
'data-component-name'?: string;
|
|
24
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">>> & string & Omit<typeof Icon, keyof React.Component<any, {}, any>>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TranslateIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "inherit", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M12.87 15.07L10.33 12.56L10.36 12.53C12.1 10.59 13.34 8.36 14.07 6H17V4H10V2H8V4H1V6H12.17C11.5 7.92 10.44 9.75 9 11.35C8.07 10.32 7.3 9.19 6.69 8H4.69C5.42 9.63 6.42 11.17 7.67 12.56L2.58 17.58L4 19L9 14L12.11 17.11L12.87 15.07ZM18.5 10H16.5L12 22H14L15.12 19H19.87L21 22H23L18.5 10ZM15.88 17L17.5 12.67L19.12 17H15.88Z" })));
|
|
12
|
+
exports.TranslateIcon = (0, styled_components_1.default)(Icon).attrs({
|
|
13
|
+
'data-component-name': 'icons/TranslateIcon/TranslateIcon',
|
|
14
|
+
}) `
|
|
15
|
+
path {
|
|
16
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
17
|
+
}
|
|
18
|
+
height: ${({ size }) => size || '20px'};
|
|
19
|
+
width: ${({ size }) => size || '20px'};
|
|
20
|
+
`;
|
|
21
|
+
//# sourceMappingURL=TranslateIcon.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export * from './components/Markdown/styles/base-table';
|
|
|
41
41
|
export * from './components/Markdown/styles/heading-anchor';
|
|
42
42
|
export * from './components/Markdown/styles/links';
|
|
43
43
|
export * from './components/Admonition/Admonition';
|
|
44
|
+
export * from './components/MissingTranslationNotice/MissingTranslationNotice';
|
|
44
45
|
export * from './components/ApiOnboarding/AppCustomAttributes';
|
|
45
46
|
export * from './components/Navbar/Navbar';
|
|
46
47
|
export * from './components/Navbar/NavbarItem';
|
|
@@ -166,6 +167,7 @@ export * from './icons/ChatGptIcon/ChatGptIcon';
|
|
|
166
167
|
export * from './icons/CopyIcon/CopyIcon';
|
|
167
168
|
export * from './icons/ClaudeIcon/ClaudeIcon';
|
|
168
169
|
export * from './icons/GrokIcon/GrokIcon';
|
|
170
|
+
export * from './icons/McpIcon/McpIcon';
|
|
169
171
|
export * from './icons/CleanIcon/CleanIcon';
|
|
170
172
|
export * from './icons/GraphqlIcon/GraphqlIcon';
|
|
171
173
|
export * from './icons/DeselectIcon/DeselectIcon';
|
package/lib/index.js
CHANGED
|
@@ -83,6 +83,8 @@ __exportStar(require("./components/Markdown/styles/heading-anchor"), exports);
|
|
|
83
83
|
__exportStar(require("./components/Markdown/styles/links"), exports);
|
|
84
84
|
/* Admonition */
|
|
85
85
|
__exportStar(require("./components/Admonition/Admonition"), exports);
|
|
86
|
+
/* MissingTranslationNotice */
|
|
87
|
+
__exportStar(require("./components/MissingTranslationNotice/MissingTranslationNotice"), exports);
|
|
86
88
|
/* ApiOnboarding */
|
|
87
89
|
__exportStar(require("./components/ApiOnboarding/AppCustomAttributes"), exports);
|
|
88
90
|
/* Navbar */
|
|
@@ -230,6 +232,7 @@ __exportStar(require("./icons/ChatGptIcon/ChatGptIcon"), exports);
|
|
|
230
232
|
__exportStar(require("./icons/CopyIcon/CopyIcon"), exports);
|
|
231
233
|
__exportStar(require("./icons/ClaudeIcon/ClaudeIcon"), exports);
|
|
232
234
|
__exportStar(require("./icons/GrokIcon/GrokIcon"), exports);
|
|
235
|
+
__exportStar(require("./icons/McpIcon/McpIcon"), exports);
|
|
233
236
|
__exportStar(require("./icons/CleanIcon/CleanIcon"), exports);
|
|
234
237
|
__exportStar(require("./icons/GraphqlIcon/GraphqlIcon"), exports);
|
|
235
238
|
__exportStar(require("./icons/DeselectIcon/DeselectIcon"), exports);
|
|
@@ -8,9 +8,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const constants_1 = require("../core/constants");
|
|
10
10
|
const utils_1 = require("../core/utils");
|
|
11
|
+
const MissingTranslationNotice_1 = require("../components/MissingTranslationNotice/MissingTranslationNotice");
|
|
11
12
|
function CodeWalkthroughLayout({ className, children, }) {
|
|
12
13
|
return (react_1.default.createElement(LayoutWrapper, { "data-component-name": "Layout/CodeWalkthroughLayout", className: className },
|
|
13
|
-
react_1.default.createElement(ContentWrapper, null,
|
|
14
|
+
react_1.default.createElement(ContentWrapper, null,
|
|
15
|
+
react_1.default.createElement(Notice, null),
|
|
16
|
+
children)));
|
|
14
17
|
}
|
|
15
18
|
const LayoutWrapper = styled_components_1.default.div.attrs(({ className }) => ({
|
|
16
19
|
className,
|
|
@@ -19,6 +22,11 @@ const LayoutWrapper = styled_components_1.default.div.attrs(({ className }) => (
|
|
|
19
22
|
flex: 1;
|
|
20
23
|
width: 100%;
|
|
21
24
|
`;
|
|
25
|
+
const Notice = (0, styled_components_1.default)(MissingTranslationNotice_1.MissingTranslationNotice) `
|
|
26
|
+
max-width: var(--md-content-max-width);
|
|
27
|
+
margin-left: auto;
|
|
28
|
+
margin-right: auto;
|
|
29
|
+
`;
|
|
22
30
|
const ContentWrapper = styled_components_1.default.section `
|
|
23
31
|
width: 100%;
|
|
24
32
|
--md-content-font-size: var(--font-size-lg);
|
|
@@ -45,6 +45,7 @@ const constants_1 = require("../core/constants");
|
|
|
45
45
|
const CodeSnippetContext_1 = require("../core/contexts/CodeSnippetContext");
|
|
46
46
|
const DocumentationLayoutTop_1 = require("../layouts/DocumentationLayoutTop");
|
|
47
47
|
const DocumentationLayoutBottom_1 = require("../layouts/DocumentationLayoutBottom");
|
|
48
|
+
const MissingTranslationNotice_1 = require("../components/MissingTranslationNotice/MissingTranslationNotice");
|
|
48
49
|
function DocumentationLayout({ tableOfContent, feedback, config, editPage, lastModified, nextPage, prevPage, className, children, }) {
|
|
49
50
|
var _a, _b;
|
|
50
51
|
const { markdown } = (0, hooks_1.useThemeConfig)();
|
|
@@ -53,6 +54,7 @@ function DocumentationLayout({ tableOfContent, feedback, config, editPage, lastM
|
|
|
53
54
|
react_1.default.createElement(LayoutWrapper, { "data-component-name": "Layout/DocumentationLayout", className: className, $withToc: withToc },
|
|
54
55
|
react_1.default.createElement(ContentWrapper, null,
|
|
55
56
|
react_1.default.createElement(DocumentationLayoutTop_1.DocumentationLayoutTop, { config: config, editPage: editPage, lastModified: lastModified }),
|
|
57
|
+
react_1.default.createElement(MissingTranslationNotice_1.MissingTranslationNotice, null),
|
|
56
58
|
children,
|
|
57
59
|
react_1.default.createElement(DocumentationLayoutBottom_1.DocumentationLayoutBottom, { feedback: feedback, nextPage: nextPage, prevPage: prevPage })),
|
|
58
60
|
tableOfContent)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.71.0-next.
|
|
3
|
+
"version": "0.71.0-next.6",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@babel/core": "7.29.7",
|
|
45
45
|
"@markdoc/markdoc": "0.5.2",
|
|
46
|
-
"@redocly/realm-asyncapi-sdk": "0.17.0-next.
|
|
46
|
+
"@redocly/realm-asyncapi-sdk": "0.17.0-next.1",
|
|
47
47
|
"@redocly/tooling-test-utils": "0.0.0",
|
|
48
48
|
"@shikijs/types": "3.21.0",
|
|
49
49
|
"@testing-library/react": "16.3.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"webpack": "5.105.2"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@redocly/config": "0.
|
|
73
|
+
"@redocly/config": "0.67.0",
|
|
74
74
|
"@tanstack/react-query": "5.62.3",
|
|
75
75
|
"@tanstack/react-virtual": "3.13.0",
|
|
76
76
|
"@xyflow/react": "12.8.3",
|
|
@@ -21,7 +21,7 @@ export type CatalogClassicInfoBlockProps = {
|
|
|
21
21
|
export function CatalogClassicInfoBlock(props: CatalogClassicInfoBlockProps): JSX.Element {
|
|
22
22
|
const scorecardBadge = props.metadata?.scorecardLevel ? (
|
|
23
23
|
<ScorecardBadge
|
|
24
|
-
level={props.metadata.scorecardLevel
|
|
24
|
+
level={props.metadata.scorecardLevel}
|
|
25
25
|
slug={props.metadata?.scoreCardSlug as string}
|
|
26
26
|
colorVariable={getScorecardColorVariable(
|
|
27
27
|
props.metadata?.scorecardLevelIdx || 0,
|
|
@@ -134,8 +134,8 @@ export function Mood({ settings, onSubmit, className }: MoodProps): JSX.Element
|
|
|
134
134
|
|
|
135
135
|
const displayReasons = checkIfShouldDisplayReasons(score);
|
|
136
136
|
const displayComment = !!score && hasComment;
|
|
137
|
-
const displaySubmitBnt = !!(score && (displayReasons || displayComment));
|
|
138
137
|
const displayFeedbackEmail = !!score && hasOptionalEmail;
|
|
138
|
+
const displaySubmitBnt = !!score && (displayReasons || displayComment || displayFeedbackEmail);
|
|
139
139
|
|
|
140
140
|
const submitMood = (moodScore: string) => {
|
|
141
141
|
const trimmedComment = comment?.trim() || undefined;
|
|
@@ -101,8 +101,8 @@ export function Rating({ settings, onSubmit, className }: RatingProps): JSX.Elem
|
|
|
101
101
|
|
|
102
102
|
const displayReasons = !!score && hasReasons;
|
|
103
103
|
const displayComment = !!score && hasComment;
|
|
104
|
-
const displaySubmitBnt = !!(score && (displayReasons || displayComment));
|
|
105
104
|
const displayFeedbackEmail = !!score && hasOptionalEmail;
|
|
105
|
+
const displaySubmitBnt = !!score && (displayReasons || displayComment || displayFeedbackEmail);
|
|
106
106
|
|
|
107
107
|
if (isSubmitted) {
|
|
108
108
|
return (
|
|
@@ -121,8 +121,8 @@ export function Scale({ settings, onSubmit, className }: ScaleProps): JSX.Elemen
|
|
|
121
121
|
|
|
122
122
|
const displayReasons = !!score && hasReasons;
|
|
123
123
|
const displayComment = !!score && hasComment;
|
|
124
|
-
const displaySubmitBnt = !!score && (displayReasons || displayComment);
|
|
125
124
|
const displayFeedbackEmail = !!score && hasOptionalEmail;
|
|
125
|
+
const displaySubmitBnt = !!score && (displayReasons || displayComment || displayFeedbackEmail);
|
|
126
126
|
|
|
127
127
|
if (isSubmitted) {
|
|
128
128
|
return (
|
|
@@ -90,8 +90,8 @@ export function Sentiment({ settings, onSubmit, className }: SentimentProps): JS
|
|
|
90
90
|
|
|
91
91
|
const displayReasons = checkIfShouldDisplayReasons(score);
|
|
92
92
|
const displayComment = !!score && hasComment;
|
|
93
|
-
const displaySubmitBnt = !!(score && (displayReasons || displayComment));
|
|
94
93
|
const displayFeedbackEmail = !!score && hasOptionalEmail;
|
|
94
|
+
const displaySubmitBnt = !!score && (displayReasons || displayComment || displayFeedbackEmail);
|
|
95
95
|
|
|
96
96
|
const commentLabel =
|
|
97
97
|
score === 1
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
5
|
-
import type { FilterProps
|
|
5
|
+
import type { FilterProps } from '@redocly/theme/core/types';
|
|
6
6
|
|
|
7
7
|
import { FilterSelect } from '@redocly/theme/components/Filter/FilterSelect';
|
|
8
8
|
import { FilterCheckboxes } from '@redocly/theme/components/Filter/FilterCheckboxes';
|
|
@@ -21,7 +21,7 @@ export function Filter({
|
|
|
21
21
|
}: FilterProps): JSX.Element | null {
|
|
22
22
|
if (!filter.parentUsed) return null;
|
|
23
23
|
|
|
24
|
-
const FilterComponent = filterComponents[
|
|
24
|
+
const FilterComponent = filterComponents[filter.type || 'checkboxes'];
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<FilterGroup data-component-name="Filter/Filter" key={filter.property + filter.title}>
|
|
@@ -10,6 +10,7 @@ import { useMCPConfig, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
|
10
10
|
import {
|
|
11
11
|
generateClaudeCodeCommand,
|
|
12
12
|
generateCodexCommand,
|
|
13
|
+
generateGrokBuildCommand,
|
|
13
14
|
generateMCPDeepLink,
|
|
14
15
|
generateMcpInstallPrompt,
|
|
15
16
|
getBaseDataAttributes,
|
|
@@ -18,19 +19,20 @@ import { Button } from '@redocly/theme/components/Button/Button';
|
|
|
18
19
|
import { CodeBlock } from '@redocly/theme/components/CodeBlock/CodeBlock';
|
|
19
20
|
import { ClaudeIcon } from '@redocly/theme/icons/ClaudeIcon/ClaudeIcon';
|
|
20
21
|
import { ChatGptIcon } from '@redocly/theme/icons/ChatGptIcon/ChatGptIcon';
|
|
22
|
+
import { GrokIcon } from '@redocly/theme/icons/GrokIcon/GrokIcon';
|
|
21
23
|
import { Tabs, TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
|
|
22
24
|
import { TabItemFragment } from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
|
|
23
25
|
import { NumberedList } from '@redocly/theme/markdoc/components/NumberedList/NumberedList';
|
|
24
26
|
import { NumberedItem } from '@redocly/theme/markdoc/components/NumberedList/NumberedItem';
|
|
25
27
|
|
|
26
|
-
export type McpConnectionTab = 'claude' | 'chatgpt' | 'json';
|
|
28
|
+
export type McpConnectionTab = 'claude' | 'chatgpt' | 'grok' | 'json';
|
|
27
29
|
|
|
28
30
|
export type McpConnectionTabsProps = {
|
|
29
31
|
options?: McpConnectionTab[];
|
|
30
32
|
className?: string;
|
|
31
33
|
};
|
|
32
34
|
|
|
33
|
-
const DEFAULT_TAB_OPTIONS: McpConnectionTab[] = ['claude', 'chatgpt', 'json'];
|
|
35
|
+
const DEFAULT_TAB_OPTIONS: McpConnectionTab[] = ['claude', 'chatgpt', 'grok', 'json'];
|
|
34
36
|
|
|
35
37
|
const TAB_LABELS: Record<
|
|
36
38
|
McpConnectionTab,
|
|
@@ -46,9 +48,16 @@ const TAB_LABELS: Record<
|
|
|
46
48
|
defaultLabel: 'ChatGPT',
|
|
47
49
|
icon: ChatGptIcon,
|
|
48
50
|
},
|
|
51
|
+
grok: {
|
|
52
|
+
translationKey: 'page.mcpNotAllowed.tabs.grok',
|
|
53
|
+
defaultLabel: 'Grok',
|
|
54
|
+
icon: GrokIcon,
|
|
55
|
+
},
|
|
49
56
|
json: { translationKey: 'page.mcpNotAllowed.tabs.json', defaultLabel: 'JSON' },
|
|
50
57
|
};
|
|
51
58
|
|
|
59
|
+
const GROK_CONNECTORS_URL = 'https://grok.com/connectors';
|
|
60
|
+
|
|
52
61
|
type TabClient = { headline: string; content: ReactNode };
|
|
53
62
|
|
|
54
63
|
type SnippetId =
|
|
@@ -235,6 +244,51 @@ function renderTabContent(
|
|
|
235
244
|
},
|
|
236
245
|
assistantPromptClient,
|
|
237
246
|
]);
|
|
247
|
+
case 'grok':
|
|
248
|
+
return renderClientList([
|
|
249
|
+
{
|
|
250
|
+
headline: translate('page.mcpNotAllowed.snippets.grokBuild.headline', 'Grok Build'),
|
|
251
|
+
content: (
|
|
252
|
+
<>
|
|
253
|
+
{terminalHint}
|
|
254
|
+
<CodeBlock
|
|
255
|
+
lang="shell"
|
|
256
|
+
source={generateGrokBuildCommand(connection)}
|
|
257
|
+
header={snippetHeader(option, 'grok-build')}
|
|
258
|
+
wrapContents
|
|
259
|
+
/>
|
|
260
|
+
</>
|
|
261
|
+
),
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
headline: translate('page.mcpNotAllowed.snippets.grokApp.headline', 'Grok app'),
|
|
265
|
+
content: (
|
|
266
|
+
<>
|
|
267
|
+
<ConnectButton
|
|
268
|
+
variant="secondary"
|
|
269
|
+
icon={<GrokIcon />}
|
|
270
|
+
onClick={() => window.open(GROK_CONNECTORS_URL, '_blank')}
|
|
271
|
+
>
|
|
272
|
+
{translate(
|
|
273
|
+
'page.mcpNotAllowed.snippets.grokApp.openConnectors',
|
|
274
|
+
'Open Grok connectors',
|
|
275
|
+
)}
|
|
276
|
+
</ConnectButton>
|
|
277
|
+
<TabHint>
|
|
278
|
+
{translate(
|
|
279
|
+
'page.mcpNotAllowed.snippets.grokApp.instruction',
|
|
280
|
+
'On grok.com, open Connectors → New Connector → Custom and paste this server URL:',
|
|
281
|
+
)}
|
|
282
|
+
</TabHint>
|
|
283
|
+
<CodeBlock
|
|
284
|
+
lang="text"
|
|
285
|
+
source={connection.url}
|
|
286
|
+
header={snippetHeader(option, 'grok-app')}
|
|
287
|
+
/>
|
|
288
|
+
</>
|
|
289
|
+
),
|
|
290
|
+
},
|
|
291
|
+
]);
|
|
238
292
|
case 'json':
|
|
239
293
|
return (
|
|
240
294
|
<>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import type { JSX } from 'react';
|
|
5
|
+
|
|
6
|
+
import { CloseIcon } from '@redocly/theme/icons/CloseIcon/CloseIcon';
|
|
7
|
+
import { TranslateIcon } from '@redocly/theme/icons/TranslateIcon/TranslateIcon';
|
|
8
|
+
import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
|
|
9
|
+
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
10
|
+
|
|
11
|
+
export type MissingTranslationNoticeProps = {
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Tells the reader that the page shows the original language,
|
|
17
|
+
* because the translation for the selected locale is missing.
|
|
18
|
+
* Renders only on fallback pages of a locale that sets `showMissingTranslationNotice`.
|
|
19
|
+
* The reader can close the notice for the current page.
|
|
20
|
+
*/
|
|
21
|
+
export function MissingTranslationNotice({
|
|
22
|
+
className,
|
|
23
|
+
}: MissingTranslationNoticeProps): JSX.Element | null {
|
|
24
|
+
const { useTranslate, useMarkdownText, usePageProps, useL10nConfig } = useThemeHooks();
|
|
25
|
+
const { translate } = useTranslate();
|
|
26
|
+
const { isTranslationFallback } = usePageProps<{ isTranslationFallback?: boolean }>();
|
|
27
|
+
const { currentLocale, defaultLocale, locales } = useL10nConfig();
|
|
28
|
+
const [isDismissed, setIsDismissed] = React.useState(false);
|
|
29
|
+
|
|
30
|
+
const isShown =
|
|
31
|
+
isTranslationFallback === true &&
|
|
32
|
+
currentLocale !== defaultLocale &&
|
|
33
|
+
locales.some(
|
|
34
|
+
({ code, showMissingTranslationNotice }) =>
|
|
35
|
+
code === currentLocale && showMissingTranslationNotice === true,
|
|
36
|
+
);
|
|
37
|
+
const language = locales.find(({ code }) => code === defaultLocale)?.name || defaultLocale;
|
|
38
|
+
const content = useMarkdownText(
|
|
39
|
+
isShown ? translate('missingTranslationNotice.content', { language }) : '',
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
if (!isShown || isDismissed) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<MissingTranslationNoticeWrapper
|
|
48
|
+
className={className}
|
|
49
|
+
data-component-name="MissingTranslationNotice/MissingTranslationNotice"
|
|
50
|
+
>
|
|
51
|
+
<Icon color="--missing-translation-notice-icon-color" />
|
|
52
|
+
<Content>
|
|
53
|
+
<Title>
|
|
54
|
+
{translate('missingTranslationNotice.title', {
|
|
55
|
+
defaultValue: 'This page has not yet been translated',
|
|
56
|
+
})}
|
|
57
|
+
</Title>
|
|
58
|
+
<Markdown compact>{content}</Markdown>
|
|
59
|
+
</Content>
|
|
60
|
+
<CloseButton
|
|
61
|
+
type="button"
|
|
62
|
+
aria-label={translate('missingTranslationNotice.close', { defaultValue: 'Close' })}
|
|
63
|
+
onClick={() => setIsDismissed(true)}
|
|
64
|
+
>
|
|
65
|
+
<CloseIcon color="--missing-translation-notice-text-color" />
|
|
66
|
+
</CloseButton>
|
|
67
|
+
</MissingTranslationNoticeWrapper>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const MissingTranslationNoticeWrapper = styled.div`
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: row;
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
gap: var(--missing-translation-notice-gap);
|
|
76
|
+
|
|
77
|
+
padding: var(--missing-translation-notice-padding);
|
|
78
|
+
margin: var(--missing-translation-notice-margin-vertical) 0;
|
|
79
|
+
color: var(--missing-translation-notice-text-color);
|
|
80
|
+
background-color: var(--missing-translation-notice-bg-color);
|
|
81
|
+
border: 1px solid var(--missing-translation-notice-border-color);
|
|
82
|
+
border-left: var(--missing-translation-notice-accent-width) solid
|
|
83
|
+
var(--missing-translation-notice-accent-color);
|
|
84
|
+
border-radius: var(--missing-translation-notice-border-radius);
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
const Icon = styled(TranslateIcon)`
|
|
88
|
+
flex-shrink: 0;
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
const Content = styled.div`
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
flex: 1;
|
|
95
|
+
gap: var(--spacing-xxs);
|
|
96
|
+
|
|
97
|
+
font-size: var(--missing-translation-notice-font-size);
|
|
98
|
+
line-height: var(--missing-translation-notice-line-height);
|
|
99
|
+
`;
|
|
100
|
+
|
|
101
|
+
const Title = styled.span`
|
|
102
|
+
font-size: var(--missing-translation-notice-title-font-size);
|
|
103
|
+
font-weight: var(--missing-translation-notice-title-font-weight);
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
const CloseButton = styled.button`
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
padding: 0;
|
|
110
|
+
border: none;
|
|
111
|
+
background: none;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const missingTranslationNoticeDarkMode = css`
|
|
4
|
+
--missing-translation-notice-bg-color: var(--color-warm-grey-3); // @presenter Color
|
|
5
|
+
--missing-translation-notice-icon-color: var(--color-blue-4); // @presenter Color
|
|
6
|
+
--missing-translation-notice-accent-color: var(--color-blue-4); // @presenter Color
|
|
7
|
+
`;
|