| 130 | // the other endpoint is the element's natural pose): 1 for scale/opacity, 0 for |
| 131 | // translate/rotation. |
| 132 | function baseProps(props: Record<string, number | string>): Record<string, number | string> { |
| 133 | const base: Record<string, number | string> = {}; |
| 134 | for (const k of Object.keys(props)) { |
| 135 | if (k === "ease") continue; |
| 136 | base[k] = k === "opacity" || k.startsWith("scale") ? 1 : 0; |
| 137 | } |
| 138 | return base; |
| 139 | } |
| 140 | |
| 141 | // Flat tweens carry no explicit keyframes — synthesize a 0%/100% pair against the |
| 142 | // element's rest pose so the surfaced keyframes are uniform. `from()` goes |