@tamagui/core 1.129.15 → 1.129.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.js +23 -59
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +23 -49
- package/dist/test.native.js.map +1 -1
- package/package.json +9 -9
package/dist/native.js
CHANGED
|
@@ -1448,9 +1448,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1448
1448
|
insertedTransforms: function() {
|
|
1449
1449
|
return insertedTransforms;
|
|
1450
1450
|
},
|
|
1451
|
-
listenForSheetChanges: function() {
|
|
1452
|
-
return listenForSheetChanges;
|
|
1453
|
-
},
|
|
1454
1451
|
scanAllSheets: function() {
|
|
1455
1452
|
return scanAllSheets;
|
|
1456
1453
|
},
|
|
@@ -1484,33 +1481,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1484
1481
|
var startI = s + 10, endI = css.indexOf(";"), value = css.slice(startI, endI);
|
|
1485
1482
|
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value, !0;
|
|
1486
1483
|
}
|
|
1487
|
-
function listenForSheetChanges() {
|
|
1488
|
-
if (import_constants.isClient) {
|
|
1489
|
-
var mo = new MutationObserver(function(entries) {
|
|
1490
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1491
|
-
try {
|
|
1492
|
-
for (var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
1493
|
-
var entry = _step.value;
|
|
1494
|
-
if (entry instanceof HTMLStyleElement && entry.sheet || entry instanceof HTMLLinkElement && entry.href.endsWith(".css")) {
|
|
1495
|
-
scanAllSheets();
|
|
1496
|
-
break;
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
} catch (err) {
|
|
1500
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
1501
|
-
} finally {
|
|
1502
|
-
try {
|
|
1503
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
1504
|
-
} finally {
|
|
1505
|
-
if (_didIteratorError) throw _iteratorError;
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
});
|
|
1509
|
-
mo.observe(document.head, {
|
|
1510
|
-
childList: !0
|
|
1511
|
-
});
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
1484
|
var lastScannedSheets = null;
|
|
1515
1485
|
function scanAllSheets() {
|
|
1516
1486
|
var collectThemes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, tokens = arguments.length > 1 ? arguments[1] : void 0;
|
|
@@ -1554,7 +1524,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1554
1524
|
}
|
|
1555
1525
|
}
|
|
1556
1526
|
function trackInsertedStyle(id) {
|
|
1557
|
-
var
|
|
1527
|
+
var next = (totalSelectorsInserted.get(id) || 0) + 1;
|
|
1558
1528
|
return totalSelectorsInserted.set(id, next), next;
|
|
1559
1529
|
}
|
|
1560
1530
|
var bailAfterEnv = process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES, bailAfter = bailAfterEnv ? +bailAfterEnv : 700;
|
|
@@ -1601,12 +1571,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1601
1571
|
}
|
|
1602
1572
|
continue;
|
|
1603
1573
|
}
|
|
1604
|
-
var total = trackInsertedStyle(identifier, remove);
|
|
1605
|
-
if (remove) total === 0 && delete allSelectors[identifier];
|
|
1606
|
-
else if (!(identifier in allSelectors)) {
|
|
1607
|
-
var isTransform = identifier.startsWith("_transform-"), shouldInsert = isTransform ? addTransform(identifier, cssRule.cssText, cssRule) : !0;
|
|
1608
|
-
shouldInsert && (allSelectors[identifier] = cssRule.cssText);
|
|
1609
|
-
}
|
|
1610
1574
|
}
|
|
1611
1575
|
}
|
|
1612
1576
|
return scannedCache.set(sheet2, cacheKey), dedupedThemes;
|
|
@@ -1727,26 +1691,25 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1727
1691
|
if (shouldInsertStyleRules(identifier)) {
|
|
1728
1692
|
var rules = styleObject[import_helpers2.StyleObjectRules];
|
|
1729
1693
|
allSelectors[identifier] = rules.join(`
|
|
1730
|
-
`),
|
|
1731
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1694
|
+
`), trackInsertedStyle(identifier), updateRules(identifier, rules);
|
|
1732
1695
|
try {
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1696
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1697
|
+
try {
|
|
1698
|
+
for (var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
1699
|
+
var rule = _step.value;
|
|
1736
1700
|
sheet.insertRule(rule, sheet.cssRules.length);
|
|
1737
|
-
} catch (err) {
|
|
1738
|
-
console.error("Error inserting CSS", err);
|
|
1739
1701
|
}
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
} catch (err) {
|
|
1743
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
1744
|
-
} finally {
|
|
1745
|
-
try {
|
|
1746
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
1702
|
+
} catch (err) {
|
|
1703
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
1747
1704
|
} finally {
|
|
1748
|
-
|
|
1705
|
+
try {
|
|
1706
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
1707
|
+
} finally {
|
|
1708
|
+
if (_didIteratorError) throw _iteratorError;
|
|
1709
|
+
}
|
|
1749
1710
|
}
|
|
1711
|
+
} catch {
|
|
1712
|
+
process.env.NODE_ENV === "production" && console.error("Error inserting style rule", rules);
|
|
1750
1713
|
}
|
|
1751
1714
|
}
|
|
1752
1715
|
}
|
|
@@ -5727,7 +5690,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5727
5690
|
conf = conf || (0, import_config.getConfig)();
|
|
5728
5691
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
5729
5692
|
import_constants.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
5730
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass
|
|
5693
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles);
|
|
5731
5694
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
5732
5695
|
var styleState = {
|
|
5733
5696
|
classNames,
|
|
@@ -5834,7 +5797,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5834
5797
|
var style2 = styleState.style;
|
|
5835
5798
|
if (0) {
|
|
5836
5799
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
5837
|
-
if (!styleProps.isAnimated && isReactNative) {
|
|
5800
|
+
if (!(styleProps.isAnimated && isReactNative) && isReactNative) {
|
|
5838
5801
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
5839
5802
|
try {
|
|
5840
5803
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
@@ -7233,9 +7196,10 @@ var require_useComponentState_native = __commonJS({
|
|
|
7233
7196
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
7234
7197
|
state.unmounted && env && staticConfig.variants[env] ? (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence ENTER "${env}"`), props[env] = !0) : isExiting && exv && (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence EXIT "${exv}"`), props[exv] = exitVariant !== enterExitVariant);
|
|
7235
7198
|
}
|
|
7236
|
-
var noClass = !import_constants.isWeb || !!props.forceStyle
|
|
7237
|
-
if (
|
|
7238
|
-
|
|
7199
|
+
var noClass = !import_constants.isWeb || !!props.forceStyle;
|
|
7200
|
+
if (!isHydrated) noClass = !1;
|
|
7201
|
+
else if (import_constants.isWeb && isHydrated) {
|
|
7202
|
+
var isAnimatedAndHydrated = isAnimated && isHydrated, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
7239
7203
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
7240
7204
|
isAnimatedAndHydrated,
|
|
7241
7205
|
isDisabledManually,
|
|
@@ -7786,7 +7750,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7786
7750
|
staticConfig,
|
|
7787
7751
|
stateRef
|
|
7788
7752
|
});
|
|
7789
|
-
animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`), animations.ref && (animatedRef = animations.ref)), process.env.NODE_ENV === "development" && time2 && time2`animations`;
|
|
7753
|
+
isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`), animations.ref && (animatedRef = animations.ref)), process.env.NODE_ENV === "development" && time2 && time2`animations`;
|
|
7790
7754
|
}
|
|
7791
7755
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
7792
7756
|
|
|
@@ -8922,7 +8886,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8922
8886
|
var foundThemes;
|
|
8923
8887
|
if (configIn.themes) {
|
|
8924
8888
|
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
8925
|
-
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed))
|
|
8889
|
+
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed));
|
|
8926
8890
|
}
|
|
8927
8891
|
var fontSizeTokens = null, fontsParsed;
|
|
8928
8892
|
if (configIn.fonts) {
|