@tamagui/core 1.101.4 → 1.101.6
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 +61 -64
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +59 -62
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/test.native.js
CHANGED
|
@@ -2475,43 +2475,32 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2475
2475
|
}
|
|
2476
2476
|
function insertStyleRules(rulesToInsert) {
|
|
2477
2477
|
if (!process.env.TAMAGUI_REACT_19) {
|
|
2478
|
-
if (!
|
|
2479
|
-
var
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
var
|
|
2483
|
-
|
|
2484
|
-
var rules = styleObject[import_helpers.StyleObjectRules];
|
|
2485
|
-
allSelectors[identifier] = rules.join(`
|
|
2478
|
+
if (!sheet) return;
|
|
2479
|
+
for (var key in rulesToInsert) {
|
|
2480
|
+
var styleObject = rulesToInsert[key], identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
2481
|
+
if (shouldInsertStyleRules(identifier)) {
|
|
2482
|
+
var rules = styleObject[import_helpers.StyleObjectRules];
|
|
2483
|
+
allSelectors[identifier] = rules.join(`
|
|
2486
2484
|
`), track(identifier), updateRules(identifier, rules);
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
}
|
|
2494
|
-
else sheet.insertRule(rule, sheet.cssRules.length);
|
|
2485
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2486
|
+
try {
|
|
2487
|
+
for (var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2488
|
+
var rule = _step.value;
|
|
2489
|
+
if (0) try {
|
|
2490
|
+
} catch (err) {
|
|
2495
2491
|
}
|
|
2496
|
-
|
|
2497
|
-
|
|
2492
|
+
else sheet.insertRule(rule, sheet.cssRules.length);
|
|
2493
|
+
}
|
|
2494
|
+
} catch (err) {
|
|
2495
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2496
|
+
} finally {
|
|
2497
|
+
try {
|
|
2498
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2498
2499
|
} finally {
|
|
2499
|
-
|
|
2500
|
-
!_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
|
|
2501
|
-
} finally {
|
|
2502
|
-
if (_didIteratorError1) throw _iteratorError1;
|
|
2503
|
-
}
|
|
2500
|
+
if (_didIteratorError) throw _iteratorError;
|
|
2504
2501
|
}
|
|
2505
2502
|
}
|
|
2506
2503
|
}
|
|
2507
|
-
} catch (err) {
|
|
2508
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
2509
|
-
} finally {
|
|
2510
|
-
try {
|
|
2511
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2512
|
-
} finally {
|
|
2513
|
-
if (_didIteratorError) throw _iteratorError;
|
|
2514
|
-
}
|
|
2515
2504
|
}
|
|
2516
2505
|
}
|
|
2517
2506
|
}
|
|
@@ -7263,7 +7252,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7263
7252
|
try {
|
|
7264
7253
|
for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7265
7254
|
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7266
|
-
fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0);
|
|
7255
|
+
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0));
|
|
7267
7256
|
}
|
|
7268
7257
|
} catch (err) {
|
|
7269
7258
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -7322,7 +7311,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7322
7311
|
try {
|
|
7323
7312
|
for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
|
|
7324
7313
|
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority), fullKey1 = "".concat(style[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style[import_helpers.StyleObjectPseudo] || "");
|
|
7325
|
-
fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0);
|
|
7314
|
+
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0));
|
|
7326
7315
|
}
|
|
7327
7316
|
} catch (err) {
|
|
7328
7317
|
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
@@ -7546,7 +7535,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7546
7535
|
conf = conf || (0, import_config.getConfig)();
|
|
7547
7536
|
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j);
|
|
7548
7537
|
return res;
|
|
7549
|
-
}
|
|
7538
|
+
};
|
|
7539
|
+
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
7540
|
+
if (0) var identifier;
|
|
7541
|
+
}
|
|
7542
|
+
var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)", animatableDefaults = _object_spread_props(_object_spread2({}, Object.fromEntries(Object.entries(import_helpers.tokenCategories.color).map(function(param) {
|
|
7550
7543
|
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
|
7551
7544
|
return [
|
|
7552
7545
|
k,
|
|
@@ -8876,23 +8869,27 @@ var require_createComponent_native = __commonJS({
|
|
|
8876
8869
|
children: content
|
|
8877
8870
|
}));
|
|
8878
8871
|
}
|
|
8879
|
-
if (process.env.TAMAGUI_REACT_19
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8872
|
+
if (process.env.TAMAGUI_REACT_19) {
|
|
8873
|
+
var rulesToInsert = splitStyles.rulesToInsert, keys = Object.keys(splitStyles.rulesToInsert);
|
|
8874
|
+
keys.length && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
8875
|
+
children: [
|
|
8876
|
+
content,
|
|
8877
|
+
/* lets see if we can put a single style tag per rule for optimal de-duping */
|
|
8878
|
+
keys.map(function(key3) {
|
|
8879
|
+
var styleObject = rulesToInsert[key3], identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
8880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
|
|
8881
|
+
// @ts-ignore
|
|
8882
|
+
href: "t_".concat(identifier),
|
|
8883
|
+
// @ts-ignore
|
|
8884
|
+
precedence: "default",
|
|
8885
|
+
children: styleObject[import_helpers.StyleObjectRules].join(`
|
|
8891
8886
|
`)
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8887
|
+
}, identifier);
|
|
8888
|
+
})
|
|
8889
|
+
]
|
|
8890
|
+
}));
|
|
8891
|
+
}
|
|
8892
|
+
if (0) {
|
|
8896
8893
|
var element1, title;
|
|
8897
8894
|
if (import_constants.isWeb)
|
|
8898
8895
|
try {
|
|
@@ -8971,10 +8968,10 @@ var require_createComponent_native = __commonJS({
|
|
|
8971
8968
|
}
|
|
8972
8969
|
});
|
|
8973
8970
|
function spacedChildren(props) {
|
|
8974
|
-
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;
|
|
8975
|
-
if (!(hasSpace || hasSeparator || isZStack)) return children;
|
|
8976
|
-
var childrenList = import_react3.Children.toArray(children), len = childrenList.length;
|
|
8977
|
-
if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace)) return
|
|
8971
|
+
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);
|
|
8972
|
+
if (!ensureKeys && !(hasSpace || hasSeparator || isZStack)) return children;
|
|
8973
|
+
var childrenList = areChildrenArray ? children : import_react3.Children.toArray(children), len = childrenList.length;
|
|
8974
|
+
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;
|
|
8978
8975
|
var final = [], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8979
8976
|
try {
|
|
8980
8977
|
for (var _iterator = childrenList.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
@@ -8988,22 +8985,22 @@ var require_createComponent_native = __commonJS({
|
|
|
8988
8985
|
children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, {
|
|
8989
8986
|
children: child
|
|
8990
8987
|
}) : child
|
|
8991
|
-
}, index)), !(isUnspaced(child) && index === 0) && !isZStack) {
|
|
8988
|
+
}, "".concat(index, "0t"))), !(isUnspaced(child) && index === 0) && !isZStack) {
|
|
8992
8989
|
var next = childrenList[index + 1];
|
|
8993
|
-
next && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
|
|
8994
|
-
key: "_".concat(index, "
|
|
8990
|
+
next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
|
|
8991
|
+
key: "_".concat(index, "_00t"),
|
|
8995
8992
|
direction,
|
|
8996
8993
|
space,
|
|
8997
8994
|
spaceFlex
|
|
8998
|
-
})), final.push(/* @__PURE__ */
|
|
8999
|
-
|
|
9000
|
-
}
|
|
9001
|
-
key: "_".concat(index, "
|
|
8995
|
+
})), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react3.Fragment, {
|
|
8996
|
+
children: separator
|
|
8997
|
+
}, "".concat(index, "03t"))), hasSpace && final.push(createSpacer({
|
|
8998
|
+
key: "_".concat(index, "01t"),
|
|
9002
8999
|
direction,
|
|
9003
9000
|
space,
|
|
9004
9001
|
spaceFlex
|
|
9005
9002
|
}))) : final.push(createSpacer({
|
|
9006
|
-
key: "_".concat(index, "
|
|
9003
|
+
key: "_".concat(index, "02t"),
|
|
9007
9004
|
direction,
|
|
9008
9005
|
space,
|
|
9009
9006
|
spaceFlex
|