@astryxdesign/core 0.7.6 → 0.7.7-canary.0eb44a2

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 (272) hide show
  1. package/dist/AppShell/AppShell.d.ts.map +1 -1
  2. package/dist/AppShell/AppShell.js +23 -3
  3. package/dist/Avatar/Avatar.d.ts.map +1 -1
  4. package/dist/Avatar/Avatar.js +1 -1
  5. package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
  6. package/dist/BottomSheet/BottomSheetPanel.js +16 -9
  7. package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  8. package/dist/Breadcrumbs/BreadcrumbItem.js +2 -1
  9. package/dist/Button/Button.d.ts.map +1 -1
  10. package/dist/Button/Button.js +3 -2
  11. package/dist/Chat/ChatComposerInput.d.ts +9 -0
  12. package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
  13. package/dist/Chat/ChatComposerInput.js +2 -0
  14. package/dist/Chat/ChatMessage.js +2 -2
  15. package/dist/Chat/chatMessage.vars.stylex.d.ts +8 -8
  16. package/dist/Chat/chatMessage.vars.stylex.js +8 -8
  17. package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
  18. package/dist/CommandPalette/CommandPaletteInput.js +8 -1
  19. package/dist/DateInput/MonthScroller.d.ts.map +1 -1
  20. package/dist/DateInput/MonthScroller.js +72 -2
  21. package/dist/DateInput/Wheel.d.ts +17 -1
  22. package/dist/DateInput/Wheel.d.ts.map +1 -1
  23. package/dist/DateInput/Wheel.js +179 -19
  24. package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  25. package/dist/DateRangeInput/DateRangeInput.js +63 -49
  26. package/dist/Dialog/Dialog.d.ts.map +1 -1
  27. package/dist/Dialog/Dialog.js +37 -1
  28. package/dist/Drawer/Drawer.d.ts.map +1 -1
  29. package/dist/Drawer/Drawer.js +6 -0
  30. package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
  31. package/dist/Drawer/useDrawerDialogPresence.js +4 -0
  32. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  33. package/dist/DropdownMenu/DropdownMenu.js +20 -4
  34. package/dist/DropdownMenu/useMenuOverflow.d.ts +13 -3
  35. package/dist/DropdownMenu/useMenuOverflow.d.ts.map +1 -1
  36. package/dist/DropdownMenu/useMenuOverflow.js +31 -8
  37. package/dist/Field/PanelSearchInput.d.ts.map +1 -1
  38. package/dist/Field/PanelSearchInput.js +8 -1
  39. package/dist/Field/textEntryTraits.d.ts +6 -6
  40. package/dist/Field/textEntryTraits.js +6 -6
  41. package/dist/Layer/layerClickBoundary.d.ts +7 -1
  42. package/dist/Layer/layerClickBoundary.d.ts.map +1 -1
  43. package/dist/Layer/layerClickBoundary.js +2 -2
  44. package/dist/Layer/usePressPin.d.ts +95 -0
  45. package/dist/Layer/usePressPin.d.ts.map +1 -0
  46. package/dist/Layer/usePressPin.js +365 -0
  47. package/dist/Layer/useTouchTrigger.d.ts +23 -1
  48. package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
  49. package/dist/Layer/useTouchTrigger.js +45 -7
  50. package/dist/Lightbox/Lightbox.d.ts.map +1 -1
  51. package/dist/Lightbox/Lightbox.js +2 -1
  52. package/dist/Link/Link.d.ts.map +1 -1
  53. package/dist/Link/Link.js +1 -0
  54. package/dist/Popover/usePopover.d.ts.map +1 -1
  55. package/dist/Popover/usePopover.js +56 -7
  56. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  57. package/dist/PowerSearch/PowerSearch.js +38 -30
  58. package/dist/ProgressBar/ProgressBar.d.ts +1 -1
  59. package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
  60. package/dist/ProgressBar/ProgressBar.js +52 -14
  61. package/dist/ProgressBar/ProgressBarTouch.d.ts +29 -0
  62. package/dist/ProgressBar/ProgressBarTouch.d.ts.map +1 -0
  63. package/dist/ProgressBar/ProgressBarTouch.js +91 -0
  64. package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
  65. package/dist/SegmentedControl/SegmentedControlItem.js +2 -1
  66. package/dist/Selector/Selector.d.ts.map +1 -1
  67. package/dist/Selector/Selector.js +25 -13
  68. package/dist/Slider/Slider.d.ts.map +1 -1
  69. package/dist/Slider/Slider.js +404 -131
  70. package/dist/Slider/sliderTouchController.d.ts +189 -0
  71. package/dist/Slider/sliderTouchController.d.ts.map +1 -0
  72. package/dist/Slider/sliderTouchController.js +1017 -0
  73. package/dist/Slider/useSliderTouch.d.ts +22 -0
  74. package/dist/Slider/useSliderTouch.d.ts.map +1 -0
  75. package/dist/Slider/useSliderTouch.js +56 -0
  76. package/dist/Switch/Switch.d.ts +1 -1
  77. package/dist/Switch/Switch.d.ts.map +1 -1
  78. package/dist/Switch/Switch.js +200 -46
  79. package/dist/Switch/switchFill.d.ts +31 -0
  80. package/dist/Switch/switchFill.d.ts.map +1 -0
  81. package/dist/Switch/switchFill.js +88 -0
  82. package/dist/Switch/switchTouch.d.ts +81 -0
  83. package/dist/Switch/switchTouch.d.ts.map +1 -0
  84. package/dist/Switch/switchTouch.js +133 -0
  85. package/dist/Switch/useSwitchTouch.d.ts +285 -0
  86. package/dist/Switch/useSwitchTouch.d.ts.map +1 -0
  87. package/dist/Switch/useSwitchTouch.js +998 -0
  88. package/dist/TabList/Tab.d.ts.map +1 -1
  89. package/dist/TabList/Tab.js +4 -3
  90. package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
  91. package/dist/Tokenizer/Tokenizer.js +12 -5
  92. package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts +3 -0
  93. package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -0
  94. package/dist/Tokenizer/TokenizerItemRemovableContext.js +17 -0
  95. package/dist/Tooltip/Tooltip.d.ts +30 -6
  96. package/dist/Tooltip/Tooltip.d.ts.map +1 -1
  97. package/dist/Tooltip/Tooltip.js +5 -0
  98. package/dist/Tooltip/index.d.ts +1 -1
  99. package/dist/Tooltip/index.d.ts.map +1 -1
  100. package/dist/Tooltip/useTooltip.d.ts +31 -5
  101. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  102. package/dist/Tooltip/useTooltip.js +59 -18
  103. package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
  104. package/dist/Typeahead/BaseTypeahead.js +19 -9
  105. package/dist/Typeahead/Typeahead.d.ts.map +1 -1
  106. package/dist/Typeahead/Typeahead.js +26 -15
  107. package/dist/astryx.css +91 -8
  108. package/dist/gestures/GestureArena.d.ts +21 -2
  109. package/dist/gestures/GestureArena.d.ts.map +1 -1
  110. package/dist/gestures/GestureArena.js +23 -3
  111. package/dist/gestures/GestureHost.d.ts +123 -3
  112. package/dist/gestures/GestureHost.d.ts.map +1 -1
  113. package/dist/gestures/GestureHost.js +797 -15
  114. package/dist/gestures/GestureRecognizer.d.ts +15 -1
  115. package/dist/gestures/GestureRecognizer.d.ts.map +1 -1
  116. package/dist/gestures/GestureRecognizer.js +12 -0
  117. package/dist/gestures/PanGestureRecognizer.d.ts +8 -0
  118. package/dist/gestures/PanGestureRecognizer.d.ts.map +1 -1
  119. package/dist/gestures/PinchGestureRecognizer.d.ts +5 -1
  120. package/dist/gestures/PinchGestureRecognizer.d.ts.map +1 -1
  121. package/dist/gestures/PinchGestureRecognizer.js +10 -0
  122. package/dist/gestures/PressTracker.d.ts +6 -0
  123. package/dist/gestures/PressTracker.d.ts.map +1 -1
  124. package/dist/gestures/PressTracker.js +3 -0
  125. package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts +3 -3
  126. package/dist/gestures/ScreenEdgePanGestureRecognizer.d.ts.map +1 -1
  127. package/dist/gestures/ScreenEdgePanGestureRecognizer.js +7 -5
  128. package/dist/gestures/nativeScroll.d.ts +16 -2
  129. package/dist/gestures/nativeScroll.d.ts.map +1 -1
  130. package/dist/gestures/nativeScroll.js +39 -8
  131. package/dist/gestures/recognizerInternals.d.ts +4 -2
  132. package/dist/gestures/recognizerInternals.d.ts.map +1 -1
  133. package/dist/gestures/types.d.ts +17 -0
  134. package/dist/gestures/types.d.ts.map +1 -1
  135. package/dist/gestures/types.js +7 -0
  136. package/dist/gestures/usePressTracker.d.ts.map +1 -1
  137. package/dist/gestures/usePressTracker.js +1 -0
  138. package/dist/gestures/wheelSegmenter.d.ts +56 -0
  139. package/dist/gestures/wheelSegmenter.d.ts.map +1 -0
  140. package/dist/gestures/wheelSegmenter.js +122 -0
  141. package/dist/hooks/useAttachment.d.ts +16 -8
  142. package/dist/hooks/useAttachment.d.ts.map +1 -1
  143. package/dist/hooks/useAttachment.js +35 -15
  144. package/dist/hooks/useFocusTrap.d.ts +15 -0
  145. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  146. package/dist/hooks/useFocusTrap.js +13 -2
  147. package/dist/hooks/usePager.d.ts +261 -0
  148. package/dist/hooks/usePager.d.ts.map +1 -0
  149. package/dist/hooks/usePager.js +1169 -0
  150. package/dist/motion/animator.d.ts.map +1 -1
  151. package/dist/motion/animator.js +140 -19
  152. package/dist/motion/paging.d.ts +69 -0
  153. package/dist/motion/paging.d.ts.map +1 -0
  154. package/dist/motion/paging.js +148 -0
  155. package/dist/motion/uikit/index.d.ts +8 -4
  156. package/dist/motion/uikit/index.d.ts.map +1 -1
  157. package/dist/motion/uikit/index.js +8 -4
  158. package/dist/motion/uikit/paging.d.ts +171 -0
  159. package/dist/motion/uikit/paging.d.ts.map +1 -0
  160. package/dist/motion/uikit/paging.js +192 -0
  161. package/dist/motion/uikit/progressBar.d.ts +79 -0
  162. package/dist/motion/uikit/progressBar.d.ts.map +1 -0
  163. package/dist/motion/uikit/progressBar.js +102 -0
  164. package/dist/motion/uikit/scroll.d.ts +0 -19
  165. package/dist/motion/uikit/scroll.d.ts.map +1 -1
  166. package/dist/motion/uikit/scroll.js +2 -21
  167. package/dist/motion/uikit/slider.d.ts +97 -0
  168. package/dist/motion/uikit/slider.d.ts.map +1 -0
  169. package/dist/motion/uikit/slider.js +111 -0
  170. package/dist/motion/uikit/springs.d.ts +59 -30
  171. package/dist/motion/uikit/springs.d.ts.map +1 -1
  172. package/dist/motion/uikit/springs.js +64 -34
  173. package/dist/motion/uikit/switch.d.ts +166 -0
  174. package/dist/motion/uikit/switch.d.ts.map +1 -0
  175. package/dist/motion/uikit/switch.js +186 -0
  176. package/dist/privateAttributes/pressHoldsDrag.stylex.d.ts +18 -0
  177. package/dist/privateAttributes/pressHoldsDrag.stylex.d.ts.map +1 -0
  178. package/dist/privateAttributes/pressHoldsDrag.stylex.js +28 -0
  179. package/dist/utils/pressFeedback.d.ts.map +1 -1
  180. package/dist/utils/pressFeedback.js +5 -0
  181. package/dist/utils/selectionLock.d.ts +43 -0
  182. package/dist/utils/selectionLock.d.ts.map +1 -1
  183. package/dist/utils/selectionLock.js +394 -6
  184. package/package.json +5 -5
  185. package/src/AppShell/AppShell.doc.mjs +10 -0
  186. package/src/AppShell/AppShell.tsx +48 -2
  187. package/src/Avatar/Avatar.tsx +3 -1
  188. package/src/BottomSheet/BottomSheetPanel.tsx +16 -9
  189. package/src/Breadcrumbs/BreadcrumbItem.tsx +4 -1
  190. package/src/Button/Button.tsx +3 -2
  191. package/src/Chat/Chat.doc.mjs +1 -0
  192. package/src/Chat/ChatComposerInput.doc.mjs +11 -0
  193. package/src/Chat/ChatComposerInput.tsx +11 -0
  194. package/src/Chat/ChatMessage.tsx +2 -2
  195. package/src/Chat/chatMessage.vars.stylex.ts +8 -8
  196. package/src/CommandPalette/CommandPaletteInput.tsx +6 -0
  197. package/src/DateInput/MonthScroller.tsx +63 -5
  198. package/src/DateInput/Wheel.tsx +174 -14
  199. package/src/DateRangeInput/DateRangeInput.doc.mjs +3 -2
  200. package/src/DateRangeInput/DateRangeInput.tsx +117 -71
  201. package/src/Dialog/Dialog.tsx +37 -1
  202. package/src/Drawer/Drawer.tsx +6 -0
  203. package/src/Drawer/useDrawerDialogPresence.ts +4 -0
  204. package/src/DropdownMenu/DropdownMenu.tsx +28 -6
  205. package/src/DropdownMenu/useMenuOverflow.ts +44 -8
  206. package/src/Field/PanelSearchInput.tsx +6 -0
  207. package/src/Field/textEntryTraits.ts +6 -6
  208. package/src/Layer/layerClickBoundary.ts +2 -2
  209. package/src/Layer/usePressPin.ts +516 -0
  210. package/src/Layer/useTouchTrigger.ts +56 -6
  211. package/src/Lightbox/Lightbox.tsx +2 -1
  212. package/src/Link/Link.tsx +3 -0
  213. package/src/Popover/usePopover.tsx +71 -9
  214. package/src/PowerSearch/PowerSearch.tsx +38 -31
  215. package/src/ProgressBar/ProgressBar.doc.mjs +7 -5
  216. package/src/ProgressBar/ProgressBar.tsx +147 -16
  217. package/src/ProgressBar/ProgressBarTouch.ts +109 -0
  218. package/src/SegmentedControl/SegmentedControlItem.tsx +2 -1
  219. package/src/Selector/Selector.tsx +29 -2
  220. package/src/Slider/Slider.doc.mjs +11 -7
  221. package/src/Slider/Slider.tsx +539 -132
  222. package/src/Slider/sliderTouchController.ts +1209 -0
  223. package/src/Slider/useSliderTouch.ts +78 -0
  224. package/src/Switch/Switch.doc.mjs +3 -3
  225. package/src/Switch/Switch.tsx +412 -86
  226. package/src/Switch/switchFill.ts +106 -0
  227. package/src/Switch/switchTouch.ts +194 -0
  228. package/src/Switch/useSwitchTouch.ts +1121 -0
  229. package/src/TabList/Tab.tsx +5 -3
  230. package/src/Tokenizer/Tokenizer.tsx +15 -5
  231. package/src/Tokenizer/TokenizerItemRemovableContext.ts +22 -0
  232. package/src/Tooltip/Tooltip.doc.mjs +21 -6
  233. package/src/Tooltip/Tooltip.tsx +42 -5
  234. package/src/Tooltip/index.ts +1 -0
  235. package/src/Tooltip/useTooltip.doc.mjs +4 -2
  236. package/src/Tooltip/useTooltip.tsx +84 -21
  237. package/src/Typeahead/BaseTypeahead.tsx +16 -8
  238. package/src/Typeahead/Typeahead.tsx +29 -15
  239. package/src/gestures/GestureArena.ts +45 -4
  240. package/src/gestures/GestureHost.ts +958 -15
  241. package/src/gestures/GestureRecognizer.ts +28 -0
  242. package/src/gestures/PanGestureRecognizer.ts +8 -0
  243. package/src/gestures/PinchGestureRecognizer.ts +16 -1
  244. package/src/gestures/PressTracker.ts +10 -0
  245. package/src/gestures/README.md +82 -3
  246. package/src/gestures/ScreenEdgePanGestureRecognizer.ts +7 -5
  247. package/src/gestures/nativeScroll.ts +49 -9
  248. package/src/gestures/recognizerInternals.ts +9 -2
  249. package/src/gestures/types.ts +18 -0
  250. package/src/gestures/usePressTracker.ts +2 -0
  251. package/src/gestures/wheelSegmenter.ts +143 -0
  252. package/src/hooks/useAttachment.ts +56 -14
  253. package/src/hooks/useFocusTrap.ts +26 -2
  254. package/src/hooks/usePager.ts +1446 -0
  255. package/src/motion/MEASUREMENTS.md +36 -27
  256. package/src/motion/README.md +7 -3
  257. package/src/motion/animator.ts +193 -25
  258. package/src/motion/paging.ts +161 -0
  259. package/src/motion/uikit/index.ts +7 -4
  260. package/src/motion/uikit/paging.ts +193 -0
  261. package/src/motion/uikit/progressBar.ts +102 -0
  262. package/src/motion/uikit/scroll.ts +2 -18
  263. package/src/motion/uikit/slider.ts +105 -0
  264. package/src/motion/uikit/springs.ts +53 -32
  265. package/src/motion/uikit/switch.ts +174 -0
  266. package/src/privateAttributes/pressHoldsDrag.stylex.ts +28 -0
  267. package/src/utils/pressFeedback.ts +5 -0
  268. package/src/utils/selectionLock.ts +501 -6
  269. package/dist/motion/selectPage.d.ts +0 -26
  270. package/dist/motion/selectPage.d.ts.map +0 -1
  271. package/dist/motion/selectPage.js +0 -55
  272. package/src/motion/selectPage.ts +0 -55
