@astryxdesign/core 0.7.7-canary.ae97fa8 → 0.7.7-canary.b377b21

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 (228) hide show
  1. package/dist/AlertDialog/AlertDialog.d.ts +4 -1
  2. package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
  3. package/dist/AlertDialog/AlertDialog.js +36 -6
  4. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  5. package/dist/BottomSheet/BottomSheetPanel.js +22 -3
  6. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  7. package/dist/BottomSheet/useSheetGestures.js +3 -1
  8. package/dist/Button/Button.d.ts.map +1 -1
  9. package/dist/Button/Button.js +17 -1
  10. package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
  11. package/dist/CheckboxInput/CheckboxInput.js +13 -2
  12. package/dist/ComplexSelector/ComplexSelector.d.ts +4 -1
  13. package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
  14. package/dist/ComplexSelector/ComplexSelector.js +14 -4
  15. package/dist/ContextMenu/ContextMenu.js +2 -2
  16. package/dist/Dialog/Dialog.d.ts.map +1 -1
  17. package/dist/Dialog/Dialog.js +7 -31
  18. package/dist/Field/Field.js +2 -2
  19. package/dist/HoverCard/HoverCard.d.ts +4 -3
  20. package/dist/HoverCard/HoverCard.d.ts.map +1 -1
  21. package/dist/HoverCard/useHoverCard.d.ts +5 -4
  22. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  23. package/dist/HoverCard/useHoverCard.js +17 -31
  24. package/dist/Icon/Icon.d.ts +5 -1
  25. package/dist/Icon/Icon.d.ts.map +1 -1
  26. package/dist/Icon/Icon.js +5 -2
  27. package/dist/Layer/usePressPin.d.ts +17 -5
  28. package/dist/Layer/usePressPin.d.ts.map +1 -1
  29. package/dist/Layer/usePressPin.js +62 -12
  30. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  31. package/dist/Lightbox/Lightbox.js +18 -0
  32. package/dist/PowerSearch/PowerSearch.d.ts +36 -3
  33. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  34. package/dist/PowerSearch/PowerSearch.js +433 -127
  35. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +100 -0
  36. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
  37. package/dist/PowerSearch/PowerSearchBottomSheet.js +1913 -0
  38. package/dist/PowerSearch/PowerSearchEditPopover.d.ts +32 -1
  39. package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
  40. package/dist/PowerSearch/PowerSearchEditPopover.js +17 -6
  41. package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
  42. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  43. package/dist/PowerSearch/PowerSearchValueEditor.js +170 -61
  44. package/dist/PowerSearch/formatFilterValue.d.ts +7 -0
  45. package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
  46. package/dist/PowerSearch/formatFilterValue.js +11 -1
  47. package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
  48. package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
  49. package/dist/PowerSearch/formatTokenValue.js +160 -0
  50. package/dist/PowerSearch/powerSearchSheetUtils.d.ts +65 -0
  51. package/dist/PowerSearch/powerSearchSheetUtils.d.ts.map +1 -0
  52. package/dist/PowerSearch/powerSearchSheetUtils.js +168 -0
  53. package/dist/RadioList/RadioList.d.ts.map +1 -1
  54. package/dist/RadioList/RadioList.js +3 -2
  55. package/dist/RadioList/RadioListItem.d.ts +1 -1
  56. package/dist/RadioList/RadioListItem.d.ts.map +1 -1
  57. package/dist/RadioList/RadioListItem.js +5 -3
  58. package/dist/Resizable/ResizeHandle.d.ts +2 -1
  59. package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
  60. package/dist/Resizable/ResizeHandle.js +99 -77
  61. package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -1
  62. package/dist/SegmentedControl/useSegmentedSelectionMotion.js +3 -3
  63. package/dist/Slider/sliderTouchController.js +2 -2
  64. package/dist/Spinner/Spinner.d.ts +1 -1
  65. package/dist/Spinner/Spinner.d.ts.map +1 -1
  66. package/dist/Spinner/Spinner.js +60 -58
  67. package/dist/Switch/useSwitchTouch.js +4 -4
  68. package/dist/Table/BaseTable.d.ts.map +1 -1
  69. package/dist/Table/BaseTable.js +29 -8
  70. package/dist/TextInput/TextInput.d.ts +2 -2
  71. package/dist/TextInput/TextInput.d.ts.map +1 -1
  72. package/dist/TextInput/TextInput.js +10 -7
  73. package/dist/Toast/Toast.d.ts +11 -1
  74. package/dist/Toast/Toast.d.ts.map +1 -1
  75. package/dist/Toast/Toast.js +25 -15
  76. package/dist/Toast/ToastViewport.d.ts.map +1 -1
  77. package/dist/Toast/ToastViewport.js +94 -34
  78. package/dist/Toast/types.d.ts +9 -3
  79. package/dist/Toast/types.d.ts.map +1 -1
  80. package/dist/Tooltip/useTooltip.d.ts +19 -1
  81. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  82. package/dist/Tooltip/useTooltip.js +34 -53
  83. package/dist/Typeahead/TypeaheadItem.d.ts +2 -1
  84. package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
  85. package/dist/animator/createAnimator.d.ts +98 -0
  86. package/dist/animator/createAnimator.d.ts.map +1 -0
  87. package/dist/animator/createAnimator.js +259 -0
  88. package/dist/astryx.css +35 -6
  89. package/dist/gestures/PressTracker.d.ts.map +1 -1
  90. package/dist/gestures/PressTracker.js +4 -3
  91. package/dist/hooks/actionGroupTracker.d.ts +4 -1
  92. package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
  93. package/dist/hooks/actionGroupTracker.js +13 -3
  94. package/dist/hooks/index.d.ts +1 -0
  95. package/dist/hooks/index.d.ts.map +1 -1
  96. package/dist/hooks/index.js +1 -0
  97. package/dist/hooks/pressGroupContext.d.ts +6 -0
  98. package/dist/hooks/pressGroupContext.d.ts.map +1 -0
  99. package/dist/hooks/pressGroupContext.js +20 -0
  100. package/dist/hooks/useActionGroupTracking.d.ts +53 -0
  101. package/dist/hooks/useActionGroupTracking.d.ts.map +1 -0
  102. package/dist/hooks/useActionGroupTracking.js +174 -0
  103. package/dist/hooks/useAnimator.d.ts +41 -0
  104. package/dist/hooks/useAnimator.d.ts.map +1 -0
  105. package/dist/hooks/useAnimator.js +70 -0
  106. package/dist/hooks/useAttachment.d.ts +1 -1
  107. package/dist/hooks/useAttachment.js +1 -1
  108. package/dist/hooks/useInputStatusIcon.d.ts +1 -1
  109. package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
  110. package/dist/hooks/useInputStatusIcon.js +2 -2
  111. package/dist/hooks/useLongPress.d.ts +6 -2
  112. package/dist/hooks/useLongPress.d.ts.map +1 -1
  113. package/dist/hooks/useLongPress.js +95 -15
  114. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts +8 -0
  115. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -0
  116. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +42 -0
  117. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
  118. package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
  119. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
  120. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
  121. package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
  122. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  123. package/dist/i18n/generated-locales/en.generated.js +30 -0
  124. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  125. package/dist/i18n/generated-locales/pseudo.generated.js +30 -0
  126. package/dist/index.d.ts +1 -0
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +4 -0
  129. package/dist/internal/indicatorPress.stylex.d.ts +20 -0
  130. package/dist/internal/indicatorPress.stylex.d.ts.map +1 -0
  131. package/dist/internal/indicatorPress.stylex.js +26 -0
  132. package/dist/motion/animator.d.ts +14 -14
  133. package/dist/motion/animator.d.ts.map +1 -1
  134. package/dist/motion/animator.js +41 -18
  135. package/dist/motion/uikit/alert.d.ts +41 -0
  136. package/dist/motion/uikit/alert.d.ts.map +1 -0
  137. package/dist/motion/uikit/alert.js +43 -0
  138. package/dist/privateAttributes/pressGroupItem.stylex.d.ts +15 -0
  139. package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
  140. package/dist/privateAttributes/pressGroupItem.stylex.js +23 -0
  141. package/dist/utils/focusReturn.d.ts +15 -0
  142. package/dist/utils/focusReturn.d.ts.map +1 -1
  143. package/dist/utils/focusReturn.js +28 -0
  144. package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
  145. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  146. package/dist/utils/interactionOverlay.stylex.js +3 -2
  147. package/dist/utils/pressFeedback.d.ts.map +1 -1
  148. package/dist/utils/pressFeedback.js +19 -6
  149. package/dist/utils/triggerFocus.d.ts +36 -0
  150. package/dist/utils/triggerFocus.d.ts.map +1 -0
  151. package/dist/utils/triggerFocus.js +65 -0
  152. package/locales/en.json +120 -0
  153. package/locales/pseudo.json +90 -0
  154. package/package.json +9 -4
  155. package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
  156. package/src/AlertDialog/AlertDialog.tsx +37 -5
  157. package/src/BottomSheet/BottomSheetPanel.tsx +33 -3
  158. package/src/BottomSheet/useSheetGestures.ts +3 -1
  159. package/src/Button/Button.tsx +26 -4
  160. package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
  161. package/src/CheckboxInput/CheckboxInput.tsx +36 -9
  162. package/src/ComplexSelector/ComplexSelector.tsx +20 -5
  163. package/src/ContextMenu/ContextMenu.tsx +2 -2
  164. package/src/Dialog/Dialog.tsx +10 -31
  165. package/src/Field/Field.tsx +2 -2
  166. package/src/HoverCard/HoverCard.doc.mjs +4 -2
  167. package/src/HoverCard/HoverCard.tsx +4 -3
  168. package/src/HoverCard/useHoverCard.doc.mjs +178 -36
  169. package/src/HoverCard/useHoverCard.tsx +46 -52
  170. package/src/Icon/Icon.doc.mjs +49 -8
  171. package/src/Icon/Icon.tsx +15 -7
  172. package/src/Layer/usePressPin.ts +81 -15
  173. package/src/Lightbox/Lightbox.tsx +18 -0
  174. package/src/PowerSearch/PowerSearch.doc.mjs +54 -5
  175. package/src/PowerSearch/PowerSearch.tsx +609 -155
  176. package/src/PowerSearch/PowerSearchBottomSheet.tsx +2515 -0
  177. package/src/PowerSearch/PowerSearchEditPopover.tsx +28 -6
  178. package/src/PowerSearch/PowerSearchValueEditor.tsx +203 -38
  179. package/src/PowerSearch/formatFilterValue.ts +18 -1
  180. package/src/PowerSearch/formatTokenValue.ts +215 -0
  181. package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
  182. package/src/RadioList/RadioList.tsx +3 -2
  183. package/src/RadioList/RadioListItem.tsx +5 -3
  184. package/src/Resizable/Resizable.doc.mjs +5 -4
  185. package/src/Resizable/ResizeHandle.tsx +167 -109
  186. package/src/SegmentedControl/useSegmentedSelectionMotion.ts +6 -3
  187. package/src/Slider/sliderTouchController.ts +2 -2
  188. package/src/Spinner/Spinner.tsx +77 -63
  189. package/src/Switch/useSwitchTouch.ts +4 -4
  190. package/src/Table/BaseTable.tsx +46 -12
  191. package/src/TextInput/TextInput.tsx +11 -10
  192. package/src/Toast/Toast.doc.mjs +4 -3
  193. package/src/Toast/Toast.tsx +52 -32
  194. package/src/Toast/ToastViewport.tsx +121 -35
  195. package/src/Toast/types.ts +9 -3
  196. package/src/Tooltip/useTooltip.doc.mjs +24 -0
  197. package/src/Tooltip/useTooltip.tsx +61 -56
  198. package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
  199. package/src/Typeahead/TypeaheadItem.tsx +2 -1
  200. package/src/animator/createAnimator.doc.mjs +153 -0
  201. package/src/animator/createAnimator.ts +324 -0
  202. package/src/gestures/PressTracker.ts +4 -3
  203. package/src/gestures/README.md +7 -1
  204. package/src/hooks/actionGroupTracker.ts +20 -5
  205. package/src/hooks/index.ts +2 -0
  206. package/src/hooks/pressGroupContext.ts +21 -0
  207. package/src/hooks/useActionGroupTracking.ts +224 -0
  208. package/src/hooks/useAnimator.doc.mjs +109 -0
  209. package/src/hooks/useAnimator.ts +67 -0
  210. package/src/hooks/useAttachment.ts +1 -1
  211. package/src/hooks/useInputStatusIcon.tsx +3 -2
  212. package/src/hooks/useLongPress.doc.mjs +2 -2
  213. package/src/hooks/useLongPress.ts +136 -15
  214. package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +43 -0
  215. package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
  216. package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
  217. package/src/i18n/generated-locales/en.generated.ts +41 -0
  218. package/src/i18n/generated-locales/pseudo.generated.ts +42 -0
  219. package/src/index.ts +13 -0
  220. package/src/internal/indicatorPress.stylex.ts +24 -0
  221. package/src/motion/README.md +8 -5
  222. package/src/motion/animator.ts +61 -29
  223. package/src/motion/uikit/alert.ts +43 -0
  224. package/src/privateAttributes/pressGroupItem.stylex.ts +23 -0
  225. package/src/utils/focusReturn.ts +30 -0
  226. package/src/utils/interactionOverlay.stylex.ts +3 -2
  227. package/src/utils/pressFeedback.ts +19 -6
  228. package/src/utils/triggerFocus.ts +80 -0
