@astryxdesign/core 0.7.8-canary.fbb81c6 → 0.7.8

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 (87) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/dist/ClickableCard/ClickableCard.d.ts +1 -1
  3. package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
  4. package/dist/ClickableCard/ClickableCard.js +1 -5
  5. package/dist/DateInput/PickerWheel.d.ts.map +1 -1
  6. package/dist/DateInput/PickerWheel.js +1 -7
  7. package/dist/DropdownMenu/DropdownMenu.d.ts +1 -9
  8. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  9. package/dist/DropdownMenu/DropdownMenu.js +4 -9
  10. package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
  11. package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +2 -3
  12. package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  13. package/dist/DropdownMenu/DropdownMenuItem.js +2 -3
  14. package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
  15. package/dist/DropdownMenu/DropdownMenuRadioItem.js +2 -3
  16. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  17. package/dist/DropdownMenu/DropdownMenuSubMenu.js +2 -3
  18. package/dist/Item/Item.d.ts.map +1 -1
  19. package/dist/Item/Item.js +1 -6
  20. package/dist/Layer/preserveAnimations.d.ts +5 -1
  21. package/dist/Layer/preserveAnimations.d.ts.map +1 -1
  22. package/dist/Layer/preserveAnimations.js +214 -12
  23. package/dist/MoreMenu/MoreMenu.d.ts +3 -5
  24. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  25. package/dist/SelectableCard/SelectableCard.d.ts +1 -1
  26. package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
  27. package/dist/SelectableCard/SelectableCard.js +1 -5
  28. package/dist/TreeList/TreeListItem.d.ts.map +1 -1
  29. package/dist/TreeList/TreeListItem.js +1 -3
  30. package/dist/astryx.css +2 -6
  31. package/dist/hooks/menuPressGesture.d.ts +21 -132
  32. package/dist/hooks/menuPressGesture.d.ts.map +1 -1
  33. package/dist/hooks/menuPressGesture.js +30 -155
  34. package/dist/hooks/useClickableContainer.d.ts +5 -19
  35. package/dist/hooks/useClickableContainer.d.ts.map +1 -1
  36. package/dist/hooks/useClickableContainer.js +5 -28
  37. package/dist/hooks/useMenuPress.d.ts +1 -34
  38. package/dist/hooks/useMenuPress.d.ts.map +1 -1
  39. package/dist/hooks/useMenuPress.js +5 -93
  40. package/dist/motion/transientCopy.d.ts +2 -4
  41. package/dist/motion/transientCopy.d.ts.map +1 -1
  42. package/dist/motion/transientCopy.js +5 -34
  43. package/dist/motion/uikit/gestures.d.ts +0 -41
  44. package/dist/motion/uikit/gestures.d.ts.map +1 -1
  45. package/dist/motion/uikit/gestures.js +0 -25
  46. package/dist/motion/uikit/index.d.ts +1 -1
  47. package/dist/motion/uikit/index.d.ts.map +1 -1
  48. package/dist/motion/uikit/index.js +1 -1
  49. package/dist/utils/pressFeedback.d.ts +0 -7
  50. package/dist/utils/pressFeedback.d.ts.map +1 -1
  51. package/dist/utils/pressFeedback.js +1 -16
  52. package/package.json +5 -5
  53. package/src/ClickableCard/ClickableCard.tsx +1 -8
  54. package/src/DateInput/PickerWheel.tsx +2 -7
  55. package/src/DropdownMenu/DropdownMenu.doc.mjs +2 -1
  56. package/src/DropdownMenu/DropdownMenu.tsx +5 -29
  57. package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +1 -5
  58. package/src/DropdownMenu/DropdownMenuItem.tsx +4 -8
  59. package/src/DropdownMenu/DropdownMenuRadioItem.tsx +1 -5
  60. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +1 -5
  61. package/src/Item/Item.tsx +5 -15
  62. package/src/Layer/preserveAnimations.ts +275 -12
  63. package/src/MoreMenu/MoreMenu.doc.mjs +4 -2
  64. package/src/MoreMenu/MoreMenu.tsx +3 -5
  65. package/src/SelectableCard/SelectableCard.tsx +1 -8
  66. package/src/TreeList/TreeListItem.tsx +6 -8
  67. package/src/hooks/menuPressGesture.ts +38 -243
  68. package/src/hooks/useClickableContainer.doc.mjs +2 -8
  69. package/src/hooks/useClickableContainer.ts +6 -52
  70. package/src/hooks/useMenuPress.ts +11 -118
  71. package/src/motion/MEASUREMENTS.md +0 -11
  72. package/src/motion/transientCopy.ts +5 -45
  73. package/src/motion/uikit/gestures.ts +0 -22
  74. package/src/motion/uikit/index.ts +0 -1
  75. package/src/utils/pressFeedback.ts +1 -16
  76. package/dist/hooks/menuPressValues.d.ts +0 -16
  77. package/dist/hooks/menuPressValues.d.ts.map +0 -1
  78. package/dist/hooks/menuPressValues.js +0 -18
  79. package/dist/motion/carryAnimations.d.ts +0 -58
  80. package/dist/motion/carryAnimations.d.ts.map +0 -1
  81. package/dist/motion/carryAnimations.js +0 -305
  82. package/dist/privateAttributes/menuPressLit.stylex.d.ts +0 -52
  83. package/dist/privateAttributes/menuPressLit.stylex.d.ts.map +0 -1
  84. package/dist/privateAttributes/menuPressLit.stylex.js +0 -99
  85. package/src/hooks/menuPressValues.ts +0 -18
  86. package/src/motion/carryAnimations.ts +0 -389
  87. package/src/privateAttributes/menuPressLit.stylex.ts +0 -104