@@ -0,0 +1,97 @@
1
+ /**
2
+ * UISlider's touch values: hit target, tracking, release coast, lift, drop
3
+ * and the end-of-track haptic.
4
+ */
5
+ export declare const slider: {
6
+ /**
7
+ * The thumb's touch target, a square in pt centered on the thumb. It is
8
+ * the 37 × 24 pt thumb grown by its hit edge insets: 12 pt above and
9
+ * below, 5.5 pt left and right. UIKit hit-tests inside the control's frame
10
+ * first, so the lab's 40 pt frame clipped it to 48 × 40.
11
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro.
12
+ * `_thumbHitEdgeInsets` reads {−12, −5.5, −12, −5.5}. Touch-downs on a
13
+ * 4 pt grid take the thumb from −24 to +20 pt in x. A track tap away
14
+ * from the thumb moves nothing. Oct 23 2026
15
+ */
16
+ readonly thumbHitTarget: 48;
17
+ /**
18
+ * Value range per track length of finger travel. The value moves by
19
+ * (max − min) × translation ÷ the track's full length. The translation
20
+ * counts from the pan's threshold: the touch-down point plus 10 pt along
21
+ * the track. 1 means one full range per track length.
22
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. In
23
+ * drags at 120 to 2000 pt/s, each event's value is v0 plus the
24
+ * translation past 10 pt ÷ 300. Past the max end, the value leaves 1
25
+ * only once the finger comes back past where it reached 1. Oct 23 2026
26
+ */
27
+ readonly trackingGain: 1;
28
+ /**
29
+ * The coast after the lift. The thumb and the value spring from where the
30
+ * finger left them to the projected target, with the release velocity.
31
+ * Critically damped, it never overshoots a target ahead of it.
32
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
33
+ * `UIViewSpringAnimationBehavior` at the lift reads response 0.4 and
34
+ * damping ratio 1. Four releases fit it per frame, at rms 0.11 pt or
35
+ * less. Oct 23 2026
36
+ */
37
+ readonly releaseSpring: {
38
+ readonly response: 0.4;
39
+ readonly dampingRatio: 1;
40
+ };
41
+ /**
42
+ * The deceleration rate of the coast's momentum projection, per ms
43
+ * (WWDC18's `project`). It is not UIScrollView's normal rate (0.998), so
44
+ * pass it to the projection explicitly.
45
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
46
+ * release behavior's projection deceleration reads 0.996. Oct 23 2026
47
+ */
48
+ readonly releaseProjectionRate: 0.996;
49
+ /**
50
+ * How much of the projection the coast travels. The target is the lift
51
+ * value plus this share of the projected distance. A finger lifted outside
52
+ * the control's tracking bounds coasts back to the lift value instead.
53
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
54
+ * release behavior's target smoothing reads 0.4. A 126.9 pt/s release
55
+ * travels 12.56 pt, against 12.64 predicted. Oct 23 2026
56
+ */
57
+ readonly releaseProjectionShare: 0.4;
58
+ /**
59
+ * The thumb's growth under a finger, uniform about its center (37 × 24 to
60
+ * 57.35 × 37.2 pt).
61
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The lens
62
+ * frame settled during an 800 ms hold. Oct 23 2026
63
+ */
64
+ readonly liftScale: 1.55;
65
+ /**
66
+ * The lift: the thumb grows to `liftScale` when the finger lands.
67
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The lens
68
+ * width per frame in an 800 ms hold fits one spring at rms 0.31 pt.
69
+ * Oct 23 2026
70
+ */
71
+ readonly liftSpring: {
72
+ readonly response: 0.215;
73
+ readonly dampingRatio: 0.6;
74
+ };
75
+ /**
76
+ * The drop: the thumb shrinks back to its rest size when the finger lifts,
77
+ * while the coast runs.
78
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
79
+ * lens's spring at the lift of an 800 ms hold reads response 0.5 s and
80
+ * damping ratio 0.7. The width per frame fits it at rms 0.10 pt.
81
+ * Oct 23 2026
82
+ */
83
+ readonly dropSpring: {
84
+ readonly response: 0.5;
85
+ readonly dampingRatio: 0.7;
86
+ };
87
+ /**
88
+ * The feedback each time the value reaches an end, once per entry. It
89
+ * re-arms when the value leaves the end, in the drag and the coast. UIKit
90
+ * plays "Micro Tap Medium", and the web stand-in is the closest kind.
91
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
92
+ * haptics log of drags into both ends shows the fluid slider generator's
93
+ * "Micro Tap Medium" once per entry. Oct 23 2026
94
+ */
95
+ readonly endHaptic: "impactMedium";
96
+ };
97
+ //# sourceMappingURL=slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/motion/uikit/slider.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,eAAO,MAAM,MAAM;IACjB;;;;;;;;;OASG;;IAEH;;;;;;;;;OASG;;IAEH;;;;;;;;OAQG;;;;;IAEH;;;;;;OAMG;;IAEH;;;;;;;OAOG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;;;;IAEH;;;;;;;OAOG;;;;;IAEH;;;;;;;OAOG;;CAEK,CAAC"}
@@ -0,0 +1,111 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file slider.ts
5
+ * @input Nothing: data only
6
+ * @output Exports `slider`: UISlider's hit target, tracking rule, release
7
+ * coast, lift, drop and end haptic, measured on the iOS 26.2 simulator
8
+ * @position The slider domain of the UIKit constants table (motion/uikit).
9
+ * Lengths are in pt (CSS px). Tests check each leaf's `@source`.
10
+ *
11
+ * SYNC: When modified, update:
12
+ * - /packages/core/src/Slider/sliderTouchController.ts
13
+ * - /packages/core/src/Slider/Slider.tsx
14
+ * - /packages/core/src/motion/uikit/slider.test.ts
15
+ */
16
+
17
+ import { SLIDER_RELEASE_SPRING } from "./springs.js";
18
+
19
+ /**
20
+ * UISlider's touch values: hit target, tracking, release coast, lift, drop
21
+ * and the end-of-track haptic.
22
+ */
23
+ export const slider = {
24
+ /**
25
+ * The thumb's touch target, a square in pt centered on the thumb. It is
26
+ * the 37 × 24 pt thumb grown by its hit edge insets: 12 pt above and
27
+ * below, 5.5 pt left and right. UIKit hit-tests inside the control's frame
28
+ * first, so the lab's 40 pt frame clipped it to 48 × 40.
29
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro.
30
+ * `_thumbHitEdgeInsets` reads {−12, −5.5, −12, −5.5}. Touch-downs on a
31
+ * 4 pt grid take the thumb from −24 to +20 pt in x. A track tap away
32
+ * from the thumb moves nothing. Oct 23 2026
33
+ */
34
+ thumbHitTarget: 48,
35
+ /**
36
+ * Value range per track length of finger travel. The value moves by
37
+ * (max − min) × translation ÷ the track's full length. The translation
38
+ * counts from the pan's threshold: the touch-down point plus 10 pt along
39
+ * the track. 1 means one full range per track length.
40
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. In
41
+ * drags at 120 to 2000 pt/s, each event's value is v0 plus the
42
+ * translation past 10 pt ÷ 300. Past the max end, the value leaves 1
43
+ * only once the finger comes back past where it reached 1. Oct 23 2026
44
+ */
45
+ trackingGain: 1,
46
+ /**
47
+ * The coast after the lift. The thumb and the value spring from where the
48
+ * finger left them to the projected target, with the release velocity.
49
+ * Critically damped, it never overshoots a target ahead of it.
50
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
51
+ * `UIViewSpringAnimationBehavior` at the lift reads response 0.4 and
52
+ * damping ratio 1. Four releases fit it per frame, at rms 0.11 pt or
53
+ * less. Oct 23 2026
54
+ */
55
+ releaseSpring: SLIDER_RELEASE_SPRING,
56
+ /**
57
+ * The deceleration rate of the coast's momentum projection, per ms
58
+ * (WWDC18's `project`). It is not UIScrollView's normal rate (0.998), so
59
+ * pass it to the projection explicitly.
60
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
61
+ * release behavior's projection deceleration reads 0.996. Oct 23 2026
62
+ */
63
+ releaseProjectionRate: 0.996,
64
+ /**
65
+ * How much of the projection the coast travels. The target is the lift
66
+ * value plus this share of the projected distance. A finger lifted outside
67
+ * the control's tracking bounds coasts back to the lift value instead.
68
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
69
+ * release behavior's target smoothing reads 0.4. A 126.9 pt/s release
70
+ * travels 12.56 pt, against 12.64 predicted. Oct 23 2026
71
+ */
72
+ releaseProjectionShare: 0.4,
73
+ /**
74
+ * The thumb's growth under a finger, uniform about its center (37 × 24 to
75
+ * 57.35 × 37.2 pt).
76
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The lens
77
+ * frame settled during an 800 ms hold. Oct 23 2026
78
+ */
79
+ liftScale: 1.55,
80
+ /**
81
+ * The lift: the thumb grows to `liftScale` when the finger lands.
82
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The lens
83
+ * width per frame in an 800 ms hold fits one spring at rms 0.31 pt.
84
+ * Oct 23 2026
85
+ */
86
+ liftSpring: {
87
+ response: 0.215,
88
+ dampingRatio: 0.6
89
+ },
90
+ /**
91
+ * The drop: the thumb shrinks back to its rest size when the finger lifts,
92
+ * while the coast runs.
93
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
94
+ * lens's spring at the lift of an 800 ms hold reads response 0.5 s and
95
+ * damping ratio 0.7. The width per frame fits it at rms 0.10 pt.
96
+ * Oct 23 2026
97
+ */
98
+ dropSpring: {
99
+ response: 0.5,
100
+ dampingRatio: 0.7
101
+ },
102
+ /**
103
+ * The feedback each time the value reaches an end, once per entry. It
104
+ * re-arms when the value leaves the end, in the drag and the coast. UIKit
105
+ * plays "Micro Tap Medium", and the web stand-in is the closest kind.
106
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
107
+ * haptics log of drags into both ends shows the fluid slider generator's
108
+ * "Micro Tap Medium" once per entry. Oct 23 2026
109
+ */
110
+ endHaptic: 'impactMedium'
111
+ };
@@ -338,36 +338,24 @@ export declare const MENU_REDUCED_MOTION_SPRING: {
338
338
  readonly dampingRatio: 1;
339
339
  };
