@n-uf/motion 26.11.53 → 26.11.55

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 (46) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/README.md +23 -30
  3. package/dist/browser.d.ts +79 -3
  4. package/dist/browser.js +49 -3
  5. package/dist/browser.js.map +1 -1
  6. package/dist/chunk-4XGH5367.js +379 -0
  7. package/dist/chunk-4XGH5367.js.map +1 -0
  8. package/dist/{chunk-SIAZRWYD.js → chunk-ALYH6YQK.js} +4 -7
  9. package/dist/chunk-ALYH6YQK.js.map +1 -0
  10. package/dist/{chunk-BVPVUJ42.js → chunk-G5EJSZ3B.js} +77 -30
  11. package/dist/chunk-G5EJSZ3B.js.map +1 -0
  12. package/dist/{chunk-V7DEXKBZ.js → chunk-NI7JLDWZ.js} +35 -8
  13. package/dist/chunk-NI7JLDWZ.js.map +1 -0
  14. package/dist/{chunk-7EAAKM6U.js → chunk-QMGPJ2FG.js} +37 -89
  15. package/dist/chunk-QMGPJ2FG.js.map +1 -0
  16. package/dist/chunk-RWDYRT3H.js +14 -0
  17. package/dist/chunk-RWDYRT3H.js.map +1 -0
  18. package/dist/chunk-W7YP7VB2.js +882 -0
  19. package/dist/chunk-W7YP7VB2.js.map +1 -0
  20. package/dist/clock.d.ts +40 -7
  21. package/dist/clock.js +3 -1
  22. package/dist/double-click-DBfbiP2U.d.ts +39 -0
  23. package/dist/drag.d.ts +227 -285
  24. package/dist/drag.js +23 -913
  25. package/dist/drag.js.map +1 -1
  26. package/dist/{frame-loop-C88dc9xw.d.ts → frame-loop-f0V4b464.d.ts} +11 -11
  27. package/dist/gestures.d.ts +40 -74
  28. package/dist/gestures.js +8 -7
  29. package/dist/index.d.ts +10 -6
  30. package/dist/index.js +58 -10
  31. package/dist/layout.d.ts +9 -233
  32. package/dist/layout.js +7 -427
  33. package/dist/layout.js.map +1 -1
  34. package/dist/motion-sElR1A_c.d.ts +163 -0
  35. package/dist/reveal-Dg5fqoWS.d.ts +51 -0
  36. package/dist/{reveal-C-ewJfFn.d.ts → settle-7C9xxbFg.d.ts} +7 -57
  37. package/dist/values.d.ts +15 -7
  38. package/dist/values.js +2 -2
  39. package/package.json +2 -2
  40. package/dist/chunk-7EAAKM6U.js.map +0 -1
  41. package/dist/chunk-BVPVUJ42.js.map +0 -1
  42. package/dist/chunk-IJSIYH2D.js +0 -7
  43. package/dist/chunk-IJSIYH2D.js.map +0 -1
  44. package/dist/chunk-SIAZRWYD.js.map +0 -1
  45. package/dist/chunk-V7DEXKBZ.js.map +0 -1
  46. package/dist/double-click-jtUSNuHL.d.ts +0 -16
@@ -1,26 +1,18 @@
1
+ import { b as Modifiers, M as ModifierKey, a as DoubleClick } from './double-click-DBfbiP2U.js';
2
+ export { D as DOUBLE_CLICK, i as isHeld } from './double-click-DBfbiP2U.js';
1
3
  import { P as Point } from './shapes-EbQlwbCu.js';
2
- import { a as DoubleClick } from './double-click-jtUSNuHL.js';
3
- import { C as ClockPort, F as FrameSource, T as TimerSource } from './port-CmlUctqx.js';
4
+ import { C as ClockPort, T as TimerSource } from './port-CmlUctqx.js';
4
5
 
5
6
  /**
6
7
  * Input types: plain event objects in, one gesture stream out. Nothing here
7
8
  * touches the DOM; the host copies the fields it needs out of PointerEvent /
8
9
  * WheelEvent / Safari's GestureEvent.
9
10
  *
10
- * Extracted from an app's input layer: the recognizer that app used.
11
11
  * Hit testing and routing (what is under a point, who gets a gesture) stay
12
12
  * with the host.
13
13
  */
14
14
 
15
15
  type PointerKind = "mouse" | "pen" | "touch";
16
- /** Pointer modifiers, ctrl included (the drag modifier may be "ctrl") */
17
- interface Modifiers {
18
- shift: boolean;
19
- alt: boolean;
20
- meta: boolean;
21
- ctrl: boolean;
22
- }
23
- type ModifierKey = keyof Modifiers;
24
16
  /** "mac": the drag modifier defaults to Cmd; "other": Alt (the OS keeps the Win/Super key) */
25
17
  type Platform = "mac" | "other";
26
18
  declare const NO_MODIFIERS: Readonly<Modifiers>;
