react-native-drax 0.11.0-alpha.2 → 1.1.0

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 (246) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +390 -227
  3. package/lib/module/DebugOverlay.js +121 -0
  4. package/lib/module/DebugOverlay.js.map +1 -0
  5. package/lib/module/Drax.js +36 -0
  6. package/lib/module/Drax.js.map +1 -0
  7. package/lib/module/DraxContext.js +6 -0
  8. package/lib/module/DraxContext.js.map +1 -0
  9. package/lib/module/DraxHandle.js +47 -0
  10. package/lib/module/DraxHandle.js.map +1 -0
  11. package/lib/module/DraxHandleContext.js +11 -0
  12. package/lib/module/DraxHandleContext.js.map +1 -0
  13. package/lib/module/DraxList.js +108 -0
  14. package/lib/module/DraxList.js.map +1 -0
  15. package/lib/module/DraxProvider.js +203 -0
  16. package/lib/module/DraxProvider.js.map +1 -0
  17. package/lib/module/DraxScrollView.js +167 -0
  18. package/lib/module/DraxScrollView.js.map +1 -0
  19. package/lib/module/DraxSubprovider.js +21 -0
  20. package/lib/module/DraxSubprovider.js.map +1 -0
  21. package/lib/module/DraxView.js +348 -0
  22. package/lib/module/DraxView.js.map +1 -0
  23. package/lib/module/HoverLayer.js +152 -0
  24. package/lib/module/HoverLayer.js.map +1 -0
  25. package/lib/module/SortableBoardContainer.js +386 -0
  26. package/lib/module/SortableBoardContainer.js.map +1 -0
  27. package/lib/module/SortableBoardContext.js +6 -0
  28. package/lib/module/SortableBoardContext.js.map +1 -0
  29. package/lib/module/SortableContainer.js +571 -0
  30. package/lib/module/SortableContainer.js.map +1 -0
  31. package/lib/module/SortableItem.js +226 -0
  32. package/lib/module/SortableItem.js.map +1 -0
  33. package/lib/module/SortableItemContext.js +38 -0
  34. package/lib/module/SortableItemContext.js.map +1 -0
  35. package/lib/module/compat/detectVersion.js +19 -0
  36. package/lib/module/compat/detectVersion.js.map +1 -0
  37. package/lib/module/compat/index.js +5 -0
  38. package/lib/module/compat/index.js.map +1 -0
  39. package/lib/module/compat/types.js +4 -0
  40. package/lib/module/compat/types.js.map +1 -0
  41. package/lib/module/compat/useDraxPanGesture.js +94 -0
  42. package/lib/module/compat/useDraxPanGesture.js.map +1 -0
  43. package/lib/module/hooks/index.js +5 -0
  44. package/lib/module/hooks/index.js.map +1 -0
  45. package/lib/module/hooks/useCallbackDispatch.js +688 -0
  46. package/lib/module/hooks/useCallbackDispatch.js.map +1 -0
  47. package/lib/module/hooks/useDragGesture.js +240 -0
  48. package/lib/module/hooks/useDragGesture.js.map +1 -0
  49. package/lib/module/hooks/useDraxContext.js +12 -0
  50. package/lib/module/hooks/useDraxContext.js.map +1 -0
  51. package/lib/module/hooks/useDraxId.js +13 -0
  52. package/lib/module/hooks/useDraxId.js.map +1 -0
  53. package/lib/module/hooks/useDraxMethods.js +73 -0
  54. package/lib/module/hooks/useDraxMethods.js.map +1 -0
  55. package/lib/module/hooks/useDraxScrollHandler.js +97 -0
  56. package/lib/module/hooks/useDraxScrollHandler.js.map +1 -0
  57. package/lib/module/hooks/useSortableBoard.js +37 -0
  58. package/lib/module/hooks/useSortableBoard.js.map +1 -0
  59. package/lib/module/hooks/useSortableList.js +988 -0
  60. package/lib/module/hooks/useSortableList.js.map +1 -0
  61. package/lib/module/hooks/useSpatialIndex.js +283 -0
  62. package/lib/module/hooks/useSpatialIndex.js.map +1 -0
  63. package/lib/module/hooks/useViewStyles.js +158 -0
  64. package/lib/module/hooks/useViewStyles.js.map +1 -0
  65. package/lib/module/hooks/useWebScrollFreeze.js +52 -0
  66. package/lib/module/hooks/useWebScrollFreeze.js.map +1 -0
  67. package/lib/module/index.js +37 -0
  68. package/lib/module/index.js.map +1 -0
  69. package/lib/module/math.js +294 -0
  70. package/lib/module/math.js.map +1 -0
  71. package/lib/module/package.json +1 -0
  72. package/lib/module/params.js +88 -0
  73. package/lib/module/params.js.map +1 -0
  74. package/lib/module/types.js +215 -0
  75. package/lib/module/types.js.map +1 -0
  76. package/lib/typescript/package.json +1 -0
  77. package/lib/typescript/src/DebugOverlay.d.ts +17 -0
  78. package/lib/typescript/src/DebugOverlay.d.ts.map +1 -0
  79. package/lib/typescript/src/Drax.d.ts +28 -0
  80. package/lib/typescript/src/Drax.d.ts.map +1 -0
  81. package/lib/typescript/src/DraxContext.d.ts +3 -0
  82. package/lib/typescript/src/DraxContext.d.ts.map +1 -0
  83. package/lib/typescript/src/DraxHandle.d.ts +25 -0
  84. package/lib/typescript/src/DraxHandle.d.ts.map +1 -0
  85. package/lib/typescript/src/DraxHandleContext.d.ts +12 -0
  86. package/lib/typescript/src/DraxHandleContext.d.ts.map +1 -0
  87. package/lib/typescript/src/DraxList.d.ts +66 -0
  88. package/lib/typescript/src/DraxList.d.ts.map +1 -0
  89. package/lib/typescript/src/DraxProvider.d.ts +4 -0
  90. package/lib/typescript/src/DraxProvider.d.ts.map +1 -0
  91. package/lib/typescript/src/DraxScrollView.d.ts +7 -0
  92. package/lib/typescript/src/DraxScrollView.d.ts.map +1 -0
  93. package/lib/typescript/src/DraxSubprovider.d.ts +4 -0
  94. package/lib/typescript/src/DraxSubprovider.d.ts.map +1 -0
  95. package/lib/typescript/src/DraxView.d.ts +4 -0
  96. package/lib/typescript/src/DraxView.d.ts.map +1 -0
  97. package/lib/typescript/src/HoverLayer.d.ts +38 -0
  98. package/lib/typescript/src/HoverLayer.d.ts.map +1 -0
  99. package/lib/typescript/src/SortableBoardContainer.d.ts +11 -0
  100. package/lib/typescript/src/SortableBoardContainer.d.ts.map +1 -0
  101. package/lib/typescript/src/SortableBoardContext.d.ts +4 -0
  102. package/lib/typescript/src/SortableBoardContext.d.ts.map +1 -0
  103. package/lib/typescript/src/SortableContainer.d.ts +13 -0
  104. package/lib/typescript/src/SortableContainer.d.ts.map +1 -0
  105. package/lib/typescript/src/SortableItem.d.ts +14 -0
  106. package/lib/typescript/src/SortableItem.d.ts.map +1 -0
  107. package/lib/typescript/src/SortableItemContext.d.ts +37 -0
  108. package/lib/typescript/src/SortableItemContext.d.ts.map +1 -0
  109. package/lib/typescript/src/compat/detectVersion.d.ts +2 -0
  110. package/lib/typescript/src/compat/detectVersion.d.ts.map +1 -0
  111. package/lib/typescript/src/compat/index.d.ts +4 -0
  112. package/lib/typescript/src/compat/index.d.ts.map +1 -0
  113. package/lib/typescript/src/compat/types.d.ts +33 -0
  114. package/lib/typescript/src/compat/types.d.ts.map +1 -0
  115. package/lib/typescript/src/compat/useDraxPanGesture.d.ts +8 -0
  116. package/lib/typescript/src/compat/useDraxPanGesture.d.ts.map +1 -0
  117. package/lib/typescript/src/hooks/index.d.ts +3 -0
  118. package/lib/typescript/src/hooks/index.d.ts.map +1 -0
  119. package/lib/typescript/src/hooks/useCallbackDispatch.d.ts +40 -0
  120. package/lib/typescript/src/hooks/useCallbackDispatch.d.ts.map +1 -0
  121. package/lib/typescript/src/hooks/useDragGesture.d.ts +17 -0
  122. package/lib/typescript/src/hooks/useDragGesture.d.ts.map +1 -0
  123. package/lib/typescript/src/hooks/useDraxContext.d.ts +2 -0
  124. package/lib/typescript/src/hooks/useDraxContext.d.ts.map +1 -0
  125. package/{build → lib/typescript/src}/hooks/useDraxId.d.ts +1 -0
  126. package/lib/typescript/src/hooks/useDraxId.d.ts.map +1 -0
  127. package/lib/typescript/src/hooks/useDraxMethods.d.ts +13 -0
  128. package/lib/typescript/src/hooks/useDraxMethods.d.ts.map +1 -0
  129. package/lib/typescript/src/hooks/useDraxScrollHandler.d.ts +27 -0
  130. package/lib/typescript/src/hooks/useDraxScrollHandler.d.ts.map +1 -0
  131. package/lib/typescript/src/hooks/useSortableBoard.d.ts +10 -0
  132. package/lib/typescript/src/hooks/useSortableBoard.d.ts.map +1 -0
  133. package/lib/typescript/src/hooks/useSortableList.d.ts +11 -0
  134. package/lib/typescript/src/hooks/useSortableList.d.ts.map +1 -0
  135. package/lib/typescript/src/hooks/useSpatialIndex.d.ts +22 -0
  136. package/lib/typescript/src/hooks/useSpatialIndex.d.ts.map +1 -0
  137. package/lib/typescript/src/hooks/useViewStyles.d.ts +183 -0
  138. package/lib/typescript/src/hooks/useViewStyles.d.ts.map +1 -0
  139. package/lib/typescript/src/hooks/useWebScrollFreeze.d.ts +14 -0
  140. package/lib/typescript/src/hooks/useWebScrollFreeze.d.ts.map +1 -0
  141. package/lib/typescript/src/index.d.ts +25 -0
  142. package/lib/typescript/src/index.d.ts.map +1 -0
  143. package/lib/typescript/src/math.d.ts +76 -0
  144. package/lib/typescript/src/math.d.ts.map +1 -0
  145. package/{build → lib/typescript/src}/params.d.ts +13 -9
  146. package/lib/typescript/src/params.d.ts.map +1 -0
  147. package/lib/typescript/src/types.d.ts +756 -0
  148. package/lib/typescript/src/types.d.ts.map +1 -0
  149. package/package.json +164 -34
  150. package/src/DebugOverlay.tsx +140 -0
  151. package/src/Drax.ts +33 -0
  152. package/src/DraxContext.ts +8 -0
  153. package/src/DraxHandle.tsx +52 -0
  154. package/src/DraxHandleContext.ts +15 -0
  155. package/src/DraxList.tsx +181 -0
  156. package/src/DraxProvider.tsx +224 -0
  157. package/src/DraxScrollView.tsx +180 -0
  158. package/src/DraxSubprovider.tsx +22 -0
  159. package/src/DraxView.tsx +430 -0
  160. package/src/HoverLayer.tsx +167 -0
  161. package/src/SortableBoardContainer.tsx +439 -0
  162. package/src/SortableBoardContext.ts +6 -0
  163. package/src/SortableContainer.tsx +650 -0
  164. package/src/SortableItem.tsx +264 -0
  165. package/src/SortableItemContext.ts +46 -0
  166. package/src/compat/detectVersion.ts +17 -0
  167. package/src/compat/index.ts +7 -0
  168. package/src/compat/types.ts +35 -0
  169. package/src/compat/useDraxPanGesture.ts +112 -0
  170. package/src/hooks/index.ts +2 -0
  171. package/src/hooks/useCallbackDispatch.tsx +830 -0
  172. package/src/hooks/useDragGesture.ts +273 -0
  173. package/src/hooks/useDraxContext.ts +11 -0
  174. package/src/hooks/useDraxId.ts +11 -0
  175. package/src/hooks/useDraxMethods.ts +71 -0
  176. package/src/hooks/useDraxScrollHandler.ts +121 -0
  177. package/src/hooks/useSortableBoard.ts +44 -0
  178. package/src/hooks/useSortableList.ts +1063 -0
  179. package/src/hooks/useSpatialIndex.ts +336 -0
  180. package/src/hooks/useViewStyles.ts +180 -0
  181. package/src/hooks/useWebScrollFreeze.ts +60 -0
  182. package/src/index.ts +111 -0
  183. package/src/math.ts +333 -0
  184. package/src/params.ts +74 -0
  185. package/src/types.ts +933 -0
  186. package/.editorconfig +0 -15
  187. package/.eslintrc.js +0 -4
  188. package/.prettierrc +0 -16
  189. package/CHANGELOG.md +0 -270
  190. package/CODE-OF-CONDUCT.md +0 -85
  191. package/CONTRIBUTING.md +0 -15
  192. package/FUNDING.yml +0 -4
  193. package/build/AllHoverViews.d.ts +0 -0
  194. package/build/AllHoverViews.js +0 -30
  195. package/build/DraxContext.d.ts +0 -2
  196. package/build/DraxContext.js +0 -6
  197. package/build/DraxList.d.ts +0 -8
  198. package/build/DraxList.js +0 -512
  199. package/build/DraxListItem.d.ts +0 -7
  200. package/build/DraxListItem.js +0 -121
  201. package/build/DraxProvider.d.ts +0 -2
  202. package/build/DraxProvider.js +0 -704
  203. package/build/DraxScrollView.d.ts +0 -6
  204. package/build/DraxScrollView.js +0 -136
  205. package/build/DraxSubprovider.d.ts +0 -3
  206. package/build/DraxSubprovider.js +0 -18
  207. package/build/DraxView.d.ts +0 -8
  208. package/build/DraxView.js +0 -93
  209. package/build/HoverView.d.ts +0 -8
  210. package/build/HoverView.js +0 -40
  211. package/build/PanGestureDetector.d.ts +0 -3
  212. package/build/PanGestureDetector.js +0 -49
  213. package/build/hooks/index.d.ts +0 -4
  214. package/build/hooks/index.js +0 -11
  215. package/build/hooks/useContent.d.ts +0 -23
  216. package/build/hooks/useContent.js +0 -212
  217. package/build/hooks/useDraxContext.d.ts +0 -1
  218. package/build/hooks/useDraxContext.js +0 -13
  219. package/build/hooks/useDraxId.js +0 -13
  220. package/build/hooks/useDraxProtocol.d.ts +0 -5
  221. package/build/hooks/useDraxProtocol.js +0 -32
  222. package/build/hooks/useDraxRegistry.d.ts +0 -78
  223. package/build/hooks/useDraxRegistry.js +0 -714
  224. package/build/hooks/useDraxScrollHandler.d.ts +0 -25
  225. package/build/hooks/useDraxScrollHandler.js +0 -89
  226. package/build/hooks/useDraxState.d.ts +0 -10
  227. package/build/hooks/useDraxState.js +0 -132
  228. package/build/hooks/useMeasurements.d.ts +0 -9
  229. package/build/hooks/useMeasurements.js +0 -119
  230. package/build/hooks/useStatus.d.ts +0 -11
  231. package/build/hooks/useStatus.js +0 -96
  232. package/build/index.d.ts +0 -9
  233. package/build/index.js +0 -33
  234. package/build/math.d.ts +0 -22
  235. package/build/math.js +0 -68
  236. package/build/params.js +0 -27
  237. package/build/transform.d.ts +0 -11
  238. package/build/transform.js +0 -59
  239. package/build/types.d.ts +0 -807
  240. package/build/types.js +0 -46
  241. package/docs/concept.md +0 -79
  242. package/docs/images/color-drag-drop.gif +0 -0
  243. package/docs/images/deck-cards.gif +0 -0
  244. package/docs/images/drag-drop-events.jpg +0 -0
  245. package/docs/images/knight-moves.gif +0 -0
  246. package/docs/images/reorderable-list.gif +0 -0
