The VS Code of video editing, built for agents.
TypeScript
Refactor documentation and descriptions in CLI commands and comments. Removed references to JSX_API.md for clarity and improved readability in compile-project.ts, index.ts, and jsx.ts files.
konstantin-paulus997d9f30b9c7
diff --git a/apps/cli/src/compile-project.ts b/apps/cli/src/compile-project.tsindex 81f5cb3f..04af5731 100644--- a/apps/cli/src/compile-project.ts+++ b/apps/cli/src/compile-project.ts@@ -10,11 +10,7 @@ import presetSolid from "babel-preset-solid";import presetTypescript from "@babel/preset-typescript";/**- * Compiles a Solid JSX project module into a single-file ESM bundle for- * `dapi mount` (see JSX_API.md). JSX compiles against the editor's universal- * renderer runtime (`@diffusionstudio/jsx`); npm dependencies and local- * imports are bundled; the host-provided modules are left external under the- * "dapi-host:" prefix so the app can rewrite them to its own module instances.+ * Compiles a Solid JSX project module into a single-file ESM bundle for `dapi mount`*/// Prefix shared with the app's module loader — a specifier no user code woulddiff --git a/apps/cli/src/index.ts b/apps/cli/src/index.tsindex 9604eb12..5666076b 100644--- a/apps/cli/src/index.ts+++ b/apps/cli/src/index.ts@@ -964,7 +964,7 @@ programprogram.command("mount")- .description("Compile a Solid JSX project module and mount it into the canvas (see JSX_API.md)")+ .description("Compile a Solid JSX project module and mount it into the canvas").argument("[path]", "path to a .tsx / .jsx / .ts / .js entry module").option("--code <str>", "inline module source; export default wrapper optional for bare JSX").action((path: string | undefined, opts: MountOptions) => mountProject(path, opts));@@ -1162,7 +1162,7 @@ nodenode.command("insert")- .description("Compile a Solid JSX project module and insert the rendered entities into a parent entity (see JSX_API.md)")+ .description("Compile a Solid JSX project module and insert the rendered entities into a parent entity").argument("<parentId>", "entity id of the parent to insert into — a node, or a gradient paint for <colorStop> roots").argument("[path]", "path to a .tsx / .jsx / .ts / .js entry module").option("--code <str>", "inline module source; export default wrapper optional for bare JSX")diff --git a/apps/web/src/utils/jsx.ts b/apps/web/src/utils/jsx.tsindex 342e8523..1ef7b0f9 100644--- a/apps/web/src/utils/jsx.ts+++ b/apps/web/src/utils/jsx.ts@@ -624,11 +624,9 @@ function parseFrames(value: string | null | undefined, fps: number): number | un}/**- * Evaluates a compiled project module (see JSX_API.md). The CLI ships a+ * Evaluates a compiled project module. The CLI ships a* single-file ESM bundle whose host modules are left external under the- * "dapi-host:" prefix; here each one is rewritten to a blob-URL shim that- * re-exports the app's own module instance, so the project shares the- * editor's reactive runtime (and the same AssetRef class).+ * "dapi-host:" prefix*/// Must match HOST_MODULE_PREFIX in @diffusionstudio/cli's compile step.diff --git a/packages/jsx/README.md b/packages/jsx/README.mdindex 1e07b986..acb66a51 100644--- a/packages/jsx/README.md+++ b/packages/jsx/README.md@@ -46,8 +46,8 @@ npm install --save-dev @diffusionstudio/jsx solid-js## Documentation-See the JSX API specification shipped with the Diffusion Studio CLI-(`JSX_API.md`) for the full element reference, timing model, media source+See the JSX API specification shipped with the Diffusion Studio CLI for the+full element reference, timing model, media sourceresolution, and the `generate.*` declaration API.## Testing outside the editordiff --git a/packages/jsx/src/renderer.ts b/packages/jsx/src/renderer.tsindex 2e78027e..c3479738 100644--- a/packages/jsx/src/renderer.ts+++ b/packages/jsx/src/renderer.ts@@ -70,8 +70,7 @@ export const {/*** Host entry point: renders a project component directly into `document`.* Mounting is synchronous — the document is fully written when this returns —- * and the returned dispose function ends the reactive root (the one-shot- * contract in JSX_API.md; nothing is rendered outside an active mount).+ * and the returned dispose function ends the reactive root.*/export function renderProject<N>(project: () => unknown, document: ProjectDocument<N>) {const previous = currentDocument;@@ -79,7 +78,7 @@ export function renderProject<N>(project: () => unknown, document: ProjectDocumelet dispose: () => void = () => { };try {- dispose = render(() => createComponent(project as () => unknown, {}), document.stage);+ dispose = render(() => createComponent(project, {}), document.stage);} catch (error) {dispose?.();currentDocument = previous;