@shopify/flash-list 2.0.0 → 2.0.2-rc.1

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 (289) hide show
  1. package/README.md +97 -27
  2. package/RNFlashList.podspec +37 -0
  3. package/android/build.gradle +89 -0
  4. package/android/src/main/AndroidManifest.xml +3 -0
  5. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutShadow.kt +105 -0
  6. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt +158 -0
  7. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutViewManager.kt +70 -0
  8. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/BlankAreaEvent.kt +29 -0
  9. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainer.java +16 -0
  10. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerImpl.kt +16 -0
  11. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerManager.kt +34 -0
  12. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/FlashListPackage.kt +19 -0
  13. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerDelegate.java +47 -0
  14. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerInterface.java +21 -0
  15. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerDelegate.java +32 -0
  16. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerInterface.java +16 -0
  17. package/android/src/test/java/com/shopify/reactnative/flash_list/AutoLayoutShadowTest.kt +147 -0
  18. package/android/src/test/java/com/shopify/reactnative/flash_list/models/Rect.kt +61 -0
  19. package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestCollection.kt +6 -0
  20. package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestDataModel.kt +8 -0
  21. package/android/src/test/resources/LayoutTestData.json +788 -0
  22. package/dist/AnimatedFlashList.js +2 -2
  23. package/dist/AnimatedFlashList.js.map +1 -1
  24. package/dist/FlashList.d.ts +167 -1
  25. package/dist/FlashList.d.ts.map +1 -1
  26. package/dist/FlashList.js +595 -3
  27. package/dist/FlashList.js.map +1 -1
  28. package/dist/FlashListProps.d.ts +63 -2
  29. package/dist/FlashListProps.d.ts.map +1 -1
  30. package/dist/FlashListProps.js.map +1 -1
  31. package/dist/GridLayoutProviderWithProps.d.ts +42 -0
  32. package/dist/GridLayoutProviderWithProps.d.ts.map +1 -0
  33. package/dist/GridLayoutProviderWithProps.js +114 -0
  34. package/dist/GridLayoutProviderWithProps.js.map +1 -0
  35. package/dist/MasonryFlashList.d.ts +51 -0
  36. package/dist/MasonryFlashList.d.ts.map +1 -0
  37. package/dist/MasonryFlashList.js +252 -0
  38. package/dist/MasonryFlashList.js.map +1 -0
  39. package/dist/PureComponentWrapper.d.ts +22 -0
  40. package/dist/PureComponentWrapper.d.ts.map +1 -0
  41. package/dist/PureComponentWrapper.js +37 -0
  42. package/dist/PureComponentWrapper.js.map +1 -0
  43. package/dist/__tests__/ContentContainerUtils.test.d.ts +2 -0
  44. package/dist/__tests__/ContentContainerUtils.test.d.ts.map +1 -0
  45. package/dist/__tests__/ContentContainerUtils.test.js +85 -0
  46. package/dist/__tests__/ContentContainerUtils.test.js.map +1 -0
  47. package/dist/__tests__/FlashList.test.d.ts +2 -0
  48. package/dist/__tests__/FlashList.test.d.ts.map +1 -0
  49. package/dist/__tests__/FlashList.test.js +902 -0
  50. package/dist/__tests__/FlashList.test.js.map +1 -0
  51. package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts +2 -0
  52. package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts.map +1 -0
  53. package/dist/__tests__/GridLayoutProviderWithProps.test.js +143 -0
  54. package/dist/__tests__/GridLayoutProviderWithProps.test.js.map +1 -0
  55. package/dist/__tests__/MasonryFlashList.test.d.ts +2 -0
  56. package/dist/__tests__/MasonryFlashList.test.d.ts.map +1 -0
  57. package/dist/__tests__/MasonryFlashList.test.js +254 -0
  58. package/dist/__tests__/MasonryFlashList.test.js.map +1 -0
  59. package/dist/__tests__/PlatformHelper.web.test.d.ts +2 -0
  60. package/dist/__tests__/PlatformHelper.web.test.d.ts.map +1 -0
  61. package/dist/__tests__/PlatformHelper.web.test.js +33 -0
  62. package/dist/__tests__/PlatformHelper.web.test.js.map +1 -0
  63. package/dist/__tests__/ViewabilityHelper.test.js +4 -3
  64. package/dist/__tests__/ViewabilityHelper.test.js.map +1 -1
  65. package/dist/__tests__/helpers/mountFlashList.d.ts +19 -0
  66. package/dist/__tests__/helpers/mountFlashList.d.ts.map +1 -0
  67. package/dist/__tests__/helpers/mountFlashList.js +44 -0
  68. package/dist/__tests__/helpers/mountFlashList.js.map +1 -0
  69. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts +18 -0
  70. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts.map +1 -0
  71. package/dist/__tests__/helpers/mountMasonryFlashList.js +49 -0
  72. package/dist/__tests__/helpers/mountMasonryFlashList.js.map +1 -0
  73. package/dist/__tests__/useBlankAreaTracker.test.d.ts +2 -0
  74. package/dist/__tests__/useBlankAreaTracker.test.d.ts.map +1 -0
  75. package/dist/__tests__/useBlankAreaTracker.test.js +179 -0
  76. package/dist/__tests__/useBlankAreaTracker.test.js.map +1 -0
  77. package/dist/benchmark/JSFPSMonitor.d.ts.map +1 -1
  78. package/dist/benchmark/JSFPSMonitor.js +1 -2
  79. package/dist/benchmark/JSFPSMonitor.js.map +1 -1
  80. package/dist/benchmark/useBenchmark.d.ts +4 -2
  81. package/dist/benchmark/useBenchmark.d.ts.map +1 -1
  82. package/dist/benchmark/useBenchmark.js +24 -12
  83. package/dist/benchmark/useBenchmark.js.map +1 -1
  84. package/dist/benchmark/useBlankAreaTracker.d.ts +34 -0
  85. package/dist/benchmark/useBlankAreaTracker.d.ts.map +1 -0
  86. package/dist/benchmark/useBlankAreaTracker.js +66 -0
  87. package/dist/benchmark/useBlankAreaTracker.js.map +1 -0
  88. package/dist/benchmark/useFlatListBenchmark.d.ts.map +1 -1
  89. package/dist/benchmark/useFlatListBenchmark.js +1 -2
  90. package/dist/benchmark/useFlatListBenchmark.js.map +1 -1
  91. package/dist/enableNewCore.d.ts +3 -0
  92. package/dist/enableNewCore.d.ts.map +1 -0
  93. package/dist/enableNewCore.js +25 -0
  94. package/dist/enableNewCore.js.map +1 -0
  95. package/dist/errors/CustomError.d.ts +8 -0
  96. package/dist/errors/CustomError.d.ts.map +1 -0
  97. package/dist/errors/CustomError.js +14 -0
  98. package/dist/errors/CustomError.js.map +1 -0
  99. package/dist/errors/ExceptionList.d.ts +24 -0
  100. package/dist/errors/ExceptionList.d.ts.map +1 -0
  101. package/dist/errors/ExceptionList.js +26 -0
  102. package/dist/errors/ExceptionList.js.map +1 -0
  103. package/dist/errors/Warnings.d.ts +9 -0
  104. package/dist/errors/Warnings.d.ts.map +1 -0
  105. package/dist/errors/Warnings.js +13 -0
  106. package/dist/errors/Warnings.js.map +1 -0
  107. package/dist/index.d.ts +9 -3
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +29 -7
  110. package/dist/index.js.map +1 -1
  111. package/dist/native/auto-layout/AutoLayoutView.d.ts +22 -0
  112. package/dist/native/auto-layout/AutoLayoutView.d.ts.map +1 -0
  113. package/dist/native/auto-layout/AutoLayoutView.js +48 -0
  114. package/dist/native/auto-layout/AutoLayoutView.js.map +1 -0
  115. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts +4 -0
  116. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts.map +1 -0
  117. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js +6 -0
  118. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js.map +1 -0
  119. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts +5 -0
  120. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts.map +1 -0
  121. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts +4 -0
  122. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts.map +1 -0
  123. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js +6 -0
  124. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js.map +1 -0
  125. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js +6 -0
  126. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js.map +1 -0
  127. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts +16 -0
  128. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts.map +1 -0
  129. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js +3 -0
  130. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js.map +1 -0
  131. package/dist/native/cell-container/CellContainer.android.d.ts +6 -0
  132. package/dist/native/cell-container/CellContainer.android.d.ts.map +1 -0
  133. package/dist/native/cell-container/CellContainer.android.js +9 -0
  134. package/dist/native/cell-container/CellContainer.android.js.map +1 -0
  135. package/dist/native/cell-container/CellContainer.d.ts +8 -0
  136. package/dist/native/cell-container/CellContainer.d.ts.map +1 -0
  137. package/dist/native/cell-container/CellContainer.ios.d.ts +6 -0
  138. package/dist/native/cell-container/CellContainer.ios.d.ts.map +1 -0
  139. package/dist/native/cell-container/CellContainer.ios.js +9 -0
  140. package/dist/native/cell-container/CellContainer.ios.js.map +1 -0
  141. package/dist/native/cell-container/CellContainer.js +11 -0
  142. package/dist/native/cell-container/CellContainer.js.map +1 -0
  143. package/dist/native/cell-container/CellContainer.web.d.ts +7 -0
  144. package/dist/native/cell-container/CellContainer.web.d.ts.map +1 -0
  145. package/dist/native/cell-container/CellContainer.web.js +13 -0
  146. package/dist/native/cell-container/CellContainer.web.js.map +1 -0
  147. package/dist/native/config/PlatformHelper.android.d.ts +22 -1
  148. package/dist/native/config/PlatformHelper.android.d.ts.map +1 -1
  149. package/dist/native/config/PlatformHelper.android.js +16 -1
  150. package/dist/native/config/PlatformHelper.android.js.map +1 -1
  151. package/dist/native/config/PlatformHelper.d.ts +22 -1
  152. package/dist/native/config/PlatformHelper.d.ts.map +1 -1
  153. package/dist/native/config/PlatformHelper.ios.d.ts +22 -1
  154. package/dist/native/config/PlatformHelper.ios.d.ts.map +1 -1
  155. package/dist/native/config/PlatformHelper.ios.js +15 -1
  156. package/dist/native/config/PlatformHelper.ios.js.map +1 -1
  157. package/dist/native/config/PlatformHelper.js +16 -1
  158. package/dist/native/config/PlatformHelper.js.map +1 -1
  159. package/dist/native/config/PlatformHelper.web.d.ts +23 -1
  160. package/dist/native/config/PlatformHelper.web.d.ts.map +1 -1
  161. package/dist/native/config/PlatformHelper.web.js +18 -1
  162. package/dist/native/config/PlatformHelper.web.js.map +1 -1
  163. package/dist/recyclerview/RecyclerView.d.ts.map +1 -1
  164. package/dist/recyclerview/RecyclerView.js +6 -6
  165. package/dist/recyclerview/RecyclerView.js.map +1 -1
  166. package/dist/recyclerview/RecyclerViewManager.d.ts.map +1 -1
  167. package/dist/recyclerview/RecyclerViewManager.js +8 -9
  168. package/dist/recyclerview/RecyclerViewManager.js.map +1 -1
  169. package/dist/recyclerview/RecyclerViewProps.d.ts +8 -1
  170. package/dist/recyclerview/RecyclerViewProps.d.ts.map +1 -1
  171. package/dist/recyclerview/helpers/RenderTimeTracker.d.ts +3 -0
  172. package/dist/recyclerview/helpers/RenderTimeTracker.d.ts.map +1 -1
  173. package/dist/recyclerview/helpers/RenderTimeTracker.js +7 -0
  174. package/dist/recyclerview/helpers/RenderTimeTracker.js.map +1 -1
  175. package/dist/recyclerview/hooks/useRecyclerViewController.d.ts.map +1 -1
  176. package/dist/recyclerview/hooks/useRecyclerViewController.js +0 -4
  177. package/dist/recyclerview/hooks/useRecyclerViewController.js.map +1 -1
  178. package/dist/recyclerview/layout-managers/LayoutManager.d.ts.map +1 -1
  179. package/dist/recyclerview/layout-managers/LayoutManager.js +1 -2
  180. package/dist/recyclerview/layout-managers/LayoutManager.js.map +1 -1
  181. package/dist/specs/AutoLayoutNativeComponent.d.ts +18 -0
  182. package/dist/specs/AutoLayoutNativeComponent.d.ts.map +1 -0
  183. package/dist/specs/AutoLayoutNativeComponent.js +6 -0
  184. package/dist/specs/AutoLayoutNativeComponent.js.map +1 -0
  185. package/dist/specs/CellContainerNativeComponent.d.ts +8 -0
  186. package/dist/specs/CellContainerNativeComponent.d.ts.map +1 -0
  187. package/dist/specs/CellContainerNativeComponent.js +6 -0
  188. package/dist/specs/CellContainerNativeComponent.js.map +1 -0
  189. package/dist/tsconfig.tsbuildinfo +1 -1
  190. package/dist/utils/ContentContainerUtils.d.ts +27 -0
  191. package/dist/utils/ContentContainerUtils.d.ts.map +1 -0
  192. package/dist/utils/ContentContainerUtils.js +48 -0
  193. package/dist/utils/ContentContainerUtils.js.map +1 -0
  194. package/dist/viewability/ViewToken.d.ts.map +1 -0
  195. package/dist/viewability/ViewToken.js.map +1 -0
  196. package/dist/{recyclerview/viewability → viewability}/ViewabilityHelper.d.ts +2 -2
  197. package/dist/viewability/ViewabilityHelper.d.ts.map +1 -0
  198. package/dist/{recyclerview/viewability → viewability}/ViewabilityHelper.js +4 -2
  199. package/dist/{recyclerview/viewability → viewability}/ViewabilityHelper.js.map +1 -1
  200. package/dist/{recyclerview/viewability → viewability}/ViewabilityManager.d.ts +3 -3
  201. package/dist/viewability/ViewabilityManager.d.ts.map +1 -0
  202. package/dist/{recyclerview/viewability → viewability}/ViewabilityManager.js +16 -16
  203. package/dist/viewability/ViewabilityManager.js.map +1 -0
  204. package/ios/RNFlashList.xcodeproj/project.pbxproj +3 -0
  205. package/ios/RNFlashList.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  206. package/ios/Sources/AutoLayoutView.swift +294 -0
  207. package/ios/Sources/AutoLayoutViewComponentView.h +16 -0
  208. package/ios/Sources/AutoLayoutViewComponentView.mm +90 -0
  209. package/ios/Sources/AutoLayoutViewManager.mm +14 -0
  210. package/ios/Sources/AutoLayoutViewManager.swift +12 -0
  211. package/ios/Sources/CellContainerComponentView.h +18 -0
  212. package/ios/Sources/CellContainerComponentView.mm +62 -0
  213. package/ios/Sources/CellContainerManager.mm +8 -0
  214. package/ios/Sources/CellContainerManager.swift +12 -0
  215. package/ios/Sources/FlatListPro-Bridging-Header.h +11 -0
  216. package/ios/Tests/AutoLayoutViewTests.swift +113 -0
  217. package/package.json +14 -3
  218. package/src/AnimatedFlashList.ts +2 -2
  219. package/src/FlashList.tsx +953 -0
  220. package/src/FlashListProps.ts +79 -3
  221. package/src/GridLayoutProviderWithProps.ts +180 -0
  222. package/src/MasonryFlashList.tsx +476 -0
  223. package/src/PureComponentWrapper.tsx +42 -0
  224. package/src/__tests__/ContentContainerUtils.test.ts +130 -0
  225. package/src/__tests__/FlashList.test.tsx +1001 -0
  226. package/src/__tests__/GridLayoutProviderWithProps.test.ts +179 -0
  227. package/src/__tests__/MasonryFlashList.test.ts +292 -0
  228. package/src/__tests__/PlatformHelper.web.test.ts +45 -0
  229. package/src/__tests__/ViewabilityHelper.test.ts +14 -13
  230. package/src/__tests__/helpers/mountFlashList.tsx +62 -0
  231. package/src/__tests__/helpers/mountMasonryFlashList.tsx +70 -0
  232. package/src/__tests__/useBlankAreaTracker.test.tsx +206 -0
  233. package/src/benchmark/JSFPSMonitor.ts +3 -3
  234. package/src/benchmark/useBenchmark.ts +40 -12
  235. package/src/benchmark/useBlankAreaTracker.ts +117 -0
  236. package/src/benchmark/useFlatListBenchmark.ts +1 -3
  237. package/src/enableNewCore.ts +24 -0
  238. package/src/errors/CustomError.ts +10 -0
  239. package/src/errors/ExceptionList.ts +28 -0
  240. package/src/errors/Warnings.ts +15 -0
  241. package/src/index.ts +43 -7
  242. package/src/native/auto-layout/AutoLayoutView.tsx +73 -0
  243. package/src/native/auto-layout/AutoLayoutViewNativeComponent.android.ts +7 -0
  244. package/src/native/auto-layout/AutoLayoutViewNativeComponent.ios.ts +7 -0
  245. package/src/native/auto-layout/AutoLayoutViewNativeComponent.ts +7 -0
  246. package/src/native/auto-layout/AutoLayoutViewNativeComponentProps.ts +17 -0
  247. package/src/native/cell-container/CellContainer.android.ts +7 -0
  248. package/src/native/cell-container/CellContainer.ios.ts +7 -0
  249. package/src/native/cell-container/CellContainer.tsx +14 -0
  250. package/src/native/cell-container/CellContainer.web.tsx +9 -0
  251. package/src/native/config/PlatformHelper.android.ts +25 -1
  252. package/src/native/config/PlatformHelper.ios.ts +24 -1
  253. package/src/native/config/PlatformHelper.ts +25 -1
  254. package/src/native/config/PlatformHelper.web.ts +30 -1
  255. package/src/recyclerview/RecyclerView.tsx +11 -6
  256. package/src/recyclerview/RecyclerViewManager.ts +18 -9
  257. package/src/recyclerview/RecyclerViewProps.ts +11 -1
  258. package/src/recyclerview/helpers/RenderTimeTracker.ts +8 -0
  259. package/src/recyclerview/hooks/useRecyclerViewController.tsx +0 -4
  260. package/src/recyclerview/layout-managers/LayoutManager.ts +1 -2
  261. package/src/specs/AutoLayoutNativeComponent.ts +24 -0
  262. package/src/specs/CellContainerNativeComponent.ts +9 -0
  263. package/src/utils/ContentContainerUtils.ts +92 -0
  264. package/src/{recyclerview/viewability → viewability}/ViewabilityHelper.ts +9 -8
  265. package/src/{recyclerview/viewability → viewability}/ViewabilityManager.ts +20 -18
  266. package/dist/errors/ErrorMessages.d.ts +0 -16
  267. package/dist/errors/ErrorMessages.d.ts.map +0 -1
  268. package/dist/errors/ErrorMessages.js +0 -19
  269. package/dist/errors/ErrorMessages.js.map +0 -1
  270. package/dist/errors/WarningMessages.d.ts +0 -4
  271. package/dist/errors/WarningMessages.d.ts.map +0 -1
  272. package/dist/errors/WarningMessages.js +0 -7
  273. package/dist/errors/WarningMessages.js.map +0 -1
  274. package/dist/isNewArch.d.ts +0 -2
  275. package/dist/isNewArch.d.ts.map +0 -1
  276. package/dist/isNewArch.js +0 -25
  277. package/dist/isNewArch.js.map +0 -1
  278. package/dist/recyclerview/viewability/ViewToken.d.ts.map +0 -1
  279. package/dist/recyclerview/viewability/ViewToken.js.map +0 -1
  280. package/dist/recyclerview/viewability/ViewabilityHelper.d.ts.map +0 -1
  281. package/dist/recyclerview/viewability/ViewabilityManager.d.ts.map +0 -1
  282. package/dist/recyclerview/viewability/ViewabilityManager.js.map +0 -1
  283. package/src/FlashList.ts +0 -1
  284. package/src/errors/ErrorMessages.ts +0 -26
  285. package/src/errors/WarningMessages.ts +0 -4
  286. package/src/isNewArch.ts +0 -25
  287. /package/dist/{recyclerview/viewability → viewability}/ViewToken.d.ts +0 -0
  288. /package/dist/{recyclerview/viewability → viewability}/ViewToken.js +0 -0
  289. /package/src/{recyclerview/viewability → viewability}/ViewToken.ts +0 -0