package/dist/astryx.css CHANGED
@@ -47,8 +47,6 @@
47
47
  @property --x-paddingInline { syntax: "*"; inherits: false;}
48
48
  @property --x-paddingInlineEnd { syntax: "*"; inherits: false;}
49
49
  @property --x-paddingInlineStart { syntax: "*"; inherits: false;}
50
- @property --x-qthpiu { syntax: "*"; inherits: false;}
51
- @property --x-sj6hyi { syntax: "*"; inherits: false;}
52
50
  @property --x-top { syntax: "*"; inherits: false;}
53
51
  @property --x-transform { syntax: "*"; inherits: false;}
54
52
  @property --x-WebkitLineClamp { syntax: "*"; inherits: false;}
@@ -75,7 +73,7 @@
75
73
  @keyframes x1b6yrix-B{from{opacity:0;transform:translateY(var(--spacing-2));}to{opacity:1;transform:translateY(0);}}
76
74
  @keyframes xiylxmw-B{from{opacity:0;transform:translateY(calc(-1 * var(--spacing-2)));}to{opacity:1;transform:translateY(0);}}
77
75
  @keyframes xml828b-B{from{opacity:1;}to{opacity:var(--_progress-bar-pulse-floor);}}
78
- @keyframes x1wbvqyn-B{0%{stroke-dashoffset:0;}100%{stroke-dashoffset:calc(var(--_spinner-ring-diameter) * -3.141592653589793);}}
76
+ @keyframes xqng64z-B{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}
79
77
  @keyframes x1c2q33o-B{0%{transform:translateX(100%);}100%{transform:translateX(-250%);}}
