@tamagui/core 1.101.4 → 1.101.5
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 +53 -60
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +51 -58
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -2672,44 +2672,33 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2672
2672
|
function insertStyleRules(rulesToInsert) {
|
|
2673
2673
|
if (!process.env.TAMAGUI_REACT_19) {
|
|
2674
2674
|
if (!rulesToInsert.length || !sheet) return;
|
|
2675
|
-
var
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
var
|
|
2679
|
-
|
|
2680
|
-
var rules = styleObject[import_helpers.StyleObjectRules];
|
|
2681
|
-
allSelectors[identifier] = rules.join(`
|
|
2675
|
+
for (var key in rulesToInsert) {
|
|
2676
|
+
var styleObject = rulesToInsert[key], identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
2677
|
+
if (shouldInsertStyleRules(identifier)) {
|
|
2678
|
+
var rules = styleObject[import_helpers.StyleObjectRules];
|
|
2679
|
+
allSelectors[identifier] = rules.join(`
|
|
2682
2680
|
`), track(identifier), updateRules(identifier, rules);
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
}
|
|
2692
|
-
else sheet.insertRule(rule, sheet.cssRules.length);
|
|
2681
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2682
|
+
try {
|
|
2683
|
+
for (var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2684
|
+
var rule = _step.value;
|
|
2685
|
+
if (process.env.NODE_ENV === "production") try {
|
|
2686
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
2687
|
+
} catch (err) {
|
|
2688
|
+
console.error("Error inserting CSS", err);
|
|
2693
2689
|
}
|
|
2694
|
-
|
|
2695
|
-
|
|
2690
|
+
else sheet.insertRule(rule, sheet.cssRules.length);
|
|
2691
|
+
}
|
|
2692
|
+
} catch (err) {
|
|
2693
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2694
|
+
} finally {
|
|
2695
|
+
try {
|
|
2696
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2696
2697
|
} finally {
|
|
2697
|
-
|
|
2698
|
-
!_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
|
|
2699
|
-
} finally {
|
|
2700
|
-
if (_didIteratorError1) throw _iteratorError1;
|
|
2701
|
-
}
|
|
2698
|
+
if (_didIteratorError) throw _iteratorError;
|
|
2702
2699
|
}
|
|
2703
2700
|
}
|
|
2704
2701
|
}
|
|
2705
|
-
} catch (err) {
|
|
2706
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
2707
|
-
} finally {
|
|
2708
|
-
try {
|
|
2709
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2710
|
-
} finally {
|
|
2711
|
-
if (_didIteratorError) throw _iteratorError;
|
|
2712
|
-
}
|
|
2713
2702
|
}
|
|
2714
2703
|
}
|
|
2715
2704
|
}
|
|
@@ -9664,23 +9653,27 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9664
9653
|
children: content
|
|
9665
9654
|
}));
|
|
9666
9655
|
}
|
|
9667
|
-
if (process.env.TAMAGUI_REACT_19
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9656
|
+
if (process.env.TAMAGUI_REACT_19) {
|
|
9657
|
+
var rulesToInsert = splitStyles.rulesToInsert, keys = Object.keys(splitStyles.rulesToInsert);
|
|
9658
|
+
keys.length && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
9659
|
+
children: [
|
|
9660
|
+
content,
|
|
9661
|
+
/* lets see if we can put a single style tag per rule for optimal de-duping */
|
|
9662
|
+
keys.map(function(key3) {
|
|
9663
|
+
var styleObject = rulesToInsert[key3], identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
9664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
|
|
9665
|
+
// @ts-ignore
|
|
9666
|
+
href: "t_".concat(identifier),
|
|
9667
|
+
// @ts-ignore
|
|
9668
|
+
precedence: "default",
|
|
9669
|
+
children: styleObject[import_helpers.StyleObjectRules].join(`
|
|
9679
9670
|
`)
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9671
|
+
}, identifier);
|
|
9672
|
+
})
|
|
9673
|
+
]
|
|
9674
|
+
}));
|
|
9675
|
+
}
|
|
9676
|
+
if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
9684
9677
|
var element1 = typeof elementType == "string" ? elementType : "Component", title = "render <".concat(element1, " /> (").concat(internalID, ") with props");
|
|
9685
9678
|
if (import_constants.isWeb) {
|
|
9686
9679
|
console.groupCollapsed(title);
|
|
@@ -9793,10 +9786,10 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9793
9786
|
}
|
|
9794
9787
|
});
|
|
9795
9788
|
function spacedChildren(props) {
|
|
9796
|
-
var _childrenList__type, _childrenList_, isZStack = props.isZStack, children = props.children, space = props.space, direction = props.direction, spaceFlex = props.spaceFlex, separator = props.separator, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null;
|
|
9797
|
-
if (!(hasSpace || hasSeparator || isZStack)) return children;
|
|
9798
|
-
var childrenList = import_react3.Children.toArray(children), len = childrenList.length;
|
|
9799
|
-
if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace)) return
|
|
9789
|
+
var _childrenList__type, _childrenList_, isZStack = props.isZStack, children = props.children, space = props.space, direction = props.direction, spaceFlex = props.spaceFlex, separator = props.separator, ensureKeys = props.ensureKeys, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null, areChildrenArray = Array.isArray(children);
|
|
9790
|
+
if (!ensureKeys && !(hasSpace || hasSeparator || isZStack)) return children;
|
|
9791
|
+
var childrenList = areChildrenArray ? children : import_react3.Children.toArray(children), len = childrenList.length;
|
|
9792
|
+
if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace)) return children;
|
|
9800
9793
|
var final = [], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
9801
9794
|
try {
|
|
9802
9795
|
for (var _iterator = childrenList.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
@@ -9810,22 +9803,22 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9810
9803
|
children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, {
|
|
9811
9804
|
children: child
|
|
9812
9805
|
}) : child
|
|
9813
|
-
}, index)), !(isUnspaced(child) && index === 0) && !isZStack) {
|
|
9806
|
+
}, "".concat(index, "0t"))), !(isUnspaced(child) && index === 0) && !isZStack) {
|
|
9814
9807
|
var next = childrenList[index + 1];
|
|
9815
|
-
next && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
|
|
9816
|
-
key: "_".concat(index, "
|
|
9808
|
+
next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
|
|
9809
|
+
key: "_".concat(index, "_00t"),
|
|
9817
9810
|
direction,
|
|
9818
9811
|
space,
|
|
9819
9812
|
spaceFlex
|
|
9820
|
-
})), final.push(/* @__PURE__ */
|
|
9821
|
-
|
|
9822
|
-
}
|
|
9823
|
-
key: "_".concat(index, "
|
|
9813
|
+
})), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react3.Fragment, {
|
|
9814
|
+
children: separator
|
|
9815
|
+
}, "".concat(index, "03t"))), hasSpace && final.push(createSpacer({
|
|
9816
|
+
key: "_".concat(index, "01t"),
|
|
9824
9817
|
direction,
|
|
9825
9818
|
space,
|
|
9826
9819
|
spaceFlex
|
|
9827
9820
|
}))) : final.push(createSpacer({
|
|
9828
|
-
key: "_".concat(index, "
|
|
9821
|
+
key: "_".concat(index, "02t"),
|
|
9829
9822
|
direction,
|
|
9830
9823
|
space,
|
|
9831
9824
|
spaceFlex
|