feat(core): the audio group model — element, membership, helpers

Introduces <hf-audio-group> and data-audio-group as the group model B2–B7
and C1 build on: a non-rendering group element carries a label and (later)
an FX chain, membership lives on the member's own data-audio-group
attribute rather than DOM nesting, so a track removed from the document
simply drops out of the group on the next resolve — nothing dangles.
Groups do not nest: data-audio-group on the group element itself is
ignored. A group with members but no <hf-audio-group> element still
resolves, label falling back to the id, so hand-authored HTML degrades
gracefully. Audio only in v1 — video members are ignored.

Parse-only: nothing routes or sums audio yet (B3/B4). Adds the
audio-groups canary at percentage: 0 gating the future Studio UI; the
element and attribute parse and play regardless of enrollment.

Verified rather than assumed per this plan's standing rule: the timeline's
clip-collection selector ([data-start], [data-track-index],
[data-composition-id], video, audio, img) already excludes the group
element with zero changes, and no lint rule flags unknown elements or
data-* attributes, so neither needed touching — confirmed by grep and by
running `hyperframes lint` against a fixture containing the element (0
findings referencing it). The step doc's suggested display:none injection
point (an existing base stylesheet in the runtime) does not exist in this
codebase; skipped rather than inventing new infrastructure, since an empty,
childless custom element already renders as a zero-size inline box with no
visible output — the same reasoning the lint check above confirms
empirically.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-08-20 16:39:27 -07:00
co-authored by Claude Sonnet 5
parent ee6486c7f2
commit e42185582b
6 changed files with 181 additions and 0 deletions
+10
View File
@@ -166,6 +166,12 @@
"import": "./src/audioCarve.ts",
"types": "./src/audioCarve.ts"
},
"./audio-groups": {
"bun": "./src/audioGroups.ts",
"node": "./dist/audioGroups.js",
"import": "./src/audioGroups.ts",
"types": "./src/audioGroups.ts"
},
"./audio-automation": {
"bun": "./src/audioAutomation.ts",
"node": "./dist/audioAutomation.js",
@@ -480,6 +486,10 @@
"import": "./dist/audioCarve.js",
"types": "./dist/audioCarve.d.ts"
},
"./audio-groups": {
"import": "./dist/audioGroups.js",
"types": "./dist/audioGroups.d.ts"
},
"./audio-automation": {
"import": "./dist/audioAutomation.js",
"types": "./dist/audioAutomation.d.ts"