fix(studio): break all 7 circular dependency cycles and fix rules-of-hooks violation (#1422)

This commit is contained in:
Miguel Ángel
2026-06-13 19:23:05 -04:00
committed by GitHub
parent a0d7295367
commit a241f2591e
17 changed files with 149 additions and 85 deletions
+2 -3
View File
@@ -1,4 +1,4 @@
import type { TimelineElement } from "../player";
import type { TimelineElement } from "../player/store/playerStore";
import type { DomEditSelection } from "../components/editor/domEditing";
import type { TimelineAssetKind } from "./timelineAssetDrop";
import { roundToCenti } from "./rounding";
@@ -172,8 +172,7 @@ export function clampNumber(value: number, min: number, max: number): number {
return Math.min(Math.max(value, min), max);
}
/** Matches the opening tag of a composition root element (`data-composition-id`). */
export const COMPOSITION_ROOT_OPEN_TAG_RE = /<[^>]*data-composition-id="[^"]+"[^>]*>/i;
export { COMPOSITION_ROOT_OPEN_TAG_RE } from "./compositionPatterns";
export function collectHtmlIds(source: string): string[] {
return Array.from(source.matchAll(/\bid="([^"]+)"/g), (match) => match[1] ?? "");