@tamagui/core 1.126.13 → 1.126.15

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.
@@ -70,9 +70,9 @@ var require_index_native = __commonJS({
70
70
  }
71
71
  });
72
72
  module2.exports = __toCommonJS2(index_exports2);
73
- var cache2 = /* @__PURE__ */ new Map(), cacheSize = 0, simpleHash = function(strIn) {
73
+ var cache = /* @__PURE__ */ new Map(), cacheSize = 0, simpleHash = function(strIn) {
74
74
  var hashMin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;
75
- if (cache2.has(strIn)) return cache2.get(strIn);
75
+ if (cache.has(strIn)) return cache.get(strIn);
76
76
  var str = strIn;
77
77
  str[0] === "v" && str.startsWith("var(") && (str = str.slice(6, str.length - 1));
78
78
  for (var hash = 0, valids = "", added = 0, len = str.length, i = 0; i < len; i++) {
@@ -90,7 +90,7 @@ var require_index_native = __commonJS({
90
90
  hash = hashChar(hash, str[i]);
91
91
  }
92
92
  var res = valids + (hash ? Math.abs(hash) : "");
93
- return cacheSize > 1e4 && (cache2.clear(), cacheSize = 0), cache2.set(strIn, res), cacheSize++, res;
93
+ return cacheSize > 1e4 && (cache.clear(), cacheSize = 0), cache.set(strIn, res), cacheSize++, res;
94
94
  }, hashChar = function(hash, c) {
95
95
  return Math.imul(31, hash) + c.charCodeAt(0) | 0;
96
96
  };
@@ -403,7 +403,7 @@ var require_constants_native = __commonJS({
403
403
  return isChrome;
404
404
  },
405
405
  isClient: function() {
406
- return isClient;
406
+ return isClient2;
407
407
  },
408
408
  isIos: function() {
409
409
  return isIos;
@@ -428,7 +428,7 @@ var require_constants_native = __commonJS({
428
428
  }
429
429
  });
430
430
  module2.exports = __toCommonJS2(constants_native_exports);
431
- var import_react3 = require("react"), import_react_native = require("react-native"), isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = import_react_native.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
431
+ var import_react3 = require("react"), import_react_native = require("react-native"), isWeb = !1, isWindowDefined = !1, isServer = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = import_react_native.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
432
432
  ios: "ios",
433
433
  android: "android"
434
434
  }, currentPlatform = platforms[import_react_native.Platform.OS] || "native";
@@ -1916,15 +1916,15 @@ var require_useMedia_native = __commonJS({
1916
1916
  return `-${m.toLowerCase()}`;
1917
1917
  }).toLowerCase();
1918
1918
  }
1919
- var cache2 = /* @__PURE__ */ new WeakMap(), cachedMediaKeyToQuery = {};
1919
+ var cache = /* @__PURE__ */ new WeakMap(), cachedMediaKeyToQuery = {};
1920
1920
  function mediaObjectToString2(query, key) {
1921
1921
  if (typeof query == "string") return query;
1922
- if (cache2.has(query)) return cache2.get(query);
1922
+ if (cache.has(query)) return cache.get(query);
1923
1923
  var res = Object.entries(query).map(function(param) {
1924
1924
  var [feature, value] = param;
1925
1925
  return feature = camelToHyphen(feature), typeof value == "string" ? `(${feature}: ${value})` : (typeof value == "number" && /[height|width]$/.test(feature) && (value = `${value}px`), `(${feature}: ${value})`);
1926
1926
  }).join(" and ");
1927
- return key && (cachedMediaKeyToQuery[key] = res), cache2.set(query, res), res;
1927
+ return key && (cachedMediaKeyToQuery[key] = res), cache.set(query, res), res;
1928
1928
  }
1929
1929
  function mediaKeyToQuery(key) {
1930
1930
  return cachedMediaKeyToQuery[key] || mediaObjectToString2(mediaQueryConfig2[key], key);
@@ -2228,15 +2228,15 @@ var require_objectIdentityKey_native = __commonJS({
2228
2228
  k += key;
2229
2229
  var arg = obj[key], type = typeof arg;
2230
2230
  if (!arg || type !== "object" && type !== "function") k += type + arg;
2231
- else if (cache2.has(arg)) k += cache2.get(arg);
2231
+ else if (cache.has(arg)) k += cache.get(arg);
2232
2232
  else {
2233
2233
  var v = Math.random();
2234
- cache2.set(arg, v), k += v;
2234
+ cache.set(arg, v), k += v;
2235
2235
  }
2236
2236
  }
2237
2237
  return k;
2238
2238
  }
2239
- var cache2 = /* @__PURE__ */ new WeakMap();
2239
+ var cache = /* @__PURE__ */ new WeakMap();
2240
2240
  }
2241
2241
  });