340
340
  /**
341
- * UISwitch thumb travelling between off and on.
342
- * @source webkit Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
343
- * `thumbMoveSpring = SpringSolver(1.0, 438.649…, 31.4159…)`, "Values
344
- * chosen for consistency with UIKit" (= response 0.30 s, ratio 0.75);
345
- * its settling duration is WebKit's iOS switch duration 0.48801 s
346
- * (RenderThemeIOS.h). These are WebKit's iOS 18 values: UIKit's own
347
- * switch frames differ, and a switch reads its measured table instead.
348
- * @measure M-SW02
341
+ * UISwitch thumb travelling between off and on, measured: the switch table's
342
+ * `travel` reads this row, so the value has one home.
343
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
344
+ * iPhone 17 Pro, the lens's position behavior read on a tap (damping 1,
345
+ * response 0.3); the lens center after a 50 ms tap and after a 1 s hold
346
+ * fits one spring at 0.31 / 1 (rms 0.11 pt), Oct 23 2026
349
347
  */
350
348
  export declare const SWITCH_THUMB_MOVE_SPRING: {
351
349
  readonly response: 0.3;
352
- readonly dampingRatio: 0.75;
353
- };
354
- /**
355
- * UISwitch thumb stretching while pressed and relaxing on release.
356
- * @source webkit Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
357
- * `thumbPressSpring = SpringSolver(1.0, 322.272…, 31.2364…)`, "Values
358
- * chosen for consistency with UIKit" (= response 0.35 s, ratio 0.87);
359
- * settles in WebKit's held duration 0.50740 s (RenderThemeIOS.h). As
360
- * for `switchThumbMove`, UIKit's own frames differ.
361
- * @measure M-SW03
362
- */
363
- export declare const SWITCH_THUMB_STRETCH_SPRING: {
364
- readonly response: 0.35;
365
- readonly dampingRatio: 0.87;
350
+ readonly dampingRatio: 1;
366
351
  };
