vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
1 lines • 1.59 kB
Source Map (JSON)
{"version":3,"file":"symbol.cjs","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":"mHAsCaA,EAAc,OAAO,OAAqB,CACrD,aACA,mBACA,WACA,MACF,CAAC,EAEYC,EAAaC,YAAY,YAAc,YACvCC,EAAWD,YAAY,WAAa"}