@redocly/theme 0.63.0-next.5 → 0.63.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Accordion/variables.js +2 -2
- package/lib/components/Catalog/Catalog.js +114 -50
- package/lib/components/Catalog/CatalogAvatar.d.ts +5 -0
- package/lib/components/Catalog/CatalogAvatar.js +92 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +26 -7
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +10 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +17 -17
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.js +4 -20
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +53 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.js +3 -17
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +30 -9
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +16 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +8 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +11 -5
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.js +7 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +4 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +25 -8
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +24 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +6 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.js +26 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +30 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +13 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.js +30 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +11 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.js +21 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.js +25 -0
- package/lib/components/Catalog/CatalogPageDescription.js +0 -6
- package/lib/components/Catalog/CatalogSelector.d.ts +0 -1
- package/lib/components/Catalog/CatalogSelector.js +50 -16
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +20 -5
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -23
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +2 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +14 -6
- package/lib/components/Catalog/variables.js +78 -36
- package/lib/components/Filter/variables.js +1 -1
- package/lib/components/LoadMore/LoadMore.js +1 -0
- package/lib/components/PageActions/PageActions.js +1 -2
- package/lib/components/UserMenu/UserMenu.js +1 -3
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/use-is-truncated.d.ts +1 -0
- package/lib/core/hooks/use-is-truncated.js +19 -0
- package/lib/core/hooks/use-tabs.d.ts +1 -1
- package/lib/core/hooks/use-tabs.js +30 -17
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/utils/custom-catalog-options-casing.d.ts +15 -0
- package/lib/core/utils/custom-catalog-options-casing.js +32 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +2 -2
- package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -2
- package/lib/markdoc/components/Tabs/Tabs.js +9 -22
- package/package.json +4 -4
- package/src/components/Accordion/variables.ts +2 -2
- package/src/components/Catalog/Catalog.tsx +157 -95
- package/src/components/Catalog/CatalogAvatar.tsx +68 -0
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +29 -5
- package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +10 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +17 -17
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.tsx +4 -21
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +82 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.tsx +4 -22
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +39 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +19 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +8 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +12 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +10 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +30 -6
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +31 -0
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +34 -0
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +40 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +54 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +34 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +39 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +0 -6
- package/src/components/Catalog/CatalogSelector.tsx +23 -21
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +37 -6
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -26
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +24 -9
- package/src/components/Catalog/variables.ts +78 -36
- package/src/components/Filter/variables.ts +1 -1
- package/src/components/LoadMore/LoadMore.tsx +1 -0
- package/src/components/PageActions/PageActions.tsx +1 -2
- package/src/components/UserMenu/UserMenu.tsx +1 -3
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +1 -1
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/use-is-truncated.ts +20 -0
- package/src/core/hooks/use-tabs.ts +40 -21
- package/src/core/types/l10n.ts +2 -0
- package/src/core/utils/custom-catalog-options-casing.ts +29 -0
- package/src/core/utils/index.ts +1 -0
- package/src/markdoc/components/MarkdocExample/MarkdocExample.tsx +2 -6
- package/src/markdoc/components/Tabs/Tabs.tsx +4 -37
|
@@ -126,8 +126,7 @@ const StyledDropdownMenuItem = (0, styled_components_1.default)(DropdownMenuItem
|
|
|
126
126
|
& > a {
|
|
127
127
|
display: inline-block;
|
|
128
128
|
width: 100%;
|
|
129
|
-
padding: var(--dropdown-menu-item-padding-vertical)
|
|
130
|
-
var(--dropdown-menu-item-padding-horizontal);
|
|
129
|
+
padding: var(--dropdown-menu-item-padding-vertical) var(--dropdown-menu-item-padding-horizontal);
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
`;
|
|
@@ -85,9 +85,7 @@ const StyledDropdown = (0, styled_components_1.default)(Dropdown_1.Dropdown).att
|
|
|
85
85
|
--dropdown-menu-item-bg-color-active: var(--user-menu-dropdown-item-bg-color-active);
|
|
86
86
|
--dropdown-menu-item-bg-color-hover: var(--user-menu-dropdown-item-bg-color-hover);
|
|
87
87
|
--dropdown-menu-item-bg-color-disabled: var(--user-menu-dropdown-item-bg-color-disabled);
|
|
88
|
-
--dropdown-menu-item-separator-border-color: var(
|
|
89
|
-
--user-menu-dropdown-item-separator-border-color
|
|
90
|
-
);
|
|
88
|
+
--dropdown-menu-item-separator-border-color: var(--user-menu-dropdown-item-separator-border-color);
|
|
91
89
|
--dropdown-menu-item-color-dangerous: var(--user-menu-dropdown-item-color-dangerous);
|
|
92
90
|
--dropdown-menu-item-color-disabled: var(--user-menu-dropdown-item-color-disabled);
|
|
93
91
|
--dropdown-menu-item-color-active: var(--user-menu-dropdown-item-color-active);
|
package/lib/core/hooks/index.js
CHANGED
|
@@ -65,4 +65,5 @@ __exportStar(require("./catalog/use-catalog-entity-details"), exports);
|
|
|
65
65
|
__exportStar(require("./catalog/use-catalog-entity-schema"), exports);
|
|
66
66
|
__exportStar(require("./catalog/use-catalog-table-header-cell-actions"), exports);
|
|
67
67
|
__exportStar(require("./use-store"), exports);
|
|
68
|
+
__exportStar(require("./use-is-truncated"), exports);
|
|
68
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsTruncated<T extends HTMLElement>(content: string | null): [React.RefObject<T | null>, boolean];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useIsTruncated = useIsTruncated;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useIsTruncated(content) {
|
|
6
|
+
const ref = (0, react_1.useRef)(null);
|
|
7
|
+
const [isTruncated, setIsTruncated] = (0, react_1.useState)(false);
|
|
8
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
9
|
+
const el = ref.current;
|
|
10
|
+
if (!el) {
|
|
11
|
+
setIsTruncated(false);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
setIsTruncated(el.scrollWidth > el.clientWidth);
|
|
15
|
+
}
|
|
16
|
+
}, [content]);
|
|
17
|
+
return [ref, isTruncated];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=use-is-truncated.js.map
|
|
@@ -19,6 +19,6 @@ type UseActiveTabProps = {
|
|
|
19
19
|
export declare function useTabs({ activeTab, onTabChange, totalTabs, containerRef, }: UseTabsProps): UseTabsReturn;
|
|
20
20
|
export declare const useActiveTab: ({ initialTab, tabsId }: UseActiveTabProps) => {
|
|
21
21
|
activeTab: string;
|
|
22
|
-
setActiveTab: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
22
|
+
setActiveTab: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
23
23
|
};
|
|
24
24
|
export {};
|
|
@@ -215,33 +215,46 @@ function useTabs({ activeTab, onTabChange, totalTabs, containerRef, }) {
|
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
const useActiveTab = ({ initialTab, tabsId }) => {
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
const prevActiveTabRef = (0, react_1.useRef)(activeTab);
|
|
218
|
+
const location = (0, react_router_dom_1.useLocation)();
|
|
219
|
+
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
220
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)(undefined);
|
|
221
|
+
const resolvedActiveTab = activeTab !== null && activeTab !== void 0 ? activeTab : initialTab;
|
|
222
|
+
const prevActiveTabRef = (0, react_1.useRef)(resolvedActiveTab);
|
|
224
223
|
(0, react_1.useEffect)(() => {
|
|
225
|
-
|
|
224
|
+
if (activeTab !== undefined) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
setActiveTab(getInitialTab({ initialTab, hash: location.hash, tabsId }));
|
|
228
|
+
}, [activeTab, initialTab, location.hash, tabsId]);
|
|
229
|
+
(0, react_1.useEffect)(() => {
|
|
230
|
+
const hasActiveTabChanged = prevActiveTabRef.current !== resolvedActiveTab;
|
|
226
231
|
if (!tabsId || !hasActiveTabChanged) {
|
|
227
232
|
return;
|
|
228
233
|
}
|
|
229
|
-
prevActiveTabRef.current =
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
prevActiveTabRef.current = resolvedActiveTab;
|
|
235
|
+
const nextHashParams = new URLSearchParams(location.hash.startsWith('#') ? location.hash.slice(1) : location.hash);
|
|
236
|
+
nextHashParams.set(tabsId, resolvedActiveTab);
|
|
237
|
+
const nextHash = `#${nextHashParams.toString()}`;
|
|
238
|
+
if (nextHash === location.hash) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
navigate({
|
|
242
|
+
pathname: location.pathname,
|
|
243
|
+
search: location.search,
|
|
244
|
+
hash: nextHash,
|
|
245
|
+
}, { replace: true });
|
|
246
|
+
}, [resolvedActiveTab, navigate, location.pathname, location.search, location.hash, tabsId]);
|
|
235
247
|
return (0, react_1.useMemo)(() => ({
|
|
236
|
-
activeTab,
|
|
248
|
+
activeTab: resolvedActiveTab,
|
|
237
249
|
setActiveTab,
|
|
238
|
-
}), [
|
|
250
|
+
}), [resolvedActiveTab]);
|
|
239
251
|
};
|
|
240
252
|
exports.useActiveTab = useActiveTab;
|
|
241
|
-
const getInitialTab = ({ initialTab,
|
|
253
|
+
const getInitialTab = ({ initialTab, hash, tabsId }) => {
|
|
254
|
+
const hashParams = new URLSearchParams(hash.startsWith('#') ? hash.slice(1) : hash);
|
|
242
255
|
let resultTab = initialTab;
|
|
243
256
|
if (tabsId) {
|
|
244
|
-
const tabFromUrl =
|
|
257
|
+
const tabFromUrl = hashParams.get(tabsId);
|
|
245
258
|
resultTab = tabFromUrl ? tabFromUrl : resultTab;
|
|
246
259
|
}
|
|
247
260
|
return resultTab;
|
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.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.toolResult.found' | 'search.ai.toolResult.found.documents' | 'search.ai.toolCall.searching' | '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.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' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | '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.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' | 'mermaid.openFullscreen' | 'mermaid.zoomIn' | 'mermaid.zoomOut' | 'mermaid.reset' | 'mermaid.close' | 'mermaid.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.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.toolResult.found' | 'search.ai.toolResult.found.documents' | 'search.ai.toolCall.searching' | '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.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' | '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.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' | 'mermaid.openFullscreen' | 'mermaid.zoomIn' | 'mermaid.zoomOut' | 'mermaid.reset' | 'mermaid.close' | 'mermaid.viewer';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a string to title case for catalog option labels.
|
|
3
|
+
* Splits on whitespace, hyphens, and underscores; capitalizes each word.
|
|
4
|
+
* The first word is rendered as "API" when it is "api" (case-insensitive).
|
|
5
|
+
*
|
|
6
|
+
* @param str - The raw string to format (e.g. from config or entity data).
|
|
7
|
+
* @returns The formatted label with words capitalized and joined by spaces.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* customCatalogOptionsCasing('api_spec') // 'API Spec'
|
|
11
|
+
* customCatalogOptionsCasing('my-custom-option') // 'My Custom Option'
|
|
12
|
+
* customCatalogOptionsCasing('user name') // 'User Name'
|
|
13
|
+
* customCatalogOptionsCasing(' api version ') // 'API Version'
|
|
14
|
+
*/
|
|
15
|
+
export declare function customCatalogOptionsCasing(str: string): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customCatalogOptionsCasing = customCatalogOptionsCasing;
|
|
4
|
+
/**
|
|
5
|
+
* Converts a string to title case for catalog option labels.
|
|
6
|
+
* Splits on whitespace, hyphens, and underscores; capitalizes each word.
|
|
7
|
+
* The first word is rendered as "API" when it is "api" (case-insensitive).
|
|
8
|
+
*
|
|
9
|
+
* @param str - The raw string to format (e.g. from config or entity data).
|
|
10
|
+
* @returns The formatted label with words capitalized and joined by spaces.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* customCatalogOptionsCasing('api_spec') // 'API Spec'
|
|
14
|
+
* customCatalogOptionsCasing('my-custom-option') // 'My Custom Option'
|
|
15
|
+
* customCatalogOptionsCasing('user name') // 'User Name'
|
|
16
|
+
* customCatalogOptionsCasing(' api version ') // 'API Version'
|
|
17
|
+
*/
|
|
18
|
+
function customCatalogOptionsCasing(str) {
|
|
19
|
+
const trimmedStr = str.trim();
|
|
20
|
+
if (!trimmedStr)
|
|
21
|
+
return trimmedStr;
|
|
22
|
+
const words = trimmedStr.split(/[\s-_]+/);
|
|
23
|
+
return words
|
|
24
|
+
.map((word, index) => {
|
|
25
|
+
if (index === 0 && word.toLowerCase() === 'api') {
|
|
26
|
+
return 'API';
|
|
27
|
+
}
|
|
28
|
+
return word[0].toUpperCase() + word.slice(1);
|
|
29
|
+
})
|
|
30
|
+
.join(' ');
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=custom-catalog-options-casing.js.map
|
package/lib/core/utils/index.js
CHANGED
|
@@ -60,4 +60,5 @@ __exportStar(require("./frontmatter-translate"), exports);
|
|
|
60
60
|
__exportStar(require("./transform-revisions-to-version-history"), exports);
|
|
61
61
|
__exportStar(require("./build-revision-url"), exports);
|
|
62
62
|
__exportStar(require("./content-segments"), exports);
|
|
63
|
+
__exportStar(require("./custom-catalog-options-casing"), exports);
|
|
63
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -46,9 +46,9 @@ function MarkdocExample(props) {
|
|
|
46
46
|
return (React.createElement("div", { "data-component-name": "Markdoc/MarkdocExample/MarkdocExample" },
|
|
47
47
|
renderLabels ? React.createElement(Label, null, codeLabel ? codeLabel : 'Code:') : null,
|
|
48
48
|
React.createElement(CodeBlock_1.CodeBlock, { lang: language, source: rawContent, header: { title, controls: { copy: {} } } }),
|
|
49
|
-
renderDemo ?
|
|
49
|
+
renderDemo ? React.createElement(React.Fragment, null,
|
|
50
50
|
renderLabels ? React.createElement(Label, null, resultLabel ? resultLabel : 'Result:') : null,
|
|
51
|
-
...demoContent)
|
|
51
|
+
...demoContent) : null));
|
|
52
52
|
}
|
|
53
53
|
const Label = styled_components_1.default.div `
|
|
54
54
|
margin: 10px 0;
|
|
@@ -17,9 +17,8 @@ type TabsProps = {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
size: TabsSize;
|
|
19
19
|
initialTab?: string;
|
|
20
|
-
forceReady?: boolean;
|
|
21
20
|
activeTab?: string;
|
|
22
21
|
};
|
|
23
|
-
export declare function Tabs({ id, children, className, size, initialTab: propInitialTab,
|
|
22
|
+
export declare function Tabs({ id, children, className, size, initialTab: propInitialTab, activeTab: controlledActiveTab, }: TabsProps): JSX.Element;
|
|
24
23
|
export declare const TabContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
25
24
|
export {};
|
|
@@ -32,12 +32,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
39
|
exports.TabContent = exports.TabsSize = void 0;
|
|
37
40
|
exports.Tabs = Tabs;
|
|
38
41
|
const react_1 = __importStar(require("react"));
|
|
39
42
|
const react_router_dom_1 = require("react-router-dom");
|
|
40
|
-
const styled_components_1 =
|
|
43
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
41
44
|
const hooks_1 = require("../../../core/hooks");
|
|
42
45
|
const TabList_1 = require("../../../markdoc/components/Tabs/TabList");
|
|
43
46
|
const utils_1 = require("../../../core/utils");
|
|
@@ -46,33 +49,24 @@ var TabsSize;
|
|
|
46
49
|
TabsSize["SMALL"] = "small";
|
|
47
50
|
TabsSize["MEDIUM"] = "medium";
|
|
48
51
|
})(TabsSize || (exports.TabsSize = TabsSize = {}));
|
|
49
|
-
function Tabs({ id, children, className, size, initialTab: propInitialTab,
|
|
52
|
+
function Tabs({ id, children, className, size, initialTab: propInitialTab, activeTab: controlledActiveTab, }) {
|
|
50
53
|
var _a, _b;
|
|
51
54
|
const childrenArray = react_1.default.Children.toArray(children);
|
|
52
|
-
const [isReady, setIsReady] = (0, react_1.useState)(false);
|
|
53
55
|
const containerRef = (0, react_1.useRef)(null);
|
|
54
56
|
const initialTab = (_b = propInitialTab !== null && propInitialTab !== void 0 ? propInitialTab : (_a = childrenArray[0]) === null || _a === void 0 ? void 0 : _a.props.label) !== null && _b !== void 0 ? _b : '';
|
|
55
57
|
const labelsHash = childrenArray.map((c) => c.props.label).join('|');
|
|
56
|
-
const handleReadyChange = (0, react_1.useCallback)((ready) => {
|
|
57
|
-
setIsReady(ready);
|
|
58
|
-
}, []);
|
|
59
|
-
// Reset isReady when children change (new page/tabs)
|
|
60
|
-
// Use useLayoutEffect to run synchronously before paint
|
|
61
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
62
|
-
setIsReady(false);
|
|
63
|
-
}, [labelsHash]);
|
|
64
58
|
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,
|
|
59
|
+
return (react_1.default.createElement(TabsView, { id: id, className: className, size: size, childrenArray: childrenArray, initialTab: initialTab, useActiveTab: inRouter ? useActiveTabWithRouter : useActiveTabWithoutRouter, labelsHash: labelsHash, containerRef: containerRef, externalActiveTab: controlledActiveTab }));
|
|
66
60
|
}
|
|
67
|
-
function TabsView({ id, className, size, childrenArray, useActiveTab, initialTab,
|
|
61
|
+
function TabsView({ id, className, size, childrenArray, useActiveTab, initialTab, labelsHash, containerRef, externalActiveTab, }) {
|
|
68
62
|
const { activeTab, setActiveTab } = useActiveTab(initialTab, id, childrenArray);
|
|
69
63
|
(0, react_1.useEffect)(() => {
|
|
70
64
|
if (externalActiveTab && externalActiveTab !== activeTab) {
|
|
71
65
|
setActiveTab(externalActiveTab);
|
|
72
66
|
}
|
|
73
67
|
}, [externalActiveTab, activeTab, setActiveTab]);
|
|
74
|
-
return (react_1.default.createElement(TabsContainer, { "data-component-name": "Markdoc/Tabs/Tabs", className: className, key: id
|
|
75
|
-
react_1.default.createElement(TabList_1.TabList, { key: labelsHash, size: size, childrenArray: childrenArray, activeTab: activeTab, onTabChange: setActiveTab, containerRef: containerRef
|
|
68
|
+
return (react_1.default.createElement(TabsContainer, { "data-component-name": "Markdoc/Tabs/Tabs", className: className, key: id },
|
|
69
|
+
react_1.default.createElement(TabList_1.TabList, { key: labelsHash, size: size, childrenArray: childrenArray, activeTab: activeTab, onTabChange: setActiveTab, containerRef: containerRef }),
|
|
76
70
|
childrenArray.map((child, index) => {
|
|
77
71
|
const { label } = child.props;
|
|
78
72
|
const tabId = (0, utils_1.getTabId)(label, index);
|
|
@@ -123,13 +117,6 @@ const TabsContainer = styled_components_1.default.div `
|
|
|
123
117
|
margin: 0;
|
|
124
118
|
padding: 0;
|
|
125
119
|
}
|
|
126
|
-
|
|
127
|
-
${({ $isReady }) => !$isReady &&
|
|
128
|
-
(0, styled_components_1.css) `
|
|
129
|
-
opacity: 0;
|
|
130
|
-
pointer-events: none;
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
`}
|
|
133
120
|
`;
|
|
134
121
|
exports.TabContent = styled_components_1.default.div `
|
|
135
122
|
color: var(--md-tabs-content-text-color);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.63.0-next.
|
|
3
|
+
"version": "0.63.0-next.6",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"vitest": "4.0.10",
|
|
64
64
|
"vitest-when": "0.6.2",
|
|
65
65
|
"webpack": "5.105.2",
|
|
66
|
-
"@redocly/realm-asyncapi-sdk": "0.9.0-next.
|
|
66
|
+
"@redocly/realm-asyncapi-sdk": "0.9.0-next.5"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@tanstack/react-query": "5.62.3",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"lodash.debounce": "^4.0.8",
|
|
79
79
|
"lodash.throttle": "4.1.1",
|
|
80
80
|
"nprogress": "0.2.0",
|
|
81
|
-
"openapi-sampler": "1.7.
|
|
81
|
+
"openapi-sampler": "^1.7.2",
|
|
82
82
|
"react-calendar": "5.1.0",
|
|
83
83
|
"react-date-picker": "11.0.0",
|
|
84
|
-
"@redocly/config": "0.44.
|
|
84
|
+
"@redocly/config": "0.44.1"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
|
|
@@ -28,7 +28,7 @@ export const accordion = css`
|
|
|
28
28
|
--accordion-header-font-size: var(--font-size-base); // @presenter FontSize
|
|
29
29
|
--accordion-header-font-weight: var(--font-weight-medium, 500); // @presenter FontWeight
|
|
30
30
|
--accordion-header-text-color: var(--text-color-primary);
|
|
31
|
-
--accordion-header-padding: var(--spacing-sm) var(--spacing-base);
|
|
31
|
+
--accordion-header-padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-xs) var(--spacing-base);
|
|
32
32
|
--accordion-header-line-height: var(--line-height-base); // @presenter LineHeight
|
|
33
33
|
--accordion-header-bg-color: transparent; // @presenter Color
|
|
34
34
|
--accordion-header-border: none; // @presenter Border
|
|
@@ -41,7 +41,7 @@ export const accordion = css`
|
|
|
41
41
|
--accordion-body-font-size: var(--font-size-base); // @presenter FontSize
|
|
42
42
|
--accordion-body-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
43
43
|
--accordion-body-text-color: var(--text-color-secondary);
|
|
44
|
-
--accordion-body-padding: 0 var(--spacing-
|
|
44
|
+
--accordion-body-padding: 0 var(--spacing-sm) var(--spacing-sm) var(--spacing-base);
|
|
45
45
|
--accordion-body-bg-color: transparent; // @presenter Color
|
|
46
46
|
--accordion-body-border: none; // @presenter Border
|
|
47
47
|
|