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

#include <design_ir.hpp>

Public Attributes

std::string type
std::string name
std::string text_content
std::vector< IRTextRun > text_runs
std::vector< IRTextLineBox > text_line_boxes
 Chrome's own line breaking for text_content, cached.
std::optional< IRTextLayoutBasis > text_layout_basis
 The conditions text_line_boxes was captured under.
IRStyle style
IRLayout layout
AudioWidgetType audio_widget = AudioWidgetType::none
std::string audio_label
float audio_min = 0.0f
float audio_max = 1.0f
float audio_default = 0.5f
bool has_audio_range = false
std::vector< IRNode > children
std::unordered_map< std::string, std::string > attributes
std::optional< std::string > stable_anchor_id
 Stable anchor for the tweaks layer.
std::optional< std::string > anchor_strategy
 Strategy used to produce stable_anchor_id: "adapter", "content-hash", or "path".
std::optional< std::string > source_node_id
 Source-side native ID (e.g.
std::optional< std::string > source_adapter
 Canonical adapter provenance fields.
std::optional< std::string > source_version
std::optional< IRProvenance > provenance
 Adapter provenance — typically set on the root node by each parser.
std::optional< IRConfidence > confidence
 Adapter's confidence in this node's lowering.
std::optional< std::string > raw_source
 Verbatim source slice for this node (debugging + AST-patch fallback).
NodeRenderMode render_mode = NodeRenderMode::normal
 How this node materializes.
std::optional< std::string > svg_asset_id
 Asset id (into IRAssetManifest) of this node's SVG export, when render_mode == faithful_svg.
std::optional< std::string > capture_asset_id
 Asset id (into IRAssetManifest) of the browser screenshot backing when render_mode == faithful_capture.
std::vector< IRInteractiveElement > interactive_elements
 Source-identified interactive overlays for a faithful_svg render.
std::vector< IRNode > alternate_frames
 Alternate states of a faithful_svg node (multi-state capture).

Member Data Documentation

◆ alternate_frames

std::vector<IRNode> pulp::view::IRNode::alternate_frames

Alternate states of a faithful_svg node (multi-state capture).

Each entry is itself a faithful_svg node carrying its own svg_asset_id and interactive_elements, materialized via DesignFrameView::add_frame — one DesignFrameView holding N frames, not N views.

Frame indices are POSITIONAL and are what a swap element's target_frame names: THIS node is frame 0, alternate_frames[i] is frame i+1. Order is therefore load-bearing — it is the capture order the author chose (the CLI's repeated –frame order), never sorted or deduplicated.

Alternates are frames of the same view, not descendants: they are a SIBLING axis to children, so a walk that must visit every node has to descend both. Empty for a single-state import (the common path), which keeps that path byte-identical to a capture that predates this field.

◆ anchor_strategy

std::optional<std::string> pulp::view::IRNode::anchor_strategy

Strategy used to produce stable_anchor_id: "adapter", "content-hash", or "path".

◆ attributes

std::unordered_map<std::string, std::string> pulp::view::IRNode::attributes

◆ audio_default

float pulp::view::IRNode::audio_default = 0.5f

◆ audio_label

std::string pulp::view::IRNode::audio_label

◆ audio_max

float pulp::view::IRNode::audio_max = 1.0f

◆ audio_min

float pulp::view::IRNode::audio_min = 0.0f

◆ audio_widget

AudioWidgetType pulp::view::IRNode::audio_widget = AudioWidgetType::none

◆ capture_asset_id

std::optional<std::string> pulp::view::IRNode::capture_asset_id

Asset id (into IRAssetManifest) of the browser screenshot backing when render_mode == faithful_capture.

Kept separate from svg_asset_id so consumers never infer the payload type from a generic render-mode flag.

◆ children

std::vector<IRNode> pulp::view::IRNode::children

◆ confidence

std::optional<IRConfidence> pulp::view::IRNode::confidence

Adapter's confidence in this node's lowering.

◆ has_audio_range

bool pulp::view::IRNode::has_audio_range = false

◆ interactive_elements

std::vector<IRInteractiveElement> pulp::view::IRNode::interactive_elements

Source-identified interactive overlays for a faithful_svg render.

Empty for normal nodes.

◆ layout

IRLayout pulp::view::IRNode::layout

◆ name

std::string pulp::view::IRNode::name

◆ provenance

std::optional<IRProvenance> pulp::view::IRNode::provenance

Adapter provenance — typically set on the root node by each parser.

◆ raw_source

std::optional<std::string> pulp::view::IRNode::raw_source

Verbatim source slice for this node (debugging + AST-patch fallback).

Optional; adapters may leave empty when the source is binary or large.

◆ render_mode

NodeRenderMode pulp::view::IRNode::render_mode = NodeRenderMode::normal

How this node materializes.

faithful_svg renders svg_asset_id via DesignFrameView and overlays interactive_elements; faithful_capture renders capture_asset_id as browser-solved visual backing; normal keeps the existing widget/sprite path. Per-node so the lanes coexist.

◆ source_adapter

std::optional<std::string> pulp::view::IRNode::source_adapter

Canonical adapter provenance fields.

Kept alongside IRProvenance for compatibility with older call sites.

◆ source_node_id

std::optional<std::string> pulp::view::IRNode::source_node_id

Source-side native ID (e.g.

Figma layer UUID, Pencil node ID). Only populated for sources that have native IDs.

◆ source_version

std::optional<std::string> pulp::view::IRNode::source_version

◆ stable_anchor_id

std::optional<std::string> pulp::view::IRNode::stable_anchor_id

Stable anchor for the tweaks layer.

Empty until an anchor strategy has populated it (call assign_anchors() in anchor_strategy.hpp).

◆ style

IRStyle pulp::view::IRNode::style

◆ svg_asset_id

std::optional<std::string> pulp::view::IRNode::svg_asset_id

Asset id (into IRAssetManifest) of this node's SVG export, when render_mode == faithful_svg.

The asset's mime is image/svg+xml.

◆ text_content

std::string pulp::view::IRNode::text_content

◆ text_layout_basis

std::optional<IRTextLayoutBasis> pulp::view::IRNode::text_layout_basis

The conditions text_line_boxes was captured under.

Absent means the cache cannot be validated and must not be used.

◆ text_line_boxes

std::vector<IRTextLineBox> pulp::view::IRNode::text_line_boxes

Chrome's own line breaking for text_content, cached.

Empty when the capture carried none or the run fit on one line.

◆ text_runs

std::vector<IRTextRun> pulp::view::IRNode::text_runs

◆ type

std::string pulp::view::IRNode::type

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/view/include/pulp/view/design_ir.hpp