@tamagui/core 1.112.4 → 1.112.5
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/dist/native.js +9 -11
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +9 -9
- package/dist/test.native.js.map +1 -1
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -900,18 +900,18 @@ var require_useResponderEvents_native = __commonJS({
|
|
|
900
900
|
module2.exports = __toCommonJS2(useResponderEvents_exports);
|
|
901
901
|
var React3 = __toESM2(require("react")), ResponderSystem = __toESM2(require_ResponderSystem_native());
|
|
902
902
|
__reExport2(useResponderEvents_exports, require_utils_native(), module2.exports);
|
|
903
|
-
var emptyObject = {};
|
|
903
|
+
var emptyObject = {}, Attached = /* @__PURE__ */ new WeakMap(), Ids = /* @__PURE__ */ new WeakMap();
|
|
904
904
|
function useResponderEvents2(hostRef) {
|
|
905
|
-
var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : emptyObject
|
|
905
|
+
var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : emptyObject;
|
|
906
|
+
Ids.has(hostRef) || Ids.set(hostRef, `${Math.random()}`);
|
|
907
|
+
var id = Ids.get(hostRef);
|
|
906
908
|
React3.useEffect(function() {
|
|
907
|
-
|
|
908
|
-
ResponderSystem.removeNode(id);
|
|
909
|
-
};
|
|
910
|
-
}, [
|
|
911
|
-
id
|
|
912
|
-
]), React3.useEffect(function() {
|
|
909
|
+
ResponderSystem.attachListeners();
|
|
913
910
|
var { onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onScrollShouldSetResponder, onScrollShouldSetResponderCapture, onSelectionChangeShouldSetResponder, onSelectionChangeShouldSetResponderCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture } = config, requiresResponderSystem = !!(onMoveShouldSetResponder || onMoveShouldSetResponderCapture || onScrollShouldSetResponder || onScrollShouldSetResponderCapture || onSelectionChangeShouldSetResponder || onSelectionChangeShouldSetResponderCapture || onStartShouldSetResponder || onStartShouldSetResponderCapture), node = hostRef.current.host;
|
|
914
|
-
requiresResponderSystem
|
|
911
|
+
if (requiresResponderSystem) return ResponderSystem.addNode(id, node, config), Attached.set(hostRef, !0), function() {
|
|
912
|
+
ResponderSystem.removeNode(node);
|
|
913
|
+
};
|
|
914
|
+
Attached.get(node) && (ResponderSystem.removeNode(node), Attached.set(hostRef, !1));
|
|
915
915
|
}, [
|
|
916
916
|
config,
|
|
917
917
|
hostRef,
|
|
@@ -2026,8 +2026,6 @@ Haven't called createTamagui yet.
|
|
|
2026
2026
|
Tamagui needs every @tamagui/* dependency to be on the exact same version, we include an upgrade script
|
|
2027
2027
|
with the starter kits that you can call with "yarn upgrade:tamagui" to help with this.
|
|
2028
2028
|
|
|
2029
|
-
Be sure to remove "react-native-web-lite" as it has been deprecated and can cause this too.
|
|
2030
|
-
|
|
2031
2029
|
You may want to clear your node_modules as well and run a fresh install after ugprading.
|
|
2032
2030
|
` : "\u274C Error 001", getSetting = function(key) {
|
|
2033
2031
|
if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
|