80
78
  @keyframes xr3m334-B{0%{transform:translateX(-100%);}100%{transform:translateX(250%);}}
81
79
  @keyframes x1xhkexc-B{from{width:0;margin-inline-end:0;opacity:0;}to{width:14px;margin-inline-end:var(--spacing-1);opacity:1;}}
@@ -149,6 +147,8 @@
149
147
  .xt8hc1d{--_layout-flush-block-end:initial}
150
148
  .xu9n9za{--_layout-flush-block-start:initial}
151
149
  .xiki222{--_popover-radius:var(--radius-container)}
150
+ .x1bs45cr{--_power-search-sheet-hit-content:none}
151
+ .x1o3f7l6{--_power-search-sheet-hit-inset:0px}
152
152
  .x1s9pv7w{--_press-overlay:transparent}
153
153
  .x1l7afqf{--_press-paint-image:linear-gradient(var(--_press-paint),var(--_press-paint))}
154
154
  .xz2mauf{--_press-paint:color-mix(in srgb,var(--color-overlay-pressed) calc(var(--astryx-press-alpha) * 100%),transparent)}
@@ -455,6 +455,8 @@
455
455
  @media (any-pointer: coarse){.x1hl81f0.x1hl81f0{--_fade-delay:0s}}
456
456
  @media (pointer: coarse){.xp8r40j.xp8r40j{--_input-clear-hit-content:""}}
457
457
  @media (pointer: coarse){.x181bpwf.x181bpwf{--_input-clear-hit-inset:-2px}}
458
+ @media (pointer: coarse){.x73lxwv.x73lxwv{--_power-search-sheet-hit-content:""}}
459
+ @media (pointer: coarse){.xhx5icg.xhx5icg{--_power-search-sheet-hit-inset:min(0px,calc((100% - 44px) / 2))}}
458
460
  @media (any-pointer: coarse){.xm1aeao.xm1aeao{--_reveal-delay-reduced:0s,0s}}
459
461
  @media (any-pointer: coarse){.x1pn63d7.x1pn63d7{--_reveal-delay:0s,0s}}
460
462
  @media (any-pointer: coarse){.xi7d7de.xi7d7de{--_reveal-opacity:1}}
@@ -761,9 +763,9 @@
761
763
  .x3psbcj:not(#\#):not(#\#):not(#\#){animation-name:x1ahk7ht-B}
762
764
  .x1dvww92:not(#\#):not(#\#):not(#\#){animation-name:x1b6yrix-B}
763
765
  .x97zbip:not(#\#):not(#\#):not(#\#){animation-name:x1k48ry3-B}
764
- .x1nlxm0d:not(#\#):not(#\#):not(#\#){animation-name:x1wbvqyn-B}
765
766
  .x1gbn2au:not(#\#):not(#\#):not(#\#){animation-name:x1xhkexc-B}
766
767
  .x1srr2gu:not(#\#):not(#\#):not(#\#){animation-name:xiylxmw-B}
768
+ .x1ka1v4i:not(#\#):not(#\#):not(#\#){animation-name:xqng64z-B}
767
769
  .xozk8ic:not(#\#):not(#\#):not(#\#){animation-name:xr3m334-B}
768
770
  .x1mta51n:not(#\#):not(#\#):not(#\#){animation-name:xtut5q7-B}
769
771
  .xck01x9:not(#\#):not(#\#):not(#\#){animation-name:xu7jd1z-B}
@@ -1271,6 +1273,7 @@
1271
1273
  .x1p6hqjl:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--_tokenizer-end-lane-reserve,0px)}
1272
1274
  .x1by8st6:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--astryx-dialog-padding-inline-end,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-right,0px)))))}
1273
1275
  .x17sfb9:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--astryx-number-input-padding-inline-end,var(--astryx-number-input-padding-inline,var(--astryx-number-input-padding,var(--spacing-2))))}
1276
+ .x19m2zy8:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--container-padding-inline-end,0px)}
1274
1277
  .x64h4k7:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--container-padding-inline-end)}
1275
1278
  .x1peupej:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--layout-padding-inner-x,var(--spacing-4))}
1276
1279
  .x19eyx77:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--layout-padding-own-outer-x,var(--layout-padding-outer-x,var(--spacing-4)))}
@@ -1304,6 +1307,7 @@
1304
1307
  .xw2xrtw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--_tree-indent,0px)}
1305
1308
  .xqmdmw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-dialog-padding-inline-start,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-left,0px)))))}
1306
1309
  .x1jni19p:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-number-input-padding-inline-start,var(--astryx-number-input-padding-inline,var(--astryx-number-input-padding,var(--spacing-2))))}
1310
+ .x1ew2rer:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--container-padding-inline-start,0px)}
1307
1311
  .x1c35znw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--container-padding-inline-start)}
1308
1312
  .xwjyata:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--layout-padding-inner-x,var(--spacing-4))}
1309
1313
  .xaku5ci:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--layout-padding-own-outer-x,var(--layout-padding-outer-x,var(--spacing-4)))}
