tamagui 1.126.14 → 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.
@@ -12580,6 +12580,86 @@ var require_index_native17 = __commonJS({
12580
12580
  }
12581
12581
  });
12582
12582
 
12583
+ // ../../core/core/dist/cjs/addNativeValidStyles.native.js
12584
+ var require_addNativeValidStyles_native = __commonJS({
12585
+ "../../core/core/dist/cjs/addNativeValidStyles.native.js"(exports2, module2) {
12586
+ "use strict";
12587
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
12588
+ for (var name in all) __defProp2(target, name, {
12589
+ get: all[name],
12590
+ enumerable: !0
12591
+ });
12592
+ }, __copyProps2 = function(to, from, except, desc) {
12593
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
12594
+ if (from && typeof from == "object" || typeof from == "function") try {
12595
+ for (var _loop = function() {
12596
+ var key = _step.value;
12597
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
12598
+ get: function() {
12599
+ return from[key];
12600
+ },
12601
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
12602
+ });
12603
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
12604
+ } catch (err) {
12605
+ _didIteratorError = !0, _iteratorError = err;
12606
+ } finally {
12607
+ try {
12608
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
12609
+ } finally {
12610
+ if (_didIteratorError)
12611
+ throw _iteratorError;
12612
+ }
12613
+ }
12614
+ return to;
12615
+ }, __toCommonJS2 = function(mod) {
12616
+ return __copyProps2(__defProp2({}, "__esModule", {
12617
+ value: !0
12618
+ }), mod);
12619
+ }, addNativeValidStyles_native_exports = {};
12620
+ __export2(addNativeValidStyles_native_exports, {
12621
+ addNativeValidStyles: function() {
12622
+ return addNativeValidStyles;
12623
+ }
12624
+ });
12625
+ module2.exports = __toCommonJS2(addNativeValidStyles_native_exports);
12626
+ var import_helpers = require_index_native7();
12627
+ function getReactNativeVersion() {
12628
+ var version = process.env.REACT_NATIVE_VERSION || "";
12629
+ if (!process.env.REACT_NATIVE_VERSION) try {
12630
+ var ReactNativeOfficalVersion = require("react-native/Libraries/Core/ReactNativeVersion");
12631
+ if (ReactNativeOfficalVersion) {
12632
+ var { version: { major, minor, patch } } = ReactNativeOfficalVersion;
12633
+ version = `${major}.${minor}.${patch}`;
12634
+ }
12635
+ } catch {
12636
+ } finally {
12637
+ version || (version = "0.77");
12638
+ }
12639
+ var [major1, minor1, patch1] = version.split(".");
12640
+ return [
12641
+ +major1,
12642
+ +minor1,
12643
+ +patch1
12644
+ ];
12645
+ }
12646
+ function addNativeValidStyles() {
12647
+ var [major, minor] = getReactNativeVersion();
12648
+ if (major === 0 && minor >= 77) {
12649
+ var additional = {
12650
+ boxSizing: !0,
12651
+ mixBlendMode: !0,
12652
+ outlineWidth: !0,
12653
+ outlineStyle: !0,
12654
+ outlineSpread: !0,
12655
+ outlineColor: !0
12656
+ };
12657
+ Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
12658
+ }
12659
+ }
12660
+ }
12661
+ });
12662
+
12583
12663
  // ../../core/core/dist/cjs/createOptimizedView.native.js
