Plumb · emit react
plumb_emit_reactConverts a design graph from Figma or a live site into pixel-faithful React JSX with inline styles, using a template-based deterministic emitter.
Instructions
Deterministic PDS/WebSpec → React (JSX + inline styles) code generator. Pass the raw JSON from a prior plumb_node/plumb_outline/plumb_query call (Figma) OR a prior plumb_import_web call (a live site) — the same emitter handles both, proving the underlying graph is source-agnostic. Not an LLM call: template-based and deterministic, mirroring the existing PDS→Figma emit path's own 'every conversion happens here, mechanically' design. Output is PIXEL-FAITHFUL (every box's width/height is emitted explicitly), not a hand-tuned responsive component — there's no hug/fill/fixed sizing signal in the graph yet to generate flex:1/width:auto from. Check the warnings array: vector nodes render as empty boxes (no path data is reproduced) and images with no captured source get an empty src.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | A PdsDocument (Figma) or a WebSpecDocument (plumb_import_web) — auto-detected. | |
| componentName | No | Default "GeneratedComponent". |