11import { AppError } from '../../kernel/errors.ts' ;
2- import {
3- normalizePublicSwipeMotion ,
4- type NormalizedGestureInput ,
5- } from '../../contracts/gesture-normalization.ts' ;
6- import { clampToRange } from '../../contracts/scroll-gesture.ts' ;
7- import { buildInPageSwipeGesturePlan } from '../../contracts/scroll-gesture.ts' ;
2+ import { normalizePublicSwipeMotion } from '../../contracts/gesture-normalization.ts' ;
3+ import type { GestureSemanticInput } from '../../contracts/gesture-plan-types.ts' ;
4+ import { buildInPageSwipeGesturePlan , clampToRange } from '../../contracts/scroll-gesture.ts' ;
85import { pointInsideRect } from '../../utils/rect-center.ts' ;
96import type { MaestroRuntimeRequest } from './engine-types.ts' ;
107import type { MaestroCoordinate , MaestroDirection , MaestroSwipeGesture } from './program-ir.ts' ;
@@ -109,14 +106,14 @@ function normalizedSwipeFromEndpoints(
109106 start : { x : number ; y : number } ,
110107 end : { x : number ; y : number } ,
111108 durationMs : number | undefined ,
112- ) : NormalizedGestureInput {
109+ ) : GestureSemanticInput {
113110 return normalizePublicSwipeMotion ( { from : start , to : end , durationMs } ) . gesture ;
114111}
115112
116113function normalizedScreenHorizontalSwipe (
117114 direction : Extract < MaestroDirection , 'left' | 'right' > ,
118115 durationMs : number | undefined ,
119- ) : NormalizedGestureInput {
116+ ) : GestureSemanticInput {
120117 const preset = direction ;
121118 return durationMs === undefined
122119 ? { intent : 'fling' , preset }
@@ -128,7 +125,7 @@ function normalizedScreenVerticalSwipe(
128125 start : { x : number ; y : number } ,
129126 end : { x : number ; y : number } ,
130127 durationMs : number | undefined ,
131- ) : NormalizedGestureInput {
128+ ) : GestureSemanticInput {
132129 if ( durationMs !== undefined ) return normalizedSwipeFromEndpoints ( start , end , durationMs ) ;
133130 return {
134131 intent : 'fling' ,
0 commit comments