@weasel-js/gestures 0.7.0 → 0.7.1
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.
- package/dist/index.d.ts +19 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -503,8 +503,22 @@ interface PointerSampleStylus {
|
|
|
503
503
|
/** Degrees, ±90. Zero for mouse/touch. */
|
|
504
504
|
tiltY?: number;
|
|
505
505
|
}
|
|
506
|
+
/**
|
|
507
|
+
* Which physical pointer a sample came from.
|
|
508
|
+
*
|
|
509
|
+
* Carried by every pointer-kind event so the dispatcher can key in-flight
|
|
510
|
+
* gesture handles per pointer (`pointer-<pointerId>`) instead of funneling
|
|
511
|
+
* mouse, each touch, and the stylus into one slot. Optional because
|
|
512
|
+
* synthesized events (tests, programmatic drags, the hover pump's
|
|
513
|
+
* `resolveOnly` probe) have no originating `PointerEvent`; those all key to
|
|
514
|
+
* the same default slot, which is the pre-`pointerId` behavior.
|
|
515
|
+
*/
|
|
516
|
+
interface PointerIdentity {
|
|
517
|
+
/** `PointerEvent.pointerId` from the originating DOM event. */
|
|
518
|
+
pointerId?: number;
|
|
519
|
+
}
|
|
506
520
|
/** A pointer press — the start of any drag, and the richest event shape. */
|
|
507
|
-
interface PointerDownEvent extends EventModifiers, PointerSampleStylus {
|
|
521
|
+
interface PointerDownEvent extends EventModifiers, PointerSampleStylus, PointerIdentity {
|
|
508
522
|
kind: 'pointerdown';
|
|
509
523
|
/**
|
|
510
524
|
* Which of the two dispatches this press produces.
|
|
@@ -542,7 +556,7 @@ interface PointerDownEvent extends EventModifiers, PointerSampleStylus {
|
|
|
542
556
|
}
|
|
543
557
|
/** A pump-only pointer move. Carried in the union so the dispatcher's
|
|
544
558
|
* `handleInput` signature stays uniform; the matcher never matches it. */
|
|
545
|
-
interface PointerMoveEvent extends EventModifiers, PointerSampleStylus {
|
|
559
|
+
interface PointerMoveEvent extends EventModifiers, PointerSampleStylus, PointerIdentity {
|
|
546
560
|
kind: 'pointermove';
|
|
547
561
|
x: number;
|
|
548
562
|
y: number;
|
|
@@ -550,7 +564,7 @@ interface PointerMoveEvent extends EventModifiers, PointerSampleStylus {
|
|
|
550
564
|
clientY?: number;
|
|
551
565
|
}
|
|
552
566
|
/** A pump-only pointer release. Not matched by the matcher. */
|
|
553
|
-
interface PointerUpEvent extends EventModifiers {
|
|
567
|
+
interface PointerUpEvent extends EventModifiers, PointerIdentity {
|
|
554
568
|
kind: 'pointerup';
|
|
555
569
|
x: number;
|
|
556
570
|
y: number;
|
|
@@ -558,7 +572,7 @@ interface PointerUpEvent extends EventModifiers {
|
|
|
558
572
|
clientY?: number;
|
|
559
573
|
}
|
|
560
574
|
/** A pump-only pointer cancel. Not matched by the matcher. */
|
|
561
|
-
interface PointerCancelEvent extends EventModifiers {
|
|
575
|
+
interface PointerCancelEvent extends EventModifiers, PointerIdentity {
|
|
562
576
|
kind: 'pointercancel';
|
|
563
577
|
}
|
|
564
578
|
/** A click (down+up on the same target). */
|
|
@@ -799,4 +813,4 @@ declare function matchIngestTypes(items: readonly {
|
|
|
799
813
|
*/
|
|
800
814
|
declare function matchSpec(e: InputEvent, spec: GestureSpec, isMac: boolean, phaseCtx?: PhaseContext): boolean;
|
|
801
815
|
|
|
802
|
-
export { ACTIVE_SIGILS, type BodyClassification, type BodyKind, type BodyTarget, type ChannelRef, type ClickEvent, type ClickSpec, type ContextMenuEvent, type ContextMenuSpec, type DescribeRouteOptions, type DoubleClickEvent, type DoubleClickSpec, type DragSpec, type DropEvent, type DropSpec, type EventModifiers, GESTURE_DESCRIPTORS, type GestureArgSpec, type GestureDescriptor, type GestureName, type GestureSpec, type IngestItem, type InputEvent, type KeyEvent, type KeyHeldEvent, type KeyHeldSpec, type KeySpec, MOD_NAME_SET, type ModRequirement, type ModSpec, type ModifierCombo, type ModifierKey, type ModifiersEvent, type MultiTouchSpec, type MultiTouchTapSpec, type MultitouchEvent, type MultitouchTapEvent, type OptionalMod, type ParsedKeyRoute, type ParsedModifiers, type ParsedRoute, type PasteEvent, type PasteSpec, type PhaseAtom, type PhaseContext, type PhaseSpec, type PointerCancelEvent, type PointerDownEvent, type PointerDownSpec, type PointerMoveEvent, type PointerSampleStylus, type PointerUpEvent, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, RESERVED_SIGILS, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, type RouteDescriptionPart, type RouteFieldName, type RoutePhase, type RouteTermLabel, type TargetSpec, VALID_MOD_NAMES, type WheelEvent, type WheelSpec, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, formatKeyRoute, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, keyRouteToSpec, matchIngestTypes, matchKey, matchModifiers, matchPhase, matchSpec, matchTarget, mimeMatchesGlob, modifierComboToParsed, mods, parseKeyRoute, parseRoute };
|
|
816
|
+
export { ACTIVE_SIGILS, type BodyClassification, type BodyKind, type BodyTarget, type ChannelRef, type ClickEvent, type ClickSpec, type ContextMenuEvent, type ContextMenuSpec, type DescribeRouteOptions, type DoubleClickEvent, type DoubleClickSpec, type DragSpec, type DropEvent, type DropSpec, type EventModifiers, GESTURE_DESCRIPTORS, type GestureArgSpec, type GestureDescriptor, type GestureName, type GestureSpec, type IngestItem, type InputEvent, type KeyEvent, type KeyHeldEvent, type KeyHeldSpec, type KeySpec, MOD_NAME_SET, type ModRequirement, type ModSpec, type ModifierCombo, type ModifierKey, type ModifiersEvent, type MultiTouchSpec, type MultiTouchTapSpec, type MultitouchEvent, type MultitouchTapEvent, type OptionalMod, type ParsedKeyRoute, type ParsedModifiers, type ParsedRoute, type PasteEvent, type PasteSpec, type PhaseAtom, type PhaseContext, type PhaseSpec, type PointerCancelEvent, type PointerDownEvent, type PointerDownSpec, type PointerIdentity, type PointerMoveEvent, type PointerSampleStylus, type PointerUpEvent, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, RESERVED_SIGILS, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, type RouteDescriptionPart, type RouteFieldName, type RoutePhase, type RouteTermLabel, type TargetSpec, VALID_MOD_NAMES, type WheelEvent, type WheelSpec, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, formatKeyRoute, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, keyRouteToSpec, matchIngestTypes, matchKey, matchModifiers, matchPhase, matchSpec, matchTarget, mimeMatchesGlob, modifierComboToParsed, mods, parseKeyRoute, parseRoute };
|