{"version":3,"file":"symbol.mjs","sources":["../../../components/scroll/symbol.ts"],"sourcesContent":["import { USE_TOUCH } from '@vexip-ui/utils'\n\nexport type ScrollMode = 'horizontal' | 'horizontal-exact' | 'vertical' | 'both'\n\nexport interface ScrollPayload {\n  type: Exclude<ScrollMode, 'horizontal-exact'>,\n  clientX: number,\n  clientY: number,\n  percentX: number,\n  percentY: number\n}\n\nexport interface BarScrollPayload {\n  type: 'vertical' | 'horizontal',\n  clientX: number,\n  clientY: number,\n  percentX: number,\n  percentY: number\n}\n\nexport interface ScrollState {\n  scrollX: number,\n  scrollY: number,\n  percentX: number,\n  percentY: number,\n  enableXScroll: number,\n  enableYScroll: number\n}\n\nexport interface ScrollSlotParams {\n  getState: () => ScrollState,\n  refresh: () => void,\n  scrollTo: (clientX: number, clientY: number, duration?: number) => void,\n  scrollBy: (deltaX: number, deltaY: number, duration?: number) => void,\n  scrollToElement: (el: string | Element, duration?: number, offset?: number) => void,\n  ensureInView: (el: string | Element, duration?: number, offset?: number) => void\n}\n\nexport const scrollModes = Object.freeze<ScrollMode[]>([\n  'horizontal',\n  'horizontal-exact',\n  'vertical',\n  'both'\n])\n\nexport const MOVE_EVENT = USE_TOUCH ? 'touchmove' : 'mousemove'\nexport const UP_EVENT = USE_TOUCH ? 'touchend' : 'mouseup'\n"],"names":["scrollModes","MOVE_EVENT","USE_TOUCH","UP_EVENT"],"mappings":";AAsCa,MAAAA,IAAc,OAAO,OAAqB;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAEYC,IAAaC,IAAY,cAAc,aACvCC,IAAWD,IAAY,aAAa;"}