12584
12664
  var require_createOptimizedView_native = __commonJS({
12585
12665
  "../../core/core/dist/cjs/createOptimizedView.native.js"(exports2, module2) {
@@ -13026,12 +13106,19 @@ var require_useElementLayout_native = __commonJS({
13026
13106
  measureLayout: function() {
13027
13107
  return measureLayout;
13028
13108
  },
13109
+ setOnLayoutStrategy: function() {
13110
+ return setOnLayoutStrategy3;
13111
+ },
13029
13112
  useElementLayout: function() {
13030
13113
  return useElementLayout;
13031
13114
  }
13032
13115
  });
13033
13116
  module2.exports = __toCommonJS2(useElementLayout_exports);
13034
- var import_constants4 = require_index_native6(), import_web = require_index_native14(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), NodeRectCache = /* @__PURE__ */ new WeakMap(), ParentRectCache = /* @__PURE__ */ new WeakMap(), rAF = typeof window < "u" ? window.requestAnimationFrame : void 0;
13117
+ var import_constants4 = require_index_native6(), import_web = require_index_native14(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), status = "active";
13118
+ function setOnLayoutStrategy3(state) {
13119
+ status = state;
13120
+ }
13121
+ var NodeRectCache = /* @__PURE__ */ new WeakMap(), ParentRectCache = /* @__PURE__ */ new WeakMap(), rAF = typeof window < "u" ? window.requestAnimationFrame : void 0;
13035
13122
  import_constants4.isClient && rAF && (updateLayoutIfChanged = function(node) {
13036
13123
  var nodeRect = node.getBoundingClientRect(), parentNode = node.parentElement, parentRect = parentNode == null ? void 0 : parentNode.getBoundingClientRect(), onLayout = LayoutHandlers.get(node);
13037
13124
  if (typeof onLayout == "function") {
@@ -13046,7 +13133,7 @@ var require_useElementLayout_native = __commonJS({
13046
13133
  }
13047
13134
  }
13048
13135
  }, layoutOnAnimationFrame = function() {
13049
- Nodes.forEach(updateLayoutIfChanged), rAF(layoutOnAnimationFrame);
13136
+ status !== "inactive" && Nodes.forEach(updateLayoutIfChanged), rAF(layoutOnAnimationFrame);
13050
13137
  }, updateLayoutIfChanged2 = updateLayoutIfChanged, layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), (0, import_web.___onDidFinishClientRender)(function() {
13051
13138
  avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
13052
13139
  return cb();
@@ -13208,86 +13295,6 @@ var require_Pressability_native = __commonJS({
13208
13295
  }
13209
13296
  });
13210
13297
 
13211
- // ../../core/core/dist/cjs/addNativeValidStyles.native.js
13212
- var require_addNativeValidStyles_native = __commonJS({
13213
- "../../core/core/dist/cjs/addNativeValidStyles.native.js"(exports2, module2) {
13214
- "use strict";
13215
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
13216
- for (var name in all) __defProp2(target, name, {
13217
- get: all[name],
13218
- enumerable: !0
13219
- });
13220
- }, __copyProps2 = function(to, from, except, desc) {
13221
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
13222
- if (from && typeof from == "object" || typeof from == "function") try {
13223
- for (var _loop = function() {
13224
- var key = _step.value;
13225
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
13226
- get: function() {
13227
- return from[key];
13228
- },
13229
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
13230
- });
13231
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
13232
- } catch (err) {
13233
- _didIteratorError = !0, _iteratorError = err;
13234
- } finally {
13235
- try {
13236
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
13237
- } finally {
13238
- if (_didIteratorError)
13239
- throw _iteratorError;
13240
- }
13241
- }
13242
- return to;
13243
- }, __toCommonJS2 = function(mod) {
13244
- return __copyProps2(__defProp2({}, "__esModule", {
13245
- value: !0
13246
- }), mod);
13247
- }, addNativeValidStyles_native_exports = {};
13248
- __export2(addNativeValidStyles_native_exports, {
13249
- addNativeValidStyles: function() {
13250
- return addNativeValidStyles;
13251
- }
13252
- });
13253
- module2.exports = __toCommonJS2(addNativeValidStyles_native_exports);
13254
- var import_helpers = require_index_native7();
13255
- function getReactNativeVersion() {
13256
- var version = process.env.REACT_NATIVE_VERSION || "";
13257
- if (!process.env.REACT_NATIVE_VERSION) try {
13258
- var ReactNativeOfficalVersion = require("react-native/Libraries/Core/ReactNativeVersion");
13259
- if (ReactNativeOfficalVersion) {
13260
- var { version: { major, minor, patch } } = ReactNativeOfficalVersion;
13261
- version = `${major}.${minor}.${patch}`;
13262
- }
13263
- } catch {
13264
- } finally {
13265
- version || (version = "0.77");
13266
- }
13267
- var [major1, minor1, patch1] = version.split(".");
13268
- return [
13269
- +major1,
13270
- +minor1,
13271
- +patch1
13272
- ];
13273
- }
13274
- function addNativeValidStyles() {
13275
- var [major, minor] = getReactNativeVersion();
13276
- if (major === 0 && minor >= 77) {
13277
- var additional = {
13278
- boxSizing: !0,
13279
- mixBlendMode: !0,
13280
- outlineWidth: !0,
13281
- outlineStyle: !0,
13282
- outlineSpread: !0,
13283
- outlineColor: !0
13284
- };
13285
- Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
13286
- }
13287
- }
13288
- }
13289
- });
13290
-
13291
13298
  // ../../core/core/dist/cjs/reactNativeTypes.native.js
13292
13299
  var require_reactNativeTypes_native = __commonJS({
13293
13300
  "../../core/core/dist/cjs/reactNativeTypes.native.js"(exports2, module2) {
@@ -13390,10 +13397,13 @@ var require_index_native18 = __commonJS({
13390
13397
  },
13391
13398
  getElementLayoutEvent: function() {
13392
13399
  return import_useElementLayout2.getElementLayoutEvent;
13400
+ },
13401
+ setOnLayoutStrategy: function() {
13402
+ return import_useElementLayout2.setOnLayoutStrategy;
13393
13403
  }
13394
13404
  });
13395
13405
  module2.exports = __toCommonJS2(index_exports2);
13396
- var import_react_native_media_driver = require_index_native16(), import_react_native_use_responder_events = require_index_native17(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_createOptimizedView = require_createOptimizedView_native(), import_getBaseViews = require_getBaseViews_native(), import_getRect = require_getRect_native(), import_useElementLayout = require_useElementLayout_native(), import_Pressability = require_Pressability_native(), import_addNativeValidStyles = require_addNativeValidStyles_native(), import_useElementLayout2 = require_useElementLayout_native();
13406
+ var import_react_native_media_driver = require_index_native16(), import_react_native_use_responder_events = require_index_native17(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_addNativeValidStyles = require_addNativeValidStyles_native(), import_createOptimizedView = require_createOptimizedView_native(), import_getBaseViews = require_getBaseViews_native(), import_getRect = require_getRect_native(), import_useElementLayout = require_useElementLayout_native(), import_Pressability = require_Pressability_native(), import_useElementLayout2 = require_useElementLayout_native();
13397
13407
  __reExport2(index_exports2, require_index_native14(), module2.exports);
13398
13408
  __reExport2(index_exports2, require_reactNativeTypes_native(), module2.exports);
13399
13409
  (0, import_addNativeValidStyles.addNativeValidStyles)();
@@ -15450,14 +15460,14 @@ var require_useStackedZIndex_native = __commonJS({
15450
15460
  module2.exports = __toCommonJS2(useStackedZIndex_exports);
15451
15461
  var import_react3 = require("react"), import_context = require_context_native(), ZIndicesByContext = {}, CurrentPortalZIndices = {}, useStackedZIndex = function(props) {
15452
15462
  if (process.env.TAMAGUI_STACK_Z_INDEX_GLOBAL) {
15453
- var { stackZIndex, zIndex: zIndexProp = 1e3 } = props, id = (0, import_react3.useId)(), zIndex = (0, import_react3.useMemo)(function() {
15454
- if (stackZIndex && stackZIndex !== "global") {
15463
+ var { stackZIndex, zIndex: zIndexProp } = props, id = (0, import_react3.useId)(), zIndex = (0, import_react3.useMemo)(function() {
15464
+ if (stackZIndex && stackZIndex !== "global" && zIndexProp === void 0) {
15455
15465
  var highest = Object.values(CurrentPortalZIndices).reduce(function(acc, cur) {
15456
15466
  return Math.max(acc, cur);
15457
15467
  }, 0);
15458
15468
  return Math.max(stackZIndex === !0 ? 1 : stackZIndex, highest + 1);
15459
15469
  }
15460
- return zIndexProp || 1e3;
15470
+ return zIndexProp ?? 1e3;
15461
15471
  }, [
15462
15472
  stackZIndex
15463
15473
  ]);
@@ -30977,6 +30987,7 @@ __export(index_exports, {
30977
30987
  mediaQueryConfig: () => import_core11.mediaQueryConfig,
30978
30988
  mediaState: () => import_core11.mediaState,
30979
30989
  setConfig: () => import_core11.setConfig,
30990
+ setOnLayoutStrategy: () => import_core11.setOnLayoutStrategy,
30980
30991
  setupDev: () => import_core11.setupDev,
30981
30992
  setupReactNative: () => import_core11.setupReactNative,
30982
30993
  spacedChildren: () => import_core11.spacedChildren,
@@ -31350,6 +31361,7 @@ var import_core11 = __toESM(require_index_native18());
31350
31361
  mediaQueryConfig,
31351
31362
  mediaState,
31352
31363
  setConfig,
31364
+ setOnLayoutStrategy,
31353
31365
  setupDev,
31354
31366
  setupReactNative,
31355
31367
  spacedChildren,