2242
2242
 
@@ -4261,8 +4261,8 @@ var require_getVariantExtras_native = __commonJS({
4261
4261
  }
4262
4262
  });
4263
4263
  module2.exports = __toCommonJS2(getVariantExtras_exports);
4264
- var import_createVariable = require_createVariable_native(), cache2 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleState) {
4265
- if (cache2.has(styleState)) return cache2.get(styleState);
4264
+ var import_createVariable = require_createVariable_native(), cache = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleState) {
4265
+ if (cache.has(styleState)) return cache.get(styleState);
4266
4266
  var { props, conf, context, theme } = styleState, fonts = conf.fontsParsed;
4267
4267
  context != null && context.language && (fonts = getFontsForLanguage(conf.fontsParsed, context.language));
4268
4268
  var next = {
@@ -4277,7 +4277,7 @@ var require_getVariantExtras_native = __commonJS({
4277
4277
  },
4278
4278
  props
4279
4279
  };
4280
- return cache2.set(styleState, next), next;
4280
+ return cache.set(styleState, next), next;
4281
4281
  }, fontLanguageCache = /* @__PURE__ */ new WeakMap();
4282
4282
  function getFontsForLanguage(fonts, language) {
4283
4283
  if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
@@ -5636,7 +5636,7 @@ var require_createShallowSetState_native = __commonJS({
5636
5636
  return createShallowSetState;
5637
5637
  },
5638
5638
  isEqualShallow: function() {
5639
- return isEqualShallow;
5639
+ return isEqualShallow2;
5640
5640
  },
5641
5641
  mergeIfNotShallowEqual: function() {
5642
5642
  return mergeIfNotShallowEqual;
@@ -5667,12 +5667,12 @@ var require_createShallowSetState_native = __commonJS({
5667
5667
  for (var key in next) onlyAllow.includes(key) && (allowed[key] = next[key]);
5668
5668
  next = allowed;
5669
5669
  }
5670
- return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
5670
+ return !prev || !next || isEqualShallow2(prev, next) ? prev || next : {
5671
5671
  ...prev,
5672
5672
  ...next
5673
5673
  };
5674
5674
  }
5675
- function isEqualShallow(prev, next) {
5675
+ function isEqualShallow2(prev, next) {
5676
5676
  for (var key in next) if (prev[key] !== next[key]) return !1;
5677
5677
  return !0;
5678
5678
  }
@@ -6094,11 +6094,11 @@ var require_getThemeProxied_native = __commonJS({
6094
6094
  }
6095
6095
  });
6096
6096
  module2.exports = __toCommonJS2(getThemeProxied_exports);
6097
- var import_constants2 = require_index_native2(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(), cache2 = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
6097
+ var import_constants2 = require_index_native2(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(), cache = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
6098
6098
  function getThemeProxied(_props, _state, _keys) {
6099
6099
  if (!(_state != null && _state.theme)) return emptyObject;
6100
- if (curKeys = _keys, curProps = _props, curState = _state, cache2.has(curState.theme)) {
6101
- var proxied = cache2.get(curState.theme);
6100
+ if (curKeys = _keys, curProps = _props, curState = _state, cache.has(curState.theme)) {
6101
+ var proxied = cache.get(curState.theme);
6102
6102
  return proxied;
6103
6103
  }
6104
6104
  var config = (0, import_config.getConfig)();
@@ -6137,7 +6137,7 @@ var require_getThemeProxied_native = __commonJS({
6137
6137
  ]
6138
6138
  ];
6139
6139
  }));
6140
- return cache2.set(_state.theme, proxied1), proxied1;
6140
+ return cache.set(_state.theme, proxied1), proxied1;
6141
6141
  }
6142
6142
  }
6143
6143
  });
@@ -7604,9 +7604,9 @@ var require_createVariables_native = __commonJS({
7604
7604
  }
7605
7605
  });
