Replace a component
replace_componentCreate or replace the complete TypeScript component source. Returns the Asset ID. Build and type-check failures reject the write before committing. The previous source and revision remain intact. Warnings do not block the build. Fix errors; do not chase warnings unrelated to visible defects. branchId null (or left out) means the current version; a version id from list_branches writes that version without switching the editor to it. Skills: load builtin-vidova-basics before the first component write, builtin-fonts before the first fontFamily, builtin-data-files before the first DataSrc prop (a map or chart from an uploaded data file), builtin-layout-flexbox before the first flex layout (a row of chips or pills, a card around text), and builtin-film-custom-components before the first placement with patch_film. A loaded skill stays loaded for the conversation: never load it again. Import @vidova/2d, @vidova/core and the packages in builtin-component-libraries; for a 3D scene also @vidova/components (View3D), three/webgpu and three/tsl, after loading builtin-3d. Export the named class and write atTime(time, duration), the only animation API: it sets every animated property from time and never yields or awaits. A source that declares an animate(), animateIn() or animateOut() generator is refused. Media signals use VideoSrc or AssetSrc, never string. Never shadow Node methods such as draw, scale or position. Use import_element for an unchanged library element and scaffold_component for a skeleton. name shared/ writes a shared module instead: plain TypeScript exports (functions, constants, types; no class, no Asset ID) at src/components/custom/shared/.ts that components import as ./shared/. The whole project is compiled and the write is rejected when a component that imports it breaks. Components import each other as ./Name; the parent calls child.atTime(time, duration) itself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Component class name, a JavaScript identifier, or shared/<name> for a shared module that components import as ./shared/<name>. | |
| source | Yes | ||
| branchId | Yes | Version id from list_branches to write to, without switching the editor to it. null, or leaving it out, means the current version. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. |