@@ -55,9 +47,9 @@ interface RawPointerEvent {
55
47
  pressure?: number;
56
48
  /**
57
49
  * lostpointercapture only: whose capture was lost. "content" (an element inside the view's content, e.g.
58
- * right after the host took the pointer for a modifier-drag) leaves the gesture alone; default "surface".
50
+ * right after the host took the pointer for a modifier-drag) leaves the gesture alone; default "view".
59
51
  */
60
- lostBy?: "surface" | "content";
52
+ lostBy?: "view" | "content";
61
53
  }
62
54
  interface RawWheelEvent {
63
55
  type: "wheel";
@@ -78,8 +70,6 @@ interface RawSafariGestureEvent {
78
70
  time: number;
79
71
  }
80
72
  type RawInputEvent = RawPointerEvent | RawWheelEvent | RawSafariGestureEvent;
81
- /** What a modifier-drag would do if the pointer travels with the drag modifier held */
82
- type ModifierDrag = "move" | "resize";
83
73
  type CancelReason = "pointercancel" | "lostcapture" | "multitouch" | "missed-up" | "escape" | "reset" | (string & {});
84
74
  interface PointerGestureBase {
85
75
  pointer: GesturePointer;
@@ -91,12 +81,13 @@ type InputGesture =
91
81
  {
92
82
  type: "press";
93
83
  pointer: GesturePointer;
94
- modifierDrag: ModifierDrag | null;
95
84
  }
96
- /** The pointer travelled past the click threshold; modifierDrag is set when the drag modifier was held then */
85
+ /**
86
+ * The pointer travelled past the click threshold. What a drag means (a modifier-drag that moves or resizes, say) is
87
+ * the host's: it reads `origin.button` and the keys held (`isHeld(pointer.modifiers, key)`).
88
+ */
97
89
  | (PointerGestureBase & {
98
90
  type: "dragStart";
99
- modifierDrag: ModifierDrag | null;
100
91
  })
101
92
  /** A move after dragStart (moves inside the threshold are not reported) */
102
93
  | (PointerGestureBase & {
@@ -182,19 +173,22 @@ declare function defaultDragModifier(platform: Platform): ModifierKey;
182
173
  * A configured drag modifier as used: undefined → the platform default, null → off.
183
174
  */
184
175
  declare function resolveDragModifier(config: ModifierKey | null | undefined, platform: Platform): ModifierKey | null;
185
- declare function isHeld(modifiers: Modifiers, key: ModifierKey | null): boolean;
176
+
186
177
  /**
187
178
  * The button a press stands for on this platform. On macOS a Ctrl+click is the secondary click (the system's own
188
179
  * rule; the browser's contextmenu follows it), so a primary mouse press with Ctrl held is button 2 there, as a
189
- * right-click is. Not when Ctrl is the drag modifier (Ctrl+drag then moves). A pen, a finger and the other platforms
190
- * keep their button.
180
+ * right-click is. Not when Ctrl is the drag modifier (`"ctrl"`, or `"mod"`, which Ctrl holds: Ctrl+drag then moves).
181
+ * A pen, a finger and the other platforms keep their button.
191
182
  */
192
183
  declare function platformButton(press: {
193
184
  kind: PointerKind;
194
185
  button: number;
195
186
  modifiers: Modifiers;
196
187
  }, platform: Platform, dragModifier: ModifierKey | null): number;
197
- /** Platform "Mod": Cmd on macOS, Ctrl elsewhere (Mod+wheel zooms, Mod+click is content's multi-select) */
188
+ /**
189
+ * The platform's own Mod key: Cmd on macOS, Ctrl elsewhere (Mod+wheel zooms, Mod+click is content's multi-select).
190
+ * Where the platform is unknown, `isHeld(modifiers, "mod")` counts either key.
191
+ */
198
192
  declare function modHeld(modifiers: Modifiers, platform: Platform): boolean;
199
193
 
200
194
  /**
@@ -213,7 +207,8 @@ interface WheelOptions {
213
207
  zoomSensitivity: number;
214
208
  }
215
209
  declare const WHEEL_DEFAULTS: Readonly<WheelOptions>;
216
- declare function wheelDeltaPx(deltaX: number, deltaY: number, deltaMode: 0 | 1 | 2, opts?: WheelOptions): Point;
210
+ /** A wheel event's delta in px: pixels as given, lines and pages by `lineHeight` and `pageHeight`. */
211
+ declare function wheelDelta(deltaX: number, deltaY: number, deltaMode: 0 | 1 | 2, opts?: WheelOptions): Point;
217
212
  type WheelIntent = {
218
213
  kind: "zoom";
219
214
  factor: number;
@@ -247,11 +242,15 @@ declare function dampWheelPan(delta: Point, opts?: WheelPanOptions): Point;
247
242
  /** The timer half of a ClockPort: any clock (createBrowserClock, createFakeClock) is one. */
248
243
  type RecognizerTimers = Pick<ClockPort, "setTimer" | "clearTimer">;
249
244
  interface RecognizerOptions {
250
- /** Screen px (relative to the view) to canvas units, through the current camera */
251
- toCanvas: (screen: Point) => Point;
245
+ /** Screen px (relative to the view) to canvas units, through the current camera; default: the same point (no camera) */
246
+ toCanvas?: (screen: Point) => Point;
252
247
  /** For the long press: a clock; without timers no long press fires */
253
248
  timers?: RecognizerTimers;
254
- /** The drag modifier, resolved (see resolveDragModifier); null = off */
249
+ /**
250
+ * The host's drag modifier, resolved (see resolveDragModifier); null = off. The recognizer reads it only for the
251
+ * platform's secondary click: on macOS a Ctrl+press stays the primary button when Ctrl is the drag modifier
252
+ * (platformButton). What a drag with it held does is the host's.
253
+ */
255
254
  dragModifier?: ModifierKey | null;
256
255
  /** "mac": a mouse Ctrl+press is the secondary button, as the system has it (platformButton); default "other" */
257
256
  platform?: Platform;
@@ -272,7 +271,7 @@ interface RecognizerOptions {
272
271
  };
273
272
  wheel?: Partial<WheelOptions>;
274
273
  /** A mouse or pen press, or a resting finger outside any gesture, untouched this long when another pointer goes down, lost its pointerup; default 1000 ms */
275
- staleMs?: number;
274
+ stale?: number;
276
275
  }
277
276
  declare const RECOGNIZER_DEFAULTS: Readonly<{
278
277
  thresholds: Readonly<Record<PointerKind, number>>;
@@ -305,39 +304,6 @@ interface Recognizer {
305
304
  }
306
305
  declare function createRecognizer(options: RecognizerOptions, emit: (gesture: InputGesture) => void): Recognizer;
307
306
 
308
- /** Options of {@link createFrameCoalescer}. */
309
- interface CoalescerOptions<T> {
310
- /**
311
- * How a new sample folds into the pending one. Default: keep the latest
312
- * (pointer positions). Wheel deltas want a sum instead.
313
- */
314
- readonly merge?: (pending: T, next: T) => T;
315
- }
316
- /**
317
- * Collapses a burst of samples into at most one delivery per frame. Same
318
- * shape as hypr-tiling's `createFrameCoalescer` (`schedule`, `cancel`),
319
- * plus `flush` and `pending`.
320
- */
321
- interface FrameCoalescer<T> {
322
- /** Record a sample and make sure a frame is requested. */
323
- schedule(sample: T): void;
324
- /**
325
- * Deliver the pending sample now, if there is one (before a pointer-up, so
326
- * the last move is seen first). Returns whether it delivered.
327
- */
328
- flush(): boolean;
329
- /** Drop the pending sample and the requested frame. Nothing is delivered after this. */
330
- cancel(): void;
331
- /** Whether a sample is waiting for its frame. */
332
- readonly pending: boolean;
333
- }
334
- /**
335
- * Deliver samples to `onFrame` once per frame of `frames`: the browser clock,
336
- * the fake clock, or a frame loop phase (`loop.frames("input")`). `onFrame`
337
- * also gets how many samples were folded into this one.
338
- */
339
- declare function createFrameCoalescer<T>(onFrame: (sample: T, count: number) => void, frames: FrameSource, options?: CoalescerOptions<T>): FrameCoalescer<T>;
340
-
341
307
  /**
342
308
  * A timer event a state asks for: send `event(t)` when the clock reaches
343
309
  * `at`. Machines stay pure; this is how a long-press or a dwell turns into
@@ -383,7 +349,7 @@ declare function createMachine<S, E>(options: MachineOptions<S, E>): Machine<S,
383
349
  * it fires, once.
384
350
  *
385
351
  * ```text
386
- * idle ──hover(key)──► dwelling ──tick (t − since ≥ dwellMs)──► fired
352
+ * idle ──hover(key)──► dwelling ──tick (t − since ≥ dwell)──► fired
387
353
  * ▲ │ hover(other key) restarts `since` │
388
354
  * │ │ hover(null) ─► idle │
389
355
  * └────────┴─────────────── reset ◄─────────────────────┘
@@ -398,7 +364,7 @@ declare function createMachine<S, E>(options: MachineOptions<S, E>): Machine<S,
398
364
  /** Tunables of the dwell machine. */
399
365
  interface DwellConfig {
400
366
  /** How long in ms the pointer must stay over the same key. Default 500. */
401
- readonly dwellMs: number;
367
+ readonly dwell: number;
402
368
  }
403
369
  /** Defaults of {@link DwellConfig}. */
404
370
  declare const DWELL_DEFAULTS: DwellConfig;
@@ -449,7 +415,7 @@ declare function createDwellMachine<K = string, P = unknown>(options: DwellMachi
449
415
  * ```text
450
416
  * idle ──press──► pressed ──move: mostly along the scroll direction, ≥ scrollEscape──► scrolled (never lifts)
451
417
  * │ ──move: mostly across it, ≥ lift px────────────────────────────► lifted
452
- * │ ──tick: held still holdMs─────────────────────────────────────► lifted (where it was pressed)
418
+ * │ ──tick: held still hold─────────────────────────────────────► lifted (where it was pressed)
453
419
  * └ ──move: along it short of the escape, or across it below lift px: stays pressed
454
420
  * any ──release──► idle
455
421
  * ```
@@ -469,7 +435,7 @@ interface TouchPressConfig {
469
435
  /** The page's scroll direction: `"y"` (a vertical page, the default) or `"x"`. */
470
436
  readonly scroll: "x" | "y";
471
437
  /** ms a still finger holds before the press lifts where it is. Default 220. */
472
- readonly holdMs: number;
438
+ readonly hold: number;
473
439
  }
474
440
  /** Defaults of {@link TouchPressConfig}. */
475
441
  declare const TOUCH_PRESS_DEFAULTS: TouchPressConfig;
@@ -521,11 +487,11 @@ declare function createTouchPress(options: TouchPressOptions): Machine<TouchPres
521
487
  * pages following it, and commits or snaps back when it ends.
522
488
  *
523
489
  * ```text
524
- * idle ──wheel / touch-move (arming rules pass)──► armed ──travel ≥ thresholdPx──► tracking
490
+ * idle ──wheel / touch-move (arming rules pass)──► armed ──travel ≥ threshold──► tracking
525
491
  * ▲ │ │
526
492
  * │ rule breach / idle / end gesture end
527
493
  * │ ▼ ▼
528
- * └──────── lockoutMs elapsed ◄── lockout ◄── settled (commit) ◄───────────── settling
494
+ * └──────── lockout elapsed ◄── lockout ◄── settled (commit) ◄───────────── settling
529
495
  * └──────────────────────────────────────── settled (cancel) ◄───────────────────┤
530
496
  * └──────────────────────────────────────── cancel (transition stopped) ◄────────┘
531
497
  * ```
@@ -533,14 +499,14 @@ declare function createTouchPress(options: TouchPressOptions): Machine<TouchPres
533
499
  * - **Arming:** nothing else owns the pointer (`blocked`), the movement runs mostly along the swipe (more than twice
534
500
  * the cross movement), no Ctrl (a pinch), the configured modifier is held, nothing under the pointer can still
535
501
  * scroll that way (`canScrollFurther`), and there is a page on that side (or `wrap`). A wheel run that breaks a
536
- * rule belongs to scrolling until the wheel has been idle `idleMs`.
502
+ * rule belongs to scrolling until the wheel has been idle `idle`.
537
503
  * - **Tracking:** `progress` is the travel over the page size, −1 to 1, held at 0 towards a side with no page.
538
- * - **Ending:** a touch ends when the finger lifts, a wheel run after `idleMs` without samples. It commits when
504
+ * - **Ending:** a touch ends when the finger lifts, a wheel run after `idle` without samples. It commits when
539
505
  * `|progress| ≥ commitFraction`, or the peak speed towards the target reached `commitVelocity` (the peak starts
540
506
  * over when the travel crosses zero, so a fast fling out and a pull back does not commit the way back).
541
507
  * - **Settling** lasts as long as the host's page transition; the host sends `settled` when it is done (or `cancel`,
542
508
  * which goes straight back to idle, when it stops the transition). After a commit, `lockout` swallows the
543
- * trackpad's momentum for `lockoutMs`, and the run stays claimed after it.
509
+ * trackpad's momentum for `lockout`, and the run stays claimed after it.
544
510
  *
545
511
  * Pure and timer-free: {@link pagedSwipeDeadline} says when the next `tick` is due ({@link createPagedSwipe} arms it).
546
512
  * Signs: a wheel delta > 0 along the swipe heads to `next`; a finger moving towards smaller x (or y) heads to `next`.
@@ -550,15 +516,15 @@ type SwipeSide = "prev" | "next";
550
516
  /** Tunables of the paged swipe. */
551
517
  interface PagedSwipeConfig {
552
518
  /** px of travel before an armed swipe tracks. Default 24. */
553
- readonly thresholdPx: number;
519
+ readonly threshold: number;
554
520
  /** The share of the page size that commits at the end. Default 0.35. */
555
521
  readonly commitFraction: number;
556
522
  /** px/ms: a peak speed towards the target that commits at the end. Default 0.6. */
557
523
  readonly commitVelocity: number;
558
524
  /** ms without a wheel sample that ends a wheel run. Default 120. */
559
- readonly idleMs: number;
525
+ readonly idle: number;
560
526
  /** ms after a commit during which wheel samples are swallowed (momentum). Default 350. */
561
- readonly lockoutMs: number;
527
+ readonly lockout: number;
562
528
  /** Past the last page comes the first, and back. Default false. */
563
529
  readonly wrap: boolean;
564
530
  /** The page size in px when no sample or context gives one. Default 800. */
@@ -593,7 +559,7 @@ type PagedSwipeState = (Base & {
593
559
  readonly phase: "idle";
594
560
  /** The last wheel sample of the current run (null: none, or the run went idle). */
595
561
  readonly lastWheel: number | null;
596
- /** This wheel run broke the arming rules (or committed): it cannot arm until the wheel is idle `idleMs`. */
562
+ /** This wheel run broke the arming rules (or committed): it cannot arm until the wheel is idle `idle`. */
597
563
  readonly claimed: boolean;
598
564
  }) | (Base & {
599
565
  readonly phase: "armed";
@@ -687,4 +653,4 @@ interface PagedSwipeOptions {
687
653
  /** A paged swipe on a clock: the idle and lockout timers are armed for you. */
688
654
  declare function createPagedSwipe(options: PagedSwipeOptions): Machine<PagedSwipeState, PagedSwipeInput>;
689
655
 
690
- export { type CancelReason, type CoalescerOptions, DWELL_DEFAULTS, DWELL_IDLE, type Deadline, type DwellConfig, type DwellInput, type DwellMachineOptions, type DwellState, type FrameCoalescer, type GesturePointer, type InputGesture, type InputGestureType, type Machine, type MachineOptions, type ModifierDrag, type ModifierKey, type Modifiers, NO_MODIFIERS, PAGED_SWIPE_DEFAULTS, PAGED_SWIPE_EMPTY_CONTEXT, PAGED_SWIPE_IDLE, type PagedSwipeConfig, type PagedSwipeContext, type PagedSwipeInput, type PagedSwipeOptions, type PagedSwipeState, type Platform, type PointerKind, RECOGNIZER_DEFAULTS, type RawInputEvent, type RawPointerEvent, type RawPointerType, type RawSafariGestureEvent, type RawWheelEvent, type Recognizer, type RecognizerOptions, type RecognizerTimers, type SwipeSide, TOUCH_PRESS_DEFAULTS, TOUCH_PRESS_IDLE, type TouchPressConfig, type TouchPressInput, type TouchPressOptions, type TouchPressState, WHEEL_DEFAULTS, WHEEL_PAN_DEFAULTS, type WheelIntent, type WheelOptions, type WheelPanOptions, classifyWheel, createDwellMachine, createFrameCoalescer, createMachine, createPagedSwipe, createRecognizer, createTouchPress, dampWheelPan, defaultDragModifier, dwellDeadline, dwellReducer, isHeld, modHeld, pagedSwipeDeadline, pagedSwipeReducer, platformButton, resolveDragModifier, swipeProgress, toModifiers, touchPressDeadline, touchPressReducer, wheelDeltaPx };
656
+ export { type CancelReason, DWELL_DEFAULTS, DWELL_IDLE, type Deadline, DoubleClick, type DwellConfig, type DwellInput, type DwellMachineOptions, type DwellState, type GesturePointer, type InputGesture, type InputGestureType, type Machine, type MachineOptions, ModifierKey, Modifiers, NO_MODIFIERS, PAGED_SWIPE_DEFAULTS, PAGED_SWIPE_EMPTY_CONTEXT, PAGED_SWIPE_IDLE, type PagedSwipeConfig, type PagedSwipeContext, type PagedSwipeInput, type PagedSwipeOptions, type PagedSwipeState, type Platform, Point, type PointerKind, RECOGNIZER_DEFAULTS, type RawInputEvent, type RawPointerEvent, type RawPointerType, type RawSafariGestureEvent, type RawWheelEvent, type Recognizer, type RecognizerOptions, type RecognizerTimers, type SwipeSide, TOUCH_PRESS_DEFAULTS, TOUCH_PRESS_IDLE, type TouchPressConfig, type TouchPressInput, type TouchPressOptions, type TouchPressState, WHEEL_DEFAULTS, WHEEL_PAN_DEFAULTS, type WheelIntent, type WheelOptions, type WheelPanOptions, classifyWheel, createDwellMachine, createMachine, createPagedSwipe, createRecognizer, createTouchPress, dampWheelPan, defaultDragModifier, dwellDeadline, dwellReducer, modHeld, pagedSwipeDeadline, pagedSwipeReducer, platformButton, resolveDragModifier, swipeProgress, toModifiers, touchPressDeadline, touchPressReducer, wheelDelta };
package/dist/gestures.js CHANGED
@@ -12,7 +12,6 @@ import {
12
12
  WHEEL_PAN_DEFAULTS,
13
13
  classifyWheel,
14
14
  createDwellMachine,
15
- createFrameCoalescer,
16
15
  createMachine,
17
16
  createPagedSwipe,
18
17
  createRecognizer,
@@ -21,7 +20,6 @@ import {
21
20
  defaultDragModifier,
22
21
  dwellDeadline,
23
22
  dwellReducer,
24
- isHeld,
25
23
  modHeld,
26
24
  pagedSwipeDeadline,
27
25
  pagedSwipeReducer,
@@ -31,11 +29,15 @@ import {
31
29
  toModifiers,
32
30
  touchPressDeadline,
33
31
  touchPressReducer,
34
- wheelDeltaPx
35
- } from "./chunk-7EAAKM6U.js";
32
+ wheelDelta
33
+ } from "./chunk-QMGPJ2FG.js";
36
34
  import "./chunk-OOKRBVMB.js";
37
- import "./chunk-IJSIYH2D.js";
35
+ import {
36
+ DOUBLE_CLICK,
37
+ isHeld
38
+ } from "./chunk-RWDYRT3H.js";
38
39
  export {
40
+ DOUBLE_CLICK,
39
41
  DWELL_DEFAULTS,
40
42
  DWELL_IDLE,
41
43
  NO_MODIFIERS,
@@ -49,7 +51,6 @@ export {
49
51
  WHEEL_PAN_DEFAULTS,
50
52
  classifyWheel,
51
53
  createDwellMachine,
52
- createFrameCoalescer,
53
54
  createMachine,
54
55
  createPagedSwipe,
55
56
  createRecognizer,
@@ -68,6 +69,6 @@ export {
68
69
  toModifiers,
69
70
  touchPressDeadline,
70
71
  touchPressReducer,
71
- wheelDeltaPx
72
+ wheelDelta
72
73
  };
73
74
  //# sourceMappingURL=gestures.js.map
package/dist/index.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  export { C as ClockPort, F as FrameSource, T as TimerSource } from './port-CmlUctqx.js';
2
- export { FakeClock, FakeClockOptions, createFakeClock } from './clock.js';
3
- export { F as FrameInfo, a as FrameLoop, b as FrameLoopOptions, c as FrameStats, d as FrameTask, P as PHASES, e as Phase, R as RepeatingTask, S as ScheduleOptions, f as createFrameLoop } from './frame-loop-C88dc9xw.js';
2
+ export { CoalescerOptions, FakeClock, FakeClockOptions, FrameCoalescer, createFakeClock, createFrameCoalescer } from './clock.js';
3
+ export { F as FrameInfo, a as FrameLoop, b as FrameLoopOptions, c as FrameStats, d as FrameTask, P as PHASES, e as Phase, R as RepeatingTask, S as ScheduleOptions, f as createFrameLoop } from './frame-loop-f0V4b464.js';
4
4
  export { EffectCleanup, EffectOptions, Equals, ReadonlySignal, Signal, SignalOptions, batch, computed, effect, isSignal, signal, untracked } from './signals.js';
5
- export { A as Animator, P as PopIn, R as RevealFrame, S as SETTLE_DEFAULTS, a as SETTLE_TEMPO, b as Settle, c as SettleConfig, d as createSettle, p as popIn, r as reveal } from './reveal-C-ewJfFn.js';
6
- export { AnimatorValue, Easing, MotionOptions, MotionValue, SPRING_DEFAULTS, SetOptions, Spring, SpringConfig, SpringParams, SpringState, Tween, TweenConfig, createSpring, createTween, cubicBezier, ease, easeIn, easeInOut, easeInOutCubic, easeOut, easeOutCubic, linear, motionValue, resolveSpring, settleValue, springStep, springValue, tweenValue } from './values.js';
7
- export { CancelReason, CoalescerOptions, DWELL_DEFAULTS, DWELL_IDLE, Deadline, DwellConfig, DwellInput, DwellMachineOptions, DwellState, FrameCoalescer, GesturePointer, InputGesture, InputGestureType, Machine, MachineOptions, ModifierDrag, ModifierKey, Modifiers, NO_MODIFIERS, PAGED_SWIPE_DEFAULTS, PAGED_SWIPE_EMPTY_CONTEXT, PAGED_SWIPE_IDLE, PagedSwipeConfig, PagedSwipeContext, PagedSwipeInput, PagedSwipeOptions, PagedSwipeState, Platform, PointerKind, RECOGNIZER_DEFAULTS, RawInputEvent, RawPointerEvent, RawPointerType, RawSafariGestureEvent, RawWheelEvent, Recognizer, RecognizerOptions, RecognizerTimers, SwipeSide, TOUCH_PRESS_DEFAULTS, TOUCH_PRESS_IDLE, TouchPressConfig, TouchPressInput, TouchPressOptions, TouchPressState, WHEEL_DEFAULTS, WHEEL_PAN_DEFAULTS, WheelIntent, WheelOptions, WheelPanOptions, classifyWheel, createDwellMachine, createFrameCoalescer, createMachine, createPagedSwipe, createRecognizer, createTouchPress, dampWheelPan, defaultDragModifier, dwellDeadline, dwellReducer, isHeld, modHeld, pagedSwipeDeadline, pagedSwipeReducer, platformButton, resolveDragModifier, swipeProgress, toModifiers, touchPressDeadline, touchPressReducer, wheelDeltaPx } from './gestures.js';
8
- export { D as DOUBLE_CLICK, a as DoubleClick } from './double-click-jtUSNuHL.js';
5
+ export { A as Animator, S as SETTLE_DEFAULTS, a as SETTLE_TEMPO, b as Settle, c as SettleConfig, d as createSettle } from './settle-7C9xxbFg.js';
9
6
  export { A as Animatable, P as Point, R as Rect, V as Vector, W as Widen, s as shapeEquals } from './shapes-EbQlwbCu.js';
7
+ export { AnimatorValue, Easing, MotionOptions, MotionValue, SPRING_DEFAULTS, SetOptions, Spring, SpringConfig, SpringParams, SpringState, Tween, TweenConfig, createSpring, createTween, cubicBezier, ease, easeIn, easeInOut, easeInOutCubic, easeOut, easeOutCubic, linear, motionValue, resolveSpring, settleValue, springStep, springValue, tweenValue } from './values.js';
8
+ export { P as PopIn, R as RevealFrame, p as popIn, r as reveal } from './reveal-Dg5fqoWS.js';
9
+ export { CancelReason, DWELL_DEFAULTS, DWELL_IDLE, Deadline, DwellConfig, DwellInput, DwellMachineOptions, DwellState, GesturePointer, InputGesture, InputGestureType, Machine, MachineOptions, NO_MODIFIERS, PAGED_SWIPE_DEFAULTS, PAGED_SWIPE_EMPTY_CONTEXT, PAGED_SWIPE_IDLE, PagedSwipeConfig, PagedSwipeContext, PagedSwipeInput, PagedSwipeOptions, PagedSwipeState, Platform, PointerKind, RECOGNIZER_DEFAULTS, RawInputEvent, RawPointerEvent, RawPointerType, RawSafariGestureEvent, RawWheelEvent, Recognizer, RecognizerOptions, RecognizerTimers, SwipeSide, TOUCH_PRESS_DEFAULTS, TOUCH_PRESS_IDLE, TouchPressConfig, TouchPressInput, TouchPressOptions, TouchPressState, WHEEL_DEFAULTS, WHEEL_PAN_DEFAULTS, WheelIntent, WheelOptions, WheelPanOptions, classifyWheel, createDwellMachine, createMachine, createPagedSwipe, createRecognizer, createTouchPress, dampWheelPan, defaultDragModifier, dwellDeadline, dwellReducer, modHeld, pagedSwipeDeadline, pagedSwipeReducer, platformButton, resolveDragModifier, swipeProgress, toModifiers, touchPressDeadline, touchPressReducer, wheelDelta } from './gestures.js';
10
+ export { D as DOUBLE_CLICK, a as DoubleClick, M as ModifierKey, b as Modifiers, i as isHeld } from './double-click-DBfbiP2U.js';
11
+ export { ClearRect, DRAG_DEFAULTS, DRAG_PREVIEW_DEFAULT, DragFrame, DragIntent, DragIntentOptions, DragIntentState, DragKeys, DragModifiers, DragPreview, DragTarget, DragTuning, GripPress, GripRelease, GuideRectsOptions, LANDING_APPROACH, LANDING_GATES, LANDING_MARGINS, LANDING_TOUCH_MARGINS, LandingApproach, LandingFrame, LandingGates, LandingGeometry, LandingGuideRef, LandingHeld, LandingLane, LandingMargins, LandingModel, LandingOptions, LandingRegion, LandingRegions, LandingRelease, LandingSpot, LiftDecision, MIN_BOX_LENGTH, PLACE_GUIDES_DEFAULT, PlaceGuides, PlacedGuide, PreviewFrame, PreviewMode, PreviewPlan, REFUSAL_RANK, createDragIntent, createGripPress, createLandingModel, guideRects, inRect, liftDecision, pickRank, previewPlan, targetAt } from './drag.js';
12
+ export { D as DrawEntry, a as DrawFrame, b as Drawable, L as LayoutItem, c as LayoutMotion, d as LayoutMotionOptions, e as LayoutTask, f as createLayoutMotion } from './motion-sElR1A_c.js';
13
+ export { AnchoredMorph, BoxSize, HeldDrag, MORPH_TEMPO, anchoredMorph, holdItem } from './layout.js';
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  PHASES,
3
3
  createFakeClock,
4
+ createFrameCoalescer,
4
5
  createFrameLoop
5
- } from "./chunk-BVPVUJ42.js";
6
+ } from "./chunk-G5EJSZ3B.js";
6
7
  import "./chunk-FQNHO2VT.js";
7
8
  import {
8
9
  SPRING_DEFAULTS,
@@ -22,7 +23,7 @@ import {
22
23
  springStep,
23
24
  springValue,
24
25
  tweenValue
25
- } from "./chunk-V7DEXKBZ.js";
26
+ } from "./chunk-NI7JLDWZ.js";
26
27
  import {
27
28
  DWELL_DEFAULTS,
28
29
  DWELL_IDLE,
@@ -37,7 +38,6 @@ import {
37
38
  WHEEL_PAN_DEFAULTS,
38
39
  classifyWheel,
39
40
  createDwellMachine,
40
- createFrameCoalescer,
41
41
  createMachine,
42
42
  createPagedSwipe,
43
43
  createRecognizer,
@@ -46,7 +46,6 @@ import {
46
46
  defaultDragModifier,
47
47
  dwellDeadline,
48
48
  dwellReducer,
49
- isHeld,
50
49
  modHeld,
51
50
  pagedSwipeDeadline,
52
51
  pagedSwipeReducer,
@@ -56,8 +55,8 @@ import {
56
55
  toModifiers,
57
56
  touchPressDeadline,
58
57
  touchPressReducer,
59
- wheelDeltaPx
60
- } from "./chunk-7EAAKM6U.js";
58
+ wheelDelta
59
+ } from "./chunk-QMGPJ2FG.js";
61
60
  import {
62
61
  batch,
63
62
  computed,
@@ -67,8 +66,35 @@ import {
67
66
  untracked
68
67
  } from "./chunk-OOKRBVMB.js";
69
68
  import {
70
- DOUBLE_CLICK
71
- } from "./chunk-IJSIYH2D.js";
69
+ DRAG_DEFAULTS,
70
+ DRAG_PREVIEW_DEFAULT,
71
+ LANDING_APPROACH,
72
+ LANDING_GATES,
73
+ LANDING_MARGINS,
74
+ LANDING_TOUCH_MARGINS,
75
+ MIN_BOX_LENGTH,
76
+ PLACE_GUIDES_DEFAULT,
77
+ REFUSAL_RANK,
78
+ createDragIntent,
79
+ createGripPress,
80
+ createLandingModel,
81
+ guideRects,
82
+ inRect,
83
+ liftDecision,
84
+ pickRank,
85
+ previewPlan,
86
+ targetAt
87
+ } from "./chunk-W7YP7VB2.js";
88
+ import {
89
+ DOUBLE_CLICK,
90
+ isHeld
91
+ } from "./chunk-RWDYRT3H.js";
92
+ import {
93
+ MORPH_TEMPO,
94
+ anchoredMorph,
95
+ createLayoutMotion,
96
+ holdItem
97
+ } from "./chunk-4XGH5367.js";
72
98
  import {
73
99
  SETTLE_DEFAULTS,
74
100
  SETTLE_TEMPO,
@@ -76,17 +102,27 @@ import {
76
102
  popIn,
77
103
  reveal,
78
104
  shapeEquals
79
- } from "./chunk-SIAZRWYD.js";
105
+ } from "./chunk-ALYH6YQK.js";
80
106
  export {
81
107
  DOUBLE_CLICK,
108
+ DRAG_DEFAULTS,
109
+ DRAG_PREVIEW_DEFAULT,
82
110
  DWELL_DEFAULTS,
83
111
  DWELL_IDLE,
112
+ LANDING_APPROACH,
113
+ LANDING_GATES,
114
+ LANDING_MARGINS,
115
+ LANDING_TOUCH_MARGINS,
116
+ MIN_BOX_LENGTH,
117
+ MORPH_TEMPO,
84
118
  NO_MODIFIERS,
85
119
  PAGED_SWIPE_DEFAULTS,
86
120
  PAGED_SWIPE_EMPTY_CONTEXT,
87
121
  PAGED_SWIPE_IDLE,
88
122
  PHASES,
123
+ PLACE_GUIDES_DEFAULT,
89
124
  RECOGNIZER_DEFAULTS,
125
+ REFUSAL_RANK,
90
126
  SETTLE_DEFAULTS,
91
127
  SETTLE_TEMPO,
92
128
  SPRING_DEFAULTS,
@@ -94,13 +130,18 @@ export {
94
130
  TOUCH_PRESS_IDLE,
95
131
  WHEEL_DEFAULTS,
96
132
  WHEEL_PAN_DEFAULTS,
133
+ anchoredMorph,
97
134
  batch,
98
135
  classifyWheel,
99
136
  computed,
137
+ createDragIntent,
100
138
  createDwellMachine,
101
139
  createFakeClock,
102
140
  createFrameCoalescer,
103
141
  createFrameLoop,
142
+ createGripPress,
143
+ createLandingModel,
144
+ createLayoutMotion,
104
145
  createMachine,
105
146
  createPagedSwipe,
106
147
  createRecognizer,
@@ -120,15 +161,21 @@ export {
120
161
  easeOut,
121
162
  easeOutCubic,
122
163
  effect,
164
+ guideRects,
165
+ holdItem,
166
+ inRect,
123
167
  isHeld,
124
168
  isSignal,
169
+ liftDecision,
125
170
  linear,
126
171
  modHeld,
127
172
  motionValue,
128
173
  pagedSwipeDeadline,
129
174
  pagedSwipeReducer,
175
+ pickRank,
130
176
  platformButton,
131
177
  popIn,
178
+ previewPlan,
132
179
  resolveDragModifier,
133
180
  resolveSpring,
134
181
  reveal,
@@ -138,11 +185,12 @@ export {
138
185
  springStep,
139
186
  springValue,
140
187
  swipeProgress,
188
+ targetAt,
141
189
  toModifiers,
142
190
  touchPressDeadline,
143
191
  touchPressReducer,
144
192
  tweenValue,
145
193
  untracked,
146
- wheelDeltaPx
194
+ wheelDelta
147
195
  };
148
196
  //# sourceMappingURL=index.js.map