7606
7606
  module2.exports = __toCommonJS2(createVariables_exports);
7607
- var import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(), cache2 = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens) {
7607
+ var import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(), cache = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens) {
7608
7608
  var parentPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", isFont = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
7609
- if (cache2.has(tokens)) return tokens;
7609
+ if (cache.has(tokens)) return tokens;
7610
7610
  var res = {}, i = 0;
7611
7611
  for (var keyIn in tokens) {
7612
7612
  i++;
@@ -7627,7 +7627,7 @@ var require_createVariables_native = __commonJS({
7627
7627
  });
7628
7628
  res[key] = finalValue;
7629
7629
  }
7630
- return cache2.set(res, !0), res;
7630
+ return cache.set(res, !0), res;
7631
7631
  };
7632
7632
  }
7633
7633
  });
@@ -9620,13 +9620,25 @@ var require_TamaguiProvider_native = __commonJS({
9620
9620
  __export2(TamaguiProvider_exports, {
9621
9621
  TamaguiProvider: function() {
9622
9622
  return TamaguiProvider;
9623
+ },
9624
+ ___onDidFinishClientRender: function() {
9625
+ return ___onDidFinishClientRender2;
9623
9626
  }
9624
9627
  });
9625
9628
  module2.exports = __toCommonJS2(TamaguiProvider_exports);
9626
- var import_jsx_runtime = require("react/jsx-runtime"), import_constants2 = require_index_native2(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_ThemeProvider = require_ThemeProvider_native(), import_useMedia = require_useMedia_native();
9629
+ var import_jsx_runtime = require("react/jsx-runtime"), import_constants2 = require_index_native2(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_ThemeProvider = require_ThemeProvider_native(), import_useMedia = require_useMedia_native(), listeners = /* @__PURE__ */ new Set(), didRender = !1;
9630
+ function ___onDidFinishClientRender2(cb) {
9631
+ didRender ? cb() : listeners.add(cb);
9632
+ }
9627
9633
  function TamaguiProvider(param) {
9628
9634
  var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
9629
- return process.env.TAMAGUI_REACT_19 || import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
9635
+ return (0, import_react3.useEffect)(function() {
9636
+ return listeners.forEach(function(cb) {
9637
+ return cb();
9638
+ }), didRender = !0, function() {
9639
+ didRender = !1;
9640
+ };
9641
+ }, []), process.env.TAMAGUI_REACT_19 || import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
9630
9642
  if (config && !disableInjectCSS) {
9631
9643
  var style = document.createElement("style");
9632
9644
  return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
@@ -10448,9 +10460,9 @@ var require_createMedia_native = __commonJS({
10448
10460
  }
10449
10461
  });
10450
10462
  module2.exports = __toCommonJS2(createMedia_exports);
10451
- var import_web2 = require_index_native8(), import_matchMedia = require_matchMedia_native2();
10463
+ var import_web3 = require_index_native8(), import_matchMedia = require_matchMedia_native2();
10452
10464
  function createMedia2(media) {
10453
- return (0, import_web2.setupMatchMedia)(import_matchMedia.matchMedia), media;
10465
+ return (0, import_web3.setupMatchMedia)(import_matchMedia.matchMedia), media;
10454
10466
  }
10455
10467
  }
10456
10468
  });
@@ -11503,10 +11515,49 @@ __export(index_exports, {
11503
11515
  Stack: () => Stack,
11504
11516
  Text: () => Text,
11505
11517
  View: () => View,
11506
- createTamagui: () => createTamagui
11518
+ createTamagui: () => createTamagui,
11519
+ getElementLayoutEvent: () => getElementLayoutEvent,
11520
+ setOnLayoutStrategy: () => setOnLayoutStrategy
11507
11521
  });
11508
11522
  module.exports = __toCommonJS(index_exports);
11509
- var import_react_native_media_driver = __toESM(require_index_native9()), import_react_native_use_responder_events = __toESM(require_index_native10()), import_web = __toESM(require_index_native8()), import_react2 = __toESM(require("react"));
11523
+ var import_react_native_media_driver = __toESM(require_index_native9()), import_react_native_use_responder_events = __toESM(require_index_native10()), import_web2 = __toESM(require_index_native8()), import_react2 = __toESM(require("react"));
11524
+
11525
+ // src/addNativeValidStyles.native.ts
11526
+ var import_helpers = __toESM(require_index_native3());
11527
+ function getReactNativeVersion() {
11528
+ var version = process.env.REACT_NATIVE_VERSION || "";
11529
+ if (!process.env.REACT_NATIVE_VERSION)
11530
+ try {
11531
+ var ReactNativeOfficalVersion = require("react-native/Libraries/Core/ReactNativeVersion");
11532
+ if (ReactNativeOfficalVersion) {
11533
+ var { version: { major, minor, patch } } = ReactNativeOfficalVersion;
11534
+ version = `${major}.${minor}.${patch}`;
11535
+ }
11536
+ } catch {
11537
+ } finally {
11538
+ version || (version = "0.77");
11539
+ }
11540
+ var [major1, minor1, patch1] = version.split(".");
11541
+ return [
11542
+ +major1,
11543
+ +minor1,
11544
+ +patch1
11545
+ ];
11546
+ }
11547
+ function addNativeValidStyles() {
11548
+ var [major, minor] = getReactNativeVersion();
11549
+ if (major === 0 && minor >= 77) {
11550
+ var additional = {
11551
+ boxSizing: !0,
11552
+ mixBlendMode: !0,
11553
+ outlineWidth: !0,
11554
+ outlineStyle: !0,
11555
+ outlineSpread: !0,
11556
+ outlineColor: !0
11557
+ };
11558
+ Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
11559
+ }
11560
+ }
11510
11561
 
11511
11562
  // src/createOptimizedView.native.tsx
11512
11563
  var import_react = __toESM(require("react"));
@@ -11722,77 +11773,62 @@ var getRect = function(node) {
11722
11773
  };
11723
11774
 
11724
11775
  // src/hooks/useElementLayout.tsx
11725
- var import_constants = __toESM(require_index_native2());
11726
- function _type_of(obj) {
11727
- "@swc/helpers - typeof";
11728
- return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
11776
+ var import_constants = __toESM(require_index_native2()), import_web = __toESM(require_index_native8()), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), status = "active";
11777
+ function setOnLayoutStrategy(state) {
11778
+ status = state;
11729
11779
  }
11730
- var LayoutHandlers = /* @__PURE__ */ new WeakMap(), resizeListeners = /* @__PURE__ */ new Set(), resizeObserver = null;
11731
- typeof window < "u" && "ResizeObserver" in window && (resizeObserver = new ResizeObserver(function(entries) {
11732
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
11733
- try {
11734
- for (var _loop = function() {
11735
- var { target } = _step.value, onLayout = LayoutHandlers.get(target);
11736
- if (typeof onLayout != "function") return {
11737
- v: void 0
11738
- };
11739
- measureElement(target).then(function(event) {
11740
- onLayout(event);
11741
- });
11742
- }, _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
11743
- var _ret = _loop();
11744
- if (_type_of(_ret) === "object") return _ret.v;
11745
- }
11746
- } catch (err) {
11747
- _didIteratorError = !0, _iteratorError = err;
11748
- } finally {
11749
- try {
11750
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
11751
- } finally {
11752
- if (_didIteratorError)
11753
- throw _iteratorError;
11754
- }
11755
- }
11756
- }), typeof window.addEventListener == "function" && window.addEventListener("resize", function() {
11757
- clearTimeout(tm), tm = setTimeout(function() {
11758
- resizeListeners.forEach(function(cb) {
11780
+ var NodeRectCache = /* @__PURE__ */ new WeakMap(), ParentRectCache = /* @__PURE__ */ new WeakMap(), rAF = typeof window < "u" ? window.requestAnimationFrame : void 0;
11781
+ if (import_constants.isClient && rAF) {
11782
+ let updateLayoutIfChanged = function(node) {
11783
+ var nodeRect = node.getBoundingClientRect(), parentNode = node.parentElement, parentRect = parentNode == null ? void 0 : parentNode.getBoundingClientRect(), onLayout = LayoutHandlers.get(node);
11784
+ if (typeof onLayout == "function") {
11785
+ var cachedRect = NodeRectCache.get(node), cachedParentRect = parentNode ? NodeRectCache.get(parentNode) : null;
11786
+ if (!cachedRect || // has changed one rect
11787
+ !(0, import_web.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_web.isEqualShallow)(cachedParentRect, parentRect))) {
11788
+ NodeRectCache.set(node, nodeRect), parentRect && parentNode && ParentRectCache.set(parentNode, parentRect);
11789
+ var event = getElementLayoutEvent(node);
11790
+ avoidUpdates ? queuedUpdates.set(node, function() {
11791
+ return onLayout(event);
11792
+ }) : onLayout(event);
11793
+ }
11794
+ }
11795
+ }, layoutOnAnimationFrame = function() {
11796
+ status !== "inactive" && Nodes.forEach(updateLayoutIfChanged), rAF(layoutOnAnimationFrame);
11797
+ };
11798
+ updateLayoutIfChanged2 = updateLayoutIfChanged, layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), (0, import_web.___onDidFinishClientRender)(function() {
11799
+ avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
11759
11800
  return cb();
11760
- });
11761
- }, 4);
11762
- }));
11763
- var tm, measureElement = async function(target) {
11764
- return new Promise(function(res) {
11765
- measureLayout(target, null, function(x, y, width, height, left, top) {
11766
- res({
11767
- nativeEvent: {
11768
- layout: {
11769
- x,
11770
- y,
11771
- width,
11772
- height,
11773
- left,
11774
- top
11775
- },
11776
- target
11801
+ }), queuedUpdates.clear());
11802
+ }), rAF(layoutOnAnimationFrame);
11803
+ }
11804
+ var avoidUpdates, queuedUpdates, updateLayoutIfChanged2, layoutOnAnimationFrame2, getElementLayoutEvent = function(target) {
11805
+ var res = null;
11806
+ if (measureLayout(target, null, function(x, y, width, height, left, top) {
11807
+ res = {
11808
+ nativeEvent: {
11809
+ layout: {
11810
+ x,
11811
+ y,
11812
+ width,
11813
+ height,
11814
+ left,
11815
+ top
11777
11816
  },
11778
- timeStamp: Date.now()
11779
- });
11780
- });
11781
- });
11782
- }, cache = /* @__PURE__ */ new WeakMap(), measureLayout = function(node, relativeTo, callback) {
11783
- var relativeNode = relativeTo || (node == null ? void 0 : node.parentNode);
11817
+ target
11818
+ },
11819
+ timeStamp: Date.now()
11820
+ };
11821
+ }), !res)
11822
+ throw new Error("\u203C\uFE0F");
11823
+ return res;
11824
+ }, measureLayout = function(node, relativeTo, callback) {
11825
+ var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
11784
11826
  if (relativeNode instanceof HTMLElement) {
11785
- var now = Date.now();
11786
- cache.set(node, now), Promise.all([
11787
- getBoundingClientRectAsync(node),
11788
- getBoundingClientRectAsync(relativeNode)
11789
- ]).then(function(param) {
11790
- var [nodeDim, relativeNodeDim] = param;
11791
- if (relativeNodeDim && nodeDim && cache.get(node) === now) {
11792
- var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
11793
- callback(x, y, width, height, left, top);
11794
- }
11795
- });
11827
+ var nodeDim = node.getBoundingClientRect(), relativeNodeDim = relativeNode.getBoundingClientRect();
11828
+ if (relativeNodeDim && nodeDim) {
11829
+ var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
11830
+ callback(x, y, width, height, left, top);
11831
+ }
11796
11832
  }
11797
11833
  }, getRelativeDimensions = function(a, b) {
11798
11834
  var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
@@ -11804,68 +11840,18 @@ var tm, measureElement = async function(target) {
11804
11840
  left,
11805
11841
  top
11806
11842
  };
11807
- }, getBoundingClientRectAsync = function(element) {
11808
- return new Promise(function(resolve) {
11809
- function fallbackToSync() {
11810
- resolve(getBoundingClientRect(element));
11811
- }
11812
- var tm = setTimeout(fallbackToSync, 10), observer = new IntersectionObserver(function(entries, ob) {
11813
- var _entries_;
11814
- clearTimeout(tm), ob.disconnect(), resolve((_entries_ = entries[0]) === null || _entries_ === void 0 ? void 0 : _entries_.boundingClientRect);
11815
- }, {
11816
- threshold: 1e-4
11817
- });
11818
- observer.observe(element);
11819
- });
11820
11843
  };
