@redocly/theme 0.70.0-next.4 → 0.70.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.
Files changed (113) hide show
  1. package/lib/components/Buttons/ConnectMCPButton.js +8 -13
  2. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.d.ts +1 -1
  3. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js +1 -1
  4. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +30 -11
  5. package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +2 -1
  6. package/lib/components/Dropdown/Dropdown.d.ts +4 -2
  7. package/lib/components/Dropdown/Dropdown.js +28 -8
  8. package/lib/components/Dropdown/DropdownMenu.d.ts +1 -0
  9. package/lib/components/Dropdown/DropdownMenu.js +1 -1
  10. package/lib/components/Feedback/Reasons.js +3 -2
  11. package/lib/components/Filter/FilterCheckboxes.js +30 -11
  12. package/lib/components/Filter/FilterDateRange.js +36 -2
  13. package/lib/components/Image/Image.js +24 -4
  14. package/lib/components/Search/SearchAiActivity.d.ts +10 -0
  15. package/lib/components/Search/SearchAiActivity.js +278 -0
  16. package/lib/components/Search/SearchAiDialog.js +5 -1
  17. package/lib/components/Search/SearchAiMessage.d.ts +2 -1
  18. package/lib/components/Search/SearchAiMessage.js +20 -108
  19. package/lib/components/Search/SearchItem.js +1 -8
  20. package/lib/components/Search/variables.js +15 -2
  21. package/lib/components/Segmented/Segmented.js +23 -3
  22. package/lib/components/Select/Select.js +10 -3
  23. package/lib/components/Select/SelectInput.d.ts +1 -0
  24. package/lib/components/Select/SelectInput.js +5 -11
  25. package/lib/components/SplitButton/SplitButton.js +37 -3
  26. package/lib/core/constants/mcp.d.ts +2 -2
  27. package/lib/core/constants/mcp.js +3 -8
  28. package/lib/core/constants/search.js +5 -1
  29. package/lib/core/hooks/index.d.ts +2 -0
  30. package/lib/core/hooks/index.js +2 -0
  31. package/lib/core/hooks/menu/use-collapse.js +1 -1
  32. package/lib/core/hooks/search/use-search-ai-activity.d.ts +11 -0
  33. package/lib/core/hooks/search/use-search-ai-activity.js +15 -0
  34. package/lib/core/hooks/use-connect-mcp-button.js +2 -1
  35. package/lib/core/hooks/use-full-height.d.ts +1 -1
  36. package/lib/core/hooks/use-full-height.js +8 -8
  37. package/lib/core/hooks/use-tab-list.d.ts +31 -0
  38. package/lib/core/hooks/use-tab-list.js +49 -0
  39. package/lib/core/styles/global.d.ts +2 -0
  40. package/lib/core/styles/global.js +80 -76
  41. package/lib/core/styles/index.d.ts +1 -0
  42. package/lib/core/styles/index.js +3 -1
  43. package/lib/core/styles/search-ai-appear.d.ts +1 -0
  44. package/lib/core/styles/search-ai-appear.js +18 -0
  45. package/lib/core/types/dropdown.d.ts +1 -0
  46. package/lib/core/types/dropdown.js +3 -0
  47. package/lib/core/types/index.d.ts +1 -0
  48. package/lib/core/types/l10n.d.ts +1 -1
  49. package/lib/core/types/mcp.d.ts +2 -1
  50. package/lib/core/types/search.d.ts +23 -0
  51. package/lib/core/utils/Dynamic.d.ts +8 -1
  52. package/lib/core/utils/Dynamic.js +34 -3
  53. package/lib/core/utils/assign-ref.d.ts +2 -0
  54. package/lib/core/utils/assign-ref.js +12 -0
  55. package/lib/core/utils/content-segments.d.ts +12 -1
  56. package/lib/core/utils/content-segments.js +90 -5
  57. package/lib/core/utils/dropdown.d.ts +2 -0
  58. package/lib/core/utils/dropdown.js +12 -0
  59. package/lib/core/utils/index.d.ts +2 -0
  60. package/lib/core/utils/index.js +2 -0
  61. package/lib/core/utils/mcp.d.ts +2 -1
  62. package/lib/core/utils/mcp.js +5 -0
  63. package/lib/core/utils/search-ai-activity.d.ts +4 -0
  64. package/lib/core/utils/search-ai-activity.js +83 -0
  65. package/lib/markdoc/tags/connect-mcp.js +15 -0
  66. package/package.json +2 -2
  67. package/src/components/Buttons/ConnectMCPButton.tsx +8 -14
  68. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.tsx +3 -1
  69. package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +37 -22
  70. package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +3 -2
  71. package/src/components/Dropdown/Dropdown.tsx +28 -6
  72. package/src/components/Dropdown/DropdownMenu.tsx +7 -1
  73. package/src/components/Feedback/Reasons.tsx +3 -2
  74. package/src/components/Filter/FilterCheckboxes.tsx +33 -18
  75. package/src/components/Filter/FilterDateRange.tsx +3 -2
  76. package/src/components/Image/Image.tsx +26 -5
  77. package/src/components/Search/SearchAiActivity.tsx +318 -0
  78. package/src/components/Search/SearchAiDialog.tsx +4 -3
  79. package/src/components/Search/SearchAiMessage.tsx +27 -135
  80. package/src/components/Search/SearchItem.tsx +2 -9
  81. package/src/components/Search/variables.ts +15 -2
  82. package/src/components/Segmented/Segmented.tsx +25 -16
  83. package/src/components/Select/Select.tsx +12 -6
  84. package/src/components/Select/SelectInput.tsx +10 -18
  85. package/src/components/SplitButton/SplitButton.tsx +8 -2
  86. package/src/core/constants/mcp.ts +3 -9
  87. package/src/core/constants/search.ts +5 -1
  88. package/src/core/hooks/__mocks__/index.ts +1 -0
  89. package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
  90. package/src/core/hooks/index.ts +2 -0
  91. package/src/core/hooks/menu/use-collapse.ts +1 -1
  92. package/src/core/hooks/search/use-search-ai-activity.ts +31 -0
  93. package/src/core/hooks/use-connect-mcp-button.ts +7 -2
  94. package/src/core/hooks/use-full-height.ts +8 -8
  95. package/src/core/hooks/use-tab-list.ts +63 -0
  96. package/src/core/styles/global.ts +80 -75
  97. package/src/core/styles/index.ts +2 -1
  98. package/src/core/styles/search-ai-appear.ts +16 -0
  99. package/src/core/types/dropdown.ts +1 -0
  100. package/src/core/types/index.ts +1 -0
  101. package/src/core/types/l10n.ts +1 -1
  102. package/src/core/types/mcp.ts +3 -1
  103. package/src/core/types/search.ts +21 -0
  104. package/src/core/utils/Dynamic.tsx +67 -35
  105. package/src/core/utils/assign-ref.ts +9 -0
  106. package/src/core/utils/content-segments.ts +98 -6
  107. package/src/core/utils/dropdown.ts +14 -0
  108. package/src/core/utils/index.ts +2 -0
  109. package/src/core/utils/mcp.ts +7 -1
  110. package/src/core/utils/search-ai-activity.ts +110 -0
  111. package/src/icons/CheckboxIcon/CheckboxIcon.tsx +1 -0
  112. package/src/icons/ChevronSortIcon/ChevronSortIcon.tsx +1 -0
  113. package/src/markdoc/tags/connect-mcp.ts +16 -1
