@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
|
@@ -6,27 +6,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.useFullHeight = useFullHeight;
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const lodash_throttle_1 = __importDefault(require("lodash.throttle"));
|
|
9
|
-
function useFullHeight(
|
|
9
|
+
function useFullHeight(elementRef) {
|
|
10
10
|
const handler = (0, react_1.useCallback)(() => {
|
|
11
|
-
if (!
|
|
11
|
+
if (!elementRef.current) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
const footer = document.querySelector('footer');
|
|
15
15
|
if (!footer) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
const elementTop =
|
|
18
|
+
const elementTop = elementRef.current.getBoundingClientRect().top;
|
|
19
19
|
const footerOffset = footer.offsetTop - window.scrollY - elementTop;
|
|
20
20
|
if (footerOffset > window.innerHeight) {
|
|
21
|
-
|
|
21
|
+
elementRef.current.style.maxHeight = `${window.innerHeight - elementTop}px`;
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
|
|
24
|
+
elementRef.current.style.maxHeight = `${footerOffset}px`;
|
|
25
25
|
}
|
|
26
|
-
}, [
|
|
26
|
+
}, [elementRef]);
|
|
27
27
|
const throttledHandler = (0, react_1.useMemo)(() => (0, lodash_throttle_1.default)(handler, 150), [handler]);
|
|
28
28
|
(0, react_1.useEffect)(() => {
|
|
29
|
-
if (typeof window === 'undefined' || !
|
|
29
|
+
if (typeof window === 'undefined' || !elementRef.current) {
|
|
30
30
|
return () => {
|
|
31
31
|
// nope
|
|
32
32
|
};
|
|
@@ -42,6 +42,6 @@ function useFullHeight(element) {
|
|
|
42
42
|
window.removeEventListener('scroll', throttledHandler);
|
|
43
43
|
window.removeEventListener('resize', throttledHandler);
|
|
44
44
|
};
|
|
45
|
-
}, [throttledHandler,
|
|
45
|
+
}, [throttledHandler, elementRef, handler]);
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=use-full-height.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PageAction } from '../types';
|
|
2
|
-
export type PageActionType = 'copy' | 'view' | 'chatgpt' | 'claude' | 'docs-mcp-cursor' | 'docs-mcp-vscode' | 'mcp-cursor' | 'mcp-vscode';
|
|
2
|
+
export type PageActionType = 'copy' | 'view' | 'chatgpt' | 'claude' | 'docs-mcp-cursor' | 'docs-mcp-vscode' | 'docs-mcp-claude' | 'mcp-cursor' | 'mcp-vscode';
|
|
3
3
|
export declare function usePageActions(pageSlug: string, mcpUrl?: string, actions?: PageActionType[]): PageAction[];
|
|
@@ -25,6 +25,7 @@ const dom_1 = require("../utils/dom");
|
|
|
25
25
|
const mcp_1 = require("../utils/mcp");
|
|
26
26
|
const urls_1 = require("../utils/urls");
|
|
27
27
|
const get_base_data_attributes_1 = require("../utils/telemetry/get-base-data-attributes");
|
|
28
|
+
const get_ai_prompt_link_1 = require("../utils/get-ai-prompt-link");
|
|
28
29
|
const DEFAULT_ENABLED_ACTIONS = [
|
|
29
30
|
'copy',
|
|
30
31
|
'view',
|
|
@@ -32,6 +33,7 @@ const DEFAULT_ENABLED_ACTIONS = [
|
|
|
32
33
|
'claude',
|
|
33
34
|
'docs-mcp-cursor',
|
|
34
35
|
'docs-mcp-vscode',
|
|
36
|
+
'docs-mcp-claude',
|
|
35
37
|
];
|
|
36
38
|
function usePageActions(pageSlug, mcpUrl, actions) {
|
|
37
39
|
var _a;
|
|
@@ -81,9 +83,11 @@ function usePageActions(pageSlug, mcpUrl, actions) {
|
|
|
81
83
|
const mdPageUrl = isRoot
|
|
82
84
|
? (0, urls_1.combineUrls)(origin, pathname, 'index.html.md')
|
|
83
85
|
: (0, urls_1.combineUrls)(origin, (0, urls_1.removeTrailingSlash)(pathname) + '.md');
|
|
86
|
+
const externalAiPrompt = `Read ${mdPageUrl} and answer questions based on the content.`;
|
|
84
87
|
const actionHandlers = {
|
|
85
88
|
'docs-mcp-cursor': createMCPHandler('cursor', false),
|
|
86
89
|
'docs-mcp-vscode': createMCPHandler('vscode', false),
|
|
90
|
+
'docs-mcp-claude': createMCPHandler('claude', false),
|
|
87
91
|
'mcp-cursor': createMCPHandler('cursor', true),
|
|
88
92
|
'mcp-vscode': createMCPHandler('vscode', true),
|
|
89
93
|
copy: () => ({
|
|
@@ -121,7 +125,7 @@ function usePageActions(pageSlug, mcpUrl, actions) {
|
|
|
121
125
|
},
|
|
122
126
|
}),
|
|
123
127
|
chatgpt: () => {
|
|
124
|
-
const link =
|
|
128
|
+
const link = (0, get_ai_prompt_link_1.getAiPromptLink)('chatgpt', externalAiPrompt);
|
|
125
129
|
return {
|
|
126
130
|
buttonText: translate('page.actions.chatGptButtonText', 'Open in ChatGPT'),
|
|
127
131
|
title: translate('page.actions.chatGptTitle', 'Open in ChatGPT'),
|
|
@@ -137,7 +141,7 @@ function usePageActions(pageSlug, mcpUrl, actions) {
|
|
|
137
141
|
};
|
|
138
142
|
},
|
|
139
143
|
claude: () => {
|
|
140
|
-
const link =
|
|
144
|
+
const link = (0, get_ai_prompt_link_1.getAiPromptLink)('claude', externalAiPrompt);
|
|
141
145
|
return {
|
|
142
146
|
buttonText: translate('page.actions.claudeButtonText', 'Open in Claude'),
|
|
143
147
|
title: translate('page.actions.claudeTitle', 'Open in Claude'),
|
|
@@ -172,12 +176,6 @@ function usePageActions(pageSlug, mcpUrl, actions) {
|
|
|
172
176
|
]);
|
|
173
177
|
return result;
|
|
174
178
|
}
|
|
175
|
-
function getExternalAiPromptLink(baseUrl, mdPageUrl) {
|
|
176
|
-
const externalAiPrompt = `Read ${mdPageUrl} and answer questions based on the content.`;
|
|
177
|
-
const url = new URL(baseUrl);
|
|
178
|
-
url.searchParams.set('q', externalAiPrompt);
|
|
179
|
-
return url.toString();
|
|
180
|
-
}
|
|
181
179
|
function createMCPAction({ clientType, mcpConfig, translate, onClickCallback, }) {
|
|
182
180
|
const url = (0, mcp_1.generateMCPDeepLink)(clientType, mcpConfig);
|
|
183
181
|
const sharedProps = {
|
|
@@ -189,6 +187,9 @@ function createMCPAction({ clientType, mcpConfig, translate, onClickCallback, })
|
|
|
189
187
|
if (clientType === 'cursor') {
|
|
190
188
|
return Object.assign(Object.assign({}, sharedProps), { buttonText: translate('page.actions.connectMcp.cursor', 'Connect to Cursor'), title: translate('page.actions.connectMcp.cursor', 'Connect to Cursor'), description: translate('page.actions.connectMcp.cursorDescription', 'Install MCP server on Cursor'), iconComponent: CursorIcon_1.CursorIcon });
|
|
191
189
|
}
|
|
190
|
+
if (clientType === 'claude') {
|
|
191
|
+
return Object.assign(Object.assign({}, sharedProps), { buttonText: translate('page.actions.connectMcp.claude', 'Connect to Claude'), title: translate('page.actions.connectMcp.claude', 'Connect to Claude'), description: translate('page.actions.connectMcp.claudeDescription', 'Add MCP server to your Claude account'), iconComponent: ClaudeIcon_1.ClaudeIcon });
|
|
192
|
+
}
|
|
192
193
|
return Object.assign(Object.assign({}, sharedProps), { buttonText: translate('page.actions.connectMcp.vscode', 'Connect to VS Code'), title: translate('page.actions.connectMcp.vscode', 'Connect to VS Code'), description: translate('page.actions.connectMcp.vscodeDescription', 'Install MCP server on VS Code'), iconComponent: VSCodeIcon_1.VSCodeIcon });
|
|
193
194
|
}
|
|
194
195
|
function shouldHideAction(action, { pageProps, themeConfig, apiDocsExcludeFromSearch, isApiDocsPage, isPublic, mcpUrl, isMcpDisabled, }) {
|
|
@@ -221,6 +222,7 @@ function shouldHideActionByType(action, { isPublic, mcpUrl, isMcpDisabled, }) {
|
|
|
221
222
|
return !isPublic;
|
|
222
223
|
case 'docs-mcp-cursor':
|
|
223
224
|
case 'docs-mcp-vscode':
|
|
225
|
+
case 'docs-mcp-claude':
|
|
224
226
|
return Boolean(mcpUrl) || isMcpDisabled;
|
|
225
227
|
case 'mcp-cursor':
|
|
226
228
|
case 'mcp-vscode':
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PointerEvent, RefObject } from 'react';
|
|
2
|
+
export type PointerBorderHighlight<T extends HTMLElement> = {
|
|
3
|
+
ref: RefObject<T | null>;
|
|
4
|
+
onPointerMove: (event: PointerEvent<T>) => void;
|
|
5
|
+
onPointerLeave: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function usePointerBorderHighlight<T extends HTMLElement>(distance?: number): PointerBorderHighlight<T>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePointerBorderHighlight = usePointerBorderHighlight;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const EDGE_PROXIMITY_DISTANCE = 80;
|
|
6
|
+
/* Writes `--pointer-x`, `--pointer-y` and `--pointer-edge-proximity` (1 at the border, 0 at
|
|
7
|
+
`distance` px inside) to the element's inline style, so the highlight moves without re-renders. */
|
|
8
|
+
function usePointerBorderHighlight(distance = EDGE_PROXIMITY_DISTANCE) {
|
|
9
|
+
const ref = (0, react_1.useRef)(null);
|
|
10
|
+
const onPointerMove = (0, react_1.useCallback)((event) => {
|
|
11
|
+
const element = ref.current;
|
|
12
|
+
if (!element)
|
|
13
|
+
return;
|
|
14
|
+
const rect = element.getBoundingClientRect();
|
|
15
|
+
const x = event.clientX - rect.left;
|
|
16
|
+
const y = event.clientY - rect.top;
|
|
17
|
+
const edgeDistance = Math.min(x, y, rect.width - x, rect.height - y);
|
|
18
|
+
const proximity = Math.min(1, Math.max(0, 1 - edgeDistance / distance));
|
|
19
|
+
element.style.setProperty('--pointer-x', `${x}px`);
|
|
20
|
+
element.style.setProperty('--pointer-y', `${y}px`);
|
|
21
|
+
element.style.setProperty('--pointer-edge-proximity', String(Math.round(proximity * 100) / 100));
|
|
22
|
+
}, [distance]);
|
|
23
|
+
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
24
|
+
var _a;
|
|
25
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--pointer-edge-proximity', '0');
|
|
26
|
+
}, []);
|
|
27
|
+
return { ref, onPointerMove, onPointerLeave };
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=use-pointer-border-highlight.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useScrollItemIntoView = useScrollItemIntoView;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useScrollItemIntoView(listRef, activeIndex) {
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
const list = listRef.current;
|
|
8
|
+
const activeItem = activeIndex === -1 ? undefined : list === null || list === void 0 ? void 0 : list.children[activeIndex];
|
|
9
|
+
if (!list || !activeItem)
|
|
10
|
+
return;
|
|
11
|
+
const listRect = list.getBoundingClientRect();
|
|
12
|
+
const itemRect = activeItem.getBoundingClientRect();
|
|
13
|
+
list.scrollLeft += itemRect.left - listRect.left - (listRect.width - itemRect.width) / 2;
|
|
14
|
+
}, [listRef, activeIndex]);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=use-scroll-item-into-view.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { KeyboardEvent } from 'react';
|
|
2
|
+
type UseTabListProps = {
|
|
3
|
+
count: number;
|
|
4
|
+
activeIndex: number;
|
|
5
|
+
onChange: (index: number) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Props for a WAI-ARIA tab list with automatic activation: only the active tab is a tab stop,
|
|
9
|
+
* and Left/Right/Home/End select and focus another tab.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTabList({ count, activeIndex, onChange }: UseTabListProps): {
|
|
12
|
+
tabListProps: {
|
|
13
|
+
role: string;
|
|
14
|
+
};
|
|
15
|
+
getTabProps: (index: number) => {
|
|
16
|
+
id: string;
|
|
17
|
+
role: string;
|
|
18
|
+
'aria-selected': boolean;
|
|
19
|
+
'aria-controls': string;
|
|
20
|
+
tabIndex: number;
|
|
21
|
+
ref: (element: HTMLElement | null) => void;
|
|
22
|
+
onClick: () => void;
|
|
23
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
24
|
+
};
|
|
25
|
+
getTabPanelProps: (index: number) => {
|
|
26
|
+
id: string;
|
|
27
|
+
role: string;
|
|
28
|
+
'aria-labelledby': string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTabList = useTabList;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Props for a WAI-ARIA tab list with automatic activation: only the active tab is a tab stop,
|
|
7
|
+
* and Left/Right/Home/End select and focus another tab.
|
|
8
|
+
*/
|
|
9
|
+
function useTabList({ count, activeIndex, onChange }) {
|
|
10
|
+
const idPrefix = (0, react_1.useId)();
|
|
11
|
+
const focusableIndex = activeIndex >= 0 ? activeIndex : 0;
|
|
12
|
+
const tabRefs = (0, react_1.useRef)([]);
|
|
13
|
+
const select = (0, react_1.useCallback)((index) => {
|
|
14
|
+
var _a;
|
|
15
|
+
onChange(index);
|
|
16
|
+
(_a = tabRefs.current[index]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
17
|
+
}, [onChange]);
|
|
18
|
+
const onKeyDown = (0, react_1.useCallback)((event, index) => {
|
|
19
|
+
const target = {
|
|
20
|
+
ArrowRight: (index + 1) % count,
|
|
21
|
+
ArrowLeft: (index - 1 + count) % count,
|
|
22
|
+
Home: 0,
|
|
23
|
+
End: count - 1,
|
|
24
|
+
}[event.key];
|
|
25
|
+
if (target === undefined)
|
|
26
|
+
return;
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
select(target);
|
|
29
|
+
}, [count, select]);
|
|
30
|
+
const getTabProps = (index) => ({
|
|
31
|
+
id: `${idPrefix}-tab-${index}`,
|
|
32
|
+
role: 'tab',
|
|
33
|
+
'aria-selected': index === activeIndex,
|
|
34
|
+
'aria-controls': `${idPrefix}-panel-${index}`,
|
|
35
|
+
tabIndex: index === focusableIndex ? 0 : -1,
|
|
36
|
+
ref: (element) => {
|
|
37
|
+
tabRefs.current[index] = element;
|
|
38
|
+
},
|
|
39
|
+
onClick: () => select(index),
|
|
40
|
+
onKeyDown: (event) => onKeyDown(event, index),
|
|
41
|
+
});
|
|
42
|
+
const getTabPanelProps = (index) => ({
|
|
43
|
+
id: `${idPrefix}-panel-${index}`,
|
|
44
|
+
role: 'tabpanel',
|
|
45
|
+
'aria-labelledby': `${idPrefix}-tab-${index}`,
|
|
46
|
+
});
|
|
47
|
+
return { tabListProps: { role: 'tablist' }, getTabProps, getTabPanelProps };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=use-tab-list.js.map
|
|
@@ -36,6 +36,8 @@ export declare const useTelemetryFallback: () => {
|
|
|
36
36
|
sendCodeSnippetReportedMessage: () => void;
|
|
37
37
|
sendConnectMcpClickedMessage: () => void;
|
|
38
38
|
sendMcpConnectionSnippetCopiedMessage: () => void;
|
|
39
|
+
sendPromptTagCopiedMessage: () => void;
|
|
40
|
+
sendPromptTagOpenedMessage: () => void;
|
|
39
41
|
sendMobileMenuClosedMessage: () => void;
|
|
40
42
|
sendMobileMenuOpenedMessage: () => void;
|
|
41
43
|
sendPageViewedMessage: () => void;
|
|
@@ -41,6 +41,8 @@ const useTelemetryFallback = () => ({
|
|
|
41
41
|
sendCodeSnippetReportedMessage: () => { },
|
|
42
42
|
sendConnectMcpClickedMessage: () => { },
|
|
43
43
|
sendMcpConnectionSnippetCopiedMessage: () => { },
|
|
44
|
+
sendPromptTagCopiedMessage: () => { },
|
|
45
|
+
sendPromptTagOpenedMessage: () => { },
|
|
44
46
|
sendMobileMenuClosedMessage: () => { },
|
|
45
47
|
sendMobileMenuOpenedMessage: () => { },
|
|
46
48
|
sendPageViewedMessage: () => { },
|
|
@@ -17,12 +17,28 @@ const fallbacks = {
|
|
|
17
17
|
useOtelTelemetry: () => ({ send: () => { } }),
|
|
18
18
|
useBreadcrumbs: () => ({ breadcrumbs: [], siblings: undefined }),
|
|
19
19
|
useBanner: () => ({ banner: undefined, dismissBanner: () => { } }),
|
|
20
|
+
useConsent: () => ({
|
|
21
|
+
enabled: false,
|
|
22
|
+
config: undefined,
|
|
23
|
+
mode: undefined,
|
|
24
|
+
state: undefined,
|
|
25
|
+
decided: false,
|
|
26
|
+
gpc: false,
|
|
27
|
+
isDialogOpen: false,
|
|
28
|
+
openDialog: () => { },
|
|
29
|
+
closeDialog: () => { },
|
|
30
|
+
accept: () => { },
|
|
31
|
+
reject: () => { },
|
|
32
|
+
save: () => { },
|
|
33
|
+
}),
|
|
20
34
|
useCodeHighlight: () => ({ highlight: (rawContent) => rawContent }),
|
|
21
35
|
useUserMenu: () => ({}),
|
|
22
36
|
usePageData: () => null,
|
|
23
37
|
usePageProps: () => ({}),
|
|
24
38
|
usePageSharedData: () => null,
|
|
25
39
|
useMcpData: () => ({ docs: { enabled: false } }),
|
|
40
|
+
useSearchFeatures: () => ({}),
|
|
41
|
+
useNavigationTabs: () => undefined,
|
|
26
42
|
};
|
|
27
43
|
const useThemeHooks = () => {
|
|
28
44
|
const context = (0, react_1.useContext)(ThemeDataContext_1.ThemeDataContext);
|
package/lib/core/styles/dark.js
CHANGED
|
@@ -12,12 +12,13 @@ const variables_dark_7 = require("../../components/Tag/variables.dark");
|
|
|
12
12
|
const variables_dark_8 = require("../../components/StatusCode/variables.dark");
|
|
13
13
|
const variables_dark_9 = require("../../components/Switch/variables.dark");
|
|
14
14
|
const variables_dark_10 = require("../../markdoc/components/Cards/variables.dark");
|
|
15
|
-
const variables_dark_11 = require("../../components/
|
|
16
|
-
const variables_dark_12 = require("../../components/
|
|
17
|
-
const variables_dark_13 = require("../../components/
|
|
18
|
-
const variables_dark_14 = require("../../components/
|
|
19
|
-
const variables_dark_15 = require("../../components/
|
|
20
|
-
const variables_dark_16 = require("../../components/
|
|
15
|
+
const variables_dark_11 = require("../../markdoc/components/Prompt/variables.dark");
|
|
16
|
+
const variables_dark_12 = require("../../components/Catalog/variables.dark");
|
|
17
|
+
const variables_dark_13 = require("../../components/PageActions/variables.dark");
|
|
18
|
+
const variables_dark_14 = require("../../components/Tooltip/variables.dark");
|
|
19
|
+
const variables_dark_15 = require("../../components/Banner/variables.dark");
|
|
20
|
+
const variables_dark_16 = require("../../components/Admonition/variables.dark");
|
|
21
|
+
const variables_dark_17 = require("../../components/CodeBlock/variables.dark");
|
|
21
22
|
const palette_dark_1 = require("./palette.dark");
|
|
22
23
|
const replayDarkMode = (0, styled_components_1.css) `
|
|
23
24
|
/**
|
|
@@ -353,15 +354,16 @@ exports.darkMode = (0, styled_components_1.css) `
|
|
|
353
354
|
${replayDarkMode}
|
|
354
355
|
${variables_dark_9.switcherDarkMode}
|
|
355
356
|
${variables_dark_10.cardsDarkMode}
|
|
356
|
-
${variables_dark_11.
|
|
357
|
-
${variables_dark_12.
|
|
358
|
-
${variables_dark_13.
|
|
359
|
-
${variables_dark_14.
|
|
360
|
-
${variables_dark_15.
|
|
357
|
+
${variables_dark_11.promptTagDarkMode}
|
|
358
|
+
${variables_dark_12.catalogDarkMode}
|
|
359
|
+
${variables_dark_13.pageActionsDarkMode}
|
|
360
|
+
${variables_dark_14.tooltipDarkMode}
|
|
361
|
+
${variables_dark_15.bannerDarkMode}
|
|
362
|
+
${variables_dark_16.admonitionDarkMode}
|
|
361
363
|
${badgesDarkMode}
|
|
362
364
|
${numberedListDarkMode}
|
|
363
365
|
${palette_dark_1.activeBrandPaletteDark}
|
|
364
|
-
${
|
|
366
|
+
${variables_dark_17.codeBlockDarkMode}
|
|
365
367
|
/**
|
|
366
368
|
* @tokens Dark Theme Scrollbar Config
|
|
367
369
|
* @presenter Color
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GlobalStyle = exports.styles = void 0;
|
|
3
|
+
exports.GlobalStyle = exports.styles = exports.tokens = void 0;
|
|
4
4
|
const styled_components_1 = require("styled-components");
|
|
5
5
|
const variables_1 = require("../../components/LanguagePicker/variables");
|
|
6
6
|
const variables_2 = require("../../components/Scorecard/variables");
|
|
@@ -30,26 +30,30 @@ const variables_25 = require("../../components/CodeBlock/variables");
|
|
|
30
30
|
const variables_26 = require("../../components/Product/variables");
|
|
31
31
|
const variables_27 = require("../../components/Markdown/variables");
|
|
32
32
|
const variables_28 = require("../../components/Banner/variables");
|
|
33
|
-
const variables_29 = require("../../
|
|
34
|
-
const variables_30 = require("../../markdoc/components/
|
|
35
|
-
const variables_31 = require("../../markdoc/components/
|
|
36
|
-
const variables_32 = require("../../markdoc/components/
|
|
37
|
-
const variables_33 = require("../../components/
|
|
38
|
-
const variables_34 = require("../../components/
|
|
39
|
-
const variables_35 = require("../../components/
|
|
40
|
-
const variables_36 = require("../../components/
|
|
41
|
-
const variables_37 = require("../../components/
|
|
42
|
-
const variables_38 = require("../../components/
|
|
43
|
-
const variables_39 = require("../../components/
|
|
44
|
-
const variables_40 = require("../../components/
|
|
45
|
-
const variables_41 = require("../../components/
|
|
46
|
-
const variables_42 = require("../../
|
|
47
|
-
const variables_43 = require("../../markdoc/components/
|
|
48
|
-
const variables_44 = require("../../components/
|
|
49
|
-
const variables_45 = require("../../components/
|
|
50
|
-
const variables_46 = require("../../components/
|
|
51
|
-
const variables_47 = require("../../components/
|
|
52
|
-
const variables_48 = require("../../components/
|
|
33
|
+
const variables_29 = require("../../components/Consent/variables");
|
|
34
|
+
const variables_30 = require("../../markdoc/components/Accordion/variables");
|
|
35
|
+
const variables_31 = require("../../markdoc/components/Tabs/variables");
|
|
36
|
+
const variables_32 = require("../../markdoc/components/NumberedList/variables");
|
|
37
|
+
const variables_33 = require("../../markdoc/components/Diagram/variables");
|
|
38
|
+
const variables_34 = require("../../components/LastUpdated/variables");
|
|
39
|
+
const variables_35 = require("../../components/Logo/variables");
|
|
40
|
+
const variables_36 = require("../../components/StatusCode/variables");
|
|
41
|
+
const variables_37 = require("../../components/Segmented/variables");
|
|
42
|
+
const variables_38 = require("../../components/UserMenu/variables");
|
|
43
|
+
const variables_39 = require("../../components/Tags/variables");
|
|
44
|
+
const variables_40 = require("../../components/VersionPicker/variables");
|
|
45
|
+
const variables_41 = require("../../components/DatePicker/variables");
|
|
46
|
+
const variables_42 = require("../../components/Switch/variables");
|
|
47
|
+
const variables_43 = require("../../markdoc/components/Cards/variables");
|
|
48
|
+
const variables_44 = require("../../markdoc/components/Prompt/variables");
|
|
49
|
+
const variables_45 = require("../../markdoc/components/CodeWalkthrough/variables");
|
|
50
|
+
const variables_46 = require("../../components/SkipContent/variables");
|
|
51
|
+
const variables_47 = require("../../components/PageActions/variables");
|
|
52
|
+
const variables_48 = require("../../components/SvgViewer/variables");
|
|
53
|
+
const variables_49 = require("../../components/Toast/variables");
|
|
54
|
+
const variables_50 = require("../../components/PageNavigation/variables");
|
|
55
|
+
const variables_51 = require("../../components/NavigationTabs/variables");
|
|
56
|
+
const utils_1 = require("../../core/utils");
|
|
53
57
|
const palette_1 = require("./palette");
|
|
54
58
|
const dark_1 = require("./dark");
|
|
55
59
|
const themeColors = (0, styled_components_1.css) `
|
|
@@ -860,46 +864,6 @@ const loadProgressBar = (0, styled_components_1.css) `
|
|
|
860
864
|
--load-progress-bar-height: 2px; // @presenter Height
|
|
861
865
|
|
|
862
866
|
// @tokens End
|
|
863
|
-
|
|
864
|
-
/* Make clicks pass-through */
|
|
865
|
-
#nprogress {
|
|
866
|
-
pointer-events: none;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
#nprogress .bar {
|
|
870
|
-
background: var(--load-progress-bar-color);
|
|
871
|
-
|
|
872
|
-
position: fixed;
|
|
873
|
-
z-index: var(--z-index-popover);
|
|
874
|
-
top: 0;
|
|
875
|
-
left: 0;
|
|
876
|
-
|
|
877
|
-
width: 100%;
|
|
878
|
-
height: var(--load-progress-bar-height);
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
#nprogress .peg {
|
|
882
|
-
display: block;
|
|
883
|
-
position: absolute;
|
|
884
|
-
right: 0;
|
|
885
|
-
width: 100px;
|
|
886
|
-
height: 100%;
|
|
887
|
-
box-shadow: var(--load-progress-bar-shadow);
|
|
888
|
-
opacity: 1;
|
|
889
|
-
|
|
890
|
-
-webkit-transform: rotate(3deg) translate(0px, -4px);
|
|
891
|
-
-ms-transform: rotate(3deg) translate(0px, -4px);
|
|
892
|
-
transform: rotate(3deg) translate(0px, -4px);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
.nprogress-custom-parent {
|
|
896
|
-
overflow: hidden;
|
|
897
|
-
position: relative;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
.nprogress-custom-parent #nprogress .bar {
|
|
901
|
-
position: absolute;
|
|
902
|
-
}
|
|
903
867
|
`;
|
|
904
868
|
const inputs = (0, styled_components_1.css) `
|
|
905
869
|
/**
|
|
@@ -1111,8 +1075,8 @@ const error = (0, styled_components_1.css) `
|
|
|
1111
1075
|
--detailed-error-overlay-z-index: var(--z-index-raised);
|
|
1112
1076
|
|
|
1113
1077
|
--detailed-error-modal-width: calc(100% - var(--spacing-lg) * 2);
|
|
1114
|
-
--detailed-error-modal-height: calc(100vh - var(--navbar-height) - var(--spacing-lg) * 2);
|
|
1115
|
-
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-height));
|
|
1078
|
+
--detailed-error-modal-height: calc(100vh - var(--navbar-stack-height) - var(--spacing-lg) * 2);
|
|
1079
|
+
--detailed-error-modal-top: calc(var(--spacing-lg) + var(--navbar-stack-height));
|
|
1116
1080
|
--detailed-error-modal-border-radius: var(--border-radius-md);
|
|
1117
1081
|
--detailed-error-modal-bg-color: var(--bg-color-raised);
|
|
1118
1082
|
--detailed-error-modal-color: var(--text-color-primary);
|
|
@@ -1304,81 +1268,89 @@ const replay = (0, styled_components_1.css) `
|
|
|
1304
1268
|
}
|
|
1305
1269
|
// @tokens End
|
|
1306
1270
|
`;
|
|
1271
|
+
/** The light theme tokens without a selector, for a host that sets them on one element. */
|
|
1272
|
+
exports.tokens = (0, styled_components_1.css) `
|
|
1273
|
+
${variables_13.accordion}
|
|
1274
|
+
${variables_18.admonition}
|
|
1275
|
+
${apiReferenceDocs}
|
|
1276
|
+
${variables_12.apiReferencePanels}
|
|
1277
|
+
${badges}
|
|
1278
|
+
${variables_28.banner}
|
|
1279
|
+
${borders}
|
|
1280
|
+
${variables_29.consent}
|
|
1281
|
+
${variables_5.breadcrumbs}
|
|
1282
|
+
${variables_20.button}
|
|
1283
|
+
${variables_21.aiAssistantButton}
|
|
1284
|
+
${variables_21.connectMcpButton}
|
|
1285
|
+
${variables_43.cards}
|
|
1286
|
+
${variables_44.promptTag}
|
|
1287
|
+
${variables_8.catalog}
|
|
1288
|
+
${variables_11.catalogClassic}
|
|
1289
|
+
${variables_25.code}
|
|
1290
|
+
${variables_45.codeWalkthrough}
|
|
1291
|
+
${docsDropdown}
|
|
1292
|
+
${variables_15.dropdown}
|
|
1293
|
+
${error}
|
|
1294
|
+
${variables_10.filter}
|
|
1295
|
+
${variables_19.footer}
|
|
1296
|
+
${headingsTypography}
|
|
1297
|
+
${variables_39.httpTag}
|
|
1298
|
+
${variables_9.image}
|
|
1299
|
+
${inputs}
|
|
1300
|
+
${variables_1.languagePicker}
|
|
1301
|
+
${variables_34.lastUpdated}
|
|
1302
|
+
${links}
|
|
1303
|
+
${loadProgressBar}
|
|
1304
|
+
${variables_35.logo}
|
|
1305
|
+
${variables_27.markdown}
|
|
1306
|
+
${variables_30.markdownAccordion}
|
|
1307
|
+
${variables_31.markdownTabs}
|
|
1308
|
+
${variables_32.markdownNumberedList}
|
|
1309
|
+
${variables_33.diagram}
|
|
1310
|
+
${variables_24.menu}
|
|
1311
|
+
${variables_24.mobileMenu}
|
|
1312
|
+
${modal}
|
|
1313
|
+
${variables_22.navbar}
|
|
1314
|
+
${pages}
|
|
1315
|
+
${variables_26.productPicker}
|
|
1316
|
+
${variables_12.responsePanelColors}
|
|
1317
|
+
${variables_23.search}
|
|
1318
|
+
${variables_51.navigationTabs}
|
|
1319
|
+
${variables_14.select}
|
|
1320
|
+
${variables_4.sidebar}
|
|
1321
|
+
${sizeAndSpace}
|
|
1322
|
+
${variables_6.tag}
|
|
1323
|
+
${themeColors}
|
|
1324
|
+
${palette_1.activeBrandPaletteLight}
|
|
1325
|
+
${tile}
|
|
1326
|
+
${variables_7.toc}
|
|
1327
|
+
${variables_16.tooltip}
|
|
1328
|
+
${typography}
|
|
1329
|
+
${variables_38.userMenu}
|
|
1330
|
+
${variables_40.versionPicker}
|
|
1331
|
+
${zIndexDepth}
|
|
1332
|
+
${scorecardColors}
|
|
1333
|
+
${variables_36.statusCode}
|
|
1334
|
+
${tab}
|
|
1335
|
+
${icon}
|
|
1336
|
+
${tree}
|
|
1337
|
+
${variables_37.segmented}
|
|
1338
|
+
${variables_42.switcher}
|
|
1339
|
+
${variables_17.checkbox}
|
|
1340
|
+
${variables_3.feedback}
|
|
1341
|
+
${variables_2.scorecard}
|
|
1342
|
+
${variables_41.datePicker}
|
|
1343
|
+
${replay}
|
|
1344
|
+
${variables_46.skipContent}
|
|
1345
|
+
${variables_47.pageActions}
|
|
1346
|
+
${variables_48.svgViewer}
|
|
1347
|
+
${variables_49.toast}
|
|
1348
|
+
${variables_50.pageNavigation}
|
|
1349
|
+
|
|
1350
|
+
`;
|
|
1307
1351
|
exports.styles = (0, styled_components_1.css) `
|
|
1308
1352
|
:root {
|
|
1309
|
-
${
|
|
1310
|
-
${variables_18.admonition}
|
|
1311
|
-
${apiReferenceDocs}
|
|
1312
|
-
${variables_12.apiReferencePanels}
|
|
1313
|
-
${badges}
|
|
1314
|
-
${variables_28.banner}
|
|
1315
|
-
${borders}
|
|
1316
|
-
${variables_5.breadcrumbs}
|
|
1317
|
-
${variables_20.button}
|
|
1318
|
-
${variables_21.aiAssistantButton}
|
|
1319
|
-
${variables_42.cards}
|
|
1320
|
-
${variables_8.catalog}
|
|
1321
|
-
${variables_11.catalogClassic}
|
|
1322
|
-
${variables_25.code}
|
|
1323
|
-
${variables_43.codeWalkthrough}
|
|
1324
|
-
${docsDropdown}
|
|
1325
|
-
${variables_15.dropdown}
|
|
1326
|
-
${error}
|
|
1327
|
-
${variables_10.filter}
|
|
1328
|
-
${variables_19.footer}
|
|
1329
|
-
${headingsTypography}
|
|
1330
|
-
${variables_38.httpTag}
|
|
1331
|
-
${variables_9.image}
|
|
1332
|
-
${inputs}
|
|
1333
|
-
${variables_1.languagePicker}
|
|
1334
|
-
${variables_33.lastUpdated}
|
|
1335
|
-
${links}
|
|
1336
|
-
${loadProgressBar}
|
|
1337
|
-
${variables_34.logo}
|
|
1338
|
-
${variables_27.markdown}
|
|
1339
|
-
${variables_29.markdownAccordion}
|
|
1340
|
-
${variables_30.markdownTabs}
|
|
1341
|
-
${variables_31.markdownNumberedList}
|
|
1342
|
-
${variables_32.diagram}
|
|
1343
|
-
${variables_24.menu}
|
|
1344
|
-
${variables_24.mobileMenu}
|
|
1345
|
-
${modal}
|
|
1346
|
-
${variables_22.navbar}
|
|
1347
|
-
${pages}
|
|
1348
|
-
${variables_26.productPicker}
|
|
1349
|
-
${variables_12.responsePanelColors}
|
|
1350
|
-
${variables_23.search}
|
|
1351
|
-
${variables_14.select}
|
|
1352
|
-
${variables_4.sidebar}
|
|
1353
|
-
${sizeAndSpace}
|
|
1354
|
-
${variables_6.tag}
|
|
1355
|
-
${themeColors}
|
|
1356
|
-
${palette_1.activeBrandPaletteLight}
|
|
1357
|
-
${tile}
|
|
1358
|
-
${variables_7.toc}
|
|
1359
|
-
${variables_16.tooltip}
|
|
1360
|
-
${typography}
|
|
1361
|
-
${variables_37.userMenu}
|
|
1362
|
-
${variables_39.versionPicker}
|
|
1363
|
-
${zIndexDepth}
|
|
1364
|
-
${scorecardColors}
|
|
1365
|
-
${variables_35.statusCode}
|
|
1366
|
-
${tab}
|
|
1367
|
-
${icon}
|
|
1368
|
-
${tree}
|
|
1369
|
-
${variables_36.segmented}
|
|
1370
|
-
${variables_41.switcher}
|
|
1371
|
-
${variables_17.checkbox}
|
|
1372
|
-
${variables_3.feedback}
|
|
1373
|
-
${variables_2.scorecard}
|
|
1374
|
-
${variables_40.datePicker}
|
|
1375
|
-
${replay}
|
|
1376
|
-
${variables_44.skipContent}
|
|
1377
|
-
${variables_45.pageActions}
|
|
1378
|
-
${variables_46.svgViewer}
|
|
1379
|
-
${variables_47.toast}
|
|
1380
|
-
${variables_48.pageNavigation}
|
|
1381
|
-
|
|
1353
|
+
${exports.tokens}
|
|
1382
1354
|
background-color: var(--bg-color);
|
|
1383
1355
|
color: var(--text-color-primary);
|
|
1384
1356
|
font-family: var(--font-family-base);
|
|
@@ -1388,6 +1360,13 @@ exports.styles = (0, styled_components_1.css) `
|
|
|
1388
1360
|
${dark_1.darkMode};
|
|
1389
1361
|
}
|
|
1390
1362
|
|
|
1363
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
1364
|
+
:root:has([data-component-name='NavigationTabs/NavigationTabs']) {
|
|
1365
|
+
--navbar-stack-height: calc(var(--navbar-height) + var(--navigation-tabs-height, 48px));
|
|
1366
|
+
--navbar-row-bottom-border-color: transparent;
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1391
1370
|
:root.notransition * {
|
|
1392
1371
|
transition: none !important;
|
|
1393
1372
|
}
|