Skip to content

Commit ffc91ae

Browse files
docs(sdk): document cascadeRemoveAnimations bare-id v1 limitation for scoped ids
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
1 parent c6467f9 commit ffc91ae

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/sdk/src/engine/mutate.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,10 @@ function selectorMatchesId(selector: string, id: HfId): boolean {
509509
);
510510
}
511511

512+
// v1 limitation: uses bare-id matching across the whole script, so a selector targeting
513+
// "hf-leaf" will cascade-remove animations for both "hf-parent/hf-leaf" and any other
514+
// element whose scoped or bare id matches "hf-leaf". Acceptable for typical single-comp
515+
// use; sub-composition authors with leaf-id collisions should use fully-qualified selectors.
512516
function cascadeRemoveAnimations(script: string, id: HfId): string {
513517
const parsedGsap = parseGsapScriptAcornForWrite(script);
514518
if (!parsedGsap) return script;

0 commit comments

Comments
 (0)