11821
11844
 
11822
11845
  // src/vendor/Pressability.native.tsx
11823
11846
  var Pressability = require_fake_react_native().default, usePressability = (init_idFn(), __toCommonJS(idFn_exports)).default;
11824
11847
 
11825
- // src/addNativeValidStyles.native.ts
11826
- var import_helpers = __toESM(require_index_native3());
11827
- function getReactNativeVersion() {
11828
- var version = process.env.REACT_NATIVE_VERSION || "";
11829
- if (!process.env.REACT_NATIVE_VERSION)
11830
- try {
11831
- var ReactNativeOfficalVersion = require("react-native/Libraries/Core/ReactNativeVersion");
11832
- if (ReactNativeOfficalVersion) {
11833
- var { version: { major, minor, patch } } = ReactNativeOfficalVersion;
11834
- version = `${major}.${minor}.${patch}`;
11835
- }
11836
- } catch {
11837
- } finally {
11838
- version || (version = "0.77");
11839
- }
11840
- var [major1, minor1, patch1] = version.split(".");
11841
- return [
11842
- +major1,
11843
- +minor1,
11844
- +patch1
11845
- ];
11846
- }
11847
- function addNativeValidStyles() {
11848
- var [major, minor] = getReactNativeVersion();
11849
- if (major === 0 && minor >= 77) {
11850
- var additional = {
11851
- boxSizing: !0,
11852
- mixBlendMode: !0,
11853
- outlineWidth: !0,
11854
- outlineStyle: !0,
11855
- outlineSpread: !0,
11856
- outlineColor: !0
11857
- };
11858
- Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
11859
- }
11860
- }
11861
-
11862
11848
  // src/index.tsx
