@onekeyfe/react-native-native-list 6.7.0-1 → 6.7.0-3
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/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +1 -1
- package/docs/SPEC.md +380 -11
- package/ios/HybridNativeList.swift +11 -3
- package/ios/RNCNativeListView.swift +10 -6
- package/ios/tests/NativeListLifecycleTests.swift +28 -0
- package/lib/module/NativeList.js +4 -2
- package/lib/module/NativeList.web.js +135 -29
- package/lib/module/ScrollEdgeEffect.js +8 -0
- package/lib/module/index.js +1 -0
- package/lib/module/validation.js +143 -34
- package/lib/module/web/NativeListWebEngine.js +353 -62
- package/lib/module/web/templates/ActivityRowRenderer.js +432 -5
- package/lib/module/web/templates/MarketRowRenderer.js +8 -3
- package/lib/module/web/templates/MarketTableRowRenderer.js +576 -0
- package/lib/module/web/templates/MediaTileRowRenderer.js +260 -5
- package/lib/module/web/templates/RowRendererRegistry.js +5 -3
- package/lib/module/web/templates/SectionHeaderRowRenderer.js +34 -1
- package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +10 -6
- package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +2 -2
- package/lib/nitrogen/generated/android/c++/JNativeListScrollEdgeEffect.hpp +61 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +3 -3
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +1 -1
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/NativeListScrollEdgeEffect.kt +24 -0
- package/lib/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Umbrella.hpp +3 -0
- package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +8 -4
- package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +4 -4
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +1 -1
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +3 -3
- package/lib/nitrogen/generated/ios/swift/NativeListScrollEdgeEffect.swift +44 -0
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +2 -2
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +5 -2
- package/lib/nitrogen/generated/shared/c++/NativeListScrollEdgeEffect.hpp +80 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +2 -2
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +4 -3
- package/lib/nitrogen/generated/shared/json/NativeListConfig.json +1 -1
- package/lib/typescript/src/NativeList.nitro.d.ts +2 -1
- package/lib/typescript/src/NativeList.types.d.ts +14 -3
- package/lib/typescript/src/NativeList.web.d.ts +2 -2
- package/lib/typescript/src/ScrollEdgeEffect.d.ts +5 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/models.d.ts +71 -1
- package/lib/typescript/src/web/NativeListWebEngine.d.ts +26 -1
- package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +3 -3
- package/lib/typescript/src/web/templates/MarketTableRowRenderer.d.ts +17 -0
- package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +3 -3
- package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +1 -1
- package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +3 -1
- package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +10 -6
- package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +2 -2
- package/nitrogen/generated/android/c++/JNativeListScrollEdgeEffect.hpp +61 -0
- package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/NativeListScrollEdgeEffect.kt +24 -0
- package/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +8 -4
- package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +4 -4
- package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +3 -3
- package/nitrogen/generated/ios/swift/NativeListScrollEdgeEffect.swift +44 -0
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +2 -2
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +5 -2
- package/nitrogen/generated/shared/c++/NativeListScrollEdgeEffect.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +2 -2
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +4 -3
- package/nitrogen/generated/shared/json/NativeListConfig.json +1 -1
- package/package.json +3 -3
- package/react-native-native-list.podspec +4 -1
- package/src/NativeList.nitro.ts +3 -1
- package/src/NativeList.tsx +6 -2
- package/src/NativeList.types.ts +15 -3
- package/src/NativeList.web.tsx +183 -38
- package/src/ScrollEdgeEffect.ts +4 -0
- package/src/index.ts +2 -0
- package/src/models.ts +93 -0
- package/src/validation.ts +348 -58
- package/src/web/NativeListWebEngine.ts +600 -95
- package/src/web/templates/ActivityRowRenderer.ts +656 -7
- package/src/web/templates/MarketRowRenderer.ts +19 -3
- package/src/web/templates/MarketTableRowRenderer.ts +752 -0
- package/src/web/templates/MediaTileRowRenderer.ts +313 -5
- package/src/web/templates/RowRendererRegistry.ts +10 -5
- package/src/web/templates/SectionHeaderRowRenderer.ts +42 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NativeListScrollEdgeEffect.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `NativeListScrollEdgeEffect`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias NativeListScrollEdgeEffect = margelo.nitro.nativelist.NativeListScrollEdgeEffect
|
|
12
|
+
|
|
13
|
+
public extension NativeListScrollEdgeEffect {
|
|
14
|
+
/**
|
|
15
|
+
* Get a NativeListScrollEdgeEffect for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "none":
|
|
21
|
+
self = .none
|
|
22
|
+
case "hard":
|
|
23
|
+
self = .hard
|
|
24
|
+
case "soft":
|
|
25
|
+
self = .soft
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this NativeListScrollEdgeEffect represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .none:
|
|
37
|
+
return "none"
|
|
38
|
+
case .hard:
|
|
39
|
+
return "hard"
|
|
40
|
+
case .soft:
|
|
41
|
+
return "soft"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -20,8 +20,8 @@ namespace margelo::nitro::nativelist {
|
|
|
20
20
|
prototype.registerHybridSetter("fontFamiliesJson", &HybridNativeListSpec::setFontFamiliesJson);
|
|
21
21
|
prototype.registerHybridGetter("containerSlotHeightsJson", &HybridNativeListSpec::getContainerSlotHeightsJson);
|
|
22
22
|
prototype.registerHybridSetter("containerSlotHeightsJson", &HybridNativeListSpec::setContainerSlotHeightsJson);
|
|
23
|
-
prototype.registerHybridGetter("
|
|
24
|
-
prototype.registerHybridSetter("
|
|
23
|
+
prototype.registerHybridGetter("topScrollEdgeEffect", &HybridNativeListSpec::getTopScrollEdgeEffect);
|
|
24
|
+
prototype.registerHybridSetter("topScrollEdgeEffect", &HybridNativeListSpec::setTopScrollEdgeEffect);
|
|
25
25
|
prototype.registerHybridGetter("topOverlayHeight", &HybridNativeListSpec::getTopOverlayHeight);
|
|
26
26
|
prototype.registerHybridSetter("topOverlayHeight", &HybridNativeListSpec::setTopOverlayHeight);
|
|
27
27
|
prototype.registerHybridGetter("scrollPositionThresholdsJson", &HybridNativeListSpec::getScrollPositionThresholdsJson);
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
14
|
#endif
|
|
15
15
|
|
|
16
|
+
// Forward declaration of `NativeListScrollEdgeEffect` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::nativelist { enum class NativeListScrollEdgeEffect; }
|
|
16
18
|
// Forward declaration of `NativeListKeyboardDismissMode` to properly resolve imports.
|
|
17
19
|
namespace margelo::nitro::nativelist { enum class NativeListKeyboardDismissMode; }
|
|
18
20
|
// Forward declaration of `NativeListKeyboardShouldPersistTaps` to properly resolve imports.
|
|
@@ -21,6 +23,7 @@ namespace margelo::nitro::nativelist { enum class NativeListKeyboardShouldPersis
|
|
|
21
23
|
namespace margelo::nitro::nativelist { enum class NativeListScrollAlignment; }
|
|
22
24
|
|
|
23
25
|
#include <string>
|
|
26
|
+
#include "NativeListScrollEdgeEffect.hpp"
|
|
24
27
|
#include <functional>
|
|
25
28
|
#include <optional>
|
|
26
29
|
#include "NativeListKeyboardDismissMode.hpp"
|
|
@@ -60,8 +63,8 @@ namespace margelo::nitro::nativelist {
|
|
|
60
63
|
virtual void setFontFamiliesJson(const std::string& fontFamiliesJson) = 0;
|
|
61
64
|
virtual std::string getContainerSlotHeightsJson() = 0;
|
|
62
65
|
virtual void setContainerSlotHeightsJson(const std::string& containerSlotHeightsJson) = 0;
|
|
63
|
-
virtual
|
|
64
|
-
virtual void
|
|
66
|
+
virtual NativeListScrollEdgeEffect getTopScrollEdgeEffect() = 0;
|
|
67
|
+
virtual void setTopScrollEdgeEffect(NativeListScrollEdgeEffect topScrollEdgeEffect) = 0;
|
|
65
68
|
virtual double getTopOverlayHeight() = 0;
|
|
66
69
|
virtual void setTopOverlayHeight(double topOverlayHeight) = 0;
|
|
67
70
|
virtual std::string getScrollPositionThresholdsJson() = 0;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NativeListScrollEdgeEffect.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nativelist {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (NativeListScrollEdgeEffect).
|
|
30
|
+
*/
|
|
31
|
+
enum class NativeListScrollEdgeEffect {
|
|
32
|
+
NONE SWIFT_NAME(none) = 0,
|
|
33
|
+
HARD SWIFT_NAME(hard) = 1,
|
|
34
|
+
SOFT SWIFT_NAME(soft) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::nativelist
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ NativeListScrollEdgeEffect <> JS NativeListScrollEdgeEffect (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::nativelist::NativeListScrollEdgeEffect> final {
|
|
44
|
+
static inline margelo::nitro::nativelist::NativeListScrollEdgeEffect fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("none"): return margelo::nitro::nativelist::NativeListScrollEdgeEffect::NONE;
|
|
48
|
+
case hashString("hard"): return margelo::nitro::nativelist::NativeListScrollEdgeEffect::HARD;
|
|
49
|
+
case hashString("soft"): return margelo::nitro::nativelist::NativeListScrollEdgeEffect::SOFT;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum NativeListScrollEdgeEffect - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nativelist::NativeListScrollEdgeEffect arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::nativelist::NativeListScrollEdgeEffect::NONE: return JSIConverter<std::string>::toJSI(runtime, "none");
|
|
57
|
+
case margelo::nitro::nativelist::NativeListScrollEdgeEffect::HARD: return JSIConverter<std::string>::toJSI(runtime, "hard");
|
|
58
|
+
case margelo::nitro::nativelist::NativeListScrollEdgeEffect::SOFT: return JSIConverter<std::string>::toJSI(runtime, "soft");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert NativeListScrollEdgeEffect to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("none"):
|
|
71
|
+
case hashString("hard"):
|
|
72
|
+
case hashString("soft"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -23,7 +23,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
23
23
|
snapshotJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "snapshotJson", rawProps, sourceProps.snapshotJson)),
|
|
24
24
|
fontFamiliesJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "fontFamiliesJson", rawProps, sourceProps.fontFamiliesJson)),
|
|
25
25
|
containerSlotHeightsJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "containerSlotHeightsJson", rawProps, sourceProps.containerSlotHeightsJson)),
|
|
26
|
-
|
|
26
|
+
topScrollEdgeEffect(nitro::ReactProp<NativeListScrollEdgeEffect>::fromRawValue("NativeList", "topScrollEdgeEffect", rawProps, sourceProps.topScrollEdgeEffect)),
|
|
27
27
|
topOverlayHeight(nitro::ReactProp<double>::fromRawValue("NativeList", "topOverlayHeight", rawProps, sourceProps.topOverlayHeight)),
|
|
28
28
|
scrollPositionThresholdsJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "scrollPositionThresholdsJson", rawProps, sourceProps.scrollPositionThresholdsJson)),
|
|
29
29
|
onScrollPositionThresholdChange(nitro::ReactProp<std::optional<std::function<void(bool /* isBeyondThreshold */)>>>::fromRawValue("NativeList", "onScrollPositionThresholdChange", rawProps, sourceProps.onScrollPositionThresholdChange)),
|
|
@@ -42,7 +42,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
42
42
|
case hashString("snapshotJson"): return true;
|
|
43
43
|
case hashString("fontFamiliesJson"): return true;
|
|
44
44
|
case hashString("containerSlotHeightsJson"): return true;
|
|
45
|
-
case hashString("
|
|
45
|
+
case hashString("topScrollEdgeEffect"): return true;
|
|
46
46
|
case hashString("topOverlayHeight"): return true;
|
|
47
47
|
case hashString("scrollPositionThresholdsJson"): return true;
|
|
48
48
|
case hashString("onScrollPositionThresholdChange"): return true;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
#include <string>
|
|
19
19
|
|
|
20
20
|
#include <string>
|
|
21
|
+
#include "NativeListScrollEdgeEffect.hpp"
|
|
21
22
|
#include <functional>
|
|
22
23
|
#include <optional>
|
|
23
24
|
#include "NativeListKeyboardDismissMode.hpp"
|
|
@@ -48,7 +49,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
48
49
|
nitro::ReactProp<std::string> snapshotJson;
|
|
49
50
|
nitro::ReactProp<std::string> fontFamiliesJson;
|
|
50
51
|
nitro::ReactProp<std::string> containerSlotHeightsJson;
|
|
51
|
-
nitro::ReactProp<
|
|
52
|
+
nitro::ReactProp<NativeListScrollEdgeEffect> topScrollEdgeEffect;
|
|
52
53
|
nitro::ReactProp<double> topOverlayHeight;
|
|
53
54
|
nitro::ReactProp<std::string> scrollPositionThresholdsJson;
|
|
54
55
|
nitro::ReactProp<std::optional<std::function<void(bool /* isBeyondThreshold */)>>> onScrollPositionThresholdChange;
|
|
@@ -67,7 +68,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
67
68
|
return snapshotJson.hasSameValue(other.snapshotJson) &&
|
|
68
69
|
fontFamiliesJson.hasSameValue(other.fontFamiliesJson) &&
|
|
69
70
|
containerSlotHeightsJson.hasSameValue(other.containerSlotHeightsJson) &&
|
|
70
|
-
|
|
71
|
+
topScrollEdgeEffect.hasSameValue(other.topScrollEdgeEffect) &&
|
|
71
72
|
topOverlayHeight.hasSameValue(other.topOverlayHeight) &&
|
|
72
73
|
scrollPositionThresholdsJson.hasSameValue(other.scrollPositionThresholdsJson) &&
|
|
73
74
|
onScrollPositionThresholdChange.hasSameValue(other.onScrollPositionThresholdChange) &&
|
|
@@ -87,7 +88,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
87
88
|
return snapshotJson.isProvided() ||
|
|
88
89
|
fontFamiliesJson.isProvided() ||
|
|
89
90
|
containerSlotHeightsJson.isProvided() ||
|
|
90
|
-
|
|
91
|
+
topScrollEdgeEffect.isProvided() ||
|
|
91
92
|
topOverlayHeight.isProvided() ||
|
|
92
93
|
scrollPositionThresholdsJson.isProvided() ||
|
|
93
94
|
onScrollPositionThresholdChange.isProvided() ||
|
|
@@ -8,7 +8,7 @@ export interface NativeListNativeProps extends HybridViewProps {
|
|
|
8
8
|
snapshotJson: string;
|
|
9
9
|
fontFamiliesJson: string;
|
|
10
10
|
containerSlotHeightsJson: string;
|
|
11
|
-
|
|
11
|
+
topScrollEdgeEffect: NativeListScrollEdgeEffect;
|
|
12
12
|
topOverlayHeight: number;
|
|
13
13
|
scrollPositionThresholdsJson: string;
|
|
14
14
|
onScrollPositionThresholdChange?: (isBeyondThreshold: boolean) => void;
|
|
@@ -36,4 +36,5 @@ export interface NativeListMethods extends HybridViewMethods {
|
|
|
36
36
|
setRefreshing(refreshing: boolean): void;
|
|
37
37
|
}
|
|
38
38
|
export type NativeList = HybridView<NativeListNativeProps, NativeListMethods>;
|
|
39
|
+
export type NativeListScrollEdgeEffect = 'none' | 'hard' | 'soft';
|
|
39
40
|
//# sourceMappingURL=NativeList.nitro.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ScrollEdgeEffect } from './ScrollEdgeEffect';
|
|
1
2
|
import type { ReactNode, RefObject } from 'react';
|
|
2
3
|
import type { View, ViewProps } from 'react-native';
|
|
3
4
|
import type { ActionAnchorInvalidatedEvent, EndReachedEvent, NativeListSnapshot, ReorderEvent, RowActionEvent, RowModel, RowPatch, SelectionDeltaEvent, VisibleRangeChangedEvent } from './models';
|
|
@@ -42,6 +43,12 @@ export type ScrollToIndexFailedInfo = Readonly<{
|
|
|
42
43
|
averageItemLength: number;
|
|
43
44
|
reason: 'index-out-of-range' | 'section-out-of-range' | 'item-out-of-range' | 'item-not-found';
|
|
44
45
|
}>;
|
|
46
|
+
/** Minimal DOM-free structural surface for an explicit Web scroll element. */
|
|
47
|
+
export type NativeListWebScrollHost = Readonly<{
|
|
48
|
+
clientWidth: number;
|
|
49
|
+
clientHeight: number;
|
|
50
|
+
scrollTop: number;
|
|
51
|
+
}>;
|
|
45
52
|
type InitialScrollProps = Readonly<{
|
|
46
53
|
initialScrollIndex?: never;
|
|
47
54
|
initialScrollKey?: never;
|
|
@@ -75,16 +82,20 @@ export type NativeListRef = Readonly<{
|
|
|
75
82
|
}>;
|
|
76
83
|
export type NativeListProps = Omit<ViewProps, 'children'> & Readonly<{
|
|
77
84
|
snapshot: NativeListSnapshot;
|
|
78
|
-
/**
|
|
85
|
+
/** Container-owned scroll content. Never rendered as a data row. */
|
|
79
86
|
listHeader?: ReactNode;
|
|
80
87
|
listFooter?: ReactNode;
|
|
81
88
|
listEmpty?: ReactNode;
|
|
82
89
|
/** Fixed overlay above scrolling rows on iOS 26 and newer. */
|
|
83
90
|
topOverlay?: ReactNode;
|
|
84
|
-
/**
|
|
85
|
-
topScrollEdgeEffect?:
|
|
91
|
+
/** Selects UIKit's top scroll-edge effect on iOS 26 and newer. */
|
|
92
|
+
topScrollEdgeEffect?: `${ScrollEdgeEffect}`;
|
|
86
93
|
/** Web only. Defaults to true and is ignored by the native host. */
|
|
87
94
|
webVirtualizationEnabled?: boolean;
|
|
95
|
+
/** Web only: undefined owns scrolling, null waits for a host element. */
|
|
96
|
+
webScrollHost?: NativeListWebScrollHost | null;
|
|
97
|
+
/** Web only: visible sticky chrome above the parent's list viewport. */
|
|
98
|
+
webStickyInset?: number;
|
|
88
99
|
/** Web only. Hosts the section index inside this container. */
|
|
89
100
|
webSectionIndexContainerRef?: RefObject<View | null>;
|
|
90
101
|
/** Defaults to `none`. `interactive` behaves as `none` on Android. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { NativeListProps } from './NativeList.types';
|
|
3
|
-
import type { ImageSource, NativeListSnapshot
|
|
3
|
+
import type { ImageSource, NativeListSnapshot } from './models';
|
|
4
4
|
export type { NativeListProps, NativeListRef } from './NativeList.types';
|
|
5
5
|
export type { ActionAnchorState, NativeListKeyboardDismissMode, NativeListKeyboardShouldPersistTaps, ScrollAlignment, ScrollPositionOptions, ScrollToEndParams, ScrollToIndexFailedInfo, ScrollToIndexParams, ScrollToItemParams, ScrollToKeyParams, ScrollToLocationParams, ScrollToOffsetParams, } from './NativeList.types';
|
|
6
6
|
export declare function preloadNativeListAvatarImages(sources: readonly ImageSource[]): Promise<boolean>;
|
|
7
7
|
export declare const NativeList: React.ForwardRefExoticComponent<NativeListProps & React.RefAttributes<Readonly<{
|
|
8
8
|
applySnapshot(snapshot: NativeListSnapshot): void;
|
|
9
|
-
applyPatches(patches: readonly RowPatch[]): void;
|
|
9
|
+
applyPatches(patches: readonly import("./models").RowPatch[]): void;
|
|
10
10
|
reconcileSelection(selectedKeys: readonly string[]): void;
|
|
11
11
|
scrollToKey: (paramsOrKey: import("./NativeList.types").ScrollToKeyParams | string, animated?: boolean, alignment?: import("./NativeList.types").ScrollAlignment) => void;
|
|
12
12
|
scrollToIndex: (paramsOrIndex: import("./NativeList.types").ScrollToIndexParams | number, animated?: boolean, alignment?: import("./NativeList.types").ScrollAlignment) => void;
|
|
@@ -6,4 +6,5 @@ export { checkboxStateForKeys, checkboxStateForSection, isSelectableRow, reduceS
|
|
|
6
6
|
export type { SelectionAction, SelectionResult, SelectionState, } from './selection';
|
|
7
7
|
export { configureNativeListFonts } from './fonts';
|
|
8
8
|
export type { NativeListFontFamilies } from './fonts';
|
|
9
|
+
export { ScrollEdgeEffect } from './ScrollEdgeEffect';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -22,6 +22,8 @@ export type ImageSource = Readonly<{
|
|
|
22
22
|
/** Defaults to `none` in NativeList; use `static` or `skeleton` to opt into loading UI. */
|
|
23
23
|
loadingStrategy?: ImageLoadingStrategy;
|
|
24
24
|
fallbackUri?: string;
|
|
25
|
+
/** Web-only ordered continuation; retries each source before advancing. */
|
|
26
|
+
fallbackUris?: readonly string[];
|
|
25
27
|
retryTimes?: number;
|
|
26
28
|
}>;
|
|
27
29
|
export type BadgeModel = Readonly<{
|
|
@@ -467,10 +469,69 @@ export type DataRow = RowBase & Readonly<{
|
|
|
467
469
|
favoriteActive?: boolean;
|
|
468
470
|
style?: DataRowStyle;
|
|
469
471
|
}>;
|
|
472
|
+
export type WebMarketTableColumn = Readonly<{
|
|
473
|
+
key: string;
|
|
474
|
+
width?: number;
|
|
475
|
+
minWidth?: number;
|
|
476
|
+
flex?: number;
|
|
477
|
+
alignment?: 'start' | 'center' | 'end';
|
|
478
|
+
paddingStart?: number;
|
|
479
|
+
paddingEnd?: number;
|
|
480
|
+
}>;
|
|
481
|
+
export type WebMarketTableText = Readonly<{
|
|
482
|
+
text: string;
|
|
483
|
+
segments?: readonly ValueTextSegment[];
|
|
484
|
+
tone?: TextTone;
|
|
485
|
+
style?: Pick<NativeListTextStyle, 'fontSize' | 'fontWeight' | 'lineHeight' | 'color'>;
|
|
486
|
+
}>;
|
|
487
|
+
export type WebMarketTableCell = Readonly<{
|
|
488
|
+
key: string;
|
|
489
|
+
}> & (Readonly<{
|
|
490
|
+
kind: 'favorite';
|
|
491
|
+
active: boolean;
|
|
492
|
+
disabled?: boolean;
|
|
493
|
+
testID?: string;
|
|
494
|
+
hoverActionKey?: string;
|
|
495
|
+
actionKey: string;
|
|
496
|
+
accessibilityLabel: string;
|
|
497
|
+
}> | Readonly<{
|
|
498
|
+
kind: 'asset';
|
|
499
|
+
leading: LeadingVisual;
|
|
500
|
+
title: WebMarketTableText;
|
|
501
|
+
secondary?: readonly WebMarketTableText[];
|
|
502
|
+
lineGap?: number;
|
|
503
|
+
secondaryBadges?: readonly Pick<MarketBadgeModel, 'key' | 'text' | 'style'>[];
|
|
504
|
+
hoverImages?: readonly (ImageSource | null)[];
|
|
505
|
+
hoverSecondary?: readonly WebMarketTableText[];
|
|
506
|
+
hoverActionKey?: string;
|
|
507
|
+
hoverActionLabel?: string;
|
|
508
|
+
badges?: readonly Pick<MarketBadgeModel, 'key' | 'text' | 'iconName' | 'icon' | 'textColor' | 'backgroundColor' | 'actionKey' | 'accessibilityLabel' | 'style'>[];
|
|
509
|
+
}> | Readonly<{
|
|
510
|
+
kind: 'text';
|
|
511
|
+
primary: readonly WebMarketTableText[];
|
|
512
|
+
partGap?: number;
|
|
513
|
+
secondary?: readonly WebMarketTableText[];
|
|
514
|
+
}> | Readonly<{
|
|
515
|
+
kind: 'sparkline';
|
|
516
|
+
points: readonly number[];
|
|
517
|
+
width: number;
|
|
518
|
+
height: number;
|
|
519
|
+
strokeColor: string;
|
|
520
|
+
fillColor: string;
|
|
521
|
+
}>);
|
|
522
|
+
export type WebMarketTablePresentation = Readonly<{
|
|
523
|
+
draggable?: boolean;
|
|
524
|
+
contextMenuActionKey?: string;
|
|
525
|
+
testID?: string;
|
|
526
|
+
columns: readonly WebMarketTableColumn[];
|
|
527
|
+
cells: readonly WebMarketTableCell[];
|
|
528
|
+
}>;
|
|
470
529
|
/** Native Market quote row. All values are already localized/formatted strings. */
|
|
471
530
|
export type MarketRow = RowBase & Readonly<{
|
|
472
531
|
type: 'market';
|
|
473
532
|
variant: 'token' | 'stock' | 'perp';
|
|
533
|
+
/** Web-only bounded table presentation; native reads the ordinary Market fields. */
|
|
534
|
+
webTable?: WebMarketTablePresentation;
|
|
474
535
|
leadingAction?: Extract<TrailingAccessory, {
|
|
475
536
|
kind: 'icon';
|
|
476
537
|
}>;
|
|
@@ -480,6 +541,8 @@ export type MarketRow = RowBase & Readonly<{
|
|
|
480
541
|
/** OneKey patch: localized name shrinks independently of the volume. */
|
|
481
542
|
subtitlePrefix?: Readonly<{
|
|
482
543
|
text: string;
|
|
544
|
+
/** Web-only anchored help for a truncated name. */
|
|
545
|
+
hoverActionKey?: string;
|
|
483
546
|
gap?: number;
|
|
484
547
|
maxWidth?: number;
|
|
485
548
|
style?: MarketTextStyle;
|
|
@@ -626,6 +689,8 @@ export type NativeListTheme = Readonly<{
|
|
|
626
689
|
rowPressedBackground?: string;
|
|
627
690
|
subduedBackground?: string;
|
|
628
691
|
strongBackground?: string;
|
|
692
|
+
/** Web-only background for a displayed declared image fallback. */
|
|
693
|
+
imageFallbackBackground?: string;
|
|
629
694
|
primaryText: string;
|
|
630
695
|
secondaryText: string;
|
|
631
696
|
disabledText?: string;
|
|
@@ -730,7 +795,7 @@ export type RowPatch = Readonly<{
|
|
|
730
795
|
}> | Readonly<{
|
|
731
796
|
type: 'market';
|
|
732
797
|
key: string;
|
|
733
|
-
changes: Partial<Pick<MarketRow, CommonPatchFields | 'leadingAction' | 'leading' | 'title' | 'subtitle' | 'subtitleSegments' | 'price' | 'priceSegments' | 'change' | 'badges' | 'pressActionKey' | 'pressInActionKey' | 'longPressActionKey' | 'diagnostics' | 'style'>>;
|
|
798
|
+
changes: Partial<Pick<MarketRow, CommonPatchFields | 'leadingAction' | 'leading' | 'title' | 'subtitle' | 'subtitleSegments' | 'price' | 'priceSegments' | 'change' | 'badges' | 'pressActionKey' | 'pressInActionKey' | 'longPressActionKey' | 'diagnostics' | 'webTable' | 'style'>>;
|
|
734
799
|
}> | Readonly<{
|
|
735
800
|
type: 'mediaTile';
|
|
736
801
|
key: string;
|
|
@@ -779,6 +844,11 @@ export type NativeListActionAnchor = Readonly<{
|
|
|
779
844
|
layoutDirection: 'ltr' | 'rtl';
|
|
780
845
|
}>;
|
|
781
846
|
export type RowActionEvent = Readonly<{
|
|
847
|
+
/** Web-only client/window CSS pixel pointer location. */
|
|
848
|
+
windowPoint?: Readonly<{
|
|
849
|
+
x: number;
|
|
850
|
+
y: number;
|
|
851
|
+
}>;
|
|
782
852
|
rowKey?: string;
|
|
783
853
|
actionKey: string;
|
|
784
854
|
sectionKey?: string;
|
|
@@ -83,7 +83,20 @@ export declare function isWebMarketQuotePatch(patch: RowPatch): boolean;
|
|
|
83
83
|
export declare function webMarketImageBindDeltaForPatches(patches: readonly RowPatch[]): 0 | 1;
|
|
84
84
|
export declare const WEB_LIST_CSS: string;
|
|
85
85
|
export declare function createRowBody(context: RenderContext, row: RowModel): HTMLElement;
|
|
86
|
+
export type NativeListWebScrollOptions = Readonly<{
|
|
87
|
+
scrollHost?: HTMLElement;
|
|
88
|
+
contentBounds?: HTMLElement;
|
|
89
|
+
stickyInset?: number;
|
|
90
|
+
ownsRefresh?: boolean;
|
|
91
|
+
}>;
|
|
86
92
|
export declare class NativeListWebEngine {
|
|
93
|
+
private readonly externalScrollHost;
|
|
94
|
+
private readonly ownsRefresh;
|
|
95
|
+
private readonly pullTarget;
|
|
96
|
+
private readonly contentBounds;
|
|
97
|
+
private externalStickyInset;
|
|
98
|
+
private externalOrigin;
|
|
99
|
+
private externalGeometryCache;
|
|
87
100
|
private readonly document;
|
|
88
101
|
private readonly root;
|
|
89
102
|
private readonly viewportFrame;
|
|
@@ -144,13 +157,19 @@ export declare class NativeListWebEngine {
|
|
|
144
157
|
private measuredRendererHeights;
|
|
145
158
|
private notifyScrollCommandAccepted;
|
|
146
159
|
private readonly handlePagerScrollCommandCancel;
|
|
147
|
-
constructor(host: HTMLElement, snapshot: NativeListSnapshot, callbacks: NativeListWebCallbacks, virtualizationEnabled?: boolean, sectionIndexContainer?: HTMLElement | null, fontFamiliesJson?: string);
|
|
160
|
+
constructor(host: HTMLElement, snapshot: NativeListSnapshot, callbacks: NativeListWebCallbacks, virtualizationEnabled?: boolean, sectionIndexContainer?: HTMLElement | null, fontFamiliesJson?: string, scrollOptions?: NativeListWebScrollOptions);
|
|
161
|
+
private validateStickyInset;
|
|
162
|
+
setStickyInset(value?: number): void;
|
|
163
|
+
private externalGeometry;
|
|
164
|
+
private readExternalGeometry;
|
|
148
165
|
private fontFamiliesJson;
|
|
149
166
|
private applyFontFamilies;
|
|
150
167
|
setFontFamiliesJson(json: string): void;
|
|
151
168
|
updateCallbacks(callbacks: NativeListWebCallbacks): void;
|
|
152
169
|
setVirtualizationEnabled(enabled: boolean): void;
|
|
153
170
|
applySnapshot(snapshot: NativeListSnapshot): void;
|
|
171
|
+
currentContentHeight(): number;
|
|
172
|
+
currentSnapshot(): NativeListSnapshot;
|
|
154
173
|
applyPatches(patches: readonly RowPatch[]): void;
|
|
155
174
|
reconcileSelection(keys: readonly string[]): void;
|
|
156
175
|
scrollToIndex(index: number, scroll: NormalizedPositionScroll): void;
|
|
@@ -169,6 +188,8 @@ export declare class NativeListWebEngine {
|
|
|
169
188
|
* renders exactly as before. See docs/STYLE_SPEC.md §5.
|
|
170
189
|
*/
|
|
171
190
|
private applyListStyle;
|
|
191
|
+
private computeLayout;
|
|
192
|
+
private writeExternalHeight;
|
|
172
193
|
private recomputeLayout;
|
|
173
194
|
private updateAvatarWindow;
|
|
174
195
|
private renderWindow;
|
|
@@ -197,6 +218,7 @@ export declare class NativeListWebEngine {
|
|
|
197
218
|
private collapsiblePagerInsets;
|
|
198
219
|
private verticalScrollMetrics;
|
|
199
220
|
private handleCollapsiblePagerInsetsChanged;
|
|
221
|
+
private writeExternalOffset;
|
|
200
222
|
private scrollToAbsoluteOffset;
|
|
201
223
|
private performPendingScroll;
|
|
202
224
|
private rowAtElement;
|
|
@@ -211,8 +233,10 @@ export declare class NativeListWebEngine {
|
|
|
211
233
|
private emitActionAnchorInvalidated;
|
|
212
234
|
private handleRowPress;
|
|
213
235
|
private cancelMarketPointer;
|
|
236
|
+
private handleMarketContextMenu;
|
|
214
237
|
private handleMarketPointerDown;
|
|
215
238
|
private handleMarketPointerMove;
|
|
239
|
+
private handleMarketTouchMove;
|
|
216
240
|
private handleMarketPointerEnd;
|
|
217
241
|
private handleTitlePointerOver;
|
|
218
242
|
private handleTitlePointerOut;
|
|
@@ -222,6 +246,7 @@ export declare class NativeListWebEngine {
|
|
|
222
246
|
private moveKeyboardReorder;
|
|
223
247
|
private finishKeyboardReorder;
|
|
224
248
|
private cancelKeyboardReorder;
|
|
249
|
+
private handleExternalScroll;
|
|
225
250
|
private handleScroll;
|
|
226
251
|
private handleWindowResize;
|
|
227
252
|
private scheduleFrame;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ActivityRow } from '../../models';
|
|
2
2
|
import { type RowPrimitives } from './RowVisual';
|
|
3
|
-
declare function bind(body: HTMLElement, row: ActivityRow, primitives: RowPrimitives): void;
|
|
4
|
-
declare function create(document: Document, row: ActivityRow, primitives: RowPrimitives): HTMLElement;
|
|
5
3
|
declare function recycle(body: HTMLElement): void;
|
|
4
|
+
declare function bind(body: HTMLElement, row: ActivityRow, primitives: RowPrimitives): void;
|
|
5
|
+
declare function create(document: Document, row: ActivityRow, primitives: RowPrimitives): HTMLDivElement;
|
|
6
6
|
export declare const activityRowRenderer: {
|
|
7
7
|
key: "activity";
|
|
8
8
|
create: typeof create;
|
|
9
9
|
bind: typeof bind;
|
|
10
10
|
recycle: typeof recycle;
|
|
11
|
-
measure: (row: ActivityRow, _width: number) =>
|
|
11
|
+
measure: (row: ActivityRow, _width: number) => number;
|
|
12
12
|
measureRendered: (_body: HTMLElement, _row: ActivityRow) => number | undefined;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MarketRow } from '../../models';
|
|
2
|
+
import type { RowPrimitives } from './RowVisual';
|
|
3
|
+
export declare function canPatchMarketTableValues(previous: MarketRow, next: MarketRow): boolean;
|
|
4
|
+
declare function bind(body: HTMLElement, row: MarketRow, primitives: RowPrimitives): void;
|
|
5
|
+
declare function create(document: Document, row: MarketRow, primitives: RowPrimitives): HTMLElement;
|
|
6
|
+
export declare function updateMarketTableValues(element: HTMLElement, row: MarketRow): void;
|
|
7
|
+
export declare const marketTableRowRenderer: {
|
|
8
|
+
key: string;
|
|
9
|
+
appliesSizePreset: () => boolean;
|
|
10
|
+
create: typeof create;
|
|
11
|
+
bind: typeof bind;
|
|
12
|
+
measure: () => number;
|
|
13
|
+
measureRendered: () => undefined;
|
|
14
|
+
recycle: (body: HTMLElement) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=MarketTableRowRenderer.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { MediaTileRow } from '../../models';
|
|
2
2
|
import type { RowPrimitives } from './RowVisual';
|
|
3
|
-
declare function bind(body: HTMLElement, row: MediaTileRow, primitives: RowPrimitives): void;
|
|
4
|
-
declare function create(document: Document, row: MediaTileRow, primitives: RowPrimitives): HTMLElement;
|
|
5
3
|
declare function recycle(body: HTMLElement): void;
|
|
4
|
+
declare function bind(body: HTMLElement, row: MediaTileRow, primitives: RowPrimitives): void;
|
|
5
|
+
declare function create(document: Document, row: MediaTileRow, primitives: RowPrimitives): HTMLDivElement;
|
|
6
6
|
export declare const mediaTileRowRenderer: {
|
|
7
7
|
key: "mediaTile";
|
|
8
8
|
create: typeof create;
|
|
9
9
|
bind: typeof bind;
|
|
10
10
|
recycle: typeof recycle;
|
|
11
|
-
measure: (
|
|
11
|
+
measure: (row: MediaTileRow, width: number) => number;
|
|
12
12
|
measureRendered: (_body: HTMLElement, _row: MediaTileRow) => number | undefined;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -28,7 +28,7 @@ export declare function resolveMessageRow(row: MessageRow): {
|
|
|
28
28
|
}> | undefined;
|
|
29
29
|
automaticHeight: boolean;
|
|
30
30
|
};
|
|
31
|
-
export declare function classifyMessageUpdate(old: MessageRow | undefined, row: MessageRow): "replace" | "
|
|
31
|
+
export declare function classifyMessageUpdate(old: MessageRow | undefined, row: MessageRow): "replace" | "content" | "unchanged" | "assets";
|
|
32
32
|
export declare function bindMessageRow(body: HTMLElement, row: MessageRow, primitives: RowPrimitives): void;
|
|
33
33
|
export declare function createMessageRow(document: Document, row: MessageRow, primitives: RowPrimitives): HTMLElement;
|
|
34
34
|
export declare function recycleMessageRow(body: HTMLElement): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RowModel } from '../../models';
|
|
2
|
-
export type RowRendererKey = RowModel['type'];
|
|
2
|
+
export type RowRendererKey = RowModel['type'] | 'marketTable';
|
|
3
3
|
export declare function rowRenderer(row: RowModel): {
|
|
4
4
|
key: string;
|
|
5
5
|
appliesSizePreset: boolean;
|
|
@@ -21,6 +21,7 @@ export declare function rowRenderer(row: RowModel): {
|
|
|
21
21
|
overscan?: number;
|
|
22
22
|
loadingStrategy?: import("../..").ImageLoadingStrategy;
|
|
23
23
|
fallbackUri?: string;
|
|
24
|
+
fallbackUris?: readonly string[];
|
|
24
25
|
retryTimes?: number;
|
|
25
26
|
}>) => HTMLElement | undefined;
|
|
26
27
|
textStyle: (element: HTMLElement, style: Readonly<{
|
|
@@ -55,6 +56,7 @@ export declare function rowRenderer(row: RowModel): {
|
|
|
55
56
|
overscan?: number;
|
|
56
57
|
loadingStrategy?: import("../..").ImageLoadingStrategy;
|
|
57
58
|
fallbackUri?: string;
|
|
59
|
+
fallbackUris?: readonly string[];
|
|
58
60
|
retryTimes?: number;
|
|
59
61
|
}>) => HTMLElement | undefined;
|
|
60
62
|
textStyle: (element: HTMLElement, style: Readonly<{
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
#include "JHybridNativeListSpec.hpp"
|
|
9
9
|
|
|
10
|
+
// Forward declaration of `NativeListScrollEdgeEffect` to properly resolve imports.
|
|
11
|
+
namespace margelo::nitro::nativelist { enum class NativeListScrollEdgeEffect; }
|
|
10
12
|
// Forward declaration of `NativeListKeyboardDismissMode` to properly resolve imports.
|
|
11
13
|
namespace margelo::nitro::nativelist { enum class NativeListKeyboardDismissMode; }
|
|
12
14
|
// Forward declaration of `NativeListKeyboardShouldPersistTaps` to properly resolve imports.
|
|
@@ -15,6 +17,8 @@ namespace margelo::nitro::nativelist { enum class NativeListKeyboardShouldPersis
|
|
|
15
17
|
namespace margelo::nitro::nativelist { enum class NativeListScrollAlignment; }
|
|
16
18
|
|
|
17
19
|
#include <string>
|
|
20
|
+
#include "NativeListScrollEdgeEffect.hpp"
|
|
21
|
+
#include "JNativeListScrollEdgeEffect.hpp"
|
|
18
22
|
#include <functional>
|
|
19
23
|
#include <optional>
|
|
20
24
|
#include "JFunc_void_bool.hpp"
|
|
@@ -84,14 +88,14 @@ namespace margelo::nitro::nativelist {
|
|
|
84
88
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* containerSlotHeightsJson */)>("setContainerSlotHeightsJson");
|
|
85
89
|
method(_javaPart, jni::make_jstring(containerSlotHeightsJson));
|
|
86
90
|
}
|
|
87
|
-
|
|
88
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<
|
|
91
|
+
NativeListScrollEdgeEffect JHybridNativeListSpec::getTopScrollEdgeEffect() {
|
|
92
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNativeListScrollEdgeEffect>()>("getTopScrollEdgeEffect");
|
|
89
93
|
auto __result = method(_javaPart);
|
|
90
|
-
return
|
|
94
|
+
return __result->toCpp();
|
|
91
95
|
}
|
|
92
|
-
void JHybridNativeListSpec::
|
|
93
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<void(
|
|
94
|
-
method(_javaPart,
|
|
96
|
+
void JHybridNativeListSpec::setTopScrollEdgeEffect(NativeListScrollEdgeEffect topScrollEdgeEffect) {
|
|
97
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNativeListScrollEdgeEffect> /* topScrollEdgeEffect */)>("setTopScrollEdgeEffect");
|
|
98
|
+
method(_javaPart, JNativeListScrollEdgeEffect::fromCpp(topScrollEdgeEffect));
|
|
95
99
|
}
|
|
96
100
|
double JHybridNativeListSpec::getTopOverlayHeight() {
|
|
97
101
|
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getTopOverlayHeight");
|