@astryxdesign/core 0.7.11 → 0.7.12-canary.ccb4a6d

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.
Files changed (533) hide show
  1. package/dist/AppShell/AppShellMobileContext.d.ts.map +1 -1
  2. package/dist/AppShell/AppShellMobileContext.js +4 -3
  3. package/dist/AppShell/useAppShellMainId.d.ts.map +1 -1
  4. package/dist/AppShell/useAppShellMainId.js +3 -2
  5. package/dist/Avatar/AvatarSizeContext.d.ts.map +1 -1
  6. package/dist/Avatar/AvatarSizeContext.js +2 -2
  7. package/dist/Avatar/AvatarStatusLabelContext.d.ts +2 -2
  8. package/dist/Avatar/AvatarStatusLabelContext.d.ts.map +1 -1
  9. package/dist/Avatar/AvatarStatusLabelContext.js +3 -3
  10. package/dist/AvatarGroup/AvatarGroupContext.d.ts.map +1 -1
  11. package/dist/AvatarGroup/AvatarGroupContext.js +2 -2
  12. package/dist/BottomSheet/BottomSheetHostContext.d.ts.map +1 -1
  13. package/dist/BottomSheet/BottomSheetHostContext.js +3 -2
  14. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  15. package/dist/BottomSheet/BottomSheetPanel.js +48 -4
  16. package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
  17. package/dist/BottomSheet/BottomSheetSwitcherContext.js +2 -2
  18. package/dist/BottomSheet/bottomSheetEscape.d.ts.map +1 -1
  19. package/dist/BottomSheet/bottomSheetEscape.js +2 -2
  20. package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
  21. package/dist/BottomSheet/bottomSheetStack.js +2 -13
  22. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  23. package/dist/BottomSheet/useSheetGestures.js +25 -42
  24. package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  25. package/dist/Breadcrumbs/Breadcrumbs.js +2 -2
  26. package/dist/Button/Button.d.ts.map +1 -1
  27. package/dist/Button/Button.js +12 -21
  28. package/dist/Button/buttonHitArea.d.ts.map +1 -1
  29. package/dist/Button/buttonHitArea.js +3 -3
  30. package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  31. package/dist/ButtonGroup/ButtonGroup.js +13 -7
  32. package/dist/ButtonGroup/ButtonGroupContext.d.ts.map +1 -1
  33. package/dist/ButtonGroup/ButtonGroupContext.js +2 -2
  34. package/dist/Carousel/Carousel.d.ts.map +1 -1
  35. package/dist/Carousel/Carousel.js +24 -15
  36. package/dist/Chat/ChatContext.d.ts.map +1 -1
  37. package/dist/Chat/ChatContext.js +6 -5
  38. package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
  39. package/dist/Chat/useChatStreamScroll.js +7 -22
  40. package/dist/CheckboxInput/CheckboxRowPressContext.d.ts.map +1 -1
  41. package/dist/CheckboxInput/CheckboxRowPressContext.js +1 -1
  42. package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
  43. package/dist/CheckboxList/CheckboxListContext.js +1 -1
  44. package/dist/Collapsible/CollapsibleGroupContext.d.ts.map +1 -1
  45. package/dist/Collapsible/CollapsibleGroupContext.js +3 -3
  46. package/dist/CommandPalette/CommandPaletteContext.d.ts.map +1 -1
  47. package/dist/CommandPalette/CommandPaletteContext.js +4 -3
  48. package/dist/CommandPalette/busyStartSettle.d.ts.map +1 -1
  49. package/dist/CommandPalette/busyStartSettle.js +2 -2
  50. package/dist/DateInput/TouchDateField.d.ts.map +1 -1
  51. package/dist/DateInput/TouchDateField.js +41 -4
  52. package/dist/Dialog/DialogContext.d.ts.map +1 -1
  53. package/dist/Dialog/DialogContext.js +3 -2
  54. package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
  55. package/dist/DropdownMenu/DropdownMenuContext.js +6 -5
  56. package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
  57. package/dist/DropdownMenu/lazyMenuBottomSheet.js +4 -15
  58. package/dist/DropdownMenu/menuRegionStops.d.ts.map +1 -1
  59. package/dist/DropdownMenu/menuRegionStops.js +2 -37
  60. package/dist/FormLayout/FormLayoutContext.d.ts.map +1 -1
  61. package/dist/FormLayout/FormLayoutContext.js +2 -2
  62. package/dist/Heading/Heading.d.ts.map +1 -1
  63. package/dist/Heading/Heading.js +19 -16
  64. package/dist/HoverCard/HoverCard.d.ts +1 -2
  65. package/dist/HoverCard/HoverCard.d.ts.map +1 -1
  66. package/dist/HoverCard/useHoverCard.d.ts +1 -2
  67. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  68. package/dist/HoverCard/useHoverCard.js +5 -1
  69. package/dist/Icon/IconDefaultSizeContext.d.ts.map +1 -1
  70. package/dist/Icon/IconDefaultSizeContext.js +2 -2
  71. package/dist/InputGroup/InputGroupContext.d.ts.map +1 -1
  72. package/dist/InputGroup/InputGroupContext.js +2 -2
  73. package/dist/InputGroup/InputGroupInternalContext.d.ts.map +1 -1
  74. package/dist/InputGroup/InputGroupInternalContext.js +2 -2
  75. package/dist/InteractiveRoleContext/InteractiveRoleContext.d.ts.map +1 -1
  76. package/dist/InteractiveRoleContext/InteractiveRoleContext.js +5 -3
  77. package/dist/Item/ItemDescriptionContext.d.ts.map +1 -1
  78. package/dist/Item/ItemDescriptionContext.js +3 -3
  79. package/dist/Item/ItemListRowContext.d.ts.map +1 -1
  80. package/dist/Item/ItemListRowContext.js +3 -3
  81. package/dist/Item/ItemMarkerColumnsContext.d.ts +1 -1
  82. package/dist/Item/ItemMarkerColumnsContext.d.ts.map +1 -1
  83. package/dist/Item/ItemMarkerColumnsContext.js +2 -2
  84. package/dist/Layer/LayerContext.d.ts.map +1 -1
  85. package/dist/Layer/LayerContext.js +3 -2
  86. package/dist/Layer/LayerDepthContext.d.ts.map +1 -1
  87. package/dist/Layer/LayerDepthContext.js +3 -2
  88. package/dist/Layer/LayerTouch.d.ts +3 -2
  89. package/dist/Layer/LayerTouch.d.ts.map +1 -1
  90. package/dist/Layer/LayerTouch.js +3 -2
  91. package/dist/Layer/anchorName.d.ts.map +1 -1
  92. package/dist/Layer/anchorName.js +5 -1
  93. package/dist/Layer/inputHold.d.ts.map +1 -1
  94. package/dist/Layer/inputHold.js +115 -13
  95. package/dist/Layer/layerScopedContext.d.ts +5 -2
  96. package/dist/Layer/layerScopedContext.d.ts.map +1 -1
  97. package/dist/Layer/layerScopedContext.js +27 -10
  98. package/dist/Layer/layerSlideRules.d.ts +28 -26
  99. package/dist/Layer/layerSlideRules.d.ts.map +1 -1
  100. package/dist/Layer/layerSlideRules.js +41 -40
  101. package/dist/Layer/outsidePress.d.ts +21 -3
  102. package/dist/Layer/outsidePress.d.ts.map +1 -1
  103. package/dist/Layer/outsidePress.js +119 -29
  104. package/dist/Layer/settledBox.d.ts +9 -8
  105. package/dist/Layer/settledBox.d.ts.map +1 -1
  106. package/dist/Layer/settledBox.js +169 -49
  107. package/dist/Layer/toastHost.d.ts.map +1 -1
  108. package/dist/Layer/toastHost.js +3 -2
  109. package/dist/Layer/useLayer.d.ts.map +1 -1
  110. package/dist/Layer/useLayer.js +172 -60
  111. package/dist/Layer/useLayerKeyboardClearance.d.ts +14 -2
  112. package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
  113. package/dist/Layer/useLayerKeyboardClearance.js +83 -12
  114. package/dist/Layer/useTouchTrigger.d.ts +21 -1
  115. package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
  116. package/dist/Layer/useTouchTrigger.js +61 -37
  117. package/dist/Layout/Layout.d.ts +1 -1
  118. package/dist/Layout/Layout.d.ts.map +1 -1
  119. package/dist/Layout/Layout.js +10 -6
  120. package/dist/Layout/LayoutAreaContext.d.ts.map +1 -1
  121. package/dist/Layout/LayoutAreaContext.js +3 -3
  122. package/dist/Layout/LayoutContent.d.ts +6 -6
  123. package/dist/Layout/LayoutContent.js +9 -9
  124. package/dist/Layout/LayoutDividerContext.d.ts.map +1 -1
  125. package/dist/Layout/LayoutDividerContext.js +2 -2
  126. package/dist/Layout/LayoutSlotsContext.d.ts.map +1 -1
  127. package/dist/Layout/LayoutSlotsContext.js +2 -2
  128. package/dist/Link/LinkContext.d.ts +16 -0
  129. package/dist/Link/LinkContext.d.ts.map +1 -1
  130. package/dist/Link/LinkContext.js +3 -3
  131. package/dist/List/List.d.ts +12 -1
  132. package/dist/List/List.d.ts.map +1 -1
  133. package/dist/List/List.js +29 -10
  134. package/dist/List/ListContext.d.ts +18 -3
  135. package/dist/List/ListContext.d.ts.map +1 -1
  136. package/dist/List/ListContext.js +9 -6
  137. package/dist/List/ListItem.d.ts +13 -4
  138. package/dist/List/ListItem.d.ts.map +1 -1
  139. package/dist/List/ListItem.js +37 -10
  140. package/dist/List/listLayoutUpdates.d.ts +34 -0
  141. package/dist/List/listLayoutUpdates.d.ts.map +1 -0
  142. package/dist/List/listLayoutUpdates.js +539 -0
  143. package/dist/Markdown/Markdown.d.ts.map +1 -1
  144. package/dist/Markdown/Markdown.js +57 -10
  145. package/dist/Markdown/blockDirection.d.ts +26 -0
  146. package/dist/Markdown/blockDirection.d.ts.map +1 -0
  147. package/dist/Markdown/blockDirection.js +68 -0
  148. package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts +3 -1
  149. package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
  150. package/dist/Markdown/plugins/HeadingLinksRenderer.js +3 -1
  151. package/dist/MetadataList/MetadataListContext.d.ts.map +1 -1
  152. package/dist/MetadataList/MetadataListContext.js +2 -2
  153. package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
  154. package/dist/NavMenu/NavMenuContext.js +5 -4
  155. package/dist/Popover/Popover.d.ts.map +1 -1
  156. package/dist/Popover/Popover.js +9 -9
  157. package/dist/Popover/usePopover.d.ts.map +1 -1
  158. package/dist/Popover/usePopover.js +11 -8
  159. package/dist/RadioList/RadioList.d.ts.map +1 -1
  160. package/dist/RadioList/RadioList.js +2 -2
  161. package/dist/RadioList/RadioListReasonContext.d.ts.map +1 -1
  162. package/dist/RadioList/RadioListReasonContext.js +1 -1
  163. package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  164. package/dist/SegmentedControl/SegmentedControlContext.js +2 -2
  165. package/dist/SelectableCard/selectableCardInput.d.ts.map +1 -1
  166. package/dist/SelectableCard/selectableCardInput.js +2 -2
  167. package/dist/Selector/SelectorRowLayoutContext.d.ts.map +1 -1
  168. package/dist/Selector/SelectorRowLayoutContext.js +2 -2
  169. package/dist/SideNav/SideNavCollapseButton.d.ts +4 -3
  170. package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
  171. package/dist/SideNav/SideNavCollapseContext.d.ts.map +1 -1
  172. package/dist/SideNav/SideNavCollapseContext.js +4 -3
  173. package/dist/SideNav/SideNavFocusTargetsContext.d.ts.map +1 -1
  174. package/dist/SideNav/SideNavFocusTargetsContext.js +2 -2
  175. package/dist/SideNav/SideNavItem.d.ts.map +1 -1
  176. package/dist/SideNav/SideNavItem.js +3 -2
  177. package/dist/SideNav/SideNavRenderContext.d.ts.map +1 -1
  178. package/dist/SideNav/SideNavRenderContext.js +4 -3
  179. package/dist/SideNav/railMotion.d.ts +40 -0
  180. package/dist/SideNav/railMotion.d.ts.map +1 -1
  181. package/dist/SideNav/railMotion.js +2 -2
  182. package/dist/SizeContext/SizeContext.d.ts.map +1 -1
  183. package/dist/SizeContext/SizeContext.js +2 -2
  184. package/dist/SnapPaging/SnapPaging.d.ts.map +1 -1
  185. package/dist/SnapPaging/SnapPaging.js +162 -36
  186. package/dist/SnapPaging/snapPagingValue.d.ts +29 -3
  187. package/dist/SnapPaging/snapPagingValue.d.ts.map +1 -1
  188. package/dist/SnapPaging/snapPagingValue.js +38 -6
  189. package/dist/Spinner/SpinnerOwnerContext.d.ts.map +1 -1
  190. package/dist/Spinner/SpinnerOwnerContext.js +2 -2
  191. package/dist/Stepper/StepperContext.d.ts.map +1 -1
  192. package/dist/Stepper/StepperContext.js +3 -3
  193. package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
  194. package/dist/Switch/useSwitchTouch.js +8 -3
  195. package/dist/TabList/TabListContext.d.ts.map +1 -1
  196. package/dist/TabList/TabListContext.js +2 -2
  197. package/dist/Table/BaseTable.d.ts +3 -2
  198. package/dist/Table/BaseTable.d.ts.map +1 -1
  199. package/dist/Table/BaseTable.js +73 -16
  200. package/dist/Table/Table.d.ts.map +1 -1
  201. package/dist/Table/Table.js +3 -2
  202. package/dist/Table/TableContext.d.ts.map +1 -1
  203. package/dist/Table/TableContext.js +2 -2
  204. package/dist/Table/index.d.ts +1 -1
  205. package/dist/Table/index.d.ts.map +1 -1
  206. package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
  207. package/dist/Table/plugins/filtering/useTableFiltering.js +4 -3
  208. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
  209. package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +5 -3
  210. package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +16 -18
  211. package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
  212. package/dist/Table/plugins/rowIndex/useTableRowIndex.js +48 -39
  213. package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
  214. package/dist/Table/plugins/selection/useTableSelection.js +4 -2
  215. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
  216. package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +1 -0
  217. package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
  218. package/dist/Table/plugins/tree/useTableTreeData.js +3 -2
  219. package/dist/Table/tableRowContextUsage.d.ts +21 -0
  220. package/dist/Table/tableRowContextUsage.d.ts.map +1 -0
  221. package/dist/Table/tableRowContextUsage.js +88 -0
  222. package/dist/Table/types.d.ts +58 -5
  223. package/dist/Table/types.d.ts.map +1 -1
  224. package/dist/Table/useBaseTablePlugins.d.ts.map +1 -1
  225. package/dist/Table/useBaseTablePlugins.js +5 -2
  226. package/dist/Text/Text.d.ts.map +1 -1
  227. package/dist/Text/Text.js +18 -14
  228. package/dist/Text/TruncationTooltip.d.ts +45 -0
  229. package/dist/Text/TruncationTooltip.d.ts.map +1 -0
  230. package/dist/Text/TruncationTooltip.js +123 -0
  231. package/dist/Text/textClampContext.d.ts.map +1 -1
  232. package/dist/Text/textClampContext.js +1 -1
  233. package/dist/TimeInput/TimeInput.d.ts.map +1 -1
  234. package/dist/TimeInput/TimeInput.js +4 -0
  235. package/dist/ToggleButton/ToggleButtonGroup.d.ts.map +1 -1
  236. package/dist/ToggleButton/ToggleButtonGroup.js +2 -2
  237. package/dist/Token/TokenNamingContext.d.ts.map +1 -1
  238. package/dist/Token/TokenNamingContext.js +2 -2
  239. package/dist/Tokenizer/TokenizerClearAllMessageContext.d.ts.map +1 -1
  240. package/dist/Tokenizer/TokenizerClearAllMessageContext.js +2 -2
  241. package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts +12 -0
  242. package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -1
  243. package/dist/Tokenizer/TokenizerItemRemovableContext.js +2 -2
  244. package/dist/Toolbar/Toolbar.d.ts.map +1 -1
  245. package/dist/Toolbar/Toolbar.js +12 -6
  246. package/dist/Tooltip/tooltipPresentInterest.d.ts +29 -0
  247. package/dist/Tooltip/tooltipPresentInterest.d.ts.map +1 -0
  248. package/dist/Tooltip/tooltipPresentInterest.js +29 -0
  249. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  250. package/dist/Tooltip/useTooltip.js +30 -4
  251. package/dist/TopNav/TopNavContext.d.ts.map +1 -1
  252. package/dist/TopNav/TopNavContext.js +2 -2
  253. package/dist/TopNav/TopNavMobileContentContext.d.ts +1 -1
  254. package/dist/TopNav/TopNavMobileContentContext.d.ts.map +1 -1
  255. package/dist/TopNav/TopNavMobileContentContext.js +4 -3
  256. package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
  257. package/dist/TopNav/TopNavRenderContext.js +4 -3
  258. package/dist/Typeahead/busyIndicatorLane.d.ts.map +1 -1
  259. package/dist/Typeahead/busyIndicatorLane.js +3 -2
  260. package/dist/Typeahead/committedChoicesKey.d.ts.map +1 -1
  261. package/dist/Typeahead/committedChoicesKey.js +3 -2
  262. package/dist/Typeahead/trailingKeyDown.d.ts.map +1 -1
  263. package/dist/Typeahead/trailingKeyDown.js +3 -2
  264. package/dist/astryx.css +18 -8
  265. package/dist/gestures/GestureArena.d.ts +2 -0
  266. package/dist/gestures/GestureArena.d.ts.map +1 -1
  267. package/dist/gestures/GestureArena.js +8 -1
  268. package/dist/gestures/GestureRecognizer.d.ts +6 -0
  269. package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
  270. package/dist/gestures/GestureRecognizer.js +9 -0
  271. package/dist/gestures/PressTracker.d.ts.map +1 -1
  272. package/dist/gestures/PressTracker.js +9 -4
  273. package/dist/hooks/focusableSelector.d.ts +13 -1
  274. package/dist/hooks/focusableSelector.d.ts.map +1 -1
  275. package/dist/hooks/focusableSelector.js +22 -2
  276. package/dist/hooks/longPressDetector.d.ts.map +1 -1
  277. package/dist/hooks/longPressDetector.js +1 -25
  278. package/dist/hooks/pressGroupContext.d.ts.map +1 -1
  279. package/dist/hooks/pressGroupContext.js +1 -1
  280. package/dist/hooks/useActionGroupTracking.d.ts +18 -1
  281. package/dist/hooks/useActionGroupTracking.d.ts.map +1 -1
  282. package/dist/hooks/useActionGroupTracking.js +13 -2
  283. package/dist/hooks/useAnnounce.d.ts.map +1 -1
  284. package/dist/hooks/useAnnounce.js +3 -2
  285. package/dist/hooks/useFocusTrap.d.ts +11 -0
  286. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  287. package/dist/hooks/useFocusTrap.js +47 -2
  288. package/dist/hooks/useListFocus.d.ts +7 -0
  289. package/dist/hooks/useListFocus.d.ts.map +1 -1
  290. package/dist/hooks/useListFocus.js +20 -3
  291. package/dist/hooks/usePager.d.ts.map +1 -1
  292. package/dist/hooks/usePager.js +26 -3
  293. package/dist/hooks/useScrollOverflow.d.ts +22 -0
  294. package/dist/hooks/useScrollOverflow.d.ts.map +1 -1
  295. package/dist/hooks/useScrollOverflow.js +67 -11
  296. package/dist/i18n/InternationalizationContext.d.ts +19 -0
  297. package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
  298. package/dist/i18n/InternationalizationContext.js +3 -3
  299. package/dist/i18n/englishFallback.d.ts.map +1 -1
  300. package/dist/i18n/englishFallback.js +5 -1
  301. package/dist/i18n/firstStrongDirection.d.ts +7 -0
  302. package/dist/i18n/firstStrongDirection.d.ts.map +1 -0
  303. package/dist/i18n/firstStrongDirection.js +65 -0
  304. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  305. package/dist/i18n/generated-locales/en.generated.js +1 -0
  306. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  307. package/dist/i18n/generated-locales/pseudo.generated.js +1 -0
  308. package/dist/internal/scroll-anchoring.d.ts +16 -0
  309. package/dist/internal/scroll-anchoring.d.ts.map +1 -0
  310. package/dist/internal/scroll-anchoring.js +16 -0
  311. package/dist/internal/touch.d.ts +2 -0
  312. package/dist/internal/touch.d.ts.map +1 -1
  313. package/dist/internal/touch.js +4 -1
  314. package/dist/motion/animatedLayout.d.ts +8 -0
  315. package/dist/motion/animatedLayout.d.ts.map +1 -1
  316. package/dist/motion/animatedLayout.js +51 -3
  317. package/dist/motion/animator.d.ts +19 -2
  318. package/dist/motion/animator.d.ts.map +1 -1
  319. package/dist/motion/animator.js +72 -7
  320. package/dist/privateAttributes/itemKey.stylex.d.ts +5 -0
  321. package/dist/privateAttributes/itemKey.stylex.d.ts.map +1 -0
  322. package/dist/privateAttributes/itemKey.stylex.js +25 -0
  323. package/dist/privateAttributes/leaving.stylex.d.ts +5 -0
  324. package/dist/privateAttributes/leaving.stylex.d.ts.map +1 -0
  325. package/dist/privateAttributes/leaving.stylex.js +23 -0
  326. package/dist/privateAttributes/press.stylex.d.ts.map +1 -1
  327. package/dist/privateAttributes/press.stylex.js +13 -3
  328. package/dist/privateAttributes/scrollAnchoring.stylex.d.ts +7 -0
  329. package/dist/privateAttributes/scrollAnchoring.stylex.d.ts.map +1 -0
  330. package/dist/privateAttributes/scrollAnchoring.stylex.js +50 -0
  331. package/dist/privateAttributes/travelling.stylex.d.ts +27 -0
  332. package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -0
  333. package/dist/privateAttributes/travelling.stylex.js +51 -0
  334. package/dist/theme/Theme.d.ts.map +1 -1
  335. package/dist/theme/Theme.js +95 -49
  336. package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
  337. package/dist/theme/syntax/SyntaxTheme.js +3 -2
  338. package/dist/theme/useTheme.d.ts.map +1 -1
  339. package/dist/theme/useTheme.js +3 -2
  340. package/dist/utils/calendarSystem.d.ts.map +1 -1
  341. package/dist/utils/calendarSystem.js +4 -1
  342. package/dist/utils/flatTree.d.ts +13 -0
  343. package/dist/utils/flatTree.d.ts.map +1 -1
  344. package/dist/utils/flatTree.js +28 -4
  345. package/dist/utils/inputAge.d.ts +22 -0
  346. package/dist/utils/inputAge.d.ts.map +1 -0
  347. package/dist/utils/inputAge.js +54 -0
  348. package/dist/utils/inputStream.d.ts +8 -0
  349. package/dist/utils/inputStream.d.ts.map +1 -1
  350. package/dist/utils/inputStream.js +53 -3
  351. package/dist/utils/moduleLoader.d.ts +23 -0
  352. package/dist/utils/moduleLoader.d.ts.map +1 -0
  353. package/dist/utils/moduleLoader.js +31 -0
  354. package/dist/utils/pressFeedback.d.ts.map +1 -1
  355. package/dist/utils/pressFeedback.js +13 -8
  356. package/dist/utils/selectionLock.d.ts.map +1 -1
  357. package/dist/utils/selectionLock.js +7 -14
  358. package/dist/utils/sharedContext.d.ts +18 -0
  359. package/dist/utils/sharedContext.d.ts.map +1 -0
  360. package/dist/utils/sharedContext.js +33 -0
  361. package/dist/utils/sharedRealm.d.ts +24 -0
  362. package/dist/utils/sharedRealm.d.ts.map +1 -0
  363. package/dist/utils/sharedRealm.js +38 -0
  364. package/locales/en.json +4 -0
  365. package/locales/pseudo.json +3 -0
  366. package/package.json +10 -5
  367. package/src/AppShell/AppShellMobileContext.tsx +8 -3
  368. package/src/AppShell/useAppShellMainId.ts +7 -2
  369. package/src/Avatar/AvatarSizeContext.ts +6 -2
  370. package/src/Avatar/AvatarStatusLabelContext.ts +8 -3
  371. package/src/AvatarGroup/AvatarGroupContext.ts +7 -4
  372. package/src/BottomSheet/BottomSheetHostContext.ts +7 -3
  373. package/src/BottomSheet/BottomSheetPanel.tsx +56 -7
  374. package/src/BottomSheet/BottomSheetSwitcherContext.ts +7 -2
  375. package/src/BottomSheet/bottomSheetEscape.ts +6 -2
  376. package/src/BottomSheet/bottomSheetStack.ts +6 -14
  377. package/src/BottomSheet/useSheetGestures.ts +28 -48
  378. package/src/Breadcrumbs/Breadcrumbs.tsx +6 -5
  379. package/src/Button/Button.doc.mjs +3 -3
  380. package/src/Button/Button.tsx +10 -22
  381. package/src/Button/buttonHitArea.ts +7 -4
  382. package/src/ButtonGroup/ButtonGroup.doc.mjs +3 -3
  383. package/src/ButtonGroup/ButtonGroup.tsx +27 -16
  384. package/src/ButtonGroup/ButtonGroupContext.ts +7 -4
  385. package/src/Carousel/Carousel.tsx +33 -15
  386. package/src/Chat/ChatContext.tsx +23 -7
  387. package/src/Chat/useChatStreamScroll.ts +7 -26
  388. package/src/CheckboxInput/CheckboxRowPressContext.ts +5 -1
  389. package/src/CheckboxList/CheckboxListContext.tsx +5 -1
  390. package/src/Collapsible/CollapsibleGroupContext.tsx +11 -3
  391. package/src/CommandPalette/CommandPaletteContext.ts +8 -3
  392. package/src/CommandPalette/busyStartSettle.ts +6 -2
  393. package/src/DateInput/TouchDateField.tsx +62 -4
  394. package/src/Dialog/DialogContext.ts +7 -2
  395. package/src/DropdownMenu/DropdownMenuContext.tsx +18 -5
  396. package/src/DropdownMenu/lazyMenuBottomSheet.ts +6 -18
  397. package/src/DropdownMenu/menuRegionStops.ts +1 -49
  398. package/src/FormLayout/FormLayoutContext.ts +3 -3
  399. package/src/Heading/Heading.tsx +34 -18
  400. package/src/HoverCard/HoverCard.doc.mjs +3 -3
  401. package/src/HoverCard/HoverCard.tsx +1 -2
  402. package/src/HoverCard/useHoverCard.tsx +6 -2
  403. package/src/Icon/IconDefaultSizeContext.ts +6 -2
  404. package/src/IconButton/IconButton.doc.mjs +2 -2
  405. package/src/InputGroup/InputGroupContext.ts +7 -4
  406. package/src/InputGroup/InputGroupInternalContext.ts +6 -2
  407. package/src/InteractiveRoleContext/InteractiveRoleContext.ts +8 -3
  408. package/src/Item/ItemDescriptionContext.tsx +7 -3
  409. package/src/Item/ItemListRowContext.tsx +7 -3
  410. package/src/Item/ItemMarkerColumnsContext.tsx +7 -2
  411. package/src/Layer/LayerContext.ts +7 -2
  412. package/src/Layer/LayerDepthContext.tsx +3 -2
  413. package/src/Layer/LayerTouch.ts +6 -2
  414. package/src/Layer/anchorName.ts +8 -4
  415. package/src/Layer/inputHold.ts +138 -21
  416. package/src/Layer/layerScopedContext.tsx +34 -7
  417. package/src/Layer/layerSlideRules.ts +43 -40
  418. package/src/Layer/outsidePress.ts +144 -28
  419. package/src/Layer/settledBox.ts +216 -54
  420. package/src/Layer/toastHost.tsx +6 -2
  421. package/src/Layer/useLayer.tsx +200 -69
  422. package/src/Layer/useLayerKeyboardClearance.ts +90 -12
  423. package/src/Layer/useTouchTrigger.ts +89 -40
  424. package/src/Layout/Layout.doc.mjs +17 -0
  425. package/src/Layout/Layout.tsx +13 -9
  426. package/src/Layout/LayoutAreaContext.ts +8 -9
  427. package/src/Layout/LayoutContent.doc.mjs +11 -0
  428. package/src/Layout/LayoutContent.tsx +9 -9
  429. package/src/Layout/LayoutDividerContext.ts +6 -2
  430. package/src/Layout/LayoutSlotsContext.ts +6 -3
  431. package/src/Link/LinkContext.ts +7 -3
  432. package/src/List/List.doc.mjs +5 -0
  433. package/src/List/List.tsx +53 -5
  434. package/src/List/ListContext.tsx +28 -6
  435. package/src/List/ListItem.doc.mjs +11 -0
  436. package/src/List/ListItem.tsx +51 -14
  437. package/src/List/listLayoutUpdates.ts +603 -0
  438. package/src/Markdown/Markdown.tsx +93 -5
  439. package/src/Markdown/blockDirection.ts +100 -0
  440. package/src/Markdown/plugins/HeadingLinksRenderer.tsx +4 -0
  441. package/src/MetadataList/MetadataListContext.tsx +6 -2
  442. package/src/NavMenu/NavMenuContext.tsx +14 -5
  443. package/src/Popover/Popover.tsx +23 -16
  444. package/src/Popover/usePopover.tsx +21 -7
  445. package/src/RadioList/RadioList.tsx +7 -4
  446. package/src/RadioList/RadioListReasonContext.ts +1 -1
  447. package/src/Section/Section.doc.mjs +22 -0
  448. package/src/SegmentedControl/SegmentedControlContext.ts +6 -2
  449. package/src/SelectableCard/selectableCardInput.ts +6 -2
  450. package/src/Selector/SelectorRowLayoutContext.ts +6 -2
  451. package/src/SideNav/SideNavCollapseButton.doc.mjs +5 -5
  452. package/src/SideNav/SideNavCollapseButton.tsx +4 -3
  453. package/src/SideNav/SideNavCollapseContext.ts +12 -7
  454. package/src/SideNav/SideNavFocusTargetsContext.ts +6 -2
  455. package/src/SideNav/SideNavItem.tsx +6 -2
  456. package/src/SideNav/SideNavRenderContext.ts +9 -8
  457. package/src/SideNav/railMotion.ts +6 -2
  458. package/src/SizeContext/SizeContext.ts +6 -2
  459. package/src/SnapPaging/SnapPaging.ts +164 -39
  460. package/src/SnapPaging/snapPagingValue.ts +59 -12
  461. package/src/Spinner/SpinnerOwnerContext.ts +6 -2
  462. package/src/Stepper/StepperContext.ts +12 -3
  463. package/src/Switch/useSwitchTouch.ts +7 -5
  464. package/src/TabList/TabListContext.ts +7 -2
  465. package/src/Table/BaseTable.tsx +143 -19
  466. package/src/Table/Table.tsx +4 -3
  467. package/src/Table/TableContext.ts +6 -2
  468. package/src/Table/index.ts +2 -0
  469. package/src/Table/plugins/filtering/useTableFiltering.tsx +11 -3
  470. package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +10 -3
  471. package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +38 -29
  472. package/src/Table/plugins/selection/useTableSelection.tsx +7 -2
  473. package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +1 -0
  474. package/src/Table/plugins/tree/useTableTreeData.tsx +6 -2
  475. package/src/Table/tableRowContextUsage.ts +105 -0
  476. package/src/Table/types.ts +60 -2
  477. package/src/Table/useBaseTablePlugins.ts +5 -2
  478. package/src/Table/useTableRowIndex.doc.mjs +6 -7
  479. package/src/Text/Text.tsx +34 -18
  480. package/src/Text/TruncationTooltip.tsx +179 -0
  481. package/src/Text/textClampContext.ts +5 -1
  482. package/src/TimeInput/TimeInput.tsx +4 -0
  483. package/src/ToggleButton/ToggleButtonGroup.tsx +6 -2
  484. package/src/Token/TokenNamingContext.ts +6 -2
  485. package/src/Tokenizer/TokenizerClearAllMessageContext.ts +4 -4
  486. package/src/Tokenizer/TokenizerItemRemovableContext.ts +3 -3
  487. package/src/Toolbar/Toolbar.tsx +16 -9
  488. package/src/Tooltip/tooltipPresentInterest.ts +43 -0
  489. package/src/Tooltip/useTooltip.tsx +33 -0
  490. package/src/TopNav/TopNavContext.ts +6 -2
  491. package/src/TopNav/TopNavMobileContentContext.ts +8 -3
  492. package/src/TopNav/TopNavRenderContext.ts +8 -4
  493. package/src/Typeahead/busyIndicatorLane.tsx +7 -2
  494. package/src/Typeahead/committedChoicesKey.tsx +4 -3
  495. package/src/Typeahead/trailingKeyDown.tsx +7 -2
  496. package/src/gestures/GestureArena.ts +8 -1
  497. package/src/gestures/GestureRecognizer.ts +9 -0
  498. package/src/gestures/PressTracker.ts +13 -4
  499. package/src/hooks/focusableSelector.ts +29 -1
  500. package/src/hooks/longPressDetector.ts +1 -35
  501. package/src/hooks/pressGroupContext.ts +5 -1
  502. package/src/hooks/useActionGroupTracking.ts +29 -2
  503. package/src/hooks/useAnnounce.ts +8 -4
  504. package/src/hooks/useFocusTrap.ts +62 -2
  505. package/src/hooks/useListFocus.ts +34 -7
  506. package/src/hooks/usePager.ts +30 -3
  507. package/src/hooks/useScrollOverflow.ts +65 -7
  508. package/src/i18n/InternationalizationContext.ts +12 -8
  509. package/src/i18n/englishFallback.ts +7 -1
  510. package/src/i18n/firstStrongDirection.ts +69 -0
  511. package/src/i18n/generated-locales/en.generated.ts +1 -0
  512. package/src/i18n/generated-locales/pseudo.generated.ts +1 -0
  513. package/src/internal/scroll-anchoring.ts +16 -0
  514. package/src/internal/touch.ts +4 -0
  515. package/src/motion/animatedLayout.ts +44 -3
  516. package/src/motion/animator.ts +97 -9
  517. package/src/privateAttributes/itemKey.stylex.ts +25 -0
  518. package/src/privateAttributes/leaving.stylex.ts +23 -0
  519. package/src/privateAttributes/press.stylex.ts +19 -7
  520. package/src/privateAttributes/scrollAnchoring.stylex.ts +50 -0
  521. package/src/privateAttributes/travelling.stylex.ts +88 -0
  522. package/src/theme/Theme.tsx +124 -60
  523. package/src/theme/syntax/SyntaxTheme.tsx +7 -2
  524. package/src/theme/useTheme.ts +7 -8
  525. package/src/utils/calendarSystem.ts +7 -1
  526. package/src/utils/flatTree.ts +31 -4
  527. package/src/utils/inputAge.ts +66 -0
  528. package/src/utils/inputStream.ts +52 -3
  529. package/src/utils/moduleLoader.ts +47 -0
  530. package/src/utils/pressFeedback.ts +16 -7
  531. package/src/utils/selectionLock.ts +8 -18
  532. package/src/utils/sharedContext.ts +42 -0
  533. package/src/utils/sharedRealm.ts +42 -0
