1 line
4.4 KiB
Plaintext
1 line
4.4 KiB
Plaintext
{"version":3,"sources":["GestureComponents.tsx"],"names":["React","ScrollView","RNScrollView","Switch","RNSwitch","TextInput","RNTextInput","DrawerLayoutAndroid","RNDrawerLayoutAndroid","FlatList","RNFlatList","createNativeWrapper","disallowInterruption","shouldCancelWhenOutside","shouldActivateOnStart","positions","Left","Right","forwardRef","props","ref","scrollProps"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SACEC,UAAU,IAAIC,YADhB,EAGEC,MAAM,IAAIC,QAHZ,EAKEC,SAAS,IAAIC,WALf,EAOEC,mBAAmB,IAAIC,qBAPzB,EASEC,QAAQ,IAAIC,UATd,QAWO,cAXP;AAaA,OAAOC,mBAAP,MAAgC,iCAAhC;AAIA,OAAO,MAAMV,UAAU,GAAGU,mBAAmB,CAE3CT,YAF2C,EAE7B;AACdU,EAAAA,oBAAoB,EAAE,IADR;AAEdC,EAAAA,uBAAuB,EAAE;AAFX,CAF6B,CAAtC,C,CAMP;AACA;;AAUA,OAAO,MAAMV,MAAM,GAAGQ,mBAAmB,CAAgBP,QAAhB,EAA0B;AACjES,EAAAA,uBAAuB,EAAE,KADwC;AAEjEC,EAAAA,qBAAqB,EAAE,IAF0C;AAGjEF,EAAAA,oBAAoB,EAAE;AAH2C,CAA1B,CAAlC,C,CAKP;;AAGA,OAAO,MAAMP,SAAS,GAAGM,mBAAmB,CAAmBL,WAAnB,CAArC,C,CACP;;AAGA,OAAO,MAAMC,mBAAmB,GAAGI,mBAAmB,CAEpDH,qBAFoD,EAE7B;AAAEI,EAAAA,oBAAoB,EAAE;AAAxB,CAF6B,CAA/C,C,CAGP;AACA;;AACAL,mBAAmB,CAACQ,SAApB,GAAgC;AAAEC,EAAAA,IAAI,EAAE,MAAR;AAAgBC,EAAAA,KAAK,EAAE;AAAvB,CAAhC,C,CACA;;AAGA,OAAO,MAAMR,QAAQ,gBAAGT,KAAK,CAACkB,UAAN,CACtB,CAACC,KAAD,EAAQC,GAAR,kBACE,oBAAC,UAAD;AACE,EAAA,GAAG,EAAEA;AADP,GAEMD,KAFN;AAGE,EAAA,qBAAqB,EAAGE,WAAD,iBAAiB,oBAAC,UAAD,EAAgBA,WAAhB;AAH1C,GAFoB,CAAjB,C,CASP","sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport {\n ScrollView as RNScrollView,\n ScrollViewProps as RNScrollViewProps,\n Switch as RNSwitch,\n SwitchProps as RNSwitchProps,\n TextInput as RNTextInput,\n TextInputProps as RNTextInputProps,\n DrawerLayoutAndroid as RNDrawerLayoutAndroid,\n DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps,\n FlatList as RNFlatList,\n FlatListProps as RNFlatListProps,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nimport { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';\n\nexport const ScrollView = createNativeWrapper<\n PropsWithChildren<RNScrollViewProps>\n>(RNScrollView, {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n});\n// backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type ScrollView = typeof ScrollView & {\n scrollTo(\n y?: number | { x?: number; y?: number; animated?: boolean },\n x?: number,\n animated?: boolean\n ): void;\n scrollToEnd(options?: { animated: boolean }): void;\n};\n\nexport const Switch = createNativeWrapper<RNSwitchProps>(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type Switch = typeof Switch;\n\nexport const TextInput = createNativeWrapper<RNTextInputProps>(RNTextInput);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TextInput = typeof TextInput;\n\nexport const DrawerLayoutAndroid = createNativeWrapper<\n PropsWithChildren<RNDrawerLayoutAndroidProps>\n>(RNDrawerLayoutAndroid, { disallowInterruption: true });\n// we use literal object since TS gives error when using RN's `positions`\n// @ts-ignore FIXME(TS) maybe this should be removed?\nDrawerLayoutAndroid.positions = { Left: 'left', Right: 'right' };\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type DrawerLayoutAndroid = typeof DrawerLayoutAndroid;\n\nexport const FlatList = React.forwardRef<RNFlatList<any>, RNFlatListProps<any>>(\n (props, ref) => (\n <RNFlatList\n ref={ref}\n {...props}\n renderScrollComponent={(scrollProps) => <ScrollView {...scrollProps} />}\n />\n )\n);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type FlatList<ItemT> = React.ComponentType<\n RNFlatListProps<ItemT> &\n NativeViewGestureHandlerProps &\n React.RefAttributes<any>\n> & {\n scrollToEnd: (params?: { animated?: boolean }) => void;\n scrollToIndex: (params: {\n animated?: boolean;\n index: number;\n viewOffset?: number;\n viewPosition?: number;\n }) => void;\n scrollToItem: (params: {\n animated?: boolean;\n item: ItemT;\n viewPosition?: number;\n }) => void;\n scrollToOffset: (params: { animated?: boolean; offset: number }) => void;\n};\n"]} |