tamagui 1.129.15 → 1.129.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/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 +55 -55
package/dist/native.js
CHANGED
|
@@ -2547,9 +2547,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2547
2547
|
insertedTransforms: function() {
|
|
2548
2548
|
return insertedTransforms;
|
|
2549
2549
|
},
|
|
2550
|
-
listenForSheetChanges: function() {
|
|
2551
|
-
return listenForSheetChanges;
|
|
2552
|
-
},
|
|
2553
2550
|
scanAllSheets: function() {
|
|
2554
2551
|
return scanAllSheets;
|
|
2555
2552
|
},
|
|
@@ -2583,33 +2580,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2583
2580
|
var startI = s + 10, endI = css.indexOf(";"), value = css.slice(startI, endI);
|
|
2584
2581
|
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value, !0;
|
|
2585
2582
|
}
|
|
2586
|
-
function listenForSheetChanges() {
|
|
2587
|
-
if (import_constants4.isClient) {
|
|
2588
|
-
var mo = new MutationObserver(function(entries) {
|
|
2589
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2590
|
-
try {
|
|
2591
|
-
for (var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2592
|
-
var entry = _step.value;
|
|
2593
|
-
if (entry instanceof HTMLStyleElement && entry.sheet || entry instanceof HTMLLinkElement && entry.href.endsWith(".css")) {
|
|
2594
|
-
scanAllSheets();
|
|
2595
|
-
break;
|
|
2596
|
-
}
|
|
2597
|
-
}
|
|
2598
|
-
} catch (err) {
|
|
2599
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
2600
|
-
} finally {
|
|
2601
|
-
try {
|
|
2602
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2603
|
-
} finally {
|
|
2604
|
-
if (_didIteratorError) throw _iteratorError;
|
|
2605
|
-
}
|
|
2606
|
-
}
|
|
2607
|
-
});
|
|
2608
|
-
mo.observe(document.head, {
|
|
2609
|
-
childList: !0
|
|
2610
|
-
});
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
2583
|
var lastScannedSheets = null;
|
|
2614
2584
|
function scanAllSheets() {
|
|
2615
2585
|
var collectThemes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, tokens = arguments.length > 1 ? arguments[1] : void 0;
|
|
@@ -2653,7 +2623,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2653
2623
|
}
|
|
2654
2624
|
}
|
|
2655
2625
|
function trackInsertedStyle(id) {
|
|
2656
|
-
var
|
|
2626
|
+
var next = (totalSelectorsInserted.get(id) || 0) + 1;
|
|
2657
2627
|
return totalSelectorsInserted.set(id, next), next;
|
|
2658
2628
|
}
|
|
2659
2629
|
var bailAfterEnv = process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES, bailAfter = bailAfterEnv ? +bailAfterEnv : 700;
|
|
@@ -2700,12 +2670,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2700
2670
|
}
|
|
2701
2671
|
continue;
|
|
2702
2672
|
}
|
|
2703
|
-
var total = trackInsertedStyle(identifier, remove);
|
|
2704
|
-
if (remove) total === 0 && delete allSelectors[identifier];
|
|
2705
|
-
else if (!(identifier in allSelectors)) {
|
|
2706
|
-
var isTransform = identifier.startsWith("_transform-"), shouldInsert = isTransform ? addTransform(identifier, cssRule.cssText, cssRule) : !0;
|
|
2707
|
-
shouldInsert && (allSelectors[identifier] = cssRule.cssText);
|
|
2708
|
-
}
|
|
2709
2673
|
}
|
|
2710
2674
|
}
|
|
2711
2675
|
return scannedCache.set(sheet2, cacheKey), dedupedThemes;
|
|
@@ -2826,26 +2790,25 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2826
2790
|
if (shouldInsertStyleRules(identifier)) {
|
|
2827
2791
|
var rules = styleObject[import_helpers.StyleObjectRules];
|
|
2828
2792
|
allSelectors[identifier] = rules.join(`
|
|
2829
|
-
`),
|
|
2830
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2793
|
+
`), trackInsertedStyle(identifier), updateRules(identifier, rules);
|
|
2831
2794
|
try {
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2795
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2796
|
+
try {
|
|
2797
|
+
for (var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2798
|
+
var rule = _step.value;
|
|
2835
2799
|
sheet.insertRule(rule, sheet.cssRules.length);
|
|
2836
|
-
} catch (err) {
|
|
2837
|
-
console.error("Error inserting CSS", err);
|
|
2838
2800
|
}
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
} catch (err) {
|
|
2842
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
2843
|
-
} finally {
|
|
2844
|
-
try {
|
|
2845
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2801
|
+
} catch (err) {
|
|
2802
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2846
2803
|
} finally {
|
|
2847
|
-
|
|
2804
|
+
try {
|
|
2805
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2806
|
+
} finally {
|
|
2807
|
+
if (_didIteratorError) throw _iteratorError;
|
|
2808
|
+
}
|
|
2848
2809
|
}
|
|
2810
|
+
} catch {
|
|
2811
|
+
process.env.NODE_ENV === "production" && console.error("Error inserting style rule", rules);
|
|
2849
2812
|
}
|
|
2850
2813
|
}
|
|
2851
2814
|
}
|
|
@@ -6826,7 +6789,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6826
6789
|
conf = conf || (0, import_config.getConfig)();
|
|
6827
6790
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
6828
6791
|
import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6829
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass
|
|
6792
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
6830
6793
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
6831
6794
|
var styleState = {
|
|
6832
6795
|
classNames,
|
|
@@ -6933,7 +6896,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6933
6896
|
var style2 = styleState.style;
|
|
6934
6897
|
if (0) {
|
|
6935
6898
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
6936
|
-
if (!styleProps.isAnimated && isReactNative) {
|
|
6899
|
+
if (!(styleProps.isAnimated && isReactNative) && isReactNative) {
|
|
6937
6900
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
6938
6901
|
try {
|
|
6939
6902
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
@@ -8332,9 +8295,10 @@ var require_useComponentState_native = __commonJS({
|
|
|
8332
8295
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
8333
8296
|
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);
|
|
8334
8297
|
}
|
|
8335
|
-
var noClass = !import_constants4.isWeb || !!props.forceStyle
|
|
8336
|
-
if (
|
|
8337
|
-
|
|
8298
|
+
var noClass = !import_constants4.isWeb || !!props.forceStyle;
|
|
8299
|
+
if (!isHydrated) noClass = !1;
|
|
8300
|
+
else if (import_constants4.isWeb && isHydrated) {
|
|
8301
|
+
var isAnimatedAndHydrated = isAnimated && isHydrated, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
8338
8302
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
8339
8303
|
isAnimatedAndHydrated,
|
|
8340
8304
|
isDisabledManually,
|
|
@@ -8885,7 +8849,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8885
8849
|
staticConfig,
|
|
8886
8850
|
stateRef
|
|
8887
8851
|
});
|
|
8888
|
-
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`;
|
|
8852
|
+
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`;
|
|
8889
8853
|
}
|
|
8890
8854
|
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.
|
|
8891
8855
|
|
|
@@ -10021,7 +9985,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
10021
9985
|
var foundThemes;
|
|
10022
9986
|
if (configIn.themes) {
|
|
10023
9987
|
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
10024
|
-
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed))
|
|
9988
|
+
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed));
|
|
10025
9989
|
}
|
|
10026
9990
|
var fontSizeTokens = null, fontsParsed;
|
|
10027
9991
|
if (configIn.fonts) {
|