@astryxdesign/core 0.7.5-canary.10ca8ea → 0.7.5-canary.116f54b

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 (248) hide show
  1. package/dist/Chat/ChatComposer.d.ts.map +1 -1
  2. package/dist/Chat/ChatComposer.js +13 -23
  3. package/dist/CodeBlock/CodeBlock.d.ts +9 -1
  4. package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
  5. package/dist/CodeBlock/CodeBlock.js +27 -19
  6. package/dist/Dialog/Dialog.d.ts +4 -0
  7. package/dist/Dialog/Dialog.d.ts.map +1 -1
  8. package/dist/Dialog/Dialog.js +12 -5
  9. package/dist/EmptyState/EmptyState.d.ts +4 -2
  10. package/dist/EmptyState/EmptyState.d.ts.map +1 -1
  11. package/dist/EmptyState/EmptyState.js +6 -4
  12. package/dist/Layer/layerAnimations.stylex.d.ts +9 -5
  13. package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
  14. package/dist/Layer/layerAnimations.stylex.js +23 -10
  15. package/dist/Layer/layerSlideRules.d.ts +62 -2
  16. package/dist/Layer/layerSlideRules.d.ts.map +1 -1
  17. package/dist/Layer/layerSlideRules.js +124 -3
  18. package/dist/Layer/layerStack.d.ts +12 -9
  19. package/dist/Layer/layerStack.d.ts.map +1 -1
  20. package/dist/Layer/layerStack.js +116 -53
  21. package/dist/Layer/preserveAnimations.d.ts +11 -0
  22. package/dist/Layer/preserveAnimations.d.ts.map +1 -0
  23. package/dist/Layer/preserveAnimations.js +245 -0
  24. package/dist/Layer/useLayer.d.ts +19 -2
  25. package/dist/Layer/useLayer.d.ts.map +1 -1
  26. package/dist/Layer/useLayer.js +408 -10
  27. package/dist/Layer/useLayerDismissal.d.ts +10 -7
  28. package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
  29. package/dist/Layer/useLayerDismissal.js +8 -8
  30. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  31. package/dist/Lightbox/Lightbox.js +4 -1
  32. package/dist/Lightbox/LightboxKeyboard.a11y.browser.spec.js +1 -0
  33. package/dist/Markdown/Markdown.fr23.bench.js +3 -1
  34. package/dist/Markdown/Markdown.fr23.sampling.d.ts +16 -0
  35. package/dist/Markdown/Markdown.fr23.sampling.d.ts.map +1 -1
  36. package/dist/Markdown/Markdown.fr23.sampling.js +13 -4
  37. package/dist/Markdown/MarkdownTable.a11y.chromium.spec.js +1 -0
  38. package/dist/MobileNav/MobileNav.d.ts +2 -1
  39. package/dist/MobileNav/MobileNav.d.ts.map +1 -1
  40. package/dist/MobileNav/MobileNav.js +9 -5
  41. package/dist/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.js +1 -0
  42. package/dist/MultiSelector/CreateRow.a11y.chromium.spec.js +1 -0
  43. package/dist/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.js +1 -0
  44. package/dist/MultiSelector/OptionActions.a11y.chromium.spec.js +1 -0
  45. package/dist/Popover/usePopover.d.ts.map +1 -1
  46. package/dist/Popover/usePopover.js +3 -1
  47. package/dist/ScrollableArea/ScrollableArea.d.ts.map +1 -1
  48. package/dist/ScrollableArea/ScrollableArea.js +1 -1
  49. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  50. package/dist/Tokenizer/Tokenizer.js +13 -14
  51. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  52. package/dist/Tooltip/useTooltip.js +9 -3
  53. package/dist/astryx.css +11 -2
  54. package/dist/hooks/AnnounceRenderedText.d.ts +17 -0
  55. package/dist/hooks/AnnounceRenderedText.d.ts.map +1 -0
  56. package/dist/hooks/AnnounceRenderedText.js +32 -0
  57. package/dist/hooks/useAnnounceRenderedText.d.ts +19 -2
  58. package/dist/hooks/useAnnounceRenderedText.d.ts.map +1 -1
  59. package/dist/hooks/useAnnounceRenderedText.js +52 -11
  60. package/dist/hooks/useFocusTrap.d.ts +1 -1
  61. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  62. package/dist/hooks/useFocusTrap.js +44 -20
  63. package/dist/hooks/useMenuPress.d.ts +2 -1
  64. package/dist/hooks/useMenuPress.d.ts.map +1 -1
  65. package/dist/hooks/useMenuPress.js +46 -30
  66. package/dist/hooks/useScrollableArea.d.ts.map +1 -1
  67. package/dist/hooks/useScrollableArea.js +37 -5
  68. package/dist/reset.a11y.chromium.spec.js +1 -0
  69. package/dist/reset.until-found.a11y.browser.spec.js +1 -0
  70. package/dist/theme/index.d.ts +2 -2
  71. package/dist/theme/index.d.ts.map +1 -1
  72. package/dist/theme/index.js +1 -1
  73. package/dist/theme/themeAdaptations.d.ts +25 -1
  74. package/dist/theme/themeAdaptations.d.ts.map +1 -1
  75. package/dist/theme/themeAdaptations.js +30 -1
  76. package/dist/utils/edgeAutoscroll.d.ts +53 -0
  77. package/dist/utils/edgeAutoscroll.d.ts.map +1 -0
  78. package/dist/utils/edgeAutoscroll.js +81 -0
  79. package/package.json +4 -4
  80. package/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts +1 -0
  81. package/src/AppShell/AppShell.spec.md +329 -0
  82. package/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts +1 -0
  83. package/src/BottomSheet/BottomSheet.spec.md +4 -3
  84. package/src/BottomSheet/BottomSheetSwitcher.spec.md +24 -20
  85. package/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts +1 -0
  86. package/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts +1 -0
  87. package/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts +1 -0
  88. package/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts +1 -0
  89. package/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts +1 -0
  90. package/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts +1 -0
  91. package/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts +1 -0
  92. package/src/Button/Button.spec.md +320 -0
  93. package/src/Button/__tests__/Button.a11y.chromium.spec.ts +1 -0
  94. package/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts +1 -0
  95. package/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts +1 -0
  96. package/src/Chat/ChatComposer.test.tsx +22 -0
  97. package/src/Chat/ChatComposer.tsx +17 -23
  98. package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +1 -0
  99. package/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts +1 -0
  100. package/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts +1 -0
  101. package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +1 -0
  102. package/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts +1 -0
  103. package/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts +1 -0
  104. package/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts +1 -0
  105. package/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts +1 -0
  106. package/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts +1 -0
  107. package/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts +1 -0
  108. package/src/CodeBlock/CodeBlock.doc.mjs +17 -1
  109. package/src/CodeBlock/CodeBlock.spec.md +35 -23
  110. package/src/CodeBlock/CodeBlock.test.tsx +97 -1
  111. package/src/CodeBlock/CodeBlock.tsx +54 -22
  112. package/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts +76 -0
  113. package/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts +1 -0
  114. package/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts +1 -0
  115. package/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts +1 -0
  116. package/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts +1 -0
  117. package/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts +1 -0
  118. package/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts +1 -0
  119. package/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts +1 -0
  120. package/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts +1 -0
  121. package/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts +1 -0
  122. package/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts +1 -0
  123. package/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts +1 -0
  124. package/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts +1 -0
  125. package/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts +1 -0
  126. package/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts +18 -5
  127. package/src/Dialog/Dialog.doc.mjs +201 -47
  128. package/src/Dialog/Dialog.tsx +31 -7
  129. package/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts +1 -0
  130. package/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts +1 -0
  131. package/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts +191 -0
  132. package/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts +1 -0
  133. package/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts +1 -0
  134. package/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts +1 -0
  135. package/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts +1 -0
  136. package/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts +1 -0
  137. package/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts +1 -0
  138. package/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts +1 -0
  139. package/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts +1 -0
  140. package/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts +1 -0
  141. package/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts +1 -0
  142. package/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts +1 -0
  143. package/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts +1 -0
  144. package/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts +1 -0
  145. package/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts +1 -0
  146. package/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts +1 -0
  147. package/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts +1 -0
  148. package/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts +1 -0
  149. package/src/EmptyState/EmptyState.announce.test.tsx +227 -0
  150. package/src/EmptyState/EmptyState.doc.mjs +1 -1
  151. package/src/EmptyState/EmptyState.spec.md +22 -14
  152. package/src/EmptyState/EmptyState.test.tsx +8 -8
  153. package/src/EmptyState/EmptyState.tsx +7 -5
  154. package/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts +1 -0
  155. package/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts +1 -0
  156. package/src/IconButton/IconButton.spec.md +197 -0
  157. package/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts +1 -0
  158. package/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts +1 -0
  159. package/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts +176 -0
  160. package/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts +1 -0
  161. package/src/Layer/layerAnimations.stylex.ts +22 -2
  162. package/src/Layer/layerSlideRules.ts +141 -8
  163. package/src/Layer/layerStack.ts +129 -62
  164. package/src/Layer/preserveAnimations.ts +304 -0
  165. package/src/Layer/useLayer.test.tsx +635 -0
  166. package/src/Layer/useLayer.tsx +485 -15
  167. package/src/Layer/useLayerDismissal.test.tsx +85 -2
  168. package/src/Layer/useLayerDismissal.ts +12 -9
  169. package/src/Layout/__tests__/Layout.a11y.chromium.spec.ts +1 -0
  170. package/src/Lightbox/Lightbox.tsx +3 -0
  171. package/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts +1 -0
  172. package/src/Link/__tests__/Link.a11y.chromium.spec.ts +1 -0
  173. package/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts +1 -0
  174. package/src/Markdown/Markdown.fr23.bench.ts +3 -1
  175. package/src/Markdown/Markdown.fr23.perf.test.ts +45 -3
  176. package/src/Markdown/Markdown.fr23.sampling.ts +13 -4
  177. package/src/Markdown/MarkdownTable.a11y.chromium.spec.ts +1 -0
  178. package/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts +1 -0
  179. package/src/MobileNav/MobileNav.test.tsx +27 -10
  180. package/src/MobileNav/MobileNav.tsx +10 -3
  181. package/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts +1 -0
  182. package/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts +103 -0
  183. package/src/MultiSelector/CreateRow.a11y.chromium.spec.ts +1 -0
  184. package/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts +1 -0
  185. package/src/MultiSelector/OptionActions.a11y.chromium.spec.ts +1 -0
  186. package/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts +1 -0
  187. package/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts +1 -0
  188. package/src/Popover/Popover.test.tsx +197 -2
  189. package/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts +205 -0
  190. package/src/Popover/usePopover.tsx +3 -1
  191. package/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts +1 -0
  192. package/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts +1 -0
  193. package/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts +1 -0
  194. package/src/ScrollableArea/ScrollableArea.spec.md +6 -5
  195. package/src/ScrollableArea/ScrollableArea.test.tsx +5 -0
  196. package/src/ScrollableArea/ScrollableArea.tsx +4 -0
  197. package/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts +1 -0
  198. package/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts +1 -0
  199. package/src/Selector/__tests__/Selector.a11y.chromium.spec.ts +1 -0
  200. package/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts +1 -0
  201. package/src/Skeleton/Skeleton.spec.md +99 -42
  202. package/src/Slider/__tests__/Slider.a11y.chromium.spec.ts +1 -0
  203. package/src/Spinner/Spinner.spec.md +231 -0
  204. package/src/StatusDot/StatusDot.spec.md +143 -51
  205. package/src/Switch/__tests__/Switch.a11y.chromium.spec.ts +1 -0
  206. package/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts +1 -0
  207. package/src/Table/__tests__/Table.a11y.chromium.spec.ts +1 -0
  208. package/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts +1 -0
  209. package/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts +1 -0
  210. package/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts +1 -0
  211. package/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts +1 -0
  212. package/src/Token/Token.spec.md +271 -0
  213. package/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts +1 -0
  214. package/src/Tokenizer/Tokenizer.test.tsx +44 -8
  215. package/src/Tokenizer/Tokenizer.tsx +14 -17
  216. package/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts +1 -0
  217. package/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts +1 -0
  218. package/src/Tooltip/Tooltip.test.tsx +23 -0
  219. package/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts +1 -0
  220. package/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts +1 -0
  221. package/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts +1 -0
  222. package/src/Tooltip/__tests__/TooltipTallContent.a11y.browser.spec.ts +646 -0
  223. package/src/Tooltip/__tests__/TooltipTallContentTracking.a11y.browser.spec.ts +1162 -0
  224. package/src/Tooltip/useTooltip.tsx +7 -2
  225. package/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts +1 -0
  226. package/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts +1 -0
  227. package/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts +1 -0
  228. package/src/__tests__/CardPress.a11y.chromium.spec.ts +1 -0
  229. package/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts +1 -0
  230. package/src/__tests__/PressedState.a11y.chromium.spec.ts +1 -0
  231. package/src/hooks/AnnounceRenderedText.tsx +27 -0
  232. package/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts +1 -0
  233. package/src/hooks/useAnnounceRenderedText.adopters.test.tsx +204 -0
  234. package/src/hooks/useAnnounceRenderedText.ts +81 -11
  235. package/src/hooks/useFocusTrap.test.tsx +71 -2
  236. package/src/hooks/useFocusTrap.ts +46 -21
  237. package/src/hooks/useMenuPress.ts +60 -34
  238. package/src/hooks/useScrollableArea.test.tsx +159 -0
  239. package/src/hooks/useScrollableArea.ts +39 -5
  240. package/src/reset.a11y.chromium.spec.ts +1 -0
  241. package/src/reset.until-found.a11y.browser.spec.ts +1 -0
  242. package/src/serverSafeComponents.test.ts +10 -0
  243. package/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts +1 -0
  244. package/src/theme/index.ts +3 -0
  245. package/src/theme/themeAdaptations.test.ts +37 -0
  246. package/src/theme/themeAdaptations.ts +43 -1
  247. package/src/utils/edgeAutoscroll.test.ts +192 -0
  248. package/src/utils/edgeAutoscroll.ts +111 -0
