@redocly/theme 0.59.0-rc.1 → 0.59.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/LICENSE +7 -1
- package/lib/components/Buttons/AIAssistantButton.js +6 -2
- package/lib/components/Buttons/ConnectMCPButton.d.ts +8 -0
- package/lib/components/Buttons/ConnectMCPButton.js +145 -0
- package/lib/components/Buttons/variables.d.ts +1 -0
- package/lib/components/Buttons/variables.js +42 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntityIcon.js +2 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilter.js +4 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +1 -1
- package/lib/components/Catalog/variables.js +1 -1
- package/lib/components/Dropdown/Dropdown.d.ts +16 -2
- package/lib/components/Dropdown/Dropdown.js +5 -5
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/Navbar/NavbarItem.js +3 -3
- package/lib/components/PageActions/PageActions.js +4 -1
- package/lib/components/PageActions/variables.js +2 -0
- package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +1 -2
- package/lib/components/Search/SearchAiActionButtons.d.ts +10 -0
- package/lib/components/Search/SearchAiActionButtons.js +43 -0
- package/lib/components/Search/SearchAiConversationInput.d.ts +3 -1
- package/lib/components/Search/SearchAiConversationInput.js +39 -7
- package/lib/components/Search/SearchAiDialog.d.ts +3 -6
- package/lib/components/Search/SearchAiDialog.js +20 -9
- package/lib/components/Search/SearchAiMessage.d.ts +9 -5
- package/lib/components/Search/SearchAiMessage.js +146 -22
- package/lib/components/Search/SearchAiNegativeFeedbackForm.d.ts +8 -0
- package/lib/components/Search/SearchAiNegativeFeedbackForm.js +169 -0
- package/lib/components/Search/SearchDialog.js +36 -5
- package/lib/components/Search/SearchGroups.js +2 -2
- package/lib/components/Search/variables.js +36 -64
- package/lib/components/Segmented/Segmented.d.ts +1 -8
- package/lib/components/Segmented/Segmented.js +3 -1
- package/lib/components/Select/SelectInput.js +1 -1
- package/lib/components/Select/variables.js +2 -2
- package/lib/components/Tag/Tag.d.ts +2 -1
- package/lib/components/Tag/Tag.js +66 -17
- package/lib/components/Tag/variables.dark.js +135 -36
- package/lib/components/Tag/variables.js +78 -61
- package/lib/core/constants/index.d.ts +1 -0
- package/lib/core/constants/index.js +1 -0
- package/lib/core/constants/mcp.d.ts +1 -0
- package/lib/core/constants/mcp.js +5 -0
- package/lib/core/constants/search.d.ts +5 -4
- package/lib/core/constants/search.js +4 -5
- package/lib/core/hooks/index.d.ts +3 -0
- package/lib/core/hooks/index.js +3 -0
- package/lib/core/hooks/menu/use-nested-menu.js +1 -1
- package/lib/core/hooks/search/use-feedback-tooltip.d.ts +6 -0
- package/lib/core/hooks/search/use-feedback-tooltip.js +26 -0
- package/lib/core/hooks/use-connect-mcp-button.d.ts +13 -0
- package/lib/core/hooks/use-connect-mcp-button.js +50 -0
- package/lib/core/hooks/use-mcp-config.d.ts +9 -0
- package/lib/core/hooks/use-mcp-config.js +27 -0
- package/lib/core/hooks/use-page-actions.d.ts +1 -1
- package/lib/core/hooks/use-page-actions.js +98 -95
- package/lib/core/hooks/use-product-picker.js +2 -1
- package/lib/core/hooks/use-tabs.d.ts +3 -2
- package/lib/core/hooks/use-tabs.js +115 -57
- package/lib/core/hooks/use-telemetry-fallback.d.ts +10 -8
- package/lib/core/hooks/use-telemetry-fallback.js +10 -8
- package/lib/core/openapi/index.d.ts +1 -0
- package/lib/core/styles/dark.js +4 -0
- package/lib/core/styles/global.js +5 -0
- package/lib/core/types/hooks.d.ts +2 -2
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.js +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/mcp.d.ts +6 -0
- package/lib/core/types/mcp.js +3 -0
- package/lib/core/types/search.d.ts +11 -4
- package/lib/core/types/search.js +6 -0
- package/lib/core/types/segmented.d.ts +12 -0
- package/lib/core/types/segmented.js +3 -0
- package/lib/core/utils/frontmatter-translate.d.ts +6 -0
- package/lib/core/utils/frontmatter-translate.js +14 -0
- package/lib/core/utils/index.d.ts +2 -0
- package/lib/core/utils/index.js +2 -0
- package/lib/core/utils/mcp.d.ts +2 -0
- package/lib/core/utils/mcp.js +31 -0
- package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +44 -4
- package/lib/icons/AiStarsIcon/AiStarsIcon.js +11 -2
- package/lib/icons/ConnectIcon/ConnectIcon.d.ts +9 -0
- package/lib/icons/ConnectIcon/ConnectIcon.js +17 -0
- package/lib/icons/CubeIcon/CubeIcon.d.ts +9 -0
- package/lib/icons/CubeIcon/CubeIcon.js +17 -0
- package/lib/icons/HashtagIcon/HashtagIcon.d.ts +9 -0
- package/lib/icons/HashtagIcon/HashtagIcon.js +22 -0
- package/lib/icons/RedoclyIcon/RedoclyIcon.js +4 -7
- package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.d.ts +9 -0
- package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.js +34 -0
- package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.d.ts +9 -0
- package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.js +34 -0
- package/lib/icons/VSCodeIcon/VSCodeIcon.d.ts +9 -0
- package/lib/icons/VSCodeIcon/VSCodeIcon.js +17 -0
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -2
- package/lib/markdoc/components/Cards/Card.js +1 -28
- package/lib/markdoc/components/ConnectMCP/ConnectMCP.d.ts +8 -0
- package/lib/markdoc/components/ConnectMCP/ConnectMCP.js +19 -0
- package/lib/markdoc/components/Tabs/TabList.d.ts +3 -1
- package/lib/markdoc/components/Tabs/TabList.js +197 -47
- package/lib/markdoc/components/Tabs/Tabs.d.ts +2 -1
- package/lib/markdoc/components/Tabs/Tabs.js +57 -12
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/default.d.ts +6 -0
- package/lib/markdoc/default.js +2 -0
- package/lib/markdoc/tags/card.js +0 -1
- package/lib/markdoc/tags/connect-mcp.d.ts +2 -0
- package/lib/markdoc/tags/connect-mcp.js +27 -0
- package/package.json +6 -6
- package/src/components/Buttons/AIAssistantButton.tsx +6 -2
- package/src/components/Buttons/ConnectMCPButton.tsx +180 -0
- package/src/components/Buttons/variables.ts +42 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntityIcon.tsx +2 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilter.tsx +5 -0
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +1 -5
- package/src/components/Catalog/variables.ts +1 -1
- package/src/components/Dropdown/Dropdown.tsx +84 -79
- package/src/components/Menu/MenuItem.tsx +1 -0
- package/src/components/Navbar/NavbarItem.tsx +6 -5
- package/src/components/PageActions/PageActions.tsx +5 -1
- package/src/components/PageActions/variables.ts +2 -0
- package/src/components/Search/FilterFields/SearchFilterFieldTags.tsx +3 -3
- package/src/components/Search/SearchAiActionButtons.tsx +76 -0
- package/src/components/Search/SearchAiConversationInput.tsx +61 -18
- package/src/components/Search/SearchAiDialog.tsx +52 -23
- package/src/components/Search/SearchAiMessage.tsx +172 -43
- package/src/components/Search/SearchAiNegativeFeedbackForm.tsx +210 -0
- package/src/components/Search/SearchDialog.tsx +49 -13
- package/src/components/Search/SearchGroups.tsx +2 -0
- package/src/components/Search/variables.ts +36 -64
- package/src/components/Segmented/Segmented.tsx +15 -20
- package/src/components/Select/SelectInput.tsx +1 -0
- package/src/components/Select/variables.ts +2 -2
- package/src/components/Tag/Tag.tsx +35 -19
- package/src/components/Tag/variables.dark.ts +135 -36
- package/src/components/Tag/variables.ts +78 -61
- package/src/core/constants/index.ts +1 -0
- package/src/core/constants/mcp.ts +1 -0
- package/src/core/constants/search.ts +8 -4
- package/src/core/hooks/index.ts +3 -0
- package/src/core/hooks/menu/use-nested-menu.ts +2 -2
- package/src/core/hooks/search/use-feedback-tooltip.ts +32 -0
- package/src/core/hooks/use-connect-mcp-button.ts +79 -0
- package/src/core/hooks/use-mcp-config.ts +43 -0
- package/src/core/hooks/use-page-actions.ts +148 -126
- package/src/core/hooks/use-product-picker.ts +2 -1
- package/src/core/hooks/use-tabs.ts +168 -86
- package/src/core/hooks/use-telemetry-fallback.ts +10 -8
- package/src/core/openapi/index.ts +1 -0
- package/src/core/styles/dark.ts +4 -0
- package/src/core/styles/global.ts +6 -1
- package/src/core/types/hooks.ts +5 -1
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +13 -0
- package/src/core/types/mcp.ts +8 -0
- package/src/core/types/search.ts +13 -4
- package/src/core/types/segmented.ts +14 -0
- package/src/core/utils/frontmatter-translate.ts +9 -0
- package/src/core/utils/index.ts +2 -0
- package/src/core/utils/mcp.ts +34 -0
- package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +13 -4
- package/src/icons/AiStarsIcon/AiStarsIcon.tsx +11 -2
- package/src/icons/ConnectIcon/ConnectIcon.tsx +27 -0
- package/src/icons/CubeIcon/CubeIcon.tsx +27 -0
- package/src/icons/HashtagIcon/HashtagIcon.tsx +23 -0
- package/src/icons/RedoclyIcon/RedoclyIcon.tsx +4 -22
- package/src/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.tsx +38 -0
- package/src/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.tsx +35 -0
- package/src/icons/VSCodeIcon/VSCodeIcon.tsx +29 -0
- package/src/index.ts +1 -2
- package/src/markdoc/components/Cards/Card.tsx +1 -28
- package/src/markdoc/components/ConnectMCP/ConnectMCP.tsx +28 -0
- package/src/markdoc/components/Tabs/TabList.tsx +312 -105
- package/src/markdoc/components/Tabs/Tabs.tsx +136 -11
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/default.ts +2 -0
- package/src/markdoc/tags/card.ts +0 -1
- package/src/markdoc/tags/connect-mcp.ts +25 -0
- package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.d.ts +0 -1
- package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.js +0 -11
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
- package/lib/ext/process-scorecard.d.ts +0 -5
- package/lib/ext/process-scorecard.js +0 -11
- package/src/components/OpenApiDocs/hooks/AdditionalOverviewInfo.tsx +0 -9
- package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
- package/src/ext/process-scorecard.ts +0 -13
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import
|
|
1
|
+
import React, { useState, useEffect, useLayoutEffect, useRef, useCallback } from 'react';
|
|
2
|
+
import { useInRouterContext } from 'react-router-dom';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import type { JSX } from 'react';
|
|
5
6
|
|
|
@@ -26,6 +27,26 @@ type TabsProps = {
|
|
|
26
27
|
className?: string;
|
|
27
28
|
size: TabsSize;
|
|
28
29
|
initialTab?: string;
|
|
30
|
+
forceReady?: boolean;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type UseActiveTabFn = (
|
|
34
|
+
initialTab: string,
|
|
35
|
+
tabsId: string | undefined,
|
|
36
|
+
childrenArray: React.ReactElement<TabItemProps>[],
|
|
37
|
+
) => {
|
|
38
|
+
activeTab: string;
|
|
39
|
+
setActiveTab: (tab: string) => void;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type TabsViewProps = Omit<TabsProps, 'children'> & {
|
|
43
|
+
childrenArray: React.ReactElement<TabItemProps>[];
|
|
44
|
+
initialTab: string;
|
|
45
|
+
isReady: boolean;
|
|
46
|
+
labelsHash: string;
|
|
47
|
+
useActiveTab: UseActiveTabFn;
|
|
48
|
+
containerRef: React.RefObject<HTMLUListElement | null>;
|
|
49
|
+
onReadyChange: (ready: boolean) => void;
|
|
29
50
|
};
|
|
30
51
|
|
|
31
52
|
export function Tabs({
|
|
@@ -34,25 +55,72 @@ export function Tabs({
|
|
|
34
55
|
className,
|
|
35
56
|
size,
|
|
36
57
|
initialTab: propInitialTab,
|
|
58
|
+
forceReady = false,
|
|
37
59
|
}: TabsProps): JSX.Element {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
);
|
|
60
|
+
const childrenArray = React.Children.toArray(children) as React.ReactElement<TabItemProps>[];
|
|
61
|
+
const [isReady, setIsReady] = useState(false);
|
|
62
|
+
const containerRef = useRef<HTMLUListElement | null>(null);
|
|
41
63
|
|
|
42
64
|
const initialTab = propInitialTab ?? childrenArray[0]?.props.label ?? '';
|
|
43
|
-
const
|
|
65
|
+
const labelsHash = childrenArray.map((c) => c.props.label).join('|');
|
|
44
66
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, [
|
|
67
|
+
const handleReadyChange = useCallback((ready: boolean) => {
|
|
68
|
+
setIsReady(ready);
|
|
69
|
+
}, []);
|
|
70
|
+
|
|
71
|
+
// Reset isReady when children change (new page/tabs)
|
|
72
|
+
// Use useLayoutEffect to run synchronously before paint
|
|
73
|
+
useLayoutEffect(() => {
|
|
74
|
+
setIsReady(false);
|
|
75
|
+
}, [labelsHash]);
|
|
76
|
+
|
|
77
|
+
const inRouter = useInRouterContext();
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<TabsView
|
|
81
|
+
id={id}
|
|
82
|
+
className={className}
|
|
83
|
+
size={size}
|
|
84
|
+
childrenArray={childrenArray}
|
|
85
|
+
initialTab={initialTab}
|
|
86
|
+
useActiveTab={inRouter ? useActiveTabWithRouter : useActiveTabWithoutRouter}
|
|
87
|
+
isReady={isReady || forceReady}
|
|
88
|
+
labelsHash={labelsHash}
|
|
89
|
+
containerRef={containerRef}
|
|
90
|
+
onReadyChange={handleReadyChange}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function TabsView({
|
|
96
|
+
id,
|
|
97
|
+
className,
|
|
98
|
+
size,
|
|
99
|
+
childrenArray,
|
|
100
|
+
useActiveTab,
|
|
101
|
+
initialTab,
|
|
102
|
+
isReady,
|
|
103
|
+
labelsHash,
|
|
104
|
+
containerRef,
|
|
105
|
+
onReadyChange,
|
|
106
|
+
}: TabsViewProps): JSX.Element {
|
|
107
|
+
const { activeTab, setActiveTab } = useActiveTab(initialTab, id, childrenArray);
|
|
48
108
|
|
|
49
109
|
return (
|
|
50
|
-
<TabsContainer
|
|
110
|
+
<TabsContainer
|
|
111
|
+
data-component-name="Markdoc/Tabs/Tabs"
|
|
112
|
+
className={className}
|
|
113
|
+
key={id}
|
|
114
|
+
$isReady={isReady}
|
|
115
|
+
>
|
|
51
116
|
<TabList
|
|
117
|
+
key={labelsHash}
|
|
52
118
|
size={size}
|
|
53
119
|
childrenArray={childrenArray}
|
|
54
120
|
activeTab={activeTab}
|
|
55
121
|
onTabChange={setActiveTab}
|
|
122
|
+
containerRef={containerRef}
|
|
123
|
+
onReadyChange={onReadyChange}
|
|
56
124
|
/>
|
|
57
125
|
{childrenArray.map((child, index) => {
|
|
58
126
|
const { label } = child.props;
|
|
@@ -72,7 +140,56 @@ export function Tabs({
|
|
|
72
140
|
</TabsContainer>
|
|
73
141
|
);
|
|
74
142
|
}
|
|
75
|
-
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Validates that the active tab exists in children and resets to initial tab if not found.
|
|
146
|
+
* Ensures tab state remains consistent when tab structure changes.
|
|
147
|
+
*/
|
|
148
|
+
function useValidateActiveTab(
|
|
149
|
+
activeTab: string,
|
|
150
|
+
setActiveTab: (tab: string) => void,
|
|
151
|
+
childrenArray: React.ReactElement<TabItemProps>[],
|
|
152
|
+
initialTab: string,
|
|
153
|
+
) {
|
|
154
|
+
useEffect(() => {
|
|
155
|
+
const availableLabels = childrenArray.map((child) => child.props.label);
|
|
156
|
+
if (activeTab && !availableLabels.includes(activeTab) && availableLabels.length > 0) {
|
|
157
|
+
setActiveTab(initialTab);
|
|
158
|
+
}
|
|
159
|
+
}, [childrenArray, activeTab, initialTab, setActiveTab]);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const useActiveTabWithRouter = (
|
|
163
|
+
initialTab: string,
|
|
164
|
+
tabsId: string | undefined,
|
|
165
|
+
childrenArray: React.ReactElement<TabItemProps>[],
|
|
166
|
+
) => {
|
|
167
|
+
const { activeTab, setActiveTab } = useActiveTab({ initialTab, tabsId });
|
|
168
|
+
|
|
169
|
+
useValidateActiveTab(activeTab, setActiveTab, childrenArray, initialTab);
|
|
170
|
+
|
|
171
|
+
return {
|
|
172
|
+
activeTab,
|
|
173
|
+
setActiveTab,
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const useActiveTabWithoutRouter = (
|
|
178
|
+
initialTab: string,
|
|
179
|
+
_tabsId: string | undefined,
|
|
180
|
+
childrenArray: React.ReactElement<TabItemProps>[],
|
|
181
|
+
) => {
|
|
182
|
+
const [activeTab, setActiveTab] = useState(initialTab);
|
|
183
|
+
|
|
184
|
+
useValidateActiveTab(activeTab, setActiveTab, childrenArray, initialTab);
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
activeTab,
|
|
188
|
+
setActiveTab,
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const TabsContainer = styled.div<{ $isReady: boolean }>`
|
|
76
193
|
position: relative;
|
|
77
194
|
color: var(--md-tabs-container-text-color);
|
|
78
195
|
font-size: var(--md-tabs-container-font-size);
|
|
@@ -88,6 +205,14 @@ const TabsContainer = styled.div`
|
|
|
88
205
|
margin: 0;
|
|
89
206
|
padding: 0;
|
|
90
207
|
}
|
|
208
|
+
|
|
209
|
+
${({ $isReady }) =>
|
|
210
|
+
!$isReady &&
|
|
211
|
+
css`
|
|
212
|
+
opacity: 0;
|
|
213
|
+
pointer-events: none;
|
|
214
|
+
overflow: hidden;
|
|
215
|
+
`}
|
|
91
216
|
`;
|
|
92
217
|
|
|
93
218
|
export const TabContent = styled.div`
|
|
@@ -20,3 +20,4 @@ export * from '@redocly/theme/markdoc/components/CodeWalkthrough/CodeToggle';
|
|
|
20
20
|
export * from '@redocly/theme/markdoc/components/CodeWalkthrough/CodeContainer';
|
|
21
21
|
export * from '@redocly/theme/markdoc/components/CodeGroup/CodeGroup';
|
|
22
22
|
export * from '@redocly/theme/markdoc/components/Icon/Icon';
|
|
23
|
+
export * from '@redocly/theme/markdoc/components/ConnectMCP/ConnectMCP';
|
package/src/markdoc/default.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { input } from '@redocly/theme/markdoc/tags/input';
|
|
|
25
25
|
import { toggle } from '@redocly/theme/markdoc/tags/code-toggle';
|
|
26
26
|
import { codeGroup } from '@redocly/theme/markdoc/tags/code-group';
|
|
27
27
|
import { icon } from '@redocly/theme/markdoc/tags/icon';
|
|
28
|
+
import { connectMcp } from '@redocly/theme/markdoc/tags/connect-mcp';
|
|
28
29
|
|
|
29
30
|
export const tags = {
|
|
30
31
|
[admonition.tagName]: admonition.schema,
|
|
@@ -45,4 +46,5 @@ export const tags = {
|
|
|
45
46
|
[input.tagName]: input.schema,
|
|
46
47
|
[codeGroup.tagName]: codeGroup.schema,
|
|
47
48
|
[icon.tagName]: icon.schema,
|
|
49
|
+
[connectMcp.tagName]: connectMcp.schema,
|
|
48
50
|
};
|
package/src/markdoc/tags/card.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MarkdocSchemaWrapper } from '@redocly/theme/markdoc/tags/types';
|
|
2
|
+
|
|
3
|
+
export const connectMcp: MarkdocSchemaWrapper = {
|
|
4
|
+
schema: {
|
|
5
|
+
render: 'ConnectMCP',
|
|
6
|
+
attributes: {
|
|
7
|
+
placement: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'bottom',
|
|
10
|
+
matches: ['top', 'bottom'],
|
|
11
|
+
},
|
|
12
|
+
alignment: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'start',
|
|
15
|
+
matches: ['start', 'end'],
|
|
16
|
+
},
|
|
17
|
+
options: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: ['cursor', 'vscode', 'copy'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
selfClosing: true,
|
|
23
|
+
},
|
|
24
|
+
tagName: 'connect-mcp',
|
|
25
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AdditionalOverviewInfo: any;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// interface AdditionalOverviewInfoProps {
|
|
3
|
-
// info: any;
|
|
4
|
-
// }
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AdditionalOverviewInfo = void 0;
|
|
7
|
-
// export function AdditionalOverviewInfo(_props: AdditionalOverviewInfoProps) {
|
|
8
|
-
// return null;
|
|
9
|
-
// }
|
|
10
|
-
exports.AdditionalOverviewInfo = null;
|
|
11
|
-
//# sourceMappingURL=AdditionalOverviewInfo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AfterOpenApiDescription: any;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useProcessScorecard = useProcessScorecard;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function useProcessScorecard() {
|
|
6
|
-
return {
|
|
7
|
-
processScorecard: (0, react_1.useCallback)((scorecard) => scorecard, []),
|
|
8
|
-
processInfo: (0, react_1.useCallback)((info) => info, []),
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=process-scorecard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const AfterOpenApiDescription: any = null;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
import type { CatalogItem } from '@redocly/theme';
|
|
4
|
-
|
|
5
|
-
export function useProcessScorecard(): {
|
|
6
|
-
processScorecard: <T = any>(scorecard: T, api: CatalogItem) => T;
|
|
7
|
-
processInfo: <T>(info: T) => T;
|
|
8
|
-
} {
|
|
9
|
-
return {
|
|
10
|
-
processScorecard: useCallback((scorecard) => scorecard, []),
|
|
11
|
-
processInfo: useCallback((info) => info, []),
|
|
12
|
-
};
|
|
13
|
-
}
|