@astryxdesign/core 0.1.8 → 0.1.9
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 +100 -0
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +6 -2
- package/dist/AppShell/AppShellMobileContext.d.ts +8 -0
- package/dist/AppShell/AppShellMobileContext.d.ts.map +1 -1
- package/dist/Avatar/Avatar.d.ts +18 -2
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +63 -7
- package/dist/Avatar/AvatarStatusDot.d.ts +33 -5
- package/dist/Avatar/AvatarStatusDot.d.ts.map +1 -1
- package/dist/Avatar/AvatarStatusDot.js +144 -19
- package/dist/Banner/Banner.d.ts +9 -1
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +31 -2
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +31 -2
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +208 -6
- package/dist/Breadcrumbs/index.d.ts +5 -0
- package/dist/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/Breadcrumbs/index.js +9 -1
- package/dist/Button/Button.d.ts +8 -2
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +31 -2
- package/dist/ButtonGroup/ButtonGroup.d.ts +9 -1
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +30 -1
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +30 -2
- package/dist/Calendar/dayCellUtils.js +1 -1
- package/dist/Card/Card.d.ts +8 -2
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +28 -2
- package/dist/Carousel/Carousel.d.ts +4 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +24 -4
- package/dist/Chat/ChatComposer.d.ts +8 -0
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +46 -7
- package/dist/Chat/ChatComposerDrawer.d.ts +2 -0
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +11 -1
- package/dist/Chat/ChatComposerInput.d.ts +20 -3
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +35 -3
- package/dist/Chat/ChatContext.d.ts +33 -0
- package/dist/Chat/ChatContext.d.ts.map +1 -1
- package/dist/Chat/ChatContext.js +16 -2
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +1 -1
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +4 -4
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +7 -1
- package/dist/Chat/ChatToolCalls.d.ts +5 -1
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +18 -9
- package/dist/Chat/index.d.ts +2 -1
- package/dist/Chat/index.d.ts.map +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/Chat/useChatStreamScroll.d.ts +2 -1
- package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.js +22 -8
- package/dist/Chat/useSpeechRecognition.d.ts +0 -1
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +1 -1
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +1 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts +20 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +11 -1
- package/dist/ClickableCard/ClickableCard.d.ts +9 -2
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +5 -2
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +8 -1
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +3 -1
- package/dist/CommandPalette/CommandPaletteGroup.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteGroup.js +9 -2
- package/dist/CommandPalette/CommandPaletteInput.d.ts +7 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +6 -1
- package/dist/DateInput/DateInput.d.ts +47 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +26 -2
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +10 -1
- package/dist/Dialog/Dialog.d.ts +3 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +57 -6
- package/dist/Dialog/DialogContext.d.ts +7 -0
- package/dist/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/Dialog/DialogContext.js +2 -2
- package/dist/Dialog/DialogHeader.d.ts +5 -2
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +6 -1
- package/dist/Divider/Divider.js +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -2
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +1 -2
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +1 -2
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioGroup.js +1 -2
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +2 -3
- package/dist/Field/FieldLabel.d.ts +1 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +42 -15
- package/dist/FieldStatus/FieldStatus.d.ts +8 -0
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +22 -4
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +10 -2
- package/dist/HoverCard/HoverCard.d.ts +9 -1
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +2 -0
- package/dist/HoverCard/useHoverCard.d.ts +8 -0
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +7 -2
- package/dist/Icon/Icon.d.ts +7 -2
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Item/Item.d.ts +6 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +22 -1
- package/dist/Layer/useLayer.d.ts +6 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +2 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +6 -1
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +4 -0
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +39 -12
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +16 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/Outline/Outline.d.ts +0 -1
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +0 -1
- package/dist/OverflowList/OverflowList.d.ts +20 -3
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +29 -4
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +3 -2
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +3 -9
- package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
- package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.d.ts +9 -2
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +16 -13
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +4 -2
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +16 -0
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +21 -8
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +19 -2
- package/dist/Stack/stack.stylex.d.ts +9 -9
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +3 -2
- package/dist/Table/index.d.ts +2 -0
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +1 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/rowStatus/index.d.ts +3 -0
- package/dist/Table/plugins/rowStatus/index.d.ts.map +1 -0
- package/dist/Table/plugins/rowStatus/index.js +3 -0
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +60 -0
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -0
- package/dist/Table/plugins/rowStatus/useTableRowStatus.js +145 -0
- package/dist/Table/plugins/selection/useTableSelection.d.ts +13 -0
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +4 -1
- package/dist/Table/plugins/tree/useTableTreeData.d.ts +16 -0
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +87 -0
- package/dist/Table/plugins/tree/useTableTreeState.d.ts +6 -0
- package/dist/Table/plugins/tree/useTableTreeState.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeState.js +22 -1
- package/dist/Table/useBaseTablePlugins.d.ts.map +1 -1
- package/dist/Table/useBaseTablePlugins.js +5 -3
- package/dist/Thumbnail/Thumbnail.d.ts +26 -5
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +97 -54
- package/dist/Thumbnail/thumbnail.markers.stylex.d.ts +9 -0
- package/dist/Thumbnail/thumbnail.markers.stylex.d.ts.map +1 -0
- package/dist/Thumbnail/thumbnail.markers.stylex.js +14 -0
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +15 -4
- package/dist/Timestamp/Timestamp.d.ts +3 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +8 -6
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +2 -5
- package/dist/ToggleButton/ToggleButtonGroup.d.ts +0 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.js +1 -1
- package/dist/Tokenizer/Tokenizer.d.ts +1 -1
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +16 -4
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +18 -8
- package/dist/TopNav/TopNavMegaMenu.js +10 -4
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts +9 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +8 -1
- package/dist/TopNav/TopNavMenu.d.ts +2 -1
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +68 -6
- package/dist/TreeList/TreeList.d.ts +12 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +2 -0
- package/dist/TreeList/TreeListBranches.d.ts +5 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +10 -4
- package/dist/TreeList/TreeListItem.d.ts +8 -2
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +27 -7
- package/dist/TreeList/TreeListTypes.d.ts +25 -1
- package/dist/TreeList/TreeListTypes.d.ts.map +1 -1
- package/dist/TreeList/index.d.ts +2 -2
- package/dist/TreeList/index.d.ts.map +1 -1
- package/dist/astryx.css +28 -18
- package/dist/astryx.umd.js +51 -51
- package/dist/astryx.umd.js.map +4 -4
- package/dist/authoring/doc.d.ts.map +1 -1
- package/dist/docs-types.d.ts +8 -0
- package/dist/docs-types.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.d.ts +47 -0
- package/dist/hooks/computeOverflow.d.ts.map +1 -0
- package/dist/hooks/computeOverflow.js +213 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/useDevWarning.d.ts +18 -0
- package/dist/hooks/useDevWarning.d.ts.map +1 -0
- package/dist/hooks/useDevWarning.js +49 -0
- package/dist/hooks/useOverflow.d.ts +19 -0
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +36 -25
- package/dist/i18n/resolve.d.ts.map +1 -1
- package/dist/i18n/resolve.js +7 -18
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +2 -7
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +51 -0
- package/dist/theme/hct.d.ts +0 -1
- package/dist/theme/hct.d.ts.map +1 -1
- package/dist/theme/hct.js +1 -1
- package/dist/theme/syntax/defineSyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/defineSyntaxTheme.js +2 -1
- package/dist/utils/devWarning.d.ts +42 -0
- package/dist/utils/devWarning.d.ts.map +1 -0
- package/dist/utils/devWarning.js +88 -0
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -2
- package/dist/utils/plainDate.d.ts +30 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +53 -0
- package/dist/utils/types.d.ts +13 -0
- package/dist/utils/types.d.ts.map +1 -1
- package/locales/en.json +24 -0
- package/locales/fr-FR.json +14 -0
- package/locales/pseudo.json +18 -0
- package/package.json +1 -1
- package/src/AppShell/AppShell.tsx +6 -0
- package/src/AppShell/AppShellMobileContext.tsx +8 -0
- package/src/AppShell/useAppShellMobile.doc.mjs +8 -0
- package/src/Avatar/Avatar.doc.mjs +15 -3
- package/src/Avatar/Avatar.test.tsx +156 -1
- package/src/Avatar/Avatar.tsx +96 -4
- package/src/Avatar/AvatarStatusDot.doc.mjs +23 -12
- package/src/Avatar/AvatarStatusDot.test.tsx +284 -0
- package/src/Avatar/AvatarStatusDot.tsx +178 -21
- package/src/Banner/Banner.doc.mjs +9 -0
- package/src/Banner/Banner.test.tsx +30 -0
- package/src/Banner/Banner.tsx +47 -3
- package/src/Breadcrumbs/BreadcrumbItem.doc.mjs +26 -0
- package/src/Breadcrumbs/BreadcrumbItem.tsx +333 -14
- package/src/Breadcrumbs/Breadcrumbs.doc.mjs +2 -0
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +284 -2
- package/src/Breadcrumbs/index.ts +27 -0
- package/src/Button/Button.doc.mjs +9 -0
- package/src/Button/Button.test.tsx +49 -0
- package/src/Button/Button.tsx +25 -1
- package/src/ButtonGroup/ButtonGroup.doc.mjs +3 -0
- package/src/ButtonGroup/ButtonGroup.test.tsx +37 -0
- package/src/ButtonGroup/ButtonGroup.tsx +32 -0
- package/src/Calendar/Calendar.doc.mjs +12 -1
- package/src/Calendar/Calendar.test.tsx +193 -0
- package/src/Calendar/Calendar.tsx +38 -16
- package/src/Calendar/dayCellUtils.test.ts +5 -0
- package/src/Calendar/dayCellUtils.ts +1 -1
- package/src/Card/Card.doc.mjs +9 -0
- package/src/Card/Card.test.tsx +21 -3
- package/src/Card/Card.tsx +35 -2
- package/src/Carousel/Carousel.doc.mjs +1 -0
- package/src/Carousel/Carousel.test.tsx +53 -0
- package/src/Carousel/Carousel.tsx +34 -4
- package/src/Chat/ChatComposer.doc.mjs +12 -3
- package/src/Chat/ChatComposer.test.tsx +115 -0
- package/src/Chat/ChatComposer.tsx +73 -9
- package/src/Chat/ChatComposerDrawer.test.tsx +61 -0
- package/src/Chat/ChatComposerDrawer.tsx +11 -1
- package/src/Chat/ChatComposerInput.doc.mjs +7 -0
- package/src/Chat/ChatComposerInput.test.tsx +103 -0
- package/src/Chat/ChatComposerInput.tsx +49 -3
- package/src/Chat/ChatContext.tsx +37 -10
- package/src/Chat/ChatDictationButton.tsx +4 -1
- package/src/Chat/ChatLayout.tsx +3 -1
- package/src/Chat/ChatLayoutScrollButton.tsx +7 -2
- package/src/Chat/ChatMessageMetadata.tsx +1 -2
- package/src/Chat/ChatSendButton.tsx +11 -1
- package/src/Chat/ChatToolCalls.test.tsx +64 -0
- package/src/Chat/ChatToolCalls.tsx +25 -4
- package/src/Chat/index.ts +5 -1
- package/src/Chat/useChatStreamScroll.test.tsx +49 -0
- package/src/Chat/useChatStreamScroll.ts +27 -10
- package/src/Chat/useSpeechRecognition.ts +1 -1
- package/src/Chat/useTriggerMenu.tsx +3 -1
- package/src/CheckboxInput/CheckboxInput.test.tsx +32 -1
- package/src/CheckboxInput/CheckboxInput.tsx +1 -1
- package/src/CheckboxList/CheckboxList.test.tsx +81 -3
- package/src/CheckboxList/CheckboxListItem.doc.mjs +33 -5
- package/src/CheckboxList/CheckboxListItem.tsx +41 -5
- package/src/ClickableCard/ClickableCard.doc.mjs +2 -0
- package/src/ClickableCard/ClickableCard.test.tsx +34 -0
- package/src/ClickableCard/ClickableCard.tsx +13 -3
- package/src/CodeBlock/CodeBlock.test.tsx +56 -0
- package/src/CodeBlock/CodeBlock.tsx +9 -1
- package/src/CommandPalette/CommandPalette.doc.mjs +1 -0
- package/src/CommandPalette/CommandPalette.tsx +3 -1
- package/src/CommandPalette/CommandPaletteGroup.test.tsx +71 -0
- package/src/CommandPalette/CommandPaletteGroup.tsx +12 -1
- package/src/CommandPalette/CommandPaletteInput.doc.mjs +26 -9
- package/src/CommandPalette/CommandPaletteInput.test.tsx +34 -0
- package/src/CommandPalette/CommandPaletteInput.tsx +11 -0
- package/src/ContextMenu/ContextMenu.test.tsx +193 -0
- package/src/DateInput/DateInput.doc.mjs +16 -0
- package/src/DateInput/DateInput.test.tsx +108 -0
- package/src/DateInput/DateInput.tsx +68 -3
- package/src/DateInput/index.ts +1 -0
- package/src/DateTimeInput/DateTimeInput.test.tsx +35 -0
- package/src/DateTimeInput/DateTimeInput.tsx +14 -2
- package/src/Dialog/Dialog.doc.mjs +2 -2
- package/src/Dialog/Dialog.test.tsx +77 -4
- package/src/Dialog/Dialog.tsx +89 -5
- package/src/Dialog/DialogContext.ts +9 -2
- package/src/Dialog/DialogHeader.doc.mjs +2 -2
- package/src/Dialog/DialogHeader.tsx +9 -2
- package/src/Divider/Divider.tsx +2 -2
- package/src/DropdownMenu/DropdownMenu.test.tsx +169 -0
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +1 -2
- package/src/DropdownMenu/DropdownMenuRadioGroup.tsx +1 -2
- package/src/Field/Field.test.tsx +57 -12
- package/src/Field/Field.tsx +6 -5
- package/src/Field/FieldLabel.tsx +8 -0
- package/src/FieldStatus/FieldStatus.doc.mjs +17 -5
- package/src/FieldStatus/FieldStatus.test.tsx +78 -40
- package/src/FieldStatus/FieldStatus.tsx +22 -4
- package/src/FileInput/FileInput.test.tsx +52 -3
- package/src/FileInput/FileInput.tsx +13 -2
- package/src/HoverCard/HoverCard.doc.mjs +13 -0
- package/src/HoverCard/HoverCard.test.tsx +21 -2
- package/src/HoverCard/HoverCard.tsx +11 -0
- package/src/HoverCard/useHoverCard.doc.mjs +2 -0
- package/src/HoverCard/useHoverCard.tsx +24 -2
- package/src/Icon/Icon.doc.mjs +3 -2
- package/src/Icon/Icon.tsx +7 -2
- package/src/IconButton/IconButton.doc.mjs +8 -0
- package/src/IconButton/IconButton.test.tsx +15 -18
- package/src/Item/Item.test.tsx +40 -18
- package/src/Item/Item.tsx +38 -2
- package/src/Layer/useLayer.tsx +8 -0
- package/src/List/List.test.tsx +9 -8
- package/src/MobileNav/MobileNav.tsx +12 -1
- package/src/MobileNav/MobileNavToggle.test.tsx +116 -0
- package/src/MobileNav/MobileNavToggle.tsx +9 -1
- package/src/MultiSelector/MultiSelector.doc.mjs +4 -2
- package/src/MultiSelector/MultiSelector.test.tsx +172 -3
- package/src/MultiSelector/MultiSelector.tsx +55 -12
- package/src/MultiSelector/hooks.ts +17 -0
- package/src/NumberInput/NumberInput.test.tsx +11 -7
- package/src/NumberInput/NumberInput.tsx +1 -2
- package/src/Outline/Outline.tsx +0 -1
- package/src/OverflowList/OverflowList.doc.mjs +39 -6
- package/src/OverflowList/OverflowList.test.tsx +111 -0
- package/src/OverflowList/OverflowList.tsx +48 -8
- package/src/Popover/Popover.tsx +7 -4
- package/src/Popover/usePopover.tsx +9 -13
- package/src/PowerSearch/PowerSearch.doc.mjs +14 -0
- package/src/PowerSearch/PowerSearch.test.tsx +20 -0
- package/src/PowerSearch/PowerSearchEditPopover.test.tsx +67 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -1
- package/src/PowerSearch/usePowerSearchSource.ts +1 -2
- package/src/SelectableCard/SelectableCard.doc.mjs +2 -0
- package/src/SelectableCard/SelectableCard.test.tsx +46 -4
- package/src/SelectableCard/SelectableCard.tsx +29 -16
- package/src/Selector/Selector.test.tsx +69 -0
- package/src/Selector/Selector.tsx +5 -1
- package/src/Selector/hooks.ts +17 -0
- package/src/SideNav/SideNav.test.tsx +119 -3
- package/src/SideNav/SideNavCollapseButton.tsx +6 -1
- package/src/SideNav/SideNavHeading.tsx +24 -8
- package/src/SideNav/SideNavItem.tsx +5 -1
- package/src/Slider/Slider.test.tsx +75 -2
- package/src/Slider/Slider.tsx +21 -5
- package/src/Switch/Switch.test.tsx +32 -1
- package/src/Table/BaseTable.tsx +3 -5
- package/src/Table/index.ts +5 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +6 -2
- package/src/Table/plugins/rowStatus/index.ts +7 -0
- package/src/Table/plugins/rowStatus/useTableRowStatus.test.tsx +138 -0
- package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +189 -0
- package/src/Table/plugins/selection/useTableSelection.test.tsx +16 -0
- package/src/Table/plugins/selection/useTableSelection.tsx +19 -1
- package/src/Table/plugins/tree/useTableTreeData.test.tsx +135 -3
- package/src/Table/plugins/tree/useTableTreeData.tsx +128 -1
- package/src/Table/plugins/tree/useTableTreeState.test.tsx +104 -0
- package/src/Table/plugins/tree/useTableTreeState.tsx +46 -2
- package/src/Table/useBaseTablePlugins.ts +10 -6
- package/src/Table/useTableRowStatus.doc.mjs +30 -0
- package/src/Table/useTableSelection.doc.mjs +65 -14
- package/src/Table/useTableTreeData.doc.mjs +29 -0
- package/src/Table/useTableTreeState.doc.mjs +2 -2
- package/src/TextArea/TextArea.test.tsx +9 -1
- package/src/Thumbnail/Thumbnail.doc.mjs +19 -10
- package/src/Thumbnail/Thumbnail.test.tsx +98 -7
- package/src/Thumbnail/Thumbnail.tsx +141 -41
- package/src/Thumbnail/thumbnail.markers.stylex.ts +12 -0
- package/src/TimeInput/TimeInput.test.tsx +76 -1
- package/src/TimeInput/TimeInput.tsx +19 -6
- package/src/Timestamp/Timestamp.doc.mjs +4 -4
- package/src/Timestamp/Timestamp.test.tsx +32 -0
- package/src/Timestamp/Timestamp.tsx +28 -8
- package/src/Toast/useToast.tsx +7 -8
- package/src/ToggleButton/ToggleButtonGroup.tsx +1 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +15 -1
- package/src/Tokenizer/Tokenizer.test.tsx +183 -2
- package/src/Tokenizer/Tokenizer.tsx +16 -4
- package/src/TopNav/TopNav.test.tsx +125 -1
- package/src/TopNav/TopNavHeading.tsx +24 -8
- package/src/TopNav/TopNavMegaMenu.test.tsx +149 -1
- package/src/TopNav/TopNavMegaMenu.tsx +10 -4
- package/src/TopNav/TopNavMegaMenuFeaturedCard.doc.mjs +3 -3
- package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +19 -2
- package/src/TopNav/TopNavMenu.test.tsx +118 -4
- package/src/TopNav/TopNavMenu.tsx +83 -5
- package/src/TreeList/TreeList.doc.mjs +22 -0
- package/src/TreeList/TreeList.test.tsx +232 -0
- package/src/TreeList/TreeList.tsx +18 -2
- package/src/TreeList/TreeListBranches.tsx +16 -2
- package/src/TreeList/TreeListItem.tsx +51 -11
- package/src/TreeList/TreeListTypes.ts +27 -1
- package/src/TreeList/index.ts +2 -2
- package/src/authoring/doc.ts +1 -3
- package/src/docs-types.ts +5 -0
- package/src/hooks/computeOverflow.test.ts +422 -0
- package/src/hooks/computeOverflow.ts +290 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useDevWarning.test.tsx +45 -0
- package/src/hooks/useDevWarning.ts +54 -0
- package/src/hooks/useOverflow.test.ts +96 -4
- package/src/hooks/useOverflow.ts +74 -33
- package/src/i18n/InternationalizationProvider.doc.mjs +99 -2
- package/src/i18n/resolve.ts +9 -21
- package/src/theme/Theme.tsx +11 -14
- package/src/theme/generateThemeRules.test.ts +65 -0
- package/src/theme/generateThemeRules.ts +56 -0
- package/src/theme/hct.ts +1 -1
- package/src/theme/syntax/defineSyntaxTheme.ts +5 -6
- package/src/utils/devWarning.test.ts +56 -0
- package/src/utils/devWarning.ts +102 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/plainDate.test.ts +22 -0
- package/src/utils/plainDate.ts +61 -0
- package/src/utils/types.ts +14 -0
package/dist/Card/Card.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import * as stylex from '@stylexjs/stylex';
|
|
18
18
|
import "../theme/tokens.stylex.js";
|
|
19
|
-
import { borderVars, colorVars, radiusVars } from "../theme/tokens.stylex.js";
|
|
19
|
+
import { borderVars, colorVars, radiusVars, shadowVars } from "../theme/tokens.stylex.js";
|
|
20
20
|
import { container } from "../Layout/container.stylex.js";
|
|
21
21
|
import { paddingStyles, containerPaddingInlineVarStyles, containerPaddingBlockStartVarStyles, containerPaddingBlockEndVarStyles, spacingStepToToken } from "../Layout/padding.stylex.js";
|
|
22
22
|
import { mergeProps } from "../utils/index.js";
|
|
@@ -49,6 +49,7 @@ const styles = {
|
|
|
49
49
|
"--_card-radius": "x2kkz0m",
|
|
50
50
|
kaIpWk: "x153u1i6",
|
|
51
51
|
kVQacm: "x7giv3",
|
|
52
|
+
kGVxlE: "x1p8z4y0",
|
|
52
53
|
$$css: true
|
|
53
54
|
},
|
|
54
55
|
withBorder: {
|
|
@@ -123,6 +124,30 @@ const variantStyles = {
|
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
126
|
|
|
127
|
+
// Elevation → shadow-token map. Sets the private --_card-elevation variable
|
|
128
|
+
// (not box-shadow directly) so it composes with --_card-ring in the shadow
|
|
129
|
+
// list above — a selection ring and a resting elevation coexist without one
|
|
130
|
+
// overwriting the other. 'none' is a transparent no-op (not the CSS literal
|
|
131
|
+
// `none`, which would be invalid inside the comma-separated shadow list).
|
|
132
|
+
const elevationStyles = {
|
|
133
|
+
none: {
|
|
134
|
+
"--_card-elevation": "xw28qpl",
|
|
135
|
+
$$css: true
|
|
136
|
+
},
|
|
137
|
+
low: {
|
|
138
|
+
"--_card-elevation": "x1nn8khe",
|
|
139
|
+
$$css: true
|
|
140
|
+
},
|
|
141
|
+
med: {
|
|
142
|
+
"--_card-elevation": "x1ovzxg0",
|
|
143
|
+
$$css: true
|
|
144
|
+
},
|
|
145
|
+
high: {
|
|
146
|
+
"--_card-elevation": "xnpe7fx",
|
|
147
|
+
$$css: true
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
126
151
|
// Dynamic styles for sizing props
|
|
127
152
|
const dynamicStyles = {
|
|
128
153
|
sizing: (width, height, maxWidth, minHeight) => [{
|
|
@@ -180,6 +205,7 @@ export function Card({
|
|
|
180
205
|
children,
|
|
181
206
|
padding,
|
|
182
207
|
variant = 'default',
|
|
208
|
+
elevation = 'none',
|
|
183
209
|
xstyle,
|
|
184
210
|
className,
|
|
185
211
|
style,
|
|
@@ -197,7 +223,7 @@ export function Card({
|
|
|
197
223
|
ref: ref,
|
|
198
224
|
...mergeProps(themeProps('card', {
|
|
199
225
|
variant
|
|
200
|
-
}), stylex.props(styles.card, variantStyles[variant], hasFixedHeight && styles.scrollable, dynamicStyles.sizing(width ?? null, height ?? null, maxWidth ?? null, minHeight ?? null), ...container(useThemeDefault ? {
|
|
226
|
+
}), stylex.props(styles.card, variantStyles[variant], elevationStyles[elevation], hasFixedHeight && styles.scrollable, dynamicStyles.sizing(width ?? null, height ?? null, maxWidth ?? null, minHeight ?? null), ...container(useThemeDefault ? {
|
|
201
227
|
useThemeDefault: 'card'
|
|
202
228
|
} : {
|
|
203
229
|
paddingInnerX: paddingToken,
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* @position Horizontal scroll container with fade-edge overflow indication,
|
|
6
6
|
* optional prev/next buttons on the top layer, scroll-snap, a 1px
|
|
7
7
|
* visual bleed allowance for child selection indicators, and Shift + wheel
|
|
8
|
-
* mapping so mouse users can scroll horizontally.
|
|
8
|
+
* mapping so mouse users can scroll horizontally. Exposes APG
|
|
9
|
+
* carousel semantics: the root is a labelled region with
|
|
10
|
+
* aria-roledescription="carousel" and each item wrapper is a group with
|
|
11
|
+
* aria-roledescription="slide" named "Slide N of M".
|
|
9
12
|
*
|
|
10
13
|
* SYNC: When modified, update:
|
|
11
14
|
* - /packages/core/src/Carousel/index.ts (exports)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAyJD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,QAAQ,EACR,GAAO,EACP,UAAiB,EACjB,WAAkB,EAClB,OAAe,EACf,OAAO,EACP,YAAY,EAAE,kBAAkB,EAChC,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EACb,EAAE,aAAa,+BAiMf;yBA/Me,QAAQ"}
|
|
@@ -9,14 +9,17 @@
|
|
|
9
9
|
* @position Horizontal scroll container with fade-edge overflow indication,
|
|
10
10
|
* optional prev/next buttons on the top layer, scroll-snap, a 1px
|
|
11
11
|
* visual bleed allowance for child selection indicators, and Shift + wheel
|
|
12
|
-
* mapping so mouse users can scroll horizontally.
|
|
12
|
+
* mapping so mouse users can scroll horizontally. Exposes APG
|
|
13
|
+
* carousel semantics: the root is a labelled region with
|
|
14
|
+
* aria-roledescription="carousel" and each item wrapper is a group with
|
|
15
|
+
* aria-roledescription="slide" named "Slide N of M".
|
|
13
16
|
*
|
|
14
17
|
* SYNC: When modified, update:
|
|
15
18
|
* - /packages/core/src/Carousel/index.ts (exports)
|
|
16
19
|
* - /apps/storybook/stories/Carousel.stories.tsx
|
|
17
20
|
* - /packages/cli/templates/blocks/components/Carousel/ (showcase blocks)
|
|
18
21
|
*/
|
|
19
|
-
import { useRef, useCallback, useEffect, Children } from 'react';
|
|
22
|
+
import { useRef, useCallback, useEffect, Children, isValidElement } from 'react';
|
|
20
23
|
import * as stylex from '@stylexjs/stylex';
|
|
21
24
|
import "../theme/tokens.stylex.js";
|
|
22
25
|
import { spacingVars, colorVars, shadowVars, radiusVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
@@ -220,6 +223,11 @@ export function Carousel({
|
|
|
220
223
|
overflowStart,
|
|
221
224
|
overflowEnd
|
|
222
225
|
} = useScrollOverflow();
|
|
226
|
+
|
|
227
|
+
// Children.toArray drops null/undefined/boolean children and assigns
|
|
228
|
+
// stable keys, so slide numbering ("Slide N of M") matches what actually
|
|
229
|
+
// renders even when some children are conditionally omitted.
|
|
230
|
+
const slides = Children.toArray(children);
|
|
223
231
|
const layer = useLayer({
|
|
224
232
|
mode: 'context',
|
|
225
233
|
lightDismiss: false
|
|
@@ -302,12 +310,24 @@ export function Carousel({
|
|
|
302
310
|
tabIndex: 0,
|
|
303
311
|
onWheel: handleWheel,
|
|
304
312
|
...stylex.props(styles.scroller, gapStyles[gap], padding != null && paddingStyles[padding], hasSnap && styles.snap, fadeStyle),
|
|
305
|
-
children:
|
|
313
|
+
children: slides.map((child, index) =>
|
|
314
|
+
/*#__PURE__*/
|
|
315
|
+
// APG carousel pattern: each slide container is a group with
|
|
316
|
+
// aria-roledescription="slide" and an "N of M" accessible name so
|
|
317
|
+
// ATs announce slide boundaries and position instead of anonymous
|
|
318
|
+
// generics.
|
|
319
|
+
_jsx("div", {
|
|
320
|
+
role: "group",
|
|
321
|
+
"aria-roledescription": "slide",
|
|
322
|
+
"aria-label": t('@astryx.carousel.slideLabel', {
|
|
323
|
+
current: index + 1,
|
|
324
|
+
total: slides.length
|
|
325
|
+
}),
|
|
306
326
|
...{
|
|
307
327
|
className: "x1bhewko x78zum5 x2lah0s"
|
|
308
328
|
},
|
|
309
329
|
children: child
|
|
310
|
-
}))
|
|
330
|
+
}, /*#__PURE__*/isValidElement(child) ? child.key : index))
|
|
311
331
|
}), hasButtons && layer.render(/*#__PURE__*/_jsxs(_Fragment, {
|
|
312
332
|
children: [/*#__PURE__*/_jsx("div", {
|
|
313
333
|
...{
|
|
@@ -43,6 +43,14 @@ export interface ChatComposerProps extends Omit<BaseProps<HTMLDivElement>, 'onCh
|
|
|
43
43
|
isDisabled?: boolean;
|
|
44
44
|
/** Density variant */
|
|
45
45
|
density?: ChatComposerDensity;
|
|
46
|
+
/**
|
|
47
|
+
* Resting elevation of the composer body. `low` (the default) keeps today's
|
|
48
|
+
* raised look — low at rest, bumping to med on hover / focus. `none` flattens
|
|
49
|
+
* it and draws a border with the same rest / hover / focus treatment as a
|
|
50
|
+
* text input (emphasized border → accent on focus, with matching inset rings).
|
|
51
|
+
* @default 'low'
|
|
52
|
+
*/
|
|
53
|
+
elevation?: 'none' | 'low';
|
|
46
54
|
/** Collapsible drawer rendered above the input — attachments, context chips, etc. Use ChatComposerDrawer. */
|
|
47
55
|
drawer?: ReactNode;
|
|
48
56
|
/** Actions rendered on the left side of the header (e.g. attach, mention buttons). Use icon-only `size="sm"` buttons. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA0B5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,GAAG,UAAU,CACxB;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAI3B,6GAA6G;IAC7G,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,yHAAyH;IACzH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,yGAAyG;IACzG,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,gHAAgH;IAChH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,gHAAgH;IAChH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iEAAiE;IACjE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,oDAAoD;IACpD,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CACnC;AA8LD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAiLpD;yBAjLe,YAAY"}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import React, { useState, useCallback, useRef, useMemo } from 'react';
|
|
26
26
|
import * as stylex from '@stylexjs/stylex';
|
|
27
27
|
import "../theme/tokens.stylex.js";
|
|
28
|
-
import { colorVars, spacingVars, radiusVars, shadowVars, durationVars, easeVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
|
|
28
|
+
import { colorVars, spacingVars, radiusVars, shadowVars, durationVars, easeVars, borderVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
|
|
29
29
|
import { mergeProps } from "../utils/index.js";
|
|
30
30
|
import { Icon } from "../Icon/index.js";
|
|
31
31
|
import { ChatComposerInput } from "./ChatComposerInput.js";
|
|
@@ -53,18 +53,42 @@ const styles = {
|
|
|
53
53
|
kaIpWk: "x1xunbrq",
|
|
54
54
|
kWkggS: "x1prclbq",
|
|
55
55
|
kkrTdU: "x1ed109x",
|
|
56
|
-
|
|
57
|
-
kmkexE: "xiw5bxp",
|
|
58
|
-
knuKkz: "xyavpck",
|
|
56
|
+
kmkexE: "xrg7dcy",
|
|
59
57
|
$$css: true
|
|
60
58
|
},
|
|
61
59
|
compact: {
|
|
62
|
-
|
|
60
|
+
"--_chat-composer-padding": "x18zce08",
|
|
63
61
|
kOIVth: "xzye2dw",
|
|
64
62
|
$$css: true
|
|
65
63
|
}
|
|
66
64
|
};
|
|
67
65
|
|
|
66
|
+
// Resting elevation for the composer body, narrowed to two steps.
|
|
67
|
+
// - `low` (default) preserves today's look: low at rest, bumping to med on
|
|
68
|
+
// hover / focus-within (a CSS-only interaction state the component owns).
|
|
69
|
+
// - `none` is flat; depth comes from a border + inset rings instead. The
|
|
70
|
+
// border is drawn *inside* the padding — its width is subtracted from every
|
|
71
|
+
// side (like Card) so total inset (border + padding) equals the elevated
|
|
72
|
+
// case and content geometry is unchanged. Border color, hover, and focus
|
|
73
|
+
// states mirror TextInput (shared `inputWrapperStyles.base` treatment):
|
|
74
|
+
// emphasized border at rest → accent on focus-within, with the same inset
|
|
75
|
+
// shadow rings on hover and focus.
|
|
76
|
+
const elevationStyles = {
|
|
77
|
+
low: {
|
|
78
|
+
kGVxlE: "x1i5ehqx xhouywz",
|
|
79
|
+
knuKkz: "xyavpck",
|
|
80
|
+
$$css: true
|
|
81
|
+
},
|
|
82
|
+
none: {
|
|
83
|
+
kMzoRj: "x1litavf",
|
|
84
|
+
ksu8eU: "x1y0btm7",
|
|
85
|
+
kVAM5u: "xvy26l8 x6q1khz",
|
|
86
|
+
kmVPX3: "x1b50gpf",
|
|
87
|
+
kGVxlE: "x1gnnqk1 x12y27fx xuihb5h",
|
|
88
|
+
$$css: true
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
68
92
|
// =============================================================================
|
|
69
93
|
// Component
|
|
70
94
|
// =============================================================================
|
|
@@ -93,6 +117,7 @@ export function ChatComposer(props) {
|
|
|
93
117
|
placeholder: placeholderFromProps,
|
|
94
118
|
isDisabled = false,
|
|
95
119
|
density = 'balanced',
|
|
120
|
+
elevation = 'low',
|
|
96
121
|
drawer,
|
|
97
122
|
headerActions,
|
|
98
123
|
headerContext,
|
|
@@ -127,6 +152,11 @@ export function ChatComposer(props) {
|
|
|
127
152
|
}, [currentValue, isDisabled, onSubmit, updateValue]);
|
|
128
153
|
const canSend = currentValue.trim().length > 0 && !isDisabled;
|
|
129
154
|
const bodyRef = useRef(null);
|
|
155
|
+
|
|
156
|
+
// Input slot registers its focus (and future) control here so the shell can
|
|
157
|
+
// drive it without knowing its DOM shape. Stable ref — safe in the memoized
|
|
158
|
+
// context value.
|
|
159
|
+
const inputControlRef = useRef(null);
|
|
130
160
|
const handleBodyClick = useCallback(e => {
|
|
131
161
|
// Focus the input when clicking empty space in the body.
|
|
132
162
|
// Skip if the click target is a button, link, or interactive element.
|
|
@@ -134,6 +164,14 @@ export function ChatComposer(props) {
|
|
|
134
164
|
if (target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]')) {
|
|
135
165
|
return;
|
|
136
166
|
}
|
|
167
|
+
// Prefer the input's registered control (works for any input shape,
|
|
168
|
+
// including editors whose focusable node isn't a bare
|
|
169
|
+
// contenteditable/textarea). Fall back to a DOM query so uninstrumented
|
|
170
|
+
// custom inputs still get click-to-focus.
|
|
171
|
+
if (inputControlRef.current) {
|
|
172
|
+
inputControlRef.current.focus();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
137
175
|
const editable = bodyRef.current?.querySelector('[contenteditable="true"], textarea');
|
|
138
176
|
editable?.focus();
|
|
139
177
|
}, []);
|
|
@@ -179,7 +217,8 @@ export function ChatComposer(props) {
|
|
|
179
217
|
isDisabled,
|
|
180
218
|
isStopShown,
|
|
181
219
|
canSend,
|
|
182
|
-
onStop
|
|
220
|
+
onStop,
|
|
221
|
+
inputControlRef
|
|
183
222
|
}), [currentValue, updateValue, handleSubmit, placeholder, isDisabled, isStopShown, canSend, onStop]);
|
|
184
223
|
return /*#__PURE__*/_jsx(ChatComposerContext, {
|
|
185
224
|
value: composerContext,
|
|
@@ -199,7 +238,7 @@ export function ChatComposer(props) {
|
|
|
199
238
|
children: [statusPosition === 'top' && statusEl, drawer, /*#__PURE__*/_jsxs("div", {
|
|
200
239
|
ref: bodyRef,
|
|
201
240
|
onClick: handleBodyClick,
|
|
202
|
-
...stylex.props(styles.body, density === 'compact' && styles.compact, xstyle),
|
|
241
|
+
...stylex.props(styles.body, elevationStyles[elevation], density === 'compact' && styles.compact, xstyle),
|
|
203
242
|
children: [(headerActions || headerContext) && /*#__PURE__*/_jsxs("div", {
|
|
204
243
|
...{
|
|
205
244
|
className: "x78zum5 x6s0dn4 x1qughib x1txdalj xe0p6wg"
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* @position Collapsible drawer panel for ChatComposer.
|
|
6
6
|
* Supports expanded (full content) and collapsed (count + label) states
|
|
7
7
|
* with fade animation and grid-template-rows height transition.
|
|
8
|
+
* The collapse toggle exposes aria-expanded + aria-controls linking it to
|
|
9
|
+
* the content region (disclosure pattern).
|
|
8
10
|
*
|
|
9
11
|
* SYNC: When modified, update:
|
|
10
12
|
* - /packages/core/src/Chat/index.ts (exports)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposerDrawer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerDrawer.tsx"],"names":[],"mappings":"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ge,kBAAkB"}
|
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
* @position Collapsible drawer panel for ChatComposer.
|
|
10
10
|
* Supports expanded (full content) and collapsed (count + label) states
|
|
11
11
|
* with fade animation and grid-template-rows height transition.
|
|
12
|
+
* The collapse toggle exposes aria-expanded + aria-controls linking it to
|
|
13
|
+
* the content region (disclosure pattern).
|
|
12
14
|
*
|
|
13
15
|
* SYNC: When modified, update:
|
|
14
16
|
* - /packages/core/src/Chat/index.ts (exports)
|
|
15
17
|
* - /packages/cli/templates/blocks/components/ChatComposerDrawer/ (block examples)
|
|
16
18
|
*/
|
|
17
|
-
import { useState } from 'react';
|
|
19
|
+
import { useId, useState } from 'react';
|
|
18
20
|
import * as stylex from '@stylexjs/stylex';
|
|
19
21
|
import "../theme/tokens.stylex.js";
|
|
20
22
|
import { colorVars, spacingVars, radiusVars, durationVars, easeVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
@@ -74,6 +76,12 @@ export function ChatComposerDrawer({
|
|
|
74
76
|
const isControlled = controlledCollapsed !== undefined;
|
|
75
77
|
const isCollapsed = isControlled ? controlledCollapsed : internalCollapsed;
|
|
76
78
|
const canCollapse = count != null;
|
|
79
|
+
|
|
80
|
+
// Links the toggle to the region it shows/hides so assistive tech can move
|
|
81
|
+
// from the button to its controlled content (disclosure pattern). The
|
|
82
|
+
// content stays mounted while collapsed (hidden via the grid-row collapse),
|
|
83
|
+
// so the reference always resolves.
|
|
84
|
+
const contentId = useId();
|
|
77
85
|
const toggle = () => {
|
|
78
86
|
const next = !isCollapsed;
|
|
79
87
|
if (!isControlled) {
|
|
@@ -100,6 +108,7 @@ export function ChatComposerDrawer({
|
|
|
100
108
|
role: "button",
|
|
101
109
|
tabIndex: 0,
|
|
102
110
|
"aria-expanded": !isCollapsed,
|
|
111
|
+
"aria-controls": contentId,
|
|
103
112
|
"aria-label": isCollapsed ? t('@astryx.chatComposerDrawer.expand', {
|
|
104
113
|
label
|
|
105
114
|
}) : t('@astryx.chatComposerDrawer.collapse', {
|
|
@@ -141,6 +150,7 @@ export function ChatComposerDrawer({
|
|
|
141
150
|
}[!!isCollapsed << 0]
|
|
142
151
|
})]
|
|
143
152
|
}), /*#__PURE__*/_jsx("div", {
|
|
153
|
+
id: contentId,
|
|
144
154
|
...{
|
|
145
155
|
0: {
|
|
146
156
|
className: "xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
*
|
|
8
8
|
* ContentEditable-based rich input for the chat composer.
|
|
9
9
|
* Supports trigger menus (@ mentions, / commands) via SearchSource,
|
|
10
|
-
* inline token rendering, serialization, Enter
|
|
11
|
-
*
|
|
10
|
+
* inline token rendering, serialization, Enter-to-submit with
|
|
11
|
+
* IME-composition guarding and an onKeyDown seam for platform-specific
|
|
12
|
+
* key handling, message history, paste/drop file handling, and
|
|
13
|
+
* mobile-safe touch typography.
|
|
12
14
|
*
|
|
13
15
|
*
|
|
14
16
|
* SYNC: When modified, update:
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
* - /apps/storybook/stories/ChatComposer.stories.tsx
|
|
17
19
|
* - /packages/cli/templates/blocks/components/ChatComposerInput/ (block examples)
|
|
18
20
|
*/
|
|
19
|
-
import { type ReactNode, type ClipboardEvent } from 'react';
|
|
21
|
+
import { type ReactNode, type KeyboardEvent, type ClipboardEvent } from 'react';
|
|
20
22
|
import type { BaseProps } from '../BaseProps';
|
|
21
23
|
import type { SearchableItem, SearchSource } from '../Typeahead/types';
|
|
22
24
|
import { type UseChatPasteAsTokenReturn } from './useChatPasteAsToken';
|
|
@@ -137,6 +139,21 @@ export interface ChatComposerInputProps extends Omit<BaseProps<HTMLDivElement>,
|
|
|
137
139
|
onFiles?: (files: File[]) => void;
|
|
138
140
|
/** Submit handler (Enter without Shift) */
|
|
139
141
|
onSubmit?: (value: string) => void;
|
|
142
|
+
/**
|
|
143
|
+
* Key-down handler invoked before the built-in Enter/history behavior
|
|
144
|
+
* (but after an open trigger menu consumes the event).
|
|
145
|
+
*
|
|
146
|
+
* This is the seam for platform- or app-specific key handling:
|
|
147
|
+
* - Call `event.preventDefault()` to suppress the default submit (e.g.
|
|
148
|
+
* let Enter insert a newline on a touch keyboard).
|
|
149
|
+
* - Add behavior by acting on the event yourself (e.g. submit on
|
|
150
|
+
* Cmd/Ctrl+Enter) without calling `preventDefault()`, so the default
|
|
151
|
+
* handling still runs for other keys.
|
|
152
|
+
*
|
|
153
|
+
* IME composition is always respected regardless of this handler: Enter
|
|
154
|
+
* never submits while a composition is in progress.
|
|
155
|
+
*/
|
|
156
|
+
onKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
140
157
|
}
|
|
141
158
|
export declare function ChatComposerInput(props: ChatComposerInputProps): import("react").JSX.Element;
|
|
142
159
|
export declare namespace ChatComposerInput {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposerInput.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerInput.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"ChatComposerInput.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposerInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAML,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAarE,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAQ,KAAK,UAAU,EAAC,MAAM,UAAU,CAAC;AAShD,mEAAmE;AACnE,MAAM,WAAW,uBAAuB;IACtC,iEAAiE;IACjE,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,MAAM,GAAG,SA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;;;;OAaG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAC5D;AA0FD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,+BAyb9D;yBAzbe,iBAAiB;;;AAicjC,wBAAgB,wBAAwB,CAAC,EAAC,KAAK,EAAC,EAAE;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAC,+BAc3E;yBAde,wBAAwB"}
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
*
|
|
12
12
|
* ContentEditable-based rich input for the chat composer.
|
|
13
13
|
* Supports trigger menus (@ mentions, / commands) via SearchSource,
|
|
14
|
-
* inline token rendering, serialization, Enter
|
|
15
|
-
*
|
|
14
|
+
* inline token rendering, serialization, Enter-to-submit with
|
|
15
|
+
* IME-composition guarding and an onKeyDown seam for platform-specific
|
|
16
|
+
* key handling, message history, paste/drop file handling, and
|
|
17
|
+
* mobile-safe touch typography.
|
|
16
18
|
*
|
|
17
19
|
*
|
|
18
20
|
* SYNC: When modified, update:
|
|
@@ -133,6 +135,7 @@ export function ChatComposerInput(props) {
|
|
|
133
135
|
pasteAsToken: pasteAsTokenProp,
|
|
134
136
|
onFiles,
|
|
135
137
|
onSubmit = composerCtx?.onSubmit,
|
|
138
|
+
onKeyDown: onKeyDownProp,
|
|
136
139
|
xstyle,
|
|
137
140
|
className,
|
|
138
141
|
style,
|
|
@@ -188,6 +191,22 @@ export function ChatComposerInput(props) {
|
|
|
188
191
|
};
|
|
189
192
|
selfRef.current = handle;
|
|
190
193
|
useImperativeHandle(handleRef, () => handle);
|
|
194
|
+
|
|
195
|
+
// Register a focus control with the composer shell so body-click-to-focus
|
|
196
|
+
// works without the shell sniffing the input's DOM shape. Cleared on
|
|
197
|
+
// unmount so the shell falls back cleanly if the input goes away.
|
|
198
|
+
const inputControlRef = composerCtx?.inputControlRef;
|
|
199
|
+
useEffect(() => {
|
|
200
|
+
if (!inputControlRef) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
inputControlRef.current = {
|
|
204
|
+
focus: () => editableRef.current?.focus()
|
|
205
|
+
};
|
|
206
|
+
return () => {
|
|
207
|
+
inputControlRef.current = null;
|
|
208
|
+
};
|
|
209
|
+
}, [inputControlRef]);
|
|
191
210
|
useEffect(() => {
|
|
192
211
|
if (controlledValue === undefined || !editableRef.current) {
|
|
193
212
|
return;
|
|
@@ -289,6 +308,13 @@ export function ChatComposerInput(props) {
|
|
|
289
308
|
return;
|
|
290
309
|
}
|
|
291
310
|
|
|
311
|
+
// Consumer passthrough — runs before built-in Enter/history handling.
|
|
312
|
+
// A consumer can preventDefault() to fully own the keystroke.
|
|
313
|
+
onKeyDownProp?.(e);
|
|
314
|
+
if (e.defaultPrevented) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
|
|
292
318
|
// Handle Backspace near tokens — prevent browser from creating
|
|
293
319
|
// stray <br> elements or moving the cursor unexpectedly.
|
|
294
320
|
if (e.key === 'Backspace') {
|
|
@@ -322,6 +348,12 @@ export function ChatComposerInput(props) {
|
|
|
322
348
|
}
|
|
323
349
|
}
|
|
324
350
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
351
|
+
// Never submit mid-composition — an IME uses Enter to commit a
|
|
352
|
+
// candidate (e.g. Japanese/Chinese/Korean input), and browsers may
|
|
353
|
+
// also surface the legacy keyCode 229 for composing keystrokes.
|
|
354
|
+
if (e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
325
357
|
e.preventDefault();
|
|
326
358
|
if (!editableRef.current) {
|
|
327
359
|
return;
|
|
@@ -379,7 +411,7 @@ export function ChatComposerInput(props) {
|
|
|
379
411
|
e.preventDefault();
|
|
380
412
|
}
|
|
381
413
|
}
|
|
382
|
-
}, [hasHistory, onSubmit, onChange, emitChange, triggerMenu]);
|
|
414
|
+
}, [hasHistory, onSubmit, onChange, emitChange, triggerMenu, onKeyDownProp]);
|
|
383
415
|
const handlePaste = useCallback(e => {
|
|
384
416
|
const editable = editableRef.current;
|
|
385
417
|
if (!editable) {
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file ChatContext.tsx
|
|
3
|
+
* @input Uses React createContext
|
|
4
|
+
* @output Exports Chat message/list/composer/layout contexts. The composer
|
|
5
|
+
* context (value + input-control registration) is public composition API,
|
|
6
|
+
* re-exported from Chat/index.ts for custom inputs.
|
|
7
|
+
* @position Shared contexts; consumed by ChatMessage, ChatComposer,
|
|
8
|
+
* ChatComposerInput, ChatSendButton, and custom inputs.
|
|
9
|
+
*/
|
|
10
|
+
import { type RefObject } from 'react';
|
|
1
11
|
export type ChatMessageSender = 'user' | 'assistant' | 'system';
|
|
2
12
|
export type ChatDensity = 'compact' | 'balanced' | 'spacious';
|
|
3
13
|
export interface ChatMessageContextValue {
|
|
@@ -11,6 +21,20 @@ export interface ChatListContextValue {
|
|
|
11
21
|
}
|
|
12
22
|
export declare const ChatListContext: import("react").Context<ChatListContextValue | null>;
|
|
13
23
|
export declare function useChatListContext(): ChatListContextValue | null;
|
|
24
|
+
/**
|
|
25
|
+
* Imperative surface the composer shell can invoke on its input slot.
|
|
26
|
+
*
|
|
27
|
+
* The input is one slot inside the composer body — it does not span the whole
|
|
28
|
+
* body — so shell-level interactions like "click empty space to focus the
|
|
29
|
+
* input" must flow shell → input. A custom input registers this control (via
|
|
30
|
+
* `ChatComposerContextValue.inputControlRef`) so the shell can drive it
|
|
31
|
+
* without knowing its DOM shape. Optional methods can be added over time;
|
|
32
|
+
* inputs implement only what they support.
|
|
33
|
+
*/
|
|
34
|
+
export interface ChatComposerInputControl {
|
|
35
|
+
/** Move keyboard focus into the input. */
|
|
36
|
+
focus: () => void;
|
|
37
|
+
}
|
|
14
38
|
export interface ChatComposerContextValue {
|
|
15
39
|
value: string;
|
|
16
40
|
onChange: (value: string) => void;
|
|
@@ -20,6 +44,15 @@ export interface ChatComposerContextValue {
|
|
|
20
44
|
isStopShown: boolean;
|
|
21
45
|
canSend: boolean;
|
|
22
46
|
onStop?: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* Mutable handle the input slot populates with its {@link
|
|
49
|
+
* ChatComposerInputControl}. The shell reads `.current` to drive the input
|
|
50
|
+
* (e.g. focus on body click). A custom input assigns
|
|
51
|
+
* `inputControlRef.current = { focus }` on mount and clears it on unmount.
|
|
52
|
+
* When unset, the shell falls back to focusing a `contenteditable`/`textarea`
|
|
53
|
+
* it finds in the body.
|
|
54
|
+
*/
|
|
55
|
+
inputControlRef?: RefObject<ChatComposerInputControl | null>;
|
|
23
56
|
}
|
|
24
57
|
export declare const ChatComposerContext: import("react").Context<ChatComposerContextValue | null>;
|
|
25
58
|
export declare function useChatComposerContext(): ChatComposerContextValue | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatContext.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE9D,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,kBAAkB,yDAE9B,CAAC;AAGF,wBAAgB,qBAAqB,IAAI,uBAAuB,GAAG,IAAI,CAEtE;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAGhF,wBAAgB,kBAAkB,IAAI,oBAAoB,GAAG,IAAI,CAEhE;AAMD;;;;;;;;;GASG;AACH,MAAM,WAAW,wBAAwB;IACvC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;CAC9D;AAED,eAAO,MAAM,mBAAmB,0DACsB,CAAC;AAGvD,wBAAgB,sBAAsB,IAAI,wBAAwB,GAAG,IAAI,CAExE;AAMD,MAAM,WAAW,sBAAsB;IACrC,2EAA2E;IAC3E,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACxD,+FAA+F;IAC/F,UAAU,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,iBAAiB,wDAE7B,CAAC;AAGF,wBAAgB,oBAAoB,IAAI,sBAAsB,GAAG,IAAI,CAEpE"}
|
package/dist/Chat/ChatContext.js
CHANGED
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file ChatContext.tsx
|
|
7
7
|
* @input Uses React createContext
|
|
8
|
-
* @output Exports
|
|
9
|
-
*
|
|
8
|
+
* @output Exports Chat message/list/composer/layout contexts. The composer
|
|
9
|
+
* context (value + input-control registration) is public composition API,
|
|
10
|
+
* re-exported from Chat/index.ts for custom inputs.
|
|
11
|
+
* @position Shared contexts; consumed by ChatMessage, ChatComposer,
|
|
12
|
+
* ChatComposerInput, ChatSendButton, and custom inputs.
|
|
10
13
|
*/
|
|
11
14
|
import { createContext, use } from 'react';
|
|
12
15
|
export const ChatMessageContext = /*#__PURE__*/createContext(null);
|
|
@@ -24,6 +27,17 @@ export function useChatListContext() {
|
|
|
24
27
|
// Composer context — shared state between ChatComposer and ChatComposerInput
|
|
25
28
|
// =============================================================================
|
|
26
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Imperative surface the composer shell can invoke on its input slot.
|
|
32
|
+
*
|
|
33
|
+
* The input is one slot inside the composer body — it does not span the whole
|
|
34
|
+
* body — so shell-level interactions like "click empty space to focus the
|
|
35
|
+
* input" must flow shell → input. A custom input registers this control (via
|
|
36
|
+
* `ChatComposerContextValue.inputControlRef`) so the shell can drive it
|
|
37
|
+
* without knowing its DOM shape. Optional methods can be added over time;
|
|
38
|
+
* inputs implement only what they support.
|
|
39
|
+
*/
|
|
40
|
+
|
|
27
41
|
export const ChatComposerContext = /*#__PURE__*/createContext(null);
|
|
28
42
|
ChatComposerContext.displayName = 'ChatComposerContext';
|
|
29
43
|
export function useChatComposerContext() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDictationButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatDictationButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AAMvE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAM5C,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC1E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC,sEAAsE;IACtE,SAAS,EAAE,0BAA0B,CAAC;IACtC,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"ChatDictationButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatDictationButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AAMvE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAM5C,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC1E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC,sEAAsE;IACtE,SAAS,EAAE,0BAA0B,CAAC;IACtC,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiDD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,SAAS,EACT,IAAW,EACX,uBAA8B,EAC9B,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,4BA+D1B;yBAzEe,mBAAmB"}
|
|
@@ -126,7 +126,7 @@ export function ChatDictationButton({
|
|
|
126
126
|
const scale = BAR_MIN_SCALE + level * (1 - BAR_MIN_SCALE);
|
|
127
127
|
return /*#__PURE__*/_jsx("span", {
|
|
128
128
|
...mergeProps({
|
|
129
|
-
className: "xjspbzw x1g0ag68 x18dpk69 x11bq7d0 x9lcvmn"
|
|
129
|
+
className: "xjspbzw x1g0ag68 x18dpk69 x11bq7d0 x12w9bfk x9lcvmn"
|
|
130
130
|
}, {
|
|
131
131
|
style: {
|
|
132
132
|
width: barWidth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatLayout.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatLayout.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAC,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAa5C,KAAK,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEnD,MAAM,WAAW,eAAgB,SAAQ,SAAS,CAAC,cAAc,CAAC;IAChE,yCAAyC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAEhC;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAEhD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA8JD,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,OAAoB,EACpB,UAAU,EACV,YAAY,EACZ,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,eAAe,+
|
|
1
|
+
{"version":3,"file":"ChatLayout.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatLayout.tsx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,2BAA4B,SAAQ,IAAI,CACvD,SAAS,CAAC,cAAc,CAAC,EACzB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"ChatLayoutScrollButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatLayoutScrollButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAQ5C,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CACvD,SAAS,CAAC,cAAc,CAAC,EACzB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA2DD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,GAAG,EACH,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,qBA4B7B;yBArCe,sBAAsB"}
|
|
@@ -81,16 +81,16 @@ export function ChatLayoutScrollButton({
|
|
|
81
81
|
children: /*#__PURE__*/_jsx("div", {
|
|
82
82
|
...{
|
|
83
83
|
0: {
|
|
84
|
-
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa xg01cxk x47corl x1x67gh"
|
|
84
|
+
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1x67gh"
|
|
85
85
|
},
|
|
86
86
|
2: {
|
|
87
|
-
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x1hc1fzr x67bb7w x1x67gh"
|
|
87
|
+
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1x67gh"
|
|
88
88
|
},
|
|
89
89
|
1: {
|
|
90
|
-
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa xg01cxk x47corl x1ncir08"
|
|
90
|
+
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1ncir08"
|
|
91
91
|
},
|
|
92
92
|
3: {
|
|
93
|
-
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x1hc1fzr x67bb7w x1ncir08"
|
|
93
|
+
className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1ncir08"
|
|
94
94
|
}
|
|
95
95
|
}[!!isVisible << 1 | !!label << 0],
|
|
96
96
|
children: /*#__PURE__*/_jsx(Button, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessageMetadata.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageMetadata.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAY5C,OAAO,K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