@@ -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;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;AAkND;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAmOpD;yBAnOe,YAAY"}
@@ -22,7 +22,7 @@
22
22
  * - /apps/storybook/stories/ChatComposer.stories.tsx
23
23
  * - /packages/cli/assets/templates/blocks/components/ChatComposer/ (block examples)
24
24
  */
25
- import React, { useState, useCallback, useEffect, useRef, useMemo } from 'react';
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
28
  import { colorVars, spacingVars, radiusVars, shadowVars, durationVars, easeVars, borderVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
@@ -33,7 +33,7 @@ import { ChatComposerContext } from "./ChatContext.js";
33
33
  import { ChatSendButton } from "./ChatSendButton.js";
34
34
  import { themeProps } from "../utils/themeProps.js";
35
35
  import { useTranslator } from "../i18n/index.js";
36
- import { useAnnounce } from "../hooks/useAnnounce.js";
36
+ import { useAnnounceRenderedText } from "../hooks/useAnnounceRenderedText.js";
37
37
  import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
38
38
  import { getInteractionModality, useInteractionModalityTracking } from "../utils/interactionModality.js";
39
39
 
@@ -194,28 +194,18 @@ export function ChatComposer(props) {
194
194
  }, []);
195
195
 
196
196
  // The status bar mounts together with its message, and a live region born