367
352
  /**
368
353
  * UISegmentedControl selection thumb sliding to a new segment.
369
- * @source GUESS — WebKit's UIKit-matched switch thumb spring, the nearest
370
- * sourced control thumb
354
+ * @source GUESS — WebKit's UIKit-matched switch thumb spring
355
+ * (RenderThemeCocoa.mm `thumbMoveSpring`: response 0.30 s, ratio 0.75),
356
+ * kept only until UISegmentedControl's measured spring replaces it;
357
+ * UISwitch's measured travel (`SWITCH_THUMB_MOVE_SPRING`)
358
+ * belongs to another control
371
359
  * @measure M-SG02
372
360
  * @measure M-SG03
373
361
  */
@@ -399,6 +387,39 @@ export declare const BANNER_SPRING: {
399
387
  readonly stiffness: 1000;
400
388
  readonly damping: 500;
401
389
  };
390
+ /**
391
+ * UISlider's release: after a finger lifts, the thumb settles on this spring
392
+ * toward 0.4 of the release's momentum projection. It is critically damped,
393
+ * so it never overshoots a target ahead of it.
394
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
395
+ * `UIViewSpringAnimationBehavior` at the lift reads response 0.4 and
396
+ * damping ratio 1. Four releases fit it per frame (the UIKit slider
397
+ * table). Oct 23 2026
398
+ */
399
+ export declare const SLIDER_RELEASE_SPRING: {
400
+ readonly response: 0.4;
401
+ readonly dampingRatio: 1;
402
+ };
403
+ /**
404
+ * UISlider's lift: a finger's touch-down scales the thumb up on this spring.
405
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
406
+ * thumb's scale per frame after touch-down (the UIKit slider table).
407
+ * Oct 23 2026
408
+ */
409
+ export declare const SLIDER_LIFT_SPRING: {
410
+ readonly response: 0.215;
411
+ readonly dampingRatio: 0.6;
412
+ };
413
+ /**
414
+ * UISlider's drop: the lift's end scales the thumb back down on this spring.
415
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
416
+ * thumb's scale per frame after the lift (the UIKit slider table).
417
+ * Oct 23 2026
418
+ */
419
+ export declare const SLIDER_DROP_SPRING: {
420
+ readonly response: 0.5;
421
+ readonly dampingRatio: 0.7;
422
+ };
402
423
  /**
403
424
  * Every spring above, by row name: the table the existing readers use. A
404
425
  * component imports only the rows it plays (`architecture:component-style-authoring`
@@ -530,11 +551,7 @@ export declare const springs: {
530
551
  };
531
552
  readonly switchThumbMove: {
532
553
  readonly response: 0.3;
533
- readonly dampingRatio: 0.75;
534
- };
535
- readonly switchThumbStretch: {
536
- readonly response: 0.35;
537
- readonly dampingRatio: 0.87;
554
+ readonly dampingRatio: 1;
538
555
  };
539
556
  readonly segmentedThumb: {
540
557
  readonly response: 0.3;
@@ -550,9 +567,21 @@ export declare const springs: {
550
567
  readonly stiffness: 1000;
551
568
  readonly damping: 500;
552
569
  };
570
+ readonly sliderRelease: {
571
+ readonly response: 0.4;
572
+ readonly dampingRatio: 1;
573
+ };
574
+ readonly sliderLift: {
575
+ readonly response: 0.215;
576
+ readonly dampingRatio: 0.6;
577
+ };
578
+ readonly sliderDrop: {
579
+ readonly response: 0.5;
580
+ readonly dampingRatio: 0.7;
581
+ };
553
582
  };
554
583
  /**
555
- * Registers the springs spec:AST-094 FR4 names as internal motion roles
584
+ * Registers the role springs (`SPRING_ROLES`) as internal motion roles
556
585
  * (motion/roles.ts), by their row names (`springs.settle`). Every other
557
586
  * spring, UIKit's menu spring under Reduce Motion and the keyboard's
558
587
  * included, is not a role. Nothing registers on import: the touch code that
@@ -1 +1 @@
1
- {"version":3,"file":"springs.d.ts","sourceRoot":"","sources":["../../../src/motion/uikit/springs.ts"],"names":[],"mappings":"AAmCA;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;CAAsC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;CAAyC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,eAAe;;;CAAwC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;CAA6C,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;CAAsC,CAAC;AAEvE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAMX;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;;CAA4C,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;CAA4C,CAAC;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,wCAAwC;;;CAG3C,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B;;;CAGjC,CAAC;AAMX;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCV,CAAC;AA6BX;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C"}
@@ -16,10 +16,10 @@
16
16
  * uikit.test.ts enforces both.
17
17
  *
18
18
  * Most springs are measured on iOS 26.2 or documented by Apple; two are still
19
- * GUESSES (`segmentedThumb`, `banner`) and two come from WebKit
20
- * (`switchThumbMove`, `switchThumbStretch`). A guess starts from the
21
- * nearest sourced spring and names it, so a component built on the table
22
- * gets the right value the moment its measurement lands, without changing.
19
+ * GUESSES (`segmentedThumb`, `banner`). `switchThumbMove` is the switch's
20
+ * measured travel, which uikit/switch.ts reads. A guess starts from the
21
+ * nearest sourced spring and names it. A component built on the table gets
22
+ * the measured value the moment it lands, without changing.
23
23
  *
24
24
  * Press highlight in/out are fades, not springs: see timing.ts.
25
25
  *
@@ -418,38 +418,25 @@ export const MENU_REDUCED_MOTION_SPRING = {
418
418
  // ---------------------------------------------------------------------
419
419
 
420
420
  /**
421
- * UISwitch thumb travelling between off and on.
422
- * @source webkit Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
423
- * `thumbMoveSpring = SpringSolver(1.0, 438.649…, 31.4159…)`, "Values
424
- * chosen for consistency with UIKit" (= response 0.30 s, ratio 0.75);
425
- * its settling duration is WebKit's iOS switch duration 0.48801 s
426
- * (RenderThemeIOS.h). These are WebKit's iOS 18 values: UIKit's own
427
- * switch frames differ, and a switch reads its measured table instead.
428
- * @measure M-SW02
421
+ * UISwitch thumb travelling between off and on, measured: the switch table's
422
+ * `travel` reads this row, so the value has one home.
423
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
424
+ * iPhone 17 Pro, the lens's position behavior read on a tap (damping 1,
425
+ * response 0.3); the lens center after a 50 ms tap and after a 1 s hold
426
+ * fits one spring at 0.31 / 1 (rms 0.11 pt), Oct 23 2026
429
427
  */
