@astryxdesign/core 0.1.4-canary.fd7ab46 → 0.1.4
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/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +18 -20
- package/dist/AlertDialog/useImperativeAlertDialog.js +3 -3
- package/dist/AppShell/AppShell.d.ts +1 -1
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +53 -55
- package/dist/AspectRatio/AspectRatio.d.ts +10 -48
- package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/AspectRatio/AspectRatio.js +12 -33
- package/dist/AspectRatio/index.d.ts +1 -1
- package/dist/AspectRatio/index.d.ts.map +1 -1
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +25 -27
- package/dist/Avatar/AvatarStatusDot.js +5 -5
- package/dist/AvatarGroup/AvatarGroup.js +5 -5
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -5
- package/dist/Badge/Badge.js +3 -3
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +25 -32
- package/dist/Blockquote/Blockquote.js +7 -7
- package/dist/Breadcrumbs/BreadcrumbItem.js +17 -17
- package/dist/Breadcrumbs/Breadcrumbs.js +7 -7
- package/dist/Button/Button.js +19 -19
- package/dist/ButtonGroup/ButtonGroup.js +7 -7
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +48 -68
- package/dist/Calendar/dayCellUtils.d.ts.map +1 -1
- package/dist/Calendar/styles.d.ts +2 -2
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +2 -2
- package/dist/Card/Card.d.ts +2 -4
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +10 -18
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +21 -24
- package/dist/Carousel/carousel.markers.stylex.d.ts +7 -0
- package/dist/Carousel/carousel.markers.stylex.d.ts.map +1 -0
- package/dist/Carousel/carousel.markers.stylex.js +12 -0
- package/dist/Center/Center.js +3 -3
- package/dist/Chat/ChatComposer.js +23 -23
- package/dist/Chat/ChatComposerDrawer.js +14 -14
- package/dist/Chat/ChatComposerInput.d.ts +1 -1
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +15 -27
- package/dist/Chat/ChatDictationButton.d.ts +1 -1
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +11 -13
- package/dist/Chat/ChatLayout.js +17 -17
- package/dist/Chat/ChatLayoutScrollButton.d.ts +1 -1
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +10 -12
- package/dist/Chat/ChatMessage.js +12 -12
- package/dist/Chat/ChatMessageBubble.js +7 -7
- package/dist/Chat/ChatMessageList.js +14 -14
- package/dist/Chat/ChatMessageMetadata.d.ts +1 -1
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +12 -14
- package/dist/Chat/ChatPastedTextToken.js +13 -13
- package/dist/Chat/ChatSendButton.js +3 -3
- package/dist/Chat/ChatSystemMessage.d.ts +1 -1
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +17 -17
- package/dist/Chat/ChatTokenizedText.d.ts +1 -1
- package/dist/Chat/ChatTokenizedText.d.ts.map +1 -1
- package/dist/Chat/ChatTokenizedText.js +15 -24
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +74 -81
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +15 -15
- package/dist/CheckboxInput/CheckboxInput.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +23 -25
- package/dist/CheckboxList/CheckboxList.js +9 -9
- package/dist/CheckboxList/CheckboxListItem.d.ts +1 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +6 -8
- package/dist/Citation/Citation.js +10 -10
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +9 -32
- package/dist/Code/Code.js +3 -3
- package/dist/CodeBlock/CodeBlock.d.ts +1 -10
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +52 -88
- package/dist/Collapsible/Collapsible.d.ts +3 -9
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +22 -110
- package/dist/Collapsible/CollapsibleGroup.d.ts +7 -39
- package/dist/Collapsible/CollapsibleGroup.d.ts.map +1 -1
- package/dist/Collapsible/CollapsibleGroup.js +12 -73
- package/dist/Collapsible/CollapsibleGroupContext.d.ts +0 -31
- package/dist/Collapsible/CollapsibleGroupContext.d.ts.map +1 -1
- package/dist/Collapsible/CollapsibleGroupContext.js +3 -33
- package/dist/Collapsible/index.d.ts +0 -1
- package/dist/Collapsible/index.d.ts.map +1 -1
- package/dist/Collapsible/useCollapsible.d.ts +1 -4
- package/dist/Collapsible/useCollapsible.d.ts.map +1 -1
- package/dist/Collapsible/useCollapsible.js +6 -20
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +34 -36
- package/dist/CommandPalette/CommandPaletteEmpty.js +3 -3
- package/dist/CommandPalette/CommandPaletteFooter.js +16 -16
- package/dist/CommandPalette/CommandPaletteGroup.js +5 -5
- package/dist/CommandPalette/CommandPaletteInput.js +13 -13
- package/dist/CommandPalette/CommandPaletteItem.js +3 -3
- package/dist/CommandPalette/CommandPaletteList.js +3 -3
- package/dist/ContextMenu/ContextMenu.d.ts +2 -7
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +43 -76
- package/dist/DateInput/DateInput.js +18 -18
- package/dist/DateRangeInput/DateRangeInput.js +21 -21
- package/dist/DateTimeInput/DateTimeInput.d.ts +2 -5
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +26 -30
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +9 -9
- package/dist/Dialog/DialogHeader.js +16 -16
- package/dist/Dialog/useImperativeDialog.js +3 -3
- package/dist/Divider/Divider.js +7 -7
- package/dist/DropdownMenu/DropdownMenu.js +10 -10
- package/dist/DropdownMenu/DropdownMenuItem.d.ts +17 -2
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
- package/dist/DropdownMenu/renderDropdownItems.js +10 -10
- package/dist/EmptyState/EmptyState.js +9 -9
- package/dist/Field/Field.js +17 -17
- package/dist/Field/FieldLabel.js +15 -15
- package/dist/Field/InputClearButton.js +5 -5
- package/dist/FieldStatus/FieldStatus.js +3 -3
- package/dist/FileInput/FileInput.js +29 -29
- package/dist/FormLayout/FormLayout.js +5 -5
- package/dist/Grid/Grid.d.ts +3 -4
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +12 -29
- package/dist/Grid/GridSpan.js +3 -3
- package/dist/HStack/HStack.js +3 -3
- package/dist/Heading/Heading.js +10 -10
- package/dist/HoverCard/HoverCard.js +9 -9
- package/dist/HoverCard/useHoverCard.d.ts +1 -5
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +3 -3
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +12 -16
- package/dist/Icon/defaultIcons.js +116 -116
- package/dist/IconButton/IconButton.js +3 -3
- package/dist/InputGroup/InputGroup.js +11 -11
- package/dist/InputGroup/InputGroupText.js +3 -3
- package/dist/Item/Item.js +18 -18
- package/dist/Kbd/Kbd.js +5 -5
- package/dist/Layer/LayerProvider.js +7 -7
- package/dist/Layer/useLayer.d.ts +2 -29
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +31 -44
- package/dist/Layout/Layout.js +21 -21
- package/dist/Layout/LayoutContent.js +3 -3
- package/dist/Layout/LayoutFooter.js +5 -5
- package/dist/Layout/LayoutHeader.js +5 -5
- package/dist/Layout/LayoutPanel.js +3 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +31 -55
- package/dist/Lightbox/useLightbox.js +3 -3
- package/dist/Link/Link.js +15 -15
- package/dist/Link/LinkProvider.js +3 -3
- package/dist/Link/useLinkify.js +3 -3
- package/dist/List/List.js +11 -11
- package/dist/List/ListItem.js +11 -11
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +102 -102
- package/dist/MetadataList/MetadataList.js +10 -10
- package/dist/MetadataList/MetadataListItem.js +15 -15
- package/dist/MobileNav/MobileNav.js +15 -15
- package/dist/MobileNav/MobileNavToggle.js +5 -5
- package/dist/MoreMenu/MoreMenu.js +3 -3
- package/dist/MultiSelector/MultiSelector.js +56 -56
- package/dist/NavIcon/NavIcon.js +3 -3
- package/dist/NavMenu/NavHeadingMenu.js +5 -5
- package/dist/NavMenu/NavHeadingMenuItem.js +8 -8
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +32 -48
- package/dist/Outline/Outline.js +15 -15
- package/dist/OverflowList/OverflowList.js +8 -8
- package/dist/Overlay/Overlay.js +3 -3
- package/dist/Overlay/OverlayScrim.js +5 -5
- package/dist/Overlay/useOverlay.js +3 -3
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +72 -125
- package/dist/Popover/Popover.js +16 -16
- package/dist/Popover/usePopover.js +7 -7
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +92 -110
- package/dist/PowerSearch/PowerSearchEditPopover.js +84 -84
- package/dist/PowerSearch/PowerSearchFilterEditor.js +3 -3
- package/dist/PowerSearch/PowerSearchToken.js +5 -5
- package/dist/PowerSearch/PowerSearchValueEditor.js +54 -54
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +18 -25
- package/dist/RadioList/RadioList.js +7 -7
- package/dist/RadioList/RadioListItem.d.ts +1 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +21 -24
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +10 -28
- package/dist/Section/Section.js +5 -5
- package/dist/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +10 -32
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +12 -18
- package/dist/SelectableCard/SelectableCard.js +5 -5
- package/dist/Selector/Selector.js +46 -46
- package/dist/Selector/SelectorOption.js +3 -3
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +34 -38
- package/dist/SideNav/SideNavCollapseButton.d.ts +1 -1
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +6 -8
- package/dist/SideNav/SideNavHeading.js +87 -87
- package/dist/SideNav/SideNavItem.js +42 -42
- package/dist/SideNav/SideNavSection.d.ts +1 -1
- package/dist/SideNav/SideNavSection.d.ts.map +1 -1
- package/dist/SideNav/SideNavSection.js +16 -18
- package/dist/Skeleton/Skeleton.js +3 -3
- package/dist/Slider/Slider.js +23 -23
- package/dist/Spinner/Spinner.js +9 -9
- package/dist/StatusDot/StatusDot.js +5 -5
- package/dist/Switch/Switch.d.ts +4 -8
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +29 -34
- package/dist/TabList/Tab.js +18 -18
- package/dist/TabList/TabList.js +5 -5
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +30 -57
- package/dist/TabList/tab.markers.stylex.d.ts +1 -1
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +39 -50
- package/dist/Table/Table.js +7 -7
- package/dist/Table/TableBody.d.ts +1 -1
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableBody.js +5 -9
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableFooter.d.ts +1 -1
- package/dist/Table/TableFooter.d.ts.map +1 -1
- package/dist/Table/TableFooter.js +5 -9
- package/dist/Table/TableHeader.d.ts +1 -1
- package/dist/Table/TableHeader.d.ts.map +1 -1
- package/dist/Table/TableHeader.js +5 -9
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Table/TableRow.js +5 -5
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +11 -14
- package/dist/Table/plugins/filtering/useTableFiltering.js +71 -71
- package/dist/Table/plugins/pagination/paginateData.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/paginateData.js +1 -5
- package/dist/Table/plugins/pagination/useTablePagination.js +7 -7
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +22 -22
- package/dist/Table/plugins/selection/useTableSelection.js +18 -18
- package/dist/Table/plugins/selection/useTableSelectionState.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelectionState.js +1 -11
- package/dist/Table/plugins/sortable/useTableSortable.js +17 -17
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +4 -8
- package/dist/Table/tableContextMenu.js +9 -9
- package/dist/Text/Text.js +10 -10
- package/dist/TextArea/TextArea.js +14 -14
- package/dist/TextInput/TextInput.js +15 -15
- package/dist/Thumbnail/Thumbnail.d.ts +2 -3
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +29 -30
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +21 -26
- package/dist/Timestamp/Timestamp.d.ts +1 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +26 -37
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +17 -25
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +11 -23
- package/dist/Toast/useToast.js +4 -4
- package/dist/ToggleButton/ToggleButton.js +12 -12
- package/dist/ToggleButton/ToggleButtonGroup.js +5 -5
- package/dist/Token/Token.js +21 -21
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +34 -36
- package/dist/Toolbar/Toolbar.js +18 -18
- package/dist/Tooltip/Tooltip.js +11 -11
- package/dist/Tooltip/useTooltip.d.ts +1 -5
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +3 -3
- package/dist/TopNav/TopNav.js +32 -32
- package/dist/TopNav/TopNavHeading.js +67 -67
- package/dist/TopNav/TopNavItem.js +5 -5
- package/dist/TopNav/TopNavMegaMenu.js +30 -30
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +14 -25
- package/dist/TopNav/TopNavMegaMenuItem.js +16 -16
- package/dist/TopNav/TopNavMenu.js +32 -32
- package/dist/TreeList/TreeList.js +8 -8
- package/dist/TreeList/TreeListBranches.js +11 -11
- package/dist/TreeList/TreeListItem.js +30 -30
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +20 -23
- package/dist/Typeahead/Typeahead.js +12 -12
- package/dist/Typeahead/TypeaheadItem.js +10 -10
- package/dist/VStack/VStack.js +3 -3
- package/dist/astryx.css +0 -7
- package/dist/astryx.umd.js +60 -60
- package/dist/astryx.umd.js.map +4 -4
- package/dist/docs-types.d.ts +2 -8
- package/dist/docs-types.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.d.ts +1 -1
- package/dist/hooks/focusableSelector.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.js +1 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/useFocusTrap.d.ts +0 -3
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +1 -38
- package/dist/hooks/useInteractiveRole.d.ts +2 -6
- package/dist/hooks/useInteractiveRole.d.ts.map +1 -1
- package/dist/hooks/useInteractiveRole.js +2 -6
- package/dist/hooks/useKeyboardHint.js +9 -9
- package/dist/hooks/useStreamingText.d.ts +1 -3
- package/dist/hooks/useStreamingText.d.ts.map +1 -1
- package/dist/hooks/useStreamingText.js +5 -14
- package/dist/theme/MediaTheme.js +3 -3
- package/dist/theme/Theme.js +7 -7
- package/dist/theme/defineTheme.d.ts +1 -1
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/expandColorScale.d.ts.map +1 -1
- package/dist/theme/expandColorScale.js +3 -10
- package/dist/theme/hct.d.ts +15 -0
- package/dist/theme/hct.d.ts.map +1 -1
- package/dist/theme/hct.js +9 -9
- package/dist/theme/syntax/SyntaxTheme.js +5 -5
- package/dist/theme/tokens.d.ts +2 -10
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +4 -220
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -3
- package/dist/utils/timeParser.d.ts.map +1 -1
- package/dist/utils/timeParser.js +5 -8
- package/package.json +3 -3
- package/src/AlertDialog/AlertDialog.doc.mjs +0 -4
- package/src/AlertDialog/AlertDialog.tsx +0 -2
- package/src/AppShell/AppShell.tsx +0 -2
- package/src/AspectRatio/AspectRatio.doc.mjs +1 -28
- package/src/AspectRatio/AspectRatio.test.tsx +1 -142
- package/src/AspectRatio/AspectRatio.tsx +10 -70
- package/src/AspectRatio/index.ts +1 -5
- package/src/Avatar/Avatar.doc.mjs +0 -11
- package/src/Avatar/Avatar.test.tsx +1 -32
- package/src/Avatar/Avatar.tsx +20 -12
- package/src/Banner/Banner.doc.mjs +0 -8
- package/src/Banner/Banner.test.tsx +0 -38
- package/src/Banner/Banner.tsx +1 -8
- package/src/Calendar/Calendar.doc.mjs +1 -1
- package/src/Calendar/Calendar.test.tsx +17 -122
- package/src/Calendar/Calendar.tsx +5 -26
- package/src/Calendar/dayCellUtils.ts +1 -3
- package/src/Calendar/styles.ts +2 -12
- package/src/Card/Card.tsx +6 -16
- package/src/Carousel/Carousel.doc.mjs +12 -12
- package/src/Carousel/Carousel.test.tsx +0 -13
- package/src/Carousel/Carousel.tsx +2 -4
- package/src/Carousel/carousel.markers.stylex.ts +10 -0
- package/src/Chat/Chat.doc.mjs +1 -1
- package/src/Chat/ChatComposerInput.test.tsx +1 -27
- package/src/Chat/ChatComposerInput.tsx +15 -20
- package/src/Chat/ChatDictationButton.tsx +4 -4
- package/src/Chat/ChatLayoutScrollButton.tsx +1 -3
- package/src/Chat/ChatMessageMetadata.tsx +6 -4
- package/src/Chat/ChatSystemMessage.test.tsx +11 -26
- package/src/Chat/ChatSystemMessage.tsx +7 -7
- package/src/Chat/ChatTokenizedText.test.tsx +16 -29
- package/src/Chat/ChatTokenizedText.tsx +8 -15
- package/src/Chat/ChatToolCalls.test.tsx +0 -55
- package/src/Chat/ChatToolCalls.tsx +12 -10
- package/src/Chat/index.ts +4 -1
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +3 -3
- package/src/CheckboxInput/CheckboxInput.test.tsx +4 -71
- package/src/CheckboxInput/CheckboxInput.tsx +0 -2
- package/src/CheckboxList/CheckboxList.test.tsx +0 -19
- package/src/CheckboxList/CheckboxListItem.tsx +2 -11
- package/src/Citation/Citation.doc.mjs +0 -5
- package/src/ClickableCard/ClickableCard.tsx +2 -45
- package/src/CodeBlock/CodeBlock.doc.mjs +2 -7
- package/src/CodeBlock/CodeBlock.test.tsx +3 -122
- package/src/CodeBlock/CodeBlock.tsx +4 -62
- package/src/Collapsible/Collapsible.doc.mjs +4 -8
- package/src/Collapsible/Collapsible.tsx +10 -86
- package/src/Collapsible/CollapsibleGroup.doc.mjs +3 -27
- package/src/Collapsible/CollapsibleGroup.test.tsx +0 -318
- package/src/Collapsible/CollapsibleGroup.tsx +9 -107
- package/src/Collapsible/CollapsibleGroupContext.tsx +2 -42
- package/src/Collapsible/index.ts +0 -4
- package/src/Collapsible/useCollapsible.ts +6 -20
- package/src/CommandPalette/CommandPalette.doc.mjs +0 -4
- package/src/CommandPalette/CommandPalette.tsx +3 -5
- package/src/CommandPalette/CommandPaletteEmpty.doc.mjs +0 -5
- package/src/CommandPalette/CommandPaletteGroup.doc.mjs +0 -10
- package/src/CommandPalette/CommandPaletteInput.doc.mjs +0 -6
- package/src/CommandPalette/CommandPaletteItem.doc.mjs +0 -6
- package/src/CommandPalette/CommandPaletteList.doc.mjs +0 -9
- package/src/ContextMenu/ContextMenu.doc.mjs +0 -15
- package/src/ContextMenu/ContextMenu.test.tsx +0 -87
- package/src/ContextMenu/ContextMenu.tsx +28 -87
- package/src/ContextMenu/ContextMenuItem.doc.mjs +0 -6
- package/src/DateInput/DateInput.test.tsx +20 -11
- package/src/DateRangeInput/DateRangeInput.test.tsx +44 -31
- package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -3
- package/src/DateTimeInput/DateTimeInput.test.tsx +16 -118
- package/src/DateTimeInput/DateTimeInput.tsx +2 -8
- package/src/DateTimeInput/index.ts +0 -1
- package/src/Dialog/Dialog.doc.mjs +0 -4
- package/src/Dialog/DialogHeader.doc.mjs +0 -45
- package/src/DropdownMenu/DropdownMenu.doc.mjs +1 -1
- package/src/DropdownMenu/DropdownMenu.test.tsx +2 -22
- package/src/DropdownMenu/DropdownMenuItem.tsx +17 -5
- package/src/Field/Field.test.tsx +4 -1
- package/src/Field/FieldLabel.test.tsx +2 -2
- package/src/FormLayout/__snapshots__/FormLayout.test.tsx.snap +3 -0
- package/src/Grid/Grid.test.tsx +18 -43
- package/src/Grid/Grid.tsx +9 -26
- package/src/HoverCard/HoverCard.doc.mjs +6 -6
- package/src/HoverCard/useHoverCard.doc.mjs +5 -5
- package/src/HoverCard/useHoverCard.tsx +2 -9
- package/src/Icon/Icon.test.tsx +29 -41
- package/src/Icon/Icon.tsx +2 -6
- package/src/InputGroup/InputGroup.tsx +2 -2
- package/src/Item/Item.tsx +1 -1
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Layer/useLayer.test.tsx +2 -221
- package/src/Layer/useLayer.tsx +30 -69
- package/src/Layout/LayoutContent.doc.mjs +0 -12
- package/src/Layout/LayoutPanel.doc.mjs +0 -40
- package/src/Lightbox/Lightbox.doc.mjs +0 -5
- package/src/Lightbox/Lightbox.test.tsx +2 -123
- package/src/Lightbox/Lightbox.tsx +1 -29
- package/src/Markdown/Markdown.tsx +7 -9
- package/src/Markdown/parser.perf.test.ts +12 -34
- package/src/NavMenu/NavMenu.doc.mjs +0 -15
- package/src/NumberInput/NumberInput.test.tsx +3 -48
- package/src/NumberInput/NumberInput.tsx +15 -32
- package/src/Overlay/Overlay.doc.mjs +0 -6
- package/src/Pagination/Pagination.test.tsx +0 -162
- package/src/Pagination/Pagination.tsx +26 -80
- package/src/Popover/Popover.doc.mjs +6 -6
- package/src/Popover/Popover.test.tsx +0 -65
- package/src/Popover/usePopover.doc.mjs +1 -1
- package/src/PowerSearch/PowerSearch.doc.mjs +2 -2
- package/src/PowerSearch/PowerSearch.test.tsx +1 -109
- package/src/PowerSearch/PowerSearch.tsx +16 -37
- package/src/ProgressBar/ProgressBar.test.tsx +0 -30
- package/src/ProgressBar/ProgressBar.tsx +5 -12
- package/src/RadioList/RadioList.test.tsx +0 -19
- package/src/RadioList/RadioListItem.tsx +4 -9
- package/src/Resizable/ResizeHandle.tsx +4 -22
- package/src/SegmentedControl/SegmentedControl.doc.mjs +1 -1
- package/src/SegmentedControl/SegmentedControl.test.tsx +0 -192
- package/src/SegmentedControl/SegmentedControl.tsx +5 -27
- package/src/SegmentedControl/SegmentedControlItem.tsx +4 -9
- package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
- package/src/Selector/Selector.test.tsx +1 -27
- package/src/SideNav/SideNav.doc.mjs +1 -7
- package/src/SideNav/SideNav.test.tsx +0 -66
- package/src/SideNav/SideNav.tsx +2 -6
- package/src/SideNav/SideNavCollapseButton.tsx +3 -4
- package/src/SideNav/SideNavSection.tsx +4 -6
- package/src/Switch/Switch.doc.mjs +7 -7
- package/src/Switch/Switch.test.tsx +3 -102
- package/src/Switch/Switch.tsx +7 -20
- package/src/TabList/TabList.test.tsx +1 -185
- package/src/TabList/TabMenu.tsx +9 -45
- package/src/Table/BaseTable.tsx +2 -13
- package/src/Table/Table.test.tsx +0 -87
- package/src/Table/TableBody.tsx +2 -15
- package/src/Table/TableFooter.tsx +2 -15
- package/src/Table/TableHeader.tsx +2 -15
- package/src/Table/plugins/columnResize/useTableColumnResize.test.tsx +0 -13
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +1 -3
- package/src/Table/plugins/pagination/paginateData.ts +1 -5
- package/src/Table/plugins/pagination/useTablePagination.test.tsx +0 -13
- package/src/Table/plugins/selection/useTableSelectionState.test.tsx +0 -23
- package/src/Table/plugins/selection/useTableSelectionState.tsx +6 -11
- package/src/Table/plugins/sortable/useTableSortableState.test.tsx +1 -35
- package/src/Table/plugins/sortable/useTableSortableState.tsx +4 -8
- package/src/TextArea/TextArea.test.tsx +3 -3
- package/src/TextInput/TextInput.test.tsx +3 -3
- package/src/Thumbnail/Thumbnail.test.tsx +2 -36
- package/src/Thumbnail/Thumbnail.tsx +2 -4
- package/src/TimeInput/TimeInput.test.tsx +0 -37
- package/src/TimeInput/TimeInput.tsx +1 -11
- package/src/Timestamp/Timestamp.doc.mjs +1 -1
- package/src/Timestamp/Timestamp.test.tsx +0 -52
- package/src/Timestamp/Timestamp.tsx +16 -30
- package/src/Toast/Toast.tsx +3 -11
- package/src/Toast/ToastViewport.test.tsx +0 -64
- package/src/Toast/ToastViewport.tsx +0 -12
- package/src/ToggleButton/ToggleButton.doc.mjs +0 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
- package/src/Tokenizer/Tokenizer.test.tsx +0 -54
- package/src/Tokenizer/Tokenizer.tsx +4 -5
- package/src/Tooltip/Tooltip.doc.mjs +6 -6
- package/src/Tooltip/useTooltip.doc.mjs +5 -5
- package/src/Tooltip/useTooltip.tsx +2 -12
- package/src/TopNav/TopNav.doc.mjs +1 -1
- package/src/TopNav/TopNav.test.tsx +7 -23
- package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +2 -9
- package/src/TreeList/TreeList.doc.mjs +2 -2
- package/src/Typeahead/BaseTypeahead.doc.mjs +0 -19
- package/src/Typeahead/BaseTypeahead.tsx +2 -5
- package/src/Typeahead/Typeahead.doc.mjs +1 -1
- package/src/Typeahead/Typeahead.test.tsx +1 -45
- package/src/docs-types.ts +1 -9
- package/src/hooks/focusableSelector.ts +1 -1
- package/src/hooks/index.ts +0 -3
- package/src/hooks/useFocusTrap.doc.mjs +2 -4
- package/src/hooks/useFocusTrap.test.tsx +1 -149
- package/src/hooks/useFocusTrap.ts +1 -50
- package/src/hooks/useInteractiveRole.ts +4 -12
- package/src/hooks/useStreamingText.test.ts +19 -54
- package/src/hooks/useStreamingText.ts +5 -16
- package/src/hooks/useTreeFocus.test.tsx +3 -1
- package/src/reset.css +0 -29
- package/src/theme/SyntaxTheme.doc.mjs +4 -4
- package/src/theme/defineTheme.ts +13 -4
- package/src/theme/derivedVarRegistry.test.ts +2 -2
- package/src/theme/expandColorScale.test.ts +0 -29
- package/src/theme/expandColorScale.ts +6 -11
- package/src/theme/hct.ts +17 -9
- package/src/theme/tokens.test.ts +9 -182
- package/src/theme/tokens.ts +4 -239
- package/src/theme/useTheme.test.tsx +0 -20
- package/src/utils/index.ts +0 -4
- package/src/utils/sharedResizeObserver.test.ts +2 -2
- package/src/utils/timeParser.test.ts +0 -13
- package/src/utils/timeParser.ts +5 -8
- package/dist/hooks/useHotkeys.d.ts +0 -51
- package/dist/hooks/useHotkeys.d.ts.map +0 -1
- package/dist/hooks/useHotkeys.js +0 -160
- package/dist/utils/color.d.ts +0 -42
- package/dist/utils/color.d.ts.map +0 -1
- package/dist/utils/color.js +0 -150
- package/dist/utils/composeEventHandlers.d.ts +0 -30
- package/dist/utils/composeEventHandlers.d.ts.map +0 -1
- package/dist/utils/composeEventHandlers.js +0 -40
- package/src/Chat/ChatDictationButton.test.tsx +0 -43
- package/src/Chat/ChatLayoutScrollButton.test.tsx +0 -33
- package/src/Chat/ChatMessageMetadata.test.tsx +0 -32
- package/src/Collapsible/Collapsible.test.tsx +0 -405
- package/src/FieldStatus/FieldStatus.test.tsx +0 -282
- package/src/InteractiveRoleContext/InteractiveRoleContext.test.tsx +0 -185
- package/src/Layout/Layout.test.tsx +0 -285
- package/src/Layout/LayoutSlots.test.tsx +0 -364
- package/src/Outline/parseOutlineFromMarkdown.test.ts +0 -80
- package/src/OverflowList/OverflowList.test.tsx +0 -416
- package/src/Overlay/Overlay.test.tsx +0 -356
- package/src/Resizable/ResizeHandle.test.tsx +0 -218
- package/src/SizeContext/SizeContext.test.tsx +0 -226
- package/src/__tests__/TestIcon.tsx +0 -26
- package/src/__tests__/fastRoleQueries.ts +0 -66
- package/src/docPropReferences.test.ts +0 -178
- package/src/hooks/useHotkeys.doc.mjs +0 -52
- package/src/hooks/useHotkeys.test.ts +0 -245
- package/src/hooks/useHotkeys.ts +0 -203
- package/src/utils/color.test.ts +0 -133
- package/src/utils/color.ts +0 -148
- package/src/utils/composeEventHandlers.test.ts +0 -71
- package/src/utils/composeEventHandlers.ts +0 -44
- package/src/utils/mergeProps.test.ts +0 -166
package/dist/docs-types.d.ts
CHANGED
|
@@ -387,13 +387,7 @@ export interface PlaygroundConfig {
|
|
|
387
387
|
* interactive preview shows an open-trigger placeholder instead of an
|
|
388
388
|
* empty stage while `isOpen` is false, and lets the real overlay render
|
|
389
389
|
* when opened. Include `isOpen: false` in `defaults` so the preview can
|
|
390
|
-
* bridge `onOpenChange` back into playground state.
|
|
391
|
-
*
|
|
392
|
-
* Only for components with no inline containment (MobileNav, Lightbox).
|
|
393
|
-
* Components with an `isInline` docs-preview prop (Dialog, AlertDialog,
|
|
394
|
-
* CommandPalette) intentionally keep contained inline previews instead:
|
|
395
|
-
* the component is visible on load and knobs stay usable, whereas a real
|
|
396
|
-
* top-layer modal makes the rest of the page inert (#3657). */
|
|
390
|
+
* bridge `onOpenChange` back into playground state. */
|
|
397
391
|
overlay?: boolean;
|
|
398
392
|
/** Required parent wrapper for sub-components that depend on a parent
|
|
399
393
|
* context provider (e.g. `Tab` calls `useTabListContext()` and throws
|
|
@@ -771,7 +765,7 @@ export interface ReferenceTranslationDoc {
|
|
|
771
765
|
* Not every value maps to an existing template — unused values are reserved
|
|
772
766
|
* for future templates so authors get autocomplete for the full taxonomy.
|
|
773
767
|
*/
|
|
774
|
-
export type TemplateCategory = 'Dashboard - Analytics' | 'Dashboard - KPI Summary' | 'Dashboard - Monitoring' | 'Dashboard - Executive Summary' | 'Dashboard - Widget Grid' | 'Dashboard - Split' | 'Dashboard - Tabbed' | 'Dashboard - Filterable' | 'Dashboard - Portfolio' | 'Table - Basic' | 'Table - Grouped' | 'Table - Index/Detail' | 'Table - Split Pane' | 'Table - Bulk Actions' | 'Table - Filtering' | 'Table - Tree/Hierarchical List' | 'Table - Frozen Column' | 'Table - Chart' | 'Table - Heatmap' | 'Form - Basic' | 'Form - Page' | 'Form - Checkout' | 'Form - Two-column' | 'Form - Wizard' | 'Form - Modal Overlay' | 'Form - Side Sheet' | 'Form - Inline Edits' | 'Form - Settings' | 'Settings' | 'Settings - Dialog' | 'Settings - Sidebar' | 'Settings - Panels' | 'Settings - Form' | 'Login - Basic' | 'Login - Card' | 'Login - SSO' | 'Login - Split' | 'Tools - File Explorer' | 'Tools - Page Editor' | 'Tools - IDE' | 'Tools -
|
|
768
|
+
export type TemplateCategory = 'Dashboard - Analytics' | 'Dashboard - KPI Summary' | 'Dashboard - Monitoring' | 'Dashboard - Executive Summary' | 'Dashboard - Widget Grid' | 'Dashboard - Split' | 'Dashboard - Tabbed' | 'Dashboard - Filterable' | 'Dashboard - Portfolio' | 'Table - Basic' | 'Table - Grouped' | 'Table - Index/Detail' | 'Table - Split Pane' | 'Table - Bulk Actions' | 'Table - Filtering' | 'Table - Tree/Hierarchical List' | 'Table - Frozen Column' | 'Table - Chart' | 'Table - Heatmap' | 'Form - Basic' | 'Form - Page' | 'Form - Checkout' | 'Form - Two-column' | 'Form - Wizard' | 'Form - Modal Overlay' | 'Form - Side Sheet' | 'Form - Inline Edits' | 'Form - Settings' | 'Settings' | 'Settings - Dialog' | 'Settings - Sidebar' | 'Settings - Panels' | 'Settings - Form' | 'Login - Basic' | 'Login - Card' | 'Login - SSO' | 'Login - Split' | 'Tools - File Explorer' | 'Tools - Page Editor' | 'Tools - IDE' | 'Tools - Kanban Board' | 'Tools - Notebook/Report Page' | 'Tools - Diff Compare Viewer' | 'Tools - Search Results Page' | 'Content - Card Grid' | 'Content - Order Detail' | 'Content - Product Detail' | 'Content - Product List' | 'Content - Documentation Catalog' | 'Content - Documentation Design' | 'Content - Documentation Technical' | 'Content - Infinite Scroll Page' | 'Content - Timeline' | 'Content - Profile Page' | 'AI Chat - Conversation' | 'AI Chat - Landing' | 'AI Chat - Artifact Page' | 'Gallery - Hero' | 'Gallery - Basic' | 'Gallery - Mixed' | 'Gallery - Side' | 'Gallery - Product' | 'Shell - Left Sidebar' | 'Shell - Top Nav' | 'Shell - Top Nav + Left Sidebar' | 'Shell - Breadcrumb Driven Layout' | 'Shell - Blank';
|
|
775
769
|
interface BaseTemplateDoc {
|
|
776
770
|
/** Identifier name for the template. For block templates this matches
|
|
777
771
|
* the React component import name (e.g. `"ChatMessageMetadata"`); for
|
package/dist/docs-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-types.d.ts","sourceRoot":"","sources":["../src/docs-types.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,OAAO;IACtB;;yEAEqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;wCAOoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb;;;;6CAIyC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB;;;8EAG0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACpC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,aAAa;IAC5B;;gFAE4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;sBAMkB;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;4EAIwE;IACxE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;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E,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,wBAAwB;IACxB,KAAK,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;KAChC,CAAC;CACH"}
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
* This is the canonical focusable selector; prefer importing it here over
|
|
19
19
|
* re-declaring the string so behavior stays consistent across hooks.
|
|
20
20
|
*/
|
|
21
|
-
export declare const FOCUSABLE_SELECTOR = "button:not([disabled]),
|
|
21
|
+
export declare const FOCUSABLE_SELECTOR = "button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]):not([disabled]), [contenteditable]:not([contenteditable=\"false\"]), audio[controls], video[controls], iframe, details > summary:first-child";
|
|
22
22
|
//# sourceMappingURL=focusableSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusableSelector.d.ts","sourceRoot":"","sources":["../../src/hooks/focusableSelector.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"focusableSelector.d.ts","sourceRoot":"","sources":["../../src/hooks/focusableSelector.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,4RACwP,CAAC"}
|
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
* This is the canonical focusable selector; prefer importing it here over
|
|
22
22
|
* re-declaring the string so behavior stays consistent across hooks.
|
|
23
23
|
*/
|
|
24
|
-
export const FOCUSABLE_SELECTOR = 'button:not([disabled]),
|
|
24
|
+
export const FOCUSABLE_SELECTOR = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -16,8 +16,6 @@ export { useListFocus } from './useListFocus';
|
|
|
16
16
|
export type { UseListFocusOptions, UseListFocusReturn, ListFocusOrientation, } from './useListFocus';
|
|
17
17
|
export { useTreeFocus } from './useTreeFocus';
|
|
18
18
|
export type { UseTreeFocusOptions, UseTreeFocusReturn } from './useTreeFocus';
|
|
19
|
-
export { useHotkeys } from './useHotkeys';
|
|
20
|
-
export type { Hotkey } from './useHotkeys';
|
|
21
19
|
export { useTypeahead } from './useTypeahead';
|
|
22
20
|
export { useKeyboardHint } from './useKeyboardHint';
|
|
23
21
|
export type { UseKeyboardHintOptions, UseKeyboardHintReturn, KeyboardHintOrientation, } from './useKeyboardHint';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAElE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,
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7D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,wBAAwB,EAAC,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,eAAe,EACf,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,oBAAoB,EAAC,MAAM,gBAAgB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -15,7 +15,6 @@ export { useAnnounce } from "./useAnnounce.js";
|
|
|
15
15
|
export { useGridFocus } from "./useGridFocus.js";
|
|
16
16
|
export { useListFocus } from "./useListFocus.js";
|
|
17
17
|
export { useTreeFocus } from "./useTreeFocus.js";
|
|
18
|
-
export { useHotkeys } from "./useHotkeys.js";
|
|
19
18
|
export { useTypeahead } from "./useTypeahead.js";
|
|
20
19
|
export { useKeyboardHint } from "./useKeyboardHint.js";
|
|
21
20
|
export { useMediaQuery } from "./useMediaQuery.js";
|
|
@@ -49,9 +49,6 @@ export interface UseFocusTrapReturn<T extends HTMLElement = HTMLElement> {
|
|
|
49
49
|
* - Listens to focus events on the document
|
|
50
50
|
* - Redirects focus back into the container if it escapes
|
|
51
51
|
* - Handles both Tab and Shift+Tab navigation
|
|
52
|
-
* - Restores focus to the element that was focused before activation when the
|
|
53
|
-
* trap deactivates or unmounts, unless focus was already moved elsewhere
|
|
54
|
-
* (so consumers that restore focus themselves are unaffected)
|
|
55
52
|
*
|
|
56
53
|
* @example
|
|
57
54
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AA+CA;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAEV;AA0ED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;IACrE;;OAEG;IACH,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAExC;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC9D,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAAC,CAAC,CAAC,CAoJvB"}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useFocusTrap.ts
|
|
7
7
|
* @input Uses React useCallback, useEffect, useRef
|
|
8
|
-
* @output Exports useFocusTrap hook for trapping focus within a container
|
|
9
|
-
* restoring focus to the previously-focused element on deactivation
|
|
8
|
+
* @output Exports useFocusTrap hook for trapping focus within a container
|
|
10
9
|
* @position Core hook; used by dialogs, modals, date pickers
|
|
11
10
|
*
|
|
12
11
|
* Based on WAI-ARIA dialog pattern:
|
|
@@ -147,9 +146,6 @@ function focusLastDescendant(container) {
|
|
|
147
146
|
* - Listens to focus events on the document
|
|
148
147
|
* - Redirects focus back into the container if it escapes
|
|
149
148
|
* - Handles both Tab and Shift+Tab navigation
|
|
150
|
-
* - Restores focus to the element that was focused before activation when the
|
|
151
|
-
* trap deactivates or unmounts, unless focus was already moved elsewhere
|
|
152
|
-
* (so consumers that restore focus themselves are unaffected)
|
|
153
149
|
*
|
|
154
150
|
* @example
|
|
155
151
|
* ```
|
|
@@ -189,39 +185,6 @@ export function useFocusTrap(options) {
|
|
|
189
185
|
}
|
|
190
186
|
}, []);
|
|
191
187
|
|
|
192
|
-
/**
|
|
193
|
-
* Capture the element focused before the trap activated, and restore focus to
|
|
194
|
-
* it when the trap deactivates (or the component unmounts). Overlays are
|
|
195
|
-
* opened imperatively (e.g. `showPopover()`), so the browser's declarative
|
|
196
|
-
* popover focus restoration does not apply — without this, closing a Popover
|
|
197
|
-
* via Escape or light dismiss drops keyboard focus to `<body>`.
|
|
198
|
-
*
|
|
199
|
-
* The restore is guarded so it never steals focus a consumer moved on
|
|
200
|
-
* purpose: it only runs when focus would otherwise be lost — i.e. the active
|
|
201
|
-
* element is nothing, the document body/root, or still inside the (possibly
|
|
202
|
-
* now-unmounted) trap container. If focus already moved to some other element
|
|
203
|
-
* outside the trap (the user clicked elsewhere, or a consumer such as
|
|
204
|
-
* DropdownMenu already refocused its trigger), the restore is a no-op.
|
|
205
|
-
*/
|
|
206
|
-
useEffect(() => {
|
|
207
|
-
if (!isActive) {
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
const previouslyFocused = document.activeElement;
|
|
211
|
-
// Snapshot the container now; by cleanup it may be detached or unmounted.
|
|
212
|
-
const container = containerRef.current;
|
|
213
|
-
return () => {
|
|
214
|
-
const active = document.activeElement;
|
|
215
|
-
const focusWasLost = active == null || active === document.body || active === document.documentElement || container != null && container.contains(active);
|
|
216
|
-
if (!focusWasLost) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
if (previouslyFocused != null && previouslyFocused.isConnected && typeof previouslyFocused.focus === 'function') {
|
|
220
|
-
previouslyFocused.focus();
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
}, [isActive]);
|
|
224
|
-
|
|
225
188
|
/**
|
|
226
189
|
* Handle focus events - redirect focus back into container if it escapes.
|
|
227
190
|
* Only redirects for keyboard navigation, not mouse clicks.
|
|
@@ -18,12 +18,8 @@ export interface UseInteractiveRoleOptions {
|
|
|
18
18
|
*/
|
|
19
19
|
onClick?: ((...args: never[]) => unknown) | null;
|
|
20
20
|
/**
|
|
21
|
-
* Whether the component is disabled. When true
|
|
22
|
-
*
|
|
23
|
-
* decided by the remaining inputs: `onClick` → `'button'`, an interactive
|
|
24
|
-
* context → its role, otherwise `'inert'`. In particular a disabled `href`
|
|
25
|
-
* with no `onClick` and no context override resolves to `'inert'`, not a
|
|
26
|
-
* link or a button.
|
|
21
|
+
* Whether the component is disabled. When true and href is provided,
|
|
22
|
+
* falls back to button (disabled links are an a11y anti-pattern).
|
|
27
23
|
* @default false
|
|
28
24
|
*/
|
|
29
25
|
isDisabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInteractiveRole.d.ts","sourceRoot":"","sources":["../../src/hooks/useInteractiveRole.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInteractiveRole.d.ts","sourceRoot":"","sources":["../../src/hooks/useInteractiveRole.ts"],"names":[],"mappings":"AA4BA;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;IAEjD;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,UAAkB,GACnB,EAAE,yBAAyB,GAAG,eAAe,CAoB7C"}
|
|
@@ -11,14 +11,11 @@
|
|
|
11
11
|
* Centralizes the "what element should I render as?" decision for
|
|
12
12
|
* polymorphic components. The priority order:
|
|
13
13
|
*
|
|
14
|
-
* 1. href → 'link' (navigation always wins
|
|
14
|
+
* 1. href → 'link' (navigation always wins)
|
|
15
15
|
* 2. onClick → 'button' (explicit interactivity)
|
|
16
16
|
* 3. interactive trigger context → 'button' (implicit via parent)
|
|
17
17
|
* 4. else → 'inert' (non-interactive)
|
|
18
18
|
*
|
|
19
|
-
* A disabled `href` is excluded at step 1 and therefore resolves via the
|
|
20
|
-
* remaining steps — 'inert' when no onClick or context applies.
|
|
21
|
-
*
|
|
22
19
|
* This hook is the single place to add new context-based triggers
|
|
23
20
|
* (e.g., Popover, DropdownMenu, Disclosure). Components that consume
|
|
24
21
|
* this hook never need updating when new trigger contexts are added.
|
|
@@ -63,8 +60,7 @@ export function useInteractiveRole({
|
|
|
63
60
|
}) {
|
|
64
61
|
const contextRole = useInteractiveRoleContext();
|
|
65
62
|
|
|
66
|
-
// 1. href → link (unless disabled —
|
|
67
|
-
// resolved by the checks below, landing on 'inert' if nothing else applies)
|
|
63
|
+
// 1. href → link (unless disabled — disabled links fall through to button)
|
|
68
64
|
if (href != null && !isDisabled) {
|
|
69
65
|
return 'link';
|
|
70
66
|
}
|
|
@@ -25,7 +25,7 @@ import { useLayer } from "../Layer/useLayer.js";
|
|
|
25
25
|
// ---------------------------------------------------------------------------
|
|
26
26
|
// Types
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
28
|
-
import {
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
// ---------------------------------------------------------------------------
|
|
30
30
|
// Styles
|
|
31
31
|
// ---------------------------------------------------------------------------
|
|
@@ -187,23 +187,23 @@ export function useKeyboardHint(options = {}) {
|
|
|
187
187
|
|
|
188
188
|
// --- Render the hint element ---
|
|
189
189
|
|
|
190
|
-
const arrowContent = /*#__PURE__*/
|
|
190
|
+
const arrowContent = /*#__PURE__*/_jsx("span", {
|
|
191
191
|
...{
|
|
192
192
|
className: "x3nfvp2 x6s0dn4 xzye2dw"
|
|
193
193
|
},
|
|
194
|
-
children: ARROW_HINT_KEYS[orientation].map(key => /*#__PURE__*/
|
|
194
|
+
children: ARROW_HINT_KEYS[orientation].map(key => /*#__PURE__*/_jsx(Kbd, {
|
|
195
195
|
keys: key
|
|
196
|
-
}, key
|
|
197
|
-
}
|
|
198
|
-
const hintElement = layer.render(/*#__PURE__*/
|
|
196
|
+
}, key))
|
|
197
|
+
});
|
|
198
|
+
const hintElement = layer.render(/*#__PURE__*/_jsxs("span", {
|
|
199
199
|
"aria-hidden": "true",
|
|
200
|
-
children: [arrowContent, /*#__PURE__*/
|
|
200
|
+
children: [arrowContent, /*#__PURE__*/_jsx("span", {
|
|
201
201
|
...{
|
|
202
202
|
className: "x11g1kdw"
|
|
203
203
|
},
|
|
204
204
|
children: "to navigate"
|
|
205
|
-
}
|
|
206
|
-
}
|
|
205
|
+
})]
|
|
206
|
+
}), {
|
|
207
207
|
placement: 'below',
|
|
208
208
|
alignment: 'start',
|
|
209
209
|
xstyle: styles.hint,
|
|
@@ -16,9 +16,7 @@ export interface UseStreamingTextOptions {
|
|
|
16
16
|
* Smooths bursty streamed text into a steady character-by-character reveal.
|
|
17
17
|
*
|
|
18
18
|
* Returns a string that grows steadily toward `targetText`. When `isStreaming`
|
|
19
|
-
* is false, returns the full `targetText` immediately.
|
|
20
|
-
* reduced motion, the progressive reveal is skipped entirely and the full
|
|
21
|
-
* `targetText` is returned immediately.
|
|
19
|
+
* is false, returns the full `targetText` immediately.
|
|
22
20
|
*
|
|
23
21
|
* The hook advances on word and syntax boundaries, avoiding slices inside
|
|
24
22
|
* markdown markers like `**`, backticks, `[]()`, etc. This prevents visual
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStreamingText.d.ts","sourceRoot":"","sources":["../../src/hooks/useStreamingText.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useStreamingText.d.ts","sourceRoot":"","sources":["../../src/hooks/useStreamingText.ts"],"names":[],"mappings":"AA2BA;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhE,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AA4BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,OAAO,EACpB,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,CAyFR"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useStreamingText.ts
|
|
7
|
-
* @input Uses React useState, useEffect, useRef,
|
|
7
|
+
* @input Uses React useState, useEffect, useRef, useTheme
|
|
8
8
|
* @output Exports useStreamingText hook for smooth text streaming
|
|
9
9
|
* @position Core hook; smooths bursty streamed text into steady character reveal
|
|
10
10
|
*
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
* - /packages/core/src/hooks/useStreamingText.test.ts (tests)
|
|
23
23
|
*/
|
|
24
24
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
25
|
-
import { useMediaQuery } from "./useMediaQuery.js";
|
|
26
25
|
import { useTheme } from "../theme/useTheme.js";
|
|
27
26
|
|
|
28
27
|
/**
|
|
@@ -61,9 +60,7 @@ const CHARS_PER_TICK = {
|
|
|
61
60
|
* Smooths bursty streamed text into a steady character-by-character reveal.
|
|
62
61
|
*
|
|
63
62
|
* Returns a string that grows steadily toward `targetText`. When `isStreaming`
|
|
64
|
-
* is false, returns the full `targetText` immediately.
|
|
65
|
-
* reduced motion, the progressive reveal is skipped entirely and the full
|
|
66
|
-
* `targetText` is returned immediately.
|
|
63
|
+
* is false, returns the full `targetText` immediately.
|
|
67
64
|
*
|
|
68
65
|
* The hook advances on word and syntax boundaries, avoiding slices inside
|
|
69
66
|
* markdown markers like `**`, backticks, `[]()`, etc. This prevents visual
|
|
@@ -132,15 +129,9 @@ export function useStreamingText(targetText, isStreaming, options) {
|
|
|
132
129
|
}
|
|
133
130
|
}
|
|
134
131
|
|
|
135
|
-
// Respect the user's reduced-motion preference — skip the progressive
|
|
136
|
-
// reveal and snap straight to the full text. Uses the package's SSR-safe
|
|
137
|
-
// useMediaQuery (useMediaQuery.ts) so the read stays in sync if the
|
|
138
|
-
// preference changes mid-stream.
|
|
139
|
-
const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');
|
|
140
|
-
|
|
141
132
|
// Animation loop
|
|
142
133
|
useEffect(() => {
|
|
143
|
-
if (!isStreaming || speed === 'instant'
|
|
134
|
+
if (!isStreaming || speed === 'instant') {
|
|
144
135
|
return;
|
|
145
136
|
}
|
|
146
137
|
function tick(now) {
|
|
@@ -164,8 +155,8 @@ export function useStreamingText(targetText, isStreaming, options) {
|
|
|
164
155
|
rafRef.current = null;
|
|
165
156
|
}
|
|
166
157
|
};
|
|
167
|
-
}, [isStreaming, charsPerTick, tickMs, speed
|
|
168
|
-
if (!isStreaming || speed === 'instant'
|
|
158
|
+
}, [isStreaming, charsPerTick, tickMs, speed]);
|
|
159
|
+
if (!isStreaming || speed === 'instant') {
|
|
169
160
|
return targetText;
|
|
170
161
|
}
|
|
171
162
|
return targetText.slice(0, displayedLen);
|
package/dist/theme/MediaTheme.js
CHANGED
|
@@ -37,7 +37,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
37
37
|
import "./tokens.stylex.js";
|
|
38
38
|
import { colorVars } from "./tokens.stylex.js";
|
|
39
39
|
import { dataAttr } from "../naming.js";
|
|
40
|
-
import {
|
|
40
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
41
41
|
/**
|
|
42
42
|
* Inverted surface theming context.
|
|
43
43
|
*
|
|
@@ -49,12 +49,12 @@ export function MediaTheme({
|
|
|
49
49
|
mode,
|
|
50
50
|
children
|
|
51
51
|
}) {
|
|
52
|
-
return /*#__PURE__*/
|
|
52
|
+
return /*#__PURE__*/_jsx("div", {
|
|
53
53
|
[dataAttr('media')]: mode,
|
|
54
54
|
...{
|
|
55
55
|
className: "xjp7ctv x1tgivj0"
|
|
56
56
|
},
|
|
57
57
|
children: children
|
|
58
|
-
}
|
|
58
|
+
});
|
|
59
59
|
}
|
|
60
60
|
MediaTheme.displayName = 'MediaTheme';
|
package/dist/theme/Theme.js
CHANGED
|
@@ -48,7 +48,7 @@ import { ThemeContext } from "./useTheme.js";
|
|
|
48
48
|
/**
|
|
49
49
|
* Theme provider props
|
|
50
50
|
*/
|
|
51
|
-
import {
|
|
51
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
52
52
|
/**
|
|
53
53
|
* Styles for the theme wrapper
|
|
54
54
|
*/
|
|
@@ -238,17 +238,17 @@ export function Theme({
|
|
|
238
238
|
theme,
|
|
239
239
|
mode
|
|
240
240
|
}), [theme, mode]);
|
|
241
|
-
return /*#__PURE__*/
|
|
241
|
+
return /*#__PURE__*/_jsx(ThemeContext, {
|
|
242
242
|
value: ctxValue,
|
|
243
|
-
children: /*#__PURE__*/
|
|
243
|
+
children: /*#__PURE__*/_jsx(ThemeNestingContext, {
|
|
244
244
|
value: true,
|
|
245
|
-
children: /*#__PURE__*/
|
|
245
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
246
246
|
...stylex.props(wrapperStyles.base, colorSchemeStyle),
|
|
247
247
|
"data-astryx-theme": theme.name,
|
|
248
248
|
"data-theme": mode === 'system' ? undefined : mode,
|
|
249
249
|
children: children
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
250
|
+
})
|
|
251
|
+
})
|
|
252
|
+
});
|
|
253
253
|
}
|
|
254
254
|
Theme.displayName = 'Theme';
|
|
@@ -228,7 +228,7 @@ export interface DefineThemeInput {
|
|
|
228
228
|
/**
|
|
229
229
|
* Default syntax highlighting theme for code components.
|
|
230
230
|
* Sets --color-syntax-* tokens at the theme root. Can be overridden
|
|
231
|
-
* per-region
|
|
231
|
+
* per-region via SyntaxTheme or per-instance via syntaxTheme prop.
|
|
232
232
|
*
|
|
233
233
|
* @example
|
|
234
234
|
* ```tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineTheme.d.ts","sourceRoot":"","sources":["../../src/theme/defineTheme.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAC,gBAAgB,EAAa,MAAM,SAAS,CAAC;AAC1D,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,iBAAiB,CAA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AM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAE3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"expandColorScale.d.ts","sourceRoot":"","sources":["../../src/theme/expandColorScale.ts"],"names":[],"mappings":"AAuBA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAE3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AA0BtD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,gBAAgB,GACvB,gBAAgB,CAiFlB"}
|
|
@@ -56,9 +56,6 @@ const NEUTRAL_VARIANT_CHROMA = {
|
|
|
56
56
|
function ld(light, dark) {
|
|
57
57
|
return `light-dark(${light}, ${dark})`;
|
|
58
58
|
}
|
|
59
|
-
function accentWithAlpha(alpha) {
|
|
60
|
-
return `color-mix(in srgb, var(--color-accent) ${alpha * 100}%, transparent)`;
|
|
61
|
-
}
|
|
62
59
|
|
|
63
60
|
/**
|
|
64
61
|
* Expand a color scale config into Astryx color token overrides.
|
|
@@ -96,11 +93,7 @@ export function expandColorScale(config) {
|
|
|
96
93
|
return {
|
|
97
94
|
// Core semantic
|
|
98
95
|
'--color-accent': ld(P[40], P[80]),
|
|
99
|
-
|
|
100
|
-
// resolved hex, so a scoped override of the base token re-accents the
|
|
101
|
-
// whole subtree at runtime. --color-on-accent stays baked: it is a
|
|
102
|
-
// contrast computation against the accent, which CSS cannot express.
|
|
103
|
-
'--color-accent-muted': ld(accentWithAlpha(0.2), accentWithAlpha(0.25)),
|
|
96
|
+
'--color-accent-muted': ld(hexWithAlpha(P[40], 0.2), hexWithAlpha(P[80], 0.25)),
|
|
104
97
|
'--color-on-accent': ld(P[100], P[20]),
|
|
105
98
|
'--color-neutral': ld(hexWithAlpha(N[10], 0.1), hexWithAlpha(N[90], 0.2)),
|
|
106
99
|
'--color-background-surface': ld(N[99], N[10]),
|
|
@@ -113,9 +106,9 @@ export function expandColorScale(config) {
|
|
|
113
106
|
'--color-text-primary': ld(N[textPrimaryLightTone], N[textPrimaryDarkTone]),
|
|
114
107
|
'--color-text-secondary': ld(NV[textSecondaryLightTone], NV[textSecondaryDarkTone]),
|
|
115
108
|
'--color-text-disabled': ld(NV[60], NV[40]),
|
|
116
|
-
'--color-text-accent':
|
|
109
|
+
'--color-text-accent': ld(P[30], P[80]),
|
|
117
110
|
// Icon
|
|
118
|
-
'--color-icon-accent':
|
|
111
|
+
'--color-icon-accent': ld(P[40], P[80]),
|
|
119
112
|
'--color-icon-primary': ld(N[textPrimaryLightTone], N[textPrimaryDarkTone]),
|
|
120
113
|
'--color-icon-secondary': ld(NV[textSecondaryLightTone], NV[textSecondaryDarkTone]),
|
|
121
114
|
'--color-icon-disabled': ld(NV[60], NV[40]),
|
package/dist/theme/hct.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file hct.ts
|
|
3
|
+
* @input Hex color string (#RRGGBB)
|
|
4
|
+
* @output HCT color representation (Hue, Chroma, Tone)
|
|
5
|
+
* @position Theme utility; consumed by expandColorScale.ts
|
|
6
|
+
*
|
|
7
|
+
* Minimal HCT (Hue, Chroma, Tone) color space implementation.
|
|
8
|
+
* Ported from Google's material-color-utilities (Apache-2.0).
|
|
9
|
+
* Zero runtime dependencies — all math is self-contained.
|
|
10
|
+
*
|
|
11
|
+
* HCT combines:
|
|
12
|
+
* - Hue from CIELab (perceptually uniform hue)
|
|
13
|
+
* - Chroma approximated via CIELab C*ab (colorfulness)
|
|
14
|
+
* - Tone from L* (CIE Lightness, 0=black, 100=white)
|
|
15
|
+
*/
|
|
1
16
|
export interface HCT {
|
|
2
17
|
hue: number;
|
|
3
18
|
chroma: number;
|
package/dist/theme/hct.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hct.d.ts","sourceRoot":"","sources":["../../src/theme/hct.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hct.d.ts","sourceRoot":"","sources":["../../src/theme/hct.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAMH,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAoFD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AA4BD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAkBzC;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CA8BzC;AAkDD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxB;AAMD;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM/D"}
|
package/dist/theme/hct.js
CHANGED
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
* - Tone from L* (CIE Lightness, 0=black, 100=white)
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { parseHex, formatHex } from "../utils/color.js";
|
|
20
|
-
|
|
21
19
|
// =============================================================================
|
|
22
20
|
// Types
|
|
23
21
|
// =============================================================================
|
|
@@ -88,11 +86,13 @@ export function yToTone(y) {
|
|
|
88
86
|
// =============================================================================
|
|
89
87
|
|
|
90
88
|
function hexToRgb(hex) {
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
const h = hex.replace('#', '');
|
|
90
|
+
const full = h.length === 3 ? h[0] + h[0] + h[1] + h[1] + h[2] + h[2] : h.slice(0, 6);
|
|
91
|
+
const n = parseInt(full, 16);
|
|
92
|
+
return [n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff];
|
|
93
|
+
}
|
|
94
|
+
function rgbToHex(r, g, b) {
|
|
95
|
+
return '#' + [r, g, b].map(c => c.toString(16).padStart(2, '0')).join('').toUpperCase();
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
// =============================================================================
|
|
@@ -142,7 +142,7 @@ export function hctToHex(hct) {
|
|
|
142
142
|
}
|
|
143
143
|
if (chroma < 0.5) {
|
|
144
144
|
const gray = toneToGray(tone);
|
|
145
|
-
return
|
|
145
|
+
return rgbToHex(gray, gray, gray);
|
|
146
146
|
}
|
|
147
147
|
let lo = 0;
|
|
148
148
|
let hi = chroma;
|
|
@@ -183,7 +183,7 @@ function hctComponentToHex(hue, chroma, tone) {
|
|
|
183
183
|
if (r < 0 || r > 255 || g < 0 || g > 255 || bVal < 0 || bVal > 255) {
|
|
184
184
|
return null;
|
|
185
185
|
}
|
|
186
|
-
return
|
|
186
|
+
return rgbToHex(r, g, bVal);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// =============================================================================
|
|
@@ -19,7 +19,7 @@ import { useMediaQuery } from "../../hooks/useMediaQuery.js";
|
|
|
19
19
|
// =============================================================================
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
|
-
import {
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const SyntaxThemeContext = /*#__PURE__*/createContext(null);
|
|
24
24
|
SyntaxThemeContext.displayName = 'SyntaxThemeContext';
|
|
25
25
|
|
|
@@ -85,13 +85,13 @@ export function SyntaxTheme({
|
|
|
85
85
|
const value = useMemo(() => ({
|
|
86
86
|
theme
|
|
87
87
|
}), [theme]);
|
|
88
|
-
return /*#__PURE__*/
|
|
88
|
+
return /*#__PURE__*/_jsx(SyntaxThemeContext, {
|
|
89
89
|
value: value,
|
|
90
|
-
children: /*#__PURE__*/
|
|
90
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
91
91
|
style: style,
|
|
92
92
|
"data-astryx-syntax-theme": theme.name,
|
|
93
93
|
children: children
|
|
94
|
-
}
|
|
95
|
-
}
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
96
|
}
|
|
97
97
|
SyntaxTheme.displayName = 'SyntaxTheme';
|