| 25 | } |
| 26 | |
| 27 | interface AddBlockOptions { |
| 28 | projectId: string; |
| 29 | blockName: string; |
| 30 | activeCompPath: string | null; |
| 31 | placement?: { start: number; track: number }; |
| 32 | visualPosition?: { left: number; top: number }; |
| 33 | previewIframe?: HTMLIFrameElement | null; |
| 34 | currentTime?: number; |
| 35 | timelineElements: TimelineElement[]; |
| 36 | readProjectFile: (path: string) => Promise<string>; |
| 37 | writeProjectFile: (path: string, content: string) => Promise<void>; |
| 38 | recordEdit: (entry: { |
| 39 | label: string; |
| 40 | kind: EditHistoryKind; |
| 41 | coalesceKey?: string; |
| 42 | files: Record<string, { before: string; after: string }>; |
| 43 | }) => Promise<void>; |
| 44 | refreshFileTree: () => Promise<void>; |
| 45 | reloadPreview: () => void; |
| 46 | showToast: (msg: string) => void; |
| 47 | } |
| 48 | |
| 49 | function buildUniqueCompositionId(baseName: string, existingIds: Iterable<string>): string { |
| 50 | const idSet = new Set(existingIds); |
nothing calls this directly
no outgoing calls
no test coverage detected