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/test.native.js
CHANGED
|
@@ -2530,9 +2530,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2530
2530
|
insertedTransforms: function() {
|
|
2531
2531
|
return insertedTransforms;
|
|
2532
2532
|
},
|
|
2533
|
-
listenForSheetChanges: function() {
|
|
2534
|
-
return listenForSheetChanges;
|
|
2535
|
-
},
|
|
2536
2533
|
scanAllSheets: function() {
|
|
2537
2534
|
return scanAllSheets;
|
|
2538
2535
|
},
|
|
@@ -2564,33 +2561,6 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2564
2561
|
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value, !0;
|
|
2565
2562
|
}
|
|
2566
2563
|
}
|
|
2567
|
-
function listenForSheetChanges() {
|
|
2568
|
-
if (import_constants4.isClient) {
|
|
2569
|
-
var mo = new MutationObserver(function(entries) {
|
|
2570
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2571
|
-
try {
|
|
2572
|
-
for (var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2573
|
-
var entry = _step.value;
|
|
2574
|
-
if (entry instanceof HTMLStyleElement && entry.sheet || entry instanceof HTMLLinkElement && entry.href.endsWith(".css")) {
|
|
2575
|
-
scanAllSheets();
|
|
2576
|
-
break;
|
|
2577
|
-
}
|
|
2578
|
-
}
|
|
2579
|
-
} catch (err) {
|
|
2580
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
2581
|
-
} finally {
|
|
2582
|
-
try {
|
|
2583
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2584
|
-
} finally {
|
|
2585
|
-
if (_didIteratorError) throw _iteratorError;
|
|
2586
|
-
}
|
|
2587
|
-
}
|
|
2588
|
-
});
|
|
2589
|
-
mo.observe(document.head, {
|
|
2590
|
-
childList: !0
|
|
2591
|
-
});
|
|
2592
|
-
}
|
|
2593
|
-
}
|
|
2594
2564
|
function scanAllSheets() {
|
|
2595
2565
|
var collectThemes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, tokens = arguments.length > 1 ? arguments[1] : void 0;
|
|
2596
2566
|
if (0) {
|
|
@@ -2616,7 +2586,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2616
2586
|
}
|
|
2617
2587
|
}
|
|
2618
2588
|
function trackInsertedStyle(id) {
|
|
2619
|
-
var
|
|
2589
|
+
var next = (totalSelectorsInserted.get(id) || 0) + 1;
|
|
2620
2590
|
return totalSelectorsInserted.set(id, next), next;
|
|
2621
2591
|
}
|
|
2622
2592
|
var bailAfterEnv = process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES, bailAfter = bailAfterEnv ? +bailAfterEnv : 700, sheet = null, trackAllRules = !0;
|
|
@@ -2645,21 +2615,24 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2645
2615
|
if (shouldInsertStyleRules(identifier)) {
|
|
2646
2616
|
var rules = styleObject[import_helpers.StyleObjectRules];
|
|
2647
2617
|
allSelectors[identifier] = rules.join(`
|
|
2648
|
-
`),
|
|
2649
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2618
|
+
`), trackInsertedStyle(identifier), updateRules(identifier, rules);
|
|
2650
2619
|
try {
|
|
2651
|
-
|
|
2652
|
-
var rule = _step.value;
|
|
2653
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
2654
|
-
}
|
|
2655
|
-
} catch (err) {
|
|
2656
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
2657
|
-
} finally {
|
|
2620
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2658
2621
|
try {
|
|
2659
|
-
|
|
2622
|
+
for (var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2623
|
+
var rule = _step.value;
|
|
2624
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
2625
|
+
}
|
|
2626
|
+
} catch (err) {
|
|
2627
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2660
2628
|
} finally {
|
|
2661
|
-
|
|
2629
|
+
try {
|
|
2630
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2631
|
+
} finally {
|
|
2632
|
+
if (_didIteratorError) throw _iteratorError;
|
|
2633
|
+
}
|
|
2662
2634
|
}
|
|
2635
|
+
} catch {
|
|
2663
2636
|
}
|
|
2664
2637
|
}
|
|
2665
2638
|
}
|
|
@@ -6467,7 +6440,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6467
6440
|
conf = conf || (0, import_config.getConfig)();
|
|
6468
6441
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
6469
6442
|
import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6470
|
-
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
|
|
6443
|
+
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), styleState = {
|
|
6471
6444
|
classNames,
|
|
6472
6445
|
conf,
|
|
6473
6446
|
props,
|
|
@@ -6557,7 +6530,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6557
6530
|
var style2 = styleState.style;
|
|
6558
6531
|
if (0) {
|
|
6559
6532
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
6560
|
-
if (!styleProps.isAnimated && isReactNative) {
|
|
6533
|
+
if (!(styleProps.isAnimated && isReactNative) && isReactNative) {
|
|
6561
6534
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
6562
6535
|
try {
|
|
6563
6536
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
@@ -7906,9 +7879,10 @@ var require_useComponentState_native = __commonJS({
|
|
|
7906
7879
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
7907
7880
|
state.unmounted && env && staticConfig.variants[env] ? props[env] = !0 : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
|
|
7908
7881
|
}
|
|
7909
|
-
var noClass = !import_constants4.isWeb || !!props.forceStyle
|
|
7910
|
-
if (
|
|
7911
|
-
|
|
7882
|
+
var noClass = !import_constants4.isWeb || !!props.forceStyle;
|
|
7883
|
+
if (!isHydrated) noClass = !1;
|
|
7884
|
+
else if (import_constants4.isWeb && isHydrated) {
|
|
7885
|
+
var isAnimatedAndHydrated = isAnimated && isHydrated, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
7912
7886
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0);
|
|
7913
7887
|
}
|
|
7914
7888
|
return {
|
|
@@ -8394,7 +8368,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8394
8368
|
staticConfig,
|
|
8395
8369
|
stateRef
|
|
8396
8370
|
});
|
|
8397
|
-
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));
|
|
8371
|
+
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));
|
|
8398
8372
|
}
|
|
8399
8373
|
groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
8400
8374
|
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
@@ -9454,7 +9428,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
9454
9428
|
var foundThemes;
|
|
9455
9429
|
if (configIn.themes) {
|
|
9456
9430
|
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
9457
|
-
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed))
|
|
9431
|
+
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed));
|
|
9458
9432
|
}
|
|
9459
9433
|
var fontSizeTokens = null, fontsParsed;
|
|
9460
9434
|
if (configIn.fonts) {
|