feat(canvas): produce and consume transparent renderContent textures

Rasterize imported SVG/CAD sources to a transparent WebP render texture and
carry it as an optional renderContent alongside the original content through
the domain node, snapshot normalization, and reference images. Add
canvasNodeRenderContent and prefer it for artboard, layer, generated-file,
and project thumbnail previews while keeping content as the crop/download/
model-reference source. Generalize the SVG rasterizer with a render purpose
and add upload/reference coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-16 20:46:12 +08:00
parent ee2c52bbc6
commit 8e1506e4c4
12 changed files with 137 additions and 21 deletions
@@ -12,7 +12,7 @@ export function canvasNodeToReferenceImage(node: CanvasNode): UploadedReferenceI
id: `${canvasNodeReferencePrefix}${node.id}`,
name: node.title.trim() || "Image",
publicUrl: content,
previewUrl: content,
previewUrl: node.renderContent?.trim() || content,
semanticContext: node.semanticContext
};
}