Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::CodeGenOptions Struct Reference

Options for code generation. More...

#include <design_codegen.hpp>

Public Attributes

CodeGenMode mode = CodeGenMode::bridge_native_js
bool include_tokens = true
bool include_comments = true
bool preview_mode = false
std::string root_variable = "root"
int indent_spaces = 2
bool use_silver_knobs = true
 When true, audio knobs render as native vector silver/chrome widgets (WidgetRenderStyle::silver), except browser-captured control overlays whose body pixels remain design authority.
bool skin_faders = true
 When true (default), recognized faders/meters are emitted with a value-driven skin derived from the captured asset (track / fill / thumb colors for a fader; gradient stops for a meter) so they render like the captured Figma art while the thumb/level still move with their bound value.
bool skin_meters = true
std::vector< DetectedShortcut > shortcuts
 Shortcuts pulled from the source by extract_keyboard_shortcuts(...).
std::vector< FidelityIssue > * fidelity_report = nullptr
 Optional fidelity-report sink.

Detailed Description

Options for code generation.

Member Data Documentation

◆ fidelity_report

std::vector<FidelityIssue>* pulp::view::CodeGenOptions::fidelity_report = nullptr

Optional fidelity-report sink.

When non-null, codegen runs every registered reference-free fidelity self-check (see design_fidelity.hpp) against each element it emits and appends any FidelityIssue here. The import CLI surfaces these as fidelity: warnings and can fail on them under --strict-fidelity. Non-owning; the caller owns the vector.

◆ include_comments

bool pulp::view::CodeGenOptions::include_comments = true

◆ include_tokens

bool pulp::view::CodeGenOptions::include_tokens = true

◆ indent_spaces

int pulp::view::CodeGenOptions::indent_spaces = 2

◆ mode

CodeGenMode pulp::view::CodeGenOptions::mode = CodeGenMode::bridge_native_js

◆ preview_mode

bool pulp::view::CodeGenOptions::preview_mode = false

◆ root_variable

std::string pulp::view::CodeGenOptions::root_variable = "root"

◆ shortcuts

std::vector<DetectedShortcut> pulp::view::CodeGenOptions::shortcuts

Shortcuts pulled from the source by extract_keyboard_shortcuts(...).

The generator emits one registerShortcut(...) plus a matching __pulpShortcutHandler_N thunk per entry. The thunk calls __dispatch__('__global__', 'keydown', {...}) so the original React handlers in the bundled JS still own the closure state; native shortcut interception just re-fires the synthetic keydown into the engine. Empty vector = no shortcut emission.

◆ skin_faders

bool pulp::view::CodeGenOptions::skin_faders = true

When true (default), recognized faders/meters are emitted with a value-driven skin derived from the captured asset (track / fill / thumb colors for a fader; gradient stops for a meter) so they render like the captured Figma art while the thumb/level still move with their bound value.

When false (--fader-style=default / --meter-style=default) they fall back to the plain native look. The derived style attributes are stamped onto the node by the import CLI's asset-resolution pass.

◆ skin_meters

bool pulp::view::CodeGenOptions::skin_meters = true

◆ use_silver_knobs

bool pulp::view::CodeGenOptions::use_silver_knobs = true

When true, audio knobs render as native vector silver/chrome widgets (WidgetRenderStyle::silver), except browser-captured control overlays whose body pixels remain design authority.

Per-node @sprite or @silver suffixes on a Figma layer override the default for that node.


The documentation for this struct was generated from the following file: