tamagui 1.126.14 → 1.126.16
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/cjs/index.cjs +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/index.native.js.map +1 -1
- package/dist/jsx/index.js +2 -0
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +2 -2
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +2 -0
- package/dist/jsx/index.native.js.map +2 -2
- package/dist/native.js +105 -88
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +105 -88
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
- package/src/index.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
package/dist/test.native.js
CHANGED
|
@@ -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(),
|
|
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,13 +13133,18 @@ var require_useElementLayout_native = __commonJS({
|
|
|
13046
13133
|
}
|
|
13047
13134
|
}
|
|
13048
13135
|
}, layoutOnAnimationFrame = function() {
|
|
13049
|
-
|
|
13050
|
-
|
|
13136
|
+
var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
|
|
13137
|
+
if (lastFrameAt = now, status !== "inactive") {
|
|
13138
|
+
var expectedFrameTime = 16.67, hasRecentSyncWork = timeSinceLastFrame > expectedFrameTime * numDroppedFramesUntilPause;
|
|
13139
|
+
hasRecentSyncWork || Nodes.forEach(updateLayoutIfChanged);
|
|
13140
|
+
}
|
|
13141
|
+
rAF(layoutOnAnimationFrame);
|
|
13142
|
+
}, updateLayoutIfChanged2 = updateLayoutIfChanged, layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), lastFrameAt = Date.now(), numDroppedFramesUntilPause = 2, (0, import_web.___onDidFinishClientRender)(function() {
|
|
13051
13143
|
avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
|
|
13052
13144
|
return cb();
|
|
13053
13145
|
}), queuedUpdates.clear());
|
|
13054
13146
|
}), rAF(layoutOnAnimationFrame));
|
|
13055
|
-
var updateLayoutIfChanged, layoutOnAnimationFrame, updateLayoutIfChanged2, layoutOnAnimationFrame2, avoidUpdates, queuedUpdates, getElementLayoutEvent2 = function(target) {
|
|
13147
|
+
var updateLayoutIfChanged, layoutOnAnimationFrame, updateLayoutIfChanged2, layoutOnAnimationFrame2, avoidUpdates, queuedUpdates, lastFrameAt, numDroppedFramesUntilPause, getElementLayoutEvent2 = function(target) {
|
|
13056
13148
|
var res = null;
|
|
13057
13149
|
if (measureLayout(target, null, function(x, y, width, height, left, top) {
|
|
13058
13150
|
res = {
|
|
@@ -13208,86 +13300,6 @@ var require_Pressability_native = __commonJS({
|
|
|
13208
13300
|
}
|
|
13209
13301
|
});
|
|
13210
13302
|
|
|
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
13303
|
// ../../core/core/dist/cjs/reactNativeTypes.native.js
|
|
13292
13304
|
var require_reactNativeTypes_native = __commonJS({
|
|
13293
13305
|
"../../core/core/dist/cjs/reactNativeTypes.native.js"(exports2, module2) {
|
|
@@ -13390,10 +13402,13 @@ var require_index_native18 = __commonJS({
|
|
|
13390
13402
|
},
|
|
13391
13403
|
getElementLayoutEvent: function() {
|
|
13392
13404
|
return import_useElementLayout2.getElementLayoutEvent;
|
|
13405
|
+
},
|
|
13406
|
+
setOnLayoutStrategy: function() {
|
|
13407
|
+
return import_useElementLayout2.setOnLayoutStrategy;
|
|
13393
13408
|
}
|
|
13394
13409
|
});
|
|
13395
13410
|
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(),
|
|
13411
|
+
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
13412
|
__reExport2(index_exports2, require_index_native14(), module2.exports);
|
|
13398
13413
|
__reExport2(index_exports2, require_reactNativeTypes_native(), module2.exports);
|
|
13399
13414
|
(0, import_addNativeValidStyles.addNativeValidStyles)();
|
|
@@ -15450,14 +15465,14 @@ var require_useStackedZIndex_native = __commonJS({
|
|
|
15450
15465
|
module2.exports = __toCommonJS2(useStackedZIndex_exports);
|
|
15451
15466
|
var import_react3 = require("react"), import_context = require_context_native(), ZIndicesByContext = {}, CurrentPortalZIndices = {}, useStackedZIndex = function(props) {
|
|
15452
15467
|
if (process.env.TAMAGUI_STACK_Z_INDEX_GLOBAL) {
|
|
15453
|
-
var { stackZIndex, zIndex: zIndexProp
|
|
15454
|
-
if (stackZIndex && stackZIndex !== "global") {
|
|
15468
|
+
var { stackZIndex, zIndex: zIndexProp } = props, id = (0, import_react3.useId)(), zIndex = (0, import_react3.useMemo)(function() {
|
|
15469
|
+
if (stackZIndex && stackZIndex !== "global" && zIndexProp === void 0) {
|
|
15455
15470
|
var highest = Object.values(CurrentPortalZIndices).reduce(function(acc, cur) {
|
|
15456
15471
|
return Math.max(acc, cur);
|
|
15457
15472
|
}, 0);
|
|
15458
15473
|
return Math.max(stackZIndex === !0 ? 1 : stackZIndex, highest + 1);
|
|
15459
15474
|
}
|
|
15460
|
-
return zIndexProp
|
|
15475
|
+
return zIndexProp ?? 1e3;
|
|
15461
15476
|
}, [
|
|
15462
15477
|
stackZIndex
|
|
15463
15478
|
]);
|
|
@@ -30977,6 +30992,7 @@ __export(index_exports, {
|
|
|
30977
30992
|
mediaQueryConfig: () => import_core11.mediaQueryConfig,
|
|
30978
30993
|
mediaState: () => import_core11.mediaState,
|
|
30979
30994
|
setConfig: () => import_core11.setConfig,
|
|
30995
|
+
setOnLayoutStrategy: () => import_core11.setOnLayoutStrategy,
|
|
30980
30996
|
setupDev: () => import_core11.setupDev,
|
|
30981
30997
|
setupReactNative: () => import_core11.setupReactNative,
|
|
30982
30998
|
spacedChildren: () => import_core11.spacedChildren,
|
|
@@ -31350,6 +31366,7 @@ var import_core11 = __toESM(require_index_native18());
|
|
|
31350
31366
|
mediaQueryConfig,
|
|
31351
31367
|
mediaState,
|
|
31352
31368
|
setConfig,
|
|
31369
|
+
setOnLayoutStrategy,
|
|
31353
31370
|
setupDev,
|
|
31354
31371
|
setupReactNative,
|
|
31355
31372
|
spacedChildren,
|