@redocly/theme 0.60.0-next.3 → 0.60.0-next.5
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/Buttons/variables.js +1 -1
- package/lib/core/types/catalog.d.ts +5 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/markdoc/components/Tabs/Tabs.d.ts +2 -1
- package/lib/markdoc/components/Tabs/Tabs.js +8 -3
- package/package.json +5 -5
- package/src/components/Buttons/variables.ts +1 -1
- package/src/core/hooks/__mocks__/use-controlled-state.ts +5 -2
- package/src/core/hooks/__mocks__/use-input-key-commands.ts +10 -2
- package/src/core/hooks/__mocks__/use-mobile-menu.ts +10 -2
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +4 -2
- package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +13 -2
- package/src/core/types/catalog.ts +5 -0
- package/src/core/types/l10n.ts +10 -0
- package/src/markdoc/components/Tabs/Tabs.tsx +11 -0
|
@@ -24,7 +24,7 @@ exports.aiAssistantButton = (0, styled_components_1.css) `
|
|
|
24
24
|
/* Positioning */
|
|
25
25
|
--ai-assistant-button-bottom: var(--spacing-xl);
|
|
26
26
|
--ai-assistant-button-right: var(--spacing-xl);
|
|
27
|
-
--ai-assistant-button-z-index:
|
|
27
|
+
--ai-assistant-button-z-index: calc(var(--z-index-overlay) - 1);
|
|
28
28
|
|
|
29
29
|
/* Typography */
|
|
30
30
|
--ai-assistant-button-font-size: var(--font-size-base);
|
|
@@ -119,6 +119,7 @@ export type BffCatalogRelatedEntity = {
|
|
|
119
119
|
relationType: EntityRelationType;
|
|
120
120
|
sourceFile?: string | null;
|
|
121
121
|
metadata?: Record<string, any>;
|
|
122
|
+
version?: string | null;
|
|
122
123
|
readonly createdAt: string | null;
|
|
123
124
|
readonly updatedAt: string | null;
|
|
124
125
|
};
|
|
@@ -150,6 +151,10 @@ export type BffCatalogEntity = {
|
|
|
150
151
|
}>;
|
|
151
152
|
sourceFile?: string;
|
|
152
153
|
readonly object: 'catalogEntityView';
|
|
154
|
+
readonly version?: string | null;
|
|
155
|
+
readonly revision: string;
|
|
156
|
+
readonly isCurrent?: boolean | null;
|
|
157
|
+
readonly isDefaultVersion?: boolean | null;
|
|
153
158
|
readonly createdAt: string;
|
|
154
159
|
readonly updatedAt: string;
|
|
155
160
|
};
|
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.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.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | '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.tags.more' | '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' | '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.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' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | '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' | '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.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | '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.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.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' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | '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.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | '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';
|
|
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.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.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | '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.tags.more' | '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' | '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.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' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | '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' | '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.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | '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.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.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' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | '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.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.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | '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';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -18,7 +18,8 @@ type TabsProps = {
|
|
|
18
18
|
size: TabsSize;
|
|
19
19
|
initialTab?: string;
|
|
20
20
|
forceReady?: boolean;
|
|
21
|
+
activeTab?: string;
|
|
21
22
|
};
|
|
22
|
-
export declare function Tabs({ id, children, className, size, initialTab: propInitialTab, forceReady, }: TabsProps): JSX.Element;
|
|
23
|
+
export declare function Tabs({ id, children, className, size, initialTab: propInitialTab, forceReady, activeTab: controlledActiveTab, }: TabsProps): JSX.Element;
|
|
23
24
|
export declare const TabContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
24
25
|
export {};
|
|
@@ -46,7 +46,7 @@ var TabsSize;
|
|
|
46
46
|
TabsSize["SMALL"] = "small";
|
|
47
47
|
TabsSize["MEDIUM"] = "medium";
|
|
48
48
|
})(TabsSize || (exports.TabsSize = TabsSize = {}));
|
|
49
|
-
function Tabs({ id, children, className, size, initialTab: propInitialTab, forceReady = false, }) {
|
|
49
|
+
function Tabs({ id, children, className, size, initialTab: propInitialTab, forceReady = false, activeTab: controlledActiveTab, }) {
|
|
50
50
|
var _a, _b;
|
|
51
51
|
const childrenArray = react_1.default.Children.toArray(children);
|
|
52
52
|
const [isReady, setIsReady] = (0, react_1.useState)(false);
|
|
@@ -62,10 +62,15 @@ function Tabs({ id, children, className, size, initialTab: propInitialTab, force
|
|
|
62
62
|
setIsReady(false);
|
|
63
63
|
}, [labelsHash]);
|
|
64
64
|
const inRouter = (0, react_router_dom_1.useInRouterContext)();
|
|
65
|
-
return (react_1.default.createElement(TabsView, { id: id, className: className, size: size, childrenArray: childrenArray, initialTab: initialTab, useActiveTab: inRouter ? useActiveTabWithRouter : useActiveTabWithoutRouter, isReady: isReady || forceReady, labelsHash: labelsHash, containerRef: containerRef, onReadyChange: handleReadyChange }));
|
|
65
|
+
return (react_1.default.createElement(TabsView, { id: id, className: className, size: size, childrenArray: childrenArray, initialTab: initialTab, useActiveTab: inRouter ? useActiveTabWithRouter : useActiveTabWithoutRouter, isReady: isReady || forceReady, labelsHash: labelsHash, containerRef: containerRef, onReadyChange: handleReadyChange, externalActiveTab: controlledActiveTab }));
|
|
66
66
|
}
|
|
67
|
-
function TabsView({ id, className, size, childrenArray, useActiveTab, initialTab, isReady, labelsHash, containerRef, onReadyChange, }) {
|
|
67
|
+
function TabsView({ id, className, size, childrenArray, useActiveTab, initialTab, isReady, labelsHash, containerRef, onReadyChange, externalActiveTab, }) {
|
|
68
68
|
const { activeTab, setActiveTab } = useActiveTab(initialTab, id, childrenArray);
|
|
69
|
+
(0, react_1.useEffect)(() => {
|
|
70
|
+
if (externalActiveTab && externalActiveTab !== activeTab) {
|
|
71
|
+
setActiveTab(externalActiveTab);
|
|
72
|
+
}
|
|
73
|
+
}, [externalActiveTab, activeTab, setActiveTab]);
|
|
69
74
|
return (react_1.default.createElement(TabsContainer, { "data-component-name": "Markdoc/Tabs/Tabs", className: className, key: id, "$isReady": isReady },
|
|
70
75
|
react_1.default.createElement(TabList_1.TabList, { key: labelsHash, size: size, childrenArray: childrenArray, activeTab: activeTab, onTabChange: setActiveTab, containerRef: containerRef, onReadyChange: onReadyChange }),
|
|
71
76
|
childrenArray.map((child, index) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.60.0-next.
|
|
3
|
+
"version": "0.60.0-next.5",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@types/react-dom": "^19.1.4",
|
|
51
51
|
"@types/styled-components": "5.1.34",
|
|
52
52
|
"@types/styled-system": "5.1.22",
|
|
53
|
-
"@vitest/coverage-v8": "^
|
|
53
|
+
"@vitest/coverage-v8": "^4.0.9",
|
|
54
54
|
"@vitest/ui": "3.2.4",
|
|
55
55
|
"concurrently": "7.6.0",
|
|
56
56
|
"json-schema-to-ts": "2.7.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"tsconfig-paths": "4.2.0",
|
|
68
68
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
69
69
|
"typescript": "5.9.3",
|
|
70
|
-
"vitest": "
|
|
70
|
+
"vitest": "4.0.9",
|
|
71
71
|
"vitest-when": "0.6.2",
|
|
72
72
|
"webpack": "5.94.0"
|
|
73
73
|
},
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"openapi-sampler": "1.6.2",
|
|
88
88
|
"react-calendar": "5.1.0",
|
|
89
89
|
"react-date-picker": "11.0.0",
|
|
90
|
-
"@redocly/config": "0.
|
|
91
|
-
"@redocly/realm-asyncapi-sdk": "0.6.0-next.
|
|
90
|
+
"@redocly/config": "0.40.0",
|
|
91
|
+
"@redocly/realm-asyncapi-sdk": "0.6.0-next.1"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
|
|
@@ -22,7 +22,7 @@ export const aiAssistantButton = css`
|
|
|
22
22
|
/* Positioning */
|
|
23
23
|
--ai-assistant-button-bottom: var(--spacing-xl);
|
|
24
24
|
--ai-assistant-button-right: var(--spacing-xl);
|
|
25
|
-
--ai-assistant-button-z-index:
|
|
25
|
+
--ai-assistant-button-z-index: calc(var(--z-index-overlay) - 1);
|
|
26
26
|
|
|
27
27
|
/* Typography */
|
|
28
28
|
--ai-assistant-button-font-size: var(--font-size-base);
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
1
|
+
import { vi, type MockedFunction } from 'vitest';
|
|
2
2
|
|
|
3
|
-
export const useInputKeyCommands
|
|
3
|
+
export const useInputKeyCommands: MockedFunction<
|
|
4
|
+
(actionHandlers?: {
|
|
5
|
+
onSelectAll?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
6
|
+
onEscape?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
7
|
+
onClear?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
8
|
+
onEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
9
|
+
onPaste?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
10
|
+
}) => { onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void }
|
|
11
|
+
> = vi.fn(() => ({
|
|
4
12
|
onKeyDown: vi.fn(),
|
|
5
13
|
}));
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
1
|
+
import { vi, type MockedFunction } from 'vitest';
|
|
2
2
|
|
|
3
|
-
export const useMobileMenu = ()
|
|
3
|
+
export const useMobileMenu = (): {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
openMobileMenu: MockedFunction<() => void>;
|
|
6
|
+
closeMobileMenu: MockedFunction<() => void>;
|
|
7
|
+
} => ({
|
|
8
|
+
isOpen: false,
|
|
9
|
+
openMobileMenu: vi.fn(),
|
|
10
|
+
closeMobileMenu: vi.fn(),
|
|
11
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
1
|
+
import { vi, type MockedFunction } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import type { ThemeHooks } from '../../types/hooks';
|
|
2
4
|
|
|
3
5
|
export const useThemeHooks = vi.fn(() => ({
|
|
4
6
|
useTranslate: vi.fn(() => ({
|
|
@@ -90,4 +92,4 @@ export const useThemeHooks = vi.fn(() => ({
|
|
|
90
92
|
useLoadAndNavigate: vi.fn(),
|
|
91
93
|
usePageProps: vi.fn().mockReturnValue({}),
|
|
92
94
|
usePageData: vi.fn().mockReturnValue(null),
|
|
93
|
-
}))
|
|
95
|
+
})) as unknown as MockedFunction<() => ThemeHooks>;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import { vi } from 'vitest';
|
|
1
|
+
import { vi, type MockedFunction } from 'vitest';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { ResolvedNavItem } from '@redocly/config';
|
|
4
|
+
|
|
5
|
+
import { MobileMenuType } from '../../../constants/common';
|
|
6
|
+
|
|
7
|
+
export const useMobileMenuItems: MockedFunction<
|
|
8
|
+
(menuType: MobileMenuType) => {
|
|
9
|
+
items: ResolvedNavItem[];
|
|
10
|
+
popDrilldownState: () => void;
|
|
11
|
+
pushDrilldownState: (drilldownDetails: unknown) => void;
|
|
12
|
+
backLink?: { slug?: string; label?: string };
|
|
13
|
+
}
|
|
14
|
+
> = vi.fn().mockReturnValue({
|
|
4
15
|
items: [
|
|
5
16
|
{
|
|
6
17
|
type: 'group',
|
|
@@ -144,6 +144,7 @@ export type BffCatalogRelatedEntity = {
|
|
|
144
144
|
sourceFile?: string | null;
|
|
145
145
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
146
146
|
metadata?: Record<string, any>;
|
|
147
|
+
version?: string | null;
|
|
147
148
|
readonly createdAt: string | null;
|
|
148
149
|
readonly updatedAt: string | null;
|
|
149
150
|
};
|
|
@@ -177,6 +178,10 @@ export type BffCatalogEntity = {
|
|
|
177
178
|
}>;
|
|
178
179
|
sourceFile?: string;
|
|
179
180
|
readonly object: 'catalogEntityView';
|
|
181
|
+
readonly version?: string | null;
|
|
182
|
+
readonly revision: string;
|
|
183
|
+
readonly isCurrent?: boolean | null;
|
|
184
|
+
readonly isDefaultVersion?: boolean | null;
|
|
180
185
|
readonly createdAt: string;
|
|
181
186
|
readonly updatedAt: string;
|
|
182
187
|
};
|
package/src/core/types/l10n.ts
CHANGED
|
@@ -332,6 +332,16 @@ export type TranslationKey =
|
|
|
332
332
|
| 'openapi.mcp.outputExample'
|
|
333
333
|
| 'asyncapi.download.description.title'
|
|
334
334
|
| 'asyncapi.info.title'
|
|
335
|
+
| 'graphql.download.description.title'
|
|
336
|
+
| 'graphql.info.title'
|
|
337
|
+
| 'graphql.info.contact.url'
|
|
338
|
+
| 'graphql.info.contact.name'
|
|
339
|
+
| 'graphql.info.license'
|
|
340
|
+
| 'graphql.info.termsOfService'
|
|
341
|
+
| 'graphql.overview'
|
|
342
|
+
| 'graphql.metadata'
|
|
343
|
+
| 'graphql.key'
|
|
344
|
+
| 'graphql.value'
|
|
335
345
|
| 'graphql.queries'
|
|
336
346
|
| 'graphql.mutations'
|
|
337
347
|
| 'graphql.subscriptions'
|
|
@@ -28,6 +28,7 @@ type TabsProps = {
|
|
|
28
28
|
size: TabsSize;
|
|
29
29
|
initialTab?: string;
|
|
30
30
|
forceReady?: boolean;
|
|
31
|
+
activeTab?: string;
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
type UseActiveTabFn = (
|
|
@@ -47,6 +48,7 @@ type TabsViewProps = Omit<TabsProps, 'children'> & {
|
|
|
47
48
|
useActiveTab: UseActiveTabFn;
|
|
48
49
|
containerRef: React.RefObject<HTMLUListElement | null>;
|
|
49
50
|
onReadyChange: (ready: boolean) => void;
|
|
51
|
+
externalActiveTab?: string;
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
export function Tabs({
|
|
@@ -56,6 +58,7 @@ export function Tabs({
|
|
|
56
58
|
size,
|
|
57
59
|
initialTab: propInitialTab,
|
|
58
60
|
forceReady = false,
|
|
61
|
+
activeTab: controlledActiveTab,
|
|
59
62
|
}: TabsProps): JSX.Element {
|
|
60
63
|
const childrenArray = React.Children.toArray(children) as React.ReactElement<TabItemProps>[];
|
|
61
64
|
const [isReady, setIsReady] = useState(false);
|
|
@@ -88,6 +91,7 @@ export function Tabs({
|
|
|
88
91
|
labelsHash={labelsHash}
|
|
89
92
|
containerRef={containerRef}
|
|
90
93
|
onReadyChange={handleReadyChange}
|
|
94
|
+
externalActiveTab={controlledActiveTab}
|
|
91
95
|
/>
|
|
92
96
|
);
|
|
93
97
|
}
|
|
@@ -103,9 +107,16 @@ function TabsView({
|
|
|
103
107
|
labelsHash,
|
|
104
108
|
containerRef,
|
|
105
109
|
onReadyChange,
|
|
110
|
+
externalActiveTab,
|
|
106
111
|
}: TabsViewProps): JSX.Element {
|
|
107
112
|
const { activeTab, setActiveTab } = useActiveTab(initialTab, id, childrenArray);
|
|
108
113
|
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
if (externalActiveTab && externalActiveTab !== activeTab) {
|
|
116
|
+
setActiveTab(externalActiveTab);
|
|
117
|
+
}
|
|
118
|
+
}, [externalActiveTab, activeTab, setActiveTab]);
|
|
119
|
+
|
|
109
120
|
return (
|
|
110
121
|
<TabsContainer
|
|
111
122
|
data-component-name="Markdoc/Tabs/Tabs"
|