@tamagui/react-native-web-lite 3.0.0-beta.807.1 → 3.0.0-beta.881.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.
@@ -22,7 +22,7 @@ var AppState_exports = {};
22
22
  __export(AppState_exports, { AppState: () => AppState });
23
23
  module.exports = __toCommonJS(AppState_exports);
24
24
  var import_react_native_web_internals = require("@tamagui/react-native-web-internals");
25
- const isPrefixed = import_react_native_web_internals.canUseDOM && !document.hasOwnProperty("hidden") && document.hasOwnProperty("webkitHidden");
25
+ const isPrefixed = import_react_native_web_internals.canUseDOM && !("hidden" in document) && "webkitHidden" in document;
26
26
  const EVENT_TYPES = ["change", "memoryWarning"];
27
27
  const VISIBILITY_CHANGE_EVENT = isPrefixed ? "webkitvisibilitychange" : "visibilitychange";
28
28
  const VISIBILITY_STATE_PROPERTY = isPrefixed ? "webkitVisibilityState" : "visibilityState";
@@ -281,16 +281,16 @@ function addWhitelistedInterpolationParam(param) {
281
281
  SUPPORTED_INTERPOLATION_PARAMS[param] = true;
282
282
  }
283
283
  function isSupportedColorStyleProp(prop) {
284
- return SUPPORTED_COLOR_STYLES.hasOwnProperty(prop);
284
+ return prop in SUPPORTED_COLOR_STYLES;
285
285
  }
286
286
  function isSupportedStyleProp(prop) {
287
- return SUPPORTED_STYLES.hasOwnProperty(prop);
287
+ return prop in SUPPORTED_STYLES;
288
288
  }
289
289
  function isSupportedTransformProp(prop) {
290
- return SUPPORTED_TRANSFORMS.hasOwnProperty(prop);
290
+ return prop in SUPPORTED_TRANSFORMS;
291
291
  }
292
292
  function isSupportedInterpolationParam(param) {
293
- return SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(param);
293
+ return param in SUPPORTED_INTERPOLATION_PARAMS;
294
294
  }
