@redocly/theme 0.70.0-next.1 → 0.70.0-next.11
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/ConnectMCPButton.js +19 -14
- package/lib/components/Buttons/variables.d.ts +1 -0
- package/lib/components/Buttons/variables.js +4 -1
- package/lib/components/Catalog/Catalog.js +3 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.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/CatalogFilter/CatalogFilterCheckboxes.js +30 -11
- package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +2 -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.d.ts +4 -2
- package/lib/components/Dropdown/Dropdown.js +31 -9
- package/lib/components/Dropdown/DropdownMenu.d.ts +1 -0
- package/lib/components/Dropdown/DropdownMenu.js +1 -1
- package/lib/components/Feedback/Reasons.js +3 -2
- package/lib/components/Filter/FilterCheckboxes.js +30 -11
- package/lib/components/Filter/FilterDateRange.js +36 -2
- package/lib/components/Footer/Footer.js +4 -1
- package/lib/components/Image/Image.js +24 -4
- package/lib/components/JsonViewer/Helpers.d.ts +10 -2
- package/lib/components/JsonViewer/Helpers.js +32 -36
- package/lib/components/JsonViewer/JsonViewer.js +15 -18
- package/lib/components/LoadProgressBar/LoadProgressBar.d.ts +8 -0
- package/lib/components/LoadProgressBar/LoadProgressBar.js +122 -0
- package/lib/components/MCP/McpConnectionTabs.js +9 -2
- 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/Portal/Portal.js +37 -5
- package/lib/components/Product/utils.js +1 -1
- package/lib/components/Search/SearchAiActionButtons.js +8 -3
- package/lib/components/Search/SearchAiActivity.d.ts +10 -0
- package/lib/components/Search/SearchAiActivity.js +278 -0
- package/lib/components/Search/SearchAiConversationInput.js +10 -6
- package/lib/components/Search/SearchAiDialog.js +13 -2
- package/lib/components/Search/SearchAiMessage.d.ts +2 -1
- package/lib/components/Search/SearchAiMessage.js +21 -109
- package/lib/components/Search/SearchAiResponse.js +1 -0
- package/lib/components/Search/SearchDialog.js +10 -0
- package/lib/components/Search/SearchItem.js +11 -10
- package/lib/components/Search/SearchTrigger.js +37 -6
- package/lib/components/Search/variables.js +17 -2
- package/lib/components/Segmented/Segmented.js +23 -3
- package/lib/components/Select/Select.js +10 -3
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +5 -11
- package/lib/components/Sidebar/Sidebar.js +2 -2
- package/lib/components/SplitButton/SplitButton.js +37 -3
- 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 +2 -0
- package/lib/core/constants/index.js +2 -0
- package/lib/core/constants/mcp.d.ts +2 -2
- package/lib/core/constants/mcp.js +3 -8
- package/lib/core/constants/prompt.d.ts +9 -0
- package/lib/core/constants/prompt.js +33 -0
- package/lib/core/constants/search.d.ts +1 -1
- package/lib/core/constants/search.js +6 -2
- package/lib/core/contexts/PortalContainerContext.d.ts +2 -0
- package/lib/core/contexts/PortalContainerContext.js +7 -0
- package/lib/core/hooks/code-walkthrough/use-code-panel.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough.d.ts +1 -2
- package/lib/core/hooks/code-walkthrough/use-renderable-files.d.ts +1 -1
- package/lib/core/hooks/index.d.ts +9 -0
- package/lib/core/hooks/index.js +9 -0
- package/lib/core/hooks/menu/use-collapse.js +1 -1
- 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/prompt/use-prompt-actions.d.ts +7 -0
- package/lib/core/hooks/prompt/use-prompt-actions.js +19 -0
- package/lib/core/hooks/prompt/use-prompt-text-limit.d.ts +19 -0
- package/lib/core/hooks/prompt/use-prompt-text-limit.js +35 -0
- package/lib/core/hooks/search/use-persisted-quick-filter.d.ts +21 -0
- package/lib/core/hooks/search/use-persisted-quick-filter.js +92 -0
- package/lib/core/hooks/search/use-search-ai-activity.d.ts +11 -0
- package/lib/core/hooks/search/use-search-ai-activity.js +15 -0
- package/lib/core/hooks/use-connect-mcp-button.js +3 -1
- 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-dialog-hotkeys.js +4 -2
- package/lib/core/hooks/use-full-height.d.ts +1 -1
- package/lib/core/hooks/use-full-height.js +8 -8
- package/lib/core/hooks/use-page-actions.d.ts +1 -1
- package/lib/core/hooks/use-page-actions.js +10 -8
- package/lib/core/hooks/use-pointer-border-highlight.d.ts +7 -0
- package/lib/core/hooks/use-pointer-border-highlight.js +29 -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-tab-list.d.ts +31 -0
- package/lib/core/hooks/use-tab-list.js +49 -0
- package/lib/core/hooks/use-telemetry-fallback.d.ts +2 -0
- package/lib/core/hooks/use-telemetry-fallback.js +2 -0
- package/lib/core/hooks/use-theme-hooks.js +16 -0
- package/lib/core/styles/dark.js +14 -12
- package/lib/core/styles/global.d.ts +2 -0
- package/lib/core/styles/global.js +115 -136
- package/lib/core/styles/index.d.ts +1 -0
- package/lib/core/styles/index.js +3 -1
- package/lib/core/styles/search-ai-appear.d.ts +1 -0
- package/lib/core/styles/search-ai-appear.js +18 -0
- package/lib/core/types/code-walkthrough.d.ts +84 -0
- package/lib/core/types/consent.d.ts +54 -0
- package/lib/core/types/consent.js +3 -0
- package/lib/core/types/dropdown.d.ts +1 -0
- package/lib/core/types/dropdown.js +3 -0
- package/lib/core/types/hooks.d.ts +8 -1
- package/lib/core/types/index.d.ts +4 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/mcp.d.ts +3 -2
- package/lib/core/types/navigation-tabs.d.ts +49 -0
- package/lib/core/types/navigation-tabs.js +3 -0
- package/lib/core/types/prompt.d.ts +9 -0
- package/lib/core/types/prompt.js +3 -0
- package/lib/core/types/search.d.ts +25 -0
- package/lib/core/utils/Dynamic.d.ts +8 -1
- package/lib/core/utils/Dynamic.js +34 -3
- package/lib/core/utils/assign-ref.d.ts +2 -0
- package/lib/core/utils/assign-ref.js +12 -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/content-segments.d.ts +12 -1
- package/lib/core/utils/content-segments.js +90 -5
- package/lib/core/utils/download-code-walkthrough.d.ts +1 -1
- package/lib/core/utils/dropdown.d.ts +2 -0
- package/lib/core/utils/dropdown.js +12 -0
- package/lib/core/utils/get-ai-prompt-link.d.ts +15 -0
- package/lib/core/utils/get-ai-prompt-link.js +29 -0
- package/lib/core/utils/get-code-walkthrough-file-text.d.ts +1 -1
- package/lib/core/utils/index.d.ts +5 -0
- package/lib/core/utils/index.js +5 -0
- package/lib/core/utils/match-code-walkthrough-conditions.d.ts +1 -1
- package/lib/core/utils/mcp.d.ts +2 -1
- package/lib/core/utils/mcp.js +13 -3
- 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/search-ai-activity.d.ts +4 -0
- package/lib/core/utils/search-ai-activity.js +83 -0
- package/lib/core/utils/urls.js +3 -1
- package/lib/core/utils/with-load-progress.d.ts +3 -0
- package/lib/core/utils/with-load-progress.js +24 -19
- package/lib/ext/configure.d.ts +1 -1
- package/lib/ext/configure.js +0 -1
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.d.ts +29 -0
- package/lib/icons/ExpandCollapseIcon/ExpandCollapseIcon.js +81 -0
- package/lib/icons/LinkIcon/LinkIconSymbol.d.ts +12 -0
- package/lib/icons/LinkIcon/LinkIconSymbol.js +41 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +9 -1
- package/lib/layouts/PageLayout.js +1 -1
- package/lib/layouts/RootLayout.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +3 -3
- package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanelToolbar.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +1 -1
- package/lib/markdoc/components/Prompt/Prompt.d.ts +15 -0
- package/lib/markdoc/components/Prompt/Prompt.js +163 -0
- package/lib/markdoc/components/Prompt/PromptActions.d.ts +13 -0
- package/lib/markdoc/components/Prompt/PromptActions.js +43 -0
- package/lib/markdoc/components/Prompt/PromptBody.d.ts +14 -0
- package/lib/markdoc/components/Prompt/PromptBody.js +99 -0
- package/lib/markdoc/components/Prompt/PromptCopyButton.d.ts +10 -0
- package/lib/markdoc/components/Prompt/PromptCopyButton.js +28 -0
- package/lib/markdoc/components/Prompt/PromptHeader.d.ts +9 -0
- package/lib/markdoc/components/Prompt/PromptHeader.js +57 -0
- package/lib/markdoc/components/Prompt/PromptShowHideButton.d.ts +7 -0
- package/lib/markdoc/components/Prompt/PromptShowHideButton.js +21 -0
- package/lib/markdoc/components/Prompt/PromptToggleLabel.d.ts +7 -0
- package/lib/markdoc/components/Prompt/PromptToggleLabel.js +28 -0
- package/lib/markdoc/components/Prompt/variables.d.ts +1 -0
- package/lib/markdoc/components/Prompt/variables.dark.d.ts +1 -0
- package/lib/markdoc/components/Prompt/variables.dark.js +8 -0
- package/lib/markdoc/components/Prompt/variables.js +44 -0
- package/lib/markdoc/components/Tabs/TabList.js +8 -6
- package/lib/markdoc/components/default.d.ts +1 -0
- package/lib/markdoc/components/default.js +1 -0
- package/lib/markdoc/default.d.ts +2 -0
- package/lib/markdoc/default.js +2 -0
- package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
- package/lib/markdoc/tags/connect-mcp.js +15 -0
- package/lib/markdoc/tags/prompt.d.ts +2 -0
- package/lib/markdoc/tags/prompt.js +56 -0
- package/package.json +4 -8
- package/src/components/Buttons/ConnectMCPButton.tsx +21 -16
- package/src/components/Buttons/variables.ts +4 -0
- package/src/components/Catalog/Catalog.tsx +6 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.tsx +3 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +37 -22
- package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +3 -2
- 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 +32 -7
- package/src/components/Dropdown/DropdownMenu.tsx +7 -1
- package/src/components/Feedback/Reasons.tsx +3 -2
- package/src/components/Filter/FilterCheckboxes.tsx +33 -18
- package/src/components/Filter/FilterDateRange.tsx +3 -2
- package/src/components/Footer/Footer.tsx +2 -0
- package/src/components/Image/Image.tsx +26 -5
- package/src/components/JsonViewer/Helpers.tsx +51 -54
- package/src/components/JsonViewer/JsonViewer.tsx +23 -25
- package/src/components/LoadProgressBar/LoadProgressBar.tsx +113 -0
- package/src/components/MCP/McpConnectionTabs.tsx +22 -5
- 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/Portal/Portal.tsx +4 -2
- package/src/components/Product/utils.ts +1 -1
- package/src/components/Search/SearchAiActionButtons.tsx +31 -19
- package/src/components/Search/SearchAiActivity.tsx +318 -0
- package/src/components/Search/SearchAiConversationInput.tsx +13 -7
- package/src/components/Search/SearchAiDialog.tsx +20 -4
- package/src/components/Search/SearchAiMessage.tsx +28 -136
- package/src/components/Search/SearchAiResponse.tsx +1 -0
- package/src/components/Search/SearchDialog.tsx +11 -0
- package/src/components/Search/SearchItem.tsx +19 -10
- package/src/components/Search/SearchTrigger.tsx +47 -3
- package/src/components/Search/variables.ts +17 -2
- package/src/components/Segmented/Segmented.tsx +25 -16
- package/src/components/Select/Select.tsx +12 -6
- package/src/components/Select/SelectInput.tsx +10 -18
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/SplitButton/SplitButton.tsx +8 -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 +2 -0
- package/src/core/constants/mcp.ts +3 -9
- package/src/core/constants/prompt.ts +34 -0
- package/src/core/constants/search.ts +6 -2
- package/src/core/contexts/PortalContainerContext.tsx +4 -0
- package/src/core/hooks/__mocks__/index.ts +5 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +20 -0
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +1 -2
- package/src/core/hooks/code-walkthrough/__mocks__/mock-intersection-observer.ts +1 -2
- package/src/core/hooks/code-walkthrough/use-code-panel.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +2 -2
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-steps.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +3 -3
- package/src/core/hooks/code-walkthrough/use-renderable-files.ts +1 -1
- package/src/core/hooks/index.ts +9 -0
- package/src/core/hooks/menu/use-collapse.ts +1 -1
- 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/prompt/use-prompt-actions.ts +28 -0
- package/src/core/hooks/prompt/use-prompt-text-limit.ts +59 -0
- package/src/core/hooks/search/use-persisted-quick-filter.ts +125 -0
- package/src/core/hooks/search/use-search-ai-activity.ts +31 -0
- package/src/core/hooks/use-connect-mcp-button.ts +13 -2
- 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-dialog-hotkeys.ts +11 -5
- package/src/core/hooks/use-full-height.ts +8 -8
- package/src/core/hooks/use-page-actions.ts +21 -9
- package/src/core/hooks/use-pointer-border-highlight.ts +46 -0
- package/src/core/hooks/use-scroll-item-into-view.ts +18 -0
- package/src/core/hooks/use-tab-list.ts +63 -0
- package/src/core/hooks/use-telemetry-fallback.ts +2 -0
- package/src/core/hooks/use-theme-hooks.ts +16 -0
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +96 -116
- package/src/core/styles/index.ts +2 -1
- package/src/core/styles/search-ai-appear.ts +16 -0
- package/src/core/types/code-walkthrough.ts +103 -0
- package/src/core/types/consent.ts +51 -0
- package/src/core/types/dropdown.ts +1 -0
- package/src/core/types/hooks.ts +8 -0
- package/src/core/types/index.ts +4 -0
- package/src/core/types/l10n.ts +46 -2
- package/src/core/types/mcp.ts +4 -2
- package/src/core/types/navigation-tabs.ts +54 -0
- package/src/core/types/prompt.ts +11 -0
- package/src/core/types/search.ts +23 -0
- package/src/core/utils/Dynamic.tsx +67 -35
- package/src/core/utils/assign-ref.ts +9 -0
- package/src/core/utils/consent-settings-link-placement.ts +18 -0
- package/src/core/utils/content-segments.ts +98 -6
- package/src/core/utils/download-code-walkthrough.ts +1 -1
- package/src/core/utils/dropdown.ts +14 -0
- package/src/core/utils/get-ai-prompt-link.ts +30 -0
- package/src/core/utils/get-code-walkthrough-file-text.ts +1 -1
- package/src/core/utils/index.ts +5 -0
- package/src/core/utils/match-code-walkthrough-conditions.ts +1 -1
- package/src/core/utils/mcp.ts +16 -4
- package/src/core/utils/menu.ts +54 -9
- package/src/core/utils/navigation-tabs.ts +99 -0
- package/src/core/utils/search-ai-activity.ts +110 -0
- package/src/core/utils/urls.ts +3 -1
- package/src/core/utils/with-load-progress.ts +23 -18
- package/src/ext/configure.ts +1 -1
- package/src/icons/CheckboxIcon/CheckboxIcon.tsx +1 -0
- package/src/icons/ChevronSortIcon/ChevronSortIcon.tsx +1 -0
- package/src/icons/ExpandCollapseIcon/ExpandCollapseIcon.tsx +56 -0
- package/src/icons/LinkIcon/LinkIconSymbol.tsx +51 -0
- package/src/index.ts +8 -0
- package/src/layouts/PageLayout.tsx +1 -1
- package/src/layouts/RootLayout.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +4 -4
- package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanelToolbar.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +2 -2
- package/src/markdoc/components/Prompt/Prompt.tsx +219 -0
- package/src/markdoc/components/Prompt/PromptActions.tsx +104 -0
- package/src/markdoc/components/Prompt/PromptBody.tsx +107 -0
- package/src/markdoc/components/Prompt/PromptCopyButton.tsx +73 -0
- package/src/markdoc/components/Prompt/PromptHeader.tsx +81 -0
- package/src/markdoc/components/Prompt/PromptShowHideButton.tsx +43 -0
- package/src/markdoc/components/Prompt/PromptToggleLabel.tsx +41 -0
- package/src/markdoc/components/Prompt/variables.dark.ts +5 -0
- package/src/markdoc/components/Prompt/variables.ts +41 -0
- package/src/markdoc/components/Tabs/TabList.tsx +9 -12
- package/src/markdoc/components/default.ts +1 -0
- package/src/markdoc/default.ts +2 -0
- package/src/markdoc/tags/code-walkthrough.ts +1 -1
- package/src/markdoc/tags/connect-mcp.ts +16 -1
- package/src/markdoc/tags/prompt.ts +58 -0
|
@@ -19,12 +19,28 @@ const fallbacks = {
|
|
|
19
19
|
useOtelTelemetry: () => ({ send: () => {} }),
|
|
20
20
|
useBreadcrumbs: () => ({ breadcrumbs: [], siblings: undefined }),
|
|
21
21
|
useBanner: () => ({ banner: undefined, dismissBanner: () => {} }),
|
|
22
|
+
useConsent: () => ({
|
|
23
|
+
enabled: false,
|
|
24
|
+
config: undefined,
|
|
25
|
+
mode: undefined,
|
|
26
|
+
state: undefined,
|
|
27
|
+
decided: false,
|
|
28
|
+
gpc: false,
|
|
29
|
+
isDialogOpen: false,
|
|
30
|
+
openDialog: () => {},
|
|
31
|
+
closeDialog: () => {},
|
|
32
|
+
accept: () => {},
|
|
33
|
+
reject: () => {},
|
|
34
|
+
save: () => {},
|
|
35
|
+
}),
|
|
22
36
|
useCodeHighlight: () => ({ highlight: (rawContent: string) => rawContent }),
|
|
23
37
|
useUserMenu: () => ({}),
|
|
24
38
|
usePageData: () => null,
|
|
25
39
|
usePageProps: () => ({}),
|
|
26
40
|
usePageSharedData: () => null,
|
|
27
41
|
useMcpData: () => ({ docs: { enabled: false } }),
|
|
42
|
+
useSearchFeatures: () => ({}),
|
|
43
|
+
useNavigationTabs: () => undefined,
|
|
28
44
|
};
|
|
29
45
|
|
|
30
46
|
export const useThemeHooks = () => {
|
package/src/core/styles/dark.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { tagDarkMode } from '@redocly/theme/components/Tag/variables.dark';
|
|
|
10
10
|
import { statusCodeDarkMode } from '@redocly/theme/components/StatusCode/variables.dark';
|
|
11
11
|
import { switcherDarkMode } from '@redocly/theme/components/Switch/variables.dark';
|
|
12
12
|
import { cardsDarkMode } from '@redocly/theme/markdoc/components/Cards/variables.dark';
|
|
13
|
+
import { promptTagDarkMode } from '@redocly/theme/markdoc/components/Prompt/variables.dark';
|
|
13
14
|
import { catalogDarkMode } from '@redocly/theme/components/Catalog/variables.dark';
|
|
14
15
|
import { pageActionsDarkMode } from '@redocly/theme/components/PageActions/variables.dark';
|
|
15
16
|
import { tooltipDarkMode } from '@redocly/theme/components/Tooltip/variables.dark';
|
|
@@ -357,6 +358,7 @@ export const darkMode = css`
|
|
|
357
358
|
${replayDarkMode}
|
|
358
359
|
${switcherDarkMode}
|
|
359
360
|
${cardsDarkMode}
|
|
361
|
+
${promptTagDarkMode}
|
|
360
362
|
${catalogDarkMode}
|
|
361
363
|
${pageActionsDarkMode}
|
|
362
364
|
${tooltipDarkMode}
|
|
@@ -20,7 +20,7 @@ import { checkbox } from '@redocly/theme/icons/CheckboxIcon/variables';
|
|
|
20
20
|
import { admonition } from '@redocly/theme/components/Admonition/variables';
|
|
21
21
|
import { footer } from '@redocly/theme/components/Footer/variables';
|
|
22
22
|
import { button } from '@redocly/theme/components/Button/variables';
|
|
23
|
-
import { aiAssistantButton } from '@redocly/theme/components/Buttons/variables';
|
|
23
|
+
import { aiAssistantButton, connectMcpButton } from '@redocly/theme/components/Buttons/variables';
|
|
24
24
|
import { navbar } from '@redocly/theme/components/Navbar/variables';
|
|
25
25
|
import { search } from '@redocly/theme/components/Search/variables';
|
|
26
26
|
import { menu, mobileMenu } from '@redocly/theme/components/Menu/variables';
|
|
@@ -28,6 +28,7 @@ import { code } from '@redocly/theme/components/CodeBlock/variables';
|
|
|
28
28
|
import { productPicker } from '@redocly/theme/components/Product/variables';
|
|
29
29
|
import { markdown } from '@redocly/theme/components/Markdown/variables';
|
|
30
30
|
import { banner } from '@redocly/theme/components/Banner/variables';
|
|
31
|
+
import { consent } from '@redocly/theme/components/Consent/variables';
|
|
31
32
|
import { markdownAccordion } from '@redocly/theme/markdoc/components/Accordion/variables';
|
|
32
33
|
import { markdownTabs } from '@redocly/theme/markdoc/components/Tabs/variables';
|
|
33
34
|
import { markdownNumberedList } from '@redocly/theme/markdoc/components/NumberedList/variables';
|
|
@@ -42,12 +43,15 @@ import { versionPicker } from '@redocly/theme/components/VersionPicker/variables
|
|
|
42
43
|
import { datePicker } from '@redocly/theme/components/DatePicker/variables'
|
|
43
44
|
import { switcher } from '@redocly/theme/components/Switch/variables';
|
|
44
45
|
import { cards } from '@redocly/theme/markdoc/components/Cards/variables';
|
|
46
|
+
import { promptTag } from '@redocly/theme/markdoc/components/Prompt/variables';
|
|
45
47
|
import { codeWalkthrough } from '@redocly/theme/markdoc/components/CodeWalkthrough/variables';
|
|
46
48
|
import { skipContent } from '@redocly/theme/components/SkipContent/variables';
|
|
47
49
|
import { pageActions } from '@redocly/theme/components/PageActions/variables';
|
|
48
50
|
import { svgViewer } from '@redocly/theme/components/SvgViewer/variables';
|
|
49
51
|
import { toast } from '@redocly/theme/components/Toast/variables';
|
|
50
52
|
import { pageNavigation } from '@redocly/theme/components/PageNavigation/variables';
|
|
53
|
+
import { navigationTabs } from '@redocly/theme/components/NavigationTabs/variables';
|
|
54
|
+
import { breakpoints } from '@redocly/theme/core/utils';
|
|
51
55
|
|
|
52
56
|
import { activeBrandPaletteLight } from './palette';
|
|
53
57
|
import { darkMode } from './dark';
|
|
@@ -869,46 +873,6 @@ const loadProgressBar = css`
|
|
|
869
873
|
--load-progress-bar-height: 2px; // @presenter Height
|
|
870
874
|
|
|
871
875
|
// @tokens End
|
|
872
|
-
|
|
873
|
-
/* Make clicks pass-through */
|
|
874
|
-
#nprogress {
|
|
875
|
-
pointer-events: none;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
#nprogress .bar {
|
|
879
|
-
background: var(--load-progress-bar-color);
|
|
880
|
-
|
|
881
|
-
position: fixed;
|
|
882
|
-
z-index: var(--z-index-popover);
|
|
883
|
-
top: 0;
|
|
884
|
-
left: 0;
|
|
885
|
-
|
|
886
|
-
width: 100%;
|
|
887
|
-
height: var(--load-progress-bar-height);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
#nprogress .peg {
|
|
891
|
-
display: block;
|
|
892
|
-
position: absolute;
|
|
893
|
-
right: 0;
|
|
894
|
-
width: 100px;
|
|
895
|
-
height: 100%;
|
|
896
|
-
box-shadow: var(--load-progress-bar-shadow);
|
|
897
|
-
opacity: 1;
|
|
898
|
-
|
|
899
|
-
-webkit-transform: rotate(3deg) translate(0px, -4px);
|
|
900
|
-
-ms-transform: rotate(3deg) translate(0px, -4px);
|
|
901
|
-
transform: rotate(3deg) translate(0px, -4px);
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
.nprogress-custom-parent {
|
|
905
|
-
overflow: hidden;
|
|
906
|
-
position: relative;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
.nprogress-custom-parent #nprogress .bar {
|
|
910
|
-
position: absolute;
|
|
911
|
-
}
|
|
912
876
|
`;
|
|
913
877
|
|
|
914
878
|
const inputs = css`
|
|
@@ -1124,8 +1088,8 @@ const error = css`
|
|
|
1124
1088
|
--detailed-error-overlay-z-index: var(--z-index-raised);
|
|
1125
1089
|
|
|
1126
1090
|
--detailed-error-modal-width: calc(100% - var(--spacing-lg) * 2);
|
|
1127
|
-
--detailed-error-modal-height: calc(100vh - var(--navbar-height) - var(--spacing-lg) * 2);
|
|
1128
|
-
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-height));
|
|
1091
|
+
--detailed-error-modal-height: calc(100vh - var(--navbar-stack-height) - var(--spacing-lg) * 2);
|
|
1092
|
+
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-stack-height));
|
|
1129
1093
|
--detailed-error-modal-border-radius: var(--border-radius-md);
|
|
1130
1094
|
--detailed-error-modal-bg-color: var(--bg-color-raised);
|
|
1131
1095
|
--detailed-error-modal-color: var(--text-color-primary);
|
|
@@ -1327,81 +1291,90 @@ const replay = css`
|
|
|
1327
1291
|
`;
|
|
1328
1292
|
|
|
1329
1293
|
|
|
1294
|
+
/** The light theme tokens without a selector, for a host that sets them on one element. */
|
|
1295
|
+
export const tokens = css`
|
|
1296
|
+
${accordion}
|
|
1297
|
+
${admonition}
|
|
1298
|
+
${apiReferenceDocs}
|
|
1299
|
+
${apiReferencePanels}
|
|
1300
|
+
${badges}
|
|
1301
|
+
${banner}
|
|
1302
|
+
${borders}
|
|
1303
|
+
${consent}
|
|
1304
|
+
${breadcrumbs}
|
|
1305
|
+
${button}
|
|
1306
|
+
${aiAssistantButton}
|
|
1307
|
+
${connectMcpButton}
|
|
1308
|
+
${cards}
|
|
1309
|
+
${promptTag}
|
|
1310
|
+
${catalog}
|
|
1311
|
+
${catalogClassic}
|
|
1312
|
+
${code}
|
|
1313
|
+
${codeWalkthrough}
|
|
1314
|
+
${docsDropdown}
|
|
1315
|
+
${dropdown}
|
|
1316
|
+
${error}
|
|
1317
|
+
${filter}
|
|
1318
|
+
${footer}
|
|
1319
|
+
${headingsTypography}
|
|
1320
|
+
${httpTag}
|
|
1321
|
+
${image}
|
|
1322
|
+
${inputs}
|
|
1323
|
+
${languagePicker}
|
|
1324
|
+
${lastUpdated}
|
|
1325
|
+
${links}
|
|
1326
|
+
${loadProgressBar}
|
|
1327
|
+
${logo}
|
|
1328
|
+
${markdown}
|
|
1329
|
+
${markdownAccordion}
|
|
1330
|
+
${markdownTabs}
|
|
1331
|
+
${markdownNumberedList}
|
|
1332
|
+
${diagram}
|
|
1333
|
+
${menu}
|
|
1334
|
+
${mobileMenu}
|
|
1335
|
+
${modal}
|
|
1336
|
+
${navbar}
|
|
1337
|
+
${pages}
|
|
1338
|
+
${productPicker}
|
|
1339
|
+
${responsePanelColors}
|
|
1340
|
+
${search}
|
|
1341
|
+
${navigationTabs}
|
|
1342
|
+
${select}
|
|
1343
|
+
${sidebar}
|
|
1344
|
+
${sizeAndSpace}
|
|
1345
|
+
${tag}
|
|
1346
|
+
${themeColors}
|
|
1347
|
+
${activeBrandPaletteLight}
|
|
1348
|
+
${tile}
|
|
1349
|
+
${toc}
|
|
1350
|
+
${tooltip}
|
|
1351
|
+
${typography}
|
|
1352
|
+
${userMenu}
|
|
1353
|
+
${versionPicker}
|
|
1354
|
+
${zIndexDepth}
|
|
1355
|
+
${scorecardColors}
|
|
1356
|
+
${statusCode}
|
|
1357
|
+
${tab}
|
|
1358
|
+
${icon}
|
|
1359
|
+
${tree}
|
|
1360
|
+
${segmented}
|
|
1361
|
+
${switcher}
|
|
1362
|
+
${checkbox}
|
|
1363
|
+
${feedback}
|
|
1364
|
+
${scorecard}
|
|
1365
|
+
${datePicker}
|
|
1366
|
+
${replay}
|
|
1367
|
+
${skipContent}
|
|
1368
|
+
${pageActions}
|
|
1369
|
+
${svgViewer}
|
|
1370
|
+
${toast}
|
|
1371
|
+
${pageNavigation}
|
|
1372
|
+
|
|
1373
|
+
`;
|
|
1374
|
+
|
|
1330
1375
|
export const styles = css<{ palette?: string }>`
|
|
1331
1376
|
:root {
|
|
1332
|
-
${
|
|
1333
|
-
${admonition}
|
|
1334
|
-
${apiReferenceDocs}
|
|
1335
|
-
${apiReferencePanels}
|
|
1336
|
-
${badges}
|
|
1337
|
-
${banner}
|
|
1338
|
-
${borders}
|
|
1339
|
-
${breadcrumbs}
|
|
1340
|
-
${button}
|
|
1341
|
-
${aiAssistantButton}
|
|
1342
|
-
${cards}
|
|
1343
|
-
${catalog}
|
|
1344
|
-
${catalogClassic}
|
|
1345
|
-
${code}
|
|
1346
|
-
${codeWalkthrough}
|
|
1347
|
-
${docsDropdown}
|
|
1348
|
-
${dropdown}
|
|
1349
|
-
${error}
|
|
1350
|
-
${filter}
|
|
1351
|
-
${footer}
|
|
1352
|
-
${headingsTypography}
|
|
1353
|
-
${httpTag}
|
|
1354
|
-
${image}
|
|
1355
|
-
${inputs}
|
|
1356
|
-
${languagePicker}
|
|
1357
|
-
${lastUpdated}
|
|
1358
|
-
${links}
|
|
1359
|
-
${loadProgressBar}
|
|
1360
|
-
${logo}
|
|
1361
|
-
${markdown}
|
|
1362
|
-
${markdownAccordion}
|
|
1363
|
-
${markdownTabs}
|
|
1364
|
-
${markdownNumberedList}
|
|
1365
|
-
${diagram}
|
|
1366
|
-
${menu}
|
|
1367
|
-
${mobileMenu}
|
|
1368
|
-
${modal}
|
|
1369
|
-
${navbar}
|
|
1370
|
-
${pages}
|
|
1371
|
-
${productPicker}
|
|
1372
|
-
${responsePanelColors}
|
|
1373
|
-
${search}
|
|
1374
|
-
${select}
|
|
1375
|
-
${sidebar}
|
|
1376
|
-
${sizeAndSpace}
|
|
1377
|
-
${tag}
|
|
1378
|
-
${themeColors}
|
|
1379
|
-
${activeBrandPaletteLight}
|
|
1380
|
-
${tile}
|
|
1381
|
-
${toc}
|
|
1382
|
-
${tooltip}
|
|
1383
|
-
${typography}
|
|
1384
|
-
${userMenu}
|
|
1385
|
-
${versionPicker}
|
|
1386
|
-
${zIndexDepth}
|
|
1387
|
-
${scorecardColors}
|
|
1388
|
-
${statusCode}
|
|
1389
|
-
${tab}
|
|
1390
|
-
${icon}
|
|
1391
|
-
${tree}
|
|
1392
|
-
${segmented}
|
|
1393
|
-
${switcher}
|
|
1394
|
-
${checkbox}
|
|
1395
|
-
${feedback}
|
|
1396
|
-
${scorecard}
|
|
1397
|
-
${datePicker}
|
|
1398
|
-
${replay}
|
|
1399
|
-
${skipContent}
|
|
1400
|
-
${pageActions}
|
|
1401
|
-
${svgViewer}
|
|
1402
|
-
${toast}
|
|
1403
|
-
${pageNavigation}
|
|
1404
|
-
|
|
1377
|
+
${tokens}
|
|
1405
1378
|
background-color: var(--bg-color);
|
|
1406
1379
|
color: var(--text-color-primary);
|
|
1407
1380
|
font-family: var(--font-family-base);
|
|
@@ -1411,6 +1384,13 @@ export const styles = css<{ palette?: string }>`
|
|
|
1411
1384
|
${darkMode};
|
|
1412
1385
|
}
|
|
1413
1386
|
|
|
1387
|
+
@media screen and (min-width: ${breakpoints.medium}) {
|
|
1388
|
+
:root:has([data-component-name='NavigationTabs/NavigationTabs']) {
|
|
1389
|
+
--navbar-stack-height: calc(var(--navbar-height) + var(--navigation-tabs-height, 48px));
|
|
1390
|
+
--navbar-row-bottom-border-color: transparent;
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1414
1394
|
:root.notransition * {
|
|
1415
1395
|
transition: none !important;
|
|
1416
1396
|
}
|
package/src/core/styles/index.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { css, keyframes } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const appear = keyframes`
|
|
4
|
+
from {
|
|
5
|
+
opacity: 0;
|
|
6
|
+
transform: translateY(4px);
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export const searchAiAppearAnimation = css`
|
|
11
|
+
animation: ${appear} var(--search-ai-activity-fade-duration) ease-out;
|
|
12
|
+
|
|
13
|
+
@media (prefers-reduced-motion: reduce) {
|
|
14
|
+
animation: none;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { MarkerArea } from './marker';
|
|
2
3
|
|
|
3
4
|
export type ActiveStep = string | null;
|
|
@@ -13,3 +14,105 @@ export type WalkthroughStepsState = {
|
|
|
13
14
|
lockObserver?: React.RefObject<boolean>;
|
|
14
15
|
filtersElementRef?: React.RefObject<HTMLDivElement | null>;
|
|
15
16
|
};
|
|
17
|
+
|
|
18
|
+
export type CodeWalkthroughStepAttr = {
|
|
19
|
+
id: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type FilesetsMarkdocAttr = WithConditions<{
|
|
24
|
+
files?: string[];
|
|
25
|
+
downloadAssociatedFiles?: string[];
|
|
26
|
+
}>[];
|
|
27
|
+
|
|
28
|
+
export type InputsMarkdocAttr = {
|
|
29
|
+
[id: string]: WithConditions<{ value: string }>;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type TogglesMarkdocAttr = {
|
|
33
|
+
[id: string]: CodeWalkthroughConditionsObject;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type CodeWalkthroughConditions = {
|
|
37
|
+
[key: string]: string | string[] | undefined | boolean;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type CodeWalkthroughFileset = WithConditions<{
|
|
41
|
+
files?: CodeWalkthroughFile[];
|
|
42
|
+
downloadAssociatedFiles?: CodeWalkthroughFile[];
|
|
43
|
+
}>;
|
|
44
|
+
export type CodeWalkthroughFile = {
|
|
45
|
+
path: string;
|
|
46
|
+
content: CodeWalkthroughNode[];
|
|
47
|
+
basename: string;
|
|
48
|
+
metadata: CodeWalkthroughFileMetadata;
|
|
49
|
+
language: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type CodeWalkthroughChunk = {
|
|
53
|
+
start: number;
|
|
54
|
+
children: CodeWalkthroughNode[];
|
|
55
|
+
condition: CodeWalkthroughChunkCondition;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type CodeWalkthroughChunkCondition = WithConditions<{
|
|
59
|
+
steps: string[];
|
|
60
|
+
}>;
|
|
61
|
+
|
|
62
|
+
export type CodeWalkthroughNode = CodeWalkthroughChunk | string;
|
|
63
|
+
|
|
64
|
+
export type CodeWalkthroughFileMetadata = {
|
|
65
|
+
steps: string[];
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type CodeWalkthroughFilter = WithConditions<{
|
|
69
|
+
id: string;
|
|
70
|
+
label?: string;
|
|
71
|
+
items: CodeWalkthroughFilterItem[];
|
|
72
|
+
}>;
|
|
73
|
+
|
|
74
|
+
export type CodeWalkthroughFilterItem = WithConditions<{
|
|
75
|
+
value: string;
|
|
76
|
+
}>;
|
|
77
|
+
|
|
78
|
+
export type CodeWalkthroughConditionsObject = {
|
|
79
|
+
when?: CodeWalkthroughConditions;
|
|
80
|
+
unless?: CodeWalkthroughConditions;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type WithConditions<T> = T & CodeWalkthroughConditionsObject;
|
|
84
|
+
|
|
85
|
+
export type CodeWalkthroughControls = {
|
|
86
|
+
toggle: boolean;
|
|
87
|
+
input: string;
|
|
88
|
+
filter: string;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type CodeWalkthroughControlState = WithConditions<
|
|
92
|
+
| {
|
|
93
|
+
value: string;
|
|
94
|
+
render: boolean;
|
|
95
|
+
type: 'input';
|
|
96
|
+
}
|
|
97
|
+
| {
|
|
98
|
+
value: string;
|
|
99
|
+
render: boolean;
|
|
100
|
+
type: 'filter';
|
|
101
|
+
}
|
|
102
|
+
| {
|
|
103
|
+
value: boolean;
|
|
104
|
+
render: boolean;
|
|
105
|
+
type: 'toggle';
|
|
106
|
+
}
|
|
107
|
+
>;
|
|
108
|
+
export type CodeWalkthroughControlsState = Record<string, CodeWalkthroughControlState>;
|
|
109
|
+
|
|
110
|
+
export type CodeWalkthroughAttr = {
|
|
111
|
+
steps: CodeWalkthroughStepAttr[];
|
|
112
|
+
filters: Record<string, CodeWalkthroughFilter>;
|
|
113
|
+
filesets: CodeWalkthroughFileset[];
|
|
114
|
+
preview: ReactNode[];
|
|
115
|
+
inputs: InputsMarkdocAttr;
|
|
116
|
+
toggles: TogglesMarkdocAttr;
|
|
117
|
+
__idx: number;
|
|
118
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ConsentConfig } from '@redocly/config';
|
|
2
|
+
import type { TranslationKey } from './l10n';
|
|
3
|
+
|
|
4
|
+
export type ConsentCategoryId = 'necessary' | 'analytics' | 'marketing';
|
|
5
|
+
|
|
6
|
+
export type ConsentCategory = {
|
|
7
|
+
id: ConsentCategoryId;
|
|
8
|
+
locked: boolean;
|
|
9
|
+
titleTranslationKey: TranslationKey;
|
|
10
|
+
descriptionTranslationKey: TranslationKey;
|
|
11
|
+
titleDefault: string;
|
|
12
|
+
descriptionDefault: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type ConsentState = { necessary: true; analytics: boolean; marketing: boolean };
|
|
16
|
+
|
|
17
|
+
export type ConsentChoice = { analytics?: boolean; marketing?: boolean };
|
|
18
|
+
|
|
19
|
+
export type ConsentProvider = 'onetrust' | 'cookiebot' | 'trustarc' | 'tcf';
|
|
20
|
+
|
|
21
|
+
export type ConsentRuntime = {
|
|
22
|
+
configuredMode: 'auto' | 'opt-in' | 'opt-out' | ConsentProvider;
|
|
23
|
+
mode: 'opt-in' | 'opt-out' | ConsentProvider;
|
|
24
|
+
state: ConsentState;
|
|
25
|
+
decided: boolean;
|
|
26
|
+
gpc: boolean;
|
|
27
|
+
dialogOpen: boolean;
|
|
28
|
+
region: { source: 'timezone' | 'config' | 'none' | 'provider'; timeZone: string | null };
|
|
29
|
+
accept: () => void;
|
|
30
|
+
reject: () => void;
|
|
31
|
+
save: (next: ConsentChoice) => void;
|
|
32
|
+
open: () => void;
|
|
33
|
+
close: () => void;
|
|
34
|
+
reload: () => void;
|
|
35
|
+
on: (event: 'change' | 'open' | 'close', fn: (state: ConsentState) => void) => () => void;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type UseConsentResult = {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
config: ConsentConfig | undefined;
|
|
41
|
+
mode: ConsentRuntime['mode'] | undefined;
|
|
42
|
+
state: ConsentState | undefined;
|
|
43
|
+
decided: boolean;
|
|
44
|
+
gpc: boolean;
|
|
45
|
+
isDialogOpen: boolean;
|
|
46
|
+
openDialog: () => void;
|
|
47
|
+
closeDialog: () => void;
|
|
48
|
+
accept: () => void;
|
|
49
|
+
reject: () => void;
|
|
50
|
+
save: (next: ConsentChoice) => void;
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DropdownAlignment = 'start' | 'end';
|
package/src/core/types/hooks.ts
CHANGED
|
@@ -28,6 +28,7 @@ import type {
|
|
|
28
28
|
} from './catalog';
|
|
29
29
|
import type { UserMenuData } from './user-menu';
|
|
30
30
|
import type { ItemState, DrilldownMenuItemDetails } from './sidebar';
|
|
31
|
+
import type { NavigationTabsState } from './navigation-tabs';
|
|
31
32
|
import type {
|
|
32
33
|
SearchItemData,
|
|
33
34
|
SearchFacet,
|
|
@@ -40,6 +41,7 @@ import type {
|
|
|
40
41
|
import type { SubmitFeedbackParams } from './feedback';
|
|
41
42
|
import type { TFunction } from './l10n';
|
|
42
43
|
import type { BreadcrumbItem } from './breadcrumb';
|
|
44
|
+
import type { UseConsentResult } from './consent';
|
|
43
45
|
|
|
44
46
|
import type { AiSearchError } from '../constants/search';
|
|
45
47
|
|
|
@@ -90,6 +92,7 @@ export type ThemeHooks = {
|
|
|
90
92
|
banner: ResolvedBannerConfig | undefined;
|
|
91
93
|
dismissBanner: (content: string) => void;
|
|
92
94
|
};
|
|
95
|
+
useConsent: () => UseConsentResult;
|
|
93
96
|
useSearch: (
|
|
94
97
|
product?: string,
|
|
95
98
|
autoSearchDisabled?: boolean,
|
|
@@ -117,6 +120,9 @@ export type ThemeHooks = {
|
|
|
117
120
|
askAi?: boolean;
|
|
118
121
|
retrySearch: () => Promise<void>;
|
|
119
122
|
};
|
|
123
|
+
useSearchFeatures: () => {
|
|
124
|
+
askAi?: boolean;
|
|
125
|
+
};
|
|
120
126
|
useAiSearch: (options?: { filter?: SearchFilterItem[]; product?: string }) => {
|
|
121
127
|
askQuestion: (question: string, history?: AiSearchConversationItem[]) => void;
|
|
122
128
|
isGeneratingResponse: boolean;
|
|
@@ -154,6 +160,7 @@ export type ThemeHooks = {
|
|
|
154
160
|
pushDrilldownState: (drilldownDetails: DrilldownMenuItemDetails) => void;
|
|
155
161
|
backLink?: { slug?: string; label?: string };
|
|
156
162
|
};
|
|
163
|
+
useNavigationTabs: () => NavigationTabsState | undefined;
|
|
157
164
|
useSidebarSiblingsData: () =>
|
|
158
165
|
| {
|
|
159
166
|
prevPage?: ResolvedNavItemWithLink;
|
|
@@ -184,6 +191,7 @@ export type ThemeHooks = {
|
|
|
184
191
|
| 'startSpan'
|
|
185
192
|
| 'constructCloudEvent'
|
|
186
193
|
| 'sendToOtelService'
|
|
194
|
+
| 'withTracer'
|
|
187
195
|
> & {
|
|
188
196
|
send<TEventType extends AsyncApiRealmUI.EventType>(
|
|
189
197
|
event: TEventType,
|
package/src/core/types/index.ts
CHANGED
|
@@ -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';
|
|
@@ -23,3 +25,5 @@ export type * from './tooltip';
|
|
|
23
25
|
export type * from './toast';
|
|
24
26
|
export type * from './link';
|
|
25
27
|
export type * from './button-group';
|
|
28
|
+
export type * from './dropdown';
|
|
29
|
+
export type * from './prompt';
|
package/src/core/types/l10n.ts
CHANGED
|
@@ -102,6 +102,7 @@ export type TranslationKey =
|
|
|
102
102
|
| 'search.ai.placeholder'
|
|
103
103
|
| 'search.ai.generatingResponse'
|
|
104
104
|
| 'search.ai.followUpQuestion'
|
|
105
|
+
| 'search.ai.send'
|
|
105
106
|
| 'search.ai.suggestionsTitle'
|
|
106
107
|
| 'search.ai.thinkingText'
|
|
107
108
|
| 'search.ai.resourcesFound'
|
|
@@ -112,7 +113,7 @@ export type TranslationKey =
|
|
|
112
113
|
| 'search.ai.feedback.thanks'
|
|
113
114
|
| 'search.ai.toolCall.executed'
|
|
114
115
|
| 'search.ai.toolCall.executing'
|
|
115
|
-
| 'search.ai.toolCall.
|
|
116
|
+
| 'search.ai.toolCall.usedTools'
|
|
116
117
|
| 'search.ai.button'
|
|
117
118
|
| 'search.ai.label'
|
|
118
119
|
| 'search.ai.disclaimer'
|
|
@@ -123,7 +124,12 @@ export type TranslationKey =
|
|
|
123
124
|
| 'search.ai.error.header.forbidden'
|
|
124
125
|
| 'search.ai.error.header.unauthorized'
|
|
125
126
|
| 'search.ai.feedback.more'
|
|
127
|
+
| 'search.ai.actions.copy'
|
|
128
|
+
| 'search.ai.actions.like'
|
|
129
|
+
| 'search.ai.actions.dislike'
|
|
126
130
|
| 'search.searchItem.deprecated'
|
|
131
|
+
| 'search.searchItem.enum'
|
|
132
|
+
| 'search.searchItem.example'
|
|
127
133
|
| 'search.groups.all'
|
|
128
134
|
| 'search.filter.field.footer'
|
|
129
135
|
| 'aiAssistant.trigger'
|
|
@@ -146,6 +152,7 @@ export type TranslationKey =
|
|
|
146
152
|
| 'page.mcpNotAllowed.snippets.terminal.hint'
|
|
147
153
|
| 'page.mcpNotAllowed.snippets.claudeCode.headline'
|
|
148
154
|
| 'page.mcpNotAllowed.snippets.claudeDesktop.headline'
|
|
155
|
+
| 'page.mcpNotAllowed.snippets.claudeDesktop.accountHint'
|
|
149
156
|
| 'page.mcpNotAllowed.snippets.claudeDesktop.instruction'
|
|
150
157
|
| 'page.mcpNotAllowed.snippets.chatgptApp.headline'
|
|
151
158
|
| 'page.mcpNotAllowed.snippets.chatgptApp.instruction'
|
|
@@ -219,6 +226,7 @@ export type TranslationKey =
|
|
|
219
226
|
| 'catalog.history.revision.current'
|
|
220
227
|
| 'catalog.history.revisions.showLess'
|
|
221
228
|
| 'catalog.history.revisions.showMore'
|
|
229
|
+
| 'navigationTabs.label'
|
|
222
230
|
| 'sidebar.menu.backLabel'
|
|
223
231
|
| 'sidebar.menu.backToLabel'
|
|
224
232
|
| 'sidebar.actions.show'
|
|
@@ -268,6 +276,7 @@ export type TranslationKey =
|
|
|
268
276
|
| 'mobileMenu.previous'
|
|
269
277
|
| 'mobileMenu.products'
|
|
270
278
|
| 'mobileMenu.version'
|
|
279
|
+
| 'navbar.label'
|
|
271
280
|
| 'navbar.products'
|
|
272
281
|
| 'page.nextButton'
|
|
273
282
|
| 'page.previousButton'
|
|
@@ -291,6 +300,8 @@ export type TranslationKey =
|
|
|
291
300
|
| 'page.actions.connectMcp.cursorDescription'
|
|
292
301
|
| 'page.actions.connectMcp.vscode'
|
|
293
302
|
| 'page.actions.connectMcp.vscodeDescription'
|
|
303
|
+
| 'page.actions.connectMcp.claude'
|
|
304
|
+
| 'page.actions.connectMcp.claudeDescription'
|
|
294
305
|
| 'page.actions.connectMcp.claudeCode'
|
|
295
306
|
| 'page.actions.connectMcp.claudeCodeDescription'
|
|
296
307
|
| 'page.actions.connectMcp.codex'
|
|
@@ -299,6 +310,17 @@ export type TranslationKey =
|
|
|
299
310
|
| 'page.actions.connectMcp.copyConfigDescription'
|
|
300
311
|
| 'page.actions.connectMcp.moreOptions'
|
|
301
312
|
| 'page.actions.moreActions'
|
|
313
|
+
| 'promptTag.copy.buttonText'
|
|
314
|
+
| 'promptTag.showPrompt'
|
|
315
|
+
| 'promptTag.hidePrompt'
|
|
316
|
+
| 'promptTag.showFullPrompt'
|
|
317
|
+
| 'promptTag.showLess'
|
|
318
|
+
| 'promptTag.openIn.cursor'
|
|
319
|
+
| 'promptTag.openIn.cursorDescription'
|
|
320
|
+
| 'promptTag.openIn.claude'
|
|
321
|
+
| 'promptTag.openIn.claudeDescription'
|
|
322
|
+
| 'promptTag.openIn.chatgpt'
|
|
323
|
+
| 'promptTag.openIn.chatgptDescription'
|
|
302
324
|
| 'openapi.download.description.title'
|
|
303
325
|
| 'openapi.info.title'
|
|
304
326
|
| 'openapi.info.contact.url'
|
|
@@ -357,6 +379,7 @@ export type TranslationKey =
|
|
|
357
379
|
| 'openapi.hideExample'
|
|
358
380
|
| 'openapi.showExample'
|
|
359
381
|
| 'openapi.expandAll'
|
|
382
|
+
| 'openapi.deepLink.tooltip'
|
|
360
383
|
| 'openapi.collapseAll'
|
|
361
384
|
| 'openapi.viewSecurityDetails'
|
|
362
385
|
| 'openapi.noResponseExample'
|
|
@@ -510,7 +533,28 @@ export type TranslationKey =
|
|
|
510
533
|
| 'diagram.zoomOut'
|
|
511
534
|
| 'diagram.reset'
|
|
512
535
|
| 'diagram.close'
|
|
513
|
-
| 'diagram.viewer'
|
|
536
|
+
| 'diagram.viewer'
|
|
537
|
+
| 'consent.title'
|
|
538
|
+
| 'consent.message'
|
|
539
|
+
| 'consent.privacyPolicy'
|
|
540
|
+
| 'consent.customize'
|
|
541
|
+
| 'consent.rejectAll'
|
|
542
|
+
| 'consent.acceptAll'
|
|
543
|
+
| 'consent.acceptAllCookies'
|
|
544
|
+
| 'consent.savePreferences'
|
|
545
|
+
| 'consent.dialog.title'
|
|
546
|
+
| 'consent.dialog.description'
|
|
547
|
+
| 'consent.dialog.close'
|
|
548
|
+
| 'consent.alwaysOn'
|
|
549
|
+
| 'consent.alwaysOff'
|
|
550
|
+
| 'consent.gpcNotice'
|
|
551
|
+
| 'consent.category.necessary.title'
|
|
552
|
+
| 'consent.category.necessary.description'
|
|
553
|
+
| 'consent.category.analytics.title'
|
|
554
|
+
| 'consent.category.analytics.description'
|
|
555
|
+
| 'consent.category.marketing.title'
|
|
556
|
+
| 'consent.category.marketing.description'
|
|
557
|
+
| 'consent.settingsLink';
|
|
514
558
|
|
|
515
559
|
export type Locale = { code: string; name: string };
|
|
516
560
|
|
package/src/core/types/mcp.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { MCP_OPTIONS } from '../constants/mcp';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type MCPClientType = 'cursor' | 'vscode' | 'claude';
|
|
4
|
+
|
|
5
|
+
export type MCPOption = (typeof MCP_OPTIONS)[number];
|
|
4
6
|
|
|
5
7
|
export type McpConnectionParams = {
|
|
6
8
|
serverName: string;
|