@tamagui/web 3.0.0-beta.1111.1 → 3.0.0-beta.1121.1

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.
@@ -314,22 +314,22 @@ function contributeProp(pass, keyOg, valOg) {
314
314
  var resolveClassName = styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.resolveClassName;
315
315
  var composedProps = null;
316
316
  var sink = function(entry2) {
317
- var property2 = entry2[0];
317
+ var property3 = entry2[0];
318
318
  var condition2 = entry2[2];
319
- if (property2.charCodeAt(0) === 95 && property2.charCodeAt(1) === 95) {
319
+ if (property3.charCodeAt(0) === 95 && property3.charCodeAt(1) === 95) {
320
320
  composedProps || (composedProps = {});
321
- composedProps[property2] = mergeFrontendCondition(composedProps[property2], entry2[1], condition2);
321
+ composedProps[property3] = mergeFrontendCondition(composedProps[property3], entry2[1], condition2);
322
322
  return;
323
323
  }
324
324
  if (condition2 !== void 0) {
325
- if (isValidStyleKey(property2, validStyles)) contributeValue(styleState, property2, entry2[1], void 0, false, condition2);
326
- else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property2}" is not a valid style on this component; the frontend value is dropped.`);
325
+ if (isValidStyleKey(property3, validStyles)) contributeValue(styleState, property3, entry2[1], void 0, false, condition2);
326
+ else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property3}" is not a valid style on this component; the frontend value is dropped.`);
327
327
  return;
328
328
  }
329
- if (property2 === "group") pass[passFrontendGroup] = entry2[1];
330
- else if (property2 === "container") pass[passFrontendContainer] = entry2[1];
331
- else if (property2 === "containerType") pass[passFrontendContainerType] = entry2[1];
332
- contributeProp(pass, property2, entry2[1]);
329
+ if (property3 === "group") pass[passFrontendGroup] = entry2[1];
330
+ else if (property3 === "container") pass[passFrontendContainer] = entry2[1];
331
+ else if (property3 === "containerType") pass[passFrontendContainerType] = entry2[1];
332
+ contributeProp(pass, property3, entry2[1]);
333
333
  };
334
334
  var start = 0;
335
335
  for (var index = 0; index <= valInit.length; index++) {
@@ -387,7 +387,12 @@ function contributeProp(pass, keyOg, valOg) {
387
387
  for (var _iterator1 = entries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
388
388
  var entry = _step1.value;
389
389
  if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
390
- writeCapturedStyleRecord(slots, slot, entry, pass[passSourceLayer]);
390
+ if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in nonAnimatableStyleProps)) {
391
+ var _styleState_animationDriver;
392
+ var property2 = entry[0] === "--t-x" ? "x" : entry[0] === "--t-y" ? "y" : entry[0] === "--t-scale-x" ? "scaleX" : entry[0] === "--t-scale-y" ? "scaleY" : entry[0];
393
+ var value = ((_styleState_animationDriver = styleState.animationDriver) === null || _styleState_animationDriver === void 0 ? void 0 : _styleState_animationDriver.inputStyle) === "value" ? entry[6] : entry[1];
394
+ entry[3] ? contributeValue(styleState, property2, value, entry[6], false, entry[3]) : emitValue(styleState, property2, value, null, entry[6], false);
395
+ } else writeCapturedStyleRecord(slots, slot, entry, pass[passSourceLayer]);
391
396
  }
392
397
  } catch (err) {
393
398
  _didIteratorError1 = true;
@@ -1146,6 +1151,23 @@ function completeResolvedStyles(state) {
1146
1151
  for (var _iterator1 = cssEntries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
1147
1152
  var entry1 = _step1.value;
1148
1153
  entry1[7] = entry1[7] | recordCSS;
1154
+ if (!(entry1[2] & 12)) continue;
1155
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
1156
+ try {
1157
+ for (var _iterator2 = cssEntries[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
1158
+ var sibling = _step2.value;
1159
+ if (sibling[0] === entry1[0]) sibling[8] = true;
1160
+ }
1161
+ } catch (err) {
1162
+ _didIteratorError2 = true;
1163
+ _iteratorError2 = err;
1164
+ } finally {
1165
+ try {
1166
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
1167
+ } finally {
1168
+ if (_didIteratorError2) throw _iteratorError2;
1169
+ }
1170
+ }
1149
1171
  }
1150
1172
  } catch (err) {
1151
1173
  _didIteratorError1 = true;
@@ -1493,6 +1515,10 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
1493
1515
  addTransformValue(state.transformAccumulator, property, value);
1494
1516
  return;
1495
1517
  }
1518
+ if (property === "transition" && condition & 12 && !state.staticConfig.isHOC && state.styleProps.isAnimated) {
1519
+ streamWriteInline(state, property, value, cursor, originalValue, false, -1, true);
1520
+ return;
1521
+ }
1496
1522
  var shouldPromoteAnimatedStyle = canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && ((_state_animationDriver = state.animationDriver) === null || _state_animationDriver === void 0 ? void 0 : _state_animationDriver.inputStyle) === "css" && property in nonAnimatableStyleProps;
1497
1523
  if (canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
1498
1524
  writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
@@ -1590,7 +1616,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1590
1616
  }
1591
1617
  if (property === "transform") {
1592
1618
  if (canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = transformsToString(raw);
1593
- if (typeof raw === "string") {
1619
+ if (typeof raw === "string" && true) {
1594
1620
  var transform = parseNativeTransform(raw);
1595
1621
  if (transform) {
1596
1622
  emitProperty(state, property, transform, cursor, originalValue, contextOnly);
@@ -1717,7 +1743,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1717
1743
  }
1718
1744
  function emitConditionalValue(state, property, payload, condition, source, sink, mode, contextOnly) {
1719
1745
  if (sink) sink(payload, condition, source);
1720
- else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 ? payload : void 0, contextOnly, mode, source);
1746
+ else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 || state.staticConfig.isHOC || state.styleProps.stylePieceEntries ? payload : void 0, contextOnly, mode, source);
1721
1747
  else emitValue(state, property, payload, null, payload, contextOnly);
1722
1748
  }
1723
1749
  function walkConditionalValue(state, property, value, parent, sink) {