@@ -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.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' | '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.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.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' | '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.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' | '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.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.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' | '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';
3
3
  export type Locale = {
4
4
  code: string;
5
5
  name: string;
@@ -1,5 +1,6 @@
1
+ import type { MCP_OPTIONS } from '../constants/mcp';
1
2
  export type MCPClientType = 'cursor' | 'vscode';
2
- export type MCPOption = 'cursor' | 'vscode' | 'claude-code' | 'codex' | 'copy';
3
+ export type MCPOption = (typeof MCP_OPTIONS)[number];
3
4
  export type McpConnectionParams = {
4
5
  serverName: string;
5
6
  url: string;
@@ -111,6 +111,29 @@ export type ContentSegment = {
111
111
  type: 'tool';
112
112
  toolCall: ToolCall;
113
113
  };
114
+ export type GroupedContentSegment = {
115
+ type: 'text';
116
+ text: string;
117
+ }
118
+ /** `isActive`: the assistant still works on this group, with nothing written after it yet. */
119
+ | {
120
+ type: 'tools';
121
+ toolCalls: ToolCall[];
122
+ isActive: boolean;
123
+ };
124
+ export type SearchAiActivityKind = 'thinking' | 'search' | 'code' | 'support';
125
+ export type SearchAiActivityStatus = {
126
+ label: string;
127
+ detail?: string;
128
+ kind: SearchAiActivityKind;
129
+ isRunning: boolean;
130
+ };
131
+ export type SearchAiActivityStep = {
132
+ id: string;
133
+ label: string;
134
+ kind: SearchAiActivityKind;
135
+ isRunning: boolean;
136
+ };
114
137
  export type AiSearchConversationItem = {
115
138
  role: AiSearchConversationRole;
116
139
  content: string;
@@ -3,7 +3,14 @@ interface DynamicOptions<TProps extends Record<string, unknown>> {
3
3
  ssr?: boolean;
4
4
  loading?: React.ComponentType<TProps>;
5
5
  }
6
+ /**
7
+ * A component from `dynamic()`. After `preload()` resolves, the component renders without a
8
+ * loading state. On the server, `preload()` does not load a client-only component (`ssr: false`).
9
+ */
10
+ export type DynamicComponent<TProps> = React.ComponentType<TProps> & {
11
+ preload(): Promise<void>;
12
+ };
6
13
  export declare function dynamic<TProps extends Record<string, unknown>>(factory: () => Promise<React.ComponentType<TProps> | {
7
14
  default: React.ComponentType<TProps>;
8
- } | Record<string, unknown>>, { ssr, loading }?: DynamicOptions<TProps>): React.ComponentType<TProps>;
15
+ } | Record<string, unknown>>, { ssr, loading }?: DynamicOptions<TProps>): DynamicComponent<TProps>;
9
16
  export {};
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -6,7 +15,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
15
  exports.dynamic = dynamic;
7
16
  const react_1 = __importDefault(require("react"));
8
17
  function dynamic(factory, { ssr = true, loading } = {}) {
9
- const Component = react_1.default.lazy(() => factory().then((mod) => {
18
+ let loaded;
19
+ let pending;
20
+ const load = () => (pending !== null && pending !== void 0 ? pending : (pending = factory()
21
+ .then((mod) => {
10
22
  // Case 1: factory() => import('./SomeModule') - direct import
11
23
  // Case 2: factory() => import('./SomeModule').then(mod => mod.default) - extract default
12
24
  if (typeof mod === 'function') {
@@ -38,10 +50,21 @@ function dynamic(factory, { ssr = true, loading } = {}) {
38
50
  }
39
51
  }
40
52
  throw new Error('Dynamic import did not return a valid React component');
41
- }));
53
+ })
54
+ .then((module) => {
55
+ loaded = module.default;
56
+ return module;
57
+ }, (error) => {
58
+ // A failed load is not kept, so the next preload tries again.
59
+ pending = undefined;
60
+ throw error;
61
+ })));
62
+ const LazyComponent = react_1.default.lazy(load);
42
63
  const LoadingComponent = loading || (() => null);
43
- return (props) => {
64
+ const DynamicComponent = (props) => {
44
65
  const [hasMounted, setHasMounted] = react_1.default.useState(false);
66
+ // Fixed per instance: a change of the element type would remount the component.
67
+ const [Component] = react_1.default.useState(() => loaded !== null && loaded !== void 0 ? loaded : LazyComponent);
45
68
  react_1.default.useEffect(() => {
46
69
  setHasMounted(true);
47
70
  }, []);
@@ -55,5 +78,13 @@ function dynamic(factory, { ssr = true, loading } = {}) {
55
78
  return (react_1.default.createElement(react_1.default.Suspense, { fallback: react_1.default.createElement(LoadingComponent, Object.assign({}, props)) },
56
79
  react_1.default.createElement(Component, Object.assign({}, props))));
57
80
  };
81
+ return Object.assign(DynamicComponent, {
82
+ preload() {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ if (ssr || typeof window !== 'undefined')
85
+ yield load();
86
+ });
87
+ },
88
+ });
58
89
  }
59
90
  //# sourceMappingURL=Dynamic.js.map
@@ -0,0 +1,2 @@
1
+ import type { Ref } from 'react';
2
+ export declare function assignRef<T>(ref: Ref<T> | undefined, value: T): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assignRef = assignRef;
4
+ function assignRef(ref, value) {
5
+ if (typeof ref === 'function') {
6
+ ref(value);
7
+ }
8
+ else if (ref) {
9
+ ref.current = value;
10
+ }
11
+ }
12
+ //# sourceMappingURL=assign-ref.js.map
@@ -1,2 +1,13 @@
1
- import type { ToolCall, ContentSegment } from '../types/search';
1
+ import type { ToolCall, ContentSegment, GroupedContentSegment } from '../types/search';
2
+ /**
3
+ * Splits an answer at its tool calls. A call made in the middle of a sentence or a code block is
4
+ * placed at the end of that paragraph, so the sentence reads as one piece.
5
+ */
2
6
  export declare function splitContentByToolCalls(content: string | undefined, toolCalls: ToolCall[] | undefined): ContentSegment[];
7
+ /**
8
+ * Groups consecutive tool calls and drops text that is only whitespace. While the answer is
9
+ * generated, an answer with nothing to show yet is one empty active group (the thinking status),
10
+ * and the last group is active until text that is not whitespace follows it.
11
+ */
12
+ export declare function groupToolCallSegments(segments: ContentSegment[], isGenerating?: boolean): GroupedContentSegment[];
13
+ export declare function hasToolCallsAndText(segments: ContentSegment[]): boolean;
@@ -1,22 +1,107 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.splitContentByToolCalls = splitContentByToolCalls;
4
+ exports.groupToolCallSegments = groupToolCallSegments;
5
+ exports.hasToolCallsAndText = hasToolCallsAndText;
6
+ const SENTENCE_END_MARKS = '.!?:;';
7
+ const CLOSING_MARKS = `"')]*_\``;
8
+ const CODE_FENCE = /^[ \t]*(```|~~~)/gm;
9
+ /**
10
+ * Splits an answer at its tool calls. A call made in the middle of a sentence or a code block is
11
+ * placed at the end of that paragraph, so the sentence reads as one piece.
12
+ */
4
13
  function splitContentByToolCalls(content, toolCalls) {
5
14
  if (!toolCalls || toolCalls.length === 0) {
6
15
  return [{ type: 'text', text: content || '' }];
7
16
  }
17
+ const text = content !== null && content !== void 0 ? content : '';
18
+ const fences = Array.from(text.matchAll(CODE_FENCE), (match) => match.index);
8
19
  const segments = [];
9
20
  let lastPos = 0;
10
21
  for (const toolCall of toolCalls) {
11
- if (content && toolCall.position > lastPos) {
12
- segments.push({ type: 'text', text: content.substring(lastPos, toolCall.position) });
22
+ const position = Math.max(lastPos, getBlockBoundary(text, toolCall.position, fences));
23
+ if (position > lastPos) {
24
+ segments.push({ type: 'text', text: text.substring(lastPos, position) });
13
25
  }
14
26
  segments.push({ type: 'tool', toolCall });
15
- lastPos = toolCall.position;
27
+ lastPos = position;
16
28
  }
17
- if (content && lastPos < content.length) {
18
- segments.push({ type: 'text', text: content.substring(lastPos) });
29
+ if (lastPos < text.length) {
30
+ segments.push({ type: 'text', text: text.substring(lastPos) });
19
31
  }
20
32
  return segments;
21
33
  }
34
+ function getBlockBoundary(content, position, fences) {
35
+ if (position <= 0 || position >= content.length) {
36
+ return position;
37
+ }
38
+ const isInsideCodeFence = (index) => {
39
+ let count = 0;
40
+ while (count < fences.length && fences[count] < index)
41
+ count++;
42
+ return count % 2 === 1;
43
+ };
44
+ if (!isInsideCodeFence(position) && endsBlockOrSentence(content, position)) {
45
+ return position;
46
+ }
47
+ for (let boundary = content.indexOf('\n\n', position); boundary !== -1; boundary = content.indexOf('\n\n', boundary + 2)) {
48
+ if (!isInsideCodeFence(boundary)) {
49
+ return boundary;
50
+ }
51
+ }
52
+ return content.length;
53
+ }
54
+ function endsBlockOrSentence(content, position) {
55
+ let index = position - 1;
56
+ while (index >= 0 && /\s/.test(content[index])) {
57
+ if (content[index] === '\n')
58
+ return true;
59
+ index--;
60
+ }
61
+ while (index >= 0 && CLOSING_MARKS.includes(content[index]))
62
+ index--;
63
+ return index >= 0 && SENTENCE_END_MARKS.includes(content[index]);
64
+ }
65
+ /**
66
+ * Groups consecutive tool calls and drops text that is only whitespace. While the answer is
67
+ * generated, an answer with nothing to show yet is one empty active group (the thinking status),
68
+ * and the last group is active until text that is not whitespace follows it.
69
+ */
70
+ function groupToolCallSegments(segments, isGenerating) {
71
+ var _a;
72
+ var _b;
73
+ const grouped = [];
74
+ let text = '';
75
+ for (const segment of segments) {
76
+ if (segment.type === 'text') {
77
+ text += segment.text;
78
+ if (segment.text.trim()) {
79
+ grouped.push(segment);
80
+ }
81
+ continue;
82
+ }
83
+ const previous = grouped.at(-1);
84
+ if ((previous === null || previous === void 0 ? void 0 : previous.type) === 'tools') {
85
+ previous.toolCalls.push(segment.toolCall);
86
+ }
87
+ else {
88
+ grouped.push({ type: 'tools', toolCalls: [segment.toolCall], isActive: false });
89
+ }
90
+ }
91
+ if (!isGenerating) {
92
+ return grouped;
93
+ }
94
+ const last = grouped.at(-1);
95
+ if ((last === null || last === void 0 ? void 0 : last.type) === 'tools') {
96
+ last.isActive = !text.slice((_b = (_a = last.toolCalls.at(-1)) === null || _a === void 0 ? void 0 : _a.position) !== null && _b !== void 0 ? _b : 0).trim();
97
+ }
98
+ else if (grouped.length === 0) {
99
+ return [{ type: 'tools', toolCalls: [], isActive: true }];
100
+ }
101
+ return grouped;
102
+ }
103
+ function hasToolCallsAndText(segments) {
104
+ return (segments.some((segment) => segment.type === 'tool') &&
105
+ segments.some((segment) => segment.type === 'text' && segment.text.trim().length > 0));
106
+ }
22
107
  //# sourceMappingURL=content-segments.js.map
@@ -0,0 +1,2 @@
1
+ import type { DropdownAlignment } from '../types/dropdown';
2
+ export declare function fitDropdownAlignment(anchor: DOMRect, menuWidth: number, alignment?: DropdownAlignment): DropdownAlignment;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fitDropdownAlignment = fitDropdownAlignment;
4
+ function fitDropdownAlignment(anchor, menuWidth, alignment = 'start') {
5
+ const fits = {
6
+ start: anchor.left + menuWidth <= window.innerWidth,
7
+ end: anchor.right - menuWidth >= 0,
8
+ };
9
+ const other = alignment === 'end' ? 'start' : 'end';
10
+ return fits[alignment] || !fits[other] ? alignment : other;
11
+ }
12
+ //# sourceMappingURL=dropdown.js.map
@@ -51,3 +51,5 @@ export * from './telemetry/get-base-data-attributes';
51
51
  export * from './telemetry/generate-before-after-context';
52
52
  export * from './RenderWithLink';
53
53
  export * from './consent-settings-link-placement';
54
+ export * from './assign-ref';
55
+ export * from './dropdown';
@@ -67,4 +67,6 @@ __exportStar(require("./telemetry/get-base-data-attributes"), exports);
67
67
  __exportStar(require("./telemetry/generate-before-after-context"), exports);
68
68
  __exportStar(require("./RenderWithLink"), exports);
69
69
  __exportStar(require("./consent-settings-link-placement"), exports);
70
+ __exportStar(require("./assign-ref"), exports);
71
+ __exportStar(require("./dropdown"), exports);
70
72
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,5 @@
1
- import type { MCPClientType, McpConnectionParams } from '../types';
1
+ import type { MCPClientType, McpConnectionParams, MCPOption } from '../types';
2
+ export declare function isMCPOption(value: unknown): value is MCPOption;
2
3
  export declare function generateMCPDeepLink(clientType: MCPClientType, config: McpConnectionParams): string;
3
4
  export declare function slugifyMcpServerName(name: string): string;
4
5
  export declare function generateClaudeCodeCommand(config: McpConnectionParams): string;
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMCPOption = isMCPOption;
3
4
  exports.generateMCPDeepLink = generateMCPDeepLink;
4
5
  exports.slugifyMcpServerName = slugifyMcpServerName;
5
6
  exports.generateClaudeCodeCommand = generateClaudeCodeCommand;
6
7
  exports.generateCodexCommand = generateCodexCommand;
7
8
  exports.generateMcpInstallPrompt = generateMcpInstallPrompt;
9
+ const mcp_1 = require("../constants/mcp");
10
+ function isMCPOption(value) {
11
+ return mcp_1.MCP_OPTIONS.includes(value);
12
+ }
8
13
  function generateCursorMCPDeepLink(config) {
9
14
  const cursorConfig = {
10
15
  url: config.url,
@@ -0,0 +1,4 @@
1
+ import type { TFunction } from '../types/l10n';
2
+ import { type SearchAiActivityStatus, type SearchAiActivityStep, type ToolCall } from '../types/search';
3
+ export declare function getSearchAiActivityStatus(toolCalls: ToolCall[], isActive: boolean, runningToolCall: ToolCall | undefined, translate: TFunction): SearchAiActivityStatus;
4
+ export declare function getSearchAiActivityStep(toolCall: ToolCall, isRunning: boolean, translate: TFunction): SearchAiActivityStep;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSearchAiActivityStatus = getSearchAiActivityStatus;
4
+ exports.getSearchAiActivityStep = getSearchAiActivityStep;
5
+ const search_1 = require("../types/search");
6
+ const search_2 = require("../constants/search");
7
+ const type_guards_1 = require("./type-guards");
8
+ function getSearchAiActivityStatus(toolCalls, isActive, runningToolCall, translate) {
9
+ var _a;
10
+ const latestToolCall = toolCalls.at(-1);
11
+ if (!latestToolCall) {
12
+ return {
13
+ label: translate('search.ai.thinkingText', 'Thinking...'),
14
+ kind: 'thinking',
15
+ isRunning: true,
16
+ };
17
+ }
18
+ if (isActive || toolCalls.length === 1) {
19
+ const toolCall = runningToolCall !== null && runningToolCall !== void 0 ? runningToolCall : latestToolCall;
20
+ return Object.assign(Object.assign({}, getToolCallLabel(toolCall, !isActive, translate)), { kind: getSearchAiActivityKind(toolCall.name), isRunning: isActive });
21
+ }
22
+ const isSameTool = toolCalls.every((toolCall) => toolCall.name === latestToolCall.name);
23
+ const sharedText = isSameTool
24
+ ? (_a = search_2.TOOL_CALL_DISPLAY_TEXT[latestToolCall.name]) === null || _a === void 0 ? void 0 : _a.completedText
25
+ : undefined;
26
+ return {
27
+ label: sharedText !== null && sharedText !== void 0 ? sharedText : translate('search.ai.toolCall.usedTools', 'Used tools'),
28
+ kind: isSameTool ? getSearchAiActivityKind(latestToolCall.name) : 'code',
29
+ isRunning: false,
30
+ };
31
+ }
32
+ function getSearchAiActivityStep(toolCall, isRunning, translate) {
33
+ const detail = getToolCallDetail(toolCall);
34
+ const kind = getSearchAiActivityKind(toolCall.name);
35
+ if (toolCall.name === search_1.ToolCallName.SearchDocumentation && detail) {
36
+ return { id: toolCall.id, label: `“${detail}”`, kind, isRunning };
37
+ }
38
+ const { label } = getToolCallLabel(toolCall, !isRunning, translate);
39
+ return { id: toolCall.id, label: detail ? label : stripEllipsis(label), kind, isRunning };
40
+ }
41
+ function getToolCallLabel(toolCall, isCompleted, translate) {
42
+ const detail = getToolCallDetail(toolCall);
43
+ if (toolCall.name === search_1.ToolCallName.Execute && detail) {
44
+ return { label: detail };
45
+ }
46
+ const builtInText = search_2.TOOL_CALL_DISPLAY_TEXT[toolCall.name];
47
+ if (builtInText) {
48
+ const text = isCompleted ? builtInText.completedText : builtInText.inProgressText;
49
+ return detail ? { label: stripEllipsis(text), detail } : { label: text };
50
+ }
51
+ const prefix = isCompleted
52
+ ? translate('search.ai.toolCall.executed', 'Executed')
53
+ : translate('search.ai.toolCall.executing', 'Executing');
54
+ return { label: `${prefix} ${toolCall.name}` };
55
+ }
56
+ function getSearchAiActivityKind(name) {
57
+ if (name === search_1.ToolCallName.SearchDocumentation)
58
+ return 'search';
59
+ if (name === search_1.ToolCallName.ContactSupport)
60
+ return 'support';
61
+ return 'code';
62
+ }
63
+ function getToolCallDetail(toolCall) {
64
+ switch (toolCall.name) {
65
+ case search_1.ToolCallName.SearchDocumentation:
66
+ return getStringArg(toolCall.args, 'query');
67
+ case search_1.ToolCallName.Execute:
68
+ return getStringArg(toolCall.args, 'description');
69
+ default:
70
+ return undefined;
71
+ }
72
+ }
73
+ function getStringArg(args, name) {
74
+ if (!(0, type_guards_1.isObject)(args) || !(name in args)) {
75
+ return undefined;
76
+ }
77
+ const value = Reflect.get(args, name);
78
+ return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
79
+ }
80
+ function stripEllipsis(text) {
81
+ return text.replace(/(\.{3}|…)$/, '');
82
+ }
83
+ //# sourceMappingURL=search-ai-activity.js.map
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.connectMcp = void 0;
4
4
  const constants_1 = require("../../core/constants");
5
+ const utils_1 = require("../../core/utils");
5
6
  exports.connectMcp = {
6
7
  schema: {
7
8
  render: 'ConnectMCP',
@@ -19,6 +20,20 @@ exports.connectMcp = {
19
20
  options: {
20
21
  type: Array,
21
22
  default: constants_1.DEFAULT_MCP_OPTIONS,
23
+ validate(value) {
24
+ if (!Array.isArray(value))
25
+ return [];
26
+ const unknownOptions = value.filter((option) => !(0, utils_1.isMCPOption)(option));
27
+ if (unknownOptions.length === 0)
28
+ return [];
29
+ return [
30
+ {
31
+ id: 'invalid-connect-mcp-options',
32
+ level: 'error',
33
+ message: `Invalid connect-mcp options: ${unknownOptions.join(', ')}. Must be one of: ${constants_1.MCP_OPTIONS.join(', ')}`,
34
+ },
35
+ ];
36
+ },
22
37
  },
23
38
  },
24
39
  selfClosing: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.70.0-next.4",
3
+ "version": "0.70.0-next.6",
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.61.0",
74
+ "@redocly/config": "0.62.0",
75
75
  "@tanstack/react-query": "5.62.3",
76
76
  "@tanstack/react-virtual": "3.13.0",
77
77
  "@xyflow/react": "12.8.3",
@@ -19,7 +19,6 @@ import { useConnectMCPButton, useThemeHooks } from '@redocly/theme/core/hooks';
19
19
  import { DEFAULT_MCP_OPTIONS } from '@redocly/theme/core/constants';
20
20
 
21
21
  type MenuOption = {
22
- key: MCPOption;
23
22
  icon: React.ComponentType;
24
23
  titleTranslationKey: string;
25
24
  titleDefault: string;
@@ -27,48 +26,43 @@ type MenuOption = {
27
26
  descriptionDefault: string;
28
27
  };
29
28
 
30
- const MENU_OPTIONS: MenuOption[] = [
31
- {
32
- key: 'cursor',
29
+ const MENU_OPTIONS: Record<MCPOption, MenuOption> = {
30
+ cursor: {
33
31
  icon: CursorIcon,
34
32
  titleTranslationKey: 'page.actions.connectMcp.cursor',
35
33
  titleDefault: 'Connect to Cursor',
36
34
  descriptionTranslationKey: 'page.actions.connectMcp.cursorDescription',
37
35
  descriptionDefault: 'Install MCP server on Cursor',
38
36
  },
39
- {
40
- key: 'vscode',
37
+ vscode: {
41
38
  icon: VSCodeIcon,
42
39
  titleTranslationKey: 'page.actions.connectMcp.vscode',
43
40
  titleDefault: 'Connect to VS Code',
44
41
  descriptionTranslationKey: 'page.actions.connectMcp.vscodeDescription',
45
42
  descriptionDefault: 'Install MCP server on VS Code',
46
43
  },
47
- {
48
- key: 'claude-code',
44
+ 'claude-code': {
49
45
  icon: ClaudeIcon,
50
46
  titleTranslationKey: 'page.actions.connectMcp.claudeCode',
51
47
  titleDefault: 'Connect to Claude Code',
52
48
  descriptionTranslationKey: 'page.actions.connectMcp.claudeCodeDescription',
53
49
  descriptionDefault: 'Copy the Claude Code CLI command',
54
50
  },
55
- {
56
- key: 'codex',
51
+ codex: {
57
52
  icon: CodexIcon,
58
53
  titleTranslationKey: 'page.actions.connectMcp.codex',
59
54
  titleDefault: 'Connect to Codex CLI',
60
55
  descriptionTranslationKey: 'page.actions.connectMcp.codexDescription',
61
56
  descriptionDefault: 'Copy the Codex CLI command',
62
57
  },
63
- {
64
- key: 'copy',
58
+ copy: {
65
59
  icon: CopyIcon,
66
60
  titleTranslationKey: 'page.actions.connectMcp.copyConfig',
67
61
  titleDefault: 'Copy MCP Configuration',
68
62
  descriptionTranslationKey: 'page.actions.connectMcp.copyConfigDescription',
69
63
  descriptionDefault: 'Copy MCP JSON Configuration',
70
64
  },
71
- ];
65
+ };
72
66
 
73
67
  // Copy actions keep the dropdown open so the copied checkmark is visible.
74
68
  const COPY_OPTIONS: MCPOption[] = ['claude-code', 'codex', 'copy'];
@@ -89,7 +83,7 @@ export function ConnectMCPButton({
89
83
 
90
84
  const { copiedOption, visibleOptions, handleAction } = useConnectMCPButton({ options });
91
85
 
92
- const menuOptions = MENU_OPTIONS.filter((option) => visibleOptions.includes(option.key));
86
+ const menuOptions = visibleOptions.map((key) => ({ key, ...MENU_OPTIONS[key] }));
93
87
  const primaryOption = menuOptions[0];
94
88
  const dropdownOptions = menuOptions.slice(1);
95
89