@@ -4,7 +4,8 @@
4
4
  * @file snapPagingValue.ts
5
5
  * @input A scrolling row of snap items
6
6
  * @output The `SnapPaging` value, the calls Carousel makes on it
7
- * (`isSnapPaging`, `attachSnapPaging`, `moveHeldSnapPaging`), and stops
7
+ * (`isSnapPaging`, `attachSnapPaging`, `moveSnapPaging`,
8
+ * `moveHeldSnapPaging`), where a held row is shown, and stops
8
9
  * @position Carousel's only link to snap paging. It imports no pager code,
9
10
  * so a Carousel without `hasSnap={useSnapPaging()}` bundles none
10
11
  */
@@ -20,6 +21,13 @@ import { isRtlElement } from "../hooks/isRtlElement.js";
20
21
 
21
22
  /** The paging attached to one row. */
22
23
 
24
+ /**
25
+ * Where a row the paging holds is shown: its offset toward the end, and the
26
+ * travel it was taken over with.
27
+ */
28
+
29
+ /** Hears a held row on each frame of the hold, and null at the hand-back. */
30
+
23
31
  const values = new WeakSet();
24
32
  // Each attached row's paging, for Carousel's own scroll calls.
25
33
  const attachments = new WeakMap();
@@ -38,9 +46,12 @@ export function isSnapPaging(value) {
38
46
  return typeof value === 'object' && value !== null && values.has(value);
39
47
  }