@@ -1429,7 +1433,6 @@
1429
1433
  .xdo3dbm:not(#\#):not(#\#):not(#\#){transform:translateY(calc(-2 * var(--spacing-2))) scale(.92)}
1430
1434
  .x149p1fo:not(#\#):not(#\#):not(#\#){transform:translateY(var(--_toast-swipe-exit-y,var(--_toast-swipe-y,var(--_toast-slide-y,var(--spacing-2))))) scale(var(--_toast-swipe-scale,1))}
1431
1435
  .x1qk3xlt:not(#\#):not(#\#):not(#\#){transform:translateY(var(--_toast-swipe-y,0px)) scale(var(--_toast-swipe-scale,1))}
1432
- .x11wx31z:not(#\#):not(#\#):not(#\#){transform:var(--x-qthpiu)}
1433
1436
  .xsqj5wx:not(#\#):not(#\#):not(#\#){transform:var(--x-transform)}
1434
1437
  .xd00j3c:not(#\#):not(#\#):not(#\#){transition-behavior:allow-discrete}
1435
1438
  .x5h36tt:not(#\#):not(#\#):not(#\#){transition-delay:.15s}
@@ -1540,6 +1543,8 @@
1540
1543
  .x6cuj84:not(#\#):not(#\#):not(#\#){z-index:500}
1541
1544
  .x1q2oy4v:not(#\#):not(#\#):not(#\#){z-index:9999}
1542
1545
  .x6tapwc:not(#\#):not(#\#):not(#\#){z-index:var(--_tree-focus-z,auto)}
1546
+ .x189o2zt[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#){--_indicator-press-image:var(--_press-paint-image)}
1547
+ .x1dueop1[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#){--_indicator-press-image:var(--_press-paint-image)}
1543
1548
  .x11z29ks[data-astryx-press="on"]:not(#\#):not(#\#):not(#\#){--astryx-press-alpha:1}
1544
1549
  .xli5ek3[data-astryx-press="fading"]:not(#\#):not(#\#):not(#\#){--astryx-press-alpha:1}
1545
1550
  .x1v2claj.x1v2claj:where(.x84s7jz:focus-within *):not(#\#):not(#\#):not(#\#){opacity:1}
@@ -1557,6 +1562,7 @@
1557
1562
  .x1vxsm5i:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){animation-name:xu7jd1z-B}
1558
1563
  .x18lne9g:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){animation-name:xwmkjkf-B}
1559
1564
  .x1spg45b.x1spg45b:hover:where(:not(:disabled,[aria-disabled="true"])):not(#\#):not(#\#):not(#\#){background-color:var(--color-accent)}
1565
+ .x1vl4g35:active:not([data-astryx-press="on"]):not(#\#):not(#\#):not(#\#){background-size:0 0}
1560
1566
  .xz46atp.xz46atp:where(.astryx-input-group > [data-astryx-input-group-item]):not(:nth-last-child(1 of :not([popover]):not(template):not(dialog))):not(#\#):not(#\#):not(#\#){border-end-end-radius:0}
1561
1567
  .x1y3chn8.x1y3chn8:where(.astryx-input-group > [data-astryx-input-group-item]):not(:first-child):not(#\#):not(#\#):not(#\#){border-end-start-radius:0}
1562
1568
  .x1lsh8a1.x1lsh8a1:where(.astryx-input-group > [data-astryx-input-group-item]):not(:nth-last-child(1 of :not([popover]):not(template):not(dialog))):not(#\#):not(#\#):not(#\#){border-start-end-radius:0}
@@ -1571,6 +1577,7 @@
1571
1577
  .xy5bzlh.xy5bzlh:hover:where(:not(:disabled,[aria-disabled="true"])):not(#\#):not(#\#):not(#\#){color:var(--color-icon-primary)}
1572
1578
  .x9o1np9.x9o1np9:hover:where(:not(:disabled,[aria-disabled="true"])):not(#\#):not(#\#):not(#\#){color:var(--color-text-primary)}
1573
1579
  .x16khyan:is(:disabled,[aria-disabled="true"]):not(#\#):not(#\#):not(#\#){cursor:default}
1580
+ .xvivl9a:is([aria-disabled="true"]):not(#\#):not(#\#):not(#\#){cursor:default}
1574
1581
  .x1y40yee:popover-open:not(#\#):not(#\#):not(#\#){display:flex}
1575
1582
  .x1rq9t4t:placeholder-shown:is(:not(:focus), :read-only):not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--spacing-1))}
1576
1583
  .x17xqekc:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){mask-image:linear-gradient(to left,transparent 0%,rgba(0,0,0,.3) 2px,black var(--spacing-1))}
@@ -1615,7 +1622,6 @@
1615
1622
  .xttggg:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}
1616
1623
  .x1nyx83j:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){transform:translateX(50%)}
1617
1624
  .x9cjr8z:popover-open:not(#\#):not(#\#):not(#\#){transform:translateY(0)}
1618
- .x75qhwu:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){transform:var(--x-sj6hyi)}
1619
1625
  .x1rm9qnc:focus-within:not(#\#):not(#\#):not(#\#){z-index:1}
1620
1626
  .xf5goe6.xf5goe6:where(.astryx-input-group > [data-astryx-input-group-item]):focus-visible:not(#\#):not(#\#):not(#\#){z-index:2}
1621
1627
  .x151j4nw:has(input[aria-disabled="true"]:focus-visible):not(#\#):not(#\#):not(#\#){box-shadow:inset 0 0 0 2px var(--color-accent-muted)}
@@ -1845,6 +1851,7 @@
1845
1851
  .x11xkdxz:not(#\#):not(#\#):not(#\#):not(#\#){border-top-width:var(--border-width)}
1846
1852
  .x1ey2m1c:not(#\#):not(#\#):not(#\#):not(#\#){bottom:0}
1847
1853
  .x1c7jfne:not(#\#):not(#\#):not(#\#):not(#\#){bottom:2px}
1854
+ .xdd4er5:not(#\#):not(#\#):not(#\#):not(#\#){bottom:auto}
1848
1855
  .xyi47jn:not(#\#):not(#\#):not(#\#):not(#\#){bottom:var(--_tab-indicator-bottom,-1px)}
1849
1856
  .xvxfwfv:not(#\#):not(#\#):not(#\#):not(#\#){bottom:var(--astryx-layer-inset-block-end,0px)}
1850
1857
  .x112dmjn:not(#\#):not(#\#):not(#\#):not(#\#){bottom:var(--spacing-1)}
@@ -1903,6 +1910,8 @@
1903
1910
  .x14o5nre:not(#\#):not(#\#):not(#\#):not(#\#){height:calc(var(--text-supporting-size) * var(--text-supporting-leading))}
1904
1911
  .xw1wawg:not(#\#):not(#\#):not(#\#):not(#\#){height:calc(44px - 8px)}
1905
1912
  .xg7h5cd:not(#\#):not(#\#):not(#\#):not(#\#){height:fit-content}
1913
+ .xcuarzx:not(#\#):not(#\#):not(#\#):not(#\#){height:min(var(--resize-handle-hit-area,16px),50%)}
1914
+ .x1tvnn7s:not(#\#):not(#\#):not(#\#):not(#\#){height:min(var(--spacing-4),100%)}
1906
1915
  .xsbjeu0:not(#\#):not(#\#):not(#\#):not(#\#){height:min(var(--spacing-6),40px)}
1907
1916
  .x89eeu2:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--_icon-height,.75rem)}
1908
1917
  .x1jxzzob:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--_icon-height,1.25rem)}
@@ -2071,6 +2080,7 @@
2071
2080
  .x10wlt62:not(#\#):not(#\#):not(#\#):not(#\#){overflow-y:hidden}
2072
2081
  .x4ncuvb:not(#\#):not(#\#):not(#\#):not(#\#){overflow-y:var(--x-overflowY)}
2073
2082
  .x7p5m3t:not(#\#):not(#\#):not(#\#):not(#\#){overscroll-behavior-x:contain}
2083
+ .x1e4zzel:not(#\#):not(#\#):not(#\#):not(#\#){overscroll-behavior-y:contain}
2074
2084
  .x18d9i69:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:0}
2075
2085
  .x1j85h84:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:1px}
2076
2086
  .x1wkw6tp:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:calc(env(safe-area-inset-bottom,0px) + 48px)}
@@ -2182,6 +2192,8 @@
2182
2192
  .xezivpi:not(#\#):not(#\#):not(#\#):not(#\#){width:max-content}
2183
2193
  .x1qwjaml:not(#\#):not(#\#):not(#\#):not(#\#){width:max(0px,calc(-1 * calc(var(--_item-swipe-travel,0px) * var(--_item-swipe-dir,1))))}
2184
2194
  .x96shys:not(#\#):not(#\#):not(#\#):not(#\#){width:max(0px,calc(var(--_item-swipe-travel,0px) * var(--_item-swipe-dir,1)))}
2195
+ .x1a4a7d3:not(#\#):not(#\#):not(#\#):not(#\#){width:min(var(--resize-handle-hit-area,16px),50%)}
2196
+ .x5wh7xo:not(#\#):not(#\#):not(#\#):not(#\#){width:min(var(--spacing-4),100%)}
2185
2197
  .x17cz0of:not(#\#):not(#\#):not(#\#):not(#\#){width:min(var(--spacing-6),40px)}
2186
2198
  .x13u0t82:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--_icon-width,.75rem)}
2187
2199
  .x1vvatio:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--_icon-width,1.25rem)}
@@ -2261,6 +2273,7 @@
2261
2273
  .xxx281p:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset:0}
2262
2274
  .xzdy5ak:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset:calc(var(--astryx-hit-inset-top,0px) * -1) calc(var(--astryx-hit-inset-right,0px) * -1) calc(var(--astryx-hit-inset-bottom,0px) * -1) calc(var(--astryx-hit-inset-left,0px) * -1)}
2263
2275
  .xht581f:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset:var(--_input-clear-hit-inset)}
2276
+ .xl7hj2y:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset:var(--_power-search-sheet-hit-inset)}
2264
2277
  .xeu5z55:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset:var(--_thumbnail-hit-inset)}
2265
2278
  @starting-style{.x4itv7f.x4itv7f:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){opacity:0}}
2266
2279
  @starting-style{.x1igigxu.x1igigxu:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){opacity:1}}
@@ -2300,7 +2313,9 @@
2300
2313
  .xq94oqs:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{border-radius:var(--radius-full)}
2301
2314
  .xtb6wbx:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{border-radius:var(--radius-inner)}
2302
2315
  .x17gn2l9:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{grid-column:1}
2316
+ .x1nc033x:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-block:0}
2303
2317
  .xd54j2p:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset-block:0}
2318
+ .xm4btww:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline:0}
2304
2319
  .xpsyfx0:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-date-and-time-value{margin-block:0}
2305
2320
  .x1qqcexc:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-date-and-time-value{margin-inline:0}
2306
2321
  .x1xb3ux:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{overflow:hidden}
@@ -2366,6 +2381,7 @@
2366
2381
  .xdaf9gw:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{content:counter(astryx-list, lower-roman) "."}
2367
2382
  .xc2ndz5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{content:counter(astryx-list) "."}
2368
2383
  .xh3pasq:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{content:var(--_input-clear-hit-content)}
2384
+ .x1oocgs0:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{content:var(--_power-search-sheet-hit-content)}
2369
2385
  .xhkezso:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{display:block}
2370
2386
  .x1h1zc6f:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{display:none}
2371
2387
  .xolhmmf:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-calendar-picker-indicator{display:none}
@@ -2376,9 +2392,13 @@
2376
2392
  .xwnwc82:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{forced-color-adjust:none}
2377
2393
  .xekda60:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-end:-2px}
2378
2394
  .x1unh1gc:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset-inline-end:0}
2395
+ .xtyp5od:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-end:0}
2396
+ .x5ig7ga:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-end:calc(-1 * var(--spacing-1) - 1px)}
2379
2397
  .x1s13ptm:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-end:var(--_slider-hit-end)}
2380
2398
  .xvw6utc:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-start:-2px}
2399
+ .x1682cnc:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-start:0}
2381
2400
  .x1iygr5g:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset-inline-start:0}
2401
+ .x1vl71nl:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-start:calc(-1 * var(--spacing-1) - 1px)}
2382
2402
  .x1km86hw:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset-inline-start:calc(var(--spacing-4) + var(--_codeblock-gutter-width) + var(--spacing-3))}
2383
2403
  .xu2wnl0:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-start:var(--_slider-hit-start)}
2384
2404
  .x15bqym3:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-datetime-edit{line-height:inherit}
@@ -2439,6 +2459,11 @@
2439
2459
  .xzywxsk.xzywxsk:where(.x1odsvnm:active *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{background-color:var(--color-overlay-pressed)}
2440
2460
  .xk7vujl:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{background-image:linear-gradient(to left,var(--color-shadow),transparent)}
2441
2461
  .xlptwl5:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{background-image:linear-gradient(to right,var(--color-shadow),transparent)}
2462
+ .xf7ekc6.xf7ekc6:where(:has(.x1lrrceh:is(*))):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{content:none}
2463
+ .x3k25x4:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-end:0}
2464
+ .x17kcdp5:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-end:calc(-1 * var(--spacing-1) - 1px)}
2465
+ .xnx00js:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-start:0}
2466
+ .x7my30s:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset-inline-start:calc(-1 * var(--spacing-1) - 1px)}
2442
2467
  .xdq8fwl:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{transform-origin:right center}
2443
2468
  .x1c108yo:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{transform:translateX(-100%)}
2444
2469
  .x12ayhd5:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{transform:translateX(100%)}
@@ -2498,6 +2523,8 @@
2498
2523
  .x267z7u:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{border-top-width:var(--_segmented-lens-border-top-width,0px)}
2499
2524
  .xe80sof:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{bottom:-2px}
2500
2525
  .x1xrz1ek:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{bottom:0}
2526
+ .xhq5o37:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{bottom:0}
2527
+ .xxgnp13:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{bottom:calc(-1 * var(--spacing-1) - 1px)}
2501
2528
  .x17wid7s:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{bottom:var(--_slider-hit-bottom)}
2502
2529
  .x1fv2pxm:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{height:var(--_segmented-after-height,0px)}
2503
2530
  .xlxjeq7:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{height:var(--_segmented-lens-height,0px)}
@@ -2509,6 +2536,8 @@
2509
2536
  .xec4aax:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-date-and-time-value{min-height:0}
2510
2537
  .x51xajf:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{top:-2px}
2511
2538
  .x1m1drc7:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{top:0}
2539
+ .x1y3wzot:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{top:0}
2540
+ .x1phjwh8:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{top:calc(-1 * var(--spacing-1) - 1px)}
2512
2541
  .x3g43gi:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{top:var(--_segmented-after-top,0px)}
2513
2542
  .x319kzk:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{top:var(--_segmented-lens-top,0px)}
2514
2543
  .xw5uirw:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{top:var(--_slider-hit-top)}
@@ -1 +1 @@
1
- {"version":3,"file":"PressTracker.d.ts","sourceRoot":"","sources":["../../src/gestures/PressTracker.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAE1E,OAAO,KAAK,EAAC,YAAY,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAEzD,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,aAAa,CAAC;AAElB,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,SAAS,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACpC,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACpE,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IACrD;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,cA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AAwC;IACxC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC;IACrB,wBAAwB,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC;IACvD,6EAA6E;IAC7E,OAAO,IAAI,IAAI,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACnD,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;CACnD;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAyN7E"}
@@ -47,7 +47,8 @@
47
47
  */
48
48
 
49
49
  import { UIKIT_CONTROL, UIKIT_PAN, UIKIT_PRESS } from "../motion/uikit/gestures.js";
50
- import { timing } from "../motion/uikit/timing.js";
50
+ // Importing the whole table bundles its curves into each press-tracking control.
51
+ import { press as pressClocks } from "../motion/uikit/timing.js";
51
52
  import { travel } from "./geometry.js";
52
53
  const PRESS = UIKIT_PRESS;
53
54
 
@@ -63,7 +64,7 @@ export const PRESS_PROFILES = {
63
64
  // The shared press styles release every surface on the deselect clock
64
65
  // until a control runs its own release (UIButton's 250 ms), so a
65
66
  // painter's `fading` never outlasts the fade it shows.
66
- releaseMs: timing.press.highlightOutMs
67
+ releaseMs: pressClocks.highlightOutMs
67
68
  },
68
69
  /**
69
70
  * A table or collection cell: inside a scroll view it highlights after the
@@ -74,7 +75,7 @@ export const PRESS_PROFILES = {
74
75
  highlightDelay: 'inScrollers',
75
76
  cancelTravel: UIKIT_PAN.hysteresis.value,
76
77
  quickTapFlash: 0,
77
- releaseMs: timing.press.highlightOutMs
78
+ releaseMs: pressClocks.highlightOutMs
78
79
  }
79
80
  };
80
81
  /**
@@ -31,7 +31,8 @@ export interface ActionGroupTrackerOptions {
31
31
  * target past the group's ends commits the lift there wherever the finger
32
32
  * lifts.
33
33
  * @default the target whose rect, grown by `highlightExpansion`, holds the
34
- * point; none between or outside them
34
+ * point, the one the press landed on where several do; none between or
35
+ * outside them
35
36
  */
36
37
  resolveTarget?: (x: number, y: number, targets: ReadonlyArray<ActionGroupTarget>) => HTMLElement | null;
37
38
  /** Every finger position it is given (the begin and each move), first. */
@@ -52,9 +53,11 @@ export interface ActionGroupTracker {
52
53
  /**
53
54
  * A press began at viewport (x, y): read the actions' rects once and
54
55
  * highlight the one under it. An inert press is taken but tracks nothing.
56
+ * `landed` is the node the press landed on.
55
57
  */
56
58
  begin(x: number, y: number, options?: {
57
59
  inert?: boolean;
60
+ landed?: Node | null;
58
61
  }): void;
59
62
  /** The finger moved to viewport (x, y). */
60
63
  move(x: number, y: number): void;
@@ -1 +1 @@
1
- {"version":3,"file":"actionGroupTracker.d.ts","sourceRoot":"","sources":["../../src/hooks/actionGroupTracker.ts"],"names":[],"mappings":"AAsBA,wEAAwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACxC,wEAAwE;IACxE,KAAK,EAAE,MAAM,QAAQ,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAClD,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH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42,7 @@ export function createActionGroupTracker(getOptions) {
42
42
  let actions = [];
43
43
  let highlighted = null;
44
44
  let beganOn = null;
45
+ let landedOn = null;
45
46
  let isTracking = false;
46
47
  let isInert = false;
47
48
  // The finger's last position: `remeasure` resolves it again.
@@ -131,23 +132,31 @@ export function createActionGroupTracker(getOptions) {
131
132
  if (resolveTarget != null) {
132
133
  return actions.length === 0 ? null : resolveTarget(x, y, actions);
133
134
  }
135
+ // Rects that share an edge, or that have no layout (a test renderer), can
136
+ // both hold the point: the one the press landed on wins.
137
+ let first = null;
134
138
  for (const action of actions) {
135
139
  if (x >= action.left - margin && x <= action.right + margin && y >= action.top - margin && y <= action.bottom + margin) {
136
- return action.element;
140
+ if (landedOn != null && action.element.contains(landedOn)) {
141
+ return action.element;
142
+ }
143
+ first ??= action.element;
137
144
  }
138
145
  }
139
- return null;
146
+ return first;
140
147
  };
141
148
  const reset = () => {
142
149
  actions = [];
143
150
  highlighted = null;
144
151
  beganOn = null;
152
+ landedOn = null;
145
153
  isTracking = false;
146
154
  isInert = false;
147
155
  };
148
156
  return {
149
157
  begin(x, y, {
150
- inert = false
158
+ inert = false,
159
+ landed = null
151
160
  } = {}) {
152
161
  // A press can begin while another is tracked, when a second recognizer
153
162
  // takes over the finger (a trigger's held press, then the menu's): the
@@ -161,6 +170,7 @@ export function createActionGroupTracker(getOptions) {
161
170
  highlighted = null;
162
171
  isTracking = true;
163
172
  isInert = inert;
173
+ landedOn = landed;
164
174
  lastX = x;
165
175
  lastY = y;
166
176
  getOptions().onMove?.(x, y);
@@ -53,6 +53,7 @@ export { useInputStatusIcon } from './useInputStatusIcon.js';
53
53
  export type { UseInputStatusIconOptions, UseInputStatusIconReturn, } from './useInputStatusIcon.js';
54
54
  export { useInteractiveRole } from './useInteractiveRole.js';
55
55
  export type { InteractiveRole, UseInteractiveRoleOptions, } from './useInteractiveRole.js';
56
+ export { useAnimator } from './useAnimator.js';
56
57
  export { useLongPress } from './useLongPress.js';
57
58
  export type { UseLongPressOptions, UseLongPressHandlers } from './useLongPress.js';
58
59
  export { usePressFeedback } from './usePressFeedback.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAC,wBAAwB,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACtE,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,YAAY,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EA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qB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,wBAAwB,EAAC,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,eAAe,EACf,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
@@ -35,6 +35,7 @@ export { useClickableContainer, INTERACTIVE_SELECTORS, hasInteractiveAncestor, h
35
35
  export { useInputContainer } from "./useInputContainer.js";
36
36
  export { useInputStatusIcon } from "./useInputStatusIcon.js";
37
37
  export { useInteractiveRole } from "./useInteractiveRole.js";
38
+ export { useAnimator } from "./useAnimator.js";
38
39
  export { useLongPress } from "./useLongPress.js";
39
40
  export { usePressFeedback } from "./usePressFeedback.js";
40
41
  export { useDevWarning } from "./useDevWarning.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * True inside a group whose tracker paints a pointer's press on its actions.
3
+ * Those actions take no `:active` paint, so one press never lights two.
4
+ */
5
+ export declare const PressGroupContext: import("react").Context<boolean>;
6
+ //# sourceMappingURL=pressGroupContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressGroupContext.d.ts","sourceRoot":"","sources":["../../src/hooks/pressGroupContext.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,kCAAuB,CAAC"}
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ /**
6
+ * @file pressGroupContext.ts
7
+ * @input Nothing
8
+ * @output PressGroupContext: true inside a group whose own tracker paints
9
+ * its actions' press
10
+ * @position Internal; not exported from the hooks entry. AlertDialog
11
+ * provides it around its tracked actions, and Button reads it.
12
+ */
13
+ import { createContext } from 'react';
14
+
15
+ /**
16
+ * True inside a group whose tracker paints a pointer's press on its actions.
17
+ * Those actions take no `:active` paint, so one press never lights two.
18
+ */
19
+ export const PressGroupContext = /*#__PURE__*/createContext(false);
20
+ PressGroupContext.displayName = 'PressGroupContext';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @file useActionGroupTracking.ts
3
+ * @input A ref to a group of sibling actions, the actions' selector, and the
4
+ * component's tracking constants
5
+ * @output Exports useActionGroupTracking and ActionGroupTrackingOptions
6
+ * @position Internal hook, not exported from the hooks entry. A long press
7
+ * drives the shared action-group tracker (hooks/actionGroupTracker.ts) for
8
+ * a group that a held pointer slides across. AlertDialog consumes it.
9
+ *
10
+ * SYNC: When modified, update useActionGroupTracking.test.tsx
11
+ */
12
+ import { type RefObject } from 'react';
13
+ import { LongPressGestureRecognizer } from '../gestures/LongPressGestureRecognizer.js';
14
+ import type { GestureTouch, PointerKind } from '../gestures/types.js';
15
+ export interface ActionGroupTrackingOptions {
16
+ /** Selects the actions inside the tracked element. */
17
+ itemSelector: string;
18
+ /** How long after touch-down the touched action highlights, ms. */
19
+ highlightOnsetMs: number;
20
+ /**
21
+ * How far outside an action a finger keeps it highlighted, px. A mouse or a
22
+ * pen hit-tests the actions' exact rects.
23
+ */
24
+ highlightExpansion: number;
25
+ /** Pointers that are tracked; others keep the browser's click. @default every pointer */
26
+ pointerTypes?: ReadonlyArray<PointerKind>;
27
+ /** A press whose target this rejects is not tracked. */
28
+ shouldTrack?: (target: unknown) => boolean;
29
+ /** Off, nothing is attached and nothing is tracked. @default true */
30
+ isEnabled?: boolean;
31
+ /**
32
+ * Let the gesture host write the group's `touch-action` and refuse a text
33
+ * selection while a finger or a pen holds it.
34
+ * @default true
35
+ */
36
+ manageStyle?: boolean;
37
+ /** Runs the action under the finger at the lift. @default its own click */
38
+ onActivate?: (item: HTMLElement) => void;
39
+ }
40
+ /**
41
+ * The group's press: a long press that a second finger on the group ends with
42
+ * nothing acting. A plain long press ignores a second finger.
43
+ */
44
+ declare class ActionGroupPress extends LongPressGestureRecognizer {
45
+ protected acceptsTouch(touch: GestureTouch): boolean;
46
+ }
47
+ /**
48
+ * Track a held pointer on the group behind `ref` across the actions inside
49
+ * it, through the shared action-group tracker.
50
+ */
51
+ export declare function useActionGroupTracking(ref: RefObject<HTMLElement | null>, options: ActionGroupTrackingOptions): ActionGroupPress;
52
+ export {};
53
+ //# sourceMappingURL=useActionGroupTracking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActionGroupTracking.d.ts","sourceRoot":"","sources":["../../src/hooks/useActionGroupTracking.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAA8B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAElE,OAAO,EAAC,0BAA0B,EAAC,MAAM,wCAAwC,CAAC;AAElF,OAAO,KAAK,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAOjE,MAAM,WAAW,0BAA0B;IACzC,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yFAAyF;IACzF,YAAY,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC1C,wDAAwD;IACxD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IAC3C,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1C;AASD;;;GAGG;AACH,cAAM,gBAAiB,SAAQ,0BAA0B;cACpC,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO;CAO9D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAClC,OAAO,EAAE,0BAA0B,GAClC,gBAAgB,CAoHlB"}
@@ -0,0 +1,174 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ /**
6
+ * @file useActionGroupTracking.ts
7
+ * @input A ref to a group of sibling actions, the actions' selector, and the
8
+ * component's tracking constants
9
+ * @output Exports useActionGroupTracking and ActionGroupTrackingOptions
10
+ * @position Internal hook, not exported from the hooks entry. A long press
11
+ * drives the shared action-group tracker (hooks/actionGroupTracker.ts) for
12
+ * a group that a held pointer slides across. AlertDialog consumes it.
13
+ *
14
+ * SYNC: When modified, update useActionGroupTracking.test.tsx
15
+ */
16
+ import { useEffect, useRef, useState } from 'react';
17
+ import { isActive } from "../gestures/GestureRecognizer.js";
18
+ import { LongPressGestureRecognizer } from "../gestures/LongPressGestureRecognizer.js";
19
+ import { lockSelection } from "../utils/selectionLock.js";
20
+ import { useGestureRecognizer } from "../gestures/useGestureRecognizer.js";
21
+ import { UIKIT_PRESS } from "../motion/uikit/gestures.js";
22
+ import { isIosWebKit } from "../utils/touchQueries.js";
23
+ import { createActionGroupTracker } from "./actionGroupTracker.js";
24
+ import { useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect.js";
25
+ const PRESS = UIKIT_PRESS;
26
+
27
+ /** The ref handed to the recognizer while tracking is off: no element. */
28
+ const DETACHED = {
29
+ current: null
30
+ };
31
+ const EVERY_POINTER = ['touch', 'pen', 'mouse'];
32
+
33
+ /**
34
+ * The group's press: a long press that a second finger on the group ends with
35
+ * nothing acting. A plain long press ignores a second finger.
36
+ */
37
+ class ActionGroupPress extends LongPressGestureRecognizer {
38
+ acceptsTouch(touch) {
39
+ if (isActive(this.state)) {
40
+ this.setState('cancelled');
41
+ return false;
42
+ }
43
+ return super.acceptsTouch(touch);
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Track a held pointer on the group behind `ref` across the actions inside
49
+ * it, through the shared action-group tracker.
50
+ */
51
+ export function useActionGroupTracking(ref, options) {
52
+ const optionsRef = useRef(options);
53
+ // Keeps the recognizer's delegate and the tracker, which run outside
54
+ // render, reading the latest options.
55
+ useIsomorphicLayoutEffect(() => {
56
+ optionsRef.current = options;
57
+ });
58
+ // The pointer that started the current press. Only a finger gets the hit
59
+ // expansion; a mouse or a pen hit-tests the actions' exact rects.
60
+ const pointerRef = useRef('touch');
61
+ const landedRef = useRef(null);
62
+ const [tracker] = useState(() => createActionGroupTracker(() => ({
63
+ roots: () => [ref.current],
64
+ itemSelector: optionsRef.current.itemSelector,
65
+ highlightExpansion: pointerRef.current === 'touch' ? optionsRef.current.highlightExpansion : 0,
66
+ onActivate: optionsRef.current.onActivate,
67
+ // The browser's own click for a press the group ran is taken, so the
68
+ // action runs once. The gesture host swallows it for a press it claims.
69
+ // This covers one it does not claim, a mouse under a coarse pointer.
70
+ swallowsNativeClick: true
71
+ })));
72
+ const isEnabled = options.isEnabled ?? true;
73
+ // Synchronizes the tracker with tracking on and mounted. Turning tracking
74
+ // off, or unmounting, drops a tracked press and ends its release fades.
75
+ // The host reports no cancellation to a disabled recognizer, and the lift
76
+ // that runs an action often closes the owner before its fade ends.
77
+ useEffect(() => () => {
78
+ tracker.cancel();
79
+ tracker.dispose();
80
+ }, [tracker, isEnabled]);
81
+ return useGestureRecognizer(isEnabled ? ref : DETACHED, () => new ActionGroupPress({
82
+ name: 'ActionGroupTracking',
83
+ minimumPressDuration: options.highlightOnsetMs,
84
+ allowableMovement: Number.POSITIVE_INFINITY,
85
+ allowedPointerTypes: options.pointerTypes ?? EVERY_POINTER,
86
+ delaysTouchesBegan: true,
87
+ // The hold picks an action, so a held finger or pen starts no text
88
+ // selection and opens no callout while down. A long press brings this
89
+ // lock by default; this hold has no minimum duration, so it names it.
90
+ selectionLock: lockSelection,
91
+ shouldReceiveTouch: (recognizer, touch) => {
92
+ if (recognizer.numberOfTouches === 0) {
93
+ pointerRef.current = touch.pointerType;
94
+ const target = touch.target;
95
+ landedRef.current = typeof target?.nodeType === 'number' ? target : null;
96
+ }
97
+ return receiveTouch(recognizer, touch, optionsRef.current);
98
+ }
99
+ }), recognizer => {
100
+ switch (recognizer.state) {
101
+ case 'began':
102
+ {
103
+ const {
104
+ x,
105
+ y
106
+ } = recognizer.location();
107
+ tracker.begin(x, y, {
108
+ landed: landedRef.current
109
+ });
110
+ break;
111
+ }
112
+ case 'changed':
113
+ {
114
+ const {
115
+ x,
116
+ y
117
+ } = recognizer.location();
118
+ tracker.move(x, y);
119
+ break;
120
+ }
121
+ case 'ended':
122
+ {
123
+ const doc = ref.current?.ownerDocument;
124
+ const focusedBefore = doc?.activeElement ?? null;
125
+ const beganOn = tracker.beganOn;
126
+ // Whether a click on the lifted action would focus it. A mouse's or
127
+ // a pen's pointerdown already gave the engine's answer, on the action
128
+ // it began on. A tap focuses on a later mousedown, which the claimed
129
+ // touch cancels, so the platform answers for a finger.
130
+ // iOS WebKit focuses no tapped button; Chromium and Firefox do.
131
+ const clickFocuses = pointerRef.current === 'touch' ? !isIosWebKit(doc?.defaultView) : beganOn != null && focusedBefore === beganOn;
132
+ const lifted = tracker.end();
133
+ // The lift runs the action's own click(), which moves no focus. So
134
+ // focus moves to the lifted action, unless its click moved focus.
135
+ if (clickFocuses && lifted != null && lifted.isConnected && doc?.activeElement === focusedBefore && focusedBefore !== lifted) {
136
+ lifted.focus({
137
+ preventScroll: true,
138
+ focusVisible: false
139
+ });
140
+ }
141
+ break;
142
+ }
143
+ case 'cancelled':
144
+ tracker.cancel();
145
+ break;
146
+ case 'possible':
147
+ case 'failed':
148
+ // Listeners are not called for these.
149
+ break;
150
+ }
151
+ }, {
152
+ isEnabled,
153
+ manageStyle: options.manageStyle ?? true,
154
+ actionGroup: true
155
+ });
156
+ }
157
+
158
+ /**
159
+ * The recognizer's should-receive delegate. It also picks the press's clock.
160
+ * Inside a scroller the press waits the content-touch delay and fails past
161
+ * the slop, so the scroller takes a flick. Elsewhere it begins at once, with
162
+ * no movement limit.
163
+ */
164
+ function receiveTouch(recognizer, touch, options) {
165
+ if (options.shouldTrack?.(touch.target) === false) {
166
+ return false;
167
+ }
168
+ if (recognizer.numberOfTouches === 0) {
169
+ const isInsideScroller = touch.scroll?.isInsideScroller === true;
170
+ recognizer.minimumPressDuration = isInsideScroller ? PRESS.contentTouchDelay.value : options.highlightOnsetMs;
171
+ recognizer.allowableMovement = isInsideScroller ? PRESS.slop.value : Number.POSITIVE_INFINITY;
172
+ }
173
+ return true;
174
+ }