Import design files from external tools (Figma, Stitch, v0, Pencil) into Pulp's web-compat JS format. More...
#include <pulp/canvas/text_raster_policy.hpp>#include <pulp/view/design_codegen.hpp>#include <pulp/view/design_ir.hpp>#include <pulp/view/design_shortcuts.hpp>#include <pulp/view/design_sources.hpp>#include <pulp/view/design_tokens.hpp>#include <pulp/view/design_update.hpp>#include <filesystem>#include <memory>#include <optional>#include <string>#include <string_view>#include <unordered_map>#include <vector>Go to the source code of this file.
Classes | |
| struct | pulp::view::ImportReportEntry |
| struct | pulp::view::ImportReport |
| struct | pulp::view::UnrenderableFrameSet |
| struct | pulp::view::DuplicateAnchor |
| struct | pulp::view::NativeMaterializeOptions |
| struct | pulp::view::NativeImportBindingOptions |
| struct | pulp::view::NativeImportBindingDescriptor |
| struct | pulp::view::NativeImportSegmentedBindingDescriptor |
| struct | pulp::view::NativeImportStepperBindingDescriptor |
| struct | pulp::view::NativeImportXYPadBindingDescriptor |
| struct | pulp::view::NativeImportMeterBindingDescriptor |
| A level display's binding. More... | |
| struct | pulp::view::NativeImportChoiceBindingDescriptor |
| struct | pulp::view::NativeImportWaveformBindingDescriptor |
| struct | pulp::view::NativeImportTextBindingDescriptor |
| struct | pulp::view::NativeImportHostActionDescriptor |
| class | pulp::view::NativeImportBindingContext |
| class | pulp::view::NativeImportComboBoxBindingContext |
| Optional capability for binding a collapsed selector. More... | |
Namespaces | |
| namespace | pulp |
| namespace | pulp::view |
| Hover-cursor tracking for platform window hosts. | |
Typedefs | |
| using | pulp::view::LegacyImportBinder |
Functions | |
| ImportReport | pulp::view::collect_import_report (const IRNode &root, float low_confidence_threshold=0.6f) |
| std::string | pulp::view::import_report_to_json (const ImportReport &report) |
| std::string | pulp::view::import_report_to_text (const ImportReport &report) |
| int | pulp::view::apply_placement_verification (IRNode &root, float frame_w=0.0f, float frame_h=0.0f) |
| int | pulp::view::apply_swap_target_verification (IRNode &root) |
| std::vector< UnrenderableFrameSet > | pulp::view::find_unrenderable_alternate_frames (const IRNode &root) |
| std::vector< DuplicateAnchor > | pulp::view::find_duplicate_anchors (const IRNode &root) |
| void | pulp::view::register_legacy_import_binder (std::string id, LegacyImportBinder binder) |
| void | pulp::view::invoke_legacy_import_binder (std::string_view id, NativeImportBindingContext &, View &, const NativeImportMeterBindingDescriptor *meter, const NativeImportWaveformBindingDescriptor *waveform) |
| void | pulp::view::bind_imported_level_display (NativeImportBindingContext &ctx, View &view, LevelDisplay &display, const NativeImportMeterBindingDescriptor &descriptor) |
| Bind an imported level or series display through both binder generations: the provider-neutral virtual, then the deprecated concrete one through the provider's registered legacy binder. | |
| void | pulp::view::bind_imported_series_display (NativeImportBindingContext &ctx, View &view, SeriesDisplay &display, const NativeImportWaveformBindingDescriptor &descriptor) |
| std::unique_ptr< View > | pulp::view::build_native_view_tree (const DesignIR &ir, const IRAssetManifest &manifest, const NativeMaterializeOptions &options={}) |
| canvas::TextRasterPolicy | pulp::view::design_ir_text_raster_policy (const DesignIR &ir) |
| The text raster policy a surface showing ir should be created with: chromium when any captured text node was authored -webkit-font-smoothing: antialiased, otherwise legacy. | |
| void | pulp::view::bind_native_view_tree (View &root, const DesignIR &ir, NativeImportBindingContext &ctx, const NativeImportBindingOptions &options={}) |
| Apply explicit pulp* binding metadata from ir to an already materialized native view tree. | |
| void | pulp::view::enrich_imported_image_asset_metadata (DesignIR &ir, const IRAssetManifest &manifest, std::string_view base_directory={}) |
| Resolve imported image asset_ref nodes against an asset manifest and stamp source-derived metadata onto the nodes: absolute asset_path, PNG natural dimensions, opaque-core bounds for render-bounds sprites, and asset_bleed when the PNG is much larger than the logical box. | |
| void | pulp::view::hoist_captured_art_knobs (DesignIR &ir) |
| Captured-art knob promotion. | |
| void | pulp::view::synthesize_primitive_paths (IRNode &root) |
| Source-agnostic IR normalization for vector SHAPE PRIMITIVES. | |
| void | pulp::view::normalize_border_shorthand (IRNode &root) |
| Split the CSS border shorthand — "1px solid #333" — into the discrete border_color / border_width / border_style fields, for every node in the tree that set the shorthand but not the parts. | |
| void | pulp::view::reconnect_slider_fill (IRNode &root) |
| Reconnect a slider's progress fill to its thumb. | |
| int | pulp::view::apply_param_binding_manifest (IRNode &root, const std::unordered_map< std::string, std::string > &node_id_to_param_key) |
| Bind geometry-detected controls to host parameters from an out-of-band manifest that maps a Figma node id (IRInteractiveElement::source_node_id, stamped by the producer) to a host-param key. | |
| std::optional< std::unordered_map< std::string, std::string > > | pulp::view::parse_param_binding_manifest_json (const std::string &json, std::string *error) |
| Parse a --param-binding-manifest document — a flat JSON object mapping a Figma node id to a host-param key, e.g. | |
Import design files from external tools (Figma, Stitch, v0, Pencil) into Pulp's web-compat JS format.
Supports a normalized intermediate representation (IR) and W3C Design Tokens.
This is a back-compat umbrella header. The declarations are split across focused headers (included below in dependency order):
The native-binding materialization surface (build_native_view_tree and the NativeImport* binding descriptors / context) still lives directly in this umbrella; it has not been split out yet.