@@ -4,7 +4,7 @@
4
4
  * @file menuPressGesture.ts
5
5
  * @input A menu press gesture and one pointer event, both as plain data
6
6
  * @output The pure `menuPressStep` state machine, its state, event and effect
7
- * types, the settle constant, and the finger's handoff distance
7
+ * types, and the settle constant
8
8
  * @position Pure module under `useMenuPress`. It has no DOM and no React, so
9
9
  * a unit test can check each transition without a browser.
10
10
  *
@@ -13,28 +13,8 @@
13
13
  * - /packages/core/src/hooks/useMenuPress.ts
14
14
  */
15
15
 
16
- import { MENU_PRESS_HANDOFF_PX as UIKIT_MENU_PRESS_HANDOFF_PX } from "./menuPressValues.js";
17
-
18
- /**
19
- * How long the opening press must last before its release may act, unless a
20
- * finger's handoff applies.
21
- */
16
+ /** How long the opening press must last before its release may act. */
22
17
  export const MENU_PRESS_SETTLE_MS = 300;
23
-
24
- /**
25
- * How far a finger that opened the menu travels, from the first sample the
26
- * menu sees, before it starts picking (UIMenu's scrub handoff).
27
- */
28
- export const MENU_PRESS_HANDOFF_PX = UIKIT_MENU_PRESS_HANDOFF_PX;
29
-
30
- /** @internal The machine's own shape, with the finger's handoff; not public contract. */
31
-
32
- /** @internal The machine's own shape, with the finger's handoff; not public contract. */
33
-
34
- /** @internal The machine's own shape, with the finger's handoff; not public contract. */
35
-
36
- /** @internal The machine's own shape, with the finger's handoff; not public contract. */
37
-
38
18
  export const IDLE_MENU_PRESS = {
39
19
  phase: 'idle'
40
20
  };
@@ -58,23 +38,6 @@ function highlightEffect(row) {
58
38
  };
59
39
  }
60
40
 
61
- /** A finger or a pen: UIKit's touch rules apply. */
62
- function isFinger(pointerType) {
63
- return pointerType !== 'mouse';
64
- }
65
- function hasPosition(event) {
66
- return event.x != null && event.y != null;
67
- }
68
-
69
- /**
70
- * Whether a finger has travelled the handoff distance from `from`. The
71
- * distance is a straight line, as UIMenu measures it: a diagonal 7 pt each
72
- * way does not hand off, 9 pt each way does.
73
- */
74
- function hasPassedHandoff(from, to) {
75
- return Math.hypot(to.x - from.x, to.y - from.y) >= MENU_PRESS_HANDOFF_PX;
76
- }
77
-
78
41
  /**
79
42
  * Resolve a release while the highlight is tracking the pointer: over an
80
43
  * enabled row it acts, over the menu's chrome it acts on nothing, outside the
@@ -110,15 +73,10 @@ function release(pointerType, event) {
110
73
  * - `idle`: no gesture is live.
111
74
  * - `triggerPress`: a finger rests on the trigger, and the menu is not open
112
75
  * yet. A mouse press on the trigger skips this state and opens at once.
113
- * - `open`: the menu opened under a held pointer, and the pointer does not
114
- * pick yet.
76
+ * - `open`: the menu opened under a held pointer, and the pointer has not
77
+ * entered it yet.
115
78
  * - `tracking`: the pointer is held, and the highlight follows it.
116
79
  *
117
- * A finger or a pen that opened the menu picks only after it travels
118
- * `MENU_PRESS_HANDOFF_PX` from the first position the menu sees. UIMenu
119
- * hands off the same way. Until then nothing lights, and its lift acts on
120
- * nothing. A host that reports no positions keeps the settle rule.
121
- *
122
80
  * The settle rule: the release of the opening gesture acts only after the
123
81
  * pointer entered the menu or the press lasted `MENU_PRESS_SETTLE_MS`. Else a
124
82
  * menu that opens under the pointer would pick a row that nobody chose.
@@ -126,11 +84,8 @@ function release(pointerType, event) {
126
84
  * Rows are opaque (`T`). The hook feeds in the enabled row under the
127
85
  * pointer, or `null` over a divider, a heading, a disabled row, or outside
128
86
  * the menu.
129
- *
130
- * @internal The machine's own shape, with the finger's handoff; not public
131
- * contract.
132
87
  */
