@symbiote-native/engine 1.2.0 → 1.3.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/android/CMakeLists.txt +31 -1
- package/android/build.gradle +4 -1
- package/build/accessibility-info/index.android.js +21 -17
- package/build/accessibility-info/index.ios.js +2 -0
- package/build/accessibility-info/shared.d.ts +1 -1
- package/build/accessibility-props.d.ts +0 -11
- package/build/accessibility-props.js +30 -68
- package/build/alert/shared.d.ts +1 -1
- package/build/alert/shared.js +3 -7
- package/build/animated/graph.js +1 -1
- package/build/animated/leaf-lifecycle.js +2 -2
- package/build/app-state/index.d.ts +1 -1
- package/build/app-state/index.js +35 -27
- package/build/asset-source-resolver.d.ts +2 -0
- package/build/asset-source-resolver.js +13 -0
- package/build/back-handler/index.d.ts +7 -6
- package/build/back-handler/index.js +19 -16
- package/build/debug.js +8 -22
- package/build/dispatch.js +3 -9
- package/build/events/index.js +12 -3
- package/build/fabric-props.js +75 -180
- package/build/fabric.d.ts +2 -8
- package/build/fabric.js +27 -33
- package/build/host-access.d.ts +1 -128
- package/build/host-access.js +96 -205
- package/build/host-behavior.d.ts +1 -100
- package/build/host-behavior.js +125 -311
- package/build/image-loader.d.ts +4 -2
- package/build/image-loader.js +24 -48
- package/build/image-source-resolver.js +3 -7
- package/build/image-source-write.d.ts +1 -12
- package/build/image-source-write.js +28 -36
- package/build/imperative.d.ts +0 -28
- package/build/imperative.js +42 -92
- package/build/index.d.ts +3 -2
- package/build/index.js +30 -43
- package/build/invariant.d.ts +1 -0
- package/build/invariant.js +10 -0
- package/build/keyboard/index.js +11 -32
- package/build/linking/index.android.js +5 -3
- package/build/linking/shared.d.ts +1 -1
- package/build/linking/shared.js +16 -19
- package/build/mutation-buffer.d.ts +0 -177
- package/build/mutation-buffer.js +137 -308
- package/build/native-engine.d.ts +0 -102
- package/build/native-engine.js +38 -98
- package/build/native-events.d.ts +5 -0
- package/build/native-events.js +30 -18
- package/build/native-tree-host.d.ts +0 -21
- package/build/native-tree-host.js +14 -31
- package/build/node.d.ts +0 -212
- package/build/node.js +354 -774
- package/build/permissions-android/index.android.d.ts +59 -0
- package/build/permissions-android/index.android.js +47 -0
- package/build/permissions-android/index.d.ts +1 -115
- package/build/permissions-android/index.ios.d.ts +59 -0
- package/build/permissions-android/index.ios.js +31 -0
- package/build/permissions-android/index.js +3 -184
- package/build/permissions-android/shared.d.ts +63 -0
- package/build/permissions-android/shared.js +66 -0
- package/build/platform/index.android.js +3 -5
- package/build/platform/index.ios.js +3 -3
- package/build/platform/shared.d.ts +4 -0
- package/build/platform/shared.js +9 -0
- package/build/platform-color/index.android.d.ts +4 -0
- package/build/platform-color/index.android.js +7 -0
- package/build/platform-color/index.d.ts +2 -20
- package/build/platform-color/index.js +1 -45
- package/build/platform-color/shared.d.ts +21 -0
- package/build/platform-color/shared.js +41 -0
- package/build/post-commit.js +3 -8
- package/build/process-aspect-ratio.js +3 -7
- package/build/process-background-longhands.js +10 -19
- package/build/process-filter.js +11 -19
- package/build/process-font-variant.js +3 -7
- package/build/registry.d.ts +0 -33
- package/build/registry.js +22 -57
- package/build/report-error.js +4 -18
- package/build/settings/index.android.d.ts +6 -0
- package/build/settings/index.android.js +21 -0
- package/build/settings/index.d.ts +1 -8
- package/build/settings/index.ios.d.ts +8 -0
- package/build/settings/index.ios.js +122 -0
- package/build/settings/index.js +3 -122
- package/build/share/index.android.js +9 -32
- package/build/share/index.ios.js +14 -15
- package/build/share/shared.d.ts +4 -2
- package/build/share/shared.js +7 -10
- package/build/status-bar/index.android.js +1 -1
- package/build/status-bar/index.ios.js +4 -3
- package/build/structured-style.d.ts +0 -9
- package/build/structured-style.js +16 -31
- package/build/styles.js +3 -6
- package/build/surface.d.ts +0 -26
- package/build/surface.js +29 -76
- package/build/text-input-state.js +4 -8
- package/build/toast-android/index.android.d.ts +10 -0
- package/build/toast-android/index.android.js +108 -0
- package/build/toast-android/index.d.ts +1 -10
- package/build/toast-android/index.ios.d.ts +10 -0
- package/build/toast-android/index.ios.js +19 -0
- package/build/toast-android/index.js +3 -108
- package/build/touch-history.js +5 -11
- package/build/tree-host.d.ts +0 -270
- package/build/tree-host.js +63 -153
- package/build/view-config.js +17 -37
- package/cpp/SymbioteFabricProps.cpp +204 -120
- package/cpp/SymbioteFabricProps.h +5 -0
- package/cpp/SymbioteTree.cpp +20 -6
- package/package.json +2 -2
package/cpp/SymbioteTree.cpp
CHANGED
|
@@ -18,9 +18,10 @@
|
|
|
18
18
|
#include <react/renderer/uimanager/primitives.h>
|
|
19
19
|
|
|
20
20
|
// `react/renderer/dom/` is NOT among the header folders ReactAndroid copies into its prefab
|
|
21
|
-
// (`ReactAndroid/build.gradle.kts` lists uimanager, mounting, core, … and no dom),
|
|
22
|
-
//
|
|
23
|
-
//
|
|
21
|
+
// (`ReactAndroid/build.gradle.kts` lists uimanager, mounting, core, … and no dom), though
|
|
22
|
+
// libreactnative.so exports the functions. `android/CMakeLists.txt` copies `DOM.h` from the app's
|
|
23
|
+
// react-native onto the include path; without it this falls back to the throwing stubs. iOS compiles
|
|
24
|
+
// against the full ReactCommon tree and has it.
|
|
24
25
|
//
|
|
25
26
|
// Detected rather than branched on `__ANDROID__`, because the fact is about the TOOLCHAIN'S HEADERS,
|
|
26
27
|
// not about the platform — and it self-heals the day upstream exports the folder. The three
|
|
@@ -73,6 +74,13 @@ constexpr int32_t kOpCreateVoid = 13;
|
|
|
73
74
|
// The owned listener names any platform rule reads, one bit each — see `Node::pressListeners`.
|
|
74
75
|
// `press` is deliberately bit 0 so the `focusable` question is the cheapest of the two.
|
|
75
76
|
constexpr uint8_t kPressListenerPress = 1u << 0;
|
|
77
|
+
// The four press names; `hasAnyPressListener` asks about these and nothing else.
|
|
78
|
+
constexpr uint8_t kPressListenerMask = 0x0f;
|
|
79
|
+
// ScrollView's `sendMomentumEvents` (`ScrollView.js:1801-1804`) asks about either of these two.
|
|
80
|
+
constexpr uint8_t kMomentumListenerMask = (1u << 4) | (1u << 5);
|
|
81
|
+
// Text's pressability (`Text.js:145-163`): onPress / onLongPress, plus onStartShouldSetResponder.
|
|
82
|
+
constexpr uint8_t kTextPressMask = kPressListenerPress | (1u << 3);
|
|
83
|
+
constexpr uint8_t kStartShouldSetResponder = 1u << 6;
|
|
76
84
|
|
|
77
85
|
/** 0 for a name the host has no rule for, which is nearly all of them. */
|
|
78
86
|
uint8_t pressListenerBit(const std::string &name) {
|
|
@@ -80,6 +88,9 @@ uint8_t pressListenerBit(const std::string &name) {
|
|
|
80
88
|
if (name == "pressIn") return 1u << 1;
|
|
81
89
|
if (name == "pressOut") return 1u << 2;
|
|
82
90
|
if (name == "longPress") return 1u << 3;
|
|
91
|
+
if (name == "momentumScrollBegin") return 1u << 4;
|
|
92
|
+
if (name == "momentumScrollEnd") return 1u << 5;
|
|
93
|
+
if (name == "startShouldSetResponder") return kStartShouldSetResponder;
|
|
83
94
|
return 0;
|
|
84
95
|
}
|
|
85
96
|
|
|
@@ -1055,15 +1066,18 @@ IOwner ownerOf(const Node &node) {
|
|
|
1055
1066
|
node.parent->tagName.c_str(),
|
|
1056
1067
|
(node.parent->pressListeners & kPressListenerPress) != 0,
|
|
1057
1068
|
node.parent->underlayShown,
|
|
1058
|
-
node.parent->pressListeners != 0};
|
|
1069
|
+
(node.parent->pressListeners & kPressListenerMask) != 0};
|
|
1059
1070
|
}
|
|
1060
1071
|
|
|
1061
1072
|
/** The node's own non-prop bits, unpacked from the mask the ops maintain. See `ISelf`. */
|
|
1062
1073
|
ISelf selfOf(const Node &node) {
|
|
1063
1074
|
return ISelf{
|
|
1064
1075
|
(node.pressListeners & kPressListenerPress) != 0,
|
|
1065
|
-
node.pressListeners != 0,
|
|
1066
|
-
node.underlayShown
|
|
1076
|
+
(node.pressListeners & kPressListenerMask) != 0,
|
|
1077
|
+
node.underlayShown,
|
|
1078
|
+
(node.pressListeners & kMomentumListenerMask) != 0,
|
|
1079
|
+
(node.pressListeners & kTextPressMask) != 0,
|
|
1080
|
+
(node.pressListeners & kStartShouldSetResponder) != 0};
|
|
1067
1081
|
}
|
|
1068
1082
|
|
|
1069
1083
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "SymbioteNative's retained shadow-tree engine — clone-on-write commit path + event normalization over React Native Fabric, shared by every framework adapter.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"peerDependenciesMeta": {},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@symbiote-native/test-utils": "0.4.
|
|
74
|
+
"@symbiote-native/test-utils": "0.4.4"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"typecheck": "tsc --build",
|