@redocly/theme 0.69.0 → 0.70.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Buttons/DownloadButton.js +13 -3
- package/lib/components/Catalog/Catalog.d.ts +2 -2
- package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -2
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +45 -23
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +67 -33
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.js +15 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +48 -57
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +2 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -2
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +2 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +1 -2
- package/lib/components/Catalog/CatalogHighlight.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogSelector.d.ts +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTags.d.ts +2 -2
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
- package/lib/components/Catalog/variables.js +24 -33
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.d.ts +1 -1
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -2
- package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.d.ts +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.js +7 -1
- package/lib/components/Filter/FilterOptionLabel.d.ts +1 -1
- package/lib/components/LoadMore/LoadMore.d.ts +1 -1
- package/lib/components/MCP/McpConnectionTabs.js +2 -2
- package/lib/components/PageActions/PageActions.d.ts +1 -1
- package/lib/components/Search/SearchAiDialog.d.ts +1 -1
- package/lib/components/Search/SearchAiMessage.d.ts +1 -2
- package/lib/components/Search/SearchAiMessage.js +8 -10
- package/lib/components/Search/SearchAiResponse.d.ts +1 -1
- package/lib/components/Search/SearchGroups.d.ts +1 -1
- package/lib/core/constants/markdown.d.ts +2 -0
- package/lib/core/constants/markdown.js +3 -1
- package/lib/core/hooks/catalog/use-catalog-entity-schema.d.ts +1 -1
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +1 -1
- package/lib/core/hooks/catalog/use-graph.d.ts +3 -3
- package/lib/core/hooks/use-active-section-id.js +6 -0
- package/lib/core/hooks/use-element-size.d.ts +1 -1
- package/lib/core/types/catalog.d.ts +2 -3
- package/lib/core/types/common.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +4 -7
- package/lib/core/utils/mcp.d.ts +0 -1
- package/lib/core/utils/mcp.js +0 -13
- package/lib/core/utils/menu.d.ts +2 -2
- package/lib/core/utils/urls.js +1 -3
- package/lib/ext/use-configure-replay.d.ts +1 -1
- package/lib/layouts/OIDCForbidden.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.d.ts +1 -2
- package/lib/markdoc/components/Diagram/Diagram.d.ts +1 -1
- package/lib/markdoc/components/Diagram/Diagram.js +1 -2
- package/lib/markdoc/components/Tabs/Tab.d.ts +1 -1
- package/lib/markdoc/components/Tabs/TabList.d.ts +1 -1
- package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
- package/lib/markdoc/tags/markdoc-example.js +34 -22
- package/package.json +2 -2
- package/src/components/Buttons/DownloadButton.tsx +16 -8
- package/src/components/Catalog/Catalog.tsx +4 -4
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -2
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +3 -2
- package/src/components/Catalog/CatalogEntities.tsx +3 -2
- package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx +4 -5
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +56 -35
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +80 -42
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.tsx +18 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +61 -75
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -2
- package/src/components/Catalog/CatalogEntityIcon.tsx +3 -2
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +3 -2
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +2 -4
- package/src/components/Catalog/CatalogHighlight.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -1
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +2 -1
- package/src/components/Catalog/CatalogSelector.tsx +3 -2
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +1 -1
- package/src/components/Catalog/CatalogTags.tsx +4 -2
- package/src/components/Catalog/CatalogViewModeToggle.tsx +1 -1
- package/src/components/Catalog/variables.ts +24 -33
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +2 -5
- package/src/components/CatalogClassic/CatalogClassicVirtualizedGroups.tsx +1 -1
- package/src/components/CodeBlock/CodeBlockControls.tsx +2 -1
- package/src/components/Dropdown/Dropdown.tsx +5 -1
- package/src/components/Filter/FilterOptionLabel.tsx +1 -1
- package/src/components/LoadMore/LoadMore.tsx +2 -1
- package/src/components/MCP/McpConnectionTabs.tsx +3 -4
- package/src/components/PageActions/PageActions.tsx +2 -1
- package/src/components/Search/SearchAiDialog.tsx +1 -1
- package/src/components/Search/SearchAiMessage.tsx +3 -6
- package/src/components/Search/SearchAiResponse.tsx +2 -4
- package/src/components/Search/SearchGroups.tsx +1 -5
- package/src/core/constants/markdown.ts +4 -0
- package/src/core/hooks/catalog/use-catalog-entity-schema.ts +1 -1
- package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +1 -1
- package/src/core/hooks/catalog/use-graph.ts +4 -4
- package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +1 -1
- package/src/core/hooks/use-active-section-id.ts +8 -0
- package/src/core/hooks/use-element-size.ts +2 -1
- package/src/core/types/catalog.ts +7 -3
- package/src/core/types/common.ts +1 -1
- package/src/core/types/hooks.ts +15 -13
- package/src/core/utils/mcp.ts +0 -17
- package/src/core/utils/menu.ts +2 -2
- package/src/core/utils/urls.ts +1 -3
- package/src/ext/use-configure-replay.ts +3 -3
- package/src/layouts/OIDCForbidden.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +2 -4
- package/src/markdoc/components/Diagram/Diagram.tsx +2 -5
- package/src/markdoc/components/Tabs/Tab.tsx +1 -1
- package/src/markdoc/components/Tabs/TabList.tsx +1 -1
- package/src/markdoc/tags/code-walkthrough.ts +2 -1
- package/src/markdoc/tags/markdoc-example.ts +45 -28
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import { CatalogMobileTopBarFiltersButton } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton';
|
|
5
6
|
import { CatalogMobileTopBarControls } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls';
|
|
6
7
|
import { breakpoints } from '@redocly/theme/core';
|
|
7
|
-
import { CatalogViewMode } from '@redocly/theme/core';
|
|
8
|
+
import type { CatalogViewMode } from '@redocly/theme/core';
|
|
8
9
|
|
|
9
10
|
type CatalogMobileTopBarProps = {
|
|
10
11
|
setMobileFiltersPanelOpen: (open: boolean) => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import { CatalogSortButton } from '@redocly/theme/components/Catalog/CatalogSortButton';
|
|
5
6
|
import { CatalogViewModeToggle } from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
|
|
6
|
-
import { CatalogViewMode } from '@redocly/theme/core';
|
|
7
|
+
import type { CatalogViewMode } from '@redocly/theme/core';
|
|
7
8
|
|
|
8
9
|
type CatalogMobileTopBarControlsProps = {
|
|
9
10
|
setSortOption: (sortOption: string | null) => void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { useNavigate } from 'react-router';
|
|
4
5
|
|
|
5
6
|
import { Accordion } from '@redocly/theme/components/Accordion/Accordion';
|
|
6
7
|
import { Select } from '@redocly/theme/components/Select/Select';
|
|
7
|
-
import { CatalogSwitcherItem } from '@redocly/theme/core/types';
|
|
8
|
+
import type { CatalogSwitcherItem } from '@redocly/theme/core/types';
|
|
8
9
|
import { getPathPrefix } from '@redocly/theme/core/utils';
|
|
9
10
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
10
11
|
import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
|
5
5
|
import { CatalogEntityTypeIcon } from '@redocly/theme/components/Catalog/CatalogEntityTypeIcon';
|
|
6
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
6
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
7
7
|
|
|
8
8
|
type Entity = Pick<BffCatalogEntity, 'type' | 'title' | 'summary'>;
|
|
9
9
|
export type CatalogEntityCellProps<T extends Entity> = {
|
|
@@ -4,7 +4,7 @@ import styled, { css } from 'styled-components';
|
|
|
4
4
|
import { CaretDownIcon } from '@redocly/theme/icons/CaretDownIcon/CaretDownIcon';
|
|
5
5
|
import { CaretUpIcon } from '@redocly/theme/icons/CaretUpIcon/CaretUpIcon';
|
|
6
6
|
import { useCatalogTableHeaderCellActions } from '@redocly/theme/core/hooks';
|
|
7
|
-
import {
|
|
7
|
+
import type {
|
|
8
8
|
BaseEntity,
|
|
9
9
|
CatalogColumn,
|
|
10
10
|
} from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
3
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
4
|
import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
|
|
5
5
|
|
|
6
6
|
export type CatalogTagsCellProps = {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import { CATALOG_TAG_MAX_LENGTH } from '@redocly/theme/core/constants';
|
|
5
|
-
import {
|
|
6
|
+
import type { TagProps } from '@redocly/theme/components/Tag/Tag';
|
|
7
|
+
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
8
|
import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
7
9
|
import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
|
8
10
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { TableIcon } from '@redocly/theme/icons/TableIcon/TableIcon';
|
|
5
5
|
import { CardsIcon } from '@redocly/theme/icons/CardsIcon/CardsIcon';
|
|
6
|
-
import { CatalogViewMode } from '@redocly/theme/core/types';
|
|
6
|
+
import type { CatalogViewMode } from '@redocly/theme/core/types';
|
|
7
7
|
|
|
8
8
|
export type CatalogViewModeToggleProps = {
|
|
9
9
|
viewMode: CatalogViewMode;
|
|
@@ -471,33 +471,31 @@ export const catalog = css`
|
|
|
471
471
|
* @tokens Catalog history button
|
|
472
472
|
*/
|
|
473
473
|
--catalog-history-button-width: 252px;
|
|
474
|
-
--catalog-history-button-item-width: 244px;
|
|
475
474
|
--catalog-history-separator-border-color: var(--border-color-secondary);
|
|
476
|
-
--catalog-history-separator-margin
|
|
475
|
+
--catalog-history-separator-margin: var(--spacing-sm) 0;
|
|
477
476
|
--catalog-history-item-padding: var(--spacing-xxs);
|
|
478
|
-
--catalog-history-item-
|
|
479
|
-
--catalog-history-item-
|
|
480
|
-
--catalog-history-item-border-radius: var(--menu-item-label-border-radius);
|
|
477
|
+
--catalog-history-item-gap: var(--spacing-xxs);
|
|
478
|
+
--catalog-history-item-border-radius: var(--border-radius-lg);
|
|
481
479
|
--catalog-history-item-bg-color-hover: var(--menu-item-bg-color-hover);
|
|
482
480
|
--catalog-history-icon-size: 16px;
|
|
483
|
-
--catalog-history-
|
|
481
|
+
--catalog-history-icon-gap: 2px;
|
|
484
482
|
--catalog-history-text-font-family: var(--font-family-base);
|
|
485
483
|
--catalog-history-text-font-size: var(--font-size-base);
|
|
486
484
|
--catalog-history-text-font-weight: var(--font-weight-regular);
|
|
487
485
|
--catalog-history-text-line-height: var(--line-height-base);
|
|
488
|
-
--catalog-history-text-color: var(--
|
|
486
|
+
--catalog-history-text-color: var(--menu-content-color);
|
|
489
487
|
--catalog-history-pill-gap: var(--spacing-xxs);
|
|
488
|
+
--catalog-history-pill-height: 22px;
|
|
490
489
|
--catalog-history-pill-padding-vertical: 1px;
|
|
491
490
|
--catalog-history-pill-padding-horizontal: var(--spacing-xs);
|
|
492
491
|
--catalog-history-pill-border-color: var(--border-color-primary);
|
|
493
|
-
--catalog-history-pill-border-radius:
|
|
494
|
-
--catalog-history-pill-icon-size:
|
|
492
|
+
--catalog-history-pill-border-radius: var(--border-radius-xl);
|
|
493
|
+
--catalog-history-pill-icon-size: 14px;
|
|
495
494
|
--catalog-history-pill-icon-color: var(--color-green-8);
|
|
496
495
|
--catalog-history-pill-font-family: var(--font-family-base);
|
|
497
496
|
--catalog-history-pill-font-size: var(--font-size-base);
|
|
498
497
|
--catalog-history-pill-line-height: var(--line-height-base);
|
|
499
498
|
--catalog-history-pill-text-color: var(--text-color-primary);
|
|
500
|
-
--catalog-history-pill-min-width: calc(100% - 118px - var(--catalog-history-item-gap));
|
|
501
499
|
// @tokens End
|
|
502
500
|
|
|
503
501
|
/**
|
|
@@ -506,50 +504,44 @@ export const catalog = css`
|
|
|
506
504
|
--catalog-history-sidebar-width: 320px;
|
|
507
505
|
--catalog-history-sidebar-bg-color: var(--sidebar-bg-color);
|
|
508
506
|
--catalog-history-sidebar-border-color: var(--border-color-secondary);
|
|
507
|
+
--catalog-history-sidebar-padding: var(--spacing-base) var(--spacing-base) 0;
|
|
508
|
+
--catalog-history-sidebar-divider-margin: var(--spacing-sm) 0 0;
|
|
509
509
|
|
|
510
|
-
--catalog-history-sidebar-header-padding: var(--spacing-
|
|
510
|
+
--catalog-history-sidebar-header-padding: var(--spacing-xxs);
|
|
511
511
|
--catalog-history-sidebar-header-font-family: var(--font-family-base);
|
|
512
512
|
--catalog-history-sidebar-header-font-size: var(--font-size-base);
|
|
513
513
|
--catalog-history-sidebar-header-font-weight: var(--font-weight-regular);
|
|
514
514
|
--catalog-history-sidebar-header-line-height: var(--line-height-base);
|
|
515
515
|
--catalog-history-sidebar-header-letter-spacing: 0;
|
|
516
|
-
--catalog-history-sidebar-header-color: var(--
|
|
516
|
+
--catalog-history-sidebar-header-color: var(--menu-content-color);
|
|
517
517
|
|
|
518
|
-
--catalog-history-sidebar-close-button-size:
|
|
519
|
-
--catalog-history-sidebar-close-button-border-radius: var(--border-radius-
|
|
518
|
+
--catalog-history-sidebar-close-button-size: 22px;
|
|
519
|
+
--catalog-history-sidebar-close-button-border-radius: var(--border-radius-xl);
|
|
520
520
|
--catalog-history-sidebar-close-button-bg-color-hover: var(--color-hover-base);
|
|
521
521
|
--catalog-history-sidebar-close-icon-color: var(--text-color-primary);
|
|
522
522
|
|
|
523
|
-
--catalog-history-sidebar-
|
|
524
|
-
--catalog-history-sidebar-content-margin-top: calc(var(--spacing-xxs) * -1);
|
|
525
|
-
|
|
526
|
-
--catalog-history-sidebar-version-header-padding: var(--spacing-xs) var(--spacing-xxs);
|
|
523
|
+
--catalog-history-sidebar-version-header-padding: var(--spacing-xxs);
|
|
527
524
|
--catalog-history-sidebar-version-header-border-radius: var(--border-radius-md);
|
|
528
525
|
--catalog-history-sidebar-version-header-bg-color-hover: var(--color-hover-base);
|
|
526
|
+
--catalog-history-sidebar-version-header-bg-color-current: var(--menu-item-bg-color-active);
|
|
529
527
|
|
|
530
|
-
--catalog-history-sidebar-version-icon-size:
|
|
531
|
-
--catalog-history-sidebar-version-icon-color: var(--text-color-
|
|
528
|
+
--catalog-history-sidebar-version-icon-size: 20px;
|
|
529
|
+
--catalog-history-sidebar-version-icon-color: var(--text-color-primary);
|
|
532
530
|
--catalog-history-sidebar-version-icon-color-current: var(--color-static-white);
|
|
533
|
-
--catalog-history-sidebar-version-icon-margin-right: var(--spacing-
|
|
531
|
+
--catalog-history-sidebar-version-icon-margin-right: var(--spacing-xxs);
|
|
534
532
|
--catalog-history-sidebar-chevron-icon-color: var(--text-color-secondary);
|
|
535
|
-
--catalog-history-sidebar-version-info-gap: 2px;
|
|
536
533
|
|
|
537
534
|
--catalog-history-sidebar-version-title-font-family: var(--font-family-base);
|
|
538
535
|
--catalog-history-sidebar-version-title-font-size: var(--font-size-base);
|
|
539
|
-
--catalog-history-sidebar-version-title-font-weight: var(--font-weight-
|
|
536
|
+
--catalog-history-sidebar-version-title-font-weight: var(--font-weight-regular);
|
|
540
537
|
--catalog-history-sidebar-version-title-line-height: var(--line-height-base);
|
|
541
|
-
--catalog-history-sidebar-version-title-color: var(--
|
|
542
|
-
|
|
543
|
-
--catalog-history-sidebar-version-date-font-family: var(--font-family-base);
|
|
544
|
-
--catalog-history-sidebar-version-date-font-size: var(--font-size-sm);
|
|
545
|
-
--catalog-history-sidebar-version-date-font-weight: var(--font-weight-regular);
|
|
546
|
-
--catalog-history-sidebar-version-date-line-height: var(--line-height-sm);
|
|
547
|
-
--catalog-history-sidebar-version-date-color: var(--color-warm-grey-7);
|
|
538
|
+
--catalog-history-sidebar-version-title-color: var(--menu-content-color);
|
|
548
539
|
|
|
549
|
-
--catalog-history-sidebar-revisions-padding-left:
|
|
540
|
+
--catalog-history-sidebar-revisions-padding-left: 28px;
|
|
550
541
|
--catalog-history-sidebar-revisions-padding-bottom: var(--spacing-base);
|
|
542
|
+
--catalog-history-sidebar-revision-line-left: 14px;
|
|
551
543
|
|
|
552
|
-
--catalog-history-sidebar-revision-item-padding: var(--spacing-
|
|
544
|
+
--catalog-history-sidebar-revision-item-padding: var(--spacing-xxs) var(--spacing-sm);
|
|
553
545
|
--catalog-history-sidebar-revision-item-border-radius: var(--border-radius-md);
|
|
554
546
|
--catalog-history-sidebar-revision-item-bg-color-hover: var(--bg-color-hover);
|
|
555
547
|
|
|
@@ -573,7 +565,6 @@ export const catalog = css`
|
|
|
573
565
|
/**
|
|
574
566
|
* @tokens Catalog history tag border radius
|
|
575
567
|
*/
|
|
576
|
-
--catalog-history-sidebar-version-tag-border-radius: var(--border-radius-xl);
|
|
577
568
|
--catalog-history-sidebar-revision-tag-border-radius: var(--border-radius-xl);
|
|
578
569
|
// @tokens End
|
|
579
570
|
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { JSX } from 'react';
|
|
5
|
-
|
|
6
4
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
7
|
-
import { getScorecardColorVariable } from '@redocly/theme/core/utils';
|
|
5
|
+
import { getScorecardColorVariable, getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
8
6
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
9
7
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
10
|
-
import { getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
11
8
|
|
|
12
9
|
export type CatalogClassicInfoBlockProps = {
|
|
13
10
|
metadata?: {
|
|
@@ -2,7 +2,7 @@ import React, { useMemo, useEffect, useState } from 'react';
|
|
|
2
2
|
import { useWindowVirtualizer } from '@tanstack/react-virtual';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
|
-
import { CatalogItem, ResolvedFilter } from '@redocly/theme/core/types';
|
|
5
|
+
import type { CatalogItem, ResolvedFilter } from '@redocly/theme/core/types';
|
|
6
6
|
import { useElementSize } from '@redocly/theme/core/hooks';
|
|
7
7
|
import { CatalogClassicCard } from '@redocly/theme/components/CatalogClassic/CatalogClassicCard';
|
|
8
8
|
import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
|
|
@@ -7,7 +7,8 @@ import type { CodeBlockItems } from '@redocly/theme/components/CodeBlock/CodeBlo
|
|
|
7
7
|
import { CodeBlockTabs } from '@redocly/theme/components/CodeBlock/CodeBlockTabs';
|
|
8
8
|
import { CopyButton } from '@redocly/theme/components/Buttons/CopyButton';
|
|
9
9
|
import { Tooltip } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
10
|
-
import {
|
|
10
|
+
import type { ReportButtonProps } from '@redocly/theme/core/hooks';
|
|
11
|
+
import { useThemeHooks, useThemeConfig } from '@redocly/theme/core/hooks';
|
|
11
12
|
import { DeselectIcon } from '@redocly/theme/icons/DeselectIcon/DeselectIcon';
|
|
12
13
|
import { MaximizeIcon } from '@redocly/theme/icons/MaximizeIcon/MaximizeIcon';
|
|
13
14
|
import { MinimizeIcon } from '@redocly/theme/icons/MinimizeIcon/MinimizeIcon';
|
|
@@ -116,8 +116,12 @@ export const Dropdown = forwardRef<HTMLDivElement, DropdownProps>(
|
|
|
116
116
|
const wrapper = wrapperRef.current;
|
|
117
117
|
if (!wrapper) return;
|
|
118
118
|
const rect = wrapper.getBoundingClientRect();
|
|
119
|
+
const menuHeight = menuRef.current?.offsetHeight ?? 0;
|
|
120
|
+
const fitsBelow = rect.bottom + menuHeight <= window.innerHeight;
|
|
121
|
+
const fitsAbove = rect.top - menuHeight >= 0;
|
|
122
|
+
const openUpward = placement === 'top' ? fitsAbove || !fitsBelow : !fitsBelow && fitsAbove;
|
|
119
123
|
const style: CSSProperties = { minWidth: rect.width };
|
|
120
|
-
if (
|
|
124
|
+
if (openUpward) {
|
|
121
125
|
style.bottom = window.innerHeight - rect.top;
|
|
122
126
|
} else {
|
|
123
127
|
style.top = rect.bottom;
|
|
@@ -9,7 +9,6 @@ import type { CodeBlockControlsProps } from '@redocly/theme/components/CodeBlock
|
|
|
9
9
|
import { useMCPConfig, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
10
10
|
import {
|
|
11
11
|
generateClaudeCodeCommand,
|
|
12
|
-
generateClaudeDesktopConfig,
|
|
13
12
|
generateCodexCommand,
|
|
14
13
|
generateMcpInstallPrompt,
|
|
15
14
|
getBaseDataAttributes,
|
|
@@ -177,12 +176,12 @@ function renderTabContent(
|
|
|
177
176
|
<TabHint>
|
|
178
177
|
{translate(
|
|
179
178
|
'page.mcpNotAllowed.snippets.claudeDesktop.instruction',
|
|
180
|
-
'
|
|
179
|
+
'Open Customize → Connectors → Add custom connector and paste this server URL:',
|
|
181
180
|
)}
|
|
182
181
|
</TabHint>
|
|
183
182
|
<CodeBlock
|
|
184
|
-
lang="
|
|
185
|
-
source={
|
|
183
|
+
lang="text"
|
|
184
|
+
source={connection.url}
|
|
186
185
|
header={snippetHeader(option, 'claude-desktop')}
|
|
187
186
|
/>
|
|
188
187
|
</>
|
|
@@ -12,7 +12,8 @@ import { SplitButton } from '@redocly/theme/components/SplitButton/SplitButton';
|
|
|
12
12
|
import { DropdownMenu } from '@redocly/theme/components/Dropdown/DropdownMenu';
|
|
13
13
|
import { Spinner } from '@redocly/theme/icons/Spinner/Spinner';
|
|
14
14
|
import { CheckmarkFilledIcon } from '@redocly/theme/icons/CheckmarkFilledIcon/CheckmarkFilledIcon';
|
|
15
|
-
import { PageActionType
|
|
15
|
+
import type { PageActionType } from '@redocly/theme/core/hooks';
|
|
16
|
+
import { usePageActions, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
16
17
|
|
|
17
18
|
type ActionState = 'idle' | 'processing' | 'done';
|
|
18
19
|
|
|
@@ -13,8 +13,8 @@ import type {
|
|
|
13
13
|
import { useThemeConfig, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
14
14
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
15
15
|
import { SearchAiConversationInput } from '@redocly/theme/components/Search/SearchAiConversationInput';
|
|
16
|
+
import type { AiSearchError } from '@redocly/theme/core/constants';
|
|
16
17
|
import {
|
|
17
|
-
AiSearchError,
|
|
18
18
|
AI_SEARCH_ERROR_CONFIG as ERROR_CONFIG,
|
|
19
19
|
AiSearchConversationRole,
|
|
20
20
|
} from '@redocly/theme/core/constants';
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import React, { memo, useState } from 'react';
|
|
1
|
+
import React, { memo, useState, type JSX } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { JSX } from 'react';
|
|
5
|
-
|
|
6
4
|
import {
|
|
7
5
|
FeedbackType,
|
|
8
6
|
type SearchAiMessageResource,
|
|
9
7
|
type ToolCall,
|
|
10
8
|
type ContentSegment,
|
|
9
|
+
ToolCallName,
|
|
11
10
|
} from '@redocly/theme/core/types';
|
|
12
|
-
import { TOOL_CALL_DISPLAY_TEXT } from '@redocly/theme/core/constants';
|
|
13
|
-
import { ToolCallName } from '@redocly/theme/core/types';
|
|
11
|
+
import { TOOL_CALL_DISPLAY_TEXT, AiSearchConversationRole } from '@redocly/theme/core/constants';
|
|
14
12
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
15
13
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
16
|
-
import { AiSearchConversationRole } from '@redocly/theme/core/constants';
|
|
17
14
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
18
15
|
import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
|
|
19
16
|
import { DocumentIcon } from '@redocly/theme/icons/DocumentIcon/DocumentIcon';
|
|
@@ -13,10 +13,8 @@ import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
|
|
|
13
13
|
import { Typography } from '@redocly/theme/components/Typography/Typography';
|
|
14
14
|
import { Admonition } from '@redocly/theme/components/Admonition/Admonition';
|
|
15
15
|
import { ErrorFilledIcon } from '@redocly/theme/icons/ErrorFilledIcon/ErrorFilledIcon';
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
AI_SEARCH_ERROR_CONFIG as ERROR_CONFIG,
|
|
19
|
-
} from '@redocly/theme/core/constants';
|
|
16
|
+
import type { AiSearchError } from '@redocly/theme/core/constants';
|
|
17
|
+
import { AI_SEARCH_ERROR_CONFIG as ERROR_CONFIG } from '@redocly/theme/core/constants';
|
|
20
18
|
import { ChatIcon } from '@redocly/theme/icons/ChatIcon/ChatIcon';
|
|
21
19
|
|
|
22
20
|
export type SearchAiResponseProps = {
|
|
@@ -3,11 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
type SearchFacet,
|
|
8
|
-
type SearchFacetCount,
|
|
9
|
-
type SearchFilterItem,
|
|
10
|
-
} from '@redocly/theme/core/types';
|
|
6
|
+
import type { SearchFacet, SearchFacetCount, SearchFilterItem } from '@redocly/theme/core/types';
|
|
11
7
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
12
8
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
13
9
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
2
2
|
import {
|
|
3
|
+
type OnNodesChange,
|
|
4
|
+
type OnEdgesChange,
|
|
3
5
|
addEdge,
|
|
4
6
|
type Node,
|
|
5
7
|
type Edge,
|
|
@@ -7,13 +9,11 @@ import {
|
|
|
7
9
|
useNodesState,
|
|
8
10
|
useEdgesState,
|
|
9
11
|
Position,
|
|
10
|
-
OnNodesChange,
|
|
11
|
-
OnEdgesChange,
|
|
12
12
|
} from '@xyflow/react';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import type { CatalogEntityNodeData } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode';
|
|
15
15
|
|
|
16
|
-
import { BffCatalogEntity, BffCatalogRelatedEntity } from '../../types';
|
|
16
|
+
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../types';
|
|
17
17
|
import {
|
|
18
18
|
GraphCustomEdgeType,
|
|
19
19
|
GraphCustomNodeType,
|
|
@@ -2,7 +2,7 @@ import { vi, type MockedFunction } from 'vitest';
|
|
|
2
2
|
|
|
3
3
|
import type { ResolvedNavItem } from '@redocly/config';
|
|
4
4
|
|
|
5
|
-
import { MobileMenuType } from '../../../constants/common';
|
|
5
|
+
import type { MobileMenuType } from '../../../constants/common';
|
|
6
6
|
|
|
7
7
|
export const useMobileMenuItems: MockedFunction<
|
|
8
8
|
(menuType: MobileMenuType) => {
|
|
@@ -43,6 +43,7 @@ export function useActiveSectionId(
|
|
|
43
43
|
const section = sections[i];
|
|
44
44
|
const rect = section.getBoundingClientRect();
|
|
45
45
|
if (rect.y < heightOffset && rect.bottom > heightOffset) {
|
|
46
|
+
if (isSkippedContent(section)) continue;
|
|
46
47
|
setItemId(section.getAttribute('data-section-id') || '');
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
@@ -73,3 +74,10 @@ export function useActiveSectionId(
|
|
|
73
74
|
|
|
74
75
|
return itemId;
|
|
75
76
|
}
|
|
77
|
+
|
|
78
|
+
function isSkippedContent(element: Element): boolean {
|
|
79
|
+
return (
|
|
80
|
+
typeof element.checkVisibility === 'function' &&
|
|
81
|
+
!element.checkVisibility({ contentVisibilityAuto: true })
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { InfiniteData, UseInfiniteQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
1
|
+
import type { InfiniteData, UseInfiniteQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type {
|
|
3
|
+
ENTITY_RELATION_TYPES,
|
|
4
|
+
CatalogEntityConfig,
|
|
5
|
+
EntitiesCatalogConfig,
|
|
6
|
+
LayoutVariant,
|
|
7
|
+
} from '@redocly/config';
|
|
3
8
|
|
|
4
|
-
import type { CatalogEntityConfig, EntitiesCatalogConfig, LayoutVariant } from '@redocly/config';
|
|
5
9
|
import type { CatalogFilterConfig } from '@redocly/theme/config';
|
|
6
10
|
|
|
7
11
|
export type FilterResult = {
|
package/src/core/types/common.ts
CHANGED
package/src/core/types/hooks.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ResolvedBannerConfig,
|
|
3
|
+
PageData,
|
|
4
|
+
PageProps,
|
|
5
|
+
ResolvedNavItemWithLink,
|
|
6
|
+
Version,
|
|
7
|
+
} from '@redocly/config';
|
|
2
8
|
import type { AsyncApiRealmUI } from '@redocly/realm-asyncapi-sdk';
|
|
3
|
-
import type { PageData, PageProps, ResolvedNavItemWithLink, Version } from '@redocly/config';
|
|
4
9
|
import type { ShikiTransformer } from '@shikijs/types';
|
|
5
10
|
import type { Callback, TFunction as TFunc } from 'i18next';
|
|
6
11
|
import type { To, Location, NavigateFunction } from 'react-router';
|
|
@@ -14,9 +19,15 @@ import type {
|
|
|
14
19
|
UseCatalogProps,
|
|
15
20
|
CatalogApiParams,
|
|
16
21
|
CatalogApiResults,
|
|
22
|
+
BffCatalogEntity,
|
|
23
|
+
BffCatalogEntityList,
|
|
24
|
+
BffCatalogRelatedEntity,
|
|
25
|
+
BffCatalogRelatedEntityList,
|
|
26
|
+
BffCatalogEntityRevision,
|
|
27
|
+
BffCatalogEntityRevisionList,
|
|
17
28
|
} from './catalog';
|
|
18
29
|
import type { UserMenuData } from './user-menu';
|
|
19
|
-
import type { ItemState } from './sidebar';
|
|
30
|
+
import type { ItemState, DrilldownMenuItemDetails } from './sidebar';
|
|
20
31
|
import type {
|
|
21
32
|
SearchItemData,
|
|
22
33
|
SearchFacet,
|
|
@@ -29,17 +40,8 @@ import type {
|
|
|
29
40
|
import type { SubmitFeedbackParams } from './feedback';
|
|
30
41
|
import type { TFunction } from './l10n';
|
|
31
42
|
import type { BreadcrumbItem } from './breadcrumb';
|
|
32
|
-
import type { DrilldownMenuItemDetails } from './sidebar';
|
|
33
43
|
|
|
34
|
-
import {
|
|
35
|
-
BffCatalogEntity,
|
|
36
|
-
BffCatalogEntityList,
|
|
37
|
-
BffCatalogRelatedEntity,
|
|
38
|
-
BffCatalogRelatedEntityList,
|
|
39
|
-
BffCatalogEntityRevision,
|
|
40
|
-
BffCatalogEntityRevisionList,
|
|
41
|
-
} from './catalog';
|
|
42
|
-
import { AiSearchError } from '../constants/search';
|
|
44
|
+
import type { AiSearchError } from '../constants/search';
|
|
43
45
|
|
|
44
46
|
export type ThemeHooks = {
|
|
45
47
|
useAnchorPositioning: () => { isSupported: boolean };
|
package/src/core/utils/mcp.ts
CHANGED
|
@@ -42,23 +42,6 @@ export function slugifyMcpServerName(name: string): string {
|
|
|
42
42
|
.replace(/^-+|-+$/g, '');
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
// Claude Desktop's config file only launches stdio commands, so remote servers
|
|
46
|
-
// connect through the mcp-remote bridge.
|
|
47
|
-
export function generateClaudeDesktopConfig(config: McpConnectionParams): string {
|
|
48
|
-
return JSON.stringify(
|
|
49
|
-
{
|
|
50
|
-
mcpServers: {
|
|
51
|
-
[slugifyMcpServerName(config.serverName)]: {
|
|
52
|
-
command: 'npx',
|
|
53
|
-
args: ['-y', 'mcp-remote', config.url],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
null,
|
|
58
|
-
2,
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
45
|
export function generateClaudeCodeCommand(config: McpConnectionParams): string {
|
|
63
46
|
return `claude mcp add --transport http ${slugifyMcpServerName(config.serverName)} ${config.url}`;
|
|
64
47
|
}
|
package/src/core/utils/menu.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ResolvedNavItem, Version } from '@redocly/config';
|
|
2
2
|
import type { Location } from 'react-router';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import type { Locale, TFunction } from '../types/l10n';
|
|
5
|
+
import type { ItemState } from '../types/sidebar';
|
|
6
6
|
import { MenuItemType } from '../constants/common';
|
|
7
7
|
import { getPathnameForLocale, withoutPathPrefix, withPathPrefix } from './urls';
|
|
8
8
|
|
package/src/core/utils/urls.ts
CHANGED
|
@@ -5,9 +5,7 @@ import { DEFAULT_LOCALE_PLACEHOLDER } from '../constants/common';
|
|
|
5
5
|
export function combineUrls(baseURL: string, ...relativeURLs: (string | undefined)[]) {
|
|
6
6
|
let res = baseURL;
|
|
7
7
|
for (let relativeURL of relativeURLs) {
|
|
8
|
-
res = relativeURL
|
|
9
|
-
? res.replace(/[\/\\]+$/, '') + '/' + relativeURL.replace(/^[\/\\]+/, '')
|
|
10
|
-
: res;
|
|
8
|
+
res = relativeURL ? res.replace(/[/\\]+$/, '') + '/' + relativeURL.replace(/^[/\\]+/, '') : res;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
return res;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useState, useCallback, useRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type {
|
|
4
|
+
ConfigureRequestValues,
|
|
5
|
+
ConfigureServerRequestValues,
|
|
6
6
|
} from '@redocly/theme/ext/configure';
|
|
7
7
|
import type { UserClaims, OpenAPIServer, OpenAPIInfo } from '@redocly/theme/core/types';
|
|
8
8
|
|