295
295
  function validateTransform(configs) {
296
296
  configs.forEach((config) => {
@@ -1,6 +1,6 @@
1
1
  import { canUseDOM, invariant } from "@tamagui/react-native-web-internals";
2
2
 
3
- const isPrefixed = canUseDOM && !document.hasOwnProperty("hidden") && document.hasOwnProperty("webkitHidden");
3
+ const isPrefixed = canUseDOM && !("hidden" in document) && "webkitHidden" in document;
4
4
  const EVENT_TYPES = ["change", "memoryWarning"];
5
5
  const VISIBILITY_CHANGE_EVENT = isPrefixed ? "webkitvisibilitychange" : "visibilitychange";
6
6
  const VISIBILITY_STATE_PROPERTY = isPrefixed ? "webkitVisibilityState" : "visibilityState";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["esm/AppState/index.js"],"sourcesContent":["import { canUseDOM, invariant } from \"@tamagui/react-native-web-internals\";\nconst isPrefixed = (\n // eslint-disable-next-line no-prototype-builtins\n canUseDOM && !document.hasOwnProperty(\"hidden\") && document.hasOwnProperty(\"webkitHidden\")\n);\nconst EVENT_TYPES = [\"change\", \"memoryWarning\"];\nconst VISIBILITY_CHANGE_EVENT = isPrefixed ? \"webkitvisibilitychange\" : \"visibilitychange\";\nconst VISIBILITY_STATE_PROPERTY = isPrefixed ? \"webkitVisibilityState\" : \"visibilityState\";\nconst AppStates = {\n BACKGROUND: \"background\",\n ACTIVE: \"active\"\n};\nclass EventEmitter {\n listeners = {};\n addListener(type, handler) {\n this.listeners[type] ??= /* @__PURE__ */ new Set();\n this.listeners[type].add(handler);\n }\n emit(type, state) {\n this.listeners[type]?.forEach((cb) => cb(state));\n }\n removeListener(type, handler) {\n this.listeners[type]?.delete(handler);\n }\n}\nlet hasBoundVisibilityChangeEvent = false;\nconst changeEmitter = new EventEmitter();\nclass AppState {\n static isAvailable = canUseDOM && document[VISIBILITY_STATE_PROPERTY];\n static get currentState() {\n if (!AppState.isAvailable) {\n return AppStates.ACTIVE;\n }\n switch (document[VISIBILITY_STATE_PROPERTY]) {\n case \"hidden\":\n case \"prerender\":\n case \"unloaded\":\n return AppStates.BACKGROUND;\n default:\n return AppStates.ACTIVE;\n }\n }\n static addEventListener(type, handler) {\n if (AppState.isAvailable) {\n invariant(\n EVENT_TYPES.indexOf(type) !== -1,\n 'Trying to subscribe to unknown event: \"%s\"',\n type\n );\n if (type === \"change\") {\n if (!hasBoundVisibilityChangeEvent) {\n hasBoundVisibilityChangeEvent = true;\n document.addEventListener(\n VISIBILITY_CHANGE_EVENT,\n () => {\n if (changeEmitter) {\n changeEmitter.emit(\"change\", AppState.currentState);\n }\n },\n false\n );\n }\n return changeEmitter.addListener(type, handler);\n }\n }\n }\n}\nexport {\n AppState\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,MAAM,aAEJ,aAAa,CAAC,SAAS,eAAe,QAAQ,KAAK,SAAS,eAAe,cAAc;AAE3F,MAAM,cAAc,CAAC,UAAU,eAAe;AAC9C,MAAM,0BAA0B,aAAa,2BAA2B;AACxE,MAAM,4BAA4B,aAAa,0BAA0B;AACzE,MAAM,YAAY;CAChB,YAAY;CACZ,QAAQ;AACV;AACA,IAAM,eAAN,MAAmB;CACjB,YAAY,CAAC;CACb,YAAY,MAAM,SAAS;EACzB,KAAK,UAAU,0BAA0B,IAAI,IAAI;EACjD,KAAK,UAAU,KAAK,CAAC,IAAI,OAAO;CAClC;CACA,KAAK,MAAM,OAAO;EAChB,KAAK,UAAU,KAAK,EAAE,SAAS,OAAO,GAAG,KAAK,CAAC;CACjD;CACA,eAAe,MAAM,SAAS;EAC5B,KAAK,UAAU,KAAK,EAAE,OAAO,OAAO;CACtC;AACF;AACA,IAAI,gCAAgC;AACpC,MAAM,gBAAgB,IAAI,aAAa;AACvC,IAAM,WAAN,MAAM,SAAS;CACb,OAAO,cAAc,aAAa,SAAS;CAC3C,WAAW,eAAe;EACxB,IAAI,CAAC,SAAS,aAAa;GACzB,OAAO,UAAU;EACnB;EACA,QAAQ,SAAS,4BAAjB;GACE,KAAK;GACL,KAAK;GACL,KAAK,YACH,OAAO,UAAU;GACnB,SACE,OAAO,UAAU;EACrB;CACF;CACA,OAAO,iBAAiB,MAAM,SAAS;EACrC,IAAI,SAAS,aAAa;GACxB,UACE,YAAY,QAAQ,IAAI,MAAM,CAAC,GAC/B,gDACA,IACF;GACA,IAAI,SAAS,UAAU;IACrB,IAAI,CAAC,+BAA+B;KAClC,gCAAgC;KAChC,SAAS,iBACP,+BACM;MACJ,IAAI,eAAe;OACjB,cAAc,KAAK,UAAU,SAAS,YAAY;MACpD;KACF,GACA,KACF;IACF;IACA,OAAO,cAAc,YAAY,MAAM,OAAO;GAChD;EACF;CACF;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/AppState/index.js"],"sourcesContent":["import { canUseDOM, invariant } from \"@tamagui/react-native-web-internals\";\nconst isPrefixed = canUseDOM && !(\"hidden\" in document) && \"webkitHidden\" in document;\nconst EVENT_TYPES = [\"change\", \"memoryWarning\"];\nconst VISIBILITY_CHANGE_EVENT = isPrefixed ? \"webkitvisibilitychange\" : \"visibilitychange\";\nconst VISIBILITY_STATE_PROPERTY = isPrefixed ? \"webkitVisibilityState\" : \"visibilityState\";\nconst AppStates = {\n BACKGROUND: \"background\",\n ACTIVE: \"active\"\n};\nclass EventEmitter {\n listeners = {};\n addListener(type, handler) {\n this.listeners[type] ??= /* @__PURE__ */ new Set();\n this.listeners[type].add(handler);\n }\n emit(type, state) {\n this.listeners[type]?.forEach((cb) => cb(state));\n }\n removeListener(type, handler) {\n this.listeners[type]?.delete(handler);\n }\n}\nlet hasBoundVisibilityChangeEvent = false;\nconst changeEmitter = new EventEmitter();\nclass AppState {\n static isAvailable = canUseDOM && document[VISIBILITY_STATE_PROPERTY];\n static get currentState() {\n if (!AppState.isAvailable) {\n return AppStates.ACTIVE;\n }\n switch (document[VISIBILITY_STATE_PROPERTY]) {\n case \"hidden\":\n case \"prerender\":\n case \"unloaded\":\n return AppStates.BACKGROUND;\n default:\n return AppStates.ACTIVE;\n }\n }\n static addEventListener(type, handler) {\n if (AppState.isAvailable) {\n invariant(\n EVENT_TYPES.indexOf(type) !== -1,\n 'Trying to subscribe to unknown event: \"%s\"',\n type\n );\n if (type === \"change\") {\n if (!hasBoundVisibilityChangeEvent) {\n hasBoundVisibilityChangeEvent = true;\n document.addEventListener(\n VISIBILITY_CHANGE_EVENT,\n () => {\n if (changeEmitter) {\n changeEmitter.emit(\"change\", AppState.currentState);\n }\n },\n false\n );\n }\n return changeEmitter.addListener(type, handler);\n }\n }\n }\n}\nexport {\n AppState\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,MAAM,aAAa,aAAa,EAAE,YAAY,aAAa,kBAAkB;AAC7E,MAAM,cAAc,CAAC,UAAU,eAAe;AAC9C,MAAM,0BAA0B,aAAa,2BAA2B;AACxE,MAAM,4BAA4B,aAAa,0BAA0B;AACzE,MAAM,YAAY;CAChB,YAAY;CACZ,QAAQ;AACV;AACA,IAAM,eAAN,MAAmB;CACjB,YAAY,CAAC;CACb,YAAY,MAAM,SAAS;EACzB,KAAK,UAAU,0BAA0B,IAAI,IAAI;EACjD,KAAK,UAAU,KAAK,CAAC,IAAI,OAAO;CAClC;CACA,KAAK,MAAM,OAAO;EAChB,KAAK,UAAU,KAAK,EAAE,SAAS,OAAO,GAAG,KAAK,CAAC;CACjD;CACA,eAAe,MAAM,SAAS;EAC5B,KAAK,UAAU,KAAK,EAAE,OAAO,OAAO;CACtC;AACF;AACA,IAAI,gCAAgC;AACpC,MAAM,gBAAgB,IAAI,aAAa;AACvC,IAAM,WAAN,MAAM,SAAS;CACb,OAAO,cAAc,aAAa,SAAS;CAC3C,WAAW,eAAe;EACxB,IAAI,CAAC,SAAS,aAAa;GACzB,OAAO,UAAU;EACnB;EACA,QAAQ,SAAS,4BAAjB;GACE,KAAK;GACL,KAAK;GACL,KAAK,YACH,OAAO,UAAU;GACnB,SACE,OAAO,UAAU;EACrB;CACF;CACA,OAAO,iBAAiB,MAAM,SAAS;EACrC,IAAI,SAAS,aAAa;GACxB,UACE,YAAY,QAAQ,IAAI,MAAM,CAAC,GAC/B,gDACA,IACF;GACA,IAAI,SAAS,UAAU;IACrB,IAAI,CAAC,+BAA+B;KAClC,gCAAgC;KAChC,SAAS,iBACP,+BACM;MACJ,IAAI,eAAe;OACjB,cAAc,KAAK,UAAU,SAAS,YAAY;MACpD;KACF,GACA,KACF;IACF;IACA,OAAO,cAAc,YAAY,MAAM,OAAO;GAChD;EACF;CACF;AACF"}
@@ -240,16 +240,16 @@ function addWhitelistedInterpolationParam(param) {
240
240
  SUPPORTED_INTERPOLATION_PARAMS[param] = true;
241
241
  }
242
242
  function isSupportedColorStyleProp(prop) {
243
- return SUPPORTED_COLOR_STYLES.hasOwnProperty(prop);
243
+ return prop in SUPPORTED_COLOR_STYLES;
244
244
  }
245
245
  function isSupportedStyleProp(prop) {
246
- return SUPPORTED_STYLES.hasOwnProperty(prop);
246
+ return prop in SUPPORTED_STYLES;
247
247
  }
248
248
  function isSupportedTransformProp(prop) {
249
- return SUPPORTED_TRANSFORMS.hasOwnProperty(prop);
249
+ return prop in SUPPORTED_TRANSFORMS;
250
250
  }
251
251
  function isSupportedInterpolationParam(param) {
252
- return SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(param);
252
+ return param in SUPPORTED_INTERPOLATION_PARAMS;
253
253
  }
254
254
  function validateTransform(configs) {
255
255
  configs.forEach((config) => {
@@ -1 +1 @@
1
- {"version":3,"file":"NativeAnimatedHelper.js","names":[],"sources":["esm/vendor/react-native/Animated/NativeAnimatedHelper.js"],"sourcesContent":["import { NativeAnimatedNonTurboModule } from \"./NativeAnimatedModule\";\nimport { NativeAnimatedTurboModule } from \"./NativeAnimatedTurboModule\";\nimport { NativeEventEmitter } from \"../EventEmitter/NativeEventEmitter\";\nimport { Platform } from \"../Utilities/Platform\";\nimport { ReactNativeFeatureFlags } from \"../ReactNative/ReactNativeFeatureFlags\";\nimport { invariant } from \"@tamagui/react-native-web-internals\";\nimport { RCTDeviceEventEmitter } from \"../EventEmitter/RCTDeviceEventEmitter\";\nconst NativeAnimatedModule = Platform.OS === \"ios\" && global.RN$Bridgeless === true ? NativeAnimatedTurboModule : NativeAnimatedNonTurboModule;\nlet __nativeAnimatedNodeTagCount = 1;\nlet __nativeAnimationIdCount = 1;\nlet nativeEventEmitter;\nlet waitingForQueuedOperations = /* @__PURE__ */ new Set();\nlet queueOperations = false;\nlet queue = [];\nlet singleOpQueue = [];\nconst useSingleOpBatching = false;\nPlatform.OS === \"android\" && !!NativeAnimatedModule?.queueAndExecuteBatchedOperations && ReactNativeFeatureFlags.animatedShouldUseSingleOp();\nlet flushQueueTimeout = null;\nconst eventListenerGetValueCallbacks = {};\nconst eventListenerAnimationFinishedCallbacks = {};\nconst nativeOps = useSingleOpBatching ? (function() {\n const apis = [\n \"createAnimatedNode\",\n // 1\n \"updateAnimatedNodeConfig\",\n // 2\n \"getValue\",\n // 3\n \"startListeningToAnimatedNodeValue\",\n // 4\n \"stopListeningToAnimatedNodeValue\",\n // 5\n \"connectAnimatedNodes\",\n // 6\n \"disconnectAnimatedNodes\",\n // 7\n \"startAnimatingNode\",\n // 8\n \"stopAnimation\",\n // 9\n \"setAnimatedNodeValue\",\n // 10\n \"setAnimatedNodeOffset\",\n // 11\n \"flattenAnimatedNodeOffset\",\n // 12\n \"extractAnimatedNodeOffset\",\n // 13\n \"connectAnimatedNodeToView\",\n // 14\n \"disconnectAnimatedNodeFromView\",\n // 15\n \"restoreDefaultValues\",\n // 16\n \"dropAnimatedNode\",\n // 17\n \"addAnimatedEventToView\",\n // 18\n \"removeAnimatedEventFromView\",\n // 19\n \"addListener\",\n // 20\n \"removeListener\"\n // 21\n ];\n return apis.reduce((acc, functionName, i) => {\n acc[functionName] = i + 1;\n return acc;\n }, {});\n})() : NativeAnimatedModule;\nconst API = {\n getValue: function(tag, saveValueCallback) {\n invariant(nativeOps, \"Native animated module is not available\");\n if (useSingleOpBatching) {\n if (saveValueCallback) {\n eventListenerGetValueCallbacks[tag] = saveValueCallback;\n }\n API.queueOperation(nativeOps.getValue, tag);\n } else {\n API.queueOperation(nativeOps.getValue, tag, saveValueCallback);\n }\n },\n setWaitingForIdentifier: function(id) {\n waitingForQueuedOperations.add(id);\n queueOperations = true;\n if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush() && flushQueueTimeout) {\n clearTimeout(flushQueueTimeout);\n }\n },\n unsetWaitingForIdentifier: function(id) {\n waitingForQueuedOperations.delete(id);\n if (waitingForQueuedOperations.size === 0) {\n queueOperations = false;\n API.disableQueue();\n }\n },\n disableQueue: function() {\n invariant(nativeOps, \"Native animated module is not available\");\n if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush()) {\n const prevTimeout = flushQueueTimeout;\n clearImmediate(prevTimeout);\n flushQueueTimeout = setImmediate(API.flushQueue);\n } else {\n API.flushQueue();\n }\n },\n flushQueue: function() {\n },\n queueOperation: (fn, ...args) => {\n if (useSingleOpBatching) {\n singleOpQueue.push(fn, ...args);\n return;\n }\n if (queueOperations || queue.length !== 0) {\n queue.push(() => fn(...args));\n } else {\n fn(...args);\n }\n },\n createAnimatedNode: function(tag, config) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.createAnimatedNode, tag, config);\n },\n updateAnimatedNodeConfig: function(tag, config) {\n invariant(nativeOps, \"Native animated module is not available\");\n },\n startListeningToAnimatedNodeValue: function(tag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.startListeningToAnimatedNodeValue, tag);\n },\n stopListeningToAnimatedNodeValue: function(tag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.stopListeningToAnimatedNodeValue, tag);\n },\n connectAnimatedNodes: function(parentTag, childTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.connectAnimatedNodes, parentTag, childTag);\n },\n disconnectAnimatedNodes: function(parentTag, childTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.disconnectAnimatedNodes, parentTag, childTag);\n },\n startAnimatingNode: function(animationId, nodeTag, config, endCallback) {\n invariant(nativeOps, \"Native animated module is not available\");\n if (useSingleOpBatching) {\n if (endCallback) {\n eventListenerAnimationFinishedCallbacks[animationId] = endCallback;\n }\n API.queueOperation(nativeOps.startAnimatingNode, animationId, nodeTag, config);\n } else {\n API.queueOperation(\n nativeOps.startAnimatingNode,\n animationId,\n nodeTag,\n config,\n endCallback\n );\n }\n },\n stopAnimation: function(animationId) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.stopAnimation, animationId);\n },\n setAnimatedNodeValue: function(nodeTag, value) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.setAnimatedNodeValue, nodeTag, value);\n },\n setAnimatedNodeOffset: function(nodeTag, offset) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.setAnimatedNodeOffset, nodeTag, offset);\n },\n flattenAnimatedNodeOffset: function(nodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.flattenAnimatedNodeOffset, nodeTag);\n },\n extractAnimatedNodeOffset: function(nodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.extractAnimatedNodeOffset, nodeTag);\n },\n connectAnimatedNodeToView: function(nodeTag, viewTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.connectAnimatedNodeToView, nodeTag, viewTag);\n },\n disconnectAnimatedNodeFromView: function(nodeTag, viewTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.disconnectAnimatedNodeFromView, nodeTag, viewTag);\n },\n restoreDefaultValues: function(nodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n if (nativeOps.restoreDefaultValues != null) {\n API.queueOperation(nativeOps.restoreDefaultValues, nodeTag);\n }\n },\n dropAnimatedNode: function(tag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.dropAnimatedNode, tag);\n },\n addAnimatedEventToView: function(viewTag, eventName, eventMapping) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.addAnimatedEventToView, viewTag, eventName, eventMapping);\n },\n removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(\n nativeOps.removeAnimatedEventFromView,\n viewTag,\n eventName,\n animatedNodeTag\n );\n }\n};\nconst SUPPORTED_COLOR_STYLES = {\n backgroundColor: true,\n borderBottomColor: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderStartColor: true,\n borderTopColor: true,\n color: true,\n tintColor: true\n};\nconst SUPPORTED_STYLES = {\n ...SUPPORTED_COLOR_STYLES,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderRadius: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n elevation: true,\n opacity: true,\n transform: true,\n zIndex: true,\n /* ios styles */\n shadowOpacity: true,\n shadowRadius: true,\n /* legacy android transform properties */\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true\n};\nconst SUPPORTED_TRANSFORMS = {\n translateX: true,\n translateY: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n rotate: true,\n rotateX: true,\n rotateY: true,\n rotateZ: true,\n perspective: true\n};\nconst SUPPORTED_INTERPOLATION_PARAMS = {\n inputRange: true,\n outputRange: true,\n extrapolate: true,\n extrapolateRight: true,\n extrapolateLeft: true\n};\nfunction addWhitelistedStyleProp(prop) {\n SUPPORTED_STYLES[prop] = true;\n}\nfunction addWhitelistedTransformProp(prop) {\n SUPPORTED_TRANSFORMS[prop] = true;\n}\nfunction addWhitelistedInterpolationParam(param) {\n SUPPORTED_INTERPOLATION_PARAMS[param] = true;\n}\nfunction isSupportedColorStyleProp(prop) {\n return SUPPORTED_COLOR_STYLES.hasOwnProperty(prop);\n}\nfunction isSupportedStyleProp(prop) {\n return SUPPORTED_STYLES.hasOwnProperty(prop);\n}\nfunction isSupportedTransformProp(prop) {\n return SUPPORTED_TRANSFORMS.hasOwnProperty(prop);\n}\nfunction isSupportedInterpolationParam(param) {\n return SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(param);\n}\nfunction validateTransform(configs) {\n configs.forEach((config) => {\n if (!isSupportedTransformProp(config.property)) {\n throw new Error(\n `Property '${config.property}' is not supported by native animated module`\n );\n }\n });\n}\nfunction validateStyles(styles) {\n for (const key in styles) {\n if (!isSupportedStyleProp(key)) {\n throw new Error(\n `Style property '${key}' is not supported by native animated module`\n );\n }\n }\n}\nfunction validateInterpolation(config) {\n for (const key in config) {\n if (!isSupportedInterpolationParam(key)) {\n throw new Error(\n `Interpolation property '${key}' is not supported by native animated module`\n );\n }\n }\n}\nfunction generateNewNodeTag() {\n return __nativeAnimatedNodeTagCount++;\n}\nfunction generateNewAnimationId() {\n return __nativeAnimationIdCount++;\n}\nfunction assertNativeAnimatedModule() {\n invariant(NativeAnimatedModule, \"Native animated module is not available\");\n}\nlet _warnedMissingNativeAnimated = false;\nfunction shouldUseNativeDriver(config) {\n if (config.useNativeDriver == null) {\n console.warn(\n \"Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`\"\n );\n }\n if (config.useNativeDriver === true && !NativeAnimatedModule) {\n if (!_warnedMissingNativeAnimated) {\n console.warn(\n \"Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. Make sure to run `bundle exec pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md\"\n );\n _warnedMissingNativeAnimated = true;\n }\n return false;\n }\n return config.useNativeDriver || false;\n}\nfunction transformDataType(value) {\n if (typeof value !== \"string\") {\n return value;\n }\n if (/deg$/.test(value)) {\n const degrees = parseFloat(value) || 0;\n const radians = degrees * Math.PI / 180;\n return radians;\n } else {\n return value;\n }\n}\nconst NativeAnimatedHelper = {\n API,\n isSupportedColorStyleProp,\n isSupportedStyleProp,\n isSupportedTransformProp,\n isSupportedInterpolationParam,\n addWhitelistedStyleProp,\n addWhitelistedTransformProp,\n addWhitelistedInterpolationParam,\n validateStyles,\n validateTransform,\n validateInterpolation,\n generateNewNodeTag,\n generateNewAnimationId,\n assertNativeAnimatedModule,\n shouldUseNativeDriver,\n transformDataType,\n get nativeEventEmitter() {\n if (!nativeEventEmitter) {\n nativeEventEmitter = new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== \"ios\" ? null : NativeAnimatedModule\n );\n }\n return nativeEventEmitter;\n }\n};\nvar NativeAnimatedHelper_default = NativeAnimatedHelper;\nexport {\n API,\n NativeAnimatedHelper,\n addWhitelistedInterpolationParam,\n addWhitelistedStyleProp,\n addWhitelistedTransformProp,\n assertNativeAnimatedModule,\n NativeAnimatedHelper_default as default,\n generateNewAnimationId,\n generateNewNodeTag,\n isSupportedColorStyleProp,\n isSupportedInterpolationParam,\n isSupportedStyleProp,\n isSupportedTransformProp,\n shouldUseNativeDriver,\n transformDataType,\n validateInterpolation,\n validateStyles,\n validateTransform\n};\n//# sourceMappingURL=NativeAnimatedHelper.js.map\n"],"mappings":";;;;;;;;;AAOA,MAAM,uBAAuB,SAAS,OAAO,SAAS,OAAO,kBAAkB,OAAO,4BAA4B;AAClH,IAAI,+BAA+B;AACnC,IAAI,2BAA2B;AAC/B,IAAI;AACJ,IAAI,6CAA6C,IAAI,IAAI;AACzD,IAAI,kBAAkB;AACtB,IAAI,QAAQ,CAAC;AACb,IAAI,gBAAgB,CAAC;AACrB,MAAM,sBAAsB;AAC5B,SAAS,OAAO,aAAa,CAAC,CAAC,sBAAsB,oCAAoC,wBAAwB,0BAA0B;AAC3I,IAAI,oBAAoB;AACxB,MAAM,iCAAiC,CAAC;AACxC,MAAM,0CAA0C,CAAC;AACjD,MAAM,YAAY,uBAAuB,WAAW;CAClD,MAAM,OAAO;EACX;EAEA;EAEA;EAEA;EAE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AAyC;AAC3E;AACA,IAAI,+BAA+B;AACnC,SAAS,sBAAsB,QAAQ;CACrC,IAAI,OAAO,mBAAmB,MAAM;EAClC,QAAQ,KACN,0HACF;CACF;CACA,IAAI,OAAO,oBAAoB,QAAQ,CAAC,sBAAsB;EAC5D,IAAI,CAAC,8BAA8B;GACjC,QAAQ,KACN,mXACF;GACA,+BAA+B;EACjC;EACA,OAAO;CACT;CACA,OAAO,OAAO,mBAAmB;AACnC;AACA,SAAS,kBAAkB,OAAO;CAChC,IAAI,OAAO,UAAU,UAAU;EAC7B,OAAO;CACT;CACA,IAAI,OAAO,KAAK,KAAK,GAAG;EACtB,MAAM,UAAU,WAAW,KAAK,KAAK;EACrC,MAAM,UAAU,UAAU,KAAK,KAAK;EACpC,OAAO;CACT,OAAO;EACL,OAAO;CACT;AACF;AACA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,IAAI,qBAAqB;EACvB,IAAI,CAAC,oBAAoB;GACvB,qBAAqB,IAAI,mBAGvB,SAAS,OAAO,QAAQ,OAAO,oBACjC;EACF;EACA,OAAO;CACT;AACF;AACA,IAAI,+BAA+B"}
1
+ {"version":3,"file":"NativeAnimatedHelper.js","names":[],"sources":["esm/vendor/react-native/Animated/NativeAnimatedHelper.js"],"sourcesContent":["import { NativeAnimatedNonTurboModule } from \"./NativeAnimatedModule\";\nimport { NativeAnimatedTurboModule } from \"./NativeAnimatedTurboModule\";\nimport { NativeEventEmitter } from \"../EventEmitter/NativeEventEmitter\";\nimport { Platform } from \"../Utilities/Platform\";\nimport { ReactNativeFeatureFlags } from \"../ReactNative/ReactNativeFeatureFlags\";\nimport { invariant } from \"@tamagui/react-native-web-internals\";\nimport { RCTDeviceEventEmitter } from \"../EventEmitter/RCTDeviceEventEmitter\";\nconst NativeAnimatedModule = Platform.OS === \"ios\" && global.RN$Bridgeless === true ? NativeAnimatedTurboModule : NativeAnimatedNonTurboModule;\nlet __nativeAnimatedNodeTagCount = 1;\nlet __nativeAnimationIdCount = 1;\nlet nativeEventEmitter;\nlet waitingForQueuedOperations = /* @__PURE__ */ new Set();\nlet queueOperations = false;\nlet queue = [];\nlet singleOpQueue = [];\nconst useSingleOpBatching = false;\nPlatform.OS === \"android\" && !!NativeAnimatedModule?.queueAndExecuteBatchedOperations && ReactNativeFeatureFlags.animatedShouldUseSingleOp();\nlet flushQueueTimeout = null;\nconst eventListenerGetValueCallbacks = {};\nconst eventListenerAnimationFinishedCallbacks = {};\nconst nativeOps = useSingleOpBatching ? (function() {\n const apis = [\n \"createAnimatedNode\",\n // 1\n \"updateAnimatedNodeConfig\",\n // 2\n \"getValue\",\n // 3\n \"startListeningToAnimatedNodeValue\",\n // 4\n \"stopListeningToAnimatedNodeValue\",\n // 5\n \"connectAnimatedNodes\",\n // 6\n \"disconnectAnimatedNodes\",\n // 7\n \"startAnimatingNode\",\n // 8\n \"stopAnimation\",\n // 9\n \"setAnimatedNodeValue\",\n // 10\n \"setAnimatedNodeOffset\",\n // 11\n \"flattenAnimatedNodeOffset\",\n // 12\n \"extractAnimatedNodeOffset\",\n // 13\n \"connectAnimatedNodeToView\",\n // 14\n \"disconnectAnimatedNodeFromView\",\n // 15\n \"restoreDefaultValues\",\n // 16\n \"dropAnimatedNode\",\n // 17\n \"addAnimatedEventToView\",\n // 18\n \"removeAnimatedEventFromView\",\n // 19\n \"addListener\",\n // 20\n \"removeListener\"\n // 21\n ];\n return apis.reduce((acc, functionName, i) => {\n acc[functionName] = i + 1;\n return acc;\n }, {});\n})() : NativeAnimatedModule;\nconst API = {\n getValue: function(tag, saveValueCallback) {\n invariant(nativeOps, \"Native animated module is not available\");\n if (useSingleOpBatching) {\n if (saveValueCallback) {\n eventListenerGetValueCallbacks[tag] = saveValueCallback;\n }\n API.queueOperation(nativeOps.getValue, tag);\n } else {\n API.queueOperation(nativeOps.getValue, tag, saveValueCallback);\n }\n },\n setWaitingForIdentifier: function(id) {\n waitingForQueuedOperations.add(id);\n queueOperations = true;\n if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush() && flushQueueTimeout) {\n clearTimeout(flushQueueTimeout);\n }\n },\n unsetWaitingForIdentifier: function(id) {\n waitingForQueuedOperations.delete(id);\n if (waitingForQueuedOperations.size === 0) {\n queueOperations = false;\n API.disableQueue();\n }\n },\n disableQueue: function() {\n invariant(nativeOps, \"Native animated module is not available\");\n if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush()) {\n const prevTimeout = flushQueueTimeout;\n clearImmediate(prevTimeout);\n flushQueueTimeout = setImmediate(API.flushQueue);\n } else {\n API.flushQueue();\n }\n },\n flushQueue: function() {\n },\n queueOperation: (fn, ...args) => {\n if (useSingleOpBatching) {\n singleOpQueue.push(fn, ...args);\n return;\n }\n if (queueOperations || queue.length !== 0) {\n queue.push(() => fn(...args));\n } else {\n fn(...args);\n }\n },\n createAnimatedNode: function(tag, config) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.createAnimatedNode, tag, config);\n },\n updateAnimatedNodeConfig: function(tag, config) {\n invariant(nativeOps, \"Native animated module is not available\");\n },\n startListeningToAnimatedNodeValue: function(tag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.startListeningToAnimatedNodeValue, tag);\n },\n stopListeningToAnimatedNodeValue: function(tag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.stopListeningToAnimatedNodeValue, tag);\n },\n connectAnimatedNodes: function(parentTag, childTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.connectAnimatedNodes, parentTag, childTag);\n },\n disconnectAnimatedNodes: function(parentTag, childTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.disconnectAnimatedNodes, parentTag, childTag);\n },\n startAnimatingNode: function(animationId, nodeTag, config, endCallback) {\n invariant(nativeOps, \"Native animated module is not available\");\n if (useSingleOpBatching) {\n if (endCallback) {\n eventListenerAnimationFinishedCallbacks[animationId] = endCallback;\n }\n API.queueOperation(nativeOps.startAnimatingNode, animationId, nodeTag, config);\n } else {\n API.queueOperation(\n nativeOps.startAnimatingNode,\n animationId,\n nodeTag,\n config,\n endCallback\n );\n }\n },\n stopAnimation: function(animationId) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.stopAnimation, animationId);\n },\n setAnimatedNodeValue: function(nodeTag, value) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.setAnimatedNodeValue, nodeTag, value);\n },\n setAnimatedNodeOffset: function(nodeTag, offset) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.setAnimatedNodeOffset, nodeTag, offset);\n },\n flattenAnimatedNodeOffset: function(nodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.flattenAnimatedNodeOffset, nodeTag);\n },\n extractAnimatedNodeOffset: function(nodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.extractAnimatedNodeOffset, nodeTag);\n },\n connectAnimatedNodeToView: function(nodeTag, viewTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.connectAnimatedNodeToView, nodeTag, viewTag);\n },\n disconnectAnimatedNodeFromView: function(nodeTag, viewTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.disconnectAnimatedNodeFromView, nodeTag, viewTag);\n },\n restoreDefaultValues: function(nodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n if (nativeOps.restoreDefaultValues != null) {\n API.queueOperation(nativeOps.restoreDefaultValues, nodeTag);\n }\n },\n dropAnimatedNode: function(tag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.dropAnimatedNode, tag);\n },\n addAnimatedEventToView: function(viewTag, eventName, eventMapping) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(nativeOps.addAnimatedEventToView, viewTag, eventName, eventMapping);\n },\n removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag) {\n invariant(nativeOps, \"Native animated module is not available\");\n API.queueOperation(\n nativeOps.removeAnimatedEventFromView,\n viewTag,\n eventName,\n animatedNodeTag\n );\n }\n};\nconst SUPPORTED_COLOR_STYLES = {\n backgroundColor: true,\n borderBottomColor: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderStartColor: true,\n borderTopColor: true,\n color: true,\n tintColor: true\n};\nconst SUPPORTED_STYLES = {\n ...SUPPORTED_COLOR_STYLES,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderRadius: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n elevation: true,\n opacity: true,\n transform: true,\n zIndex: true,\n /* ios styles */\n shadowOpacity: true,\n shadowRadius: true,\n /* legacy android transform properties */\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true\n};\nconst SUPPORTED_TRANSFORMS = {\n translateX: true,\n translateY: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n rotate: true,\n rotateX: true,\n rotateY: true,\n rotateZ: true,\n perspective: true\n};\nconst SUPPORTED_INTERPOLATION_PARAMS = {\n inputRange: true,\n outputRange: true,\n extrapolate: true,\n extrapolateRight: true,\n extrapolateLeft: true\n};\nfunction addWhitelistedStyleProp(prop) {\n SUPPORTED_STYLES[prop] = true;\n}\nfunction addWhitelistedTransformProp(prop) {\n SUPPORTED_TRANSFORMS[prop] = true;\n}\nfunction addWhitelistedInterpolationParam(param) {\n SUPPORTED_INTERPOLATION_PARAMS[param] = true;\n}\nfunction isSupportedColorStyleProp(prop) {\n return prop in SUPPORTED_COLOR_STYLES;\n}\nfunction isSupportedStyleProp(prop) {\n return prop in SUPPORTED_STYLES;\n}\nfunction isSupportedTransformProp(prop) {\n return prop in SUPPORTED_TRANSFORMS;\n}\nfunction isSupportedInterpolationParam(param) {\n return param in SUPPORTED_INTERPOLATION_PARAMS;\n}\nfunction validateTransform(configs) {\n configs.forEach((config) => {\n if (!isSupportedTransformProp(config.property)) {\n throw new Error(\n `Property '${config.property}' is not supported by native animated module`\n );\n }\n });\n}\nfunction validateStyles(styles) {\n for (const key in styles) {\n if (!isSupportedStyleProp(key)) {\n throw new Error(\n `Style property '${key}' is not supported by native animated module`\n );\n }\n }\n}\nfunction validateInterpolation(config) {\n for (const key in config) {\n if (!isSupportedInterpolationParam(key)) {\n throw new Error(\n `Interpolation property '${key}' is not supported by native animated module`\n );\n }\n }\n}\nfunction generateNewNodeTag() {\n return __nativeAnimatedNodeTagCount++;\n}\nfunction generateNewAnimationId() {\n return __nativeAnimationIdCount++;\n}\nfunction assertNativeAnimatedModule() {\n invariant(NativeAnimatedModule, \"Native animated module is not available\");\n}\nlet _warnedMissingNativeAnimated = false;\nfunction shouldUseNativeDriver(config) {\n if (config.useNativeDriver == null) {\n console.warn(\n \"Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`\"\n );\n }\n if (config.useNativeDriver === true && !NativeAnimatedModule) {\n if (!_warnedMissingNativeAnimated) {\n console.warn(\n \"Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. Make sure to run `bundle exec pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md\"\n );\n _warnedMissingNativeAnimated = true;\n }\n return false;\n }\n return config.useNativeDriver || false;\n}\nfunction transformDataType(value) {\n if (typeof value !== \"string\") {\n return value;\n }\n if (/deg$/.test(value)) {\n const degrees = parseFloat(value) || 0;\n const radians = degrees * Math.PI / 180;\n return radians;\n } else {\n return value;\n }\n}\nconst NativeAnimatedHelper = {\n API,\n isSupportedColorStyleProp,\n isSupportedStyleProp,\n isSupportedTransformProp,\n isSupportedInterpolationParam,\n addWhitelistedStyleProp,\n addWhitelistedTransformProp,\n addWhitelistedInterpolationParam,\n validateStyles,\n validateTransform,\n validateInterpolation,\n generateNewNodeTag,\n generateNewAnimationId,\n assertNativeAnimatedModule,\n shouldUseNativeDriver,\n transformDataType,\n get nativeEventEmitter() {\n if (!nativeEventEmitter) {\n nativeEventEmitter = new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== \"ios\" ? null : NativeAnimatedModule\n );\n }\n return nativeEventEmitter;\n }\n};\nvar NativeAnimatedHelper_default = NativeAnimatedHelper;\nexport {\n API,\n NativeAnimatedHelper,\n addWhitelistedInterpolationParam,\n addWhitelistedStyleProp,\n addWhitelistedTransformProp,\n assertNativeAnimatedModule,\n NativeAnimatedHelper_default as default,\n generateNewAnimationId,\n generateNewNodeTag,\n isSupportedColorStyleProp,\n isSupportedInterpolationParam,\n isSupportedStyleProp,\n isSupportedTransformProp,\n shouldUseNativeDriver,\n transformDataType,\n validateInterpolation,\n validateStyles,\n validateTransform\n};\n//# sourceMappingURL=NativeAnimatedHelper.js.map\n"],"mappings":";;;;;;;;;AAOA,MAAM,uBAAuB,SAAS,OAAO,SAAS,OAAO,kBAAkB,OAAO,4BAA4B;AAClH,IAAI,+BAA+B;AACnC,IAAI,2BAA2B;AAC/B,IAAI;AACJ,IAAI,6CAA6C,IAAI,IAAI;AACzD,IAAI,kBAAkB;AACtB,IAAI,QAAQ,CAAC;AACb,IAAI,gBAAgB,CAAC;AACrB,MAAM,sBAAsB;AAC5B,SAAS,OAAO,aAAa,CAAC,CAAC,sBAAsB,oCAAoC,wBAAwB,0BAA0B;AAC3I,IAAI,oBAAoB;AACxB,MAAM,iCAAiC,CAAC;AACxC,MAAM,0CAA0C,CAAC;AACjD,MAAM,YAAY,uBAAuB,WAAW;CAClD,MAAM,OAAO;EACX;EAEA;EAEA;EAEA;EAEA;EAEA;E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IAAI,OAAO,mBAAmB,MAAM;EAClC,QAAQ,KACN,0HACF;CACF;CACA,IAAI,OAAO,oBAAoB,QAAQ,CAAC,sBAAsB;EAC5D,IAAI,CAAC,8BAA8B;GACjC,QAAQ,KACN,mXACF;GACA,+BAA+B;EACjC;EACA,OAAO;CACT;CACA,OAAO,OAAO,mBAAmB;AACnC;AACA,SAAS,kBAAkB,OAAO;CAChC,IAAI,OAAO,UAAU,UAAU;EAC7B,OAAO;CACT;CACA,IAAI,OAAO,KAAK,KAAK,GAAG;EACtB,MAAM,UAAU,WAAW,KAAK,KAAK;EACrC,MAAM,UAAU,UAAU,KAAK,KAAK;EACpC,OAAO;CACT,OAAO;EACL,OAAO;CACT;AACF;AACA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,IAAI,qBAAqB;EACvB,IAAI,CAAC,oBAAoB;GACvB,qBAAqB,IAAI,mBAGvB,SAAS,OAAO,QAAQ,OAAO,oBACjC;EACF;EACA,OAAO;CACT;AACF;AACA,IAAI,+BAA+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/react-native-web-lite",
3
- "version": "3.0.0-beta.807.1",
3
+ "version": "3.0.0-beta.881.1",
4
4
  "description": "React Native for Web",
5
5
  "keywords": [
6
6
  "react",
@@ -102,16 +102,16 @@
102
102
  "clean:build": "tamagui-build clean:build"
103
103
  },
104
104
  "dependencies": {
105
- "@tamagui/normalize-css-color": "3.0.0-beta.807.1",
106
- "@tamagui/react-native-use-pressable": "3.0.0-beta.807.1",
107
- "@tamagui/react-native-use-responder-events": "3.0.0-beta.807.1",
108
- "@tamagui/react-native-web-internals": "3.0.0-beta.807.1",
109
- "@tamagui/web": "3.0.0-beta.807.1",
105
+ "@tamagui/normalize-css-color": "3.0.0-beta.881.1",
106
+ "@tamagui/react-native-use-pressable": "3.0.0-beta.881.1",
107
+ "@tamagui/react-native-use-responder-events": "3.0.0-beta.881.1",
108
+ "@tamagui/react-native-web-internals": "3.0.0-beta.881.1",
109
+ "@tamagui/web": "3.0.0-beta.881.1",
110
110
  "invariant": "^2.2.4",
111
111
  "memoize-one": "^6.0.0"
112
112
  },
113
113
  "devDependencies": {
114
- "@tamagui/build": "3.0.0-beta.807.1",
114
+ "@tamagui/build": "3.0.0-beta.881.1",
115
115
  "react": "19.2.3",
116
116
  "react-dom": "19.2.3"
117
117
  },
@@ -10,12 +10,7 @@
10
10
 
11
11
  import { canUseDOM, invariant } from '@tamagui/react-native-web-internals'
12
12
 
13
- // Android 4.4 browser
14
- const isPrefixed =
15
- // eslint-disable-next-line no-prototype-builtins
16
- canUseDOM &&
17
- !document.hasOwnProperty('hidden') &&
18
- document.hasOwnProperty('webkitHidden')
13
+ const isPrefixed = canUseDOM && !('hidden' in document) && 'webkitHidden' in document
19
14
 
20
15
  const EVENT_TYPES = ['change', 'memoryWarning']
21
16
  const VISIBILITY_CHANGE_EVENT = isPrefixed ? 'webkitvisibilitychange' : 'visibilitychange'
@@ -374,19 +374,19 @@ function addWhitelistedInterpolationParam(param) {
374
374
  }
375
375
 
376
376
  function isSupportedColorStyleProp(prop) {
377
- return SUPPORTED_COLOR_STYLES.hasOwnProperty(prop)
377
+ return prop in SUPPORTED_COLOR_STYLES
378
378
  }
379
379
 
380
380
  function isSupportedStyleProp(prop) {
381
- return SUPPORTED_STYLES.hasOwnProperty(prop)
381
+ return prop in SUPPORTED_STYLES
382
382
  }
383
383
 
384
384
  function isSupportedTransformProp(prop) {
385
- return SUPPORTED_TRANSFORMS.hasOwnProperty(prop)
385
+ return prop in SUPPORTED_TRANSFORMS
386
386
  }
387
387
 
388
388
  function isSupportedInterpolationParam(param) {
389
- return SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(param)
389
+ return param in SUPPORTED_INTERPOLATION_PARAMS
390
390
  }
391
391
 
392
392
  function validateTransform(configs) {