package/.editorconfig DELETED
@@ -1,15 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- end_of_line = lf
5
- insert_final_newline = true
6
-
7
- # Matches multiple files with brace expansion notation
8
- [*.{js,jsx,ts,tsx}]
9
- charset = utf-8
10
- indent_style = tab
11
- indent_size = 4
12
- trim_trailing_whitespace = true
13
-
14
- [*.md]
15
- trim_trailing_whitespace = false
package/.eslintrc.js DELETED
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- extends: ['universe/web', 'universe/native'],
3
- plugins: ['prettier'],
4
- };
package/.prettierrc DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "arrowParens": "avoid",
3
- "bracketSameLine": false,
4
- "printWidth": 120,
5
- "useTabs": false,
6
- "semi": true,
7
- "singleQuote": true,
8
- "trailingComma": "es5",
9
- "bracketSpacing": true,
10
- "rangeStart": 0,
11
- "rangeEnd": 9007199254740991,
12
- "requirePragma": false,
13
- "insertPragma": false,
14
- "proseWrap": "preserve",
15
- "endOfLine": "auto"
16
- }
package/CHANGELOG.md DELETED
@@ -1,270 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/).
6
-
7
- Changes marked as (BREAKING) may break your app logic. Changes marked as (BREAKING-TS) may break your app logic if you are explicitly using Drax's exported TypeScript type definitions in your code.
8
-
9
- ## [Unreleased]
10
- - Nothing yet
11
-
12
-
13
- ## [0.10.3] - 2022-09-06
14
-
15
- ### Fixed
16
- - Fix clipping sizes to properly take position into account (#151) - Thank you @FrancoisDupayrat!
17
-
18
- ## [0.10.2] - 2022-06-10
19
-
20
- ### Added
21
- - Allow overriding style of DraxProvider (#136)
22
-
23
- ## [0.10.1] - 2022-06-10
24
-
25
- ### Changed
26
- - Bump ansi-regex from 4.1.0 to 4.1.1 (dependabot)
27
- - Bump async from 2.6.3 to 2.6.4 (dependabot)
28
- - Bump cross-fetch from 3.1.4 to 3.1.5 (dependabot)
29
- - Bump minimist from 1.2.5 to 1.2.6 (dependabot)
30
- - Bump plist from 3.0.2 to 3.0.5 (dependabot)
31
- - Bump simple-plist from 1.1.1 to 1.3.1 (dependabot)
32
-
33
- ## [0.10.0] - 2022-06-10
34
-
35
- ### Changed
36
- - (BREAKING) Update requirement from RN 0.62 to RN 0.65
37
- - (BREAKING-TS) Remove Animated ViewStyle types which were needed as a workaround before
38
-
39
- ### Fixed
40
- - (BREAKING) Stop using removeListener method which was deprecated in RN 0.65 (#125)
41
-
42
- ## [0.9.3] - 2021-12-14
43
-
44
- ### Fixed
45
- - Fixed typo-based math error in auto-scroll logic (#126)
46
-
47
- ## [0.9.2] - 2021-12-08
48
-
49
- ### Fixed
50
- - Fixed typo-based math error in view measurement clipping logic (#124)
51
-
52
- ## [0.9.1] - 2021-11-03
53
-
54
- ### Changed
55
- - Apply `DraxScrollView`'s style to outer `DraxView` instead of inner `ScrollView` (#119)
56
- - Upgraded tmpl from 1.0.4 to 1.0.5 (dependabot)
57
-
58
- ## [0.9.0] - 2021-11-03
59
-
60
- ### Added
61
- - Forward underlying `ScrollView` ref in `DraxScrollView` (#117)
62
- - Forward underlying `FlatList` ref in `DraxList` (#118)
63
-
64
- ### Changed
65
- - Apply `DraxScrollView`'s style to outer `DraxView` instead of inner `ScrollView` (#119)
66
- - Elaborated on state of library and contributions in README
67
-
68
- ## [0.8.2] - 2021-09-07
69
-
70
- ### Added
71
- - Added `longPressDelay` prop to `DraxList` to override default (#59)
72
-
73
- ### Changed
74
- - Upgraded path-parse from 1.0.6 to 1.0.7 (dependabot)
75
-
76
- ## [0.8.1] - 2021-08-02
77
-
78
- ### Changed
79
- - Small change to `DraxList` ref array allocations to account for race conditions in registration/measurement causing shifts array to become wrong length (#103)
80
- - Upgraded devDependency react-native from ^0.64.0 to ^0.64.1 for security alert
81
-
82
- ## [0.8.0] - 2021-04-29
83
-
84
- ### Changed
85
- - (BREAKING) Rename `useDrax` to `useDraxContext`
86
- - Simplify DraxList rendering because Drax ids cannot be empty since 0.7.0
87
- - Bump y18n from 4.0.0 to 4.0.3 (dependabot)
88
- - (BREAKING-TS) Update `hover*Style` props to not include layout-related keys, to reflect reality
89
- - Merge hover view translate transform with any transform value specified in `hover*Style` props rather than replacing (#35)
90
- - Upgraded devDependency @types/node from ^14.11.8 to ^14.14.43
91
- - Upgraded devDependency @types/react-native from ^0.63.25 to ^0.64.4
92
- - Upgraded devDependency @typescript-eslint/eslint-plugin from ^4.4.0 to ^4.22.0
93
- - Upgraded devDependency @typescript-eslint/parser from ^4.4.0 to ^4.22.0
94
- - Upgraded devDependency eslint from ^7.10.0 to ^7.25.0
95
- - Upgraded devDependency eslint-config-airbnb-typescript from ^11.0.0 to ^12.3.1
96
- - Upgraded devDependency eslint-plugin-jsx-a11y from ^6.3.1 to ^6.4.1
97
- - Upgraded devDependency eslint-plugin-react from ^7.21.3 to ^7.23.2
98
- - Upgraded devDependency eslint-plugin-react-hooks from ^4.1.2 to ^4.2.0
99
- - Upgraded devDependency react from ^16.13.1 to ^17.0.2
100
- - Upgraded devDependency react-native from ^0.63.3 to ^0.64.0
101
- - Upgraded devDependency typescript from ^4.0.3 to ^4.2.4
102
- - Removed type workaround for `LongPressGestureHandlerGestureEvent`
103
-
104
- ### Fixed
105
- - Honor `onScroll` prop of `DraxList` (#63)
106
-
107
- ### Added
108
- - Added `itemsDraggable` prop to `DraxList` to allow explicitly disabling dragging of all items (#62)
109
- - Added `lockDragXPosition` and `lockDragYPositon` props to `DraxView` to allow locking drags to an axis (#65)
110
- - Added `lockItemDragsToMainAxis` prop to `DraxList` to allow locking dragged items to the main axis of a list (#65)
111
- - Added `flatListStyle` prop to `DraxList` to allow styling of underlying `FlatList` (#40)
112
- - Added `viewPropsExtrator` prop to `DraxList` to allow overriding `DraxView` props for specific items (#92)
113
-
114
- ## [0.7.2] - 2020-10-13
115
-
116
- ### Changed
117
- - Upgraded node-fetch indirect dependency from 2.6.0 to 2.6.1 for security
118
-
119
- ## [0.7.1] - 2020-10-12
120
-
121
- ### Changed
122
- - Upgraded lodash dependency from 4.17.15 to 4.17.19 for security
123
-
124
- ## [0.7.0] - 2020-10-12
125
-
126
- ### Fixed
127
- - (BREAKING) Stop calling getNode on Animated.View; requires React Native >=0.62.0 (#54)
128
- - Fixed various newly uncovered warnings/errors due to upgrades
129
-
130
- ### Changed
131
- - Changed internal logic so that views never have empty Drax ids even for a moment
132
- - Moved useDrax into hooks directory
133
- - (BREAKING) Changed peerDependency react-native from * to >=0.62.0
134
- - (BREAKING) Changed peerDependency react-native-gesture-handler from ^1.5.0 to >=1.8.0
135
- - Removed dependency uuid
136
- - Removed devDependency @types/uuid
137
- - Removed devDependency @types/react
138
- - Removed devDependency @babel/core
139
- - Removed devDependency @babel/runtime
140
- - Removed devDependency hoist-non-react-statics
141
- - Upgraded devDependency @types/node from ^14.0.5 to ^14.11.8
142
- - Upgraded devDependency @types/react-native from ^0.60.25 to ^0.63.25
143
- - Upgraded devDependency react from ^16.9.0 to ^16.13.1
144
- - Upgraded devDependency react-native from ^0.62.2 to ^0.63.3
145
- - Upgraded devDependency typescript from ^3.7.2 to ^4.0.3
146
- - Upgraded devDependency eslint from ^6.7.0 to ^7.10.0
147
- - Upgraded devDependency @typescript-eslint/eslint-plugin from ^2.8.0 to ^4.4.0
148
- - Upgraded devDependency @typescript-eslint/parser from ^2.8.0 to ^4.4.0
149
- - Upgraded devDependency eslint-config-airbnb-typescript from ^6.3.0 to ^11.0.0
150
- - Upgraded devDependency eslint-plugin-import from ^2.18.2 to ^2.22.1
151
- - Upgraded devDependency eslint-plugin-jsx-a11y from ^6.2.3 to ^6.3.1
152
- - Upgraded devDependency eslint-plugin-react from ^7.16.0 to ^7.21.3
153
- - Upgraded devDependency eslint-plugin-react-hooks from ^2.3.0 to ^4.1.2
154
- - Upgraded devDependency eslint-plugin-react-native from ^3.8.1 to ^3.10.0
155
- - Upgraded devDependency react-native-gesture-handler from ^1.5.0 to ^1.8.0
156
- - Changed TypeScript output directory from lib to build
157
-
158
- ### Added
159
- - Added lint script to package.json
160
-
161
- ## [0.6.0] - 2020-06-16
162
- ### Changed
163
- - Speed up dragging animation to be at least 60fps (#29)
164
-
165
- ### Fixed
166
- - Implement `onMonitorDragStart` in DraxView (#22)
167
- - Fix regression with DraxList reorder item snapback position (#46)
168
-
169
- ### Added
170
- - New DraxList item drag lifecycle callbacks: `onItemDragStart`, `onItemDragPositionChange`, `onItemDragEnd` (#25)
171
- - New DraxView prop `snapbackAnimator` for custom snapback animations (#28)
172
-
173
- ## [0.5.5] - 2020-06-09
174
- ### Changed
175
- - Bump devDependency react-native to 0.62 to address logkitty vulnerability (dependabot; #30)
176
-
177
- ## [0.5.4] - 2020-06-09
178
- ### Changed
179
- - Fixed bug with DraxList item shift values when dragging outside list (#27)
180
-
181
- ## [0.5.3] - 2020-05-23
182
- ### Added
183
- - Added devDependency @types/node@^14.0.5
184
-
185
- ### Changed
186
- - Bump library versions (dependabot)
187
-
188
- ## [0.5.2] - 2020-03-16
189
- ### Changed
190
- - Bump minimist from 1.2.0 to 1.2.5 (dependabot)
191
-
192
- ## [0.5.1] - 2020-03-16
193
- ### Changed
194
- - Bump acorn from 7.1.0 to 7.1.1 (dependabot)
195
-
196
- ## [0.5.0] - 2020-01-28
197
- ### Added
198
- - Added .editorconfig file to render tabs with indent size 4 on GitHub
199
- - (BREAKING-TS) Drag/drop lifecycle events include supplemental data such as dragOffset/grabOffset (#17)
200
- - Added explanation of BREAKING and BREAKING-TS to changelog.
201
- - (BREAKING-TS) Add `dragTranslation` and `dragTranslationRatio` to drag/drop lifecycle event payloads and view states (#23)
202
-
203
- ### Changed
204
- - (BREAKING) All `Animated.ValueXY`s except `hoverPosition` are now `Position`s (#18)
205
- - (BREAKING) Drag/drop lifecycle event payloads have been unified for consistency (#20)
206
- - (BREAKING) Renamed `screenPosition` to `dragAbsolutePosition` (#19)
207
-
208
- ### Fixed
209
- - Improved `isPosition` logic to avoid potential TypeErrors
210
- - Call `onMonitorDragEnd` even if drag is not cancelled (#21)
211
-
212
- ## [0.4.2] - 2020-01-23
213
- ### Added
214
- - Added `onSnapbackEnd` property to DraxView (#16)
215
-
216
- ## [0.4.1] - 2020-01-22
217
- ### Added
218
- - Include relative position data in receiver objects for non-receiver events (#15)
219
- - Added screenshots to README
220
- - Created initial CHANGELOG
221
-
222
- ### Fixed
223
- - Fixed documentation typos
224
-
225
- ## [0.4.0] - 2020-01-13
226
- ### Added
227
- - Added Basic Usage and Caveats to README
228
- - Added link to example project to README
229
-
230
- ### Changed
231
- - (BREAKING) Changed default `longPressDelay` from 250ms to 0ms for DraxView (#11)
232
- - Updated copyright year range
233
-
234
- ## [0.3.6] - 2020-01-12
235
- ### Fixed
236
- - Fixed problem with view measurements after Dimensions change (#9)
237
-
238
- ## [0.3.5] - 2020-01-12
239
- ### Fixed
240
- - DraxProvider now respects parent padding (#10)
241
-
242
- *(More history to be added later?)*
243
-
244
- [Unreleased]: https://github.com/nuclearpasta/react-native-drax/compare/v0.10.3...HEAD
245
- [0.10.3]: https://github.com/nuclearpasta/react-native-drax/compare/v0.10.2...v0.10.3
246
- [0.10.2]: https://github.com/nuclearpasta/react-native-drax/compare/v0.10.1...v0.10.2
247
- [0.10.1]: https://github.com/nuclearpasta/react-native-drax/compare/v0.10.0...v0.10.1
248
- [0.10.0]: https://github.com/nuclearpasta/react-native-drax/compare/v0.9.3...v0.10.0
249
- [0.9.3]: https://github.com/nuclearpasta/react-native-drax/compare/v0.9.2...v0.9.3
250
- [0.9.2]: https://github.com/nuclearpasta/react-native-drax/compare/v0.9.1...v0.9.2
251
- [0.9.1]: https://github.com/nuclearpasta/react-native-drax/compare/v0.9.0...v0.9.1
252
- [0.9.0]: https://github.com/nuclearpasta/react-native-drax/compare/v0.8.2...v0.9.0
253
- [0.8.2]: https://github.com/nuclearpasta/react-native-drax/compare/v0.8.1...v0.8.2
254
- [0.8.1]: https://github.com/nuclearpasta/react-native-drax/compare/v0.8.0...v0.8.1
255
- [0.8.0]: https://github.com/nuclearpasta/react-native-drax/compare/v0.7.2...v0.8.0
256
- [0.7.2]: https://github.com/nuclearpasta/react-native-drax/compare/v0.7.1...v0.7.2
257
- [0.7.1]: https://github.com/nuclearpasta/react-native-drax/compare/v0.7.0...v0.7.1
258
- [0.7.0]: https://github.com/nuclearpasta/react-native-drax/compare/v0.6.0...v0.7.0
259
- [0.6.0]: https://github.com/nuclearpasta/react-native-drax/compare/v0.5.5...v0.6.0
260
- [0.5.5]: https://github.com/nuclearpasta/react-native-drax/compare/v0.5.4...v0.5.5
261
- [0.5.4]: https://github.com/nuclearpasta/react-native-drax/compare/v0.5.3...v0.5.4
262
- [0.5.3]: https://github.com/nuclearpasta/react-native-drax/compare/v0.5.2...v0.5.3
263
- [0.5.2]: https://github.com/nuclearpasta/react-native-drax/compare/v0.5.1...v0.5.2
264
- [0.5.1]: https://github.com/nuclearpasta/react-native-drax/compare/v0.5.0...v0.5.1
265
- [0.5.0]: https://github.com/nuclearpasta/react-native-drax/compare/v0.4.2...v0.5.0
266
- [0.4.2]: https://github.com/nuclearpasta/react-native-drax/compare/v0.4.1...v0.4.2
267
- [0.4.1]: https://github.com/nuclearpasta/react-native-drax/compare/v0.4.0...v0.4.1
268
- [0.4.0]: https://github.com/nuclearpasta/react-native-drax/compare/v0.3.6...v0.4.0
269
- [0.3.6]: https://github.com/nuclearpasta/react-native-drax/compare/v0.3.5...v0.3.6
270
- [0.3.5]: https://github.com/nuclearpasta/react-native-drax/compare/v0.3.4...v0.3.5
@@ -1,85 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <drax@proxicoach.com>. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the project community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
85
-
package/CONTRIBUTING.md DELETED
@@ -1,15 +0,0 @@
1
- # Contribution Guidelines
2
-
3
- [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE-OF-CONDUCT.md)
4
-
5
- Thank you for considering contributing to Drax! Please note that this project is released with a [Contributor Code of Conduct](CODE-OF-CONDUCT.md). By participating in this project you agree to abide by its terms.
6
-
7
- If you've found a bug, you're having trouble with the documentation, or you have a feature request, please open an issue with the relevant information.
8
-
9
- If you're interested in making a non-trivial contribution, please first discuss the change you wish to make via GitHub issue, email, or any other method with the maintainers. We respect your time and energy, and we would like you to feel secure before expending significant effort.
10
-
11
- Drax's code may appear complex, but project contributions can come in forms other than code commits! Anything that improves the quality of the library or helps its user community is a contribution. For example, enhancing the documentation, creating cool usage examples, and providing helpful input on issues are other ways to pitch in.
12
-
13
- We understand how frustrating it can be to open an issue or pull request and not receive timely feedback. Please keep in mind that this project is maintained by volunteer effort, and we will do our best to reply promptly, according to our own capacity. For small PRs and simple issues, we'll try to reply within a few days to a week. Larger changes should be discussed in advance, as mentioned above, and they may take longer. Bug fixes and feature requests will be prioritized by gauging implementation difficulty and how widely applicable they are to the community, and they'll be addressed as availability allows.
14
-
15
- The library does not currently have any automated tests or code review checks. We're not averse to the idea; we simply haven't had the resources to put toward it yet. This means that code changes, particularly large ones, may take additional time to review manually. If the library's automation is something you're interested in improving, the maintainers welcome that discussion.
package/FUNDING.yml DELETED
@@ -1,4 +0,0 @@
1
- # repo: nuclearpasta/react-native-drax
2
- # filename: FUNDING.yml
3
-
4
- github: lafiosca
File without changes
@@ -1,30 +0,0 @@
1
- "use strict";
2
- // import React, { useMemo } from "react";
3
- //
4
- // import { ReanimatedHoverView } from "./HoverView";
5
- // import { useDraxContext } from "./hooks";
6
- //
7
- // export const AllHoverViews = ({ allViewIds }: { allViewIds: string[] }) => {
8
- // const { getHoverItems } = useDraxContext();
9
- //
10
- // const hoverViews = useMemo(
11
- // () => allViewIds && getHoverItems(allViewIds),
12
- // [allViewIds, getHoverItems],
13
- // );
14
- // // const updateHoverViews = () => {
15
- // // console.log('getAllViewIds()', allViewIds);
16
- // // console.log('getHoverItems(getAllViewIds())', allViewIds && getHoverItems(allViewIds));
17
- // // allViewIds && setAllHoverViews(getHoverItems(allViewIds));
18
- // // };
19
- // return hoverViews?.map(
20
- // (viewData, index) =>
21
- // viewData?.protocol.hoverPosition?.value && (
22
- // <ReanimatedHoverView
23
- // key={viewData.id || index}
24
- // hoverPosition={viewData?.protocol.hoverPosition}
25
- // scrollPosition={viewData?.scrollPosition}
26
- // {...(viewData?.protocol || {})}
27
- // />
28
- // ),
29
- // );
30
- // };
@@ -1,2 +0,0 @@
1
- import { DraxContextValue } from './types';
2
- export declare const DraxContext: import("react").Context<DraxContextValue | undefined>;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DraxContext = void 0;
4
- const react_1 = require("react");
5
- exports.DraxContext = (0, react_1.createContext)(undefined);
6
- exports.DraxContext.displayName = 'Drax';
@@ -1,8 +0,0 @@
1
- import { PropsWithChildren, ReactNode, Ref } from 'react';
2
- import { FlatList } from 'react-native';
3
- import { DraxListProps } from './types';
4
- type DraxListType = <T extends unknown>(props: PropsWithChildren<DraxListProps<T>> & {
5
- ref?: Ref<FlatList>;
6
- }) => ReactNode;
7
- export declare const DraxList: DraxListType;
8
- export {};