mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-08 02:36:10 +00:00
* fix(core): harden audio FX and group identity * fix(core): address audio group review feedback * fix(core): align preview transport with grouped audio * test(core): pin audio group gain ceiling * fix(core): preserve solo bridge through stack * fix(engine): harden grouped audio rendering * docs(engine): explain grouped mix fallback invariant * test(engine): allow grouped mixes to finish on Windows * feat(lint): validate audio group membership and timing * test(lint): pin audio group membership guards * fix(studio): unify audio IDs and group state * fix(studio): make audio-group edits transactional * fix(studio): keep preview state synchronized
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
/**
|
|
* Which elements a delete acts on.
|
|
*
|
|
* Its own module so `useDomEditSession.ts` stays under the studio's 600-line
|
|
* cap; it reads only its arguments.
|
|
*/
|
|
|
|
import type { DomEditSelection } from "../components/editor/domEditingTypes";
|
|
import type { EditHistoryKind } from "../utils/editHistory";
|
|
|
|
/** One entry in the studio's edit history, as `useDomEditSession`'s caller
|
|
* supplies it. */
|
|
export interface RecordEditInput {
|
|
label: string;
|
|
kind: EditHistoryKind;
|
|
coalesceKey?: string;
|
|
files: Record<string, { before: string; after: string }>;
|
|
}
|
|
|
|
/**
|
|
* Which elements a delete acts on. `expandGroup` widens the primary to the
|
|
* whole marquee group, which is what the Delete key means.
|
|
*
|
|
* The caller chooses rather than the delete deciding for everyone: Cut copies
|
|
* the primary alone, so expanding for it put one element on the clipboard and
|
|
* removed every other member of the group with it.
|
|
*/
|
|
export function membersForDelete(
|
|
selection: DomEditSelection,
|
|
group: DomEditSelection[],
|
|
options?: { expandGroup?: boolean },
|
|
): DomEditSelection[] {
|
|
return options?.expandGroup && group.length > 0 ? group : [selection];
|
|
}
|