@nativescript-community/ui-drawer 0.0.29 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +149 -90
  3. package/angular/bundles/nativescript-community-ui-drawer-angular.umd.js +54 -31
  4. package/angular/esm2015/index.js +1 -1
  5. package/angular/esm2015/module.js +11 -10
  6. package/angular/esm2015/nativescript-community-ui-drawer-angular.js +1 -1
  7. package/angular/fesm2015/nativescript-community-ui-drawer-angular.js +34 -32
  8. package/angular/module.d.ts +15 -14
  9. package/angular/package.json +3 -3
  10. package/index.js +15 -10
  11. package/package.json +11 -3
  12. package/vue/index.js +1 -1
  13. package/angular/bundles/nativescript-community-ui-drawer-angular.umd.min.js +0 -2
  14. package/pnpm-global/5/node_modules/.modules.yaml +0 -24
  15. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
  16. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
  17. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
  18. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
  19. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
  20. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
  21. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
  22. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
  23. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
  24. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
  25. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
  26. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
  27. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
  28. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
  29. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
  30. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -79
  31. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -169
  32. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -45
  33. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -19
  34. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -125
  35. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -541
  36. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -11
  37. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -569
  38. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
  39. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -97
  40. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -51
  41. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -77
  42. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -141
  43. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -11
  44. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -320
  45. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -138
  46. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -25
  47. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -25
  48. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -25
  49. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -171
  50. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
  51. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -597
  52. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -176
  53. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -12
  54. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/res/values/config.xml +0 -13
  55. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.h +0 -6
  56. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.m +0 -131
  57. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.h +0 -4
  58. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.m +0 -170
  59. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.h +0 -98
  60. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.m +0 -365
  61. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerDirection.h +0 -8
  62. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.h +0 -30
  63. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.m +0 -122
  64. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerHeader.h +0 -23
  65. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.h +0 -25
  66. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.m +0 -169
  67. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.h +0 -18
  68. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.m +0 -49
  69. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerState.h +0 -10
  70. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.h +0 -12
  71. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.m +0 -100
  72. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.h +0 -15
  73. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.m +0 -163
  74. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.h +0 -14
  75. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.m +0 -242
  76. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.h +0 -12
  77. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.m +0 -36
  78. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.h +0 -17
  79. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.m +0 -93
  80. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.h +0 -12
  81. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.m +0 -36
  82. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.h +0 -13
  83. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.m +0 -228
  84. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/module.modulemap +0 -5
  85. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
  86. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
  87. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
  88. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/extensions.android.d.ts +0 -16
  89. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
  90. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
  91. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/LICENSE +0 -201
  92. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/README.md +0 -17
  93. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
  94. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.js +0 -37
  95. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
  96. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.js +0 -224
  97. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/package.json +0 -31
  98. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
  99. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/LICENSE +0 -201
  100. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/README.md +0 -17
  101. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
  102. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.js +0 -37
  103. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
  104. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.js +0 -224
  105. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/package.json +0 -31
  106. package/pnpm-global/5/node_modules/.pnpm/lock.yaml +0 -19
  107. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
  108. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/LICENSE +0 -201
  109. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/README.md +0 -17
  110. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
  111. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.js +0 -37
  112. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
  113. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.js +0 -224
  114. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/package.json +0 -31
  115. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
  116. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
  117. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
  118. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
  119. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
  120. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
  121. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
  122. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
  123. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
  124. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
  125. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
  126. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
  127. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
  128. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
  129. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
  130. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -79
  131. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -169
  132. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -45
  133. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -19
  134. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -125
  135. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -541
  136. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -11
  137. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -569
  138. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
  139. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -97
  140. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -51
  141. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -77
  142. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -141
  143. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -11
  144. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -320
  145. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -138
  146. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -25
  147. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -25
  148. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -25
  149. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -171
  150. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
  151. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -597
  152. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -176
  153. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -12
  154. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/res/values/config.xml +0 -13
  155. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.h +0 -6
  156. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.m +0 -131
  157. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.h +0 -4
  158. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.m +0 -170
  159. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.h +0 -98
  160. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.m +0 -365
  161. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerDirection.h +0 -8
  162. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.h +0 -30
  163. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.m +0 -122
  164. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerHeader.h +0 -23
  165. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.h +0 -25
  166. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.m +0 -169
  167. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.h +0 -18
  168. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.m +0 -49
  169. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerState.h +0 -10
  170. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.h +0 -12
  171. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.m +0 -100
  172. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.h +0 -15
  173. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.m +0 -163
  174. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.h +0 -14
  175. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.m +0 -242
  176. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.h +0 -12
  177. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.m +0 -36
  178. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.h +0 -17
  179. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.m +0 -93
  180. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.h +0 -12
  181. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.m +0 -36
  182. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.h +0 -13
  183. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.m +0 -228
  184. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/module.modulemap +0 -5
  185. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
  186. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
  187. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
  188. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/extensions.android.d.ts +0 -16
  189. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
  190. package/pnpm-global/5/pnpm-lock.yaml +0 -19
  191. package/pnpm-lock.yaml +0 -16
  192. package/react/index.d.ts +0 -20
  193. package/react/index.js +0 -8