40
48
 
41
- /** Attaches snap paging to `element`; the returned function detaches it. */
42
- export function attachSnapPaging(value, element) {
43
- const attachment = value.attach(element);
49
+ /**
50
+ * Attaches snap paging to `element`; the returned function detaches it.
51
+ * `onHeld` hears where the row is shown while the paging holds it.
52
+ */
53
+ export function attachSnapPaging(value, element, onHeld) {
54
+ const attachment = value.attach(element, onHeld);
44
55
  attachments.set(element, attachment);
45
56
  return () => {
46
57
  attachments.delete(element);
@@ -48,6 +59,20 @@ export function attachSnapPaging(value, element) {
48
59
  };
49
60
  }
50
61
 
62
+ /**
63
+ * Moves the row through the paging to `target(shown, end)`, an offset toward
64
+ * the end, and takes the row over first when it is at rest. `end` is its
65
+ * travel. False when no paging is attached.
66
+ */
67
+ export function moveSnapPaging(element, target) {
68
+ const attachment = attachments.get(element);
69
+ if (attachment == null) {
70
+ return false;
71
+ }
72
+ attachment.move(target);
73
+ return true;
74
+ }
75
+
51
76
  /**
52
77
  * Moves a row the paging holds to `target(shown, end)`, an offset toward the
53
78
  * end. `end` is its travel when taken over. False when it is not held.
@@ -61,6 +86,14 @@ export function nearestStop(stops, at) {
61
86
  return stops.reduce((best, stop) => Math.abs(stop - at) < Math.abs(best - at) ? stop : best, stops[0] ?? at);
62
87
  }
63
88
 
89
+ /**
90
+ * The scale a scaled ancestor gives the row's rects: the rect's width over the
91
+ * row's layout width. Scroll offsets do not have it.
92
+ */
93
+ export function rowScale(element, box) {
94
+ return element.offsetWidth > 0 && box.width > 0 ? box.width / element.offsetWidth : 1;
95
+ }
96
+
64
97
  /**
65
98
  * Each item's snap stop: the scroll offset that aligns its start edge with
66
99
  * the scroll padding, clamped to `end`. Read from the items' rects, with the
@@ -69,8 +102,7 @@ export function nearestStop(stops, at) {
69
102
  export function snapStops(element, shown, end) {
70
103
  const rtl = isRtlElement(element);
71
104
  const box = element.getBoundingClientRect();
72
- // A scaled ancestor scales the rects, not the scroll offsets.
73
- const scale = element.offsetWidth > 0 && box.width > 0 ? box.width / element.offsetWidth : 1;
105
+ const scale = rowScale(element, box);
74
106
  const border = rtl ? element.offsetWidth - element.clientWidth - element.clientLeft : element.clientLeft;
75
107
  const style = getComputedStyle(element);
76
108
  const padding = Number.parseFloat(rtl ? style.scrollPaddingRight : style.scrollPaddingLeft) || 0;
@@ -1 +1 @@
1
- {"version":3,"file":"SpinnerOwnerContext.d.ts","sourceRoot":"","sources":["../../src/Spinner/SpinnerOwnerContext.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,mBAAmB,kCAAuB,CAAC"}
1
+ {"version":3,"file":"SpinnerOwnerContext.d.ts","sourceRoot":"","sources":["../../src/Spinner/SpinnerOwnerContext.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,mBAAmB,kCAI/B,CAAC"}
@@ -15,6 +15,6 @@
15
15
  * SYNC: When modified, update:
16
16
  * - /packages/core/src/Spinner/Spinner.tsx
17
17
  */
18
- import { createContext } from 'react';
19
- export const SpinnerOwnerContext = /*#__PURE__*/createContext(false);
18
+ import { createSharedContext } from "../utils/sharedContext.js";
19
+ export const SpinnerOwnerContext = createSharedContext('SpinnerOwnerContext', 1, false);
20
20
  SpinnerOwnerContext.displayName = 'SpinnerOwnerContext';
@@ -1 +1 @@
1
- {"version":3,"file":"StepperContext.d.ts","sourceRoot":"","sources":["../../src/Stepper/StepperContext.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAM,KAAK,OAAO,EAAC,MAAM,OAAO,CAAC;AAGxC,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UA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vD"}
@@ -25,7 +25,7 @@
25
25
  * - /packages/core/src/Stepper/Stepper.public.test.ts
26
26
  */
27
27
  import { use } from 'react';
28
- import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
28
+ import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
29
29
 
30
30
  /**
31
31
  * Controls where each step's indicator sits relative to the connector track.
@@ -45,9 +45,9 @@ import { createLayerScopedContext as createContext } from "../Layer/layerScopedC
45
45
  * absent from the public component barrel.
46
46
  */
47
47
 
48
- export const StepperContext = createContext(null);
48
+ export const StepperContext = createLayerScopedContext('StepperContext', 1, null);
49
49
  StepperContext.displayName = 'StepperContext';
50
- export const StepperInternalContext = createContext(null);
50
+ export const StepperInternalContext = createLayerScopedContext('StepperInternalContext', 1, null);
51
51
  StepperInternalContext.displayName = 'StepperInternalContext';
52
52
  function useContextValue(context, hookName) {
53
53
  const ctx = use(context);
@@ -1 +1 @@
1
- {"version":3,"file":"useSwitchTouch.d.ts","sourceRoot":"","sources":["../../src/Switch/useSwitchTouch.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAmBxD,OAAO,EAQL,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACnD,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC/C;AA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B,6EAA6E;IAC7E,OAAO,CAAC,cAAc;IAuFtB;;;OAGG;IACH,OAAO,CAAC,IAAI;IAiCZ;;;;OAIG;IACH,OAAO,CAAC,OAAO;IA2Df;;;OAGG;IACH,OAAO,CAAC,UAAU;IAOlB,kEAAkE;IAClE,OAAO,CAAC,iBAAiB;IAazB,+EAA+E;IAC/E,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,IAAI;IAIZ,sEAAsE;IACtE,OAAO,CAAC,GAAG;IAIX,8DAA8D;IAC9D,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,QAAQ;IAMhB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAkBnB;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAYhB;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAiBhB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAUhB,oEAAoE;IACpE,OAAO,CAAC,SAAS;IAQjB,+CAA+C;IAC/C,OAAO,CAAC,QAAQ;IAqBhB,uEAAuE;IACvE,OAAO,CAAC,UAAU;IAKlB,uEAAuE;IACvE,OAAO,CAAC,UAAU;IAKlB;;;;OAIG;IACH,OAAO,CAAC,IAAI;IAmBZ;;;;OAIG;IACH,OAAO,CAAC,MAAM;IAgDd;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAsCpB,OAAO,CAAC,WAAW;CAQpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,gBAAgB,EACvB,EACE,IAAI,EACJ,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,GAChB,EAAE,kBAAkB,GACpB,IAAI,CAsDN"}
@@ -362,12 +362,17 @@ export class SwitchTouchController {
362
362
  const time = now();
363
363
  // The thumb's CSS rest moved with the value: shift it back by as much,
364
364
  // so nothing moves on screen. A spring keeps its target through the shift
365
- // and is sent to the new rest below. A reduced-motion dip shifts whole,
366
- // its end included, and keeps going.
365
+ // and is sent to the new rest below. A spring already heading for the new
366
+ // rest moves whole instead, keeping its start time and velocity. A
367
+ // reduced-motion dip shifts whole, its end included, and keeps going.
367
368
  const springs = thumb.reducedMotion() === 'off';
368
369
  thumb.rebase({
369
370
  x: this.direction * (this.rest(previous) - this.rest(isOn))
370
- });
371
+ }, springs ? {
372
+ towards: {
373
+ x: this.toX(this.rest(isOn))
374
+ }
375
+ } : {});
371
376
  // Each state has its own thumb size, the circle a mouse sees. The box the
372
377
  // CSS now renders is the new value's. Its scale takes the old size over
373
378
  // and grows or shrinks it from there.
@@ -1 +1 @@
1
- {"version":3,"file":"TabListContext.d.ts","sourceRoot":"","sources":["../../src/TabList/TabListContext.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAG9E;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,mBAAmB,CASvD"}
1
+ {"version":3,"file":"TabListContext.d.ts","sourceRoot":"","sources":["../../src/TabList/TabListContext.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,qDAKxB,CAAC;AAGJ;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,mBAAmB,CASvD"}
@@ -11,7 +11,7 @@
11
11
  * SYNC: When modified, update /packages/core/src/TabList/TabList.doc.mjs
12
12
  */
13
13
  import { use } from 'react';
14
- import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
14
+ import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
15
15
 
16
16
  /**
17
17
  * Size variants for tab list items.
@@ -37,7 +37,7 @@ import { createLayerScopedContext as createContext } from "../Layer/layerScopedC
37
37
  * pattern from TabList to children.
38
38
  */
39
39
 
40
- export const TabListContext = createContext(null);
40
+ export const TabListContext = createLayerScopedContext('TabListContext', 1, null);
41
41
  TabListContext.displayName = 'TabListContext';
42
42
 
43
43
  /**
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * @file BaseTable.tsx
3
- * @input React, types.ts, columnUtils.ts
4
- * @output Exports BaseTable component
3
+ * @input React, types.ts, columnUtils.ts, tableRowContextUsage.ts
4
+ * @output Exports BaseTable component; passes a TableRowContext to body row
5
+ * and cell transforms and a TableRenderContext to scroll-wrapper transforms
5
6
  * @position Core structural component; wrapped by Table.tsx
6
7
  *
7
8
  * SYNC: When modified, update these files to stay in sync:
@@ -1 +1 @@
1
- {"version":3,"file":"BaseTable.d.ts","sourceRoot":"","sources":["../../src/Table/BaseTable.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,OAAO,EAIL,KAAK,YAAY,EAEjB,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EACV,cAAc,EAYf,MAAM,SAAS,CAAC;AAkpBjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,EAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3E,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAC,KACrD,YAAY,CAAC"}
1
+ {"version":3,"file":"BaseTable.d.ts","sourceRoot":"","sources":["../../src/Table/BaseTable.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAKL,KAAK,YAAY,EAEjB,KAAK,GAAG,EACT,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EACV,cAAc,EAcf,MAAM,SAAS,CAAC;AA0wBjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,EAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3E,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAC,KACrD,YAAY,CAAC"}
@@ -4,8 +4,9 @@
4
4
 
5
5
  /**
6
6
  * @file BaseTable.tsx
7
- * @input React, types.ts, columnUtils.ts
8
- * @output Exports BaseTable component
7
+ * @input React, types.ts, columnUtils.ts, tableRowContextUsage.ts
8
+ * @output Exports BaseTable component; passes a TableRowContext to body row
9
+ * and cell transforms and a TableRenderContext to scroll-wrapper transforms
9
10
  * @position Core structural component; wrapped by Table.tsx
10
11
  *
11
12
  * SYNC: When modified, update these files to stay in sync:
@@ -14,7 +15,7 @@
14
15
  * - /packages/core/src/Table/index.ts (exports if types change)
15
16
  * - /packages/cli/assets/templates/blocks/components/Table/ (showcase blocks)
16
17
  */
17
- import { memo, useId, useRef } from 'react';
18
+ import { memo, useId, useMemo, useRef } from 'react';
18
19
  import { isRenderable } from "../utils/isRenderable.js";
19
20
  import * as stylex from '@stylexjs/stylex';
20
21
  import "../theme/tokens.stylex.js";
@@ -26,6 +27,8 @@ import { TableHeaderCell } from "./TableHeaderCell.js";
26
27
  import { TableHeader } from "./TableHeader.js";
27
28
  import { TableBody } from "./TableBody.js";
28
29
  import { mergeProps } from "../utils/index.js";
30
+ import { useMergedRefs } from "../hooks/useMergedRefs.js";
31
+ import { readsRowCount, readsRowIndex, runPluginTransform, trackRowContext } from "./tableRowContextUsage.js";
29
32
  import { devError } from "../utils/devWarning.js";
30
33
  import { EmptyState } from "../EmptyState/index.js";
31
34
  import { Text } from "../Text/index.js";
@@ -69,6 +72,26 @@ function applyPlugins(plugins, getter, initial, ...args) {
69
72
  }, initial);
70
73
  }
71
74
 
75
+ /**
76
+ * Run a row-level pipeline. Each transform gets the row context as its last
77
+ * argument, tracked per plugin so row memoization knows what it reads.
78
+ */
79
+ function applyRowPlugins(plugins, getter, initial, context, ...args) {
80
+ return applyPlugins(plugins, plugin => {
81
+ const transform = getter(plugin);
82
+ return transform == null ? undefined : (props, ...values) => runPluginTransform(plugin, () => transform(props, ...values, trackRowContext(plugin, context)));
83
+ }, initial, ...args);
84
+ }
85
+
86
+ /**
87
+ * The row model the plugins admit: the first non-flat declaration, `custom`
88
+ * for a body transform that declares no model, otherwise `flat`.
89
+ */
90
+ function resolveRowModel(plugins) {
91
+ const modifier = plugins.find(plugin => plugin.rowModel !== 'flat' && (plugin.rowModel != null || plugin.transformBodyRow != null || plugin.transformBodyCell != null));
92
+ return modifier == null ? 'flat' : modifier.rowModel ?? 'custom';
93
+ }
94
+
72
95
  // =============================================================================
73
96
  // Memoized Table Row Component
74
97
  // =============================================================================
@@ -108,8 +131,18 @@ function TableRowInner({
108
131
  textOverflow,
109
132
  RowComponent,
110
133
  CellComponent,
134
+ renderContext,
111
135
  ariaRowIndex
112
136
  }) {
137
+ const context = useMemo(() => Object.freeze({
138
+ key: rowKey,
139
+ identityStatus: 'valid',
140
+ kind: renderContext.rowModel === 'flat' ? 'product' : 'unknown',
141
+ logicalIndex: rowIndex,
142
+ logicalRowCount: renderContext.logicalRowCount,
143
+ headerRowCount: renderContext.headerRowCount,
144
+ render: renderContext
145
+ }), [rowKey, rowIndex, renderContext]);
113
146
  // Build cells first
114
147
  const cells = columns.map((col, columnIndex) => {
115
148
  // Apply column alignment to body cells
@@ -125,7 +158,7 @@ function TableRowInner({
125
158
  columnIndex,
126
159
  columns: columns
127
160
  };
128
- const cellRenderProps = applyPlugins(plugins, p => p.transformBodyCell, initialBodyCellRenderProps, col, item, columnIndex, columns);
161
+ const cellRenderProps = applyRowPlugins(plugins, p => p.transformBodyCell, initialBodyCellRenderProps, context, col, item, columnIndex, columns);
129
162
  const isDefaultRenderer = !col.renderCell;
130
163
  let rawContent = null;
131
164
  if (!cellRenderProps.isContentSuppressed) {
@@ -157,7 +190,7 @@ function TableRowInner({
157
190
  // Apply plugin transforms for row (with pre-rendered children).
158
191
  // Seed `aria-rowindex` (when the table opts into ARIA row indexing) as a
159
192
  // base htmlProp so plugins compose over it and can still override.
160
- const rowRenderProps = applyPlugins(plugins, p => p.transformBodyRow, {
193
+ const rowRenderProps = applyRowPlugins(plugins, p => p.transformBodyRow, {
161
194
  htmlProps: ariaRowIndex == null ? {} : {
162
195
  'aria-rowindex': ariaRowIndex
163
196
  },
@@ -165,7 +198,7 @@ function TableRowInner({
165
198
  children: /*#__PURE__*/_jsx(_Fragment, {
166
199
  children: cells
167
200
  })
168
- }, item, rowIndex);
201
+ }, context, item, rowIndex);
169
202
  const row = /*#__PURE__*/_jsx(RowComponent, {
170
203
  ref: rowRenderProps.ref,
171
204
  ...rowRenderProps.htmlProps,
@@ -188,15 +221,22 @@ function TableRowInner({
188
221
  * Shallow compares the item object and checks if columns/plugins references changed.
189
222
  *
190
223
  * The row index reaches a row's output only through a plugin's
191
- * `transformBodyRow` (cells get no index), so it is compared only when some
192
- * plugin has one: a re-sort that moves rows then re-renders none of them
193
- * unless a plugin can show the index (row numbering, conditional formatting).
224
+ * `transformBodyRow`, or through a cell transform that reads the context's
225
+ * `logicalIndex`, so it is compared only for those plugins: a re-sort that
226
+ * moves rows then re-renders none of them unless a plugin can show the index
227
+ * (row numbering, conditional formatting). A changed row count re-renders
228
+ * rows only when a plugin has read a count.
194
229
  */
195
230
  function areRowPropsEqual(prevProps, nextProps) {
196
231
  if (prevProps.rowKey !== nextProps.rowKey) {
197
232
  return false;
198
233
  }
199
- if (prevProps.rowIndex !== nextProps.rowIndex && nextProps.plugins.some(plugin => plugin.transformBodyRow != null)) {
234
+ if (prevProps.rowIndex !== nextProps.rowIndex && nextProps.plugins.some(plugin => plugin.transformBodyRow != null || readsRowIndex(plugin))) {
235
+ return false;
236
+ }
237
+ const prevRender = prevProps.renderContext;
238
+ const nextRender = nextProps.renderContext;
239
+ if (prevRender !== nextRender && (prevRender.mode !== nextRender.mode || prevRender.rowModel !== nextRender.rowModel || prevRender.headerRowCount !== nextRender.headerRowCount || prevRender.viewport !== nextRender.viewport || prevRender.logicalRowCount !== nextRender.logicalRowCount && nextProps.plugins.some(readsRowCount))) {
200
240
  return false;
201
241
  }
202
242
  if (prevProps.ariaRowIndex !== nextProps.ariaRowIndex) {
@@ -305,6 +345,18 @@ function BaseTableInner({
305
345
  resolvedColumnsRef.current = transformedColumns;
306
346
  }
307
347
  const resolvedColumns = resolvedColumnsRef.current;
348
+ const mode = children ? 'children' : 'data';
349
+ const rowModel = resolveRowModel(plugins);
350
+ const logicalRowCount = data?.length ?? 0;
351
+ const headerRowCount = mode === 'data' && resolvedColumns.length > 0 ? 1 : 0;
352
+ const viewportRef = useRef(null);
353
+ const renderContext = useMemo(() => Object.freeze({
354
+ mode,
355
+ rowModel,
356
+ logicalRowCount,
357
+ headerRowCount,
358
+ viewport: viewportRef
359
+ }), [mode, rowModel, logicalRowCount, headerRowCount]);
308
360
 
309
361
  // Resolve all column widths in a single pass — produces per-column
310
362
  // inline styles and the aggregate table min-width.
@@ -457,6 +509,7 @@ function BaseTableInner({
457
509
  textOverflow: textOverflow,
458
510
  RowComponent: RowComponent,
459
511
  CellComponent: CellComponent,
512
+ renderContext: renderContext,
460
513
  ariaRowIndex: ariaRowIndexingEnabled ? firstRowAriaIndex + rowIndex : undefined
461
514
  }, rowKey);
462
515
  }) : data != null && emptyState !== false && /*#__PURE__*/_jsx("tr", {
@@ -480,13 +533,17 @@ function BaseTableInner({
480
533
  // Before rendering the wrapper, run the plugin `transformScrollWrapper`
481
534
  // pipeline so plugins can attach a ref to the scroll container (scroll-aware
482
535
  // sticky shadows, virtualization) and inject before/after chrome.
483
- if (ScrollWrapper) {
484
- const scrollWrapperRenderProps = applyPlugins(plugins, p => p.transformScrollWrapper, {
485
- htmlProps: {},
486
- xstyle: []
487
- });
536
+ const scrollWrapperRenderProps = ScrollWrapper ? applyPlugins(plugins, p => p.transformScrollWrapper, {
537
+ htmlProps: {},
538
+ xstyle: []
539
+ }, renderContext) : null;
540
+ const scrollWrapperRef = useMergedRefs(viewportRef, scrollWrapperRenderProps?.htmlProps.ref);
541
+ if (ScrollWrapper && scrollWrapperRenderProps) {
488
542
  tableElement = /*#__PURE__*/_jsx(ScrollWrapper, {
489
- htmlProps: scrollWrapperRenderProps.htmlProps,
543
+ htmlProps: {
544
+ ...scrollWrapperRenderProps.htmlProps,
545
+ ref: scrollWrapperRef
546
+ },
490
547
  xstyle: scrollWrapperRenderProps.xstyle,
491
548
  beforeTable: scrollWrapperRenderProps.beforeTable,
492
549
  afterTable: scrollWrapperRenderProps.afterTable,
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/Table/Table.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAA8B,KAAK,YAAY,EAAE,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAS/E,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,WAAW,EAEZ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,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAC,KACjD,YAAY,CAAC"}
@@ -16,7 +16,7 @@
16
16
  * - /apps/storybook/stories/Table.stories.tsx (storybook stories)
17
17
  * - /packages/cli/assets/templates/blocks/components/Table/ (showcase blocks)
18
18
  */
19
- import { createContext, use, useMemo } from 'react';
19
+ import { use, useMemo } from 'react';
20
20
  import * as stylex from '@stylexjs/stylex';
21
21
  import "../theme/tokens.stylex.js";
22
22
  import { colorVars } from "../theme/tokens.stylex.js";
@@ -28,6 +28,7 @@ import { mergeProps } from "../utils/index.js";
28
28
  import { themeProps } from "../utils/themeProps.js";
29
29
  import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
30
30
  import english from "../i18n/generated-english/Table/Table.generated.js";
31
+ import { createSharedContext } from "../utils/sharedContext.js";
31
32
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
32
33
  registerEnglishFallback(english);
33
34
 
@@ -80,7 +81,7 @@ const scrollWrapperStyles = {
80
81
  * Internal to Table: the scroll wrapper is not given it as a prop, so it adds
81
82
  * nothing to the public table types.
82
83
  */
83
- const TableNameContext = /*#__PURE__*/createContext(null);
84
+ const TableNameContext = createSharedContext('TableNameContext', 1, null);
84
85
  TableNameContext.displayName = 'TableNameContext';
85
86
  function TableScrollWrapper({
86
87
  children,
@@ -1 +1 @@
1
- {"version":3,"file":"TableContext.d.ts","sourceRoot":"","sources":["../../src/Table/TableContext.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC7C,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,kBAAkB,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC"}
1
+ {"version":3,"file":"TableContext.d.ts","sourceRoot":"","sources":["../../src/Table/TableContext.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC7C,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,kBAAkB,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,mDAIxB,CAAC"}
@@ -14,6 +14,6 @@
14
14
  * - /packages/core/src/Table/TableCell.tsx (consumer)
15
15
  * - /packages/core/src/Table/index.ts (exports if types change)
16
16
  */
17
- import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
18
- export const TableContext = createContext(null);
17
+ import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
18
+ export const TableContext = createLayerScopedContext('TableContext', 1, null);
19
19
  TableContext.displayName = 'TableContext';
@@ -48,7 +48,7 @@ export { resolveContextActions } from './tableContextMenu.js';
48
48
  export { useTableFiltering, useTableFilterState, toSearchFilters, } from './plugins/filtering/index.js';
49
49
  export { useBaseTablePlugins } from './useBaseTablePlugins.js';
50
50
  export { proportional, pixel, generateColumns, resolveColumnWidths, DEFAULT_MIN_COLUMN_WIDTH, } from './columnUtils.js';
51
- export type { TableColumn, TableColumnAlign, TableVerticalAlign, ColumnWidth, ProportionalWidth, PixelWidth, TablePlugin, TableContextAction, TableContextActions, TableRenderProps, HeaderRowRenderProps, HeaderCellRenderProps, BodyRowRenderProps, BodyCellRenderProps, ScrollWrapperRenderProps, BaseTableProps, } from './types.js';
51
+ export type { TableColumn, TableColumnAlign, TableVerticalAlign, ColumnWidth, ProportionalWidth, PixelWidth, TablePlugin, TableContextAction, TableContextActions, TableRenderProps, HeaderRowRenderProps, HeaderCellRenderProps, BodyRowRenderProps, BodyCellRenderProps, ScrollWrapperRenderProps, BaseTableProps, TableRenderContext, TableRowContext, } from './types.js';
52
52
  export type { TableProps, TableDensity, TableDividers, TableTextOverflow, } from './Table.js';
53
53
  export type { TableRowProps } from './TableRow.js';
54
54
  export type { TableCellProps } from './TableCell.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uCAAuC,CAAC;AAE/E,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,mBAAmB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,8DAA8D;AAC9D,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACxC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,SA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B,YAAY,EAAC,yBAAyB,EAAC,MAAM,SAAS,CAAC;AACvD,YAAY,EAAC,wBAAwB,EAAC,MAAM,sBAAsB,CAAC;AACnE,YAAY,EACV,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,iCAAiC,EACjC,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AACvE,YAAY,EAAC,2BAA2B,EAAC,MAAM,yBAAyB,CAAC;AACzE,YAAY,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AACvE,YAAY,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EACV,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAC,uBAAuB,EAAC,MAAM,qBAAqB,CAAC;AACjE,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTableFiltering.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/filtering/useTableFiltering.tsx"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EACV,WAAW,EAGZ,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EACV,iBAAiB,EAGjB,iBAAiB,EASlB,MAAM,4BAA4B,CAAC;AAapC,uFAAuF;AACvF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC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M,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,MAAM,EAAE,uBAAuB,GAC9B,WAAW,CAAC,CAAC,CAAC,CAiGhB"}
@@ -12,7 +12,7 @@
12
12
  * - /packages/core/src/Table/Table.doc.mjs (filtering documentation)
13
13
  * - /packages/core/src/Table/index.ts (exports)
14
14
  */
15
- import { createContext, use, useRef, useMemo, useState, useCallback } from 'react';
15
+ import { use, useRef, useMemo, useState, useCallback } from 'react';
16
16
  import * as stylex from '@stylexjs/stylex';
17
17
  import "../../../theme/tokens.stylex.js";
18
18
  import { spacingVars, radiusVars } from "../../../theme/tokens.stylex.js";
@@ -31,6 +31,7 @@ import { proportional } from "../../columnUtils.js";
31
31
  import { useLocale } from "../../../i18n/index.js";
32
32
  import { registerEnglishFallback, useComponentTranslator } from "../../../i18n/useComponentTranslator.js";
33
33
  import english from "../../../i18n/generated-english/Table/plugins/filtering/useTableFiltering.generated.js";
34
+ import { createSharedContext } from "../../../utils/sharedContext.js";
34
35
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
35
36
  registerEnglishFallback(english);
36
37
 
@@ -254,7 +255,7 @@ function tableValueToFilterValue(value, opValue) {
254
255
  // Filter Store & Context
255
256
  // =============================================================================
256
257
 
257
- const FilterStoreContext = /*#__PURE__*/createContext(null);
258
+ const FilterStoreContext = createSharedContext('FilterStoreContext', 1, null);
258
259
  FilterStoreContext.displayName = 'FilterStoreContext';
259
260
  function useFilterStore() {
260
261
  const store = use(FilterStoreContext);
@@ -266,7 +267,7 @@ function useFilterStore() {
266
267
 
267
268
  /** Variant is stable per plugin instance — kept in a separate context so
268
269
  * slot components can read it without going through the mutable store. */
269
- const FilterVariantContext = /*#__PURE__*/createContext('popover');
270
+ const FilterVariantContext = createSharedContext('FilterVariantContext', 1, 'popover');
270
271
  FilterVariantContext.displayName = 'FilterVariantContext';
271
272
 
272
273
  // =============================================================================
@@ -1 +1 @@
1
- {"version":3,"file":"useTableRowExpansion.d.ts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}
1
+ {"version":3,"file":"useTableRowExpansion.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/rowExpansion/useTableRowExpansion.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAKL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAwBf,OAAO,KAAK,EACV,WAAW,EAMZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,KAAK,cAAc,EAEpB,MAAM,gCAAgC,CAAC;AAqBxC;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3E,0CAA0C;IAC1C,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,kDAAkD;IAClD,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC/B;;;OAGG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IACvC;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAC3C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IACvC;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAkcD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACpC,WAAW,CAAC,CAAC,CAAC,CA6fhB"}
@@ -117,7 +117,7 @@ const expansionStyles = {
117
117
  k3aq6I: "x7p49u4 xaafvuh",
118
118
  $$css: true
119
119
  },
120
- expandedRow: {
120
+ mutedPanel: {
121
121
  kWkggS: "xwmxj5m",
122
122
  $$css: true
123
123
  },
@@ -348,6 +348,7 @@ function PanelDividerModeWatch({
348
348
  function ExpansionPanelCell({
349
349
  colSpan,
350
350
  cellsRef,
351
+ isMuted,
351
352
  children
352
353
  }) {
353
354
  const ctx = useTableContext();
@@ -394,7 +395,7 @@ function ExpansionPanelCell({
394
395
  return /*#__PURE__*/_jsx("td", {
395
396
  ref: cellRef,
396
397
  colSpan: colSpan,
397
- ...stylex.props(expansionStyles.expandedCell, panelIndentStyles[ctx?.density ?? 'balanced'], hasRowDividers && dividerStyles.panelCell, glidingDividerStyles.cell, hasRowDividers && glidingDividerStyles.panelCell),
398
+ ...stylex.props(expansionStyles.expandedCell, isMuted && expansionStyles.mutedPanel, panelIndentStyles[ctx?.density ?? 'balanced'], hasRowDividers && dividerStyles.panelCell, glidingDividerStyles.cell, hasRowDividers && glidingDividerStyles.panelCell),
398
399
  children: children
399
400
  });
400
401
  }
@@ -832,10 +833,11 @@ export function useTableRowExpansion(config) {
832
833
  ...stylex.props(
833
834
  // Carries the marker so the panel cell's divider can ask whether
834
835
  // this row is the table's last, the same way TableCell does.
835
- tableRowMarker, panelVariant === 'muted' && expansionStyles.expandedRow, glidingDividerStyles.row),
836
+ tableRowMarker, glidingDividerStyles.row),
836
837
  children: /*#__PURE__*/_jsx(ExpansionPanelCell, {
837
838
  colSpan: columnCountRef.current,
838
839
  cellsRef: panelCellsRef,
840
+ isMuted: panelVariant === 'muted',
839
841
  children: renderExpanded(item)
840
842
  })
841
843
  }, `${key}-expanded`);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @file useTableRowIndex.tsx
3
- * @input React, StyleX, Table types + the rendered data array
3
+ * @input React, StyleX, Table types, and each body row's TableRowContext
4
4
  * @output Exports useTableRowIndex hook + config type
5
5
  * @position Row-index plugin; consumed by Table via plugins prop
6
6
  *
@@ -12,22 +12,20 @@ import type { TablePlugin } from '../../types.js';
12
12
  /**
13
13
  * Configuration for {@link useTableRowIndex}.
14
14
  *
15
- * Astryx's `renderCell` receives only the row item (not its position), so the
16
- * plugin needs the rendered `data` array — the same array passed to
17
- * `<Table data>` — to derive each row's 1-based ordinal. Pass `getRowKey` when
18
- * items don't have a stable identity by reference (e.g. new objects each
19
- * render); it must return a **unique** string per row (duplicate keys collapse
20
- * to a single ordinal).
15
+ * Without `data`, the plugin numbers each body row from the position Table
16
+ * gives it. With `data`, numbers follow that array, as before.
21
17
  */
22
18
  export interface UseTableRowIndexConfig<T extends Record<string, unknown>> {
23
- /** The data array currently rendered by the table (post sort/filter/page). */
24
- data: T[];
25
19
  /**
26
- * Optional key extractor returning a **unique** string per row. When
27
- * provided, index lookup is keyed by the returned string (stable across new
28
- * object identities); otherwise items are matched by reference identity.
29
- * For a stable plugin identity across renders, memoize this with
30
- * `useCallback`.
20
+ * Optional: the array whose order the numbers follow. Omit it to number
21
+ * rows from the positions Table gives them.
22
+ */
23
+ data?: T[];
24
+ /**
25
+ * Optional key extractor returning a **unique** string per row, used with
26
+ * `data`. When provided, rows match `data` by the returned string (stable
27
+ * across new object identities); otherwise by reference identity. For a
28
+ * stable plugin identity across renders, memoize this with `useCallback`.
31
29
  */
32
30
  getRowKey?: (item: T) => string;
33
31
  /** Header label for the index column. @default '#' */
@@ -37,14 +35,14 @@ export interface UseTableRowIndexConfig<T extends Record<string, unknown>> {
37
35
  }
38
36
  /**
39
37
  * Returns a {@link TablePlugin} that prepends a right-aligned, monospaced
40
- * row-number column. Numbering follows the order of the rendered `data` array,
41
- * so it reflects the current sort / filter / pagination view.
38
+ * row-number column. Numbering follows the rows the table renders, so it
39
+ * reflects the current sort / filter / pagination view.
42
40
  *
43
41
  * @example
44
42
  * ```
45
- * const rowIndex = useTableRowIndex({data});
43
+ * const rowIndex = useTableRowIndex();
46
44
  * <Table data={data} columns={columns} idKey="id" plugins={{rowIndex}} />;
47
45
  * ```
48
46
  */
49
- export declare function useTableRowIndex<T extends Record<string, unknown>>(config: UseTableRowIndexConfig<T>): TablePlugin<T>;
47
+ export declare function useTableRowIndex<T extends Record<string, unknown>>(config?: UseTableRowIndexConfig<T>): TablePlugin<T>;
50
48
  //# sourceMappingURL=useTableRowIndex.d.ts.map