@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
|
@@ -67,14 +67,7 @@ function SearchItem({ onClick, item, className, product, innerRef, }) {
|
|
|
67
67
|
});
|
|
68
68
|
return (react_1.default.createElement(SearchItemWrapper, { className: className, to: document.url, onClick: onClick, tabIndex: 0, innerRef: (el) => {
|
|
69
69
|
ref.current = el;
|
|
70
|
-
|
|
71
|
-
return;
|
|
72
|
-
if (typeof innerRef === 'function') {
|
|
73
|
-
innerRef(el);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
innerRef.current = el;
|
|
77
|
-
}
|
|
70
|
+
(0, utils_1.assignRef)(innerRef, el);
|
|
78
71
|
}, "data-component-name": "Search/SearchItem" },
|
|
79
72
|
react_1.default.createElement(SearchItemContent, null,
|
|
80
73
|
react_1.default.createElement(SearchItemHeader, null,
|
|
@@ -83,7 +76,7 @@ function SearchItem({ onClick, item, className, product, innerRef, }) {
|
|
|
83
76
|
product.name)),
|
|
84
77
|
document.httpMethod ? (react_1.default.createElement(SearchItemOperation, null,
|
|
85
78
|
react_1.default.createElement(SearchItemOperationTag, { color: httpColor }, document.httpMethod.toUpperCase()),
|
|
86
|
-
highlight.httpPath ? (0, SearchHighlight_1.searchHighlight)(highlight.httpPath) : document.httpPath)) : null,
|
|
79
|
+
react_1.default.createElement("span", null, highlight.httpPath ? (0, SearchHighlight_1.searchHighlight)(highlight.httpPath) : document.httpPath))) : null,
|
|
87
80
|
react_1.default.createElement(SearchItemTitleWrapper, null,
|
|
88
81
|
react_1.default.createElement(SearchItemTitle, null, highlight.title ? (0, SearchHighlight_1.searchHighlight)(highlight.title) : document.title),
|
|
89
82
|
document.deprecated ? (react_1.default.createElement(SearchItemBadge, { deprecated: true }, translate('search.searchItem.deprecated', 'Deprecated'))) : null,
|
|
@@ -99,7 +92,15 @@ function SearchItem({ onClick, item, className, product, innerRef, }) {
|
|
|
99
92
|
(0, SearchHighlight_1.searchHighlight)(parameter.path.join(' → ')),
|
|
100
93
|
` → `)) : null,
|
|
101
94
|
(0, SearchHighlight_1.searchHighlight)(parameter.name)),
|
|
102
|
-
react_1.default.createElement("div", null, (0, SearchHighlight_1.searchHighlight)(parameter.description))
|
|
95
|
+
react_1.default.createElement("div", null, (0, SearchHighlight_1.searchHighlight)(parameter.description)),
|
|
96
|
+
parameter.enum ? (react_1.default.createElement("div", null,
|
|
97
|
+
translate('search.searchItem.enum', 'Enum'),
|
|
98
|
+
': ',
|
|
99
|
+
(0, SearchHighlight_1.searchHighlight)(parameter.enum))) : null,
|
|
100
|
+
parameter.example ? (react_1.default.createElement("div", null,
|
|
101
|
+
translate('search.searchItem.example', 'Example'),
|
|
102
|
+
': ',
|
|
103
|
+
(0, SearchHighlight_1.searchHighlight)(parameter.example))) : null)) : (shouldShowPath && (react_1.default.createElement(SearchItemPath, null, highlight.path && highlight.path.length
|
|
103
104
|
? (0, SearchHighlight_1.searchHighlight)(highlight.path.join(' → '))
|
|
104
105
|
: (_c = document.path) === null || _c === void 0 ? void 0 : _c.join(' → '))))),
|
|
105
106
|
react_1.default.createElement(ReturnKeyIcon_1.ReturnKeyIcon, { color: "var(--search-item-text-color)" })));
|
|
@@ -32,18 +32,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
36
|
exports.SearchTrigger = SearchTrigger;
|
|
40
37
|
const React = __importStar(require("react"));
|
|
41
|
-
const styled_components_1 =
|
|
38
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
42
39
|
const hooks_1 = require("../../core/hooks");
|
|
43
40
|
const Button_1 = require("../../components/Button/Button");
|
|
44
41
|
const SearchIcon_1 = require("../../icons/SearchIcon/SearchIcon");
|
|
45
42
|
const utils_1 = require("../../core/utils");
|
|
46
43
|
const constants_1 = require("../../core/constants");
|
|
44
|
+
const MAC_SHORTCUT_LABEL = '⌘K';
|
|
45
|
+
const SHORTCUT_LABEL = 'Ctrl+K';
|
|
47
46
|
function SearchTrigger({ onClick, className }) {
|
|
48
47
|
var _a;
|
|
49
48
|
var _b;
|
|
@@ -61,13 +60,16 @@ function SearchTrigger({ onClick, className }) {
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
mainShortcutKey = mainShortcutKey === null || mainShortcutKey === void 0 ? void 0 : mainShortcutKey.toUpperCase();
|
|
64
|
-
|
|
63
|
+
// A page can be cached and served to every platform, so the server renders an empty
|
|
64
|
+
// slot and the browser picks the label after hydration.
|
|
65
|
+
const [isMac, setIsMac] = React.useState(undefined);
|
|
66
|
+
React.useEffect(() => setIsMac((0, utils_1.getUserAgent)().includes('Mac')), []);
|
|
65
67
|
return (React.createElement(SearchTriggerWrapper, { onClick: onClick, className: className, "data-component-name": "Search/SearchTrigger" },
|
|
66
68
|
React.createElement(SearchTriggerButton, { "data-testid": "search-trigger-button", variant: "text", size: "medium", icon: React.createElement(SearchIcon_1.SearchIcon, null), "aria-label": "Search trigger button" }),
|
|
67
69
|
React.createElement(SearchTriggerInput, { "data-testid": "search-trigger-input", "data-translation-key": "search.navbar.label" },
|
|
68
70
|
React.createElement(SearchIcon_1.SearchIcon, null),
|
|
69
71
|
translate('search.navbar.label', 'Search'),
|
|
70
|
-
mainShortcutKey === constants_1.DEFAULT_KEYBOARD_SHORTCUTS ? (React.createElement(
|
|
72
|
+
mainShortcutKey === constants_1.DEFAULT_KEYBOARD_SHORTCUTS ? (React.createElement(SearchTriggerShortcut, null, isMac === undefined ? null : (React.createElement(SearchTriggerShortcutLabel, null, isMac ? MAC_SHORTCUT_LABEL : SHORTCUT_LABEL)))) : (React.createElement("span", null, mainShortcutKey)))));
|
|
71
73
|
}
|
|
72
74
|
const SearchTriggerWrapper = styled_components_1.default.div `
|
|
73
75
|
color: var(--search-trigger-color);
|
|
@@ -85,6 +87,35 @@ const SearchTriggerButton = (0, styled_components_1.default)(Button_1.Button) `
|
|
|
85
87
|
display: none;
|
|
86
88
|
}
|
|
87
89
|
`;
|
|
90
|
+
// The hidden copy of the wider label keeps the slot the same width before and after
|
|
91
|
+
// hydration on every platform, so the trigger does not shift when the label appears.
|
|
92
|
+
const SearchTriggerShortcut = styled_components_1.default.span `
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
align-items: flex-end;
|
|
96
|
+
|
|
97
|
+
&::after {
|
|
98
|
+
content: '${SHORTCUT_LABEL}';
|
|
99
|
+
height: 0;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
visibility: hidden;
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
const shortcutAppear = (0, styled_components_1.keyframes) `
|
|
105
|
+
from {
|
|
106
|
+
opacity: 0;
|
|
107
|
+
filter: blur(2px);
|
|
108
|
+
transform: translateY(3px);
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
const SearchTriggerShortcutLabel = styled_components_1.default.span `
|
|
112
|
+
animation: ${shortcutAppear} var(--search-trigger-shortcut-appear-duration)
|
|
113
|
+
var(--search-trigger-shortcut-appear-easing);
|
|
114
|
+
|
|
115
|
+
@media (prefers-reduced-motion: reduce) {
|
|
116
|
+
animation: none;
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
88
119
|
const SearchTriggerInput = styled_components_1.default.div `
|
|
89
120
|
display: none;
|
|
90
121
|
align-items: center;
|
|
@@ -146,6 +146,8 @@ exports.search = (0, styled_components_1.css) `
|
|
|
146
146
|
--search-trigger-bg-color: var(--navbar-bg-color);
|
|
147
147
|
--search-trigger-icon-size: 16px;
|
|
148
148
|
--search-trigger-line-height: var(--line-height-base);
|
|
149
|
+
--search-trigger-shortcut-appear-duration: 300ms;
|
|
150
|
+
--search-trigger-shortcut-appear-easing: ease-out;
|
|
149
151
|
|
|
150
152
|
/**
|
|
151
153
|
* @tokens AI Search
|
|
@@ -200,8 +202,21 @@ exports.search = (0, styled_components_1.css) `
|
|
|
200
202
|
--search-ai-suggestions-title-font-weight: var(--font-weight-light);
|
|
201
203
|
--search-ai-suggestions-text-color: var(--text-color-description);
|
|
202
204
|
|
|
203
|
-
--search-ai-
|
|
204
|
-
--search-ai-
|
|
205
|
+
--search-ai-activity-font-size: var(--font-size-base);
|
|
206
|
+
--search-ai-activity-line-height: var(--line-height-sm);
|
|
207
|
+
--search-ai-activity-count-font-size: var(--font-size-sm);
|
|
208
|
+
--search-ai-activity-count-bg-color: var(--border-color-secondary);
|
|
209
|
+
--search-ai-activity-text-color: var(--text-color-description);
|
|
210
|
+
--search-ai-activity-text-color-hover: var(--text-color-primary);
|
|
211
|
+
--search-ai-activity-detail-color: var(--text-color-secondary);
|
|
212
|
+
--search-ai-activity-shimmer-color: var(--text-color-primary);
|
|
213
|
+
--search-ai-activity-rail-color: var(--border-color-primary);
|
|
214
|
+
--search-ai-activity-icon-size: 14px;
|
|
215
|
+
--search-ai-activity-fade-duration: 200ms;
|
|
216
|
+
--search-ai-activity-expand-duration: 250ms;
|
|
217
|
+
--search-ai-activity-shimmer-duration: 2s;
|
|
218
|
+
--search-ai-activity-easing: cubic-bezier(0.32, 0.72, 0, 1);
|
|
219
|
+
|
|
205
220
|
--search-ai-thinking-dot-size: 6px;
|
|
206
221
|
--search-ai-thinking-dot-color: var(--search-ai-gradient);
|
|
207
222
|
|
|
@@ -32,15 +32,35 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
35
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
47
|
exports.Segmented = void 0;
|
|
37
48
|
const react_1 = __importStar(require("react"));
|
|
38
49
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
39
50
|
const typed_memo_1 = require("../../core/hoc/typed-memo");
|
|
51
|
+
const hooks_1 = require("../../core/hooks");
|
|
40
52
|
function SegmentedComponent({ options, onChange, value, className = '', size = 'regular' }, ref) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
const { tabListProps, getTabProps } = (0, hooks_1.useTabList)({
|
|
54
|
+
count: options.length,
|
|
55
|
+
activeIndex: options.findIndex((opt) => value == opt.value),
|
|
56
|
+
onChange: (index) => onChange(options[index]),
|
|
57
|
+
});
|
|
58
|
+
return (react_1.default.createElement(SegmentedGroup, Object.assign({ ref: ref, "data-component-name": "Segmented/Segmented", className: `tag-grey ${size} ${className}` }, tabListProps, { $size: size }), options.map((opt, index) => {
|
|
59
|
+
const _a = getTabProps(index), { 'aria-controls': _noPanel } = _a, tabProps = __rest(_a, ['aria-controls']);
|
|
60
|
+
return (react_1.default.createElement(react_1.default.Fragment, { key: index },
|
|
61
|
+
opt.divider,
|
|
62
|
+
react_1.default.createElement(SegmentedItem, Object.assign({ key: opt.label }, tabProps, { title: opt.label, $isActive: value == opt.value, $size: size }), opt.element || opt.label)));
|
|
63
|
+
})));
|
|
44
64
|
}
|
|
45
65
|
exports.Segmented = (0, typed_memo_1.typedMemo)((0, react_1.forwardRef)(SegmentedComponent));
|
|
46
66
|
const SegmentedGroup = styled_components_1.default.div `
|
|
@@ -68,6 +68,7 @@ function Select(props) {
|
|
|
68
68
|
const [filteredOptions, setFilteredOptions] = (0, react_1.useState)(options);
|
|
69
69
|
const [stickyInputValue, setStickyInputValue] = (0, react_1.useState)(placeholder || '');
|
|
70
70
|
const inputId = (0, react_1.useId)();
|
|
71
|
+
const listboxId = `${inputId}-listbox`;
|
|
71
72
|
(0, hooks_1.useOutsideClick)(selectRef, () => {
|
|
72
73
|
setDropdownActive(false);
|
|
73
74
|
});
|
|
@@ -169,14 +170,20 @@ function Select(props) {
|
|
|
169
170
|
return !!selectedOptions.find((selectOption) => selectOption.value === option.value || selectOption.value === option.label);
|
|
170
171
|
};
|
|
171
172
|
const renderDefaultInput = (inputRef) => {
|
|
172
|
-
return (react_1.default.createElement(SelectInput_1.SelectInput, { id: inputId, listboxId:
|
|
173
|
+
return (react_1.default.createElement(SelectInput_1.SelectInput, { id: inputId, listboxId: listboxId, expanded: dropdownActive, selectedOptions: selectedOptions, searchValue: searchValue, placeholder: placeholder, stickyValue: stickyInputValue, multiple: multiple, searchable: searchable, clearable: clearable, customIcon: icon, inputRef: inputRef, onlyIcon: onlyIcon, clearHandler: clearHandler, searchHandler: searchHandler, inputBlurHandler: inputBlurHandler, inputFocusHandler: inputFocusHandler, clickHandler: inputClickHandler }));
|
|
173
174
|
};
|
|
174
175
|
return (react_1.default.createElement(exports.SelectWrapper, Object.assign({ "data-component-name": "Select/Select", ref: selectRef }, dataAttributes, { disabled: disabled, "data-testid": dataTestId, className: className, onKeyDown: (e) => {
|
|
175
176
|
if (e.key === 'Enter' && document.activeElement === selectRef.current) {
|
|
176
177
|
e.preventDefault();
|
|
177
178
|
setDropdownActive(!dropdownActive);
|
|
178
179
|
}
|
|
179
|
-
}, tabIndex:
|
|
180
|
+
}, tabIndex: searchable ? undefined : 0 }, (!searchable && {
|
|
181
|
+
role: 'combobox',
|
|
182
|
+
'aria-haspopup': 'listbox',
|
|
183
|
+
'aria-expanded': dropdownActive,
|
|
184
|
+
'aria-controls': listboxId,
|
|
185
|
+
'aria-label': 'Select option',
|
|
186
|
+
}), { onFocus: (e) => {
|
|
180
187
|
var _a;
|
|
181
188
|
if (e.target === selectRef.current) {
|
|
182
189
|
(_a = selectInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -185,7 +192,7 @@ function Select(props) {
|
|
|
185
192
|
e.preventDefault();
|
|
186
193
|
} }),
|
|
187
194
|
react_1.default.createElement(SelectDropdown, { closeOnClick: !multiple, withArrow: withArrow, trigger: renderInput ? renderInput() : renderDefaultInput(selectInputRef), triggerEvent: triggerEvent, placement: placement, alignment: alignment, active: !renderInput ? dropdownActive : undefined },
|
|
188
|
-
react_1.default.createElement(SelectDropdownMenu, { role: "listbox", footer: footer }, filteredOptions.length === 0 ? (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { disabled: true }, translate('select.noResults', 'No results'))) : (filteredOptions.map((option, index) => {
|
|
195
|
+
react_1.default.createElement(SelectDropdownMenu, { id: listboxId, role: "listbox", footer: footer }, filteredOptions.length === 0 ? (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { disabled: true }, translate('select.noResults', 'No results'))) : (filteredOptions.map((option, index) => {
|
|
189
196
|
return (react_1.default.createElement(react_1.Fragment, { key: index },
|
|
190
197
|
react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { onAction: () => selectHandler(option), prefix: !hideCheckmarkIcon &&
|
|
191
198
|
(checkmarkIconPosition ? checkmarkIconPosition === 'start' : false) &&
|
|
@@ -43,8 +43,9 @@ const react_1 = __importStar(require("react"));
|
|
|
43
43
|
const Tag_1 = require("../../components/Tag/Tag");
|
|
44
44
|
const CloseIcon_1 = require("../../icons/CloseIcon/CloseIcon");
|
|
45
45
|
const Button_1 = require("../../components/Button/Button");
|
|
46
|
+
const utils_1 = require("../../core/utils");
|
|
46
47
|
function SelectInput(props) {
|
|
47
|
-
const { id, listboxId, onlyIcon, icon, customIcon, selectedOptions, placeholder, stickyValue, multiple, searchable, clearable, clearHandler, searchHandler, clickHandler, searchValue, inputBlurHandler, inputFocusHandler, inputRef: forwardedInputRef, } = props;
|
|
48
|
+
const { id, listboxId, onlyIcon, icon, customIcon, selectedOptions, placeholder, stickyValue, multiple, searchable, expanded, clearable, clearHandler, searchHandler, clickHandler, searchValue, inputBlurHandler, inputFocusHandler, inputRef: forwardedInputRef, } = props;
|
|
48
49
|
const inputRef = (0, react_1.useRef)(null);
|
|
49
50
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
50
51
|
const onChangeHandler = (e) => {
|
|
@@ -87,22 +88,15 @@ function SelectInput(props) {
|
|
|
87
88
|
if (!input)
|
|
88
89
|
return;
|
|
89
90
|
inputRef.current = input;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (typeof forwardedInputRef === 'function') {
|
|
93
|
-
forwardedInputRef(input);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
forwardedInputRef.current = input;
|
|
97
|
-
}
|
|
98
|
-
}, $width: multiple ? (!searchValue && selectedOptions.length ? '10px' : 'auto') : '100%', tabIndex: 0, onFocus: (e) => {
|
|
91
|
+
(0, utils_1.assignRef)(forwardedInputRef, input);
|
|
92
|
+
}, $width: multiple ? (!searchValue && selectedOptions.length ? '10px' : 'auto') : '100%', tabIndex: 0, role: "combobox", "aria-expanded": !!expanded, "aria-controls": listboxId, "aria-autocomplete": "list", "aria-label": "Select option", onFocus: (e) => {
|
|
99
93
|
e.stopPropagation();
|
|
100
94
|
}, onMouseDown: (e) => {
|
|
101
95
|
e.preventDefault();
|
|
102
96
|
} }));
|
|
103
97
|
const simpleValue = selectedOptions.length ? (selectedOptions[0].label || selectedOptions[0].element || selectedOptions[0].value) : (react_1.default.createElement(SelectInternalInputPlaceholder, null, placeholder));
|
|
104
98
|
const multipleValues = selectedOptions.length ? (selectTags) : (react_1.default.createElement(SelectInternalInputPlaceholder, null, placeholder));
|
|
105
|
-
return (react_1.default.createElement(exports.SelectInputWrapper, { id: id, onFocus: onFocusHandler, onClick: onClickHandler
|
|
99
|
+
return (react_1.default.createElement(exports.SelectInputWrapper, { id: id, onFocus: onFocusHandler, onClick: onClickHandler },
|
|
106
100
|
!onlyIcon && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
107
101
|
react_1.default.createElement(SelectInputValue, null, multiple ? (searchable ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
108
102
|
selectTags,
|
|
@@ -38,8 +38,8 @@ const SidebarContent = styled_components_1.default.aside `
|
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
width: 100%;
|
|
40
40
|
-webkit-font-smoothing: antialiased;
|
|
41
|
-
top:
|
|
42
|
-
height: calc(100vh - var(--navbar-
|
|
41
|
+
top: var(--navbar-offset);
|
|
42
|
+
height: calc(100vh - var(--navbar-offset));
|
|
43
43
|
overflow-x: hidden;
|
|
44
44
|
${({ $opened }) => `
|
|
45
45
|
display: ${$opened ? 'flex' : 'none'}
|
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
exports.SplitButton = SplitButton;
|
|
7
|
-
const react_1 =
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
8
41
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
42
|
const Button_1 = require("../../components/Button/Button");
|
|
10
43
|
const ButtonGroup_1 = require("../../components/Button/ButtonGroup");
|
|
@@ -12,10 +45,11 @@ const Dropdown_1 = require("../../components/Dropdown/Dropdown");
|
|
|
12
45
|
function SplitButton(props) {
|
|
13
46
|
const { button, children, variant, size, tone, placement = 'bottom', alignment = 'end', portalled, closeOnSelect = true, disabled, toggleAriaLabel, onOpen, onClose, className, } = props;
|
|
14
47
|
const hasMenu = typeof children === 'function' || react_1.default.Children.toArray(children).length > 0;
|
|
15
|
-
|
|
48
|
+
const wrapperRef = (0, react_1.useRef)(null);
|
|
49
|
+
return (react_1.default.createElement(SplitButtonWrapper, { "data-component-name": "SplitButton/SplitButton", className: className, ref: wrapperRef },
|
|
16
50
|
react_1.default.createElement(ButtonGroup_1.ButtonGroup, { variant: variant, size: size },
|
|
17
51
|
button,
|
|
18
|
-
hasMenu ? (react_1.default.createElement(ToggleDropdown, { closeOnClick: closeOnSelect, placement: placement, alignment: alignment, portalled: portalled, withArrow: true, onOpen: onOpen, onClose: onClose, trigger: react_1.default.createElement(Button_1.Button, { "aria-label": toggleAriaLabel, "aria-haspopup": "menu", variant: variant, size: size, tone: tone, disabled: disabled }) }, children)) : null)));
|
|
52
|
+
hasMenu ? (react_1.default.createElement(ToggleDropdown, { closeOnClick: closeOnSelect, placement: placement, alignment: alignment, portalled: portalled, alignmentAnchorRef: wrapperRef, withArrow: true, onOpen: onOpen, onClose: onClose, trigger: react_1.default.createElement(Button_1.Button, { "aria-label": toggleAriaLabel, "aria-haspopup": "menu", variant: variant, size: size, tone: tone, disabled: disabled }) }, children)) : null)));
|
|
19
53
|
}
|
|
20
54
|
const SplitButtonWrapper = styled_components_1.default.div `
|
|
21
55
|
position: relative;
|
|
@@ -91,8 +91,8 @@ const TableOfContentHeader = styled_components_1.default.div `
|
|
|
91
91
|
`;
|
|
92
92
|
const TableOfContentItems = styled_components_1.default.div `
|
|
93
93
|
position: sticky;
|
|
94
|
-
top: calc(var(--navbar-height) + var(--toc-offset-top));
|
|
95
|
-
max-height: calc(100vh - var(--navbar-height) - var(--toc-offset-top));
|
|
94
|
+
top: calc(var(--navbar-stack-height) + var(--toc-offset-top));
|
|
95
|
+
max-height: calc(100vh - var(--navbar-stack-height) - var(--toc-offset-top));
|
|
96
96
|
overflow-y: auto;
|
|
97
97
|
width: var(--toc-width);
|
|
98
98
|
border-left: solid 1px var(--toc-border-color);
|
|
@@ -21,6 +21,7 @@ var FEEDBACK_TYPES;
|
|
|
21
21
|
exports.DEFAULT_FEEDBACK_TYPE = FEEDBACK_TYPES.SENTIMENT;
|
|
22
22
|
var MenuItemType;
|
|
23
23
|
(function (MenuItemType) {
|
|
24
|
+
MenuItemType["Select"] = "select";
|
|
24
25
|
MenuItemType["Separator"] = "separator";
|
|
25
26
|
MenuItemType["DrillDown"] = "drilldown";
|
|
26
27
|
MenuItemType["Group"] = "group";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONSENT_CATEGORIES = void 0;
|
|
4
|
+
exports.CONSENT_CATEGORIES = [
|
|
5
|
+
{
|
|
6
|
+
id: 'necessary',
|
|
7
|
+
locked: true,
|
|
8
|
+
titleTranslationKey: 'consent.category.necessary.title',
|
|
9
|
+
descriptionTranslationKey: 'consent.category.necessary.description',
|
|
10
|
+
titleDefault: 'Necessary',
|
|
11
|
+
descriptionDefault: 'Needed for the site to work: your consent choice, your color mode, and anonymous usage data.',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: 'analytics',
|
|
15
|
+
locked: false,
|
|
16
|
+
titleTranslationKey: 'consent.category.analytics.title',
|
|
17
|
+
descriptionTranslationKey: 'consent.category.analytics.description',
|
|
18
|
+
titleDefault: 'Analytics',
|
|
19
|
+
descriptionDefault: 'Helps us understand which pages are useful.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'marketing',
|
|
23
|
+
locked: false,
|
|
24
|
+
titleTranslationKey: 'consent.category.marketing.title',
|
|
25
|
+
descriptionTranslationKey: 'consent.category.marketing.description',
|
|
26
|
+
titleDefault: 'Marketing',
|
|
27
|
+
descriptionDefault: 'Lets us measure which campaigns bring visitors to this site.',
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
//# sourceMappingURL=consent.js.map
|
|
@@ -26,4 +26,6 @@ __exportStar(require("./mcp"), exports);
|
|
|
26
26
|
__exportStar(require("./feedback"), exports);
|
|
27
27
|
__exportStar(require("./heading"), exports);
|
|
28
28
|
__exportStar(require("./markdown"), exports);
|
|
29
|
+
__exportStar(require("./consent"), exports);
|
|
30
|
+
__exportStar(require("./prompt"), exports);
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MCPOption } from '../types/mcp';
|
|
2
1
|
export declare const DEFAULT_MCP_SERVER_NAME = "mcp-server";
|
|
3
2
|
export declare const MCP_ROUTE = "/mcp";
|
|
4
3
|
export declare const PUBLIC_MCP_ROUTE = "/mcp-public";
|
|
5
|
-
export declare const
|
|
4
|
+
export declare const MCP_OPTIONS: readonly ['cursor', 'vscode', 'claude', 'claude-code', 'codex', 'copy'];
|
|
5
|
+
export declare const DEFAULT_MCP_OPTIONS: ("claude" | "claude-code" | "codex" | "copy" | "cursor" | "vscode")[];
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_MCP_OPTIONS = exports.PUBLIC_MCP_ROUTE = exports.MCP_ROUTE = exports.DEFAULT_MCP_SERVER_NAME = void 0;
|
|
3
|
+
exports.DEFAULT_MCP_OPTIONS = exports.MCP_OPTIONS = exports.PUBLIC_MCP_ROUTE = exports.MCP_ROUTE = exports.DEFAULT_MCP_SERVER_NAME = void 0;
|
|
4
4
|
exports.DEFAULT_MCP_SERVER_NAME = 'mcp-server';
|
|
5
5
|
exports.MCP_ROUTE = '/mcp';
|
|
6
6
|
exports.PUBLIC_MCP_ROUTE = '/mcp-public';
|
|
7
|
-
exports.
|
|
8
|
-
|
|
9
|
-
'vscode',
|
|
10
|
-
'claude-code',
|
|
11
|
-
'codex',
|
|
12
|
-
'copy',
|
|
13
|
-
];
|
|
7
|
+
exports.MCP_OPTIONS = ['cursor', 'vscode', 'claude', 'claude-code', 'codex', 'copy'];
|
|
8
|
+
exports.DEFAULT_MCP_OPTIONS = [...exports.MCP_OPTIONS];
|
|
14
9
|
//# sourceMappingURL=mcp.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AiPromptActionOption, AiPromptTarget } from '../types/prompt';
|
|
2
|
+
export declare const PROMPT_TAG = "prompt";
|
|
3
|
+
export declare const AI_PROMPT_TARGETS: Readonly<{
|
|
4
|
+
readonly CURSOR: 'cursor';
|
|
5
|
+
readonly CLAUDE: 'claude';
|
|
6
|
+
readonly CHATGPT: 'chatgpt';
|
|
7
|
+
}>;
|
|
8
|
+
export declare const PROMPT_NARROW_BLOCK_MAX_WIDTH = "440px";
|
|
9
|
+
export declare const AI_PROMPT_ACTION_OPTIONS: Record<AiPromptTarget, AiPromptActionOption>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_PROMPT_ACTION_OPTIONS = exports.PROMPT_NARROW_BLOCK_MAX_WIDTH = exports.AI_PROMPT_TARGETS = exports.PROMPT_TAG = void 0;
|
|
4
|
+
exports.PROMPT_TAG = 'prompt';
|
|
5
|
+
exports.AI_PROMPT_TARGETS = Object.freeze({
|
|
6
|
+
CURSOR: 'cursor',
|
|
7
|
+
CLAUDE: 'claude',
|
|
8
|
+
CHATGPT: 'chatgpt',
|
|
9
|
+
});
|
|
10
|
+
/* Block width, not viewport width: a prompt in a narrow desktop column stacks like one on a
|
|
11
|
+
phone. The viewport `breakpoints` in core/utils/media-css.ts do not apply here. */
|
|
12
|
+
exports.PROMPT_NARROW_BLOCK_MAX_WIDTH = '440px';
|
|
13
|
+
exports.AI_PROMPT_ACTION_OPTIONS = {
|
|
14
|
+
cursor: {
|
|
15
|
+
titleTranslationKey: 'promptTag.openIn.cursor',
|
|
16
|
+
titleDefault: 'Open in Cursor',
|
|
17
|
+
descriptionTranslationKey: 'promptTag.openIn.cursorDescription',
|
|
18
|
+
descriptionDefault: 'Send this prompt to Cursor',
|
|
19
|
+
},
|
|
20
|
+
claude: {
|
|
21
|
+
titleTranslationKey: 'promptTag.openIn.claude',
|
|
22
|
+
titleDefault: 'Open in Claude',
|
|
23
|
+
descriptionTranslationKey: 'promptTag.openIn.claudeDescription',
|
|
24
|
+
descriptionDefault: 'Send this prompt to Claude',
|
|
25
|
+
},
|
|
26
|
+
chatgpt: {
|
|
27
|
+
titleTranslationKey: 'promptTag.openIn.chatgpt',
|
|
28
|
+
titleDefault: 'Open in ChatGPT',
|
|
29
|
+
descriptionTranslationKey: 'promptTag.openIn.chatgptDescription',
|
|
30
|
+
descriptionDefault: 'Send this prompt to ChatGPT',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -13,7 +13,7 @@ export declare const AiSearchConversationRole: {
|
|
|
13
13
|
export type AiSearchConversationRole = (typeof AiSearchConversationRole)[keyof typeof AiSearchConversationRole];
|
|
14
14
|
export declare const AI_SEARCH_ERROR_CONFIG: Record<AiSearchError, AiSearchErrorConfig>;
|
|
15
15
|
export declare const AI_SEARCH_MAX_MESSAGE_LENGTH = 45000;
|
|
16
|
-
export declare const SEARCH_DEBOUNCE_TIME_MS =
|
|
16
|
+
export declare const SEARCH_DEBOUNCE_TIME_MS = 500;
|
|
17
17
|
export declare const DEFAULT_KEYBOARD_SHORTCUTS = "\u2318+K,CTRL+K";
|
|
18
18
|
export declare const TOOL_CALL_DISPLAY_TEXT: Partial<Record<string, {
|
|
19
19
|
inProgressText: string;
|
|
@@ -38,12 +38,12 @@ exports.AI_SEARCH_ERROR_CONFIG = {
|
|
|
38
38
|
[AiSearchError.ErrorProcessingResponse]: defaultErrorConfig,
|
|
39
39
|
};
|
|
40
40
|
exports.AI_SEARCH_MAX_MESSAGE_LENGTH = 45000;
|
|
41
|
-
exports.SEARCH_DEBOUNCE_TIME_MS =
|
|
41
|
+
exports.SEARCH_DEBOUNCE_TIME_MS = 500;
|
|
42
42
|
exports.DEFAULT_KEYBOARD_SHORTCUTS = '⌘+K,CTRL+K';
|
|
43
43
|
exports.TOOL_CALL_DISPLAY_TEXT = {
|
|
44
44
|
[search_1.ToolCallName.SearchDocumentation]: {
|
|
45
45
|
inProgressText: 'Searching documentation...',
|
|
46
|
-
completedText: '
|
|
46
|
+
completedText: 'Searched the documentation',
|
|
47
47
|
},
|
|
48
48
|
[search_1.ToolCallName.ListApis]: {
|
|
49
49
|
inProgressText: 'Browsing APIs...',
|
|
@@ -65,6 +65,10 @@ exports.TOOL_CALL_DISPLAY_TEXT = {
|
|
|
65
65
|
inProgressText: 'Reading API description...',
|
|
66
66
|
completedText: 'Read API description',
|
|
67
67
|
},
|
|
68
|
+
[search_1.ToolCallName.Execute]: {
|
|
69
|
+
inProgressText: 'Running code...',
|
|
70
|
+
completedText: 'Ran code',
|
|
71
|
+
},
|
|
68
72
|
[search_1.ToolCallName.DescribeTools]: {
|
|
69
73
|
inProgressText: 'Discovering available tools...',
|
|
70
74
|
completedText: 'Discovered available tools',
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PortalContainerContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/** Where theme portals mount; set it inside a shadow root (the AI assistant web component), else `document.body`. */
|
|
6
|
+
exports.PortalContainerContext = (0, react_1.createContext)(null);
|
|
7
|
+
//# sourceMappingURL=PortalContainerContext.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodeWalkthroughFile } from '
|
|
1
|
+
import type { CodeWalkthroughFile } from '../../../core/types';
|
|
2
2
|
export declare function useCodePanel(files: CodeWalkthroughFile[]): {
|
|
3
3
|
readonly activeFile: CodeWalkthroughFile;
|
|
4
4
|
readonly handleTabSwitch: (name: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodeWalkthroughFile, CodeWalkthroughFilter, InputsMarkdocAttr, TogglesMarkdocAttr, CodeWalkthroughFilterItem, CodeWalkthroughConditionsObject } from '
|
|
1
|
+
import type { CodeWalkthroughFile, CodeWalkthroughFilter, InputsMarkdocAttr, TogglesMarkdocAttr, CodeWalkthroughFilterItem, CodeWalkthroughConditionsObject } from '../../../core/types';
|
|
2
2
|
export type ActiveFilter = {
|
|
3
3
|
id: string;
|
|
4
4
|
label?: string;
|
|
@@ -42,7 +42,7 @@ function useCodeWalkthroughControls(filters, inputs, toggles, enableDeepLink) {
|
|
|
42
42
|
Object.entries(newState).forEach(([id, control]) => {
|
|
43
43
|
const existingControl = controlsState[id];
|
|
44
44
|
if (existingControl && existingControl.type === control.type) {
|
|
45
|
-
// @ts-expect-error
|
|
45
|
+
// @ts-expect-error: TS2322 - the spread loses the link between `type` and `value` in the control union
|
|
46
46
|
newState[id] = Object.assign(Object.assign({}, control), { value: existingControl.value });
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodeWalkthroughStepAttr } from '
|
|
1
|
+
import type { CodeWalkthroughStepAttr } from '../../../core/types';
|
|
2
2
|
import type { WalkthroughStepsState } from '../../types/code-walkthrough';
|
|
3
3
|
type CodeWalkthroughStep = CodeWalkthroughStepAttr & {
|
|
4
4
|
compRef?: HTMLElement;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { CodeWalkthroughFile, CodeWalkthroughStepAttr,
|
|
2
|
-
import type { WalkthroughStepsState } from '../../types/code-walkthrough';
|
|
1
|
+
import type { CodeWalkthroughAttr, CodeWalkthroughFile, CodeWalkthroughStepAttr, WalkthroughStepsState } from '../../types/code-walkthrough';
|
|
3
2
|
import { type WalkthroughControlsState } from './use-code-walkthrough-controls';
|
|
4
3
|
export type WalkthroughState = {
|
|
5
4
|
stepsState: WalkthroughStepsState;
|