@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.
@@ -19,6 +19,7 @@ import { getRulesForIdentifier, insertStyleRules, shouldInsertStyleRules } from
19
19
  import { log } from "./log.mjs";
20
20
  import { normalizeColor } from "./normalizeColor.mjs";
21
21
  import { normalizeValueWithProperty } from "./normalizeValueWithProperty.mjs";
22
+ import { parseNativeTransform } from "./parseNativeTransform.native.js";
22
23
  import { resolveVariableValue } from "./resolveVariableValue.mjs";
23
24
  import { HOC_CLASSNAME_MARKER, skipProps } from "./skipProps.mjs";
24
25
  import { styleOriginalValues } from "./styleOriginalValues.mjs";
@@ -343,7 +344,11 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
343
344
  const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
344
345
  for (const [slot, entries] of hocSlots) for (const entry of entries) {
345
346
  if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
346
- writeCapturedStyleRecord(slots, slot, entry, pass[passSourceLayer]);
347
+ if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in nonAnimatableStyleProps)) {
348
+ const property = entry[0] === "--t-x" ? "x" : entry[0] === "--t-y" ? "y" : entry[0] === "--t-scale-x" ? "scaleX" : entry[0] === "--t-scale-y" ? "scaleY" : entry[0];
349
+ const value = styleState.animationDriver?.inputStyle === "value" ? entry[6] : entry[1];
350
+ entry[3] ? contributeValue(styleState, property, value, entry[6], false, entry[3]) : emitValue(styleState, property, value, null, entry[6], false);
351
+ } else writeCapturedStyleRecord(slots, slot, entry, pass[passSourceLayer]);
347
352
  }
348
353
  }
349
354
  }
@@ -1170,7 +1175,11 @@ function completeResolvedStyles(state, merge = mergeStyle) {
1170
1175
  if (cssEntries) {
1171
1176
  registerAtomicSlot(direct, property, cssEntries);
1172
1177
  if (capture) {
1173
- for (const entry of cssEntries) entry[7] = entry[7] | recordCSS;
1178
+ for (const entry of cssEntries) {
1179
+ entry[7] = entry[7] | recordCSS;
1180
+ if (!(entry[2] & 12)) continue;
1181
+ for (const sibling of cssEntries) if (sibling[0] === entry[0]) sibling[8] = true;
1182
+ }
1174
1183
  capture.set(property, cssEntries);
1175
1184
  }
1176
1185
  }
@@ -1416,6 +1425,10 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
1416
1425
  addTransformValue(state.transformAccumulator, property, value);
1417
1426
  return;
1418
1427
  }
1428
+ if (property === "transition" && condition & 12 && !state.staticConfig.isHOC && state.styleProps.isAnimated) {
1429
+ streamWriteInline(state, property, value, cursor, originalValue, false, -1, true);
1430
+ return;
1431
+ }
1419
1432
  const shouldPromoteAnimatedStyle = canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && state.animationDriver?.inputStyle === "css" && property in nonAnimatableStyleProps;
1420
1433
  if (canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
1421
1434
  writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
@@ -1495,6 +1508,13 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1495
1508
  }
1496
1509
  if (property === "transform") {
1497
1510
  if (canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = transformsToString(raw);
1511
+ if (typeof raw === "string" && !state.flatShouldDoClasses && state.animationDriver?.inputStyle === "value") {
1512
+ const transform = parseNativeTransform(raw);
1513
+ if (transform) {
1514
+ emitProperty(state, property, transform, cursor, originalValue, contextOnly);
1515
+ return;
1516
+ }
1517
+ }
1498
1518
  }
1499
1519
  if (typeof raw === "string" && property === "background") {
1500
1520
  const parts = splitComponents(raw);
@@ -1551,7 +1571,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1551
1571
  }
1552
1572
  function emitConditionalValue(state, property, payload, condition, source, sink, mode, contextOnly) {
1553
1573
  if (sink) sink(payload, condition, source);
1554
- else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 ? payload : void 0, contextOnly, mode, source);
1574
+ else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 || state.staticConfig.isHOC || state.styleProps.stylePieceEntries ? payload : void 0, contextOnly, mode, source);
1555
1575
  else emitValue(state, property, payload, null, payload, contextOnly);
1556
1576
  }
1557
1577
  function walkConditionalValue(state, property, value, parent, sink, warnMode = 0, contextOnly = false) {