430
428
  export const SWITCH_THUMB_MOVE_SPRING = {
431
429
  response: 0.3,
432
- dampingRatio: 0.75
433
- };
434
-
435
- /**
436
- * UISwitch thumb stretching while pressed and relaxing on release.
437
- * @source webkit Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
438
- * `thumbPressSpring = SpringSolver(1.0, 322.272…, 31.2364…)`, "Values
439
- * chosen for consistency with UIKit" (= response 0.35 s, ratio 0.87);
440
- * settles in WebKit's held duration 0.50740 s (RenderThemeIOS.h). As
441
- * for `switchThumbMove`, UIKit's own frames differ.
442
- * @measure M-SW03
443
- */
444
- export const SWITCH_THUMB_STRETCH_SPRING = {
445
- response: 0.35,
446
- dampingRatio: 0.87
430
+ dampingRatio: 1
447
431
  };
448
432
 
449
433
  /**
450
434
  * UISegmentedControl selection thumb sliding to a new segment.
451
- * @source GUESS — WebKit's UIKit-matched switch thumb spring, the nearest
452
- * sourced control thumb
435
+ * @source GUESS — WebKit's UIKit-matched switch thumb spring
436
+ * (RenderThemeCocoa.mm `thumbMoveSpring`: response 0.30 s, ratio 0.75),
437
+ * kept only until UISegmentedControl's measured spring replaces it;
438
+ * UISwitch's measured travel (`SWITCH_THUMB_MOVE_SPRING`)
439
+ * belongs to another control
453
440
  * @measure M-SG02
454
441
  * @measure M-SG03
455
442
  */
