You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
3.4 KiB
1 line
3.4 KiB
{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _get from \"@babel/runtime/helpers/get\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nimport { ContinousBaseGesture } from \"./gesture\";\nfunction changeEventCalculator(current, _previous) {\n 'worklet';\n\n return current;\n}\nexport var ManualGesture = function (_ContinousBaseGesture) {\n _inherits(ManualGesture, _ContinousBaseGesture);\n var _super = _createSuper(ManualGesture);\n function ManualGesture() {\n var _this;\n _classCallCheck(this, ManualGesture);\n _this = _super.call(this);\n _this.handlerName = 'ManualGestureHandler';\n return _this;\n }\n _createClass(ManualGesture, [{\n key: \"onChange\",\n value: function onChange(callback) {\n this.handlers.changeEventCalculator = changeEventCalculator;\n return _get(_getPrototypeOf(ManualGesture.prototype), \"onChange\", this).call(this, callback);\n }\n }]);\n return ManualGesture;\n}(ContinousBaseGesture);","map":{"version":3,"sources":["manualGesture.ts"],"names":["ContinousBaseGesture","changeEventCalculator","current","_previous","ManualGesture","constructor","handlerName","onChange","callback","handlers"],"mappings":";;;;;;;;AACA,SAASA,oBAAT;AAEA,SAASC,qBAAT,CACEC,OADF,EAEEC,SAFF,EAGE;EACA,SAAA;;EACA,OAAOD,OAAP;AACD;AAED,WAAaE,aAAN;EAAA;EAAA;EAILC,yBAAc;IAAA;IAAA;IACZ;IAEA,MAAKC,WAAL,GAAmB,sBAAnB;IAAA;EACD;EAAA;IAAA;IAAA,OAEDC,kBACEC,QADM,EAEN;MAEA,IAAA,CAAKC,QAAL,CAAcR,qBAAd,GAAsCA,qBAAtC;MACA,mFAAsBO,QAAtB;IACD;EAAA;EAAA;AAAA,EAhBgCR,oBAA5B","sourcesContent":["import { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport { ContinousBaseGesture } from './gesture';\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent<Record<string, never>>,\n _previous?: GestureUpdateEvent<Record<string, never>>\n) {\n 'worklet';\n return current;\n}\n\nexport class ManualGesture extends ContinousBaseGesture<\n Record<string, never>,\n Record<string, never>\n> {\n constructor() {\n super();\n\n this.handlerName = 'ManualGestureHandler';\n }\n\n onChange(\n callback: (event: GestureUpdateEvent<Record<string, never>>) => void\n ) {\n // @ts-ignore TS being overprotective, Record<string, never> is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type ManualGestureType = InstanceType<typeof ManualGesture>;\n"]},"metadata":{},"sourceType":"module"} |