react-native-nitro-list 0.0.1 → 0.1.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.
- package/README.md +250 -16
- package/android/build.gradle +5 -4
- package/android/src/main/java/com/nitrolist/HybridNitroRecyclerView.kt +26 -0
- package/android/src/main/java/com/nitrolist/HybridNitroRecyclerViewManager.kt +29 -0
- package/android/src/main/java/com/nitrolist/NitroListPackage.kt +13 -24
- package/android/src/main/java/com/nitrolist/NitroRecyclerAdapter.kt +32 -0
- package/android/src/main/java/com/nitrolist/NitroRecyclerViewHolder.kt +8 -0
- package/ios/HybridNitroList.swift +32 -15
- package/lib/commonjs/NitroList.js +9 -0
- package/lib/commonjs/NitroList.js.map +1 -0
- package/lib/commonjs/RecyclerList.internal.js +25 -0
- package/lib/commonjs/RecyclerList.internal.js.map +1 -0
- package/lib/commonjs/RecyclerList.js +171 -0
- package/lib/commonjs/RecyclerList.js.map +1 -0
- package/lib/commonjs/RecyclerList.types.js +6 -0
- package/lib/commonjs/RecyclerList.types.js.map +1 -0
- package/lib/commonjs/ReusableView.js +2 -0
- package/lib/commonjs/ReusableView.js.map +1 -0
- package/lib/commonjs/cell/Cell.js +2 -0
- package/lib/{module/specs/nitro-list.nitro.js.map → commonjs/cell/Cell.js.map} +1 -1
- package/lib/commonjs/cell/CellRecycler.js +62 -0
- package/lib/commonjs/cell/CellRecycler.js.map +1 -0
- package/lib/commonjs/cell/StableKey.js +10 -0
- package/lib/commonjs/cell/StableKey.js.map +1 -0
- package/lib/commonjs/debug/useDebugOverlay.js +15 -0
- package/lib/commonjs/debug/useDebugOverlay.js.map +1 -0
- package/lib/commonjs/getVisibleIndices.js +38 -0
- package/lib/commonjs/getVisibleIndices.js.map +1 -0
- package/lib/commonjs/hooks/useCellRenderer.js +62 -0
- package/lib/commonjs/hooks/useCellRenderer.js.map +1 -0
- package/lib/commonjs/hooks/useStableCallback.js +13 -0
- package/lib/commonjs/hooks/useStableCallback.js.map +1 -0
- package/lib/commonjs/index.js +7 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/layout/EstimatedLayoutProvider.js +30 -0
- package/lib/commonjs/layout/EstimatedLayoutProvider.js.map +1 -0
- package/lib/commonjs/layout/LayoutEngine.js +21 -0
- package/lib/commonjs/layout/LayoutEngine.js.map +1 -0
- package/lib/commonjs/{specs/nitro-list.nitro.js → layout/LayoutProvider.js} +1 -1
- package/lib/commonjs/{specs/nitro-list.nitro.js.map → layout/LayoutProvider.js.map} +1 -1
- package/lib/commonjs/layout/LayoutRectangle.js +2 -0
- package/lib/commonjs/layout/LayoutRectangle.js.map +1 -0
- package/lib/commonjs/layout/MutableLinearLayout.js +65 -0
- package/lib/commonjs/layout/MutableLinearLayout.js.map +1 -0
- package/lib/commonjs/layout/index.js +20 -0
- package/lib/commonjs/layout/index.js.map +1 -0
- package/lib/commonjs/measurement/MeasureLayout.js +20 -0
- package/lib/commonjs/measurement/MeasureLayout.js.map +1 -0
- package/lib/commonjs/measurement/useItemMeasurement.js +28 -0
- package/lib/commonjs/measurement/useItemMeasurement.js.map +1 -0
- package/lib/commonjs/native/NitroLayoutEngine.js +9 -0
- package/lib/commonjs/native/NitroLayoutEngine.js.map +1 -0
- package/lib/commonjs/native/NitroList.types.js +6 -0
- package/lib/commonjs/native/NitroList.types.js.map +1 -0
- package/lib/commonjs/native/NitroRecyclerView.js +9 -0
- package/lib/commonjs/native/NitroRecyclerView.js.map +1 -0
- package/lib/commonjs/prefetch/PrefetchHelper.js +39 -0
- package/lib/commonjs/prefetch/PrefetchHelper.js.map +1 -0
- package/lib/commonjs/specs/nitro-layout-engine.nitro.js +6 -0
- package/lib/commonjs/specs/nitro-layout-engine.nitro.js.map +1 -0
- package/lib/commonjs/utils/arrayEqual.js +15 -0
- package/lib/commonjs/utils/arrayEqual.js.map +1 -0
- package/lib/commonjs/utils/assertNever.js +10 -0
- package/lib/commonjs/utils/assertNever.js.map +1 -0
- package/lib/commonjs/utils/clamp.js +10 -0
- package/lib/commonjs/utils/clamp.js.map +1 -0
- package/lib/commonjs/utils/devAssert.js +12 -0
- package/lib/commonjs/utils/devAssert.js.map +1 -0
- package/lib/commonjs/utils/invariant.js +12 -0
- package/lib/commonjs/utils/invariant.js.map +1 -0
- package/lib/commonjs/utils/isDefined.js +10 -0
- package/lib/commonjs/utils/isDefined.js.map +1 -0
- package/lib/commonjs/utils/isNumber.js +10 -0
- package/lib/commonjs/utils/isNumber.js.map +1 -0
- package/lib/commonjs/utils/noop.js +10 -0
- package/lib/commonjs/utils/noop.js.map +1 -0
- package/lib/commonjs/utils/shallowEqual.js +22 -0
- package/lib/commonjs/utils/shallowEqual.js.map +1 -0
- package/lib/commonjs/utils/throttle.js +17 -0
- package/lib/commonjs/utils/throttle.js.map +1 -0
- package/lib/commonjs/viewability/ViewabilityHelper.js +121 -0
- package/lib/commonjs/viewability/ViewabilityHelper.js.map +1 -0
- package/lib/commonjs/windowing/ScrollMetrics.js +2 -0
- package/lib/commonjs/windowing/ScrollMetrics.js.map +1 -0
- package/lib/commonjs/windowing/findVisibleIndexRange.js +48 -0
- package/lib/commonjs/windowing/findVisibleIndexRange.js.map +1 -0
- package/lib/commonjs/windowing/index.js +20 -0
- package/lib/commonjs/windowing/index.js.map +1 -0
- package/lib/commonjs/windowing/useScrollMetrics.js +39 -0
- package/lib/commonjs/windowing/useScrollMetrics.js.map +1 -0
- package/lib/module/NitroList.js +5 -0
- package/lib/module/NitroList.js.map +1 -0
- package/lib/module/RecyclerList.internal.js +22 -0
- package/lib/module/RecyclerList.internal.js.map +1 -0
- package/lib/module/RecyclerList.js +166 -0
- package/lib/module/RecyclerList.js.map +1 -0
- package/lib/module/RecyclerList.types.js +4 -0
- package/lib/module/RecyclerList.types.js.map +1 -0
- package/lib/module/ReusableView.js +2 -0
- package/lib/module/ReusableView.js.map +1 -0
- package/lib/module/cell/Cell.js +2 -0
- package/lib/module/cell/Cell.js.map +1 -0
- package/lib/module/cell/CellRecycler.js +57 -0
- package/lib/module/cell/CellRecycler.js.map +1 -0
- package/lib/module/cell/StableKey.js +6 -0
- package/lib/module/cell/StableKey.js.map +1 -0
- package/lib/module/debug/useDebugOverlay.js +11 -0
- package/lib/module/debug/useDebugOverlay.js.map +1 -0
- package/lib/module/getVisibleIndices.js +34 -0
- package/lib/module/getVisibleIndices.js.map +1 -0
- package/lib/module/hooks/useCellRenderer.js +58 -0
- package/lib/module/hooks/useCellRenderer.js.map +1 -0
- package/lib/module/hooks/useStableCallback.js +9 -0
- package/lib/module/hooks/useStableCallback.js.map +1 -0
- package/lib/module/index.js +1 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/layout/EstimatedLayoutProvider.js +25 -0
- package/lib/module/layout/EstimatedLayoutProvider.js.map +1 -0
- package/lib/module/layout/LayoutEngine.js +17 -0
- package/lib/module/layout/LayoutEngine.js.map +1 -0
- package/lib/module/layout/LayoutProvider.js +4 -0
- package/lib/module/layout/LayoutProvider.js.map +1 -0
- package/lib/module/layout/LayoutRectangle.js +2 -0
- package/lib/module/layout/LayoutRectangle.js.map +1 -0
- package/lib/module/layout/MutableLinearLayout.js +60 -0
- package/lib/module/layout/MutableLinearLayout.js.map +1 -0
- package/lib/module/layout/index.js +5 -0
- package/lib/module/layout/index.js.map +1 -0
- package/lib/module/measurement/MeasureLayout.js +16 -0
- package/lib/module/measurement/MeasureLayout.js.map +1 -0
- package/lib/module/measurement/useItemMeasurement.js +24 -0
- package/lib/module/measurement/useItemMeasurement.js.map +1 -0
- package/lib/module/native/NitroLayoutEngine.js +5 -0
- package/lib/module/native/NitroLayoutEngine.js.map +1 -0
- package/lib/module/native/NitroList.types.js +4 -0
- package/lib/module/native/NitroList.types.js.map +1 -0
- package/lib/module/native/NitroRecyclerView.js +5 -0
- package/lib/module/native/NitroRecyclerView.js.map +1 -0
- package/lib/module/prefetch/PrefetchHelper.js +34 -0
- package/lib/module/prefetch/PrefetchHelper.js.map +1 -0
- package/lib/module/specs/nitro-layout-engine.nitro.js +4 -0
- package/lib/module/specs/nitro-layout-engine.nitro.js.map +1 -0
- package/lib/module/utils/arrayEqual.js +11 -0
- package/lib/module/utils/arrayEqual.js.map +1 -0
- package/lib/module/utils/assertNever.js +6 -0
- package/lib/module/utils/assertNever.js.map +1 -0
- package/lib/module/utils/clamp.js +6 -0
- package/lib/module/utils/clamp.js.map +1 -0
- package/lib/module/utils/devAssert.js +8 -0
- package/lib/module/utils/devAssert.js.map +1 -0
- package/lib/module/utils/invariant.js +8 -0
- package/lib/module/utils/invariant.js.map +1 -0
- package/lib/module/utils/isDefined.js +6 -0
- package/lib/module/utils/isDefined.js.map +1 -0
- package/lib/module/utils/isNumber.js +6 -0
- package/lib/module/utils/isNumber.js.map +1 -0
- package/lib/module/utils/noop.js +6 -0
- package/lib/module/utils/noop.js.map +1 -0
- package/lib/module/utils/shallowEqual.js +18 -0
- package/lib/module/utils/shallowEqual.js.map +1 -0
- package/lib/module/utils/throttle.js +13 -0
- package/lib/module/utils/throttle.js.map +1 -0
- package/lib/module/viewability/ViewabilityHelper.js +116 -0
- package/lib/module/viewability/ViewabilityHelper.js.map +1 -0
- package/lib/module/windowing/ScrollMetrics.js +2 -0
- package/lib/module/windowing/ScrollMetrics.js.map +1 -0
- package/lib/module/windowing/findVisibleIndexRange.js +44 -0
- package/lib/module/windowing/findVisibleIndexRange.js.map +1 -0
- package/lib/module/windowing/index.js +5 -0
- package/lib/module/windowing/index.js.map +1 -0
- package/lib/module/windowing/useScrollMetrics.js +35 -0
- package/lib/module/windowing/useScrollMetrics.js.map +1 -0
- package/lib/typescript/src/NitroList.d.ts +5 -0
- package/lib/typescript/src/NitroList.d.ts.map +1 -0
- package/lib/typescript/src/RecyclerList.d.ts +26 -0
- package/lib/typescript/src/RecyclerList.d.ts.map +1 -0
- package/lib/typescript/src/RecyclerList.internal.d.ts +9 -0
- package/lib/typescript/src/RecyclerList.internal.d.ts.map +1 -0
- package/lib/typescript/src/RecyclerList.types.d.ts +18 -0
- package/lib/typescript/src/RecyclerList.types.d.ts.map +1 -0
- package/lib/typescript/src/ReusableView.d.ts +9 -0
- package/lib/typescript/src/ReusableView.d.ts.map +1 -0
- package/lib/typescript/src/__tests__/windowing/findVisibleIndexRange.test.d.ts +2 -0
- package/lib/typescript/src/__tests__/windowing/findVisibleIndexRange.test.d.ts.map +1 -0
- package/lib/typescript/src/cell/Cell.d.ts +13 -0
- package/lib/typescript/src/cell/Cell.d.ts.map +1 -0
- package/lib/typescript/src/cell/CellRecycler.d.ts +19 -0
- package/lib/typescript/src/cell/CellRecycler.d.ts.map +1 -0
- package/lib/typescript/src/cell/StableKey.d.ts +2 -0
- package/lib/typescript/src/cell/StableKey.d.ts.map +1 -0
- package/lib/typescript/src/debug/useDebugOverlay.d.ts +2 -0
- package/lib/typescript/src/debug/useDebugOverlay.d.ts.map +1 -0
- package/lib/typescript/src/getVisibleIndices.d.ts +8 -0
- package/lib/typescript/src/getVisibleIndices.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCellRenderer.d.ts +19 -0
- package/lib/typescript/src/hooks/useCellRenderer.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useStableCallback.d.ts +2 -0
- package/lib/typescript/src/hooks/useStableCallback.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/layout/EstimatedLayoutProvider.d.ts +15 -0
- package/lib/typescript/src/layout/EstimatedLayoutProvider.d.ts.map +1 -0
- package/lib/typescript/src/layout/LayoutEngine.d.ts +10 -0
- package/lib/typescript/src/layout/LayoutEngine.d.ts.map +1 -0
- package/lib/typescript/src/layout/LayoutProvider.d.ts +16 -0
- package/lib/typescript/src/layout/LayoutProvider.d.ts.map +1 -0
- package/lib/typescript/src/layout/LayoutRectangle.d.ts +11 -0
- package/lib/typescript/src/layout/LayoutRectangle.d.ts.map +1 -0
- package/lib/typescript/src/layout/MutableLinearLayout.d.ts +22 -0
- package/lib/typescript/src/layout/MutableLinearLayout.d.ts.map +1 -0
- package/lib/typescript/src/layout/index.d.ts +5 -0
- package/lib/typescript/src/layout/index.d.ts.map +1 -0
- package/lib/typescript/src/measurement/MeasureLayout.d.ts +10 -0
- package/lib/typescript/src/measurement/MeasureLayout.d.ts.map +1 -0
- package/lib/typescript/src/measurement/useItemMeasurement.d.ts +11 -0
- package/lib/typescript/src/measurement/useItemMeasurement.d.ts.map +1 -0
- package/lib/typescript/src/native/NitroLayoutEngine.d.ts +3 -0
- package/lib/typescript/src/native/NitroLayoutEngine.d.ts.map +1 -0
- package/lib/typescript/src/native/NitroList.types.d.ts +9 -0
- package/lib/typescript/src/native/NitroList.types.d.ts.map +1 -0
- package/lib/typescript/src/native/NitroRecyclerView.d.ts +5 -0
- package/lib/typescript/src/native/NitroRecyclerView.d.ts.map +1 -0
- package/lib/typescript/src/prefetch/PrefetchHelper.d.ts +17 -0
- package/lib/typescript/src/prefetch/PrefetchHelper.d.ts.map +1 -0
- package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts +14 -0
- package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts.map +1 -0
- package/lib/typescript/src/utils/arrayEqual.d.ts +2 -0
- package/lib/typescript/src/utils/arrayEqual.d.ts.map +1 -0
- package/lib/typescript/src/utils/assertNever.d.ts +2 -0
- package/lib/typescript/src/utils/assertNever.d.ts.map +1 -0
- package/lib/typescript/src/utils/clamp.d.ts +2 -0
- package/lib/typescript/src/utils/clamp.d.ts.map +1 -0
- package/lib/typescript/src/utils/devAssert.d.ts +2 -0
- package/lib/typescript/src/utils/devAssert.d.ts.map +1 -0
- package/lib/typescript/src/utils/invariant.d.ts +2 -0
- package/lib/typescript/src/utils/invariant.d.ts.map +1 -0
- package/lib/typescript/src/utils/isDefined.d.ts +2 -0
- package/lib/typescript/src/utils/isDefined.d.ts.map +1 -0
- package/lib/typescript/src/utils/isNumber.d.ts +2 -0
- package/lib/typescript/src/utils/isNumber.d.ts.map +1 -0
- package/lib/typescript/src/utils/noop.d.ts +2 -0
- package/lib/typescript/src/utils/noop.d.ts.map +1 -0
- package/lib/typescript/src/utils/shallowEqual.d.ts +2 -0
- package/lib/typescript/src/utils/shallowEqual.d.ts.map +1 -0
- package/lib/typescript/src/utils/throttle.d.ts +2 -0
- package/lib/typescript/src/utils/throttle.d.ts.map +1 -0
- package/lib/typescript/src/viewability/ViewabilityHelper.d.ts +50 -0
- package/lib/typescript/src/viewability/ViewabilityHelper.d.ts.map +1 -0
- package/lib/typescript/src/windowing/ScrollMetrics.d.ts +11 -0
- package/lib/typescript/src/windowing/ScrollMetrics.d.ts.map +1 -0
- package/lib/typescript/src/windowing/findVisibleIndexRange.d.ts +11 -0
- package/lib/typescript/src/windowing/findVisibleIndexRange.d.ts.map +1 -0
- package/lib/typescript/src/windowing/index.d.ts +4 -0
- package/lib/typescript/src/windowing/index.d.ts.map +1 -0
- package/lib/typescript/src/windowing/useScrollMetrics.d.ts +14 -0
- package/lib/typescript/src/windowing/useScrollMetrics.d.ts.map +1 -0
- package/nitro.json +20 -13
- package/nitrogen/generated/android/NitroList+autolinking.cmake +2 -4
- package/nitrogen/generated/android/NitroListOnLoad.cpp +3 -13
- package/nitrogen/generated/android/c++/JHybridNitroLayoutEngineSpec.cpp +69 -0
- package/nitrogen/generated/android/c++/{JHybridNitroListSpec.hpp → JHybridNitroLayoutEngineSpec.hpp} +12 -13
- package/nitrogen/generated/android/c++/JLayoutRectangle.hpp +69 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/{HybridNitroListSpec.kt → HybridNitroLayoutEngineSpec.kt} +11 -13
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/LayoutRectangle.kt +47 -0
- package/nitrogen/generated/ios/NitroList-Swift-Cxx-Bridge.cpp +9 -9
- package/nitrogen/generated/ios/NitroList-Swift-Cxx-Bridge.hpp +50 -13
- package/nitrogen/generated/ios/NitroList-Swift-Cxx-Umbrella.hpp +11 -5
- package/nitrogen/generated/ios/c++/{HybridNitroListSpecSwift.cpp → HybridNitroLayoutEngineSpecSwift.cpp} +2 -2
- package/nitrogen/generated/ios/c++/HybridNitroLayoutEngineSpecSwift.hpp +78 -0
- package/nitrogen/generated/ios/swift/HybridNitroLayoutEngineSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/{HybridNitroListSpec_cxx.swift → HybridNitroLayoutEngineSpec_cxx.swift} +35 -38
- package/nitrogen/generated/ios/swift/LayoutRectangle.swift +45 -0
- package/nitrogen/generated/shared/c++/{HybridNitroListSpec.cpp → HybridNitroLayoutEngineSpec.cpp} +4 -5
- package/nitrogen/generated/shared/c++/{HybridNitroListSpec.hpp → HybridNitroLayoutEngineSpec.hpp} +15 -14
- package/nitrogen/generated/shared/c++/LayoutRectangle.hpp +95 -0
- package/package.json +12 -4
- package/src/NitroList.ts +8 -0
- package/src/RecyclerList.internal.ts +38 -0
- package/src/RecyclerList.tsx +252 -0
- package/src/RecyclerList.types.ts +24 -0
- package/src/ReusableView.ts +12 -0
- package/src/__tests__/windowing/findVisibleIndexRange.test.ts +55 -0
- package/src/cell/Cell.ts +14 -0
- package/src/cell/CellRecycler.ts +66 -0
- package/src/cell/StableKey.ts +6 -0
- package/src/debug/useDebugOverlay.ts +14 -0
- package/src/getVisibleIndices.ts +53 -0
- package/src/hooks/useCellRenderer.ts +86 -0
- package/src/hooks/useStableCallback.ts +13 -0
- package/src/index.ts +2 -14
- package/src/layout/EstimatedLayoutProvider.ts +35 -0
- package/src/layout/LayoutEngine.ts +21 -0
- package/src/layout/LayoutProvider.ts +17 -0
- package/src/layout/LayoutRectangle.ts +10 -0
- package/src/layout/MutableLinearLayout.ts +79 -0
- package/src/layout/index.ts +4 -0
- package/src/measurement/MeasureLayout.ts +20 -0
- package/src/measurement/useItemMeasurement.ts +32 -0
- package/src/native/NitroLayoutEngine.ts +7 -0
- package/src/native/NitroList.types.ts +12 -0
- package/src/native/NitroRecyclerView.ts +8 -0
- package/src/prefetch/PrefetchHelper.ts +47 -0
- package/src/specs/nitro-layout-engine.nitro.ts +17 -0
- package/src/utils/arrayEqual.ts +13 -0
- package/src/utils/assertNever.ts +3 -0
- package/src/utils/clamp.ts +7 -0
- package/src/utils/devAssert.ts +8 -0
- package/src/utils/invariant.ts +8 -0
- package/src/utils/isDefined.ts +5 -0
- package/src/utils/isNumber.ts +3 -0
- package/src/utils/noop.ts +3 -0
- package/src/utils/shallowEqual.ts +34 -0
- package/src/utils/throttle.ts +13 -0
- package/src/viewability/ViewabilityHelper.ts +130 -0
- package/src/windowing/ScrollMetrics.ts +11 -0
- package/src/windowing/findVisibleIndexRange.ts +60 -0
- package/src/windowing/index.ts +3 -0
- package/src/windowing/useScrollMetrics.ts +56 -0
- package/android/src/main/java/com/nitrolist/HybridNitroList.kt +0 -27
- package/lib/module/specs/nitro-list.nitro.js +0 -4
- package/lib/typescript/src/specs/nitro-list.nitro.d.ts +0 -11
- package/lib/typescript/src/specs/nitro-list.nitro.d.ts.map +0 -1
- package/nitrogen/generated/android/c++/JHybridNitroListSpec.cpp +0 -56
- package/nitrogen/generated/android/c++/views/JHybridNitroListStateUpdater.cpp +0 -56
- package/nitrogen/generated/android/c++/views/JHybridNitroListStateUpdater.hpp +0 -49
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/views/HybridNitroListManager.kt +0 -50
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/views/HybridNitroListStateUpdater.kt +0 -23
- package/nitrogen/generated/ios/NitroListAutolinking.mm +0 -33
- package/nitrogen/generated/ios/NitroListAutolinking.swift +0 -25
- package/nitrogen/generated/ios/c++/HybridNitroListSpecSwift.hpp +0 -74
- package/nitrogen/generated/ios/c++/views/HybridNitroListComponent.mm +0 -96
- package/nitrogen/generated/ios/swift/HybridNitroListSpec.swift +0 -56
- package/nitrogen/generated/shared/c++/views/HybridNitroListComponent.cpp +0 -88
- package/nitrogen/generated/shared/c++/views/HybridNitroListComponent.hpp +0 -107
- package/nitrogen/generated/shared/json/NitroListConfig.json +0 -10
- package/src/specs/nitro-list.nitro.ts +0 -13
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { LayoutRectangle } from './LayoutRectangle'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* INTERNAL mutable layout record.
|
|
5
|
+
* This is intentionally mutable and never exposed publicly.
|
|
6
|
+
*/
|
|
7
|
+
type MutableLayoutRectangle = {
|
|
8
|
+
x: number
|
|
9
|
+
y: number
|
|
10
|
+
width: number
|
|
11
|
+
height: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Mutable linear layout store.
|
|
16
|
+
* FlashList-style incremental relayout.
|
|
17
|
+
*/
|
|
18
|
+
export class MutableLinearLayout {
|
|
19
|
+
private readonly layouts: MutableLayoutRectangle[]
|
|
20
|
+
private totalHeight: number
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
initialHeights: readonly number[],
|
|
24
|
+
width: number
|
|
25
|
+
) {
|
|
26
|
+
this.layouts = []
|
|
27
|
+
let y = 0
|
|
28
|
+
|
|
29
|
+
for (const height of initialHeights) {
|
|
30
|
+
this.layouts.push({
|
|
31
|
+
x: 0,
|
|
32
|
+
y,
|
|
33
|
+
width,
|
|
34
|
+
height,
|
|
35
|
+
})
|
|
36
|
+
y += height
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
this.totalHeight = y
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Read-only snapshot for consumers.
|
|
44
|
+
* Returned type is immutable.
|
|
45
|
+
*/
|
|
46
|
+
getLayouts(): readonly LayoutRectangle[] {
|
|
47
|
+
return this.layouts
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
getContentHeight(): number {
|
|
51
|
+
return this.totalHeight
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Update height of one item and shift following items.
|
|
56
|
+
* Returns true if layout changed.
|
|
57
|
+
*/
|
|
58
|
+
updateItemHeight(
|
|
59
|
+
index: number,
|
|
60
|
+
newHeight: number
|
|
61
|
+
): boolean {
|
|
62
|
+
const layout = this.layouts[index]
|
|
63
|
+
if (!layout) return false
|
|
64
|
+
|
|
65
|
+
const delta = newHeight - layout.height
|
|
66
|
+
if (delta === 0) return false
|
|
67
|
+
|
|
68
|
+
// Update this item
|
|
69
|
+
layout.height = newHeight
|
|
70
|
+
|
|
71
|
+
// Shift all items after this index
|
|
72
|
+
for (let i = index + 1; i < this.layouts.length; i++) {
|
|
73
|
+
this.layouts[i]!.y += delta
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
this.totalHeight += delta
|
|
77
|
+
return true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LayoutChangeEvent } from 'react-native'
|
|
2
|
+
|
|
3
|
+
export interface MeasuredLayout {
|
|
4
|
+
readonly width: number
|
|
5
|
+
readonly height: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Extracts stable layout measurements from RN onLayout event.
|
|
10
|
+
*/
|
|
11
|
+
export function measureLayout(
|
|
12
|
+
event: LayoutChangeEvent
|
|
13
|
+
): MeasuredLayout {
|
|
14
|
+
const { width, height } = event.nativeEvent.layout
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useCallback, useRef } from 'react'
|
|
2
|
+
import type { LayoutChangeEvent } from 'react-native'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Hook to measure a rendered item safely.
|
|
6
|
+
*
|
|
7
|
+
* Guarantees:
|
|
8
|
+
* - No duplicate height reports
|
|
9
|
+
* - No render loops
|
|
10
|
+
* - Stable callback identity
|
|
11
|
+
*/
|
|
12
|
+
export function useItemMeasurement(
|
|
13
|
+
index: number,
|
|
14
|
+
onMeasured: (index: number, height: number) => void
|
|
15
|
+
) {
|
|
16
|
+
const lastHeightRef = useRef<number | null>(null)
|
|
17
|
+
|
|
18
|
+
const onLayout = useCallback(
|
|
19
|
+
(e: LayoutChangeEvent) => {
|
|
20
|
+
const height = e.nativeEvent.layout.height
|
|
21
|
+
|
|
22
|
+
// Ignore identical measurements
|
|
23
|
+
if (lastHeightRef.current === height) return
|
|
24
|
+
|
|
25
|
+
lastHeightRef.current = height
|
|
26
|
+
onMeasured(index, height)
|
|
27
|
+
},
|
|
28
|
+
[index, onMeasured]
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
return onLayout
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NitroModules } from 'react-native-nitro-modules'
|
|
2
|
+
import type { NitroLayoutEngine as NitroLayoutEngineSpec } from '../specs/nitro-layout-engine.nitro'
|
|
3
|
+
|
|
4
|
+
export const NitroLayoutEngine =
|
|
5
|
+
NitroModules.createHybridObject<NitroLayoutEngineSpec>(
|
|
6
|
+
'NitroLayoutEngine'
|
|
7
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LayoutRectangle } from '../layout/LayoutRectangle'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* JS runtime interface backed by Nitro (JSI).
|
|
5
|
+
* Must match native HybridNitroList exactly.
|
|
6
|
+
*/
|
|
7
|
+
export interface NitroList {
|
|
8
|
+
computeLayout(
|
|
9
|
+
containerWidth: number,
|
|
10
|
+
itemHeights: readonly number[]
|
|
11
|
+
): readonly LayoutRectangle[]
|
|
12
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Callback invoked when new items should be prefetched.
|
|
3
|
+
*/
|
|
4
|
+
export type PrefetchCallback = (indices: number[]) => void
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* PrefetchHelper
|
|
8
|
+
*
|
|
9
|
+
* Stateless with respect to layout.
|
|
10
|
+
* Only tracks what has already been prefetched to avoid duplication.
|
|
11
|
+
*
|
|
12
|
+
* Designed to be driven by *visible window*, not scroll events.
|
|
13
|
+
*/
|
|
14
|
+
export class PrefetchHelper {
|
|
15
|
+
private lastPrefetched = new Set<number>()
|
|
16
|
+
|
|
17
|
+
runPrefetch(
|
|
18
|
+
visibleIndices: readonly number[],
|
|
19
|
+
itemCount: number,
|
|
20
|
+
aheadCount: number,
|
|
21
|
+
onPrefetch: PrefetchCallback
|
|
22
|
+
) {
|
|
23
|
+
if (visibleIndices.length === 0) return
|
|
24
|
+
|
|
25
|
+
const lastVisible =
|
|
26
|
+
visibleIndices[visibleIndices.length - 1]!
|
|
27
|
+
|
|
28
|
+
const start = lastVisible + 1
|
|
29
|
+
const end = Math.min(
|
|
30
|
+
itemCount - 1,
|
|
31
|
+
start + aheadCount
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
const toPrefetch: number[] = []
|
|
35
|
+
|
|
36
|
+
for (let i = start; i <= end; i++) {
|
|
37
|
+
if (!this.lastPrefetched.has(i)) {
|
|
38
|
+
this.lastPrefetched.add(i)
|
|
39
|
+
toPrefetch.push(i)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (toPrefetch.length > 0) {
|
|
44
|
+
onPrefetch(toPrefetch)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HybridObject } from 'react-native-nitro-modules'
|
|
2
|
+
|
|
3
|
+
export interface LayoutRectangle {
|
|
4
|
+
readonly x: number
|
|
5
|
+
readonly y: number
|
|
6
|
+
readonly width: number
|
|
7
|
+
readonly height: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface NitroLayoutEngine
|
|
11
|
+
extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
|
|
12
|
+
|
|
13
|
+
computeLayout(
|
|
14
|
+
containerWidth: number,
|
|
15
|
+
itemHeights: readonly number[]
|
|
16
|
+
): readonly LayoutRectangle[]
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function arrayEqual<T>(
|
|
2
|
+
a: readonly T[],
|
|
3
|
+
b: readonly T[]
|
|
4
|
+
): boolean {
|
|
5
|
+
if (a === b) return true
|
|
6
|
+
if (a.length !== b.length) return false
|
|
7
|
+
|
|
8
|
+
for (let i = 0; i < a.length; i++) {
|
|
9
|
+
if (!Object.is(a[i], b[i])) return false
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return true
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export function shallowEqual(
|
|
2
|
+
a: unknown,
|
|
3
|
+
b: unknown
|
|
4
|
+
): boolean {
|
|
5
|
+
if (Object.is(a, b)) return true
|
|
6
|
+
|
|
7
|
+
if (
|
|
8
|
+
typeof a !== 'object' ||
|
|
9
|
+
typeof b !== 'object' ||
|
|
10
|
+
a === null ||
|
|
11
|
+
b === null
|
|
12
|
+
) {
|
|
13
|
+
return false
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const aKeys = Object.keys(a as object)
|
|
17
|
+
const bKeys = Object.keys(b as object)
|
|
18
|
+
|
|
19
|
+
if (aKeys.length !== bKeys.length) return false
|
|
20
|
+
|
|
21
|
+
for (const key of aKeys) {
|
|
22
|
+
if (
|
|
23
|
+
!(key in (b as object)) ||
|
|
24
|
+
!Object.is(
|
|
25
|
+
(a as Record<string, unknown>)[key],
|
|
26
|
+
(b as Record<string, unknown>)[key]
|
|
27
|
+
)
|
|
28
|
+
) {
|
|
29
|
+
return false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return true
|
|
34
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { LayoutRectangle } from '../layout/LayoutRectangle'
|
|
2
|
+
import type { ScrollMetrics } from '../windowing/ScrollMetrics'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Public token describing viewability state of an item.
|
|
6
|
+
* Mirrors FlashList's ViewToken concept.
|
|
7
|
+
*/
|
|
8
|
+
export type ViewToken = {
|
|
9
|
+
index: number
|
|
10
|
+
isViewable: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for viewability calculations.
|
|
15
|
+
*/
|
|
16
|
+
export type ViewabilityConfig = {
|
|
17
|
+
/**
|
|
18
|
+
* Percentage (0–100) of item height that must be visible
|
|
19
|
+
* for the item to be considered "viewable".
|
|
20
|
+
*/
|
|
21
|
+
itemVisiblePercentThreshold?: number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* ViewabilityHelper
|
|
26
|
+
*
|
|
27
|
+
* Pure observer:
|
|
28
|
+
* - Does NOT affect layout
|
|
29
|
+
* - Does NOT affect recycling
|
|
30
|
+
* - Computes visibility based on layout + scroll metrics
|
|
31
|
+
*
|
|
32
|
+
* This class is intentionally stateful (lastVisible)
|
|
33
|
+
* to compute "changed" items efficiently.
|
|
34
|
+
*/
|
|
35
|
+
export class ViewabilityHelper {
|
|
36
|
+
/** Previously visible indices */
|
|
37
|
+
private lastVisible = new Set<number>()
|
|
38
|
+
|
|
39
|
+
constructor(
|
|
40
|
+
private readonly config: ViewabilityConfig = {}
|
|
41
|
+
) {}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Computes which items are viewable and which changed
|
|
45
|
+
* since the last invocation.
|
|
46
|
+
*
|
|
47
|
+
* IMPORTANT:
|
|
48
|
+
* - This method should be called AFTER windowing,
|
|
49
|
+
* not on the full dataset.
|
|
50
|
+
*/
|
|
51
|
+
computeViewableItems(
|
|
52
|
+
layouts: readonly LayoutRectangle[],
|
|
53
|
+
metrics: ScrollMetrics
|
|
54
|
+
): {
|
|
55
|
+
viewableItems: ViewToken[]
|
|
56
|
+
changed: ViewToken[]
|
|
57
|
+
} {
|
|
58
|
+
const visibleNow = new Set<number>()
|
|
59
|
+
const viewableItems: ViewToken[] = []
|
|
60
|
+
const changed: ViewToken[] = []
|
|
61
|
+
|
|
62
|
+
const viewportTop = metrics.offsetY
|
|
63
|
+
const viewportBottom = viewportTop + metrics.height
|
|
64
|
+
|
|
65
|
+
// Normalize threshold into [0, 1]
|
|
66
|
+
const threshold =
|
|
67
|
+
(this.config.itemVisiblePercentThreshold ?? 0) / 100
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* NOTE:
|
|
71
|
+
* We intentionally iterate layouts sequentially,
|
|
72
|
+
* but EXIT EARLY when items are completely below viewport.
|
|
73
|
+
*
|
|
74
|
+
* This keeps complexity near O(visibleItems),
|
|
75
|
+
* not O(totalItems).
|
|
76
|
+
*/
|
|
77
|
+
for (let i = 0; i < layouts.length; i++) {
|
|
78
|
+
const layout = layouts[i]!
|
|
79
|
+
|
|
80
|
+
// If item is completely below viewport, stop
|
|
81
|
+
if (layout.y > viewportBottom) {
|
|
82
|
+
break
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const itemTop = layout.y
|
|
86
|
+
const itemBottom = layout.y + layout.height
|
|
87
|
+
|
|
88
|
+
// If item is completely above viewport, skip
|
|
89
|
+
if (itemBottom < viewportTop) {
|
|
90
|
+
continue
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Compute visible intersection
|
|
94
|
+
const visibleTop = Math.max(itemTop, viewportTop)
|
|
95
|
+
const visibleBottom = Math.min(itemBottom, viewportBottom)
|
|
96
|
+
|
|
97
|
+
const visibleHeight = Math.max(0, visibleBottom - visibleTop)
|
|
98
|
+
|
|
99
|
+
// Guard against zero-height items
|
|
100
|
+
const itemHeight =
|
|
101
|
+
layout.height > 0 ? layout.height : 1
|
|
102
|
+
|
|
103
|
+
const visibleRatio = visibleHeight / itemHeight
|
|
104
|
+
|
|
105
|
+
if (visibleRatio >= threshold) {
|
|
106
|
+
visibleNow.add(i)
|
|
107
|
+
viewableItems.push({ index: i, isViewable: true })
|
|
108
|
+
|
|
109
|
+
// Newly visible
|
|
110
|
+
if (!this.lastVisible.has(i)) {
|
|
111
|
+
changed.push({ index: i, isViewable: true })
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Items that were visible before but not anymore
|
|
118
|
+
*/
|
|
119
|
+
for (const index of this.lastVisible) {
|
|
120
|
+
if (!visibleNow.has(index)) {
|
|
121
|
+
changed.push({ index, isViewable: false })
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Update snapshot
|
|
126
|
+
this.lastVisible = visibleNow
|
|
127
|
+
|
|
128
|
+
return { viewableItems, changed }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { LayoutRectangle } from '../layout/LayoutRectangle'
|
|
2
|
+
import type { ScrollMetrics } from './ScrollMetrics'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Computes the contiguous range of item indices
|
|
6
|
+
* intersecting the viewport expanded by bufferPx.
|
|
7
|
+
*
|
|
8
|
+
* PURE function. No allocations besides output.
|
|
9
|
+
* FlashList-style windowing.
|
|
10
|
+
*/
|
|
11
|
+
export function findVisibleIndexRange(
|
|
12
|
+
layouts: readonly LayoutRectangle[],
|
|
13
|
+
metrics: ScrollMetrics,
|
|
14
|
+
bufferPx: number
|
|
15
|
+
): readonly number[] {
|
|
16
|
+
const count = layouts.length
|
|
17
|
+
|
|
18
|
+
// 🔒 CRITICAL GUARDS (FlashList-style)
|
|
19
|
+
if (
|
|
20
|
+
count === 0 ||
|
|
21
|
+
metrics.height <= 0 ||
|
|
22
|
+
bufferPx < 0
|
|
23
|
+
) {
|
|
24
|
+
return []
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const windowStart =
|
|
28
|
+
Math.max(0, metrics.offsetY - bufferPx)
|
|
29
|
+
|
|
30
|
+
const windowEnd =
|
|
31
|
+
metrics.offsetY + metrics.height + bufferPx
|
|
32
|
+
|
|
33
|
+
// Binary search for first intersecting item
|
|
34
|
+
let low = 0
|
|
35
|
+
let high = count - 1
|
|
36
|
+
let firstVisible = count
|
|
37
|
+
|
|
38
|
+
while (low <= high) {
|
|
39
|
+
const mid = (low + high) >> 1
|
|
40
|
+
const rect = layouts[mid]!
|
|
41
|
+
|
|
42
|
+
if (rect.y + rect.height >= windowStart) {
|
|
43
|
+
firstVisible = mid
|
|
44
|
+
high = mid - 1
|
|
45
|
+
} else {
|
|
46
|
+
low = mid + 1
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Linear scan forward
|
|
51
|
+
const visible: number[] = []
|
|
52
|
+
|
|
53
|
+
for (let i = firstVisible; i < count; i++) {
|
|
54
|
+
const rect = layouts[i]!
|
|
55
|
+
if (rect.y > windowEnd) break
|
|
56
|
+
visible.push(i)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return visible
|
|
60
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react'
|
|
2
|
+
import type {
|
|
3
|
+
LayoutChangeEvent,
|
|
4
|
+
NativeScrollEvent,
|
|
5
|
+
NativeSyntheticEvent,
|
|
6
|
+
} from 'react-native'
|
|
7
|
+
import type { ScrollMetrics } from './ScrollMetrics'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Scroll metrics hook.
|
|
11
|
+
* Provides stable scroll snapshot + handlers.
|
|
12
|
+
*
|
|
13
|
+
* FlashList equivalent: useScrollMetrics
|
|
14
|
+
*/
|
|
15
|
+
export function useScrollMetrics(): {
|
|
16
|
+
metrics: ScrollMetrics
|
|
17
|
+
onScroll: (e: NativeSyntheticEvent<NativeScrollEvent>) => void
|
|
18
|
+
onLayout: (e: LayoutChangeEvent) => void
|
|
19
|
+
} {
|
|
20
|
+
const [metrics, setMetrics] = useState<ScrollMetrics>({
|
|
21
|
+
offsetY: 0,
|
|
22
|
+
height: 0,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const onScroll = useCallback(
|
|
26
|
+
(e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
27
|
+
const offsetY = e.nativeEvent.contentOffset.y
|
|
28
|
+
|
|
29
|
+
setMetrics(prev =>
|
|
30
|
+
prev.offsetY === offsetY
|
|
31
|
+
? prev
|
|
32
|
+
: { ...prev, offsetY }
|
|
33
|
+
)
|
|
34
|
+
},
|
|
35
|
+
[]
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
const onLayout = useCallback(
|
|
39
|
+
(e: LayoutChangeEvent) => {
|
|
40
|
+
const height = e.nativeEvent.layout.height
|
|
41
|
+
|
|
42
|
+
setMetrics(prev =>
|
|
43
|
+
prev.height === height
|
|
44
|
+
? prev
|
|
45
|
+
: { ...prev, height }
|
|
46
|
+
)
|
|
47
|
+
},
|
|
48
|
+
[]
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
metrics,
|
|
53
|
+
onScroll,
|
|
54
|
+
onLayout,
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
package com.nitrolist
|
|
2
|
-
|
|
3
|
-
import android.graphics.Color
|
|
4
|
-
import android.view.View
|
|
5
|
-
import androidx.annotation.Keep
|
|
6
|
-
import com.facebook.proguard.annotations.DoNotStrip
|
|
7
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
8
|
-
import com.margelo.nitro.nitrolist.HybridNitroListSpec
|
|
9
|
-
|
|
10
|
-
@Keep
|
|
11
|
-
@DoNotStrip
|
|
12
|
-
class HybridNitroList(val context: ThemedReactContext): HybridNitroListSpec() {
|
|
13
|
-
// View
|
|
14
|
-
override val view: View = View(context)
|
|
15
|
-
|
|
16
|
-
// Props
|
|
17
|
-
private var _isRed = false
|
|
18
|
-
override var isRed: Boolean
|
|
19
|
-
get() = _isRed
|
|
20
|
-
set(value) {
|
|
21
|
-
_isRed = value
|
|
22
|
-
view.setBackgroundColor(
|
|
23
|
-
if (value) Color.RED
|
|
24
|
-
else Color.BLACK
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { HybridView, HybridViewProps, HybridViewMethods } from 'react-native-nitro-modules';
|
|
2
|
-
export interface NitroListProps extends HybridViewProps {
|
|
3
|
-
isRed: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface NitroListMethods extends HybridViewMethods {
|
|
6
|
-
}
|
|
7
|
-
export type NitroList = HybridView<NitroListProps, NitroListMethods, {
|
|
8
|
-
ios: 'swift';
|
|
9
|
-
android: 'kotlin';
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=nitro-list.nitro.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nitro-list.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/nitro-list.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,4BAA4B,CAAA;AAEnC,MAAM,WAAW,cAAe,SAAQ,eAAe;IACpD,KAAK,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;CAAG;AAE9D,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,cAAc,EAAE,gBAAgB,EAAE;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAA"}
|