@@ -488,6 +475,42 @@ export const BANNER_SPRING = {
488
475
  damping: 500
489
476
  };
490
477
 
478
+ /**
479
+ * UISlider's release: after a finger lifts, the thumb settles on this spring
480
+ * toward 0.4 of the release's momentum projection. It is critically damped,
481
+ * so it never overshoots a target ahead of it.
482
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
483
+ * `UIViewSpringAnimationBehavior` at the lift reads response 0.4 and
484
+ * damping ratio 1. Four releases fit it per frame (the UIKit slider
485
+ * table). Oct 23 2026
486
+ */
487
+ export const SLIDER_RELEASE_SPRING = {
488
+ response: 0.4,
489
+ dampingRatio: 1
490
+ };
491
+
492
+ /**
493
+ * UISlider's lift: a finger's touch-down scales the thumb up on this spring.
494
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
495
+ * thumb's scale per frame after touch-down (the UIKit slider table).
496
+ * Oct 23 2026
497
+ */
498
+ export const SLIDER_LIFT_SPRING = {
499
+ response: 0.215,
500
+ dampingRatio: 0.6
501
+ };
502
+
503
+ /**
504
+ * UISlider's drop: the lift's end scales the thumb back down on this spring.
505
+ * @source measured: UIKit lab, iOS 26.2 simulator, iPhone 17 Pro. The
506
+ * thumb's scale per frame after the lift (the UIKit slider table).
507
+ * Oct 23 2026
508
+ */
509
+ export const SLIDER_DROP_SPRING = {
510
+ response: 0.5,
511
+ dampingRatio: 0.7
512
+ };
513
+
491
514
  /**
492
515
  * Every spring above, by row name: the table the existing readers use. A
493
516
  * component imports only the rows it plays (`architecture:component-style-authoring`
@@ -524,14 +547,18 @@ export const springs = {
524
547
  contextMenuMorph: CONTEXT_MENU_MORPH_SPRING,
525
548
  menuReducedMotion: MENU_REDUCED_MOTION_SPRING,
526
549
  switchThumbMove: SWITCH_THUMB_MOVE_SPRING,
527
- switchThumbStretch: SWITCH_THUMB_STRETCH_SPRING,
528
550
  segmentedThumb: SEGMENTED_THUMB_SPRING,
529
551
  keyboard: KEYBOARD_SPRING,
530
- banner: BANNER_SPRING
552
+ banner: BANNER_SPRING,
553
+ sliderRelease: SLIDER_RELEASE_SPRING,
554
+ sliderLift: SLIDER_LIFT_SPRING,
555
+ sliderDrop: SLIDER_DROP_SPRING
531
556
  };
532
557
 
533
558
  /**
534
- * The springs spec:AST-094 FR4 names: the only ones that are motion roles.
559
+ * The only springs that are motion roles. The touch presentations' record
560
+ * names some, and a component's own record names others, such as Slider's
561
+ * three. The generated motion role table lists each with its record.
535
562
  * The registry takes these rows alone, so registering ships no other spring.
536
563
  */
