@tamagui/core 1.112.3 → 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 +34 -24
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +34 -22
- 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
|
-
|
|
909
|
+
ResponderSystem.attachListeners();
|
|
910
|
+
var { onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onScrollShouldSetResponder, onScrollShouldSetResponderCapture, onSelectionChangeShouldSetResponder, onSelectionChangeShouldSetResponderCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture } = config, requiresResponderSystem = !!(onMoveShouldSetResponder || onMoveShouldSetResponderCapture || onScrollShouldSetResponder || onScrollShouldSetResponderCapture || onSelectionChangeShouldSetResponder || onSelectionChangeShouldSetResponderCapture || onStartShouldSetResponder || onStartShouldSetResponderCapture), node = hostRef.current.host;
|
|
911
|
+
if (requiresResponderSystem) return ResponderSystem.addNode(id, node, config), Attached.set(hostRef, !0), function() {
|
|
912
|
+
ResponderSystem.removeNode(node);
|
|
909
913
|
};
|
|
910
|
-
|
|
911
|
-
id
|
|
912
|
-
]), React3.useEffect(function() {
|
|
913
|
-
var { onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onScrollShouldSetResponder, onScrollShouldSetResponderCapture, onSelectionChangeShouldSetResponder, onSelectionChangeShouldSetResponderCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture } = config, requiresResponderSystem = onMoveShouldSetResponder != null || onMoveShouldSetResponderCapture != null || onScrollShouldSetResponder != null || onScrollShouldSetResponderCapture != null || onSelectionChangeShouldSetResponder != null || onSelectionChangeShouldSetResponderCapture != null || onStartShouldSetResponder != null || onStartShouldSetResponderCapture != null, node = hostRef.current;
|
|
914
|
-
requiresResponderSystem ? (ResponderSystem.addNode(id, node, config), isAttachedRef.current = !0) : isAttachedRef.current && (ResponderSystem.removeNode(id), isAttachedRef.current = !1);
|
|
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);
|
|
@@ -11192,7 +11190,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11192
11190
|
var import_jsx_runtime = require("react/jsx-runtime"), import_constants2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
11193
11191
|
function TamaguiProvider(param) {
|
|
11194
11192
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
11195
|
-
return (0, import_useMedia.setupMediaListeners)(), import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
11193
|
+
return (0, import_useMedia.setupMediaListeners)(), process.env.TAMAGUI_REACT_19 || import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
11196
11194
|
if (config && !disableInjectCSS) {
|
|
11197
11195
|
var style = document.createElement("style");
|
|
11198
11196
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -11202,18 +11200,30 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11202
11200
|
}, [
|
|
11203
11201
|
config,
|
|
11204
11202
|
disableInjectCSS
|
|
11205
|
-
]), /* @__PURE__ */ (0, import_jsx_runtime.
|
|
11206
|
-
children:
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11203
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
11204
|
+
children: [
|
|
11205
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UnmountedClassName, {
|
|
11206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
11207
|
+
animationDriver: config == null ? void 0 : config.animations,
|
|
11208
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
11209
|
+
themeClassNameOnRoot: themeClassNameOnRoot ?? (0, import_config.getSetting)("themeClassNameOnRoot"),
|
|
11210
|
+
disableRootThemeClass: disableRootThemeClass ?? (0, import_config.getSetting)("disableRootThemeClass"),
|
|
11211
|
+
defaultTheme: defaultTheme ?? (config ? Object.keys(config.themes)[0] : ""),
|
|
11212
|
+
reset,
|
|
11213
|
+
className,
|
|
11214
|
+
children
|
|
11215
|
+
})
|
|
11216
|
+
})
|
|
11217
|
+
}),
|
|
11218
|
+
process.env.TAMAGUI_REACT_19 && config && !disableInjectCSS && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
|
|
11219
|
+
// react 19 feature to hoist style tags to header:
|
|
11220
|
+
// https://react.dev/reference/react-dom/components/style
|
|
11221
|
+
// @ts-ignore
|
|
11222
|
+
precedence: "default",
|
|
11223
|
+
href: "tamagui-css",
|
|
11224
|
+
children: config.getCSS()
|
|
11225
|
+
}, "tamagui-css")
|
|
11226
|
+
]
|
|
11217
11227
|
});
|
|
11218
11228
|
}
|
|
11219
11229
|
function UnmountedClassName(props) {
|