11863
11849
  __reExport(index_exports, __toESM(require_index_native8()), module.exports);
11864
11850
  addNativeValidStyles();
11865
11851
  var createTamagui = function(conf) {
11866
- return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0, import_web.createTamagui)(conf);
11852
+ return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0, import_web2.createTamagui)(conf);
11867
11853
  }, baseViews = getBaseViews();
11868
- (0, import_web.setupHooks)({
11854
+ (0, import_web2.setupHooks)({
11869
11855
  getBaseViews,
11870
11856
  setElementProps: function(node) {
11871
11857
  if (node && !node.measure) {
@@ -11897,7 +11883,7 @@ var createTamagui = function(conf) {
11897
11883
  onPressIn,
11898
11884
  onPressOut: onPressOut || onPress
11899
11885
  };
11900
- onPressOut && onPress && (inputEvents.onPressOut = (0, import_web.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
11886
+ onPressOut && onPress && (inputEvents.onPressOut = (0, import_web2.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
11901
11887
  }
11902
11888
  } else {
11903
11889
  events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
@@ -11905,7 +11891,7 @@ var createTamagui = function(conf) {
11905
11891
  if (events && events.onPress)
11906
11892
  for (var key in pressability) {
11907
11893
  var og = viewProps[key], val = pressability[key];
11908
- viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
11894
+ viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web2.composeEventHandlers)(og, val) : val;
11909
11895
  }
11910
11896
  }
11911
11897
  },
@@ -11914,12 +11900,14 @@ var createTamagui = function(conf) {
11914
11900
  });
11915
11901
  var dontComposePressabilityKeys = {
11916
11902
  onClick: !0
11917
- }, View = import_web.View, Stack = import_web.Stack, Text = import_web.Text;
11903
+ }, View = import_web2.View, Stack = import_web2.Stack, Text = import_web2.Text;
11918
11904
  // Annotate the CommonJS export names for ESM import in node:
11919
11905
  0 && (module.exports = {
11920
11906
  Stack,
11921
11907
  Text,
11922
11908
  View,
11923
- createTamagui
11909
+ createTamagui,
11910
+ getElementLayoutEvent,
11911
+ setOnLayoutStrategy
11924
11912
  });
11925
11913
  //# sourceMappingURL=test.js.map