537
564
  const SPRING_ROLES = {
@@ -549,11 +576,14 @@ const SPRING_ROLES = {
549
576
  subMenuBack: SUB_MENU_BACK_SPRING,
550
577
  contextMenuLift: CONTEXT_MENU_LIFT_SPRING,
551
578
  contextMenuDismiss: CONTEXT_MENU_DISMISS_SPRING,
552
- contextMenuMorph: CONTEXT_MENU_MORPH_SPRING
579
+ contextMenuMorph: CONTEXT_MENU_MORPH_SPRING,
580
+ sliderRelease: SLIDER_RELEASE_SPRING,
581
+ sliderLift: SLIDER_LIFT_SPRING,
582
+ sliderDrop: SLIDER_DROP_SPRING
553
583
  };
554
584
 
555
585
  /**
556
- * Registers the springs spec:AST-094 FR4 names as internal motion roles
586
+ * Registers the role springs (`SPRING_ROLES`) as internal motion roles
557
587
  * (motion/roles.ts), by their row names (`springs.settle`). Every other
558
588
  * spring, UIKit's menu spring under Reduce Motion and the keyboard's
559
589
  * included, is not a role. Nothing registers on import: the touch code that
@@ -0,0 +1,166 @@
1
+ /**
2
+ * UISwitch on iOS 26.2. Under a finger its white thumb lifts into a clear
3
+ * glass lens, and a drag moves it with a rubber band. The track colour slides
4
+ * on a spring of its own. UISwitch plays no haptic.
5
+ */
6
+ export declare const switchControl: {
7
+ /**
8
+ * The control's size (width × height): the track.
9
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
10
+ * iPhone 17 Pro, `UISwitch` frame 63 × 28 (intrinsic 61 × 28), track view
11
+ * 63 × 28 with corner radius 14, Oct 23 2026
12
+ */
13
+ readonly trackSize: readonly [63, 28];
14
+ /**
15
+ * The thumb at rest (width × height), inset equally from the track's top,
16
+ * bottom and nearer end; it never changes size between off and on.
17
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
18
+ * iPhone 17 Pro, `_UILiquidLensView` frame 37 × 24 at x 2 (off) and
19
+ * x 24 (on) inside the 63 × 28 track, Oct 23 2026
20
+ */
21
+ readonly thumbSize: readonly [37, 24];
22
+ /**
23
+ * The thumb lifted under a finger (width × height). The lens grows about
24
+ * its own center, past the track, and holds this size while the finger
25
+ * stays down.
26
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
27
+ * iPhone 17 Pro, lens bounds settled at 58 × 38.33 during a 1 s hold
28
+ * (center unmoved), Oct 23 2026
29
+ */
30
+ readonly liftedThumbSize: readonly [58, 38.333];
31
+ /**
32
+ * The lift: the thumb growing to `liftedThumbSize` while its white fill
33
+ * fades out and the clear glass fades in (one spring drives all three).
34
+ * Starts with the touch outside a scroll view, after its content delay
35
+ * inside one. UISwitch keeps it under Reduce Motion; core's Switch does not
36
+ * lift then.
37
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
38
+ * iPhone 17 Pro, per-frame lens bounds during a 1 s hold fitted with one
39
+ * spring for width and height (rms 0.29 pt; the fill's and the glass's
40
+ * opacity overshoot by the same 13 %; the lens's settings read on a tap
41
+ * say damping 0.625, response 0.27, whose 8 % overshoot is short of the
42
+ * frames' 12 %), Oct 23 2026
43
+ */
44
+ readonly lift: {
45
+ readonly response: 0.23;
46
+ readonly dampingRatio: 0.55;
47
+ };
48
+ /**
49
+ * The settle after the finger lifts: the lens shrinking back to
50
+ * `thumbSize` while the white fill returns over the glass.
51
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
52
+ * iPhone 17 Pro, the lens's spring settings read on a tap (damping 0.7,
53
+ * response 0.5); per-frame lens bounds after the lift of a 1 s hold fit
54
+ * one spring at 0.49 / 0.70 (rms 0.065 pt; the opacities undershoot by
55
+ * the same 4.5 %), Oct 23 2026
56
+ */
57
+ readonly settle: {
58
+ readonly response: 0.5;
59
+ readonly dampingRatio: 0.7;
60
+ };
61
+ /**
62
+ * The settle never starts sooner than this after the lift began, so a
63
+ * quick tap still shows the lifted lens, in ms.
64
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
65
+ * iPhone 17 Pro, a 50 ms tap: the lift→settle hand-off fitted at 235 ms
66
+ * after the lift began (rms 0.33 pt), Oct 23 2026
67
+ * @measure M-SW07
68
+ */
69
+ readonly minimumLiftMs: 235;
70
+ /**
71
+ * The thumb travelling to the committed end after a release or a
72
+ * programmatic change. It starts from the thumb's own velocity.
73
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
74
+ * iPhone 17 Pro, the lens's position behavior read on a tap (damping 1,
75
+ * response 0.3); the lens center after a 50 ms tap and after a 1 s hold
76
+ * fits one spring at 0.31 / 1 (rms 0.11 pt), Oct 23 2026; the springs
77
+ * table's `SWITCH_THUMB_MOVE_SPRING` holds the one value
78
+ */
79
+ readonly travel: {
80
+ readonly response: 0.3;
81
+ readonly dampingRatio: 1;
82
+ };
83
+ /**
84
+ * During a drag the thumb chases the finger: each move retargets this
85
+ * spring at the finger's position, rubber-banded past either end.
86
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
87
+ * iPhone 17 Pro, a 4 s drag off → on → past both ends: the lens center
88
+ * simulated as this spring chasing the rubber-banded finger fits every
89
+ * frame (rms 0.21 pt), Oct 23 2026
90
+ */
91
+ readonly tracking: {
92
+ readonly response: 0.36;
93
+ readonly dampingRatio: 1;
94
+ };
95
+ /**
96
+ * The drag's rubber band past either end: UIScrollView's
97
+ * `(1 − 1 ÷ (x·c ÷ d + 1))·d`. The coefficient c and the dimension d are in
98
+ * pt for the 28 pt control. Scale d with the track height.
99
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
100
+ * iPhone 17 Pro, the same drag fit: c 0.55, d 11.75–12 pt, the
101
+ * translation measured from where the finger landed, Oct 23 2026
102
+ */
103
+ readonly rubberBand: {
104
+ readonly coefficient: 0.55;
105
+ readonly dimension: 12;
106
+ };
107
+ /**
108
+ * A drag flips the switch by the finger, not the thumb. Once the finger is
109
+ * this far from where it landed, toward the other end, the switch shows
110
+ * the other side. The distance is the track width minus the thumb width
111
+ * (63 − 37 pt). Back past where it landed, the starting side shows again.
112
+ * Flips happen on touch events only, so a fast swipe flips on the lift.
113
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
114
+ * iPhone 17 Pro, `UISwitchModernVisualElement` ivars per frame and the
115
+ * "SwitchWellPosition" springs during 1 pt-step drags: the same 26 pt for
116
+ * presses at x 8, 20.5 and 45, with and without a 400 ms hold, mirrored
117
+ * on an on switch; flipping back at the press point, Oct 23 2026
118
+ */
119
+ readonly flipDistance: 26;
120
+ /**
121
+ * The track color turning on: the well image sliding in on a critically
122
+ * damped spring, starting when the switch flips (the lift of a tap).
123
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
124
+ * iPhone 17 Pro, `CASpringAnimation` "SwitchWellPosition" read: mass 1,
125
+ * stiffness 85.377, damping 18.480 (response 0.68 s), Oct 23 2026
126
+ */
127
+ readonly wellOn: {
128
+ readonly mass: 1;
129
+ readonly stiffness: 85.37720070146501;
130
+ readonly damping: 18.47995678582231;
131
+ };
132
+ /**
133
+ * The track color turning off: the same well sliding back, faster.
134
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
135
+ * iPhone 17 Pro, `CASpringAnimation` "SwitchWellPosition" read: mass 1,
136
+ * stiffness 246.740, damping 31.416 (response 0.40 s), Oct 23 2026
137
+ */
138
+ readonly wellOff: {
139
+ readonly mass: 1;
140
+ readonly stiffness: 246.74011002723395;
141
+ readonly damping: 31.41592653589793;
142
+ };
143
+ /**
144
+ * The lifted lens's drop shadow: y offset and radius in pt, then black
145
+ * alpha; none at rest.
146
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
147
+ * iPhone 17 Pro, the lens layer's presented `shadowOffset` (0, 7),
148
+ * `shadowRadius` 3, `shadowOpacity` 0.12 once lifted, 0 at rest,
149
+ * Oct 23 2026
150
+ */
151
+ readonly liftedShadow: readonly [7, 3, 0.12];
152
+ /**
153
+ * UISwitch plays no haptic on a tap, a hold or a drag.
154
+ * @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
155
+ * iPhone 17 Pro, every `UIFeedbackGenerator` entry point hooked: no call
156
+ * on tap, hold, drag or flip, Oct 23 2026
157
+ */
158
+ readonly haptic: "none";
159
+ };
160
+ /**
161
+ * Registers the switch table's motion roles as internal roles. Nothing
162
+ * registers on import: Switch's touch presentation calls it once before its
163
+ * first animation, and a second call does nothing.
164
+ */
165
+ export declare function registerSwitchTable(): void;
166
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/motion/uikit/switch.ts"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,eAAO,MAAM,aAAa;IACxB;;;;;OAKG;;IAEH;;;;;;OAMG;;IAEH;;;;;;;OAOG;;IAEH;;;;;;;;;;;;OAYG;;;;;IAEH;;;;;;;;OAQG;;;;;IAEH;;;;;;;OAOG;;IAEH;;;;;;;;OAQG;;;;;IAEH;;;;;;;OAOG;;;;;IAEH;;;;;;;OAOG;;;;;IAEH;;;;;;;;;;;OAWG;;IAEH;;;;;;OAMG;;;;;;IAEH;;;;;OAKG;;;;;;IAEH;;;;;;;OAOG;;IAEH;;;;;OAKG;;CAEK,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAY1C"}