133
- export function menuPressTransition(gesture, event) {
88
+ export function menuPressStep(gesture, event) {
134
89
  switch (gesture.phase) {
135
90
  case 'idle':
136
91
  return stepIdle(gesture, event);
@@ -221,67 +176,23 @@ function stepTriggerPress(gesture, event) {
221
176
  function stepOpen(gesture, event) {
222
177
  switch (event.type) {
223
178
  case 'move':
224
- {
225
- if (isFinger(gesture.pointerType) && hasPosition(event)) {
226
- // UIMenu counts from the first sample after the open, not from the
227
- // open point.
228
- const from = gesture.handoffFrom;
229
- if (from == null) {
230
- return {
231
- gesture: {
232
- ...gesture,
233
- handoffFrom: {
234
- x: event.x,
235
- y: event.y
236
- }
237
- },
238
- effect: NONE
239
- };
240
- }
241
- if (!hasPassedHandoff(from, event)) {
242
- return {
243
- gesture,
244
- effect: NONE
245
- };
246
- }
247
- return {
248
- gesture: {
249
- phase: 'tracking',
250
- pointerType: gesture.pointerType,
251
- origin: 'trigger',
252
- row: event.row
253
- },
254
- effect: highlightEffect(event.row)
255
- };
256
- }
257
- if (!event.isInMenu) {
258
- return {
259
- gesture,
260
- effect: NONE
261
- };
262
- }
179
+ if (!event.isInMenu) {
263
180
  return {
264
- gesture: {
265
- phase: 'tracking',
266
- pointerType: gesture.pointerType,
267
- origin: 'trigger',
268
- row: event.row
269
- },
270
- effect: highlightEffect(event.row)
181
+ gesture,
182
+ effect: NONE
271
183
  };
272
184
  }
185
+ return {
186
+ gesture: {
187
+ phase: 'tracking',
188
+ pointerType: gesture.pointerType,
189
+ origin: 'trigger',
190
+ row: event.row
191
+ },
192
+ effect: highlightEffect(event.row)
193
+ };
273
194
  case 'up':
274
195
  {
275
- if (isFinger(gesture.pointerType) && hasPosition(event)) {
276
- // The finger never travelled the handoff distance, so the row under it
277
- // appeared under a press nobody moved. Nothing acts, the menu stays,
278
- // and the trigger's click for this press is spent.
279
- return idle({
280
- type: 'settle',
281
- stray: true,
282
- dismiss: false
283
- });
284
- }
285
196
  const hasSettled = event.time - gesture.openedAt >= MENU_PRESS_SETTLE_MS;
286
197
  if (!hasSettled) {
287
198
  // The pointer never entered the menu and the press was short: the
@@ -297,7 +208,7 @@ function stepOpen(gesture, event) {
297
208
  }
298
209
  case 'cancel':
299
210
  // As above: the gesture ends, so its document listeners come off. The
300
- // menu stays open: a cancelled pointer did not ask to close it.
211
+ // menu stays open — a cancelled pointer did not ask to close it.
301
212
  return idle({
302
213
  type: 'settle',
303
214
  stray: false,
@@ -314,19 +225,21 @@ function stepOpen(gesture, event) {
314
225
  function stepTracking(gesture, event) {
315
226
  switch (event.type) {
316
227
  case 'move':
317
- if (event.row === gesture.row) {
228
+ {
229
+ if (event.row === gesture.row) {
230
+ return {
231
+ gesture,
232
+ effect: NONE
233
+ };
234
+ }
318
235
  return {
319
- gesture,
320
- effect: NONE
236
+ gesture: {
237
+ ...gesture,
238
+ row: event.row
239
+ },
240
+ effect: highlightEffect(event.row)
321
241
  };
322
242
  }
323
- return {
324
- gesture: {
325
- ...gesture,
326
- row: event.row
327
- },
328
- effect: highlightEffect(event.row)
329
- };
330
243
  case 'up':
331
244
  return release(gesture.pointerType, event);
332
245
  case 'cancel':
@@ -344,42 +257,4 @@ function stepTracking(gesture, event) {
344
257
  effect: NONE
345
258
  };
346
259
  }
347
- }
348
-
349
- // ---------------------------------------------------------------------------
350
- // The released public shape (`@astryxdesign/core/hooks`). The handoff
351
- // positions and `handoffFrom` stay internal: a caller of
352
- // `menuPressStep` keeps the settle rule, as released.
353
- // ---------------------------------------------------------------------------
354
-
355
- /**
356
- * The menu press machine, as released: one step from a gesture and an event
357
- * to the next gesture and the effect to apply. Pure.
358
- */
359
- export function menuPressStep(gesture, event) {
360
- // The released machine keeps the settle rule. Positions start the handoff,
361
- // so a caller's event reaches the transition without them.
362
- const {
363
- x: _x,
364
- y: _y,
365
- ...released
366
- } = event;
367
- const {
368
- gesture: next,
369
- effect
370
- } = menuPressTransition(gesture, released);
371
- return {
372
- gesture: publicGesture(next),
373
- effect
374
- };
375
- }
376
- function publicGesture(gesture) {
377
- if (gesture.phase !== 'open') {
378
- return gesture;
379
- }
380
- return {
381
- phase: 'open',
382
- pointerType: gesture.pointerType,
383
- openedAt: gesture.openedAt
384
- };
385
260
  }
@@ -1,18 +1,16 @@
1
1
  /**
2
2
  * @file useClickableContainer.ts
3
3
  * @input Container ref, interactive element ref, click/href handlers
4
- * @output onClick, onMouseUp and onPointerDown handlers for the container;
5
- * INTERACTIVE_SELECTORS list;
4
+ * @output onClick and onMouseUp handlers for the container; INTERACTIVE_SELECTORS list;
6
5
  * hasInteractiveAncestor and the shared innermostInteractive walk
7
6
  * @position Core hook for clickable containers with nested interactive
8
7
  * elements. A click on a nested button or link does not run the card's
9
- * action, and a finger press there shows no press on the card. Each navigation
10
- * passes the rule in utils/safeUrl.ts first.
8
+ * action. Each navigation passes the rule in utils/safeUrl.ts first.
11
9
  *
12
10
  * SYNC: When modified, update:
13
11
  * - /packages/core/src/hooks/index.ts (export)
14
12
  */
15
- import { type RefObject, type MouseEvent, type PointerEvent } from 'react';
13
+ import { type RefObject, type MouseEvent } from 'react';
16
14
  /**
17
15
  * The attribute this hook sets on the container it makes clickable. A click
18
16
  * inside a nested marked container belongs to that container (see
@@ -89,14 +87,6 @@ export interface UseClickableContainerOptions {
89
87
  export interface ClickableContainerResult {
90
88
  onClick: (event: MouseEvent<HTMLElement>) => void;
91
89
  onMouseUp: (event: MouseEvent<HTMLElement>) => void;
92
- /**
93
- * Spread on the container with `onClick`. A press that starts on a nested
94
- * interactive element does not activate the container. On a container that
95
- * paints its press with `usePressFeedback`, this drops that touch press.
96
- * A mouse `:active` press paint is unchanged. A container without it keeps
97
- * its activation rule and shows its pressed state for every press.
98
- */
99
- onPointerDown: (event: PointerEvent<HTMLElement>) => void;
100
90
  }
101
91
  /**
102
92
  * Hook that makes a container element clickable while preserving
@@ -113,16 +103,12 @@ export interface ClickableContainerResult {
113
103
  * @example
114
104
  * ```
115
105
  * const containerRef = useRef<HTMLDivElement>(null);
116
- * const { onClick, onMouseUp, onPointerDown } = useClickableContainer({
106
+ * const { onClick, onMouseUp } = useClickableContainer({
117
107
  * containerRef,
118
108
  * onClick: () => console.log('card clicked'),
119
109
  * });
120
110
  * return (
121
- * <div
122
- * ref={containerRef}
123
- * onClick={onClick}
124
- * onMouseUp={onMouseUp}
125
- * onPointerDown={onPointerDown}>
111
+ * <div ref={containerRef} onClick={onClick} onMouseUp={onMouseUp}>
126
112
  * <p>Click anywhere on this card</p>
127
113
  * <button onClick={() => alert('button')}>Nested button</button>
128
114
  * </div>
@@ -1 +1 @@
1
- {"version":3,"file":"useClickableContainer.d.ts","sourceRoot":"","sources":["../../src/hooks/useClickableContainer.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AAKf;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AAExE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,QAmBvB,CAAC;AAIZ;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAKrE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,OAAO,EACX,MAAM,EAAE,OAAO,GAAG,IAA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AAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAClD,SAAS,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACrD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,YAAY,EACZ,cAAc,EACd,OAAO,EAAE,WAAW,EACpB,IAAI,EACJ,MAAM,EACN,QAAgB,GACjB,EAAE,4BAA4B,GAAG,wBAAwB,CA+GzD"}
@@ -5,13 +5,11 @@
5
5
  /**
6
6
  * @file useClickableContainer.ts
7
7
  * @input Container ref, interactive element ref, click/href handlers
8
- * @output onClick, onMouseUp and onPointerDown handlers for the container;
9
- * INTERACTIVE_SELECTORS list;
8
+ * @output onClick and onMouseUp handlers for the container; INTERACTIVE_SELECTORS list;
10
9
  * hasInteractiveAncestor and the shared innermostInteractive walk
11
10
  * @position Core hook for clickable containers with nested interactive
12
11
  * elements. A click on a nested button or link does not run the card's
13
- * action, and a finger press there shows no press on the card. Each navigation
14
- * passes the rule in utils/safeUrl.ts first.
12
+ * action. Each navigation passes the rule in utils/safeUrl.ts first.
15
13
  *
16
14
  * SYNC: When modified, update:
17
15
  * - /packages/core/src/hooks/index.ts (export)
@@ -19,7 +17,6 @@
19
17
  import { useCallback, useEffect } from 'react';
20
18
  import { isLayerSurface } from "../Layer/layerSurfacePress.js";
21
19
  import { isSafeUrl } from "../utils/safeUrl.js";
22
- import { cancelPress } from "../utils/pressFeedback.js";
23
20
 
24
21
  /**
25
22
  * The attribute this hook sets on the container it makes clickable. A click
@@ -126,16 +123,12 @@ export function hasTextSelection(node) {
126
123
  * @example
127
124
  * ```
128
125
  * const containerRef = useRef<HTMLDivElement>(null);
129
- * const { onClick, onMouseUp, onPointerDown } = useClickableContainer({
126
+ * const { onClick, onMouseUp } = useClickableContainer({
130
127
  * containerRef,
131
128
  * onClick: () => console.log('card clicked'),
132
129
  * });
133
130
  * return (
134
- * <div
135
- * ref={containerRef}
136
- * onClick={onClick}
137
- * onMouseUp={onMouseUp}
138
- * onPointerDown={onPointerDown}>
131
+ * <div ref={containerRef} onClick={onClick} onMouseUp={onMouseUp}>
139
132
  * <p>Click anywhere on this card</p>
140
133
  * <button onClick={() => alert('button')}>Nested button</button>
141
134
  * </div>
@@ -233,24 +226,8 @@ export function useClickableContainer({
233
226
  window.open(href, '_blank', 'noopener');
234
227
  }
235
228
  }, [containerRef, href, disabled]);
236
-
237
- // The press-state counterpart of onClick's rule, for touch: a finger press
238
- // that would not activate the container shows no press on it. A mouse or
239
- // pen press keeps its `:active` paint.
240
- const onPointerDown = useCallback(event => {
241
- const containerEl = containerRef.current;
242
- const eventTarget = event.target;
243
- if (event.pointerType !== 'touch' || disabled || containerEl == null || !(eventTarget instanceof Element) || eventTarget === event.currentTarget || !hasInteractiveAncestor(eventTarget, containerEl) ||
244
- // The control the container delegates to is the container's own
245
- // action: a press on it activates the container.
246
- interactiveRef?.current?.contains(eventTarget) === true) {
247
- return;
248
- }
249
- cancelPress(containerEl);
250
- }, [containerRef, interactiveRef, disabled]);
251
229
  return {
252
230
  onClick,
253
- onMouseUp,
254
- onPointerDown
231
+ onMouseUp
255
232
  };
256
233
  }
@@ -2,8 +2,7 @@
2
2
  * @file useMenuPress.ts
3
3
  * @input The menu root, its trigger, the enabled-row selector, and callbacks
4
4
  * for opening, highlighting, activating and dismissing
5
- * @output useMenuPress, the marker attributes, the activation mark, and the
6
- * internal useDropdownMenuPress entry with its touch model
5
+ * @output useMenuPress, the marker attributes, and the activation mark
7
6
  * @position Core hook for DropdownMenu, ContextMenu, DropdownMenuSubMenu,
8
7
  * Selector and MenuBottomSheetActionList. The transition table lives in
9
8
  * menuPressGesture.ts.
@@ -120,30 +119,6 @@ export interface UseMenuPressReturn {
120
119
  /** End the gesture in flight with nothing acting (the menu closed). */
121
120
  cancel: () => void;
122
121
  }
123
- /**
124
- * DropdownMenu's options for the press model: everything the public hook
125
- * takes, plus its touch model. DropdownMenu reaches the touch model through
126
- * its `presentation`, so the public hook has no such option.
127
- *
128
- * @internal
129
- */
130
- export interface DropdownMenuPressOptions extends UseMenuPressOptions {
131
- /**
132
- * How the finger that opened the menu from the trigger picks.
133
- * `'pointer'`: its opening press follows the settle rule. `'uikit'`: it
134
- * picks only after UIMenu's handoff distance, so the row that appeared
135
- * under it never acts on a still lift. A mouse is unaffected.
136
- * @default 'pointer'
137
- */
138
- touchModel?: 'pointer' | 'uikit';
139
- }
140
- /**
141
- * What core's own menus get from {@link useDropdownMenuPress}: the public
142
- * return. Not exported from the hooks entry point.
143
- *
144
- * @internal
145
- */
146
- export type DropdownMenuPressReturn = UseMenuPressReturn;
147
122
  /**
148
123
  * The press model for a menu: the row under the release acts, the highlight
149
124
  * follows a held pointer, and a mouse opens the menu on press.
@@ -180,12 +155,4 @@ export type DropdownMenuPressReturn = UseMenuPressReturn;
180
155
  * ```
181
156
  */
182
157
  export declare function useMenuPress(options: UseMenuPressOptions): UseMenuPressReturn;
183
- /**
184
- * The press model with DropdownMenu's touch model
185
- * ({@link DropdownMenuPressOptions.touchModel}). Not exported from the hooks
186
- * entry point.
187
- *
188
- * @internal
189
- */
190
- export declare function useDropdownMenuPress(options: DropdownMenuPressOptions): DropdownMenuPressReturn;
191
158
  //# sourceMappingURL=useMenuPress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMenuPress.d.ts","sourceRoot":"","sources":["../../src/hooks/useMenuPress.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAML,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAuBpD,OAAO,EAAC,iBAAiB,EAAC,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE;;;GAGG;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B;AAED,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,SAAS,EAAE;QACT,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAChE,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC;KACzB,CAAC;IACF,yEAAyE;IACzE,YAAY,EAAE;QACZ,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAChE,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;KAC/D,CAAC;IACF;;;;OAIG;IACH,uBAAuB,EAAE,MAAM,OAAO,CAAC;IACvC,uEAAuE;IACvE,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AA0DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAglB7E"}
@@ -6,8 +6,7 @@
6
6
  * @file useMenuPress.ts
7
7
  * @input The menu root, its trigger, the enabled-row selector, and callbacks
8
8
  * for opening, highlighting, activating and dismissing
9
- * @output useMenuPress, the marker attributes, the activation mark, and the
10
- * internal useDropdownMenuPress entry with its touch model
9
+ * @output useMenuPress, the marker attributes, and the activation mark
11
10
  * @position Core hook for DropdownMenu, ContextMenu, DropdownMenuSubMenu,
12
11
  * Selector and MenuBottomSheetActionList. The transition table lives in
13
12
  * menuPressGesture.ts.
@@ -20,14 +19,13 @@
20
19
  */
21
20
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
22
21
  import { currentGesture } from "../Layer/gestureCounter.js";
23
- import { IDLE_MENU_PRESS, menuPressTransition } from "./menuPressGesture.js";
22
+ import { IDLE_MENU_PRESS, menuPressStep } from "./menuPressGesture.js";
24
23
  import { MENU_PRESS_MARKER } from "./menuPressMarker.js";
25
24
  import { useLongPressDetector } from "./useLongPress.js";
26
25
  import { edgeAutoscroll } from "../utils/edgeAutoscroll.js";
27
26
  import { focusForLastInput } from "../utils/focusReturn.js";
28
27
  import { useInteractionModalityTrackingFor } from "../utils/interactionModality.js";
29
28
  import { LONG_PRESS_DURATION_MS } from "../motion/uikit/longPress.js";
30
- import { clearMenuPressLit, holdMenuPressPaint, markMenuPressLit, releaseMenuPressPaint } from "../privateAttributes/menuPressLit.stylex.js";
31
29
  import { __resetClickGuardForTest, armClickGuard, CLICK_GUARD_WINDOW_MS, withoutClickGuard } from "../utils/clickGuard.js";
32
30
  export { MENU_PRESS_MARKER };
33
31
  const MENU_PRESS_ROOT_SELECTOR = `[${MENU_PRESS_MARKER}]`;
@@ -126,34 +124,6 @@ function isInMenuTree(element, root) {
126
124
  const owner = element.closest(MENU_PRESS_ROOT_SELECTOR);
127
125
  return owner != null && getOutermostRoot(owner) === root;
128
126
  }
129
-
130
- /**
131
- * DropdownMenu's options for the press model: everything the public hook
132
- * takes, plus its touch model. DropdownMenu reaches the touch model through
133
- * its `presentation`, so the public hook has no such option.
134
- *
135
- * @internal
136
- */
137
-
138
- /**
139
- * What core's own menus get from {@link useDropdownMenuPress}: the public
140
- * return. Not exported from the hooks entry point.
141
- *
142
- * @internal
143
- */
144
-
145
- /**
146
- * Where a pointer is, for a finger's handoff distance. Positions reach the
147
- * machine only under `touchModel: 'uikit'`. Without them, it keeps the settle
148
- * rule.
149
- */
150
- function handoffPosition(event, hasHandoff) {
151
- return hasHandoff ? {
152
- x: event.clientX,
153
- y: event.clientY
154
- } : {};
155
- }
156
-
157
127
  /**
158
128
  * The press model for a menu: the row under the release acts, the highlight
159
129
  * follows a held pointer, and a mouse opens the menu on press.
@@ -190,26 +160,6 @@ function handoffPosition(event, hasHandoff) {
190
160
  * ```
191
161
  */
192
162
  export function useMenuPress(options) {
193
- // The touch model is DropdownMenu's alone; an untyped caller's
194
- // `touchModel` does not reach the model.
195
- const {
196
- touchModel: _touchModel,
197
- ...publicOptions
198
- } = options;
199
- return useDropdownMenuPress({
200
- ...publicOptions,
201
- touchModel: 'pointer'
202
- });
203
- }
204
-
205
- /**
206
- * The press model with DropdownMenu's touch model
207
- * ({@link DropdownMenuPressOptions.touchModel}). Not exported from the hooks
208
- * entry point.
209
- *
210
- * @internal
211
- */
212
- export function useDropdownMenuPress(options) {
213
163
  const optionsRef = useRef(options);
214
164
  optionsRef.current = options;
215
165
  // The highlight, and the hover focus of the rows in this menu, follow the
@@ -297,18 +247,8 @@ export function useDropdownMenuPress(options) {
297
247
  autoscroll.stop();
298
248
  autoscrollRef.current = null;
299
249
  }, [autoscroll]);
300
- const litRowRef = useRef(null);
301
- const heldMenuRef = useRef(null);
302
250
  const endGesture = useCallback(() => {
303
251
  longPressApiRef.current?.cancel();
304
- if (litRowRef.current != null) {
305
- clearMenuPressLit(litRowRef.current);
306
- litRowRef.current = null;
307
- }
308
- if (heldMenuRef.current != null) {
309
- releaseMenuPressPaint(heldMenuRef.current);
310
- heldMenuRef.current = null;
311
- }
312
252
  touchMovePreventerRef.current?.();
313
253
  touchMovePreventerRef.current = null;
314
254
  stopAutoscroll();
@@ -319,36 +259,10 @@ export function useDropdownMenuPress(options) {
319
259
  gestureRef.current = IDLE_MENU_PRESS;
320
260
  }, [stopAutoscroll]);
321
261
  const highlight = useCallback(row => {
322
- // A held finger or pen marks the row it lights, for the row's pressed
323
- // paint. A held mouse keeps the hover tint, as on a desktop.
324
- const gesture = gestureRef.current;
325
- const isHeld = gesture.phase !== 'idle' && gesture.pointerType !== 'mouse';
326
- const lit = isHeld ? row : null;
327
- if (litRowRef.current !== lit) {
328
- if (litRowRef.current != null) {
329
- clearMenuPressLit(litRowRef.current);
330
- }
331
- litRowRef.current = lit;
332
- if (lit != null) {
333
- markMenuPressLit(lit);
334
- }
335
- }
336
262
  const {
337
263
  onHighlight,
338
264
  menuRef
339
265
  } = optionsRef.current;
340
- // The row the press began on stays :active where a pointer hovers, so
341
- // the menu holds every row but the lit one off that paint.
342
- const held = isHeld ? menuRef.current : null;
343
- if (heldMenuRef.current !== held) {
344
- if (heldMenuRef.current != null) {
345
- releaseMenuPressPaint(heldMenuRef.current);
346
- }
347
- heldMenuRef.current = held;
348
- if (held != null) {
349
- holdMenuPressPaint(held);
350
- }
351
- }
352
266
  if (onHighlight != null) {
353
267
  onHighlight(row);
354
268
  return;
@@ -455,7 +369,7 @@ export function useDropdownMenuPress(options) {
455
369
  }
456
370
  }, [activate, endGesture, getDocument, highlight]);
457
371
  const step = useCallback((event, native) => {
458
- const result = menuPressTransition(gestureRef.current, event);
372
+ const result = menuPressStep(gestureRef.current, event);
459
373
  gestureRef.current = result.gesture;
460
374
  applyEffect(result.effect, result.gesture, native);
461
375
  }, [applyEffect]);
@@ -552,8 +466,7 @@ export function useDropdownMenuPress(options) {
552
466
  type: 'move',
553
467
  row: point.row,
554
468
  isInMenu: point.isInMenu,
555
- time: Date.now(),
556
- ...handoffPosition(event, optionsRef.current.touchModel === 'uikit')
469
+ time: Date.now()
557
470
  }, event);
558
471
  updateAutoscroll(event);
559
472
  };
@@ -567,8 +480,7 @@ export function useDropdownMenuPress(options) {
567
480
  row: point.row,
568
481
  isInMenu: point.isInMenu,
569
482
  isOnTrigger: point.isOnTrigger,
570
- time: Date.now(),
571
- ...handoffPosition(event, optionsRef.current.touchModel === 'uikit')
483
+ time: Date.now()
572
484
  }, event);
573
485
  };
574
486
  const onCancel = event => {
@@ -4,8 +4,7 @@ export declare function isCopyable(element: Element): boolean;
4
4
  * A copy that takes no part: no ids or test ids, no form or radio group (a
5
5
  * copied checked radio would uncheck the live one), no label for a live
6
6
  * control, and copied frames and media load nothing. Scrolled descendants
7
- * keep their offsets. The CSS animations and transitions running in it carry
8
- * on from where they were, once the copy is laid out (`placeOver`).
7
+ * keep their offsets once the copy is laid out (`placeOver`).
9
8
  */
10
9
  export declare function inertCopy(element: HTMLElement): HTMLElement | null;
11
10
  /** The background `element` shows: its own, or the nearest ancestor's. */
@@ -13,8 +12,7 @@ export declare function paintedBackground(element: Element): string;
13
12
  /**
14
13
  * Lay `element` over `rect` (viewport coordinates), absolutely, as the last
15
14
  * child of `host`, wherever its containing block is: no ancestor's position
16
- * changes. A copy's scrolled descendants then restore their offsets, and the
17
- * CSS animations and transitions its element ran carry on in it.
15
+ * changes.
18
16
  */
19
17
  export declare function placeOver(element: HTMLElement, host: Element, rect: DOMRect): void;
20
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"transientCopy.d.ts","sourceRoot":"","sources":["../../src/motion/transientCopy.ts"],"names":[],"mappings":"AA0CA,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEpD;AA+HD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CA8ClE;AAED,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAQ1D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,GACZ,IAAI,CAiEN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG;IACrD,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,IAAI,CAoDP;AAID;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,EAAE,CA6BrD"}
1
+ {"version":3,"file":"transientCopy.d.ts","sourceRoot":"","sources":["../../src/motion/transientCopy.ts"],"names":[],"mappings":"AAiCA,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEpD;AAqHD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CA0ClE;AAED,0EAA0E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