@redocly/theme 0.66.0-next.3 → 0.66.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/Markdown/Markdown.js +0 -1
- package/lib/components/PageNavigation/NavigationButton.js +8 -0
- package/lib/components/PageNavigation/NextButton.d.ts +1 -1
- package/lib/components/PageNavigation/NextButton.js +1 -1
- package/lib/components/PageNavigation/PreviousButton.d.ts +1 -1
- package/lib/components/PageNavigation/PreviousButton.js +1 -1
- package/lib/components/PageNavigation/variables.js +2 -2
- package/lib/components/Search/SearchDialog.js +7 -2
- package/lib/components/Search/variables.js +1 -1
- package/lib/core/constants/environments.js +3 -1
- package/lib/core/types/hooks.d.ts +2 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/Markdown/Markdown.tsx +0 -1
- package/src/components/PageNavigation/NavigationButton.tsx +8 -0
- package/src/components/PageNavigation/NextButton.tsx +2 -2
- package/src/components/PageNavigation/PreviousButton.tsx +2 -2
- package/src/components/PageNavigation/variables.ts +2 -2
- package/src/components/Search/SearchDialog.tsx +17 -0
- package/src/components/Search/variables.ts +1 -1
- package/src/components/VersionPicker/VersionPicker.tsx +1 -1
- package/src/core/constants/environments.ts +3 -1
- package/src/core/types/hooks.ts +2 -0
- package/src/core/types/l10n.ts +2 -0
|
@@ -9,6 +9,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
|
|
|
9
9
|
const ArrowRightIcon_1 = require("../../icons/ArrowRightIcon/ArrowRightIcon");
|
|
10
10
|
const ArrowLeftIcon_1 = require("../../icons/ArrowLeftIcon/ArrowLeftIcon");
|
|
11
11
|
const Button_1 = require("../../components/Button/Button");
|
|
12
|
+
const utils_1 = require("../../core/utils");
|
|
12
13
|
function NavigationButton({ label, link, text, translationKey, position, icon = position === 'left' ? react_1.default.createElement(ArrowLeftIcon_1.ArrowLeftIcon, null) : react_1.default.createElement(ArrowRightIcon_1.ArrowRightIcon, null), className, }) {
|
|
13
14
|
return (react_1.default.createElement(NavigationButtonWrapper, { "data-component-name": "PageNavigation/NavigationButton", "data-translation-key": translationKey, position: position },
|
|
14
15
|
react_1.default.createElement(PageNavigationTitle, null, label),
|
|
@@ -19,12 +20,19 @@ const NavigationButtonWrapper = styled_components_1.default.div `
|
|
|
19
20
|
flex-direction: column;
|
|
20
21
|
width: var(--page-navigation-button-width);
|
|
21
22
|
text-align: ${({ position }) => position};
|
|
23
|
+
margin: ${({ position }) => (position === 'right' ? '0 0 0 auto' : '0 auto 0 0')};
|
|
22
24
|
padding: var(--page-navigation-button-padding);
|
|
23
25
|
gap: var(--page-navigation-button-gap);
|
|
24
26
|
border: var(--page-navigation-button-border);
|
|
25
27
|
border-radius: var(--page-navigation-button-border-radius);
|
|
26
28
|
min-width: var(--page-navigation-button-min-width);
|
|
27
29
|
|
|
30
|
+
@media screen and (max-width: ${utils_1.breakpoints.medium}) {
|
|
31
|
+
flex: 1;
|
|
32
|
+
width: auto;
|
|
33
|
+
margin: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
&:hover {
|
|
29
37
|
border: var(--page-navigation-button-border-hover);
|
|
30
38
|
}
|
|
@@ -4,4 +4,4 @@ export type NextPageType = {
|
|
|
4
4
|
nextPage?: ResolvedNavItemWithLink | null;
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
|
-
export declare function NextButton({ nextPage, className }: NextPageType): JSX.Element;
|
|
7
|
+
export declare function NextButton({ nextPage, className }: NextPageType): JSX.Element | null;
|
|
@@ -49,7 +49,7 @@ function NextButton({ nextPage, className }) {
|
|
|
49
49
|
const link = ((_d = (_c = frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.navigation) === null || _c === void 0 ? void 0 : _c.nextButton) === null || _d === void 0 ? void 0 : _d.link) || (nextPage === null || nextPage === void 0 ? void 0 : nextPage.link);
|
|
50
50
|
const text = ((_e = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _e === void 0 ? void 0 : _e.text) || translate(translationKey, { defaultValue: 'Next page' });
|
|
51
51
|
if (((_f = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _f === void 0 ? void 0 : _f.hide) || !link || !label) {
|
|
52
|
-
return
|
|
52
|
+
return null;
|
|
53
53
|
}
|
|
54
54
|
return (React.createElement(NavigationButton_1.NavigationButton, { label: label, link: link, text: text, translationKey: translationKey, position: "right", className: className, icon: React.createElement(ArrowRightIcon_1.ArrowRightIcon, null) }));
|
|
55
55
|
}
|
|
@@ -4,4 +4,4 @@ export type PreviousPageType = {
|
|
|
4
4
|
prevPage?: ResolvedNavItemWithLink | null;
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
|
-
export declare function PreviousButton({ prevPage, className }: PreviousPageType): JSX.Element;
|
|
7
|
+
export declare function PreviousButton({ prevPage, className }: PreviousPageType): JSX.Element | null;
|
|
@@ -20,7 +20,7 @@ function PreviousButton({ prevPage, className }) {
|
|
|
20
20
|
const text = ((_e = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _e === void 0 ? void 0 : _e.text) ||
|
|
21
21
|
translate(translationKey, { defaultValue: 'Previous page' });
|
|
22
22
|
if (((_f = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _f === void 0 ? void 0 : _f.hide) || !link || !label) {
|
|
23
|
-
return
|
|
23
|
+
return null;
|
|
24
24
|
}
|
|
25
25
|
return (react_1.default.createElement(NavigationButton_1.NavigationButton, { label: label, link: link, text: text, translationKey: translationKey, position: "left", className: className, icon: react_1.default.createElement(ArrowLeftIcon_1.ArrowLeftIcon, null) }));
|
|
26
26
|
}
|
|
@@ -7,9 +7,9 @@ exports.pageNavigation = (0, styled_components_1.css) `
|
|
|
7
7
|
* @tokens Page Navigation
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
--page-navigations-wrapper-gap: var(--spacing-
|
|
10
|
+
--page-navigations-wrapper-gap: var(--spacing-sm); // @presenter Spacing
|
|
11
11
|
|
|
12
|
-
--page-navigation-button-width:
|
|
12
|
+
--page-navigation-button-width: 50%; // @presenter Width
|
|
13
13
|
--page-navigation-button-padding: var(--spacing-sm) var(--spacing-base); // @presenter Spacing
|
|
14
14
|
--page-navigation-button-title-font-size: var(--font-size-lg); // @presenter FontSize
|
|
15
15
|
--page-navigation-button-title-font-weight: var(--font-weight-medium); // @presenter FontWeight
|
|
@@ -62,6 +62,8 @@ const ReturnKeyIcon_1 = require("../../icons/ReturnKeyIcon/ReturnKeyIcon");
|
|
|
62
62
|
const ChevronLeftIcon_1 = require("../../icons/ChevronLeftIcon/ChevronLeftIcon");
|
|
63
63
|
const EditIcon_1 = require("../../icons/EditIcon/EditIcon");
|
|
64
64
|
const AiStarsGradientIcon_1 = require("../../icons/AiStarsGradientIcon/AiStarsGradientIcon");
|
|
65
|
+
const ResetIcon_1 = require("../../icons/ResetIcon/ResetIcon");
|
|
66
|
+
const CloseFilledIcon_1 = require("../../icons/CloseFilledIcon/CloseFilledIcon");
|
|
65
67
|
function SearchDialog({ onClose, className, initialMode = 'search', }) {
|
|
66
68
|
const { useTranslate, useCurrentProduct, useSearch, useProducts, useAiSearch, useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
67
69
|
const telemetry = useTelemetry();
|
|
@@ -71,7 +73,7 @@ function SearchDialog({ onClose, className, initialMode = 'search', }) {
|
|
|
71
73
|
const [product, setProduct] = (0, react_1.useState)(currentProduct);
|
|
72
74
|
const [mode, setMode] = (0, react_1.useState)(initialMode);
|
|
73
75
|
const autoSearchDisabled = mode !== 'search';
|
|
74
|
-
const { query, setQuery, filter, setFilter, items, isSearchLoading, facets, setLoadMore, advancedSearch, askAi, groupField, } = useSearch(product === null || product === void 0 ? void 0 : product.name, autoSearchDisabled);
|
|
76
|
+
const { query, setQuery, filter, setFilter, items, isSearchLoading, facets, setLoadMore, advancedSearch, askAi, groupField, searchError, retrySearch, } = useSearch(product === null || product === void 0 ? void 0 : product.name, autoSearchDisabled);
|
|
75
77
|
const { isFilterOpen, onFilterToggle, onFilterChange, onFilterReset, onFacetReset, onQuickFilterReset, } = (0, hooks_1.useSearchFilter)(filter, setFilter);
|
|
76
78
|
const { addSearchHistoryItem } = (0, hooks_1.useRecentSearches)();
|
|
77
79
|
const aiSearch = useAiSearch({ filter: filter, product: product === null || product === void 0 ? void 0 : product.name });
|
|
@@ -278,7 +280,10 @@ function SearchDialog({ onClose, className, initialMode = 'search', }) {
|
|
|
278
280
|
return null;
|
|
279
281
|
})) : isSearchLoading ? (react_1.default.createElement(SearchMessage, { "data-translation-key": "search.loading" },
|
|
280
282
|
react_1.default.createElement(SpinnerLoader_1.SpinnerLoader, { size: "26px", color: "var(--search-input-icon-color)" }),
|
|
281
|
-
translate('search.loading', 'Loading...'))) : (react_1.default.createElement(SearchMessage, { "data-translation-key": "search.
|
|
283
|
+
translate('search.loading', 'Loading...'))) : searchError ? (react_1.default.createElement(SearchMessage, { "data-translation-key": "search.error" },
|
|
284
|
+
react_1.default.createElement(CloseFilledIcon_1.CloseFilledIcon, { size: "21px", color: "var(--color-error-base)" }),
|
|
285
|
+
translate('search.error.title', 'Oops! Something went wrong.'),
|
|
286
|
+
react_1.default.createElement(Button_1.Button, { variant: "secondary", size: "small", onClick: retrySearch, icon: react_1.default.createElement(ResetIcon_1.ResetIcon, null) }, translate('search.error.button', 'Try again')))) : (react_1.default.createElement(SearchMessage, { "data-translation-key": "search.noResults" },
|
|
282
287
|
react_1.default.createElement("b", null, translate('search.noResults.title', 'No results'))))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
283
288
|
react_1.default.createElement(SearchRecent_1.SearchRecent, { onSelect: (query, index) => {
|
|
284
289
|
telemetry.sendSearchRecentClickedMessage([
|
|
@@ -91,7 +91,7 @@ exports.search = (0, styled_components_1.css) `
|
|
|
91
91
|
--search-shortcuts-gap: var(--spacing-xs);
|
|
92
92
|
|
|
93
93
|
--search-message-font-size: var(--font-size-lg); // @presenter FontSize
|
|
94
|
-
--search-message-font-weight: var(--font-weight-
|
|
94
|
+
--search-message-font-weight: var(--font-weight-medium); // @presenter FontWeight
|
|
95
95
|
--search-message-line-height: var(--line-height-lg); // @presenter LineHeight
|
|
96
96
|
--search-message-text-color: var(--text-color-secondary); // @presenter Color
|
|
97
97
|
--search-message-gap: var(--spacing-md);
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SecurityVariablesEnvSuffix = void 0;
|
|
4
|
+
/* oxlint-disable typescript/no-duplicate-enum-values -- JWTToken and Token intentionally share _token */
|
|
4
5
|
var SecurityVariablesEnvSuffix;
|
|
5
6
|
(function (SecurityVariablesEnvSuffix) {
|
|
6
7
|
SecurityVariablesEnvSuffix["Username"] = "_username";
|
|
7
8
|
SecurityVariablesEnvSuffix["Password"] = "_password";
|
|
8
9
|
SecurityVariablesEnvSuffix["JWTToken"] = "_token";
|
|
9
10
|
SecurityVariablesEnvSuffix["APIKey"] = "";
|
|
10
|
-
//
|
|
11
|
+
// oxlint-disable-next-line typescript/no-duplicate-enum-values
|
|
11
12
|
SecurityVariablesEnvSuffix["Token"] = "_token";
|
|
12
13
|
SecurityVariablesEnvSuffix["ClientId"] = "_client_id";
|
|
13
14
|
SecurityVariablesEnvSuffix["ClientSecret"] = "_client_secret";
|
|
14
15
|
SecurityVariablesEnvSuffix["ClientAssertion"] = "_client_assertion";
|
|
15
16
|
})(SecurityVariablesEnvSuffix || (exports.SecurityVariablesEnvSuffix = SecurityVariablesEnvSuffix = {}));
|
|
17
|
+
/* oxlint-enable typescript/no-duplicate-enum-values */
|
|
16
18
|
//# sourceMappingURL=environments.js.map
|
|
@@ -76,6 +76,7 @@ export type ThemeHooks = {
|
|
|
76
76
|
setFilter: React.Dispatch<React.SetStateAction<SearchFilterItem[]>>;
|
|
77
77
|
items: Record<string, SearchItemData[] | null>;
|
|
78
78
|
isSearchLoading: boolean;
|
|
79
|
+
searchError: string | null;
|
|
79
80
|
facets: SearchFacet[];
|
|
80
81
|
groupField: string;
|
|
81
82
|
setLoadMore: React.Dispatch<React.SetStateAction<{
|
|
@@ -84,6 +85,7 @@ export type ThemeHooks = {
|
|
|
84
85
|
} | undefined>>;
|
|
85
86
|
advancedSearch?: boolean;
|
|
86
87
|
askAi?: boolean;
|
|
88
|
+
retrySearch: () => Promise<void>;
|
|
87
89
|
};
|
|
88
90
|
useAiSearch: (options?: {
|
|
89
91
|
filter?: SearchFilterItem[];
|
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | '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.languages.moreButton.tooltipText' | '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.implementedBy' | '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' | 'button.copy.tooltipText' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | '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.languages.moreButton.tooltipText' | '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.implementedBy' | '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' | 'button.copy.tooltipText' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.66.0-next.
|
|
3
|
+
"version": "0.66.0-next.5",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@types/nprogress": "0.2.3",
|
|
49
49
|
"@types/react": "^19.2.7",
|
|
50
50
|
"@types/react-dom": "^19.2.3",
|
|
51
|
-
"@vitest/coverage-v8": "4.
|
|
52
|
-
"@vitest/ui": "4.
|
|
51
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
52
|
+
"@vitest/ui": "4.1.8",
|
|
53
53
|
"concurrently": "7.6.0",
|
|
54
54
|
"react-router-dom": "^6.30.3",
|
|
55
55
|
"resize-observer-polyfill": "1.5.1",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"tsconfig-paths": "4.2.0",
|
|
61
61
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
62
62
|
"typescript": "6.0.3",
|
|
63
|
-
"vitest": "4.
|
|
63
|
+
"vitest": "4.1.8",
|
|
64
64
|
"vitest-when": "0.6.2",
|
|
65
65
|
"webpack": "5.105.2",
|
|
66
66
|
"@redocly/realm-asyncapi-sdk": "0.12.0-next.3"
|
|
@@ -6,6 +6,7 @@ import type { JSX } from 'react';
|
|
|
6
6
|
import { ArrowRightIcon } from '@redocly/theme/icons/ArrowRightIcon/ArrowRightIcon';
|
|
7
7
|
import { ArrowLeftIcon } from '@redocly/theme/icons/ArrowLeftIcon/ArrowLeftIcon';
|
|
8
8
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
9
|
+
import { breakpoints } from '@redocly/theme/core/utils';
|
|
9
10
|
|
|
10
11
|
type NavigationButtonPosition = 'left' | 'right';
|
|
11
12
|
|
|
@@ -49,12 +50,19 @@ const NavigationButtonWrapper = styled.div<{
|
|
|
49
50
|
flex-direction: column;
|
|
50
51
|
width: var(--page-navigation-button-width);
|
|
51
52
|
text-align: ${({ position }) => position};
|
|
53
|
+
margin: ${({ position }) => (position === 'right' ? '0 0 0 auto' : '0 auto 0 0')};
|
|
52
54
|
padding: var(--page-navigation-button-padding);
|
|
53
55
|
gap: var(--page-navigation-button-gap);
|
|
54
56
|
border: var(--page-navigation-button-border);
|
|
55
57
|
border-radius: var(--page-navigation-button-border-radius);
|
|
56
58
|
min-width: var(--page-navigation-button-min-width);
|
|
57
59
|
|
|
60
|
+
@media screen and (max-width: ${breakpoints.medium}) {
|
|
61
|
+
flex: 1;
|
|
62
|
+
width: auto;
|
|
63
|
+
margin: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
&:hover {
|
|
59
67
|
border: var(--page-navigation-button-border-hover);
|
|
60
68
|
}
|
|
@@ -12,7 +12,7 @@ export type NextPageType = {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export function NextButton({ nextPage, className }: NextPageType): JSX.Element {
|
|
15
|
+
export function NextButton({ nextPage, className }: NextPageType): JSX.Element | null {
|
|
16
16
|
const { navigation } = useThemeConfig();
|
|
17
17
|
const { useTranslate, usePageProps } = useThemeHooks();
|
|
18
18
|
const { frontmatter } = usePageProps();
|
|
@@ -26,7 +26,7 @@ export function NextButton({ nextPage, className }: NextPageType): JSX.Element {
|
|
|
26
26
|
navigation?.nextButton?.text || translate(translationKey, { defaultValue: 'Next page' });
|
|
27
27
|
|
|
28
28
|
if (navigation?.nextButton?.hide || !link || !label) {
|
|
29
|
-
return
|
|
29
|
+
return null;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
return (
|
|
@@ -12,7 +12,7 @@ export type PreviousPageType = {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export function PreviousButton({ prevPage, className }: PreviousPageType): JSX.Element {
|
|
15
|
+
export function PreviousButton({ prevPage, className }: PreviousPageType): JSX.Element | null {
|
|
16
16
|
const { navigation } = useThemeConfig();
|
|
17
17
|
const { useTranslate, usePageProps } = useThemeHooks();
|
|
18
18
|
const { frontmatter } = usePageProps();
|
|
@@ -27,7 +27,7 @@ export function PreviousButton({ prevPage, className }: PreviousPageType): JSX.E
|
|
|
27
27
|
translate(translationKey, { defaultValue: 'Previous page' });
|
|
28
28
|
|
|
29
29
|
if (navigation?.previousButton?.hide || !link || !label) {
|
|
30
|
-
return
|
|
30
|
+
return null;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
return (
|
|
@@ -5,9 +5,9 @@ export const pageNavigation = css`
|
|
|
5
5
|
* @tokens Page Navigation
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
--page-navigations-wrapper-gap: var(--spacing-
|
|
8
|
+
--page-navigations-wrapper-gap: var(--spacing-sm); // @presenter Spacing
|
|
9
9
|
|
|
10
|
-
--page-navigation-button-width:
|
|
10
|
+
--page-navigation-button-width: 50%; // @presenter Width
|
|
11
11
|
--page-navigation-button-padding: var(--spacing-sm) var(--spacing-base); // @presenter Spacing
|
|
12
12
|
--page-navigation-button-title-font-size: var(--font-size-lg); // @presenter FontSize
|
|
13
13
|
--page-navigation-button-title-font-weight: var(--font-weight-medium); // @presenter FontWeight
|
|
@@ -33,6 +33,8 @@ import { ReturnKeyIcon } from '@redocly/theme/icons/ReturnKeyIcon/ReturnKeyIcon'
|
|
|
33
33
|
import { ChevronLeftIcon } from '@redocly/theme/icons/ChevronLeftIcon/ChevronLeftIcon';
|
|
34
34
|
import { EditIcon } from '@redocly/theme/icons/EditIcon/EditIcon';
|
|
35
35
|
import { AiStarsGradientIcon } from '@redocly/theme/icons/AiStarsGradientIcon/AiStarsGradientIcon';
|
|
36
|
+
import { ResetIcon } from '@redocly/theme/icons/ResetIcon/ResetIcon';
|
|
37
|
+
import { CloseFilledIcon } from '@redocly/theme/icons/CloseFilledIcon/CloseFilledIcon';
|
|
36
38
|
|
|
37
39
|
export type SearchDialogProps = {
|
|
38
40
|
onClose: () => void;
|
|
@@ -66,6 +68,8 @@ export function SearchDialog({
|
|
|
66
68
|
advancedSearch,
|
|
67
69
|
askAi,
|
|
68
70
|
groupField,
|
|
71
|
+
searchError,
|
|
72
|
+
retrySearch,
|
|
69
73
|
} = useSearch(product?.name, autoSearchDisabled);
|
|
70
74
|
const {
|
|
71
75
|
isFilterOpen,
|
|
@@ -440,6 +444,19 @@ export function SearchDialog({
|
|
|
440
444
|
<SpinnerLoader size="26px" color="var(--search-input-icon-color)" />
|
|
441
445
|
{translate('search.loading', 'Loading...')}
|
|
442
446
|
</SearchMessage>
|
|
447
|
+
) : searchError ? (
|
|
448
|
+
<SearchMessage data-translation-key="search.error">
|
|
449
|
+
<CloseFilledIcon size="21px" color="var(--color-error-base)" />
|
|
450
|
+
{translate('search.error.title', 'Oops! Something went wrong.')}
|
|
451
|
+
<Button
|
|
452
|
+
variant="secondary"
|
|
453
|
+
size="small"
|
|
454
|
+
onClick={retrySearch}
|
|
455
|
+
icon={<ResetIcon />}
|
|
456
|
+
>
|
|
457
|
+
{translate('search.error.button', 'Try again')}
|
|
458
|
+
</Button>
|
|
459
|
+
</SearchMessage>
|
|
443
460
|
) : (
|
|
444
461
|
<SearchMessage data-translation-key="search.noResults">
|
|
445
462
|
<b>{translate('search.noResults.title', 'No results')}</b>
|
|
@@ -90,7 +90,7 @@ export const search = css`
|
|
|
90
90
|
--search-shortcuts-gap: var(--spacing-xs);
|
|
91
91
|
|
|
92
92
|
--search-message-font-size: var(--font-size-lg); // @presenter FontSize
|
|
93
|
-
--search-message-font-weight: var(--font-weight-
|
|
93
|
+
--search-message-font-weight: var(--font-weight-medium); // @presenter FontWeight
|
|
94
94
|
--search-message-line-height: var(--line-height-lg); // @presenter LineHeight
|
|
95
95
|
--search-message-text-color: var(--text-color-secondary); // @presenter Color
|
|
96
96
|
--search-message-gap: var(--spacing-md);
|
|
@@ -58,8 +58,8 @@ export function VersionPicker(props: { versions?: Version[]; onChange: (v: Versi
|
|
|
58
58
|
'aria-label': translate('versionPicker.label', 'Select version'),
|
|
59
59
|
}}
|
|
60
60
|
/>
|
|
61
|
-
{/* eslint-disable-next-line theme/require-translate */}
|
|
62
61
|
<SrOnly id="version-picker-description">
|
|
62
|
+
{/* eslint-disable-next-line theme/require-translate */}
|
|
63
63
|
This is version picker select, using it you can select a version of the API.
|
|
64
64
|
</SrOnly>
|
|
65
65
|
</VersionsPickerWrapper>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
/* oxlint-disable typescript/no-duplicate-enum-values -- JWTToken and Token intentionally share _token */
|
|
1
2
|
export enum SecurityVariablesEnvSuffix {
|
|
2
3
|
Username = '_username',
|
|
3
4
|
Password = '_password',
|
|
4
5
|
JWTToken = '_token',
|
|
5
6
|
APIKey = '',
|
|
6
|
-
//
|
|
7
|
+
// oxlint-disable-next-line typescript/no-duplicate-enum-values
|
|
7
8
|
Token = '_token',
|
|
8
9
|
ClientId = '_client_id',
|
|
9
10
|
ClientSecret = '_client_secret',
|
|
10
11
|
ClientAssertion = '_client_assertion',
|
|
11
12
|
}
|
|
13
|
+
/* oxlint-enable typescript/no-duplicate-enum-values */
|
package/src/core/types/hooks.ts
CHANGED
|
@@ -98,6 +98,7 @@ export type ThemeHooks = {
|
|
|
98
98
|
setFilter: React.Dispatch<React.SetStateAction<SearchFilterItem[]>>;
|
|
99
99
|
items: Record<string, SearchItemData[] | null>;
|
|
100
100
|
isSearchLoading: boolean;
|
|
101
|
+
searchError: string | null;
|
|
101
102
|
facets: SearchFacet[];
|
|
102
103
|
groupField: string;
|
|
103
104
|
setLoadMore: React.Dispatch<
|
|
@@ -111,6 +112,7 @@ export type ThemeHooks = {
|
|
|
111
112
|
>;
|
|
112
113
|
advancedSearch?: boolean;
|
|
113
114
|
askAi?: boolean;
|
|
115
|
+
retrySearch: () => Promise<void>;
|
|
114
116
|
};
|
|
115
117
|
useAiSearch: (options?: { filter?: SearchFilterItem[]; product?: string }) => {
|
|
116
118
|
askQuestion: (question: string, history?: AiSearchConversationItem[]) => void;
|
package/src/core/types/l10n.ts
CHANGED