Files
hyperframes/packages
Miguel Angel Simon Sierra fd5555be75 fix(studio): target one element when adding a keyframe at the playhead
"Add keyframe at playhead" on an element with no id authored the bare class
buildStableSelector hands back, so one add on a `.group` wrote
`tl.to(".group", ...)`: a tween that animates all five siblings and that
resolveSelectorElementIds reads back as all five, collapsing their timeline
rows into one. It survived a reload, so the written file stayed un-editable.

writeTargetSelector is the write-side counterpart to selectorFromSelection
(which must keep returning the exact string findTweenAtTime compares against).
It resolves the element's own identity to a selector that addresses exactly
one element: `#id`, else `[data-hf-id="..."]`, else the selection's selector
when it is already unique, else a `:nth-child` path anchored on the nearest
identifiable ancestor (the selector + selectorIndex pair, resolved through the
DOM the index was counted in).

Applied to the two paths that author a NEW tween: the no-animation branch of
useEnableKeyframes and commitKeyframeAtTimeImpl. replace-with-keyframes still
writes the selection's own selector, since retargeting a tween the author
aimed at a whole group is a different decision from adding a keyframe.
2026-07-28 20:37:52 +02:00
..
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00
2026-07-28 05:27:29 -07:00