@astryxdesign/core 0.7.17-canary.gffd1c8e → 0.7.17
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/CHANGELOG.md +334 -0
- package/README.md +26 -9
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +6 -8
- package/dist/AppShell/AppShell.d.ts +7 -3
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +74 -36
- package/dist/AppShell/unreadWidthPoint.d.ts +29 -0
- package/dist/AppShell/unreadWidthPoint.d.ts.map +1 -0
- package/dist/AppShell/unreadWidthPoint.js +134 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -1
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +2 -2
- package/dist/Banner/Banner.d.ts +6 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -29
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +3 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +11 -7
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +57 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +5 -0
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +6 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +12 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +4 -0
- package/dist/Calendar/Calendar.js +8 -2
- package/dist/Calendar/styles.d.ts +10 -6
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +7 -3
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +23 -4
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +4 -4
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +8 -4
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +7 -0
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +3 -9
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +3 -0
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +1 -0
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +8 -0
- package/dist/Chat/pastedTextLabel.d.ts +4 -0
- package/dist/Chat/pastedTextLabel.d.ts.map +1 -0
- package/dist/Chat/pastedTextLabel.js +21 -0
- package/dist/Chat/useChatPasteAsToken.d.ts.map +1 -1
- package/dist/Chat/useChatPasteAsToken.js +8 -8
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +3 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +69 -18
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +8 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +17 -3
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +1 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +8 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +32 -5
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +1 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +3 -2
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +8 -8
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
- package/dist/DateInput/usePointerDragScroll.js +5 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +7 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +2 -1
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +104 -18
- package/dist/Dialog/DialogContext.d.ts +5 -4
- package/dist/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +38 -12
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/Drawer/DrawerHeader.js +23 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +23 -17
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +6 -3
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -7
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts +24 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.js +29 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +2 -2
- package/dist/Field/inputDisabledFocus.d.ts +4 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
- package/dist/Field/inputDisabledFocus.js +5 -0
- package/dist/Field/inputStyles.stylex.d.ts +31 -4
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +30 -5
- package/dist/Grid/Grid.d.ts +2 -1
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +5 -2
- package/dist/Heading/Heading.d.ts +1 -1
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +15 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +32 -2
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckboxIndicator.js +12 -6
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
- package/dist/Indicator/RadioIndicator.js +18 -4
- package/dist/Indicator/indicatorRegistry.d.ts +3 -26
- package/dist/Indicator/indicatorRegistry.d.ts.map +1 -1
- package/dist/Indicator/indicatorRegistry.js +2 -11
- package/dist/Indicator/themeIndicators.d.ts +15 -0
- package/dist/Indicator/themeIndicators.d.ts.map +1 -0
- package/dist/Indicator/themeIndicators.js +21 -0
- package/dist/Indicator/types.d.ts +14 -0
- package/dist/Indicator/types.d.ts.map +1 -1
- package/dist/Indicator/useThemeIndicator.d.ts +3 -0
- package/dist/Indicator/useThemeIndicator.d.ts.map +1 -0
- package/dist/Indicator/useThemeIndicator.js +19 -0
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +30 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +9 -2
- package/dist/Layer/layerExitCopy.d.ts.map +1 -1
- package/dist/Layer/layerExitCopy.js +1 -1
- package/dist/Layer/layerSlideRules.d.ts +23 -15
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +54 -54
- package/dist/Layer/useLayer.d.ts +41 -29
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +199 -126
- package/dist/Layer/useLayerKeyboardClearance.d.ts +5 -5
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
- package/dist/Layer/useLayerKeyboardClearance.js +5 -5
- package/dist/Layout/LayoutContainerContext.d.ts +4 -0
- package/dist/Layout/LayoutContainerContext.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerContext.js +20 -0
- package/dist/Layout/LayoutContainerScope.d.ts +15 -0
- package/dist/Layout/LayoutContainerScope.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerScope.js +23 -0
- package/dist/Layout/LayoutContent.d.ts +2 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +7 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +5 -1
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +5 -1
- package/dist/Layout/containerCorners.stylex.d.ts +15 -7
- package/dist/Layout/containerCorners.stylex.d.ts.map +1 -1
- package/dist/Layout/containerCorners.stylex.js +16 -7
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +324 -6
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +1 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +14 -6
- package/dist/List/ListContext.d.ts +38 -1
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +50 -2
- package/dist/List/ListItem.js +2 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +85 -96
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.js +12 -5
- package/dist/Markdown/plugins/protocol.js +3 -3
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +11 -3
- package/dist/MobileNav/MobileNav.d.ts +1 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +6 -3
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +33 -9
- package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenu.js +5 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -0
- package/dist/NavMenu/NavMenuContext.d.ts +7 -0
- package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
- package/dist/NavMenu/NavMenuContext.js +9 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +8 -2
- package/dist/Outline/Outline.d.ts +7 -3
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +11 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +6 -2
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +51 -25
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +33 -13
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +5 -1
- package/dist/Popover/popoverAnchor.d.ts +11 -0
- package/dist/Popover/popoverAnchor.d.ts.map +1 -0
- package/dist/Popover/popoverAnchor.js +33 -0
- package/dist/Popover/usePopover.d.ts +20 -3
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +110 -10
- package/dist/PowerSearch/PowerSearch.d.ts +1 -0
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +46 -9
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.js +7 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +7 -0
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -4
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +6 -13
- package/dist/ProgressBar/ProgressBar.d.ts +5 -4
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +26 -26
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +51 -0
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +1 -1
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -1
- package/dist/Resizable/resizableModel.d.ts +45 -3
- package/dist/Resizable/resizableModel.d.ts.map +1 -1
- package/dist/Resizable/resizableModel.js +91 -3
- package/dist/Resizable/resizeGesture.d.ts +3 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -1
- package/dist/Resizable/resizeGesture.js +6 -0
- package/dist/Resizable/useResizable.d.ts +1 -33
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +8 -72
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +27 -5
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +70 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +34 -14
- package/dist/Selector/hooks.d.ts +5 -0
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +72 -16
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +9 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +18 -5
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +2 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +47 -33
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +21 -12
- package/dist/Swipe/useSwipeAction.js +3 -3
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +64 -46
- package/dist/Switch/useSwitchTouch.d.ts +22 -1
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +54 -3
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +3 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +37 -18
- package/dist/Table/Table.d.ts +4 -3
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +32 -14
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableBody.js +5 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +6 -0
- package/dist/Table/TableHeaderCell.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +42 -9
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +9 -1
- package/dist/Table/TableRowPlacementContext.d.ts +18 -0
- package/dist/Table/TableRowPlacementContext.d.ts.map +1 -0
- package/dist/Table/TableRowPlacementContext.js +41 -0
- package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
- package/dist/Table/TableSelectionToolbar.js +7 -0
- package/dist/Table/columnUtils.d.ts +5 -0
- package/dist/Table/columnUtils.d.ts.map +1 -1
- package/dist/Table/columnUtils.js +9 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +2 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +8 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +10 -6
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +5 -1
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +2 -1
- package/dist/Table/table.stylex.d.ts +31 -5
- package/dist/Table/table.stylex.d.ts.map +1 -1
- package/dist/Table/table.stylex.js +33 -5
- package/dist/Table/types.d.ts +3 -1
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.js +17 -6
- package/dist/Text/text.stylex.d.ts +2 -2
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +23 -4
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -1
- package/dist/TextInput/TextInput.d.ts +9 -3
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +19 -18
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +13 -4
- package/dist/Timer/Timer.d.ts.map +1 -1
- package/dist/Timer/Timer.js +10 -7
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +55 -4
- package/dist/Toast/Toast.d.ts +1 -6
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +77 -44
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +48 -21
- package/dist/Toast/types.d.ts +8 -0
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +14 -7
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +2 -1
- package/dist/Token/Token.d.ts +1 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +6 -2
- package/dist/Tokenizer/Tokenizer.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +102 -62
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +33 -5
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +20 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +24 -8
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +21 -9
- package/dist/TopNav/TopNavMegaMenu.js +1 -1
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +9 -2
- package/dist/TopNav/TopNavRenderContext.d.ts +13 -0
- package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavRenderContext.js +24 -9
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +7 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +20 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -1
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +24 -9
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +7 -0
- package/dist/astryx.css +211 -56
- package/dist/gestures/GestureHost.d.ts +7 -0
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +37 -0
- package/dist/hooks/anchoredHint.d.ts.map +1 -1
- package/dist/hooks/anchoredHint.js +0 -1
- package/dist/hooks/computeOverflow.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.js +7 -0
- package/dist/hooks/focusableSelector.d.ts +16 -9
- package/dist/hooks/focusableSelector.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.js +53 -2
- package/dist/hooks/scrollEdgeFade.d.ts +34 -0
- package/dist/hooks/scrollEdgeFade.d.ts.map +1 -0
- package/dist/hooks/scrollEdgeFade.js +173 -0
- package/dist/hooks/statusButtonPress.d.ts +15 -0
- package/dist/hooks/statusButtonPress.d.ts.map +1 -0
- package/dist/hooks/statusButtonPress.js +19 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +2 -1
- package/dist/hooks/useFocusTrap.d.ts +26 -16
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +75 -112
- package/dist/hooks/useGroupPressTracking.d.ts +1 -1
- package/dist/hooks/useGroupPressTracking.js +1 -1
- package/dist/hooks/useOverflow.d.ts +25 -2
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +137 -8
- package/dist/hooks/useResolvedRequired.d.ts +27 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +30 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +4 -2
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +8 -8
- package/dist/i18n/InternationalizationContext.d.ts +13 -6
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +11 -6
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +7 -0
- package/dist/i18n/defaultTranslator.d.ts +17 -0
- package/dist/i18n/defaultTranslator.d.ts.map +1 -0
- package/dist/i18n/defaultTranslator.js +18 -0
- package/dist/i18n/firstStrongDirection.d.ts +3 -2
- package/dist/i18n/firstStrongDirection.d.ts.map +1 -1
- package/dist/i18n/firstStrongDirection.js +50 -12
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +1 -2
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +1 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +2 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +2 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Slider/Slider.generated.js +2 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.js +1 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextInput/TextInput.generated.js +1 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +2 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +1 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +9 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +9 -0
- package/dist/i18n/publicContext.d.ts.map +1 -1
- package/dist/i18n/publicContext.js +4 -2
- package/dist/i18n/translatingContext.d.ts +2 -0
- package/dist/i18n/translatingContext.d.ts.map +1 -0
- package/dist/i18n/translatingContext.js +25 -0
- package/dist/i18n/useComponentTranslator.d.ts.map +1 -1
- package/dist/i18n/useComponentTranslator.js +3 -2
- package/dist/i18n/useListFormatter.d.ts.map +1 -1
- package/dist/i18n/useListFormatter.js +3 -2
- package/dist/i18n/useTranslator.d.ts.map +1 -1
- package/dist/i18n/useTranslator.js +3 -2
- package/dist/internal/touch.d.ts +2 -0
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +5 -1
- package/dist/keyboard/keyboardHeight.d.ts +34 -3
- package/dist/keyboard/keyboardHeight.d.ts.map +1 -1
- package/dist/keyboard/keyboardHeight.js +101 -24
- package/dist/keyboard/keyboardTarget.d.ts +19 -16
- package/dist/keyboard/keyboardTarget.d.ts.map +1 -1
- package/dist/keyboard/keyboardTarget.js +529 -72
- package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -1
- package/dist/keyboard/useMobileKeyboard.js +1 -8
- package/dist/palette/color.d.ts +23 -0
- package/dist/palette/color.d.ts.map +1 -0
- package/dist/palette/color.js +126 -0
- package/dist/palette/generator.d.ts +69 -0
- package/dist/palette/generator.d.ts.map +1 -0
- package/dist/palette/generator.js +778 -0
- package/dist/palette/index.d.ts +12 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/palette/index.js +13 -0
- package/dist/palette/mapping.d.ts +319 -0
- package/dist/palette/mapping.d.ts.map +1 -0
- package/dist/palette/mapping.js +1312 -0
- package/dist/palette/themePalette.d.ts +20 -0
- package/dist/palette/themePalette.d.ts.map +1 -0
- package/dist/palette/themePalette.js +145 -0
- package/dist/palette/types.d.ts +178 -0
- package/dist/palette/types.d.ts.map +1 -0
- package/dist/palette/types.js +1 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts +5 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts.map +1 -0
- package/dist/privateAttributes/mediaDarkPage.js +27 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +2 -1
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/pressGroupItem.stylex.js +2 -1
- package/dist/privateAttributes/scheme.d.ts +10 -0
- package/dist/privateAttributes/scheme.d.ts.map +1 -0
- package/dist/privateAttributes/scheme.js +34 -0
- package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/travelling.stylex.js +2 -2
- package/dist/theme/MediaDarkPage.d.ts +18 -0
- package/dist/theme/MediaDarkPage.d.ts.map +1 -0
- package/dist/theme/MediaDarkPage.js +35 -0
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +9 -1
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +99 -31
- package/dist/theme/defineTheme.d.ts +31 -6
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +65 -29
- package/dist/theme/derivedVarRegistry.d.ts +19 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +49 -4
- package/dist/theme/expandRadiusScale.d.ts +1 -2
- package/dist/theme/expandRadiusScale.d.ts.map +1 -1
- package/dist/theme/expandRadiusScale.js +1 -5
- package/dist/theme/generateThemeRules.d.ts +10 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +310 -207
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/invertedSurfaceSide.d.ts +17 -0
- package/dist/theme/invertedSurfaceSide.d.ts.map +1 -0
- package/dist/theme/invertedSurfaceSide.js +47 -0
- package/dist/theme/resolveThemeValues.d.ts +5 -2
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +7 -1
- package/dist/theme/statusRoleDefaults.d.ts +43 -0
- package/dist/theme/statusRoleDefaults.d.ts.map +1 -0
- package/dist/theme/statusRoleDefaults.js +196 -0
- package/dist/theme/statusRoleDerivation.d.ts +4 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -1
- package/dist/theme/statusRoleDerivation.js +3 -1
- package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/SyntaxTheme.js +7 -0
- package/dist/theme/themeAdaptations.d.ts +24 -1
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +48 -5
- package/dist/theme/tokenDefaults.d.ts +3 -0
- package/dist/theme/tokenDefaults.d.ts.map +1 -0
- package/dist/theme/tokenDefaults.js +30 -0
- package/dist/theme/tokenValues.d.ts +26 -0
- package/dist/theme/tokenValues.d.ts.map +1 -0
- package/dist/theme/tokenValues.js +180 -0
- package/dist/theme/tokens.d.ts +3 -2
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +7 -161
- package/dist/theme/tokens.stylex.d.ts +4 -4
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +7 -5
- package/dist/theme/useTheme.d.ts +40 -3
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +137 -32
- package/dist/utils/devWarning.d.ts +17 -0
- package/dist/utils/devWarning.d.ts.map +1 -1
- package/dist/utils/devWarning.js +20 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +7 -4
- package/dist/utils/focusReturn.d.ts +110 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +418 -12
- package/dist/utils/hitArea.d.ts +28 -0
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +52 -18
- package/dist/utils/inputStream.d.ts +27 -0
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +72 -5
- package/dist/utils/nodeType.d.ts +2 -0
- package/dist/utils/nodeType.d.ts.map +1 -1
- package/dist/utils/nodeType.js +10 -0
- package/dist/utils/timeFormat.d.ts +14 -4
- package/dist/utils/timeFormat.d.ts.map +1 -1
- package/dist/utils/timeFormat.js +42 -4
- package/dist/utils/touchPresentation.d.ts +2 -2
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +10 -7
- package/dist/utils/touchPresentation.stylex.d.ts +4 -3
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
- package/dist/utils/touchPresentation.stylex.js +3 -3
- package/dist/utils/touchQueries.d.ts +3 -2
- package/dist/utils/touchQueries.d.ts.map +1 -1
- package/dist/utils/touchQueries.js +3 -2
- package/dist/utils/typeaheadMatch.d.ts +13 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -1
- package/dist/utils/typeaheadMatch.js +15 -1
- package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
- package/dist/virtualization/useInlineListWindow.js +38 -22
- package/locales/en.json +36 -0
- package/locales/pseudo.json +27 -0
- package/package.json +10 -5
- package/scripts/agent-doc-state.mjs +71 -4
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -1
- package/src/AlertDialog/AlertDialog.tsx +34 -7
- package/src/AppShell/AppShell.doc.mjs +22 -0
- package/src/AppShell/AppShell.tsx +112 -65
- package/src/AppShell/unreadWidthPoint.ts +162 -0
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +6 -1
- package/src/Badge/Badge.tsx +5 -2
- package/src/Banner/Banner.doc.mjs +15 -0
- package/src/Banner/Banner.tsx +56 -45
- package/src/BottomSheet/BottomSheet.doc.mjs +6 -3
- package/src/BottomSheet/BottomSheet.tsx +3 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +15 -7
- package/src/BottomSheet/BottomSheetSwitcher.tsx +73 -1
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +5 -0
- package/src/BottomSheet/bottomSheetStack.ts +6 -14
- package/src/Breadcrumbs/BreadcrumbItem.tsx +14 -1
- package/src/Button/Button.doc.mjs +6 -0
- package/src/Button/Button.tsx +6 -0
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.tsx +32 -20
- package/src/Calendar/styles.ts +12 -3
- package/src/Card/Card.doc.mjs +2 -2
- package/src/Card/Card.tsx +22 -3
- package/src/Chat/Chat.doc.mjs +1 -1
- package/src/Chat/ChatComposer.doc.mjs +3 -3
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +11 -7
- package/src/Chat/ChatDictationButton.tsx +12 -0
- package/src/Chat/ChatMessageBubble.tsx +2 -2
- package/src/Chat/ChatPastedTextToken.tsx +3 -9
- package/src/Chat/ChatSendButton.tsx +5 -0
- package/src/Chat/ChatSystemMessage.tsx +1 -0
- package/src/Chat/ChatToolCalls.tsx +16 -0
- package/src/Chat/pastedTextLabel.ts +23 -0
- package/src/Chat/useChatPasteAsToken.ts +9 -8
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +20 -0
- package/src/CheckboxInput/CheckboxInput.tsx +83 -26
- package/src/CheckboxList/CheckboxList.doc.mjs +15 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
- package/src/Citation/Citation.tsx +16 -1
- package/src/CodeBlock/CodeBlock.tsx +29 -2
- package/src/Collapsible/Collapsible.tsx +2 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +30 -2
- package/src/ComplexSelector/ComplexSelector.tsx +19 -1
- package/src/ContextMenu/ContextMenu.doc.mjs +5 -1
- package/src/ContextMenu/ContextMenu.tsx +44 -5
- package/src/ContextMenu/ContextMenuItem.doc.mjs +55 -5
- package/src/DateInput/MonthScroller.tsx +1 -0
- package/src/DateInput/PickerWheel.tsx +1 -0
- package/src/DateInput/TouchDateField.tsx +2 -0
- package/src/DateInput/Wheel.tsx +1 -0
- package/src/DateInput/usePointerDragScroll.ts +6 -2
- package/src/DateRangeInput/DateRangeInput.tsx +16 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
- package/src/Dialog/Dialog.doc.mjs +11 -1
- package/src/Dialog/Dialog.tsx +116 -19
- package/src/Dialog/DialogContext.ts +5 -4
- package/src/Dialog/DialogHeader.tsx +50 -12
- package/src/Drawer/DrawerHeader.tsx +31 -6
- package/src/DropdownMenu/DropdownMenu.doc.mjs +20 -1
- package/src/DropdownMenu/DropdownMenu.tsx +29 -22
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +5 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +3 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +23 -1
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +37 -9
- package/src/DropdownMenu/menuRowCorners.stylex.ts +40 -0
- package/src/EmptyState/EmptyState.tsx +2 -0
- package/src/Field/Field.doc.mjs +1 -1
- package/src/Field/FieldLabel.doc.mjs +3 -3
- package/src/Field/FieldLabel.tsx +9 -2
- package/src/Field/inputDisabledFocus.ts +18 -0
- package/src/Field/inputStyles.stylex.ts +52 -1
- package/src/Grid/Grid.doc.mjs +6 -3
- package/src/Grid/Grid.tsx +5 -2
- package/src/Heading/Heading.tsx +24 -1
- package/src/Icon/Icon.doc.mjs +1 -1
- package/src/Icon/Icon.tsx +40 -2
- package/src/Indicator/CheckboxIndicator.tsx +11 -6
- package/src/Indicator/Indicator.doc.mjs +1 -1
- package/src/Indicator/RadioIndicator.tsx +31 -4
- package/src/Indicator/indicatorRegistry.ts +7 -23
- package/src/Indicator/themeIndicators.ts +29 -0
- package/src/Indicator/types.ts +14 -0
- package/src/Indicator/useThemeIndicator.ts +24 -0
- package/src/Item/Item.doc.mjs +3 -3
- package/src/Item/Item.tsx +48 -7
- package/src/Kbd/Kbd.doc.mjs +6 -2
- package/src/Kbd/Kbd.tsx +16 -1
- package/src/Layer/layerExitCopy.ts +0 -1
- package/src/Layer/layerSlideRules.ts +62 -74
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Layer/useLayer.tsx +293 -137
- package/src/Layer/useLayerKeyboardClearance.ts +9 -12
- package/src/Layout/Layout.doc.mjs +3 -3
- package/src/Layout/LayoutContainerContext.ts +27 -0
- package/src/Layout/LayoutContainerScope.tsx +32 -0
- package/src/Layout/LayoutContent.tsx +5 -2
- package/src/Layout/LayoutFooter.tsx +3 -1
- package/src/Layout/LayoutHeader.tsx +3 -1
- package/src/Layout/containerCorners.stylex.ts +44 -7
- package/src/Lightbox/Lightbox.tsx +460 -8
- package/src/Link/Link.doc.mjs +18 -0
- package/src/Link/Link.tsx +3 -1
- package/src/List/List.tsx +14 -2
- package/src/List/ListContext.tsx +60 -1
- package/src/List/ListItem.doc.mjs +11 -9
- package/src/List/ListItem.tsx +4 -4
- package/src/Markdown/Markdown.doc.mjs +1 -1
- package/src/Markdown/Markdown.tsx +189 -190
- package/src/Markdown/plugins/HeadingLinksRenderer.tsx +14 -4
- package/src/Markdown/plugins/protocol.ts +3 -3
- package/src/MetadataList/MetadataListItem.tsx +18 -3
- package/src/MobileNav/MobileNav.doc.mjs +134 -52
- package/src/MobileNav/MobileNav.tsx +13 -9
- package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
- package/src/MultiSelector/MultiSelector.tsx +51 -8
- package/src/NavMenu/NavHeadingMenu.tsx +5 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -0
- package/src/NavMenu/NavMenu.doc.mjs +105 -2
- package/src/NavMenu/NavMenuContext.tsx +13 -0
- package/src/NumberInput/NumberInput.doc.mjs +12 -10
- package/src/NumberInput/NumberInput.tsx +19 -11
- package/src/Outline/Outline.doc.mjs +26 -8
- package/src/Outline/Outline.tsx +35 -5
- package/src/Outline/useScrollSpy.ts +8 -3
- package/src/OverflowList/OverflowList.doc.mjs +15 -0
- package/src/OverflowList/OverflowList.tsx +62 -26
- package/src/Pagination/Pagination.doc.mjs +12 -0
- package/src/Pagination/Pagination.tsx +40 -6
- package/src/Popover/Popover.doc.mjs +10 -0
- package/src/Popover/Popover.tsx +8 -4
- package/src/Popover/popoverAnchor.ts +47 -0
- package/src/Popover/usePopover.doc.mjs +16 -2
- package/src/Popover/usePopover.tsx +152 -16
- package/src/PowerSearch/PowerSearch.doc.mjs +8 -8
- package/src/PowerSearch/PowerSearch.tsx +65 -12
- package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -0
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +12 -0
- package/src/PowerSearch/PowerSearchToken.tsx +12 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +14 -19
- package/src/ProgressBar/ProgressBar.doc.mjs +2 -2
- package/src/ProgressBar/ProgressBar.tsx +44 -30
- package/src/RadioList/RadioList.tsx +63 -0
- package/src/RadioList/RadioListItem.tsx +4 -1
- package/src/Resizable/ResizeHandle.tsx +2 -3
- package/src/Resizable/resizableModel.ts +105 -3
- package/src/Resizable/resizeGesture.ts +14 -0
- package/src/Resizable/useResizable.ts +14 -75
- package/src/SegmentedControl/SegmentedControlItem.tsx +1 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +76 -12
- package/src/Selector/Selector.doc.mjs +34 -7
- package/src/Selector/Selector.tsx +55 -25
- package/src/Selector/SelectorOption.doc.mjs +5 -5
- package/src/Selector/hooks.ts +92 -17
- package/src/Selector/useSelectorPresentation.ts +18 -3
- package/src/SideNav/SideNavHeading.tsx +15 -4
- package/src/SideNav/SideNavItem.doc.mjs +10 -10
- package/src/Slider/Slider.tsx +4 -1
- package/src/Spinner/Spinner.tsx +56 -41
- package/src/Stepper/Step.tsx +18 -3
- package/src/Stepper/Stepper.doc.mjs +14 -2
- package/src/Swipe/useSwipeAction.ts +3 -3
- package/src/Switch/Switch.doc.mjs +61 -5
- package/src/Switch/Switch.tsx +72 -35
- package/src/Switch/useSwitchTouch.ts +68 -3
- package/src/TabList/Tab.tsx +6 -0
- package/src/Table/BaseTable.tsx +73 -35
- package/src/Table/Table.doc.mjs +109 -5
- package/src/Table/Table.tsx +42 -17
- package/src/Table/TableBody.tsx +10 -1
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +52 -7
- package/src/Table/TableRow.tsx +8 -1
- package/src/Table/TableRowPlacementContext.ts +58 -0
- package/src/Table/TableSelectionToolbar.tsx +12 -0
- package/src/Table/columnUtils.ts +9 -1
- package/src/Table/plugins/columnSettings/useTableColumnSettingsState.doc.mjs +1 -1
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -0
- package/src/Table/plugins/sortable/useTableSortable.tsx +15 -2
- package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +5 -5
- package/src/Table/plugins/sortable/useTableSortableState.tsx +15 -8
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +8 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +2 -4
- package/src/Table/table.stylex.ts +44 -5
- package/src/Table/types.ts +3 -1
- package/src/Table/useTableColumnResize.doc.mjs +3 -3
- package/src/Table/useTableColumnSettings.doc.mjs +3 -3
- package/src/Table/useTableFilterState.doc.mjs +6 -3
- package/src/Table/useTableFiltering.doc.mjs +71 -4
- package/src/Table/useTableInfiniteScroll.doc.mjs +2 -2
- package/src/Table/useTablePagination.doc.mjs +24 -3
- package/src/Table/useTableSelection.doc.mjs +30 -6
- package/src/Table/useTableSelectionState.doc.mjs +30 -2
- package/src/Table/useTableSortable.doc.mjs +104 -17
- package/src/Table/useTableStickyColumns.doc.mjs +3 -3
- package/src/Text/Heading.doc.mjs +2 -2
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/TruncationTooltip.tsx +18 -11
- package/src/Text/useTruncation.ts +20 -4
- package/src/TextArea/TextArea.doc.mjs +5 -5
- package/src/TextArea/TextArea.tsx +20 -1
- package/src/TextInput/TextInput.doc.mjs +5 -5
- package/src/TextInput/TextInput.tsx +23 -18
- package/src/Thumbnail/Thumbnail.tsx +2 -1
- package/src/Timer/Timer.tsx +21 -6
- package/src/Timestamp/Timestamp.tsx +67 -4
- package/src/Toast/Toast.doc.mjs +15 -5
- package/src/Toast/Toast.tsx +83 -62
- package/src/Toast/ToastViewport.tsx +62 -23
- package/src/Toast/types.ts +8 -0
- package/src/Toast/useToast.doc.mjs +80 -15
- package/src/Toast/useToast.tsx +18 -7
- package/src/ToggleButton/ToggleButton.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.tsx +1 -0
- package/src/Token/Token.tsx +5 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +15 -3
- package/src/Tokenizer/Tokenizer.tsx +130 -75
- package/src/Toolbar/Toolbar.tsx +55 -4
- package/src/Tooltip/useTooltip.tsx +26 -0
- package/src/TopNav/TopNav.doc.mjs +1 -1
- package/src/TopNav/TopNav.tsx +13 -3
- package/src/TopNav/TopNavHeading.tsx +22 -9
- package/src/TopNav/TopNavMegaMenu.tsx +4 -4
- package/src/TopNav/TopNavMenu.tsx +13 -0
- package/src/TopNav/TopNavRenderContext.ts +30 -9
- package/src/TreeList/TreeList.tsx +12 -0
- package/src/TreeList/TreeListItem.tsx +26 -5
- package/src/Typeahead/BaseTypeahead.doc.mjs +6 -0
- package/src/Typeahead/BaseTypeahead.tsx +2 -0
- package/src/Typeahead/Typeahead.doc.mjs +15 -2
- package/src/Typeahead/Typeahead.tsx +37 -13
- package/src/Typeahead/TypeaheadItem.tsx +12 -0
- package/src/gestures/GestureHost.ts +34 -0
- package/src/gestures/README.md +9 -6
- package/src/hooks/anchoredHint.tsx +1 -2
- package/src/hooks/computeOverflow.ts +10 -0
- package/src/hooks/focusableSelector.ts +59 -2
- package/src/hooks/scrollEdgeFade.ts +129 -0
- package/src/hooks/statusButtonPress.ts +26 -0
- package/src/hooks/useAnnounce.ts +2 -1
- package/src/hooks/useFocusTrap.ts +110 -141
- package/src/hooks/useGroupPressTracking.ts +1 -1
- package/src/hooks/useOverflow.ts +227 -13
- package/src/hooks/useResolvedRequired.ts +50 -1
- package/src/hooks/useTreeFocus.ts +8 -4
- package/src/hooks/useTypeahead.ts +12 -10
- package/src/i18n/InternationalizationContext.ts +16 -7
- package/src/i18n/InternationalizationProvider.doc.mjs +1 -1
- package/src/i18n/InternationalizationProvider.tsx +12 -0
- package/src/i18n/defaultTranslator.ts +25 -0
- package/src/i18n/firstStrongDirection.ts +54 -13
- package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +1 -2
- package/src/i18n/generated-english/Chat/pastedTextLabel.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +1 -0
- package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +2 -1
- package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +2 -1
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
- package/src/i18n/generated-english/Slider/Slider.generated.ts +2 -1
- package/src/i18n/generated-english/TextArea/TextArea.generated.ts +1 -0
- package/src/i18n/generated-english/TextInput/TextInput.generated.ts +1 -0
- package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +2 -1
- package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +1 -0
- package/src/i18n/generated-locales/en.generated.ts +11 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +11 -0
- package/src/i18n/publicContext.ts +4 -2
- package/src/i18n/translatingContext.ts +28 -0
- package/src/i18n/useComponentTranslator.ts +3 -2
- package/src/i18n/useListFormatter.ts +3 -2
- package/src/i18n/useTranslator.ts +3 -2
- package/src/internal/touch.ts +7 -0
- package/src/keyboard/README.md +58 -16
- package/src/keyboard/keyboardHeight.ts +138 -26
- package/src/keyboard/keyboardTarget.ts +667 -71
- package/src/keyboard/useMobileKeyboard.ts +1 -7
- package/src/palette/color.ts +205 -0
- package/src/palette/generator.ts +1134 -0
- package/src/palette/index.ts +35 -0
- package/src/palette/mapping.ts +1630 -0
- package/src/palette/themePalette.ts +175 -0
- package/src/palette/types.ts +194 -0
- package/src/privateAttributes/mediaDarkPage.ts +27 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +2 -1
- package/src/privateAttributes/scheme.ts +37 -0
- package/src/privateAttributes/travelling.stylex.ts +6 -4
- package/src/reset.css +1 -1
- package/src/theme/MediaDarkPage.tsx +41 -0
- package/src/theme/MediaTheme.tsx +8 -1
- package/src/theme/Theme.doc.mjs +4 -4
- package/src/theme/Theme.tsx +140 -35
- package/src/theme/defineTheme.ts +103 -40
- package/src/theme/derivedVarRegistry.ts +61 -4
- package/src/theme/expandRadiusScale.ts +1 -5
- package/src/theme/generateThemeRules.ts +398 -342
- package/src/theme/index.ts +2 -4
- package/src/theme/invertedSurfaceSide.ts +65 -0
- package/src/theme/resolveThemeValues.ts +8 -2
- package/src/theme/statusRoleDefaults.ts +330 -0
- package/src/theme/statusRoleDerivation.ts +2 -1
- package/src/theme/syntax/SyntaxTheme.tsx +12 -0
- package/src/theme/themeAdaptations.ts +53 -5
- package/src/theme/tokenDefaults.ts +44 -0
- package/src/theme/tokenValues.ts +193 -0
- package/src/theme/tokens.stylex.ts +7 -5
- package/src/theme/tokens.ts +14 -176
- package/src/theme/useTheme.ts +164 -35
- package/src/utils/devWarning.ts +24 -0
- package/src/utils/focusOutline.stylex.ts +7 -4
- package/src/utils/focusReturn.ts +578 -16
- package/src/utils/hitArea.ts +70 -33
- package/src/utils/inputStream.ts +81 -5
- package/src/utils/nodeType.ts +10 -0
- package/src/utils/timeFormat.ts +54 -4
- package/src/utils/touchPresentation.stylex.ts +7 -6
- package/src/utils/touchPresentation.ts +10 -7
- package/src/utils/touchQueries.ts +3 -2
- package/src/utils/typeaheadMatch.ts +20 -1
- package/src/virtualization/useInlineListWindow.ts +57 -33
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file themePalette.ts
|
|
5
|
+
* @input Seed colors (accent, neutral, success, warning, danger, info), a
|
|
6
|
+
* vibrancy and a recipe
|
|
7
|
+
* @output A ThemePalette: the color tokens, and the part styles that lift
|
|
8
|
+
* secondary text, for `defineTheme({palette})`
|
|
9
|
+
* @position The palette input of `@astryxdesign/core/palette`. It plans the
|
|
10
|
+
* request, runs the engine, and maps the stops against Core's defaults
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {tokenDefaults} from '../theme/tokenDefaults';
|
|
14
|
+
import {resolveDefaultTokens} from '../theme/tokenValues';
|
|
15
|
+
import {parseColor} from '../utils/color';
|
|
16
|
+
import {
|
|
17
|
+
PALETTE_RECIPE,
|
|
18
|
+
PALETTE_RECIPES,
|
|
19
|
+
generateTonalPalette,
|
|
20
|
+
} from './generator';
|
|
21
|
+
import {
|
|
22
|
+
LIFT_PARTS,
|
|
23
|
+
PALETTE_DIALS,
|
|
24
|
+
hex,
|
|
25
|
+
mapPalette,
|
|
26
|
+
planPaletteRequest,
|
|
27
|
+
type PaletteBase,
|
|
28
|
+
type PaletteColorReader,
|
|
29
|
+
type PaletteDial,
|
|
30
|
+
type PaletteMappingContext,
|
|
31
|
+
} from './mapping';
|
|
32
|
+
import type {PaletteLift, ThemePalette, ThemePaletteInput} from './types';
|
|
33
|
+
|
|
34
|
+
const INPUT_KEYS: ReadonlyArray<string> = Object.freeze([
|
|
35
|
+
...PALETTE_DIALS,
|
|
36
|
+
'vibrancy',
|
|
37
|
+
'recipe',
|
|
38
|
+
]);
|
|
39
|
+
|
|
40
|
+
/** Core's color reader: hex, rgb() and rgba(), black, white and transparent. */
|
|
41
|
+
const coreReader: PaletteColorReader = {
|
|
42
|
+
rgb: value => {
|
|
43
|
+
const read = typeof value === 'string' ? parseColor(value) : null;
|
|
44
|
+
return read ? [read.r, read.g, read.b] : null;
|
|
45
|
+
},
|
|
46
|
+
alpha: value => {
|
|
47
|
+
if (typeof value !== 'string') {
|
|
48
|
+
return 1;
|
|
49
|
+
}
|
|
50
|
+
if (/^transparent$/i.test(value.trim())) {
|
|
51
|
+
return 0;
|
|
52
|
+
}
|
|
53
|
+
return parseColor(value)?.a ?? 1;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Core's default colors in each mode: what a palette is measured against.
|
|
59
|
+
* Read per call, from the defaults alone, so the entry holds no state and
|
|
60
|
+
* runs on a server as it runs at build time.
|
|
61
|
+
*/
|
|
62
|
+
function defaultBase(): PaletteBase {
|
|
63
|
+
return {
|
|
64
|
+
light: resolveDefaultTokens('light'),
|
|
65
|
+
dark: resolveDefaultTokens('dark'),
|
|
66
|
+
components: {},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Makes a theme's colors from a few seeds. The palette is generated with a
|
|
72
|
+
* pinned recipe and mapped to the color tokens as the CLI theme editor maps
|
|
73
|
+
* it, against Core's defaults. Pass the result to `defineTheme({palette})`;
|
|
74
|
+
* the theme's own `tokens` still win, token by token.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```
|
|
78
|
+
* import {defineTheme} from '@astryxdesign/core/theme';
|
|
79
|
+
* import {themePalette} from '@astryxdesign/core/palette';
|
|
80
|
+
*
|
|
81
|
+
* export const acme = defineTheme({
|
|
82
|
+
* name: 'acme',
|
|
83
|
+
* palette: themePalette({accent: '#5b3cc4', neutral: '#6b6b70'}),
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export function themePalette(input: ThemePaletteInput): ThemePalette {
|
|
88
|
+
if (!input || typeof input !== 'object' || Array.isArray(input)) {
|
|
89
|
+
throw new TypeError(
|
|
90
|
+
'themePalette() takes an object of seed colors, such as {accent: "#5b3cc4"}.',
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
const unknown = Object.keys(input).filter(key => !INPUT_KEYS.includes(key));
|
|
94
|
+
if (unknown.length) {
|
|
95
|
+
throw new TypeError(
|
|
96
|
+
`themePalette(): ${unknown.map(key => `"${key}"`).join(', ')} is not a palette key. It takes ${INPUT_KEYS.join(', ')}.`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
const recipe = input.recipe ?? PALETTE_RECIPE;
|
|
100
|
+
if (!PALETTE_RECIPES.includes(recipe)) {
|
|
101
|
+
throw new TypeError(
|
|
102
|
+
`themePalette(): recipe "${String(input.recipe)}" is not a palette recipe. It takes ${PALETTE_RECIPES.join(', ')}.`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
const {vibrancy} = input;
|
|
106
|
+
if (
|
|
107
|
+
vibrancy !== undefined &&
|
|
108
|
+
(typeof vibrancy !== 'number' ||
|
|
109
|
+
!Number.isInteger(vibrancy) ||
|
|
110
|
+
vibrancy < 0 ||
|
|
111
|
+
vibrancy > 100)
|
|
112
|
+
) {
|
|
113
|
+
throw new TypeError(
|
|
114
|
+
`themePalette(): vibrancy is a whole number from 0 to 100, got ${JSON.stringify(vibrancy)}.`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
const dials: PaletteDial[] = [];
|
|
118
|
+
for (const id of PALETTE_DIALS) {
|
|
119
|
+
const value = input[id as keyof ThemePaletteInput];
|
|
120
|
+
if (value === undefined) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const read = typeof value === 'string' ? parseColor(value) : null;
|
|
124
|
+
if (!read || read.a < 1) {
|
|
125
|
+
throw new TypeError(
|
|
126
|
+
`themePalette(): ${id} is ${JSON.stringify(value)}, and a seed is one opaque color: a hex such as "#5b3cc4", rgb(), black or white.`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
dials.push({id, seed: hex([read.r, read.g, read.b])});
|
|
130
|
+
}
|
|
131
|
+
if (!dials.length) {
|
|
132
|
+
throw new TypeError(
|
|
133
|
+
`themePalette() needs at least one seed color: ${PALETTE_DIALS.join(', ')}.`,
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
const context: PaletteMappingContext = {
|
|
137
|
+
base: defaultBase(),
|
|
138
|
+
has: token => Object.hasOwn(tokenDefaults, token),
|
|
139
|
+
reader: coreReader,
|
|
140
|
+
};
|
|
141
|
+
const plan = planPaletteRequest(dials, {recipe, vibrancy}, context);
|
|
142
|
+
if (!plan) {
|
|
143
|
+
throw new TypeError('themePalette() needs at least one seed color.');
|
|
144
|
+
}
|
|
145
|
+
const candidate = generateTonalPalette(plan.config as never);
|
|
146
|
+
const mapping = mapPalette(candidate, dials, plan.fills, context);
|
|
147
|
+
const tokens: Record<string, readonly [string, string]> = {};
|
|
148
|
+
for (const [token, {light, dark}] of Object.entries(mapping.tokens)) {
|
|
149
|
+
tokens[token] = Object.freeze([light.color, dark.color] as const);
|
|
150
|
+
}
|
|
151
|
+
const components: Record<string, Record<string, PaletteLift>> = {};
|
|
152
|
+
for (const [part, block, ground] of LIFT_PARTS) {
|
|
153
|
+
const lifted = mapping.lift?.[ground];
|
|
154
|
+
if (!lifted?.light || !lifted.dark) {
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
(components[part] ??= {})[block] = Object.freeze({
|
|
158
|
+
'@light': Object.freeze({'--color-text-secondary': lifted.light.color}),
|
|
159
|
+
'@dark': Object.freeze({'--color-text-secondary': lifted.dark.color}),
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return Object.freeze({
|
|
163
|
+
kind: 'theme-palette',
|
|
164
|
+
recipe,
|
|
165
|
+
tokens: Object.freeze(tokens),
|
|
166
|
+
components: Object.freeze(
|
|
167
|
+
Object.fromEntries(
|
|
168
|
+
Object.entries(components).map(([part, blocks]) => [
|
|
169
|
+
part,
|
|
170
|
+
Object.freeze(blocks),
|
|
171
|
+
]),
|
|
172
|
+
),
|
|
173
|
+
),
|
|
174
|
+
});
|
|
175
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file types.ts
|
|
5
|
+
* @input None
|
|
6
|
+
* @output The request, candidate and diagnostics shapes of the tonal palette
|
|
7
|
+
* generator, and the palette input
|
|
8
|
+
* @position Public types of `@astryxdesign/core/palette`
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A color an author pins at one stop of one mode, constraining generation.
|
|
13
|
+
*/
|
|
14
|
+
export interface TonalPaletteAnchor {
|
|
15
|
+
/** Mode containing the anchored stop. */
|
|
16
|
+
mode: 'light' | 'dark';
|
|
17
|
+
/** Existing requested stop where the anchor applies. */
|
|
18
|
+
stop: number;
|
|
19
|
+
/** sRGB hex the stop is pulled toward: three or six digits, with or without `#`; the generator normalizes it. */
|
|
20
|
+
color: string;
|
|
21
|
+
/** `exact` preserves the chosen color at that stop; `bounded` permits adjustment within `maxDeltaE`; `flexible` treats the color as guidance and blends toward it. */
|
|
22
|
+
policy: 'exact' | 'bounded' | 'flexible';
|
|
23
|
+
/** Required non-negative perceptual-distance limit for a `bounded` anchor. */
|
|
24
|
+
maxDeltaE?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* One requested family: a seed color and the constraints applied to its ramp.
|
|
29
|
+
*/
|
|
30
|
+
export interface TonalPaletteFamilyInput {
|
|
31
|
+
/** Lower-kebab-case key for the family in the generated palette. `black` and `white` are reserved for the standalone values. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** sRGB hex the ramp is generated from: three or six digits, with or without `#`; the generator normalizes it. */
|
|
34
|
+
seed: string;
|
|
35
|
+
/** Display name for review artifacts; defaults to `id`. */
|
|
36
|
+
name?: string;
|
|
37
|
+
/** `neutral` derives the ramp from `neutralProfile` instead of the seed hue; defaults to `chromatic`. */
|
|
38
|
+
kind?: 'chromatic' | 'neutral';
|
|
39
|
+
/** Colors pinned at specific stops. */
|
|
40
|
+
anchors?: TonalPaletteAnchor[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Mutes the dark edge of every chromatic family. Their dark ramps keep
|
|
45
|
+
* `edgeMultiplier` of their in-gamut chroma through `throughStop`, then
|
|
46
|
+
* recover along a smoothstep to the standard recipe at `recoverAtStop`. Light
|
|
47
|
+
* ramps, neutral families, and the black and white endpoints do not change.
|
|
48
|
+
*/
|
|
49
|
+
export interface TonalPaletteDarkChromaTaper {
|
|
50
|
+
/** Share of chroma, from 0 to 1, that the dark edge keeps. */
|
|
51
|
+
edgeMultiplier: number;
|
|
52
|
+
/** Last stop that takes the full edge multiplier; must be a requested stop. */
|
|
53
|
+
throughStop: number;
|
|
54
|
+
/** First stop back on the standard recipe; must be a requested stop after `throughStop`. */
|
|
55
|
+
recoverAtStop: number;
|
|
56
|
+
/** Edge multipliers, from 0 to 1, by chromatic family id, in place of `edgeMultiplier`. */
|
|
57
|
+
familyMultipliers?: Record<string, number>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface TonalPaletteGenerationInput {
|
|
61
|
+
/** The recipe to run: astryx-oklch-v1 when none is named, so a request or config made before v2 keeps its colors; astryx-oklch-v2 makes pale stops follow the vibrancy and the seed's own chroma. New palettes name v2 (the theme editor records it); a config pins its recipe by naming it. */
|
|
62
|
+
recipe?: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
63
|
+
families: TonalPaletteFamilyInput[];
|
|
64
|
+
/** Chroma control from 0 (most muted) through 50 (default) to 100 (most vivid). */
|
|
65
|
+
vibrancy?: number;
|
|
66
|
+
/** Hue treatment for `neutral` families: `neutral-v1` is fully achromatic, `warm-v1` and `cool-v1` add a slight tint, and `custom` derives the hue from the family's own seed. Defaults to `neutral-v1`. */
|
|
67
|
+
neutralProfile?: 'neutral-v1' | 'warm-v1' | 'cool-v1' | 'custom';
|
|
68
|
+
modeStrategy?: 'light-only' | 'dark-only' | 'light-and-dark';
|
|
69
|
+
/** Mutes the dark edge of the chromatic families. */
|
|
70
|
+
darkChromaTaper?: TonalPaletteDarkChromaTaper;
|
|
71
|
+
/** Ordered stops shared by every requested family; defaults to 0 through 100 in increments of 5. Decimal stops are supported, and authors may omit the repeated black and white endpoints. */
|
|
72
|
+
stops?: number[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A generated palette candidate. The palette is still subject to author review
|
|
77
|
+
* and is not connected to runtime theme values.
|
|
78
|
+
*/
|
|
79
|
+
export interface TonalPaletteCandidate {
|
|
80
|
+
schemaVersion: 1;
|
|
81
|
+
status: 'candidate';
|
|
82
|
+
recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
83
|
+
/** Exact solid black for theme authoring outside a tonal family. */
|
|
84
|
+
black: '#000000';
|
|
85
|
+
/** Exact solid white for theme authoring outside a tonal family. */
|
|
86
|
+
white: '#ffffff';
|
|
87
|
+
/** Canonical order for iterating the palette's stop lookup maps. */
|
|
88
|
+
stops: number[];
|
|
89
|
+
palette: Record<
|
|
90
|
+
string,
|
|
91
|
+
{
|
|
92
|
+
name: string;
|
|
93
|
+
light?: Record<string, string>;
|
|
94
|
+
dark?: Record<string, string>;
|
|
95
|
+
}
|
|
96
|
+
>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Per-ramp evidence recorded for one family in one mode.
|
|
101
|
+
*/
|
|
102
|
+
export interface TonalPaletteRampDiagnostics {
|
|
103
|
+
/** Whether luminance rises across every stop. */
|
|
104
|
+
monotonic: boolean;
|
|
105
|
+
/** Smallest perceptual gap between neighboring stops; a small value means two stops read as one color. */
|
|
106
|
+
minimumAdjacentDeltaE: number;
|
|
107
|
+
/** Largest gap between neighboring stops. */
|
|
108
|
+
maximumAdjacentDeltaE: number;
|
|
109
|
+
/** Largest hue distance, in degrees, between a stop and the family's reference hue. */
|
|
110
|
+
maximumHueDrift: number;
|
|
111
|
+
/** Named drift the ramp is at risk of, or `null`. */
|
|
112
|
+
hueIdentityRisk: 'blue-to-purple' | 'yellow-to-brown' | null;
|
|
113
|
+
/** Stops whose ideal color fell outside sRGB and was mapped back into it. */
|
|
114
|
+
gamutMappedStops: number[];
|
|
115
|
+
/** Each anchor with the color the stop received after its policy was applied and the perceptual distance that color still has from the requested target. */
|
|
116
|
+
anchors: (TonalPaletteAnchor & {generatedColor: string; deltaE: number})[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Cross-family evidence for one mode, sampled at the stop nearest 50.
|
|
121
|
+
*/
|
|
122
|
+
export interface TonalPaletteCoordinationDiagnostics {
|
|
123
|
+
/** Mode these samples come from. */
|
|
124
|
+
mode: 'light' | 'dark';
|
|
125
|
+
/** Sampled stop. */
|
|
126
|
+
stop: number;
|
|
127
|
+
/** The two chromatic families hardest to tell apart, or `null` with fewer than two. */
|
|
128
|
+
closestFamilies: [string, string] | null;
|
|
129
|
+
/** Perceptual distance between them. */
|
|
130
|
+
minimumFamilyDeltaE: number | null;
|
|
131
|
+
/** Most saturated family at this stop. */
|
|
132
|
+
strongestFamily: string | null;
|
|
133
|
+
/** Least saturated family at this stop. */
|
|
134
|
+
weakestFamily: string | null;
|
|
135
|
+
/** Strongest chroma over weakest; a large ratio means the families are unbalanced. */
|
|
136
|
+
chromaRatio: number | null;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The request as the generator resolved it, with every default filled in.
|
|
141
|
+
*/
|
|
142
|
+
export interface TonalPaletteNormalizedRequest {
|
|
143
|
+
recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
144
|
+
vibrancy: number;
|
|
145
|
+
neutralProfile: 'neutral-v1' | 'warm-v1' | 'cool-v1' | 'custom';
|
|
146
|
+
modeStrategy: 'light-only' | 'dark-only' | 'light-and-dark';
|
|
147
|
+
/** The requested taper, with `familyMultipliers` filled in; present only when the request has a taper. */
|
|
148
|
+
darkChromaTaper?: Required<TonalPaletteDarkChromaTaper>;
|
|
149
|
+
stops: number[];
|
|
150
|
+
families: {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
seed: string;
|
|
154
|
+
kind: 'chromatic' | 'neutral';
|
|
155
|
+
anchors: TonalPaletteAnchor[];
|
|
156
|
+
}[];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** A part style's lifted secondary text, as color-mode blocks: one value for each mode. */
|
|
160
|
+
export type PaletteLift = Readonly<
|
|
161
|
+
Record<'@light' | '@dark', Readonly<Record<'--color-text-secondary', string>>>
|
|
162
|
+
>;
|
|
163
|
+
|
|
164
|
+
/** The seeds `themePalette()` grows a theme's colors from. */
|
|
165
|
+
export interface ThemePaletteInput {
|
|
166
|
+
/** The accent: buttons, links, focus rings, selection. */
|
|
167
|
+
accent?: string;
|
|
168
|
+
/** The grays of surfaces, text, borders and icons. */
|
|
169
|
+
neutral?: string;
|
|
170
|
+
/** The success status color. */
|
|
171
|
+
success?: string;
|
|
172
|
+
/** The warning status color. */
|
|
173
|
+
warning?: string;
|
|
174
|
+
/** The danger status color (the error tokens). */
|
|
175
|
+
danger?: string;
|
|
176
|
+
/** The info status color. */
|
|
177
|
+
info?: string;
|
|
178
|
+
/** Chroma as a whole number from 0 (most muted) through 50 (default) to 100 (most vivid). */
|
|
179
|
+
vibrancy?: number;
|
|
180
|
+
/** The recipe: `astryx-oklch-v1` when none is named. With a `neutral` seed it fixes the generated stops across upgrades; without one, stops picked against Core's default surfaces follow them. */
|
|
181
|
+
recipe?: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** A theme's colors made by `themePalette()`, for `defineTheme({palette})`. */
|
|
185
|
+
export interface ThemePalette {
|
|
186
|
+
readonly kind: 'theme-palette';
|
|
187
|
+
readonly recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
188
|
+
/** Each color token's `[light, dark]` value. */
|
|
189
|
+
readonly tokens: Readonly<Record<string, readonly [string, string]>>;
|
|
190
|
+
/** Part styles that lift secondary text on the accent tint, the neutral track and the coloured cards, as the official themes do, by part and style key. */
|
|
191
|
+
readonly components: Readonly<
|
|
192
|
+
Record<string, Readonly<Record<string, PaletteLift>>>
|
|
193
|
+
>;
|
|
194
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file privateAttributes/mediaDarkPage.ts
|
|
5
|
+
* @input The media side a surface takes on a dark page, when it differs from
|
|
6
|
+
* the side it takes on a light page.
|
|
7
|
+
* @output The attribute a surface's MediaTheme writes for it, and the selector
|
|
8
|
+
* text the theme engine scopes that side's on-media rules to.
|
|
9
|
+
* @position Owner module of the private dark-page media attribute.
|
|
10
|
+
* theme/MediaDarkPage.tsx gives it to MediaTheme, which writes it (Toast
|
|
11
|
+
* provides it until it measures its card); the theme engine (theme/) reads
|
|
12
|
+
* it. No package entry exports it.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const MEDIA_DARK_PAGE = 'data-astryx-media-dark-page';
|
|
16
|
+
|
|
17
|
+
/** The attribute for a surface that takes `side` on a dark page. */
|
|
18
|
+
export function mediaDarkPageAttribute(
|
|
19
|
+
side: 'dark' | 'light',
|
|
20
|
+
): Record<string, string> {
|
|
21
|
+
return {[MEDIA_DARK_PAGE]: side};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Matches a surface that takes `side` on a dark page. */
|
|
25
|
+
export function mediaDarkPageIs(side: 'dark' | 'light'): string {
|
|
26
|
+
return `[${MEDIA_DARK_PAGE}="${side}"]`;
|
|
27
|
+
}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* file that writes its name. AlertDialog's actions and a Button inside a
|
|
10
10
|
* tracking group carry the mark. The press controller
|
|
11
11
|
* (utils/pressFeedback.ts) leaves a press of those pointers to the group's
|
|
12
|
-
* tracker.
|
|
12
|
+
* tracker. Only the internal/touch entry exposes the writer, to Lab; no
|
|
13
|
+
* public entry exports it.
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
const PRESS_GROUP_ITEM = 'data-astryx-press-group-item';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file privateAttributes/scheme.ts
|
|
5
|
+
* @input The scheme the root Theme draws in, when the Theme or the page names
|
|
6
|
+
* one.
|
|
7
|
+
* @output `setRootScheme`, which writes it on `<html>`, and the selector text
|
|
8
|
+
* the theme engine builds a theme's color-mode blocks on.
|
|
9
|
+
* @position Owner module of the private root-scheme attribute. The root Theme
|
|
10
|
+
* (theme/Theme.tsx) writes it; the theme engine (theme/) reads it. No
|
|
11
|
+
* package entry exports it.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const ROOT_SCHEME = 'data-astryx-scheme';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Marks `<html>` with the scheme the root Theme draws in, or removes the mark
|
|
18
|
+
* when the reader's preference decides.
|
|
19
|
+
*/
|
|
20
|
+
export function setRootScheme(
|
|
21
|
+
root: HTMLElement,
|
|
22
|
+
scheme: 'light' | 'dark' | null,
|
|
23
|
+
): void {
|
|
24
|
+
if (scheme === null) {
|
|
25
|
+
root.removeAttribute(ROOT_SCHEME);
|
|
26
|
+
} else {
|
|
27
|
+
root.setAttribute(ROOT_SCHEME, scheme);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Matches `<html>` while the root Theme names `scheme`. */
|
|
32
|
+
export function rootSchemeIs(scheme: 'light' | 'dark'): string {
|
|
33
|
+
return `html[${ROOT_SCHEME}="${scheme}"]`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Matches `<html>` while the root Theme names no scheme. */
|
|
37
|
+
export const ROOT_SCHEME_UNNAMED = `html:not([${ROOT_SCHEME}])`;
|
|
@@ -44,7 +44,9 @@ export const travellingStyles = stylex.create({
|
|
|
44
44
|
// its neighbors opaque and on top, and these rows have no background of
|
|
45
45
|
// their own. The surface is an inset shadow across the padding box, under
|
|
46
46
|
// the press and the row's content, so the divider and the press stay
|
|
47
|
-
// visible. A selected row keeps its own fill.
|
|
47
|
+
// visible. A selected row keeps its own fill. The row reads selection from
|
|
48
|
+
// `data-selected`, because an interactive row's `aria-current` is on its
|
|
49
|
+
// button, link or delegated control. The surface takes no pseudo-element,
|
|
48
50
|
// since under a finger the row's `::after` is its hit layer. Its z-index, 2,
|
|
49
51
|
// is above a swipeable row's raise under a finger (1), so it rides above
|
|
50
52
|
// the swipeable rows it crosses.
|
|
@@ -55,7 +57,7 @@ export const travellingStyles = stylex.create({
|
|
|
55
57
|
},
|
|
56
58
|
boxShadow: {
|
|
57
59
|
default: null,
|
|
58
|
-
'[data-astryx-travelling]:not([aria-selected="true"],[aria-current="true"])': `inset 0 0 0 100vmax ${colorVars['--color-background-surface']}`,
|
|
60
|
+
'[data-astryx-travelling]:not([aria-selected="true"],[aria-current="true"],[data-selected])': `inset 0 0 0 100vmax ${colorVars['--color-background-surface']}`,
|
|
59
61
|
},
|
|
60
62
|
// A row of a List with dividers takes its shadow from the press layer's
|
|
61
63
|
// `overDividers`, composed later, which wins over the one above. So the
|
|
@@ -64,8 +66,8 @@ export const travellingStyles = stylex.create({
|
|
|
64
66
|
// does not inherit it.
|
|
65
67
|
'--_travelling-surface': {
|
|
66
68
|
default: null,
|
|
67
|
-
'[data-astryx-travelling]:not([aria-selected="true"],[aria-current="true"])': `inset 0 0 0 100vmax ${colorVars['--color-background-surface']}`,
|
|
68
|
-
':not([data-astryx-travelling]:not([aria-selected="true"],[aria-current="true"]))':
|
|
69
|
+
'[data-astryx-travelling]:not([aria-selected="true"],[aria-current="true"],[data-selected])': `inset 0 0 0 100vmax ${colorVars['--color-background-surface']}`,
|
|
70
|
+
':not([data-astryx-travelling]:not([aria-selected="true"],[aria-current="true"],[data-selected]))':
|
|
69
71
|
'initial',
|
|
70
72
|
},
|
|
71
73
|
},
|
package/src/reset.css
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file theme/MediaDarkPage.tsx
|
|
7
|
+
* @input The media side a surface takes on a dark page, or null, and children
|
|
8
|
+
* @output A provider the nearest MediaTheme inside reads, which then names
|
|
9
|
+
* that side beside its own, so a dark page draws the surface on it before
|
|
10
|
+
* any script measures it
|
|
11
|
+
* @position Internal; Toast renders it around its MediaTheme. Not exported
|
|
12
|
+
* from the theme barrel.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type {ReactNode} from 'react';
|
|
16
|
+
import {use} from 'react';
|
|
17
|
+
import {createSharedContext} from '../utils/sharedContext';
|
|
18
|
+
import {mediaDarkPageAttribute} from '../privateAttributes/mediaDarkPage';
|
|
19
|
+
|
|
20
|
+
const MediaDarkPageContext = createSharedContext<'dark' | 'light' | null>(
|
|
21
|
+
'MediaDarkPageContext',
|
|
22
|
+
1,
|
|
23
|
+
null,
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
/** Names the side the MediaTheme inside takes on a dark page. */
|
|
27
|
+
export function MediaDarkPage({
|
|
28
|
+
side,
|
|
29
|
+
children,
|
|
30
|
+
}: {
|
|
31
|
+
side: 'dark' | 'light' | null;
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}): React.ReactElement {
|
|
34
|
+
return <MediaDarkPageContext value={side}>{children}</MediaDarkPageContext>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** For MediaTheme: the attribute naming its dark-page side, or null. */
|
|
38
|
+
export function useMediaDarkPageAttribute(): Record<string, string> | null {
|
|
39
|
+
const side = use(MediaDarkPageContext);
|
|
40
|
+
return side == null ? null : mediaDarkPageAttribute(side);
|
|
41
|
+
}
|
package/src/theme/MediaTheme.tsx
CHANGED
|
@@ -42,6 +42,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
42
42
|
import {colorVars} from './tokens.stylex';
|
|
43
43
|
import {dataAttr} from '../naming';
|
|
44
44
|
import {useAutoMediaMode} from '../hooks/useAutoMediaMode';
|
|
45
|
+
import {MediaDarkPage, useMediaDarkPageAttribute} from './MediaDarkPage';
|
|
45
46
|
|
|
46
47
|
const styles = stylex.create({
|
|
47
48
|
root: {
|
|
@@ -98,6 +99,9 @@ export function MediaTheme({
|
|
|
98
99
|
// means the parent is the element that actually paints the surface.
|
|
99
100
|
const detected = useAutoMediaMode(ref, mode === 'auto');
|
|
100
101
|
const resolved = mode === 'auto' ? (detected ?? fallback) : mode;
|
|
102
|
+
// A surface whose side differs on a dark page names that side too, until
|
|
103
|
+
// it knows the page's scheme.
|
|
104
|
+
const darkPage = useMediaDarkPageAttribute();
|
|
101
105
|
|
|
102
106
|
// "off" keeps the element — and therefore the React tree and the DOM
|
|
103
107
|
// structure — identical, so a surface can switch its media context on and
|
|
@@ -106,8 +110,11 @@ export function MediaTheme({
|
|
|
106
110
|
<div
|
|
107
111
|
ref={ref}
|
|
108
112
|
{...(resolved === 'off' ? null : {[dataAttr('media')]: resolved})}
|
|
113
|
+
{...(resolved === 'off' ? null : darkPage)}
|
|
109
114
|
{...stylex.props(styles.root, resolved !== 'off' && styles.active)}>
|
|
110
|
-
{
|
|
115
|
+
{/* Surfaces nested inside take their own sides. Always rendered, so
|
|
116
|
+
the children keep their place in the tree when the side clears. */}
|
|
117
|
+
<MediaDarkPage side={null}>{children}</MediaDarkPage>
|
|
111
118
|
</div>
|
|
112
119
|
);
|
|
113
120
|
}
|
package/src/theme/Theme.doc.mjs
CHANGED
|
@@ -39,7 +39,7 @@ export const docs = {
|
|
|
39
39
|
},
|
|
40
40
|
usage: {
|
|
41
41
|
description:
|
|
42
|
-
|
|
42
|
+
"Wraps a subtree with a specific Astryx theme. For static production themes, use `astryx theme build` and import the generated CSS plus built theme object for first-paint and SSR performance. Use runtime `defineTheme()` when themes are dynamic or for prototyping.\n\n`defineTheme` accepts a `tokens` object whose keys are CSS custom property names (always prefixed with `--`). Common token names include `--color-accent`, `--color-background-surface`, `--color-background-body`, `--color-text-primary`, `--color-text-secondary`, `--radius-container`, `--spacing-1` through `--spacing-6`. Values can be a string (same for light/dark) or a `[light, dark]` tuple.\n\nExample:\n```ts\nimport {defineTheme} from '@astryxdesign/core/theme';\nconst myTheme = defineTheme({\n name: 'ocean',\n tokens: {\n '--color-accent': ['#0077B6', '#48CAE4'],\n '--color-background-surface': ['#F0F8FF', '#0A1628'],\n '--color-text-primary': ['#0A1317', '#FFFFFF'],\n '--radius-container': '16px',\n },\n});\n```",
|
|
43
43
|
bestPractices: [
|
|
44
44
|
{
|
|
45
45
|
guidance: true,
|
|
@@ -69,13 +69,13 @@ export const docs = {
|
|
|
69
69
|
type: 'DefinedTheme',
|
|
70
70
|
required: true,
|
|
71
71
|
description:
|
|
72
|
-
"Theme object to apply. Prefer built theme objects for static production themes; use runtime `defineTheme()` for dynamic themes. Its `motion` can set `tempo` (0.75–1.5) and `character` (`'crisp' | 'standard' | 'expressive'`).",
|
|
72
|
+
"Theme object to apply. Prefer built theme objects for static production themes; use runtime `defineTheme()` for dynamic themes. Its `motion` can set `tempo` (0.75–1.5) and `character` (`'crisp' | 'standard' | 'expressive'`). A color mode goes in `mode`: `theme=\"light\"` applies no theme.",
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
name: 'mode',
|
|
76
76
|
type: "'light' | 'dark' | 'system'",
|
|
77
77
|
default: "'system'",
|
|
78
|
-
description: 'Color mode. System takes the page\u2019s light or dark scheme: the reader\u2019s preference,
|
|
78
|
+
description: 'Color mode. System takes the page\u2019s light or dark scheme: reset.css makes it the reader\u2019s preference, and the page or its host can set the root\u2019s scheme itself.',
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
name: 'children',
|
|
@@ -117,6 +117,6 @@ export const docsDense = {
|
|
|
117
117
|
propDescriptions: {
|
|
118
118
|
theme:
|
|
119
119
|
'theme object to apply. Prefer built theme objects for static production themes; use runtime `defineTheme()` for dynamic themes.',
|
|
120
|
-
mode: 'color mode. System takes the page\u2019s scheme (the reader\u2019s preference
|
|
120
|
+
mode: 'color mode. System takes the page\u2019s scheme (reset.css makes it the reader\u2019s preference; the page or host can set the root\u2019s). defaults to "system"',
|
|
121
121
|
},
|
|
122
122
|
};
|