@redocly/theme 0.70.0-next.2 → 0.70.0-next.4
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/Catalog/Catalog.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +2 -2
- package/lib/components/CodeBlock/CodeBlockControls.js +3 -5
- package/lib/components/Consent/Consent.d.ts +2 -0
- package/lib/components/Consent/Consent.js +17 -0
- package/lib/components/Consent/ConsentBanner.d.ts +2 -0
- package/lib/components/Consent/ConsentBanner.js +120 -0
- package/lib/components/Consent/ConsentDialog.d.ts +2 -0
- package/lib/components/Consent/ConsentDialog.js +128 -0
- package/lib/components/Consent/ConsentSettingsLink.d.ts +2 -0
- package/lib/components/Consent/ConsentSettingsLink.js +35 -0
- package/lib/components/Consent/variables.d.ts +1 -0
- package/lib/components/Consent/variables.js +31 -0
- package/lib/components/Dropdown/Dropdown.js +3 -1
- package/lib/components/Footer/Footer.js +4 -1
- package/lib/components/JsonViewer/Helpers.d.ts +10 -2
- package/lib/components/JsonViewer/Helpers.js +29 -33
- package/lib/components/JsonViewer/JsonViewer.js +15 -18
- package/lib/components/Markdown/Markdown.js +3 -2
- package/lib/components/Markdown/styles/base-table.js +14 -1
- package/lib/components/Markdown/variables.js +1 -0
- package/lib/components/Menu/Menu.js +4 -0
- package/lib/components/Menu/MenuSelect.d.ts +7 -0
- package/lib/components/Menu/MenuSelect.js +129 -0
- package/lib/components/Menu/variables.js +43 -4
- package/lib/components/Navbar/Navbar.js +44 -5
- package/lib/components/Navbar/variables.js +3 -0
- package/lib/components/NavigationTabs/NavigationTab.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTab.js +93 -0
- package/lib/components/NavigationTabs/NavigationTabContent.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabContent.js +50 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.js +18 -0
- package/lib/components/NavigationTabs/NavigationTabs.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabs.js +97 -0
- package/lib/components/NavigationTabs/variables.d.ts +1 -0
- package/lib/components/NavigationTabs/variables.js +37 -0
- package/lib/components/Product/utils.js +1 -1
- package/lib/components/Search/SearchAiMessage.js +1 -1
- package/lib/components/Search/SearchAiResponse.js +1 -0
- package/lib/components/Search/SearchTrigger.js +8 -2
- package/lib/components/Sidebar/Sidebar.js +2 -2
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/core/constants/common.d.ts +1 -0
- package/lib/core/constants/common.js +1 -0
- package/lib/core/constants/consent.d.ts +2 -0
- package/lib/core/constants/consent.js +30 -0
- package/lib/core/constants/index.d.ts +1 -0
- package/lib/core/constants/index.js +1 -0
- package/lib/core/hooks/index.d.ts +3 -0
- package/lib/core/hooks/index.js +3 -0
- package/lib/core/hooks/menu/use-mobile-menu-items.js +75 -51
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +12 -7
- package/lib/core/hooks/use-consent-dialog.d.ts +12 -0
- package/lib/core/hooks/use-consent-dialog.js +36 -0
- package/lib/core/hooks/use-consent-telemetry.d.ts +1 -0
- package/lib/core/hooks/use-consent-telemetry.js +42 -0
- package/lib/core/hooks/use-scroll-item-into-view.d.ts +2 -0
- package/lib/core/hooks/use-scroll-item-into-view.js +16 -0
- package/lib/core/hooks/use-theme-hooks.js +16 -0
- package/lib/core/styles/global.js +54 -42
- package/lib/core/types/consent.d.ts +54 -0
- package/lib/core/types/consent.js +3 -0
- package/lib/core/types/hooks.d.ts +7 -0
- package/lib/core/types/index.d.ts +2 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/navigation-tabs.d.ts +49 -0
- package/lib/core/types/navigation-tabs.js +3 -0
- package/lib/core/utils/consent-settings-link-placement.d.ts +3 -0
- package/lib/core/utils/consent-settings-link-placement.js +15 -0
- package/lib/core/utils/index.d.ts +2 -0
- package/lib/core/utils/index.js +2 -0
- package/lib/core/utils/mcp.js +1 -1
- package/lib/core/utils/menu.d.ts +4 -0
- package/lib/core/utils/menu.js +48 -8
- package/lib/core/utils/navigation-tabs.d.ts +8 -0
- package/lib/core/utils/navigation-tabs.js +71 -0
- package/lib/core/utils/urls.js +3 -1
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.d.ts +29 -0
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.js +81 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +8 -1
- package/lib/layouts/PageLayout.js +1 -1
- package/lib/layouts/RootLayout.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +3 -3
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +1 -1
- package/package.json +3 -3
- package/src/components/Catalog/Catalog.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +1 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -2
- package/src/components/CodeBlock/CodeBlockControls.tsx +4 -7
- package/src/components/Consent/Consent.tsx +18 -0
- package/src/components/Consent/ConsentBanner.tsx +110 -0
- package/src/components/Consent/ConsentDialog.tsx +210 -0
- package/src/components/Consent/ConsentSettingsLink.tsx +44 -0
- package/src/components/Consent/variables.ts +28 -0
- package/src/components/Dropdown/Dropdown.tsx +4 -1
- package/src/components/Footer/Footer.tsx +2 -0
- package/src/components/JsonViewer/Helpers.tsx +46 -51
- package/src/components/JsonViewer/JsonViewer.tsx +23 -25
- package/src/components/Markdown/Markdown.tsx +3 -2
- package/src/components/Markdown/styles/base-table.ts +14 -1
- package/src/components/Markdown/variables.ts +1 -0
- package/src/components/Menu/Menu.tsx +5 -0
- package/src/components/Menu/MenuSelect.tsx +198 -0
- package/src/components/Menu/variables.ts +43 -4
- package/src/components/Navbar/Navbar.tsx +22 -5
- package/src/components/Navbar/variables.ts +3 -0
- package/src/components/NavigationTabs/NavigationTab.tsx +148 -0
- package/src/components/NavigationTabs/NavigationTabContent.tsx +66 -0
- package/src/components/NavigationTabs/NavigationTabMenu.tsx +40 -0
- package/src/components/NavigationTabs/NavigationTabs.tsx +83 -0
- package/src/components/NavigationTabs/variables.ts +34 -0
- package/src/components/Product/utils.ts +1 -1
- package/src/components/Search/SearchAiMessage.tsx +1 -1
- package/src/components/Search/SearchAiResponse.tsx +1 -0
- package/src/components/Search/SearchTrigger.tsx +11 -2
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/TableOfContent/TableOfContent.tsx +2 -2
- package/src/core/constants/common.ts +1 -0
- package/src/core/constants/consent.ts +29 -0
- package/src/core/constants/index.ts +1 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +17 -0
- package/src/core/hooks/index.ts +3 -0
- package/src/core/hooks/menu/use-mobile-menu-items.ts +91 -56
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +14 -6
- package/src/core/hooks/use-consent-dialog.ts +51 -0
- package/src/core/hooks/use-consent-telemetry.ts +56 -0
- package/src/core/hooks/use-scroll-item-into-view.ts +18 -0
- package/src/core/hooks/use-theme-hooks.ts +16 -0
- package/src/core/styles/global.ts +14 -2
- package/src/core/types/consent.ts +51 -0
- package/src/core/types/hooks.ts +7 -0
- package/src/core/types/index.ts +2 -0
- package/src/core/types/l10n.ts +25 -1
- package/src/core/types/navigation-tabs.ts +54 -0
- package/src/core/utils/consent-settings-link-placement.ts +18 -0
- package/src/core/utils/index.ts +2 -0
- package/src/core/utils/mcp.ts +1 -1
- package/src/core/utils/menu.ts +54 -9
- package/src/core/utils/navigation-tabs.ts +99 -0
- package/src/core/utils/urls.ts +3 -1
- package/src/icons/ExpandCollapseIcon/ExpandCollapseIcon.tsx +56 -0
- package/src/index.ts +7 -0
- package/src/layouts/PageLayout.tsx +1 -1
- package/src/layouts/RootLayout.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +3 -3
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useScrollItemIntoView = useScrollItemIntoView;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useScrollItemIntoView(listRef, activeIndex) {
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
const list = listRef.current;
|
|
8
|
+
const activeItem = activeIndex === -1 ? undefined : list === null || list === void 0 ? void 0 : list.children[activeIndex];
|
|
9
|
+
if (!list || !activeItem)
|
|
10
|
+
return;
|
|
11
|
+
const listRect = list.getBoundingClientRect();
|
|
12
|
+
const itemRect = activeItem.getBoundingClientRect();
|
|
13
|
+
list.scrollLeft += itemRect.left - listRect.left - (listRect.width - itemRect.width) / 2;
|
|
14
|
+
}, [listRef, activeIndex]);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=use-scroll-item-into-view.js.map
|
|
@@ -17,12 +17,28 @@ const fallbacks = {
|
|
|
17
17
|
useOtelTelemetry: () => ({ send: () => { } }),
|
|
18
18
|
useBreadcrumbs: () => ({ breadcrumbs: [], siblings: undefined }),
|
|
19
19
|
useBanner: () => ({ banner: undefined, dismissBanner: () => { } }),
|
|
20
|
+
useConsent: () => ({
|
|
21
|
+
enabled: false,
|
|
22
|
+
config: undefined,
|
|
23
|
+
mode: undefined,
|
|
24
|
+
state: undefined,
|
|
25
|
+
decided: false,
|
|
26
|
+
gpc: false,
|
|
27
|
+
isDialogOpen: false,
|
|
28
|
+
openDialog: () => { },
|
|
29
|
+
closeDialog: () => { },
|
|
30
|
+
accept: () => { },
|
|
31
|
+
reject: () => { },
|
|
32
|
+
save: () => { },
|
|
33
|
+
}),
|
|
20
34
|
useCodeHighlight: () => ({ highlight: (rawContent) => rawContent }),
|
|
21
35
|
useUserMenu: () => ({}),
|
|
22
36
|
usePageData: () => null,
|
|
23
37
|
usePageProps: () => ({}),
|
|
24
38
|
usePageSharedData: () => null,
|
|
25
39
|
useMcpData: () => ({ docs: { enabled: false } }),
|
|
40
|
+
useSearchFeatures: () => ({}),
|
|
41
|
+
useNavigationTabs: () => undefined,
|
|
26
42
|
};
|
|
27
43
|
const useThemeHooks = () => {
|
|
28
44
|
const context = (0, react_1.useContext)(ThemeDataContext_1.ThemeDataContext);
|
|
@@ -30,26 +30,29 @@ const variables_25 = require("../../components/CodeBlock/variables");
|
|
|
30
30
|
const variables_26 = require("../../components/Product/variables");
|
|
31
31
|
const variables_27 = require("../../components/Markdown/variables");
|
|
32
32
|
const variables_28 = require("../../components/Banner/variables");
|
|
33
|
-
const variables_29 = require("../../
|
|
34
|
-
const variables_30 = require("../../markdoc/components/
|
|
35
|
-
const variables_31 = require("../../markdoc/components/
|
|
36
|
-
const variables_32 = require("../../markdoc/components/
|
|
37
|
-
const variables_33 = require("../../components/
|
|
38
|
-
const variables_34 = require("../../components/
|
|
39
|
-
const variables_35 = require("../../components/
|
|
40
|
-
const variables_36 = require("../../components/
|
|
41
|
-
const variables_37 = require("../../components/
|
|
42
|
-
const variables_38 = require("../../components/
|
|
43
|
-
const variables_39 = require("../../components/
|
|
44
|
-
const variables_40 = require("../../components/
|
|
45
|
-
const variables_41 = require("../../components/
|
|
46
|
-
const variables_42 = require("../../
|
|
47
|
-
const variables_43 = require("../../markdoc/components/
|
|
48
|
-
const variables_44 = require("../../components/
|
|
49
|
-
const variables_45 = require("../../components/
|
|
50
|
-
const variables_46 = require("../../components/
|
|
51
|
-
const variables_47 = require("../../components/
|
|
52
|
-
const variables_48 = require("../../components/
|
|
33
|
+
const variables_29 = require("../../components/Consent/variables");
|
|
34
|
+
const variables_30 = require("../../markdoc/components/Accordion/variables");
|
|
35
|
+
const variables_31 = require("../../markdoc/components/Tabs/variables");
|
|
36
|
+
const variables_32 = require("../../markdoc/components/NumberedList/variables");
|
|
37
|
+
const variables_33 = require("../../markdoc/components/Diagram/variables");
|
|
38
|
+
const variables_34 = require("../../components/LastUpdated/variables");
|
|
39
|
+
const variables_35 = require("../../components/Logo/variables");
|
|
40
|
+
const variables_36 = require("../../components/StatusCode/variables");
|
|
41
|
+
const variables_37 = require("../../components/Segmented/variables");
|
|
42
|
+
const variables_38 = require("../../components/UserMenu/variables");
|
|
43
|
+
const variables_39 = require("../../components/Tags/variables");
|
|
44
|
+
const variables_40 = require("../../components/VersionPicker/variables");
|
|
45
|
+
const variables_41 = require("../../components/DatePicker/variables");
|
|
46
|
+
const variables_42 = require("../../components/Switch/variables");
|
|
47
|
+
const variables_43 = require("../../markdoc/components/Cards/variables");
|
|
48
|
+
const variables_44 = require("../../markdoc/components/CodeWalkthrough/variables");
|
|
49
|
+
const variables_45 = require("../../components/SkipContent/variables");
|
|
50
|
+
const variables_46 = require("../../components/PageActions/variables");
|
|
51
|
+
const variables_47 = require("../../components/SvgViewer/variables");
|
|
52
|
+
const variables_48 = require("../../components/Toast/variables");
|
|
53
|
+
const variables_49 = require("../../components/PageNavigation/variables");
|
|
54
|
+
const variables_50 = require("../../components/NavigationTabs/variables");
|
|
55
|
+
const utils_1 = require("../../core/utils");
|
|
53
56
|
const palette_1 = require("./palette");
|
|
54
57
|
const dark_1 = require("./dark");
|
|
55
58
|
const themeColors = (0, styled_components_1.css) `
|
|
@@ -1111,8 +1114,8 @@ const error = (0, styled_components_1.css) `
|
|
|
1111
1114
|
--detailed-error-overlay-z-index: var(--z-index-raised);
|
|
1112
1115
|
|
|
1113
1116
|
--detailed-error-modal-width: calc(100% - var(--spacing-lg) * 2);
|
|
1114
|
-
--detailed-error-modal-height: calc(100vh - var(--navbar-height) - var(--spacing-lg) * 2);
|
|
1115
|
-
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-height));
|
|
1117
|
+
--detailed-error-modal-height: calc(100vh - var(--navbar-stack-height) - var(--spacing-lg) * 2);
|
|
1118
|
+
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-stack-height));
|
|
1116
1119
|
--detailed-error-modal-border-radius: var(--border-radius-md);
|
|
1117
1120
|
--detailed-error-modal-bg-color: var(--bg-color-raised);
|
|
1118
1121
|
--detailed-error-modal-color: var(--text-color-primary);
|
|
@@ -1313,33 +1316,34 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
1313
1316
|
${badges}
|
|
1314
1317
|
${variables_28.banner}
|
|
1315
1318
|
${borders}
|
|
1319
|
+
${variables_29.consent}
|
|
1316
1320
|
${variables_5.breadcrumbs}
|
|
1317
1321
|
${variables_20.button}
|
|
1318
1322
|
${variables_21.aiAssistantButton}
|
|
1319
|
-
${
|
|
1323
|
+
${variables_43.cards}
|
|
1320
1324
|
${variables_8.catalog}
|
|
1321
1325
|
${variables_11.catalogClassic}
|
|
1322
1326
|
${variables_25.code}
|
|
1323
|
-
${
|
|
1327
|
+
${variables_44.codeWalkthrough}
|
|
1324
1328
|
${docsDropdown}
|
|
1325
1329
|
${variables_15.dropdown}
|
|
1326
1330
|
${error}
|
|
1327
1331
|
${variables_10.filter}
|
|
1328
1332
|
${variables_19.footer}
|
|
1329
1333
|
${headingsTypography}
|
|
1330
|
-
${
|
|
1334
|
+
${variables_39.httpTag}
|
|
1331
1335
|
${variables_9.image}
|
|
1332
1336
|
${inputs}
|
|
1333
1337
|
${variables_1.languagePicker}
|
|
1334
|
-
${
|
|
1338
|
+
${variables_34.lastUpdated}
|
|
1335
1339
|
${links}
|
|
1336
1340
|
${loadProgressBar}
|
|
1337
|
-
${
|
|
1341
|
+
${variables_35.logo}
|
|
1338
1342
|
${variables_27.markdown}
|
|
1339
|
-
${
|
|
1340
|
-
${
|
|
1341
|
-
${
|
|
1342
|
-
${
|
|
1343
|
+
${variables_30.markdownAccordion}
|
|
1344
|
+
${variables_31.markdownTabs}
|
|
1345
|
+
${variables_32.markdownNumberedList}
|
|
1346
|
+
${variables_33.diagram}
|
|
1343
1347
|
${variables_24.menu}
|
|
1344
1348
|
${variables_24.mobileMenu}
|
|
1345
1349
|
${modal}
|
|
@@ -1348,6 +1352,7 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
1348
1352
|
${variables_26.productPicker}
|
|
1349
1353
|
${variables_12.responsePanelColors}
|
|
1350
1354
|
${variables_23.search}
|
|
1355
|
+
${variables_50.navigationTabs}
|
|
1351
1356
|
${variables_14.select}
|
|
1352
1357
|
${variables_4.sidebar}
|
|
1353
1358
|
${sizeAndSpace}
|
|
@@ -1358,26 +1363,26 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
1358
1363
|
${variables_7.toc}
|
|
1359
1364
|
${variables_16.tooltip}
|
|
1360
1365
|
${typography}
|
|
1361
|
-
${
|
|
1362
|
-
${
|
|
1366
|
+
${variables_38.userMenu}
|
|
1367
|
+
${variables_40.versionPicker}
|
|
1363
1368
|
${zIndexDepth}
|
|
1364
1369
|
${scorecardColors}
|
|
1365
|
-
${
|
|
1370
|
+
${variables_36.statusCode}
|
|
1366
1371
|
${tab}
|
|
1367
1372
|
${icon}
|
|
1368
1373
|
${tree}
|
|
1369
|
-
${
|
|
1370
|
-
${
|
|
1374
|
+
${variables_37.segmented}
|
|
1375
|
+
${variables_42.switcher}
|
|
1371
1376
|
${variables_17.checkbox}
|
|
1372
1377
|
${variables_3.feedback}
|
|
1373
1378
|
${variables_2.scorecard}
|
|
1374
|
-
${
|
|
1379
|
+
${variables_41.datePicker}
|
|
1375
1380
|
${replay}
|
|
1376
|
-
${
|
|
1377
|
-
${
|
|
1378
|
-
${
|
|
1379
|
-
${
|
|
1380
|
-
${
|
|
1381
|
+
${variables_45.skipContent}
|
|
1382
|
+
${variables_46.pageActions}
|
|
1383
|
+
${variables_47.svgViewer}
|
|
1384
|
+
${variables_48.toast}
|
|
1385
|
+
${variables_49.pageNavigation}
|
|
1381
1386
|
|
|
1382
1387
|
background-color: var(--bg-color);
|
|
1383
1388
|
color: var(--text-color-primary);
|
|
@@ -1388,6 +1393,13 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
1388
1393
|
${dark_1.darkMode};
|
|
1389
1394
|
}
|
|
1390
1395
|
|
|
1396
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
1397
|
+
:root:has([data-component-name='NavigationTabs/NavigationTabs']) {
|
|
1398
|
+
--navbar-stack-height: calc(var(--navbar-height) + var(--navigation-tabs-height, 48px));
|
|
1399
|
+
--navbar-row-bottom-border-color: transparent;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1391
1403
|
:root.notransition * {
|
|
1392
1404
|
transition: none !important;
|
|
1393
1405
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ConsentConfig } from '@redocly/config';
|
|
2
|
+
import type { TranslationKey } from './l10n';
|
|
3
|
+
export type ConsentCategoryId = 'necessary' | 'analytics' | 'marketing';
|
|
4
|
+
export type ConsentCategory = {
|
|
5
|
+
id: ConsentCategoryId;
|
|
6
|
+
locked: boolean;
|
|
7
|
+
titleTranslationKey: TranslationKey;
|
|
8
|
+
descriptionTranslationKey: TranslationKey;
|
|
9
|
+
titleDefault: string;
|
|
10
|
+
descriptionDefault: string;
|
|
11
|
+
};
|
|
12
|
+
export type ConsentState = {
|
|
13
|
+
necessary: true;
|
|
14
|
+
analytics: boolean;
|
|
15
|
+
marketing: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type ConsentChoice = {
|
|
18
|
+
analytics?: boolean;
|
|
19
|
+
marketing?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type ConsentProvider = 'onetrust' | 'cookiebot' | 'trustarc' | 'tcf';
|
|
22
|
+
export type ConsentRuntime = {
|
|
23
|
+
configuredMode: 'auto' | 'opt-in' | 'opt-out' | ConsentProvider;
|
|
24
|
+
mode: 'opt-in' | 'opt-out' | ConsentProvider;
|
|
25
|
+
state: ConsentState;
|
|
26
|
+
decided: boolean;
|
|
27
|
+
gpc: boolean;
|
|
28
|
+
dialogOpen: boolean;
|
|
29
|
+
region: {
|
|
30
|
+
source: 'timezone' | 'config' | 'none' | 'provider';
|
|
31
|
+
timeZone: string | null;
|
|
32
|
+
};
|
|
33
|
+
accept: () => void;
|
|
34
|
+
reject: () => void;
|
|
35
|
+
save: (next: ConsentChoice) => void;
|
|
36
|
+
open: () => void;
|
|
37
|
+
close: () => void;
|
|
38
|
+
reload: () => void;
|
|
39
|
+
on: (event: 'change' | 'open' | 'close', fn: (state: ConsentState) => void) => () => void;
|
|
40
|
+
};
|
|
41
|
+
export type UseConsentResult = {
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
config: ConsentConfig | undefined;
|
|
44
|
+
mode: ConsentRuntime['mode'] | undefined;
|
|
45
|
+
state: ConsentState | undefined;
|
|
46
|
+
decided: boolean;
|
|
47
|
+
gpc: boolean;
|
|
48
|
+
isDialogOpen: boolean;
|
|
49
|
+
openDialog: () => void;
|
|
50
|
+
closeDialog: () => void;
|
|
51
|
+
accept: () => void;
|
|
52
|
+
reject: () => void;
|
|
53
|
+
save: (next: ConsentChoice) => void;
|
|
54
|
+
};
|
|
@@ -8,10 +8,12 @@ import type { CatalogConfig, ProductUiConfig } from '../../config';
|
|
|
8
8
|
import type { UseCatalogResponse, FilteredCatalog, UseCatalogSortResponse, UseCatalogSearchResponse, UseCatalogProps, CatalogApiParams, CatalogApiResults, BffCatalogEntity, BffCatalogEntityList, BffCatalogRelatedEntity, BffCatalogRelatedEntityList, BffCatalogEntityRevision, BffCatalogEntityRevisionList } from './catalog';
|
|
9
9
|
import type { UserMenuData } from './user-menu';
|
|
10
10
|
import type { ItemState, DrilldownMenuItemDetails } from './sidebar';
|
|
11
|
+
import type { NavigationTabsState } from './navigation-tabs';
|
|
11
12
|
import type { SearchItemData, SearchFacet, SearchFilterItem, SearchFacetQuery, AiSearchConversationItem, ContentSegment, ToolCall } from './search';
|
|
12
13
|
import type { SubmitFeedbackParams } from './feedback';
|
|
13
14
|
import type { TFunction } from './l10n';
|
|
14
15
|
import type { BreadcrumbItem } from './breadcrumb';
|
|
16
|
+
import type { UseConsentResult } from './consent';
|
|
15
17
|
import type { AiSearchError } from '../constants/search';
|
|
16
18
|
export type ThemeHooks = {
|
|
17
19
|
useTranslate: () => {
|
|
@@ -64,6 +66,7 @@ export type ThemeHooks = {
|
|
|
64
66
|
banner: ResolvedBannerConfig | undefined;
|
|
65
67
|
dismissBanner: (content: string) => void;
|
|
66
68
|
};
|
|
69
|
+
useConsent: () => UseConsentResult;
|
|
67
70
|
useSearch: (product?: string, autoSearchDisabled?: boolean) => {
|
|
68
71
|
query: string;
|
|
69
72
|
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
@@ -83,6 +86,9 @@ export type ThemeHooks = {
|
|
|
83
86
|
askAi?: boolean;
|
|
84
87
|
retrySearch: () => Promise<void>;
|
|
85
88
|
};
|
|
89
|
+
useSearchFeatures: () => {
|
|
90
|
+
askAi?: boolean;
|
|
91
|
+
};
|
|
86
92
|
useAiSearch: (options?: {
|
|
87
93
|
filter?: SearchFilterItem[];
|
|
88
94
|
product?: string;
|
|
@@ -126,6 +132,7 @@ export type ThemeHooks = {
|
|
|
126
132
|
label?: string;
|
|
127
133
|
};
|
|
128
134
|
};
|
|
135
|
+
useNavigationTabs: () => NavigationTabsState | undefined;
|
|
129
136
|
useSidebarSiblingsData: () => {
|
|
130
137
|
prevPage?: ResolvedNavItemWithLink;
|
|
131
138
|
nextPage?: ResolvedNavItemWithLink;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export type * from './breadcrumb';
|
|
2
2
|
export type * from './catalog';
|
|
3
|
+
export type * from './consent';
|
|
3
4
|
export type * from './l10n';
|
|
4
5
|
export type * from './mcp';
|
|
5
6
|
export type * from './feedback';
|
|
6
7
|
export type * from './hooks';
|
|
7
8
|
export type * from './markdown';
|
|
8
9
|
export type * from './navbar';
|
|
10
|
+
export type * from './navigation-tabs';
|
|
9
11
|
export * from './search';
|
|
10
12
|
export type * from './select';
|
|
11
13
|
export type * from './sidebar';
|
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.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.send' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.searchItem.enum' | 'search.searchItem.example' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.send' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.searchItem.enum' | 'search.searchItem.example' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'navigationTabs.label' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.label' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.deepLink.tooltip' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer' | 'consent.title' | 'consent.message' | 'consent.privacyPolicy' | 'consent.customize' | 'consent.rejectAll' | 'consent.acceptAll' | 'consent.acceptAllCookies' | 'consent.savePreferences' | 'consent.dialog.title' | 'consent.dialog.description' | 'consent.dialog.close' | 'consent.alwaysOn' | 'consent.alwaysOff' | 'consent.gpcNotice' | 'consent.category.necessary.title' | 'consent.category.necessary.description' | 'consent.category.analytics.title' | 'consent.category.analytics.description' | 'consent.category.marketing.title' | 'consent.category.marketing.description' | 'consent.settingsLink';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type NavigationTabMenuEntry = {
|
|
2
|
+
tabId: string;
|
|
3
|
+
label: string;
|
|
4
|
+
labelTranslationKey?: string;
|
|
5
|
+
link: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
srcSet?: string;
|
|
8
|
+
external?: boolean;
|
|
9
|
+
target?: '_self' | '_blank';
|
|
10
|
+
};
|
|
11
|
+
export type NavigationTab = {
|
|
12
|
+
tabId: string;
|
|
13
|
+
label: string;
|
|
14
|
+
labelTranslationKey?: string;
|
|
15
|
+
link?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
srcSet?: string;
|
|
18
|
+
menu?: NavigationTabMenuEntry[];
|
|
19
|
+
};
|
|
20
|
+
export type NavigationTabsState = {
|
|
21
|
+
tabs: NavigationTab[];
|
|
22
|
+
activeTab?: NavigationTab;
|
|
23
|
+
activeMenuEntry?: NavigationTabMenuEntry;
|
|
24
|
+
};
|
|
25
|
+
export type NavigationTabItem = {
|
|
26
|
+
type: 'link';
|
|
27
|
+
label: string;
|
|
28
|
+
labelTranslationKey?: string;
|
|
29
|
+
link: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
srcSet?: string;
|
|
32
|
+
external?: boolean;
|
|
33
|
+
target?: '_self' | '_blank';
|
|
34
|
+
active?: boolean;
|
|
35
|
+
};
|
|
36
|
+
type NavigationTabGroupItem = {
|
|
37
|
+
type: 'group';
|
|
38
|
+
label: string;
|
|
39
|
+
labelTranslationKey?: string;
|
|
40
|
+
icon?: string;
|
|
41
|
+
srcSet?: string;
|
|
42
|
+
items: NavigationTabItem[];
|
|
43
|
+
active?: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type NavigationTabRowItem = NavigationTabItem | NavigationTabGroupItem;
|
|
46
|
+
export type NavigationTabsConfig = {
|
|
47
|
+
items: NavigationTabRowItem[];
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ConsentConfig, RedoclyConfig } from '@redocly/config';
|
|
2
|
+
export type SettingsLinkPlacement = 'footer' | 'none';
|
|
3
|
+
export declare function resolveSettingsLinkPlacement(consent: ConsentConfig | undefined, footer: RedoclyConfig['footer'] | undefined): SettingsLinkPlacement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveSettingsLinkPlacement = resolveSettingsLinkPlacement;
|
|
4
|
+
function resolveSettingsLinkPlacement(consent, footer) {
|
|
5
|
+
var _a;
|
|
6
|
+
const choice = (_a = consent === null || consent === void 0 ? void 0 : consent.settingsLink) !== null && _a !== void 0 ? _a : 'auto';
|
|
7
|
+
if (choice !== 'auto') {
|
|
8
|
+
return choice;
|
|
9
|
+
}
|
|
10
|
+
const footerShown = Boolean(footer) &&
|
|
11
|
+
!(footer === null || footer === void 0 ? void 0 : footer.hide) &&
|
|
12
|
+
(Boolean(footer === null || footer === void 0 ? void 0 : footer.copyrightText) || (Array.isArray(footer === null || footer === void 0 ? void 0 : footer.items) && footer.items.length > 0));
|
|
13
|
+
return footerShown ? 'footer' : 'none';
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=consent-settings-link-placement.js.map
|
|
@@ -17,6 +17,7 @@ export * from './type-guards';
|
|
|
17
17
|
export * from './dom';
|
|
18
18
|
export * from './toc';
|
|
19
19
|
export * from './menu';
|
|
20
|
+
export * from './navigation-tabs';
|
|
20
21
|
export * from './load-and-navigate';
|
|
21
22
|
export * from './get-scorecard-color-variable';
|
|
22
23
|
export * from './change-text-casing';
|
|
@@ -49,3 +50,4 @@ export * from './tooltip-placement';
|
|
|
49
50
|
export * from './telemetry/get-base-data-attributes';
|
|
50
51
|
export * from './telemetry/generate-before-after-context';
|
|
51
52
|
export * from './RenderWithLink';
|
|
53
|
+
export * from './consent-settings-link-placement';
|
package/lib/core/utils/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __exportStar(require("./type-guards"), exports);
|
|
|
33
33
|
__exportStar(require("./dom"), exports);
|
|
34
34
|
__exportStar(require("./toc"), exports);
|
|
35
35
|
__exportStar(require("./menu"), exports);
|
|
36
|
+
__exportStar(require("./navigation-tabs"), exports);
|
|
36
37
|
__exportStar(require("./load-and-navigate"), exports);
|
|
37
38
|
__exportStar(require("./get-scorecard-color-variable"), exports);
|
|
38
39
|
__exportStar(require("./change-text-casing"), exports);
|
|
@@ -65,4 +66,5 @@ __exportStar(require("./tooltip-placement"), exports);
|
|
|
65
66
|
__exportStar(require("./telemetry/get-base-data-attributes"), exports);
|
|
66
67
|
__exportStar(require("./telemetry/generate-before-after-context"), exports);
|
|
67
68
|
__exportStar(require("./RenderWithLink"), exports);
|
|
69
|
+
__exportStar(require("./consent-settings-link-placement"), exports);
|
|
68
70
|
//# sourceMappingURL=index.js.map
|
package/lib/core/utils/mcp.js
CHANGED
|
@@ -38,7 +38,7 @@ function slugifyMcpServerName(name) {
|
|
|
38
38
|
return name
|
|
39
39
|
.toLowerCase()
|
|
40
40
|
.replace(/[^a-z0-9_-]+/g, '-')
|
|
41
|
-
.replace(
|
|
41
|
+
.replace(/^-+|(?<!-)-+$/g, '');
|
|
42
42
|
}
|
|
43
43
|
function generateClaudeCodeCommand(config) {
|
|
44
44
|
return `claude mcp add --transport http ${slugifyMcpServerName(config.serverName)} ${config.url}`;
|
package/lib/core/utils/menu.d.ts
CHANGED
|
@@ -2,9 +2,13 @@ import type { ResolvedNavItem, Version } from '@redocly/config';
|
|
|
2
2
|
import type { Location } from 'react-router';
|
|
3
3
|
import type { Locale, TFunction } from '../types/l10n';
|
|
4
4
|
import type { ItemState } from '../types/sidebar';
|
|
5
|
+
import type { NavigationTabsState } from '../types/navigation-tabs';
|
|
5
6
|
import { MenuItemType } from '../constants/common';
|
|
6
7
|
export declare const mapNavbarItems: (items: ResolvedNavItem[], defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => ItemState[];
|
|
7
8
|
export declare const isItemActive: (item: ResolvedNavItem, defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => boolean;
|
|
8
9
|
export declare const buildLanguagesGroup: (locales: Locale[], defaultLocale: string, currentLocale: string) => ResolvedNavItem | undefined;
|
|
9
10
|
export declare const buildVersionSection: (translate: TFunction, versions: Version[], activeVersion?: Version) => ResolvedNavItem[];
|
|
11
|
+
export declare const buildNavigationTabsSelect: ({ navigationTabs, }: {
|
|
12
|
+
navigationTabs: NavigationTabsState | undefined;
|
|
13
|
+
}) => ItemState | undefined;
|
|
10
14
|
export declare function getMenuItemType(item: ItemState): MenuItemType;
|