@@ -1,176 +0,0 @@
1
- package com.swmansion.gesturehandler;
2
-
3
- import android.util.Log;
4
-
5
- import android.os.Handler;
6
- import android.view.MotionEvent;
7
-
8
- public class TapGestureHandler extends GestureHandler<TapGestureHandler> {
9
- private final String TAG = "TapGestureHandler";
10
- private static float MAX_VALUE_IGNORE = Float.MIN_VALUE;
11
- private static final long DEFAULT_MAX_DURATION_MS = 500;
12
- private static final long DEFAULT_MAX_DELAY_MS = 500;
13
- private static final int DEFAULT_NUMBER_OF_TAPS = 1;
14
- private static final int DEFAULT_MIN_NUMBER_OF_POINTERS = 1;
15
-
16
- private float mMaxDeltaX = MAX_VALUE_IGNORE;
17
- private float mMaxDeltaY = MAX_VALUE_IGNORE;
18
- private float mMaxDistSq = MAX_VALUE_IGNORE;
19
-
20
- private long mMaxDurationMs = DEFAULT_MAX_DURATION_MS;
21
- private long mMaxDelayMs = DEFAULT_MAX_DELAY_MS;
22
- private int mNumberOfTaps = DEFAULT_NUMBER_OF_TAPS;
23
- private int mMinNumberOfPointers = DEFAULT_MIN_NUMBER_OF_POINTERS;
24
- private int mNumberOfPointers = 1;
25
-
26
- private float mStartX, mStartY;
27
- private float mOffsetX, mOffsetY;
28
- private float mLastX, mLastY;
29
-
30
- private Handler mHandler;
31
- private int mTapsSoFar;
32
-
33
- private final Runnable mFailDelayed = new Runnable() {
34
- @Override
35
- public void run() {
36
- fail();
37
- }
38
- };
39
-
40
- public TapGestureHandler setNumberOfTaps(int numberOfTaps) {
41
- mNumberOfTaps = numberOfTaps;
42
- return this;
43
- }
44
-
45
- public TapGestureHandler setMaxDelayMs(long maxDelayMs) {
46
- mMaxDelayMs = maxDelayMs;
47
- return this;
48
- }
49
-
50
- public TapGestureHandler setMaxDurationMs(long maxDurationMs) {
51
- mMaxDurationMs = maxDurationMs;
52
- return this;
53
- }
54
-
55
- public TapGestureHandler setMaxDx(float deltaX) {
56
- mMaxDeltaX = deltaX;
57
- return this;
58
- }
59
-
60
- public TapGestureHandler setMaxDy(float deltaY) {
61
- mMaxDeltaY = deltaY;
62
- return this;
63
- }
64
-
65
- public TapGestureHandler setMaxDist(float maxDist) {
66
- mMaxDistSq = maxDist * maxDist;
67
- return this;
68
- }
69
-
70
- public TapGestureHandler setMinNumberOfPointers(int minNumberOfPointers) {
71
- mMinNumberOfPointers = minNumberOfPointers;
72
- return this;
73
- }
74
-
75
- public TapGestureHandler() {
76
- setShouldCancelWhenOutside(true);
77
- }
78
-
79
- private void startTap() {
80
- if (mHandler == null) {
81
- mHandler = new Handler();
82
- } else {
83
- mHandler.removeCallbacksAndMessages(null);
84
- }
85
- mHandler.postDelayed(mFailDelayed, mMaxDurationMs);
86
- }
87
-
88
- private void endTap() {
89
- if (mHandler == null) {
90
- mHandler = new Handler();
91
- } else {
92
- mHandler.removeCallbacksAndMessages(null);
93
- }
94
- if (++mTapsSoFar == mNumberOfTaps && mNumberOfPointers >= mMinNumberOfPointers) {
95
- activate();
96
- end();
97
- } else {
98
- mHandler.postDelayed(mFailDelayed, mMaxDelayMs);
99
- }
100
- }
101
-
102
- private boolean shouldFail() {
103
- float dx = mLastX - mStartX + mOffsetX;
104
- if (mMaxDeltaX != MAX_VALUE_IGNORE && Math.abs(dx) > mMaxDeltaX) {
105
- return true;
106
- }
107
-
108
- float dy = mLastY - mStartY + mOffsetY;
109
- if (mMaxDeltaY != MAX_VALUE_IGNORE && Math.abs(dy) > mMaxDeltaY) {
110
- return true;
111
- }
112
-
113
- float dist = dy * dy + dx * dx;
114
- return mMaxDistSq != MAX_VALUE_IGNORE && dist > mMaxDistSq;
115
- }
116
-
117
- @Override
118
- protected void onHandle(MotionEvent event) {
119
- int state = getState();
120
- int action = event.getActionMasked();
121
-
122
- if (state == STATE_UNDETERMINED) {
123
- mOffsetX = 0;
124
- mOffsetY = 0;
125
- mStartX = event.getRawX();
126
- mStartY = event.getRawY();
127
- }
128
-
129
- if (action == MotionEvent.ACTION_POINTER_UP || action == MotionEvent.ACTION_POINTER_DOWN) {
130
- mOffsetX += mLastX - mStartX;
131
- mOffsetY += mLastY - mStartY;
132
- mLastX = GestureUtils.getLastPointerX(event, true);
133
- mLastY = GestureUtils.getLastPointerY(event, true);
134
- mStartX = mLastX;
135
- mStartY = mLastY;
136
- } else {
137
- mLastX = GestureUtils.getLastPointerX(event, true);
138
- mLastY = GestureUtils.getLastPointerY(event, true);
139
- }
140
-
141
- if (mNumberOfPointers < event.getPointerCount()) {
142
- mNumberOfPointers = event.getPointerCount();
143
- }
144
-
145
- if (shouldFail()) {
146
- fail();
147
- } else if (state == STATE_UNDETERMINED) {
148
- if (action == MotionEvent.ACTION_DOWN) {
149
- begin();
150
- }
151
- startTap();
152
- } else if (state == STATE_BEGAN) {
153
- if (action == MotionEvent.ACTION_UP) {
154
- endTap();
155
- } else if (action == MotionEvent.ACTION_DOWN) {
156
- startTap();
157
- }
158
- }
159
- }
160
-
161
- @Override
162
- protected void onCancel() {
163
- if (mHandler != null) {
164
- mHandler.removeCallbacksAndMessages(null);
165
- }
166
- }
167
-
168
- @Override
169
- protected void onReset() {
170
- mTapsSoFar = 0;
171
- mNumberOfPointers = 0;
172
- if (mHandler != null) {
173
- mHandler.removeCallbacksAndMessages(null);
174
- }
175
- }
176
- }
@@ -1,12 +0,0 @@
1
- package com.swmansion.gesturehandler;
2
-
3
- import android.view.View;
4
- import android.view.ViewGroup;
5
-
6
- public interface ViewConfigurationHelper {
7
- PointerEventsConfig getPointerEventsConfigForView(View view);
8
-
9
- View getChildInDrawingOrderAtIndex(ViewGroup parent, int index);
10
-
11
- boolean isViewClippingChildren(ViewGroup view);
12
- }
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3
- <!-- Minimum span needed to begin a touch scaling gesture.
4
- If the span is equal to or greater than this size, a scaling gesture
5
- will begin, where supported. (See android.view.ScaleGestureDetector)
6
- This also takes into account the size of any active touch points.
7
- Devices with screens that deviate too far from their assigned density
8
- bucket should consider tuning this value in a device-specific overlay.
9
- For best results, care should be taken such that this value remains
10
- larger than the minimum reported touchMajor/touchMinor values
11
- reported by the hardware. -->
12
- <dimen name="config_minPinchSpan">27mm</dimen>
13
- </resources>
@@ -1,6 +0,0 @@
1
- #import "GestureHandler.h"
2
-
3
- @interface FlingGestureHandler : GestureHandler
4
- //@property (nonatomic) NSNumber * direction;
5
- //@property (nonatomic) NSNumber * numberOfTouchesRequired;
6
- @end
@@ -1,131 +0,0 @@
1
- #import "FlingHandler.h"
2
-
3
-
4
- @interface FlingGestureHandler(){
5
- @protected UISwipeGestureRecognizer *_rightrecognizer;
6
- @protected UISwipeGestureRecognizer *_toprecognizer;
7
- @protected UISwipeGestureRecognizer *_bottomrecognizer;
8
-
9
- }
10
- @property (nonatomic) UISwipeGestureRecognizerDirection direction;
11
- @end
12
- @implementation FlingGestureHandler
13
-
14
- - (instancetype)initWithTag:(NSNumber *)tag
15
- {
16
- if ((self = [super initWithTag:tag])) {
17
- self.direction = UISwipeGestureRecognizerDirectionLeft | UISwipeGestureRecognizerDirectionRight | UISwipeGestureRecognizerDirectionUp | UISwipeGestureRecognizerDirectionDown;
18
- _recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
19
- [(UISwipeGestureRecognizer*)_recognizer setDirection:UISwipeGestureRecognizerDirectionLeft];
20
- _rightrecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
21
- [(UISwipeGestureRecognizer*)_rightrecognizer setDirection:UISwipeGestureRecognizerDirectionRight];
22
- _toprecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
23
- [(UISwipeGestureRecognizer*)_toprecognizer setDirection: UISwipeGestureRecognizerDirectionUp];
24
- _bottomrecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
25
- [(UISwipeGestureRecognizer*)_bottomrecognizer setDirection:UISwipeGestureRecognizerDirectionDown];
26
- }
27
- return self;
28
- }
29
-
30
- - (void)configure:(NSDictionary *)config
31
- {
32
- [super configure:config];
33
- UISwipeGestureRecognizer *recognizer = (UISwipeGestureRecognizer *)_recognizer;
34
-
35
- id prop = config[@"direction"];
36
- if (prop != nil) {
37
- self.direction = [prop integerValue];
38
- if ((self.direction & UISwipeGestureRecognizerDirectionLeft) == 0) {
39
- _recognizer.enabled = NO;
40
- }
41
- if ((self.direction & UISwipeGestureRecognizerDirectionRight) == 0) {
42
- _rightrecognizer.enabled = NO;
43
- }
44
- if ((self.direction & UISwipeGestureRecognizerDirectionUp) == 0) {
45
- _toprecognizer.enabled = NO;
46
- }
47
- if ((self.direction & UISwipeGestureRecognizerDirectionDown) == 0) {
48
- _bottomrecognizer.enabled = NO;
49
- }
50
- }
51
-
52
- #if !TARGET_OS_TV
53
- prop = config[@"numberOfPointers"];
54
- if (prop != nil) {
55
- NSInteger numberOfTouchesRequired = [prop integerValue];
56
- recognizer.numberOfTouchesRequired = numberOfTouchesRequired;
57
- _rightrecognizer.numberOfTouchesRequired = numberOfTouchesRequired;
58
- _toprecognizer.numberOfTouchesRequired = numberOfTouchesRequired;
59
- _bottomrecognizer.numberOfTouchesRequired = numberOfTouchesRequired;
60
- }
61
- #endif
62
- }
63
- - (void)setEnabled:(BOOL)enabled
64
- {
65
- [super setEnabled:enabled];
66
- self.recognizer.enabled = enabled;
67
- _rightrecognizer.enabled = enabled && ((self.direction & UISwipeGestureRecognizerDirectionRight) != 0);
68
- _toprecognizer.enabled = enabled && ((self.direction & UISwipeGestureRecognizerDirectionUp) != 0);
69
- _bottomrecognizer.enabled = enabled && ((self.direction & UISwipeGestureRecognizerDirectionDown) != 0);
70
- }
71
-
72
- - (void)bindToView:(UIView *)view
73
- {
74
- [super bindToView:view];
75
- _rightrecognizer.delegate = self;
76
- [view addGestureRecognizer:_rightrecognizer];
77
- _toprecognizer.delegate = self;
78
- [view addGestureRecognizer:_toprecognizer];
79
- _bottomrecognizer.delegate = self;
80
- [view addGestureRecognizer:_bottomrecognizer];
81
- }
82
- - (void)unbindFromView
83
- {
84
- [super unbindFromView];
85
- [_rightrecognizer.view removeGestureRecognizer:_rightrecognizer];
86
- _rightrecognizer.delegate = nil;
87
- [_toprecognizer.view removeGestureRecognizer:_toprecognizer];
88
- _toprecognizer.delegate = nil;
89
- [_bottomrecognizer.view removeGestureRecognizer:_bottomrecognizer];
90
- _bottomrecognizer.delegate = nil;
91
- }
92
- //- (void) setDirection:(NSNumber *) value {
93
- // ((UISwipeGestureRecognizer *)_recognizer).direction = [value integerValue];
94
- //}
95
- //
96
- //- (NSNumber *) direction {
97
- // return [NSNumber numberWithInteger: ((UISwipeGestureRecognizer *)_recognizer).direction];
98
- //}
99
- //
100
- //- (void) setNumberOfTouchesRequired:(NSNumber *) value {
101
- // ((UISwipeGestureRecognizer *)_recognizer).numberOfTouchesRequired = [value integerValue];
102
- //}
103
- //
104
- //- (NSNumber *) numberOfTouchesRequired {
105
- // return [NSNumber numberWithInteger: ((UISwipeGestureRecognizer *)_recognizer).numberOfTouchesRequired];
106
- //}
107
-
108
- -(NSString*)directionToString:(UISwipeGestureRecognizerDirection) direction {
109
- if (direction == UISwipeGestureRecognizerDirectionDown) {
110
- return @"down";
111
- }
112
- if (direction == UISwipeGestureRecognizerDirectionUp) {
113
- return @"up";
114
- }
115
- if (direction == UISwipeGestureRecognizerDirectionLeft) {
116
- return @"left";
117
- }
118
- if (direction == UISwipeGestureRecognizerDirectionRight) {
119
- return @"right";
120
- }
121
- return NULL;
122
- }
123
-
124
- - (NSMutableDictionary *)eventExtraData:(UISwipeGestureRecognizer *)recognizer
125
- {
126
- NSMutableDictionary* result = [super eventExtraData:recognizer];
127
- [result setObject:[self directionToString:recognizer.direction] forKey:@"direction"];
128
- return result;
129
- }
130
- @end
131
-
@@ -1,170 +0,0 @@
1
- #import "ForceTouchHandler.h"
2
-
3
- #import <UIKit/UIGestureRecognizerSubclass.h>
4
-
5
-
6
- @interface ForceTouchGestureRecognizer : UIGestureRecognizer
7
-
8
- @property (nonatomic) CGFloat maxForce;
9
- @property (nonatomic) CGFloat minForce;
10
- @property (nonatomic) CGFloat force;
11
- @property (nonatomic) BOOL feedbackOnActivation;
12
-
13
- - (id)initWithGestureHandler:(GestureHandler*)gestureHandler;
14
-
15
- @end
16
-
17
- @implementation ForceTouchGestureRecognizer {
18
- __weak GestureHandler *_gestureHandler;
19
- UITouch *_firstTouch;
20
- }
21
-
22
-
23
- - (id)initWithGestureHandler:(GestureHandler*)gestureHandler
24
- {
25
- if ((self = [super initWithTarget:gestureHandler action:@selector(handleGesture:)])) {
26
- _gestureHandler = gestureHandler;
27
- _force = 0;
28
- _minForce = 0.2;
29
- _maxForce = NAN;
30
- _feedbackOnActivation = NO;
31
- }
32
- return self;
33
- }
34
-
35
- - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
36
- {
37
- if (_firstTouch) {
38
- // ignore rest of fingers
39
- return;
40
- }
41
- [super touchesBegan:touches withEvent:event];
42
- _firstTouch = [touches anyObject];
43
- [self handleForceWithTouches:touches];
44
- self.state = UIGestureRecognizerStatePossible;
45
- }
46
-
47
- - (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
48
- {
49
- if (![touches containsObject:_firstTouch]) {
50
- // Considered only the very first touch
51
- return;
52
- }
53
- [super touchesMoved:touches withEvent:event];
54
-
55
- [self handleForceWithTouches:touches];
56
-
57
- if ([self shouldFail]) {
58
- self.state = UIGestureRecognizerStateFailed;
59
- return;
60
- }
61
-
62
- if (self.state == UIGestureRecognizerStatePossible && [self shouldActivate]) {
63
- [self performFeedbackIfRequired];
64
- self.state = UIGestureRecognizerStateBegan;
65
- }
66
- }
67
-
68
- - (BOOL)shouldActivate {
69
- return (_force >= _minForce);
70
- }
71
-
72
- - (BOOL)shouldFail {
73
- return TEST_MAX_IF_NOT_NAN(_force, _maxForce);
74
- }
75
-
76
- - (void)performFeedbackIfRequired
77
- {
78
- #if !TARGET_OS_TV
79
- if (_feedbackOnActivation) {
80
- if (@available(iOS 10.0, *)) {
81
- [[[UIImpactFeedbackGenerator alloc] initWithStyle:(UIImpactFeedbackStyleMedium)] impactOccurred];
82
- }
83
- }
84
- #endif
85
- }
86
-
87
- - (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
88
- {
89
- if (![touches containsObject:_firstTouch]) {
90
- // Considered only the very first touch
91
- return;
92
- }
93
- [super touchesEnded:touches withEvent:event];
94
- if (self.state == UIGestureRecognizerStateBegan || self.state == UIGestureRecognizerStateChanged) {
95
- self.state = UIGestureRecognizerStateEnded;
96
- } else {
97
- self.state = UIGestureRecognizerStateFailed;
98
- }
99
- }
100
-
101
- - (void)handleForceWithTouches:(NSSet<UITouch *> *)touches {
102
- _force = _firstTouch.force / _firstTouch.maximumPossibleForce;
103
- }
104
-
105
- - (void)reset {
106
- [super reset];
107
- _force = 0;
108
- _firstTouch = NULL;
109
- }
110
-
111
- @end
112
-
113
- @implementation ForceTouchHandler
114
-
115
- - (instancetype)initWithTag:(NSNumber *)tag
116
- {
117
- if ((self = [super initWithTag:tag])) {
118
- _recognizer = [[ForceTouchGestureRecognizer alloc] initWithGestureHandler:self];
119
- }
120
- return self;
121
- }
122
-
123
- - (void)configure:(NSDictionary *)config
124
- {
125
- [super configure:config];
126
- ForceTouchGestureRecognizer *recognizer = (ForceTouchGestureRecognizer *)_recognizer;
127
-
128
- APPLY_FLOAT_PROP(maxForce);
129
- APPLY_FLOAT_PROP(minForce);
130
-
131
- id prop = config[@"feedbackOnActivation"];
132
- if (prop != nil) {
133
- recognizer.feedbackOnActivation = [prop boolValue];
134
- }
135
- }
136
-
137
- //
138
- //- (void) setMaxForce:(NSNumber *) value {
139
- // ((ForceTouchGestureRecognizer *)_recognizer).maxForce = [value integerValue];
140
- //}
141
- //
142
- //- (NSNumber *) maxForce {
143
- // return [NSNumber numberWithInteger: ((ForceTouchGestureRecognizer *)_recognizer).maxForce];
144
- //}
145
- //
146
- //- (void) setMinForce:(NSNumber *) value {
147
- // ((ForceTouchGestureRecognizer *)_recognizer).minForce = [value integerValue];
148
- //}
149
- //
150
- //- (NSNumber *) minForce {
151
- // return [NSNumber numberWithInteger: ((ForceTouchGestureRecognizer *)_recognizer).minForce];
152
- //}
153
- //
154
- //
155
- //- (void) setFeedbackOnActivation:(NSNumber *) value {
156
- // ((ForceTouchGestureRecognizer *)_recognizer).feedbackOnActivation = [value boolValue];
157
- //}
158
- //
159
- //- (NSNumber *) feedbackOnActivation {
160
- // return [NSNumber numberWithBool: ((ForceTouchGestureRecognizer *)_recognizer).feedbackOnActivation];
161
- //}
162
-
163
- - (NSMutableDictionary *)eventExtraData:(ForceTouchGestureRecognizer *)recognizer
164
- {
165
- NSMutableDictionary* result = [super eventExtraData:recognizer];
166
- [result setObject:@(recognizer.force) forKey:@"force"];
167
- return result;
168
- }
169
-
170
- @end
@@ -1,98 +0,0 @@
1
- //
2
- // GestureHandler.h
3
- // GestureHandler
4
- //
5
- // Created by Martin Guillon on 6/5/19.
6
- // Copyright © 2019 Stefan Dragnev. All rights reserved.
7
- //
8
-
9
- #import "GestureHandlerState.h"
10
- #import "GestureHandlerDirection.h"
11
- #import "GestureHandlerEvents.h"
12
-
13
- #import <Foundation/Foundation.h>
14
- #import <UIKit/UIKit.h>
15
-
16
- #define VEC_LEN_SQ(pt) (pt.x * pt.x + pt.y * pt.y)
17
- #define TEST_MIN_IF_NOT_NAN(value, limit) \
18
- (!isnan(limit) && ((limit < 0 && value <= limit) || (limit >= 0 && value >= limit)))
19
-
20
- #define TEST_MAX_IF_NOT_NAN(value, max) \
21
- (!isnan(max) && ((max < 0 && value < max) || (max >= 0 && value > max)))
22
-
23
- #define APPLY_PROP(recognizer, config, type, prop, propName) do { \
24
- id value = config[propName]; \
25
- if (value != nil) recognizer.prop = [value type]; \
26
- } while(0)
27
-
28
- #define APPLY_FLOAT_PROP(prop) do { APPLY_PROP(recognizer, config, floatValue, prop, @#prop); } while(0)
29
- #define APPLY_INT_PROP(prop) do { APPLY_PROP(recognizer, config, integerValue, prop, @#prop); } while(0)
30
- #define APPLY_NAMED_INT_PROP(prop, propName) do { APPLY_PROP(recognizer, config, integerValue, prop, propName); } while(0)
31
-
32
- //@protocol GestureHandlerEventEmitter
33
- //
34
- //- (void)sendTouchEvent:(nonnull GestureHandlerEvent *)event;
35
- //
36
- //- (void)sendStateChangeEvent:(nonnull GestureHandlerStateChange *)event;
37
- //
38
- //@end
39
-
40
-
41
- @protocol RootViewGestureRecognizerDelegate <UIGestureRecognizerDelegate>
42
-
43
- @required
44
- - (BOOL)gestureRecognizer:(nullable UIGestureRecognizer *)gestureRecognizer
45
- didActivateInRootView:(nullable UIView *)rootView;
46
-
47
- @end
48
-
49
-
50
- @class GestureHandler;
51
- @protocol GestureHandlerDelegate <NSObject>
52
-
53
- @optional
54
- - (BOOL)gestureHandler:(nullable GestureHandler *)gestureHandler shouldActivateForEvent:(nullable NSDictionary *)data;
55
-
56
- @required
57
- - (void)gestureHandler:(nullable GestureHandler *)gestureHandler
58
- didChangeState:(GestureHandlerState)state prevState:(GestureHandlerState)state extraData:(nullable NSDictionary *)data view:(nullable UIView *)view;
59
-
60
- @required
61
- - (void)gestureHandler:(nullable GestureHandler *)gestureHandler
62
- touchEventOnView:(nullable UIView *)view state:(GestureHandlerState)state extraData:(nullable NSDictionary *)data;
63
-
64
- @end
65
-
66
- @interface GestureHandler : NSObject <UIGestureRecognizerDelegate> {
67
-
68
- @protected UIGestureRecognizer *_recognizer;
69
- @protected GestureHandlerState _lastState;
70
-
71
- }
72
-
73
- + (nullable GestureHandler *)findGestureHandlerByRecognizer:(nonnull UIGestureRecognizer *)recognizer;
74
-
75
- - (nonnull instancetype)initWithTag:(nonnull NSNumber *)tag;
76
-
77
- @property (nonatomic, readonly, nonnull) NSNumber *tag;
78
- //@property (nonatomic, weak, nullable) id<GestureHandlerEventEmitter> emitter;
79
- @property (nonatomic, readonly, nullable) UIGestureRecognizer *recognizer;
80
- @property (nonatomic) BOOL enabled;
81
- @property(nonatomic) BOOL shouldCancelWhenOutside;
82
- @property (nullable, nonatomic, weak) id<GestureHandlerDelegate> delegate;
83
-
84
- - (void)bindToView:(nonnull UIView *)view;
85
- - (void)unbindFromView;
86
- - (void)configure:(nullable NSDictionary *)config NS_REQUIRES_SUPER;
87
- - (void)handleGesture:(nonnull id)recognizer;
88
- - (BOOL)containsPointInView;
89
- - (GestureHandlerState)state;
90
- - (nullable NSMutableDictionary *)eventExtraData:(nonnull id)recognizer;
91
-
92
- - (void)reset;
93
- - (void)sendEventsInState:(GestureHandlerState)state
94
- forView:(nonnull UIView *)view
95
- withExtraData:(nullable NSDictionary*)extraData;
96
-
97
- @end
98
-