@@ -0,0 +1,788 @@
1
+ {
2
+ "vertical": [
3
+ {
4
+ "input": [
5
+ {
6
+ "top": 0,
7
+ "left": 0,
8
+ "width": 100,
9
+ "height": 100,
10
+ "right": 100,
11
+ "bottom": 100,
12
+ "index": 0
13
+ },
14
+ {
15
+ "top": 0,
16
+ "left": 90,
17
+ "width": 100,
18
+ "height": 100,
19
+ "right": 190,
20
+ "bottom": 100,
21
+ "index": 1
22
+ }
23
+ ],
24
+ "expectedOutput": [
25
+ {
26
+ "left": 0,
27
+ "right": 100,
28
+ "width": 100,
29
+ "top": 0,
30
+ "bottom": 100,
31
+ "height": 100,
32
+ "index": 0
33
+ },
34
+ {
35
+ "left": 100,
36
+ "right": 200,
37
+ "width": 100,
38
+ "top": 0,
39
+ "bottom": 100,
40
+ "height": 100,
41
+ "index": 1
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "input": [
47
+ {
48
+ "top": 0,
49
+ "left": 0,
50
+ "width": 100,
51
+ "height": 100,
52
+ "right": 100,
53
+ "bottom": 100,
54
+ "index": 0
55
+ },
56
+ {
57
+ "top": 0,
58
+ "left": 90,
59
+ "width": 100,
60
+ "height": 100,
61
+ "right": 190,
62
+ "bottom": 100,
63
+ "index": 1
64
+ },
65
+ {
66
+ "top": 0,
67
+ "left": 220,
68
+ "width": 100,
69
+ "height": 100,
70
+ "right": 320,
71
+ "bottom": 100,
72
+ "index": 2
73
+ }
74
+ ],
75
+ "expectedOutput": [
76
+ {
77
+ "left": 0,
78
+ "right": 100,
79
+ "width": 100,
80
+ "top": 0,
81
+ "bottom": 100,
82
+ "height": 100,
83
+ "index": 0
84
+ },
85
+ {
86
+ "left": 100,
87
+ "right": 200,
88
+ "width": 100,
89
+ "top": 0,
90
+ "bottom": 100,
91
+ "height": 100,
92
+ "index": 1
93
+ },
94
+ {
95
+ "left": 200,
96
+ "right": 300,
97
+ "width": 100,
98
+ "top": 0,
99
+ "bottom": 100,
100
+ "height": 100,
101
+ "index": 2
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ "input": [
107
+ {
108
+ "top": 0,
109
+ "left": 0,
110
+ "width": 100,
111
+ "height": 100,
112
+ "right": 100,
113
+ "bottom": 100,
114
+ "index": 0
115
+ },
116
+ {
117
+ "top": 0,
118
+ "left": 90,
119
+ "width": 100,
120
+ "height": 100,
121
+ "right": 190,
122
+ "bottom": 100,
123
+ "index": 1
124
+ },
125
+ {
126
+ "top": 0,
127
+ "left": 220,
128
+ "width": 100,
129
+ "height": 120,
130
+ "right": 320,
131
+ "bottom": 120,
132
+ "index": 2
133
+ },
134
+ {
135
+ "top": 100,
136
+ "left": 0,
137
+ "width": 100,
138
+ "height": 120,
139
+ "right": 100,
140
+ "bottom": 220,
141
+ "index": 3
142
+ },
143
+ {
144
+ "top": 100,
145
+ "left": 100,
146
+ "width": 100,
147
+ "height": 120,
148
+ "right": 200,
149
+ "bottom": 220,
150
+ "index": 4
151
+ }
152
+ ],
153
+ "expectedOutput": [
154
+ {
155
+ "left": 0,
156
+ "right": 100,
157
+ "width": 100,
158
+ "top": 0,
159
+ "bottom": 100,
160
+ "height": 100,
161
+ "index": 0
162
+ },
163
+ {
164
+ "left": 100,
165
+ "right": 200,
166
+ "width": 100,
167
+ "top": 0,
168
+ "bottom": 100,
169
+ "height": 100,
170
+ "index": 1
171
+ },
172
+ {
173
+ "left": 200,
174
+ "right": 300,
175
+ "width": 100,
176
+ "top": 0,
177
+ "bottom": 120,
178
+ "height": 120,
179
+ "index": 2
180
+ },
181
+ {
182
+ "left": 0,
183
+ "right": 100,
184
+ "width": 100,
185
+ "top": 120,
186
+ "bottom": 240,
187
+ "height": 120,
188
+ "index": 3
189
+ },
190
+ {
191
+ "left": 100,
192
+ "right": 200,
193
+ "width": 100,
194
+ "top": 120,
195
+ "bottom": 240,
196
+ "height": 120,
197
+ "index": 4
198
+ }
199
+ ]
200
+ },
201
+ {
202
+ "input": [
203
+ {
204
+ "top": 0,
205
+ "left": 0,
206
+ "width": 100,
207
+ "height": 100,
208
+ "right": 100,
209
+ "bottom": 100,
210
+ "index": 0
211
+ },
212
+ {
213
+ "top": 0,
214
+ "left": 90,
215
+ "width": 100,
216
+ "height": 100,
217
+ "right": 190,
218
+ "bottom": 100,
219
+ "index": 1
220
+ },
221
+ {
222
+ "top": 0,
223
+ "left": 220,
224
+ "width": 100,
225
+ "height": 120,
226
+ "right": 320,
227
+ "bottom": 120,
228
+ "index": 2
229
+ },
230
+ {
231
+ "top": 150,
232
+ "left": 0,
233
+ "width": 100,
234
+ "height": 120,
235
+ "right": 100,
236
+ "bottom": 270,
237
+ "index": 3
238
+ },
239
+ {
240
+ "top": 100,
241
+ "left": 120,
242
+ "width": 100,
243
+ "height": 120,
244
+ "right": 220,
245
+ "bottom": 220,
246
+ "index": 4
247
+ }
248
+ ],
249
+ "expectedOutput": [
250
+ {
251
+ "left": 0,
252
+ "right": 100,
253
+ "width": 100,
254
+ "top": 0,
255
+ "bottom": 100,
256
+ "height": 100,
257
+ "index": 0
258
+ },
259
+ {
260
+ "left": 100,
261
+ "right": 200,
262
+ "width": 100,
263
+ "top": 0,
264
+ "bottom": 100,
265
+ "height": 100,
266
+ "index": 1
267
+ },
268
+ {
269
+ "left": 200,
270
+ "right": 300,
271
+ "width": 100,
272
+ "top": 0,
273
+ "bottom": 120,
274
+ "height": 120,
275
+ "index": 2
276
+ },
277
+ {
278
+ "left": 0,
279
+ "right": 100,
280
+ "width": 100,
281
+ "top": 120,
282
+ "bottom": 240,
283
+ "height": 120,
284
+ "index": 3
285
+ },
286
+ {
287
+ "left": 100,
288
+ "right": 200,
289
+ "width": 100,
290
+ "top": 120,
291
+ "bottom": 240,
292
+ "height": 120,
293
+ "index": 4
294
+ }
295
+ ]
296
+ },
297
+ {
298
+ "input": [
299
+ {
300
+ "top": 0,
301
+ "left": 0,
302
+ "width": 100,
303
+ "height": 100,
304
+ "right": 100,
305
+ "bottom": 100,
306
+ "index": 0
307
+ },
308
+ {
309
+ "top": 0,
310
+ "left": 90,
311
+ "width": 100,
312
+ "height": 100,
313
+ "right": 190,
314
+ "bottom": 100,
315
+ "index": 1
316
+ },
317
+ {
318
+ "top": 0,
319
+ "left": 220,
320
+ "width": 100,
321
+ "height": 120,
322
+ "right": 320,
323
+ "bottom": 120,
324
+ "index": 2
325
+ },
326
+ {
327
+ "top": 150,
328
+ "left": 0,
329
+ "width": 100,
330
+ "height": 120,
331
+ "right": 100,
332
+ "bottom": 270,
333
+ "index": 3
334
+ },
335
+ {
336
+ "top": 100,
337
+ "left": 120,
338
+ "width": 100,
339
+ "height": 200,
340
+ "right": 220,
341
+ "bottom": 300,
342
+ "index": 4
343
+ }
344
+ ],
345
+ "expectedOutput": [
346
+ {
347
+ "left": 0,
348
+ "right": 100,
349
+ "width": 100,
350
+ "top": 0,
351
+ "bottom": 100,
352
+ "height": 100,
353
+ "index": 0
354
+ },
355
+ {
356
+ "left": 100,
357
+ "right": 200,
358
+ "width": 100,
359
+ "top": 0,
360
+ "bottom": 100,
361
+ "height": 100,
362
+ "index": 1
363
+ },
364
+ {
365
+ "left": 200,
366
+ "right": 300,
367
+ "width": 100,
368
+ "top": 0,
369
+ "bottom": 120,
370
+ "height": 120,
371
+ "index": 2
372
+ },
373
+ {
374
+ "left": 0,
375
+ "right": 100,
376
+ "width": 100,
377
+ "top": 120,
378
+ "bottom": 240,
379
+ "height": 120,
380
+ "index": 3
381
+ },
382
+ {
383
+ "left": 100,
384
+ "right": 200,
385
+ "width": 100,
386
+ "top": 120,
387
+ "bottom": 320,
388
+ "height": 200,
389
+ "index": 4
390
+ }
391
+ ]
392
+ }
393
+ ],
394
+ "horizontal": [
395
+ {
396
+ "input": [
397
+ {
398
+ "top": 0,
399
+ "left": 0,
400
+ "width": 100,
401
+ "height": 100,
402
+ "right": 100,
403
+ "bottom": 100,
404
+ "index": 0
405
+ },
406
+ {
407
+ "top": 90,
408
+ "left": 0,
409
+ "width": 100,
410
+ "height": 100,
411
+ "right": 100,
412
+ "bottom": 190,
413
+ "index": 1
414
+ }
415
+ ],
416
+ "expectedOutput": [
417
+ {
418
+ "left": 0,
419
+ "right": 100,
420
+ "width": 100,
421
+ "top": 0,
422
+ "bottom": 100,
423
+ "height": 100,
424
+ "index": 0
425
+ },
426
+ {
427
+ "left": 0,
428
+ "right": 100,
429
+ "width": 100,
430
+ "top": 100,
431
+ "bottom": 200,
432
+ "height": 100,
433
+ "index": 1
434
+ }
435
+ ]
436
+ },
437
+ {
438
+ "input": [
439
+ {
440
+ "top": 0,
441
+ "left": 0,
442
+ "width": 100,
443
+ "height": 100,
444
+ "right": 100,
445
+ "bottom": 100,
446
+ "index": 0
447
+ },
448
+ {
449
+ "top": 90,
450
+ "left": 0,
451
+ "width": 100,
452
+ "height": 100,
453
+ "right": 100,
454
+ "bottom": 190,
455
+ "index": 1
456
+ },
457
+ {
458
+ "top": 220,
459
+ "left": 0,
460
+ "width": 100,
461
+ "height": 100,
462
+ "right": 100,
463
+ "bottom": 320,
464
+ "index": 2
465
+ }
466
+ ],
467
+ "expectedOutput": [
468
+ {
469
+ "left": 0,
470
+ "right": 100,
471
+ "width": 100,
472
+ "top": 0,
473
+ "bottom": 100,
474
+ "height": 100,
475
+ "index": 0
476
+ },
477
+ {
478
+ "left": 0,
479
+ "right": 100,
480
+ "width": 100,
481
+ "top": 100,
482
+ "bottom": 200,
483
+ "height": 100,
484
+ "index": 1
485
+ },
486
+ {
487
+ "left": 0,
488
+ "right": 100,
489
+ "width": 100,
490
+ "top": 200,
491
+ "bottom": 300,
492
+ "height": 100,
493
+ "index": 2
494
+ }
495
+ ]
496
+ },
497
+ {
498
+ "input": [
499
+ {
500
+ "top": 0,
501
+ "left": 0,
502
+ "width": 120,
503
+ "height": 100,
504
+ "right": 120,
505
+ "bottom": 100,
506
+ "index": 0
507
+ },
508
+ {
509
+ "top": 90,
510
+ "left": 0,
511
+ "width": 100,
512
+ "height": 100,
513
+ "right": 100,
514
+ "bottom": 190,
515
+ "index": 1
516
+ },
517
+ {
518
+ "top": 220,
519
+ "left": 0,
520
+ "width": 100,
521
+ "height": 100,
522
+ "right": 100,
523
+ "bottom": 320,
524
+ "index": 2
525
+ },
526
+ {
527
+ "top": 0,
528
+ "left": 100,
529
+ "width": 100,
530
+ "height": 120,
531
+ "right": 200,
532
+ "bottom": 120,
533
+ "index": 3
534
+ },
535
+ {
536
+ "top": 100,
537
+ "left": 100,
538
+ "width": 100,
539
+ "height": 120,
540
+ "right": 200,
541
+ "bottom": 220,
542
+ "index": 4
543
+ }
544
+ ],
545
+ "expectedOutput": [
546
+ {
547
+ "left": 0,
548
+ "right": 120,
549
+ "width": 120,
550
+ "top": 0,
551
+ "bottom": 100,
552
+ "height": 100,
553
+ "index": 0
554
+ },
555
+ {
556
+ "left": 0,
557
+ "right": 100,
558
+ "width": 100,
559
+ "top": 100,
560
+ "bottom": 200,
561
+ "height": 100,
562
+ "index": 1
563
+ },
564
+ {
565
+ "left": 0,
566
+ "right": 100,
567
+ "width": 100,
568
+ "top": 200,
569
+ "bottom": 300,
570
+ "height": 100,
571
+ "index": 2
572
+ },
573
+ {
574
+ "left": 120,
575
+ "right": 220,
576
+ "width": 100,
577
+ "top": 0,
578
+ "bottom": 120,
579
+ "height": 120,
580
+ "index": 3
581
+ },
582
+ {
583
+ "left": 120,
584
+ "right": 220,
585
+ "width": 100,
586
+ "top": 120,
587
+ "bottom": 240,
588
+ "height": 120,
589
+ "index": 4
590
+ }
591
+ ]
592
+ },
593
+ {
594
+ "input": [
595
+ {
596
+ "top": 0,
597
+ "left": 0,
598
+ "width": 120,
599
+ "height": 100,
600
+ "right": 120,
601
+ "bottom": 100,
602
+ "index": 0
603
+ },
604
+ {
605
+ "top": 90,
606
+ "left": 0,
607
+ "width": 100,
608
+ "height": 100,
609
+ "right": 100,
610
+ "bottom": 190,
611
+ "index": 1
612
+ },
613
+ {
614
+ "top": 220,
615
+ "left": 0,
616
+ "width": 100,
617
+ "height": 100,
618
+ "right": 100,
619
+ "bottom": 320,
620
+ "index": 2
621
+ },
622
+ {
623
+ "top": 0,
624
+ "left": 150,
625
+ "width": 100,
626
+ "height": 120,
627
+ "right": 250,
628
+ "bottom": 120,
629
+ "index": 3
630
+ },
631
+ {
632
+ "top": 100,
633
+ "left": 120,
634
+ "width": 100,
635
+ "height": 120,
636
+ "right": 220,
637
+ "bottom": 220,
638
+ "index": 4
639
+ }
640
+ ],
641
+ "expectedOutput": [
642
+ {
643
+ "left": 0,
644
+ "right": 120,
645
+ "width": 120,
646
+ "top": 0,
647
+ "bottom": 100,
648
+ "height": 100,
649
+ "index": 0
650
+ },
651
+ {
652
+ "left": 0,
653
+ "right": 100,
654
+ "width": 100,
655
+ "top": 100,
656
+ "bottom": 200,
657
+ "height": 100,
658
+ "index": 1
659
+ },
660
+ {
661
+ "left": 0,
662
+ "right": 100,
663
+ "width": 100,
664
+ "top": 200,
665
+ "bottom": 300,
666
+ "height": 100,
667
+ "index": 2
668
+ },
669
+ {
670
+ "left": 120,
671
+ "right": 220,
672
+ "width": 100,
673
+ "top": 0,
674
+ "bottom": 120,
675
+ "height": 120,
676
+ "index": 3
677
+ },
678
+ {
679
+ "left": 120,
680
+ "right": 220,
681
+ "width": 100,
682
+ "top": 120,
683
+ "bottom": 240,
684
+ "height": 120,
685
+ "index": 4
686
+ }
687
+ ]
688
+ }
689
+ ],
690
+ "window": [
691
+ {
692
+ "input": [
693
+ {
694
+ "top": 0,
695
+ "left": 0,
696
+ "width": 120,
697
+ "height": 100,
698
+ "right": 120,
699
+ "bottom": 100,
700
+ "index": 0
701
+ },
702
+ {
703
+ "top": 90,
704
+ "left": 0,
705
+ "width": 100,
706
+ "height": 100,
707
+ "right": 100,
708
+ "bottom": 190,
709
+ "index": 1
710
+ },
711
+ {
712
+ "top": 220,
713
+ "left": 0,
714
+ "width": 100,
715
+ "height": 100,
716
+ "right": 100,
717
+ "bottom": 320,
718
+ "index": 2
719
+ },
720
+ {
721
+ "top": 0,
722
+ "left": 150,
723
+ "width": 100,
724
+ "height": 120,
725
+ "right": 250,
726
+ "bottom": 120,
727
+ "index": 3
728
+ },
729
+ {
730
+ "top": 100,
731
+ "left": 120,
732
+ "width": 100,
733
+ "height": 120,
734
+ "right": 220,
735
+ "bottom": 220,
736
+ "index": 4
737
+ }
738
+ ],
739
+ "expectedOutput": [
740
+ {
741
+ "left": 0,
742
+ "right": 120,
743
+ "width": 120,
744
+ "top": 0,
745
+ "bottom": 100,
746
+ "height": 100,
747
+ "index": 0
748
+ },
749
+ {
750
+ "left": 0,
751
+ "right": 100,
752
+ "width": 100,
753
+ "top": 100,
754
+ "bottom": 200,
755
+ "height": 100,
756
+ "index": 1
757
+ },
758
+ {
759
+ "left": 0,
760
+ "right": 100,
761
+ "width": 100,
762
+ "top": 200,
763
+ "bottom": 300,
764
+ "height": 100,
765
+ "index": 2
766
+ },
767
+ {
768
+ "left": 120,
769
+ "right": 220,
770
+ "width": 100,
771
+ "top": 0,
772
+ "bottom": 120,
773
+ "height": 120,
774
+ "index": 3
775
+ },
776
+ {
777
+ "top": 100,
778
+ "left": 120,
779
+ "width": 100,
780
+ "height": 120,
781
+ "right": 220,
782
+ "bottom": 220,
783
+ "index": 4
784
+ }
785
+ ]
786
+ }
787
+ ]
788
+ }