197
- // holding its text is not reliably announced, so the message goes through
198
- // the shared channel instead: errors assertively, warnings politely
199
- // (spec:AST-086 FR2, FR5). The ref keeps a rerender or a StrictMode effect
200
- // replay from repeating it; clearing the status re-arms it, so the same
201
- // message shown again is a new occasion (FR6).
202
- const announce = useAnnounce();
203
- const statusType = status?.type;
204
- const statusMessage = status?.message;
205
- const announcedStatusRef = useRef(null);
206
- useEffect(() => {
207
- if (!statusMessage) {
208
- announcedStatusRef.current = null;
209
- return;
210
- }
211
- const occasion = `${statusType}\u0000${statusMessage}`;
212
- if (announcedStatusRef.current === occasion) {
213
- return;
214
- }
215
- announcedStatusRef.current = occasion;
216
- announce(statusMessage, statusType === 'error' ? 'assertive' : 'polite');
217
- }, [announce, statusType, statusMessage]);
197
+ // holding its text is not reliably announced, so the shared own-content
198
+ // module announces what the bar renders: errors assertively, warnings
199
+ // politely, once per occasion, silent for a status already shown when the
200
+ // page loads (spec:AST-086 FR2, FR5, FR6, FR11; react-component-runtime
201
+ // INV10). Changing the status type is a new occasion; clearing it re-arms.
202
+ const statusRef = useRef(null);
203
+ useAnnounceRenderedText(statusRef, Boolean(status?.message), status?.type ?? '', {
204
+ skipFirstRender: true,
205
+ politeness: status?.type === 'error' ? 'assertive' : 'polite'
206
+ });
218
207
  const statusEl = status ? /*#__PURE__*/_jsxs("div", {
208
+ ref: statusRef,
219
209
  ...{
220
210
  0: {
221
211
  className: "x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c"
@@ -20,6 +20,14 @@ export interface CodeBlockProps extends BaseProps<HTMLPreElement> {
20
20
  isDiff?: boolean;
21
21
  hasCopyButton?: boolean;
22
22
  onCopy?: () => void;
23
+ /**
24
+ * Your own controls, shown just before Copy: in the header when the block
25
+ * has one, otherwise beside the code in the top inline-end corner, never
26
+ * over it. It never creates a header, and activating it never collapses the
27
+ * block. You own each control's label, state, and action; ghost `sm`
28
+ * IconButtons match Copy.
29
+ */
30
+ endContent?: React.ReactNode;
23
31
  isWrapped?: boolean;
24
32
  maxHeight?: number | string;
25
33
  isCollapsible?: boolean;
@@ -67,7 +75,7 @@ export interface CodeBlockProps extends BaseProps<HTMLPreElement> {
67
75
  * <CodeBlock code="const x = 42;" language="javascript" />
68
76
  * ```
69
77
  */
70
- export declare function CodeBlock({ code, language, title, hasLanguageLabel, hasLineNumbers, highlightLines, isDiff, hasCopyButton, onCopy, isWrapped, maxHeight, isCollapsible, collapsibleThreshold, size, width: widthProp, container, tokenizer: customTokenizer, highlightMode, syntaxTheme, xstyle, className, style, ref, ...props }: CodeBlockProps): React.JSX.Element;
78
+ export declare function CodeBlock({ code, language, title, hasLanguageLabel, hasLineNumbers, highlightLines, isDiff, hasCopyButton, onCopy, endContent, isWrapped, maxHeight, isCollapsible, collapsibleThreshold, size, width: widthProp, container, tokenizer: customTokenizer, highlightMode, syntaxTheme, xstyle, className, style, ref, ...props }: CodeBlockProps): React.JSX.Element;
71
79
  export declare namespace CodeBlock {
72
80
  var displayName: string;
73
81
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.d.ts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AAC;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,KACb;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAClD,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC;AA0SD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAsB,EACtB,KAAK,EACL,gBAAuB,EACvB,cAAsB,EACtB,cAAc,EACd,MAAc,EACd,aAAoB,EACpB,MAAM,EACN,UAAU,EACV,SAAiB,EACjB,SAAS,EACT,aAAqB,EACrB,oBAAyB,EACzB,IAAW,EACX,KAAK,EAAE,SAAyB,EAChC,SAAkB,EAClB,SAAS,EAAE,eAAe,EAC1B,aAAsB,EACtB,WAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,cAAc,qBAsShB;yBAhUe,SAAS"}
@@ -12,8 +12,8 @@ import { useInsertionEffect, useEffect, useId, useRef, useState, useCallback, us
12
12
  import * as React from 'react';
13
13
  import * as stylex from '@stylexjs/stylex';
14
14
  import "../theme/tokens.stylex.js";
15
- import { colorVars, spacingVars, radiusVars, typographyVars, fontWeightVars, typeScaleVars, borderVars, durationVars, easeVars, sizeVars } from "../theme/tokens.stylex.js";
16
- import { mergeProps } from "../utils/index.js";
15
+ import { colorVars, spacingVars, radiusVars, typographyVars, fontWeightVars, typeScaleVars, borderVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
16
+ import { isRenderable, mergeProps } from "../utils/index.js";
17
17
  import { useClipboard } from "../hooks/useClipboard.js";
18
18
  import { useScrollableArea } from "../hooks/useScrollableArea.js";
19
19
  import { Icon } from "../Icon/index.js";
@@ -219,19 +219,6 @@ const styles = {
219
219
  copyButton: {
220
220
  kMwMTN: "x1mjzq1q",
221
221
  $$css: true
222
- },
223
- copyButtonCorner: {
224
- kSGwAc: "x1y8v6su",
225
- kUOVxO: "x16j26i2",
226
- $$css: true
227
- },
228
- copyButtonCornerMd: {
229
- keoZOQ: "x11xk4k4",
230
- $$css: true
231
- },
232
- copyButtonCornerSm: {
233
- keoZOQ: "x1t6j4wq",
234
- $$css: true
235
222
  }
236
223
  };
237
224
 
@@ -556,6 +543,7 @@ export function CodeBlock({
556
543
  isDiff = false,
557
544
  hasCopyButton = true,
558
545
  onCopy,
546
+ endContent,
559
547
  isWrapped = false,
560
548
  maxHeight,
561
549
  isCollapsible = false,
@@ -646,6 +634,11 @@ export function CodeBlock({
646
634
  const scrollStyle = maxHeight != null ? {
647
635
  maxHeight: typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight
648
636
  } : undefined;
637
+
638
+ // Caller controls render before Copy; together they are the block's controls,
639
+ // in the header when there is one and in the corner cluster otherwise.
640
+ const hasEndContent = isRenderable(endContent);
641
+ const hasControls = hasCopyButton || hasEndContent;
649
642
  const copyButtonEl = hasCopyButton ? /*#__PURE__*/_jsx(IconButton, {
650
643
  variant: "ghost",
651
644
  size: "sm",
@@ -666,7 +659,7 @@ export function CodeBlock({
666
659
  e.stopPropagation();
667
660
  void handleCopy();
668
661
  },
669
- xstyle: [styles.copyButton, !showHeader && styles.copyButtonCorner, !showHeader && (size === 'sm' ? styles.copyButtonCornerSm : styles.copyButtonCornerMd)],
662
+ xstyle: styles.copyButton,
670
663
  ...themeProps('code-block-copy-button')
671
664
  }) : null;
672
665
  const headerEl = showHeader ? /*#__PURE__*/_jsxs("div", {
@@ -715,7 +708,12 @@ export function CodeBlock({
715
708
  })
716
709
  }), title, title && languageLabel ? ' — ' : '', languageLabel]
717
710
  })
718
- }), copyButtonEl]
711
+ }), hasControls ? /*#__PURE__*/_jsxs("div", {
712
+ ...{
713
+ className: "x78zum5 x6s0dn4 xzye2dw x2lah0s"
714
+ },
715
+ children: [hasEndContent ? endContent : null, copyButtonEl]
716
+ }) : null]
719
717
  }) : null;
720
718
  const codeBody = /*#__PURE__*/_jsx("div", {
721
719
  ...getViewportProps({
@@ -761,7 +759,7 @@ export function CodeBlock({
761
759
  size,
762
760
  language,
763
761
  container
764
- }), stylex.props(styles.root, hasCopyButton && !showHeader && styles.rootCorner, dynamicStyles.width(widthProp), containerStyles[container], xstyle), className, style),
762
+ }), stylex.props(styles.root, hasControls && !showHeader && styles.rootCorner, dynamicStyles.width(widthProp), containerStyles[container], xstyle), className, style),
765
763
  ...props,
766
764
  children: [headerEl, canCollapse ? /*#__PURE__*/_jsx("div", {
767
765
  id: regionId
@@ -786,7 +784,17 @@ export function CodeBlock({
786
784
  },
787
785
  children: codeBody
788
786
  })
789
- }) : codeBody, !showHeader && copyButtonEl]
787
+ }) : codeBody, hasControls && !showHeader ? /*#__PURE__*/_jsxs("div", {
788
+ ...{
789
+ 0: {
790
+ className: "x78zum5 x6s0dn4 xzye2dw x1y8v6su x16j26i2 xlgwz2i"
791
+ },
792
+ 1: {
793
+ className: "x78zum5 x6s0dn4 xzye2dw x1y8v6su x16j26i2 x166xdbf"
794
+ }
795
+ }[!!(size === 'sm') << 0],
796
+ children: [hasEndContent ? endContent : null, copyButtonEl]
797
+ }) : null]
790
798
  });
791
799
  return syntaxTheme ? /*#__PURE__*/_jsx(SyntaxTheme, {
792
800
  theme: syntaxTheme,
@@ -12,6 +12,10 @@
12
12
  * while preserving explicit prop/theme padding overrides, and fade in without
13
13
  * the centered-dialog translate/scale motion.
14
14
  *
15
+ * Under reduced motion the entrance never travels or scales
16
+ * (docs/design/reduced-motion.md): on a touch screen the dialog fades in
17
+ * where it lands, in 200 ms or less; with a mouse it appears at once.
18
+ *
15
19
  * Initial focus and the focus returned on close follow the last input
16
20
  * (docs/architecture/interaction-modality.md INV1): the shared focus indicator
17
21
  * is hidden after a pointer press and shown after a key press.
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA2B5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAMhD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAyB9C;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,4EAA4E;AAC5E,UAAU,mBAAmB;IAC3B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAuBD,2FAA2F;AAC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AAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,QAAgB,EAChB,YAAY,EACZ,KAAW,EACX,SAAmB,EACnB,QAAQ,EACR,OAAoB,EACpB,OAAgB,EAChB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,sCA+Vb;yBA/We,MAAM"}
@@ -16,6 +16,10 @@
16
16
  * while preserving explicit prop/theme padding overrides, and fade in without
17
17
  * the centered-dialog translate/scale motion.
18
18
  *
19
+ * Under reduced motion the entrance never travels or scales
20
+ * (docs/design/reduced-motion.md): on a touch screen the dialog fades in
21
+ * where it lands, in 200 ms or less; with a mouse it appears at once.
22
+ *
19
23
  * Initial focus and the focus returned on close follow the last input
20
24
  * (docs/architecture/interaction-modality.md INV1): the shared focus indicator
21
25
  * is hidden after a pointer press and shown after a key press.
@@ -133,15 +137,15 @@ const styles = {
133
137
  kZKoxP: "xg7h5cd",
134
138
  kZeWKH: "xish69e",
135
139
  kSiTet: "xg01cxk",
136
- k44tkh: "xqgcaz",
137
- kyAemX: "x128ha8g",
140
+ k44tkh: "xqgcaz x1jq6yc9",
141
+ kyAemX: "x128ha8g xr5m3f0",
138
142
  kWV6AL: "xskzprw",
139
143
  $$css: true
140
144
  },
141
145
  open: {
142
146
  k1xSpc: "x78zum5",
143
147
  kSiTet: "x1hc1fzr",
144
- kKVMdj: "x1ewfqum x1aquc0h",
148
+ kKVMdj: "x1ewfqum x6mpr79 xtuz6mp",
145
149
  $$css: true
146
150
  },
147
151
  backdrop: {
@@ -160,7 +164,7 @@ const styles = {
160
164
  $$css: true
161
165
  },
162
166
  fullscreenOpen: {
163
- kKVMdj: "xqcmdr3 x1aquc0h",
167
+ kKVMdj: "xqcmdr3 x6mpr79 xtuz6mp",
164
168
  $$css: true
165
169
  },
166
170
  fullscreenSafeArea: {
@@ -441,7 +445,10 @@ export function Dialog({
441
445
  escapeBehavior: allowEscape ? 'close' : 'block',
442
446
  onDismiss: () => {
443
447
  onOpenChange(false);
444
- }
448
+ },
449
+ // The dialog's document is this layer's: rendered into an iframe or a
450
+ // Picture-in-Picture window, it ranks with the layers opened inside it.
451
+ getContainer: () => dialogRef.current
445
452
  });
446
453
 
447
454
  // Dev-time guardrail: an open modal should always have an accessible name.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @file EmptyState.tsx
3
- * @input Uses React, HTMLAttributes
3
+ * @input Uses React, HTMLAttributes, AnnounceRenderedText
4
4
  * @output Exports EmptyState component, EmptyStateProps type
5
5
  * @position Core implementation; consumed by index.ts
6
6
  *
@@ -53,7 +53,9 @@ export interface EmptyStateProps extends BaseProps<HTMLDivElement> {
53
53
  * An empty state placeholder for content areas with no data.
54
54
  * Displays an icon or illustration, title, optional description, and action buttons.
55
55
  *
56
- * Uses `role="status"` to announce content to screen readers.
56
+ * Not a live region. Its title and description are announced once when they
57
+ * appear or change after the page loaded, never when the page first renders
58
+ * with them (`spec:AST-086` FR2).
57
59
  * Styles use Astryx theme tokens via StyleX. Wrap your app in <Theme> to apply a theme.
58
60
  *
59
61
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../src/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GA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AAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,OAAO,EACP,YAAgB,EAChB,SAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,eAAe,+BAmDjB;yBA/De,UAAU"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @file EmptyState.tsx
5
- * @input Uses React, HTMLAttributes
5
+ * @input Uses React, HTMLAttributes, AnnounceRenderedText
6
6
  * @output Exports EmptyState component, EmptyStateProps type
7
7
  * @position Core implementation; consumed by index.ts
8
8
  *
@@ -18,6 +18,7 @@ import { createElement } from 'react';
18
18
  import * as stylex from '@stylexjs/stylex';
19
19
  import "../theme/tokens.stylex.js";
20
20
  import { colorVars, spacingVars, fontWeightVars, typeScaleVars } from "../theme/tokens.stylex.js";
21
+ import { AnnounceRenderedText } from "../hooks/AnnounceRenderedText.js";
21
22
  import { isRenderable, mergeProps } from "../utils/index.js";
22
23
  import { themeProps } from "../utils/themeProps.js";
23
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -44,7 +45,9 @@ const styles = {
44
45
  * An empty state placeholder for content areas with no data.
45
46
  * Displays an icon or illustration, title, optional description, and action buttons.
46
47
  *
47
- * Uses `role="status"` to announce content to screen readers.
48
+ * Not a live region. Its title and description are announced once when they
49
+ * appear or change after the page loaded, never when the page first renders
50
+ * with them (`spec:AST-086` FR2).
48
51
  * Styles use Astryx theme tokens via StyleX. Wrap your app in <Theme> to apply a theme.
49
52
  *
50
53
  * @example
@@ -78,14 +81,13 @@ export function EmptyState({
78
81
  return /*#__PURE__*/_jsxs("div", {
79
82
  ref: ref,
80
83
  ...props,
81
- role: "status",
82
84
  ...mergeProps(themeProps('empty-state', {
83
85
  variant: isCompact ? 'compact' : null
84
86
  }), stylex.props(styles.container, isCompact && styles.containerCompact, xstyle), className, style),
85
87
  children: [isRenderable(icon) && /*#__PURE__*/_jsx("div", {
86
88
  "aria-hidden": "true",
87
89
  children: icon
88
- }), /*#__PURE__*/_jsxs("div", {
90
+ }), /*#__PURE__*/_jsxs(AnnounceRenderedText, {
89
91
  ...{
90
92
  className: "x78zum5 xdt5ytf x6s0dn4 xxc7z9f"
91
93
  },
@@ -32,29 +32,33 @@ import * as stylex from '@stylexjs/stylex';
32
32
  *
33
33
  * Each entry disables its keyframe animation under
34
34
  * `prefers-reduced-motion: reduce` so the layer appears instantly instead of
35
- * translating/scaling in (infra-6).
35
+ * translating/scaling in (infra-6). Under a finger (the primary pointer is
36
+ * coarse) it fades in instead, opacity only and in 200 ms or less: on a touch
37
+ * screen Reduce Motion replaces motion with a cross-fade rather than a jump
38
+ * (design:reduced-motion DR2, DR3), as iOS does for its menus, popovers and
39
+ * tips.
36
40
  */
37
41
  export declare const layerAnimations: Readonly<{
38
42
  readonly below: Readonly<{
39
- readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", "230ms">;
43
+ readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", string>;
40
44
  readonly animationTimingFunction: stylex.StyleXClassNameFor<"animationTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
41
45
  readonly animationFillMode: stylex.StyleXClassNameFor<"animationFillMode", "backwards">;
42
46
  readonly animationName: stylex.StyleXClassNameFor<"animationName", string>;
43
47
  }>;
44
48
  readonly above: Readonly<{
45
- readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", "230ms">;
49
+ readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", string>;
46
50
  readonly animationTimingFunction: stylex.StyleXClassNameFor<"animationTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
47
51
  readonly animationFillMode: stylex.StyleXClassNameFor<"animationFillMode", "backwards">;
48
52
  readonly animationName: stylex.StyleXClassNameFor<"animationName", string>;
49
53
  }>;
50
54
  readonly end: Readonly<{
51
- readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", "230ms">;
55
+ readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", string>;
52
56
  readonly animationTimingFunction: stylex.StyleXClassNameFor<"animationTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
53
57
  readonly animationFillMode: stylex.StyleXClassNameFor<"animationFillMode", "backwards">;
54
58
  readonly animationName: stylex.StyleXClassNameFor<"animationName", string>;
55
59
  }>;
56
60
  readonly start: Readonly<{
57
- readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", "230ms">;
61
+ readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", string>;
58
62
  readonly animationTimingFunction: stylex.StyleXClassNameFor<"animationTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
59
63
  readonly animationFillMode: stylex.StyleXClassNameFor<"animationFillMode", "backwards">;
60
64
  readonly animationName: stylex.StyleXClassNameFor<"animationName", string>;
@@ -1 +1 @@
1
- {"version":3,"file":"layerAnimations.stylex.d.ts","sourceRoot":"","sources":["../../src/Layer/layerAnimations.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AA8D3C;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;EA+B1B,CAAC"}
1
+ {"version":3,"file":"layerAnimations.stylex.d.ts","sourceRoot":"","sources":["../../src/Layer/layerAnimations.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AA0E3C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;EAmC1B,CAAC"}
@@ -41,8 +41,17 @@ const enterStart = "xu7jd1z-B";
41
41
  // (translateY) entrances are direction-neutral and are left as-is.
42
42
  const enterEndRtl = "xu7jd1z-B";
43
43
  const enterStartRtl = "xwmkjkf-B";
44
+
45
+ // Reduce Motion under a finger: the same entrance without its travel. A touch
46
+ // presentation substitutes a cross-fade for motion, never a jump.
47
+ const fadeIn = "x18re5ia-B";
44
48
  const animationBase = {
45
- animationDuration: durationVars['--duration-fast-max'],
49
+ animationDuration: {
50
+ default: durationVars['--duration-fast-max'],
51
+ // The cross-fade is 200 ms or less, whatever the theme's duration
52
+ // (design:reduced-motion DR2).
53
+ '@media (prefers-reduced-motion: reduce) and (pointer: coarse)': `min(${durationVars['--duration-fast-max']}, 200ms)`
54
+ },
46
55
  animationTimingFunction: easeVars['--ease-standard'],
47
56
  animationFillMode: 'backwards'
48
57
  };
@@ -55,33 +64,37 @@ const animationBase = {
55
64
  *
56
65
  * Each entry disables its keyframe animation under
57
66
  * `prefers-reduced-motion: reduce` so the layer appears instantly instead of
58
- * translating/scaling in (infra-6).
67
+ * translating/scaling in (infra-6). Under a finger (the primary pointer is
68
+ * coarse) it fades in instead, opacity only and in 200 ms or less: on a touch
69
+ * screen Reduce Motion replaces motion with a cross-fade rather than a jump
70
+ * (design:reduced-motion DR2, DR3), as iOS does for its menus, popovers and
71
+ * tips.
59
72
  */
60
73
  export const layerAnimations = {
61
74
  below: {
62
- kKVMdj: "xl1vlw0 x1aquc0h",
63
- k44tkh: "x9uej1z",
75
+ kKVMdj: "xl1vlw0 xa4pr1u xajy0lc",
76
+ k44tkh: "x9uej1z x13pi3j7",
64
77
  kyAemX: "x128ha8g",
65
78
  kWV6AL: "xskzprw",
66
79
  $$css: true
67
80
  },
68
81
  above: {
69
- kKVMdj: "x3psbcj x1aquc0h",
70
- k44tkh: "x9uej1z",
82
+ kKVMdj: "x3psbcj xa4pr1u xajy0lc",
83
+ k44tkh: "x9uej1z x13pi3j7",
71
84
  kyAemX: "x128ha8g",
72
85
  kWV6AL: "xskzprw",
73
86
  $$css: true
74
87
  },
75
88
  end: {
76
- kKVMdj: "x1i331go x1vxsm5i x1aquc0h",
77
- k44tkh: "x9uej1z",
89
+ kKVMdj: "x1i331go x1vxsm5i xa4pr1u xajy0lc",
90
+ k44tkh: "x9uej1z x13pi3j7",
78
91
  kyAemX: "x128ha8g",
79
92
  kWV6AL: "xskzprw",
80
93
  $$css: true
81
94
  },
82
95
  start: {
83
- kKVMdj: "xck01x9 x18lne9g x1aquc0h",
84
- k44tkh: "x9uej1z",
96
+ kKVMdj: "xck01x9 x18lne9g xa4pr1u xajy0lc",
97
+ k44tkh: "x9uej1z x13pi3j7",
85
98
  kyAemX: "x128ha8g",
86
99
  kWV6AL: "xskzprw",
87
100
  $$css: true
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * @file layerSlideRules.ts
3
3
  * @input A layer's placement and alignment
4
- * @output The `@position-try` rules for its slide options and their names
4
+ * @output The `@position-try` rules for its slide options and their names, and
5
+ * the beside and fit options of a layer that must never settle over its
6
+ * anchor
5
7
  * @position Layer runtime geometry; the slide of spec:AST-059 FR4
6
8
  *
7
9
  * The slide is a position option whose area spans the whole alignment axis,
@@ -14,6 +16,23 @@
14
16
  * gutter on both alignment-axis edges, and the clearance facing the anchor
15
17
  * with the gutter on the far edge of the side it lands on.
16
18
  *
19
+ * A layer that must never settle over its anchor (spec:AST-059 FR4, Tooltip)
20
+ * has a second fallback list, for when its settled box covers its anchor:
21
+ * content taller than the room above and below its trigger. `beside` lands on a
22
+ * side across the alignment axis, spanning the whole block axis, at the
23
+ * content's own inline size, so it fits only where the layer fits without
24
+ * squeezing. `fit` lands above or below sized to the room on that side, so
25
+ * overflow scrolls inside the layer, and is never smaller than half of the room
26
+ * the trigger leaves on the block axis, so it fits only on the side with more
27
+ * room; the list tries both only after the layer's own position, `beside` and
28
+ * the opposite side at the layer's own size, so only content taller than the
29
+ * room on both sides is sized to a room. No option is sized to whatever room
30
+ * is left: a browser keeps a layer on the option it last used for as long as
31
+ * that option still fits, so such an option would hold an open layer on a side
32
+ * shrunk to a sliver after its anchor moved. Chromium applies a position
33
+ * option's width and height properties but not their min/max forms, so the
34
+ * sizes are `inline-size` and `block-size`.
35
+ *
17
36
  * The rules are static — the anchor clearance travels through a custom
18
37
  * property — so one style sheet per document carries all of them. It is
19
38
  * installed from a layout effect, before the layer's first paint, rather than
@@ -27,7 +46,48 @@ import type { LayerAlignment, LayerPlacement } from './useLayer.js';
27
46
  export declare const LAYER_CLEARANCE_PROPERTY = "--_astryx-layer-clearance";
28
47
  type Side = 'same' | 'opposite';
29
48
  export declare function slideRuleName(placement: LayerPlacement, alignment: LayerAlignment, side: Side): string;
30
- /** Every slide rule, for every placement and alignment. */
49
+ /** The name of the `beside` option that lands on `side`, across the block axis. */
50
+ export declare function besideRuleName(side: 'start' | 'end'): string;
51
+ /**
52
+ * The name of the `fit` option that lands on `side` sized to the room there,
53
+ * which fits only while that side holds at least half of the room the trigger
54
+ * leaves on the block axis.
55
+ */
56
+ export declare function fitRuleName(side: 'above' | 'below'): string;
57
+ /**
58
+ * The fallback list of a layer that must never settle over its anchor, once
59
+ * the standard list has failed it (FR4). After the layer's own position (the
60
+ * preferred block side, at its own size): beside the trigger on the inline
61
+ * end, then the inline start, then the opposite block side at its own size,
62
+ * and only then the preferred block side and the opposite one sized to the
63
+ * room there, each only while it is the roomier side. Every option before the
64
+ * last two keeps the layer at its own size, so a layer whose content fits
65
+ * somewhere is never stretched to a room; the last two are for content taller
66
+ * than the room on both sides. Chromium tries no more than five options, so
67
+ * this replaces the standard list rather than extending it. Side placements
68
+ * already slide along the block axis at full height, so they have none.
69
+ */
70
+ export declare function getAnchorClearFallbacks(placement: LayerPlacement): string;
71
+ /** The custom property a layer writes its anchor-clear fallback list to. */
72
+ export declare const LAYER_CLEAR_FALLBACKS_PROPERTY = "--_astryx-layer-clear-fallbacks";
73
+ /** The custom property its `position-try-fallbacks` reads first. */
74
+ export declare const LAYER_TRY_FALLBACKS_PROPERTY = "--_astryx-layer-try-fallbacks";
75
+ /**
76
+ * The attribute the runtime sets on a layer whose settled box covered its
77
+ * anchor; it switches the layer to its anchor-clear list.
78
+ */
79
+ export declare const LAYER_CLEARS_ANCHOR_ATTRIBUTE = "data-astryx-clears-anchor";
80
+ /**
81
+ * The attribute the runtime sets on a layer that keeps its anchor clear while
82
+ * its content overflows the box it was given; only then does it scroll, so a
83
+ * layer that fits stays a plain box and a wheel over it still scrolls the
84
+ * page.
85
+ */
86
+ export declare const LAYER_SCROLLS_ATTRIBUTE = "data-astryx-layer-scrolls";
87
+ /**
88
+ * Every slide rule, for every placement and alignment, and the beside and fit
89
+ * rules.
90
+ */
31
91
  export declare function slideRulesCss(): string;
32
92
  export declare const SLIDE_RULES_ID = "astryx-layer-slide-rules";
33
93
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"layerSlideRules.d.ts","sourceRoot":"","sources":["../../src/Layer/layerSlideRules.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAG/D,kEAAkE;AAClE,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAEpE,KAAK,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhC,wBAAgB,aAAa,CAC3B,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,cAAc,EACzB,IAAI,EAAE,IAAI,GACT,MAAM,CAER;AAmFD,2DAA2D;AAC3D,wBAAgB,aAAa,IAAI,MAAM,CAOtC;AAED,eAAO,MAAM,cAAc,6BAA6B,CAAC;AAEz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