@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
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { ThemeHooks } from '../types/hooks';
|
|
2
|
+
import type {
|
|
3
|
+
NavigationTab,
|
|
4
|
+
NavigationTabMenuEntry,
|
|
5
|
+
NavigationTabItem,
|
|
6
|
+
NavigationTabRowItem,
|
|
7
|
+
NavigationTabsConfig,
|
|
8
|
+
NavigationTabsState,
|
|
9
|
+
} from '../types/navigation-tabs';
|
|
10
|
+
|
|
11
|
+
import { getBaseDataAttributes } from './telemetry/get-base-data-attributes';
|
|
12
|
+
|
|
13
|
+
type NavbarItemClickedPayload = Parameters<
|
|
14
|
+
ReturnType<ThemeHooks['useTelemetry']>['sendNavbarMenuItemClickedMessage']
|
|
15
|
+
>[0];
|
|
16
|
+
|
|
17
|
+
export function toNavigationTabsConfig({
|
|
18
|
+
state,
|
|
19
|
+
}: {
|
|
20
|
+
state: NavigationTabsState | undefined;
|
|
21
|
+
}): NavigationTabsConfig | undefined {
|
|
22
|
+
const items = toNavigationTabEntries(state).map(
|
|
23
|
+
(entry): NavigationTabRowItem =>
|
|
24
|
+
entry.kind === 'menu'
|
|
25
|
+
? {
|
|
26
|
+
type: 'group',
|
|
27
|
+
label: entry.tab.label,
|
|
28
|
+
labelTranslationKey: entry.tab.labelTranslationKey,
|
|
29
|
+
icon: entry.tab.icon,
|
|
30
|
+
srcSet: entry.tab.srcSet,
|
|
31
|
+
items: entry.entries.map(({ active, ...link }) => toRowLink(link, active)),
|
|
32
|
+
active: entry.active,
|
|
33
|
+
}
|
|
34
|
+
: toRowLink(entry.link, entry.active),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
return items.length ? { items } : undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function getNavbarItemClickedPayload(type: 'link' | 'group'): NavbarItemClickedPayload {
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
...getBaseDataAttributes<'navbarItem', 'navbar', 'urn:redocly:realm:ui:navbar:navbarItem'>(
|
|
44
|
+
'navbarItem',
|
|
45
|
+
'navbar',
|
|
46
|
+
),
|
|
47
|
+
type,
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type NavigationTabLink = Omit<NavigationTabMenuEntry, 'tabId'>;
|
|
53
|
+
|
|
54
|
+
type NavigationTabEntry =
|
|
55
|
+
| { kind: 'link'; link: NavigationTabLink; active: boolean }
|
|
56
|
+
| {
|
|
57
|
+
kind: 'menu';
|
|
58
|
+
tab: NavigationTab;
|
|
59
|
+
entries: Array<NavigationTabLink & { active: boolean }>;
|
|
60
|
+
active: boolean;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
function toNavigationTabEntries(state: NavigationTabsState | undefined): NavigationTabEntry[] {
|
|
64
|
+
if (!state?.tabs.length) return [];
|
|
65
|
+
|
|
66
|
+
return state.tabs.flatMap((tab): NavigationTabEntry[] => {
|
|
67
|
+
const active = state.activeTab?.tabId === tab.tabId;
|
|
68
|
+
|
|
69
|
+
if (tab.menu) {
|
|
70
|
+
const entries = tab.menu
|
|
71
|
+
.filter((menuEntry) => !!menuEntry.link)
|
|
72
|
+
.map(({ tabId, ...link }) => ({
|
|
73
|
+
...link,
|
|
74
|
+
active: active && tabId === state.activeMenuEntry?.tabId,
|
|
75
|
+
}));
|
|
76
|
+
return entries.length ? [{ kind: 'menu', tab, entries, active }] : [];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!tab.link) return [];
|
|
80
|
+
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
kind: 'link',
|
|
84
|
+
link: {
|
|
85
|
+
label: tab.label,
|
|
86
|
+
labelTranslationKey: tab.labelTranslationKey,
|
|
87
|
+
link: tab.link,
|
|
88
|
+
icon: tab.icon,
|
|
89
|
+
srcSet: tab.srcSet,
|
|
90
|
+
},
|
|
91
|
+
active,
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function toRowLink(link: NavigationTabLink, active: boolean): NavigationTabItem {
|
|
98
|
+
return { type: 'link', ...link, active };
|
|
99
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { TFunction } from '../types/l10n';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ToolCallName,
|
|
5
|
+
type SearchAiActivityStatus,
|
|
6
|
+
type SearchAiActivityStep,
|
|
7
|
+
type ToolCall,
|
|
8
|
+
type SearchAiActivityKind,
|
|
9
|
+
} from '../types/search';
|
|
10
|
+
import { TOOL_CALL_DISPLAY_TEXT } from '../constants/search';
|
|
11
|
+
import { isObject } from './type-guards';
|
|
12
|
+
|
|
13
|
+
export function getSearchAiActivityStatus(
|
|
14
|
+
toolCalls: ToolCall[],
|
|
15
|
+
isActive: boolean,
|
|
16
|
+
runningToolCall: ToolCall | undefined,
|
|
17
|
+
translate: TFunction,
|
|
18
|
+
): SearchAiActivityStatus {
|
|
19
|
+
const latestToolCall = toolCalls.at(-1);
|
|
20
|
+
if (!latestToolCall) {
|
|
21
|
+
return {
|
|
22
|
+
label: translate('search.ai.thinkingText', 'Thinking...'),
|
|
23
|
+
kind: 'thinking',
|
|
24
|
+
isRunning: true,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (isActive || toolCalls.length === 1) {
|
|
29
|
+
const toolCall = runningToolCall ?? latestToolCall;
|
|
30
|
+
return {
|
|
31
|
+
...getToolCallLabel(toolCall, !isActive, translate),
|
|
32
|
+
kind: getSearchAiActivityKind(toolCall.name),
|
|
33
|
+
isRunning: isActive,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const isSameTool = toolCalls.every((toolCall) => toolCall.name === latestToolCall.name);
|
|
38
|
+
const sharedText = isSameTool
|
|
39
|
+
? TOOL_CALL_DISPLAY_TEXT[latestToolCall.name]?.completedText
|
|
40
|
+
: undefined;
|
|
41
|
+
return {
|
|
42
|
+
label: sharedText ?? translate('search.ai.toolCall.usedTools', 'Used tools'),
|
|
43
|
+
kind: isSameTool ? getSearchAiActivityKind(latestToolCall.name) : 'code',
|
|
44
|
+
isRunning: false,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function getSearchAiActivityStep(
|
|
49
|
+
toolCall: ToolCall,
|
|
50
|
+
isRunning: boolean,
|
|
51
|
+
translate: TFunction,
|
|
52
|
+
): SearchAiActivityStep {
|
|
53
|
+
const detail = getToolCallDetail(toolCall);
|
|
54
|
+
const kind = getSearchAiActivityKind(toolCall.name);
|
|
55
|
+
|
|
56
|
+
if (toolCall.name === ToolCallName.SearchDocumentation && detail) {
|
|
57
|
+
return { id: toolCall.id, label: `“${detail}”`, kind, isRunning };
|
|
58
|
+
}
|
|
59
|
+
const { label } = getToolCallLabel(toolCall, !isRunning, translate);
|
|
60
|
+
return { id: toolCall.id, label: detail ? label : stripEllipsis(label), kind, isRunning };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function getToolCallLabel(
|
|
64
|
+
toolCall: ToolCall,
|
|
65
|
+
isCompleted: boolean,
|
|
66
|
+
translate: TFunction,
|
|
67
|
+
): { label: string; detail?: string } {
|
|
68
|
+
const detail = getToolCallDetail(toolCall);
|
|
69
|
+
if (toolCall.name === ToolCallName.Execute && detail) {
|
|
70
|
+
return { label: detail };
|
|
71
|
+
}
|
|
72
|
+
const builtInText = TOOL_CALL_DISPLAY_TEXT[toolCall.name];
|
|
73
|
+
if (builtInText) {
|
|
74
|
+
const text = isCompleted ? builtInText.completedText : builtInText.inProgressText;
|
|
75
|
+
return detail ? { label: stripEllipsis(text), detail } : { label: text };
|
|
76
|
+
}
|
|
77
|
+
const prefix = isCompleted
|
|
78
|
+
? translate('search.ai.toolCall.executed', 'Executed')
|
|
79
|
+
: translate('search.ai.toolCall.executing', 'Executing');
|
|
80
|
+
return { label: `${prefix} ${toolCall.name}` };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function getSearchAiActivityKind(name: string): SearchAiActivityKind {
|
|
84
|
+
if (name === ToolCallName.SearchDocumentation) return 'search';
|
|
85
|
+
if (name === ToolCallName.ContactSupport) return 'support';
|
|
86
|
+
return 'code';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function getToolCallDetail(toolCall: ToolCall): string | undefined {
|
|
90
|
+
switch (toolCall.name) {
|
|
91
|
+
case ToolCallName.SearchDocumentation:
|
|
92
|
+
return getStringArg(toolCall.args, 'query');
|
|
93
|
+
case ToolCallName.Execute:
|
|
94
|
+
return getStringArg(toolCall.args, 'description');
|
|
95
|
+
default:
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function getStringArg(args: unknown, name: string): string | undefined {
|
|
101
|
+
if (!isObject(args) || !(name in args)) {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
const value: unknown = Reflect.get(args, name);
|
|
105
|
+
return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function stripEllipsis(text: string): string {
|
|
109
|
+
return text.replace(/(\.{3}|…)$/, '');
|
|
110
|
+
}
|
package/src/core/utils/urls.ts
CHANGED
|
@@ -5,7 +5,9 @@ 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
|
|
8
|
+
res = relativeURL
|
|
9
|
+
? res.replace(/(?<![/\\])[/\\]+$/, '') + '/' + relativeURL.replace(/^[/\\]+/, '')
|
|
10
|
+
: res;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
return res;
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
let latestLoad: symbol | null = null;
|
|
2
|
+
const listeners = new Set<() => void>();
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let lastCalledBy: symbol;
|
|
4
|
+
function setLatestLoad(load: symbol | null): void {
|
|
5
|
+
latestLoad = load;
|
|
6
|
+
// e2e suites wait for this class, named after the progress library it replaced, to clear.
|
|
7
|
+
document.documentElement.classList.toggle('nprogress-busy', load !== null);
|
|
8
|
+
listeners.forEach((listener) => listener());
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
+
/** Shows the load progress bar until the most recent `withLoadProgress` load settles. */
|
|
11
12
|
export async function withLoadProgress<T>(loadTarget: Promise<T>): Promise<T> {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// Cancel any existing progress and restart
|
|
16
|
-
nprogress.done();
|
|
17
|
-
nprogress.start();
|
|
13
|
+
const load = Symbol();
|
|
14
|
+
setLatestLoad(load);
|
|
18
15
|
|
|
19
16
|
return loadTarget.finally(() => {
|
|
20
|
-
if (
|
|
21
|
-
nprogress.done();
|
|
22
|
-
nprogress.remove();
|
|
23
|
-
}
|
|
17
|
+
if (latestLoad === load) setLatestLoad(null);
|
|
24
18
|
});
|
|
25
19
|
}
|
|
20
|
+
|
|
21
|
+
export function subscribeToLoadProgress(listener: () => void): () => void {
|
|
22
|
+
listeners.add(listener);
|
|
23
|
+
return () => {
|
|
24
|
+
listeners.delete(listener);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function isLoadInProgress(): boolean {
|
|
29
|
+
return latestLoad !== null;
|
|
30
|
+
}
|
package/src/ext/configure.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UserClaims, OpenAPIServer } from '@redocly/theme/core/types';
|
|
2
2
|
|
|
3
|
-
export * from '@redocly/theme/ext/configure-helpers';
|
|
3
|
+
export type * from '@redocly/theme/ext/configure-helpers';
|
|
4
4
|
export * from '@redocly/theme/ext/helpers/is-direct-configure-request-values';
|
|
5
5
|
|
|
6
6
|
import type {
|
|
@@ -11,6 +11,7 @@ const Icon = ({
|
|
|
11
11
|
checked?: boolean;
|
|
12
12
|
onClick?: () => void;
|
|
13
13
|
}) => (
|
|
14
|
+
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- the control that renders the icon handles the keyboard
|
|
14
15
|
<span className={className} onClick={onClick}>
|
|
15
16
|
{checked ? (
|
|
16
17
|
<svg
|
|
@@ -6,6 +6,7 @@ import type { IconProps } from '@redocly/theme/icons/types';
|
|
|
6
6
|
import { getCssColorVariable } from '@redocly/theme/core/utils';
|
|
7
7
|
|
|
8
8
|
const Icon = ({ className, onClick }: IconProps & { onClick?: () => void }) => (
|
|
9
|
+
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- the control that renders the icon handles the keyboard
|
|
9
10
|
<svg
|
|
10
11
|
className={className}
|
|
11
12
|
onClick={onClick}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import type { IconProps } from '@redocly/theme/icons/types';
|
|
5
|
+
|
|
6
|
+
import { getCssColorVariable } from '@redocly/theme/core/utils';
|
|
7
|
+
|
|
8
|
+
const Icon = (props: IconProps) => (
|
|
9
|
+
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
className="corner-top"
|
|
12
|
+
d="M12.2432 8.70703H11.2461L11.2422 4.75781L7.29297 4.75391V3.75781H12.2432V8.70703Z"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
className="corner-bottom"
|
|
16
|
+
d="M4.75781 11.2422L8.70703 11.2461V12.2432H3.75781V7.29297H4.75391L4.75781 11.2422Z"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export const ExpandCollapseIcon = styled(Icon).attrs({
|
|
22
|
+
'data-component-name': 'icons/ExpandCollapseIcon/ExpandCollapseIcon',
|
|
23
|
+
})<{ $collapse?: boolean }>`
|
|
24
|
+
path {
|
|
25
|
+
fill: ${({ color }) => getCssColorVariable(color)};
|
|
26
|
+
transform-box: view-box;
|
|
27
|
+
transition: transform 0.3s ease-in-out;
|
|
28
|
+
|
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
|
30
|
+
transition: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.corner-top {
|
|
35
|
+
transform-origin: 10.756px 5.244px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.corner-bottom {
|
|
39
|
+
transform-origin: 5.244px 10.756px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${({ $collapse }) =>
|
|
43
|
+
$collapse &&
|
|
44
|
+
css`
|
|
45
|
+
.corner-top {
|
|
46
|
+
transform: rotate(180deg);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.corner-bottom {
|
|
50
|
+
transform: rotate(-180deg);
|
|
51
|
+
}
|
|
52
|
+
`}
|
|
53
|
+
|
|
54
|
+
height: ${({ size }) => size || '16px'};
|
|
55
|
+
width: ${({ size }) => size || '16px'};
|
|
56
|
+
`;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { JSX } from 'react';
|
|
4
|
+
import type { IconProps } from '@redocly/theme/icons/types';
|
|
5
|
+
|
|
6
|
+
import { getCssColorVariable } from '@redocly/theme/core/utils';
|
|
7
|
+
|
|
8
|
+
const LINK_ICON_SYMBOL_ID = 'redocly-link-icon';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The link icon drawing as a hidden SVG symbol, which every `SharedLinkIcon` refers to. Render it
|
|
12
|
+
* once per page that shows a `SharedLinkIcon`; without it the icon is empty.
|
|
13
|
+
*/
|
|
14
|
+
export function LinkIconSymbol(): JSX.Element {
|
|
15
|
+
return (
|
|
16
|
+
<svg
|
|
17
|
+
data-component-name="icons/LinkIcon/LinkIconSymbol"
|
|
18
|
+
display="none"
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
focusable="false"
|
|
21
|
+
>
|
|
22
|
+
<symbol id={LINK_ICON_SYMBOL_ID} viewBox="0 0 20 20">
|
|
23
|
+
<path
|
|
24
|
+
d="M0 6C0 2.68629 2.68629 0 6 0H14C17.3137 0 20 2.68629 20 6V14C20 17.3137 17.3137 20 14 20H6C2.68629 20 0 17.3137 0 14V6Z"
|
|
25
|
+
fill="var(--link-icon-bg-color, var(--layer-color))"
|
|
26
|
+
/>
|
|
27
|
+
<path d="M7.37318 9.56229H12.6232C12.7392 9.56229 12.8505 9.60838 12.9325 9.69043C13.0146 9.77247 13.0607 9.88375 13.0607 9.99979C13.0607 10.1158 13.0146 10.2271 12.9325 10.3091C12.8505 10.3912 12.7392 10.4373 12.6232 10.4373H7.37318C7.25714 10.4373 7.14586 10.3912 7.06382 10.3091C6.98177 10.2271 6.93568 10.1158 6.93568 9.99979C6.93568 9.88375 6.98177 9.77247 7.06382 9.69043C7.14586 9.60838 7.25714 9.56229 7.37318 9.56229ZM8.6853 12.1875H6.4978C5.91764 12.1875 5.36124 11.957 4.95101 11.5468C4.54077 11.1366 4.3103 10.5802 4.3103 10C4.3103 9.41984 4.54077 8.86344 4.95101 8.4532C5.36124 8.04297 5.91764 7.8125 6.4978 7.8125H8.6853C8.80133 7.8125 8.91262 7.76641 8.99466 7.68436C9.07671 7.60231 9.1228 7.49103 9.1228 7.375C9.1228 7.25897 9.07671 7.14769 8.99466 7.06564C8.91262 6.98359 8.80133 6.9375 8.6853 6.9375H6.4978C5.68558 6.9375 4.90662 7.26016 4.33229 7.83449C3.75796 8.40882 3.4353 9.18777 3.4353 10C3.4353 10.8122 3.75796 11.5912 4.33229 12.1655C4.90662 12.7398 5.68558 13.0625 6.4978 13.0625H8.6853C8.80133 13.0625 8.91262 13.0164 8.99466 12.9344C9.07671 12.8523 9.1228 12.741 9.1228 12.625C9.1228 12.509 9.07671 12.3977 8.99466 12.3156C8.91262 12.2336 8.80133 12.1875 8.6853 12.1875ZM13.4982 6.9375H11.3107C11.1946 6.9375 11.0834 6.98359 11.0013 7.06564C10.9193 7.14769 10.8732 7.25897 10.8732 7.375C10.8732 7.49103 10.9193 7.60231 11.0013 7.68436C11.0834 7.76641 11.1946 7.8125 11.3107 7.8125H13.4982C14.0783 7.8125 14.6347 8.04297 15.045 8.4532C15.4552 8.86344 15.6857 9.41984 15.6857 10C15.6857 10.5802 15.4552 11.1366 15.045 11.5468C14.6347 11.957 14.0783 12.1875 13.4982 12.1875H11.3107C11.1946 12.1875 11.0834 12.2336 11.0013 12.3156C10.9193 12.3977 10.8732 12.509 10.8732 12.625C10.8732 12.741 10.9193 12.8523 11.0013 12.9344C11.0834 13.0164 11.1946 13.0625 11.3107 13.0625H13.4982C14.3104 13.0625 15.0894 12.7398 15.6637 12.1655C16.238 11.5912 16.5607 10.8122 16.5607 10C16.5607 9.18777 16.238 8.40882 15.6637 7.83449C15.0894 7.26016 14.3104 6.9375 13.4982 6.9375Z" />
|
|
28
|
+
</symbol>
|
|
29
|
+
</svg>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* `LinkIcon` drawn from the page's `LinkIconSymbol`, so a page with many of them carries one copy.
|
|
35
|
+
* `color` fills the glyph; `--link-icon-bg-color` overrides the background.
|
|
36
|
+
*/
|
|
37
|
+
export function SharedLinkIcon({ color, size = '20px', ...props }: IconProps): JSX.Element {
|
|
38
|
+
return (
|
|
39
|
+
<svg
|
|
40
|
+
data-component-name="icons/LinkIcon/SharedLinkIcon"
|
|
41
|
+
width={size}
|
|
42
|
+
height={size}
|
|
43
|
+
viewBox="0 0 20 20"
|
|
44
|
+
fill={getCssColorVariable(color)}
|
|
45
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
<use href={`#${LINK_ICON_SYMBOL_ID}`} />
|
|
49
|
+
</svg>
|
|
50
|
+
);
|
|
51
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -53,6 +53,12 @@ export * from '@redocly/theme/components/Navbar/Navbar';
|
|
|
53
53
|
export * from '@redocly/theme/components/Navbar/NavbarItem';
|
|
54
54
|
export * from '@redocly/theme/components/Navbar/NavbarLogo';
|
|
55
55
|
export * from '@redocly/theme/components/Navbar/NavbarMenu';
|
|
56
|
+
/* NavigationTabs */
|
|
57
|
+
export * from '@redocly/theme/components/NavigationTabs/NavigationTabs';
|
|
58
|
+
export { NavigationTab } from '@redocly/theme/components/NavigationTabs/NavigationTab';
|
|
59
|
+
export type { NavigationTabProps } from '@redocly/theme/components/NavigationTabs/NavigationTab';
|
|
60
|
+
export * from '@redocly/theme/components/NavigationTabs/NavigationTabMenu';
|
|
61
|
+
export * from '@redocly/theme/components/NavigationTabs/NavigationTabContent';
|
|
56
62
|
/* Footer */
|
|
57
63
|
export * from '@redocly/theme/components/Footer/Footer';
|
|
58
64
|
export * from '@redocly/theme/components/Footer/FooterColumn';
|
|
@@ -250,9 +256,11 @@ export * from '@redocly/theme/icons/MoonIcon/MoonIcon';
|
|
|
250
256
|
export * from '@redocly/theme/icons/SunIcon/SunIcon';
|
|
251
257
|
export * from '@redocly/theme/icons/ContrastIcon/ContrastIcon';
|
|
252
258
|
export * from '@redocly/theme/icons/LinkIcon/LinkIcon';
|
|
259
|
+
export * from '@redocly/theme/icons/LinkIcon/LinkIconSymbol';
|
|
253
260
|
export * from '@redocly/theme/icons/LaunchIcon/LaunchIcon';
|
|
254
261
|
export * from '@redocly/theme/icons/MinimizeIcon/MinimizeIcon';
|
|
255
262
|
export * from '@redocly/theme/icons/MaximizeIcon/MaximizeIcon';
|
|
263
|
+
export * from '@redocly/theme/icons/ExpandCollapseIcon/ExpandCollapseIcon';
|
|
256
264
|
export * from '@redocly/theme/icons/MarkdownFullIcon/MarkdownFullIcon';
|
|
257
265
|
export * from '@redocly/theme/icons/DocumentBlankIcon/DocumentBlankIcon';
|
|
258
266
|
export * from '@redocly/theme/icons/WarningSquareIcon/WarningSquareIcon';
|
|
@@ -27,7 +27,7 @@ export function PageLayout({
|
|
|
27
27
|
const Container = styled.div`
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: row;
|
|
30
|
-
min-height: calc(100vh - var(--navbar-
|
|
30
|
+
min-height: calc(100vh - var(--navbar-offset));
|
|
31
31
|
|
|
32
32
|
@media screen and (min-width: ${breakpoints.max}) {
|
|
33
33
|
max-width: var(--container-max-width);
|
|
@@ -13,8 +13,8 @@ export type LayoutConfig = {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export function RootLayout({ children }: LayoutConfig): JSX.Element {
|
|
16
|
-
const {
|
|
17
|
-
const { askAi } =
|
|
16
|
+
const { useSearchFeatures } = useThemeHooks();
|
|
17
|
+
const { askAi } = useSearchFeatures();
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<div data-component-name="layouts/RootLayout">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { CodeWalkthroughFilter } from '@redocly/
|
|
4
|
+
import type { CodeWalkthroughFilter } from '@redocly/theme/core/types';
|
|
5
5
|
|
|
6
6
|
import { Tag, ContentWrapper as TagContentWrapper } from '@redocly/theme/components/Tag/Tag';
|
|
7
7
|
|
|
@@ -76,7 +76,7 @@ const FilterWrapper = styled.div`
|
|
|
76
76
|
padding-right: var(--spacing-xl);
|
|
77
77
|
padding-left: var(--spacing-xl);
|
|
78
78
|
padding-bottom: var(--spacing-xs);
|
|
79
|
-
top: var(--navbar-height);
|
|
79
|
+
top: var(--navbar-stack-height);
|
|
80
80
|
background-color: var(--bg-color);
|
|
81
81
|
z-index: var(--z-index-raised);
|
|
82
82
|
max-width: var(--md-content-max-width);
|
|
@@ -2,7 +2,7 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
5
|
-
import type { CodeWalkthroughFile } from '@redocly/
|
|
5
|
+
import type { CodeWalkthroughFile } from '@redocly/theme/core/types';
|
|
6
6
|
|
|
7
7
|
import { useCodePanel } from '@redocly/theme/core/hooks';
|
|
8
8
|
import { CodeWalkthroughControlsStateContext } from '@redocly/theme/core/contexts';
|
|
@@ -64,8 +64,8 @@ const CodePanelWrapper = styled.div`
|
|
|
64
64
|
border: 1px solid var(--code-panel-border-color);
|
|
65
65
|
border-radius: var(--code-panel-border-radius);
|
|
66
66
|
overflow: clip;
|
|
67
|
-
--code-block-max-height: calc(100vh - var(--navbar-height) - 2 * var(--spacing-xl));
|
|
68
|
-
height: calc(100vh - var(--navbar-height) - 2 * var(--spacing-xl));
|
|
67
|
+
--code-block-max-height: calc(100vh - var(--navbar-stack-height) - 2 * var(--spacing-xl));
|
|
68
|
+
height: calc(100vh - var(--navbar-stack-height) - 2 * var(--spacing-xl));
|
|
69
69
|
position: sticky;
|
|
70
|
-
top: calc(var(--navbar-height) + var(--spacing-xl));
|
|
70
|
+
top: calc(var(--navbar-stack-height) + var(--spacing-xl));
|
|
71
71
|
`;
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
5
|
-
import type { CodeWalkthroughFile } from '@redocly/
|
|
5
|
+
import type { CodeWalkthroughFile } from '@redocly/theme/core/types';
|
|
6
6
|
|
|
7
7
|
import { useThemeHooks, useRenderableFiles, type RenderableFile } from '@redocly/theme/core/hooks';
|
|
8
8
|
import { OverflowMenuVerticalIcon } from '@redocly/theme/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon';
|
|
@@ -2,7 +2,7 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
5
|
-
import type { CodeWalkthroughFile } from '@redocly/
|
|
5
|
+
import type { CodeWalkthroughFile } from '@redocly/theme/core/types';
|
|
6
6
|
|
|
7
7
|
import { CodeWalkthroughControlsStateContext } from '@redocly/theme/core/contexts';
|
|
8
8
|
import { CopyButton } from '@redocly/theme/components/Buttons/CopyButton';
|
|
@@ -10,7 +10,7 @@ import React, {
|
|
|
10
10
|
import styled from 'styled-components';
|
|
11
11
|
import { useLocation } from 'react-router';
|
|
12
12
|
|
|
13
|
-
import type { WithConditions } from '@redocly/
|
|
13
|
+
import type { WithConditions } from '@redocly/theme/core/types';
|
|
14
14
|
|
|
15
15
|
import { Marker } from '@redocly/theme/components/Marker/Marker';
|
|
16
16
|
import {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, type PropsWithChildren } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { CodeWalkthroughAttr } from '@redocly/
|
|
4
|
+
import type { CodeWalkthroughAttr } from '@redocly/theme/core/types';
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
CodeWalkthroughStepsContext,
|
|
@@ -78,7 +78,7 @@ const DocsPanel = styled.div`
|
|
|
78
78
|
flex-direction: column;
|
|
79
79
|
|
|
80
80
|
min-height: 0;
|
|
81
|
-
min-height: calc(100vh - var(--navbar-height));
|
|
81
|
+
min-height: calc(100vh - var(--navbar-stack-height));
|
|
82
82
|
|
|
83
83
|
padding-top: var(--spacing-xl);
|
|
84
84
|
padding-right: var(--spacing-xs);
|