34#include <unordered_map>
82 float low_confidence_threshold = 0.6f);
267 [[deprecated(
"override bind_level_display instead")]]
284 [[deprecated(
"override bind_series_display instead")]]
401 std::string_view base_directory = {});
488 const std::unordered_map<std::string, std::string>& node_id_to_param_key);
496std::optional<std::unordered_map<std::string, std::string>>
Definition widgets.hpp:2111
Drop-down selector for enumerated parameters.
Definition ui_components.hpp:43
Definition widgets.hpp:1337
Definition widgets.hpp:901
Generic level, series and bin display seams owned by view-core.
Definition data_display.hpp:24
Definition audio_widgets.hpp:19
Definition design_import.hpp:242
virtual void bind_checkbox(Checkbox &checkbox, const NativeImportBindingDescriptor &descriptor)
Definition design_import.hpp:320
bool claim_import_binding(View &view, std::string_view route_id)
Claim a materialized view/route pair before installing callbacks.
void reset_import_binding_claims()
virtual ~NativeImportBindingContext()
Descriptor string_view fields passed to bind_* callbacks are borrowed and valid only for the duration...
virtual void bind_segmented(SegmentedControl &segmented, const NativeImportSegmentedBindingDescriptor &descriptor)
A segmented selector.
Definition design_import.hpp:305
virtual void bind_waveform_display(WaveformView &waveform, const NativeImportWaveformBindingDescriptor &descriptor)
Definition design_import.hpp:285
virtual void bind_choice_button(ToggleButton &button, const NativeImportChoiceBindingDescriptor &descriptor)
Definition design_import.hpp:276
virtual void bind_fader(Fader &fader, const NativeImportBindingDescriptor &descriptor)
Definition design_import.hpp:263
virtual void bind_stepper(Stepper &stepper, const NativeImportStepperBindingDescriptor &descriptor)
A stepper.
Definition design_import.hpp:315
virtual void bind_knob(Knob &knob, const NativeImportBindingDescriptor &descriptor)
Definition design_import.hpp:259
virtual void bind_xy_pad(XYPad &pad, const NativeImportXYPadBindingDescriptor &descriptor)
Definition design_import.hpp:280
virtual void bind_level_display(View &view, LevelDisplay &display, const NativeImportMeterBindingDescriptor &descriptor)
Definition design_import.hpp:327
virtual void bind_series_display(View &view, SeriesDisplay &display, const NativeImportWaveformBindingDescriptor &descriptor)
Definition design_import.hpp:333
virtual void bind_text_editor(TextEditor &editor, const NativeImportTextBindingDescriptor &descriptor)
Definition design_import.hpp:290
virtual void bind_toggle_button(ToggleButton &button, const NativeImportBindingDescriptor &descriptor)
Definition design_import.hpp:272
virtual void bind_host_action(TextButton &button, const NativeImportHostActionDescriptor &descriptor)
Definition design_import.hpp:294
virtual void bind_meter(Meter &meter, const NativeImportMeterBindingDescriptor &descriptor)
Definition design_import.hpp:268
Optional capability for binding a collapsed selector.
Definition design_import.hpp:365
virtual ~NativeImportComboBoxBindingContext()=default
virtual void bind_combo_box(ComboBox &combo, const NativeImportSegmentedBindingDescriptor &descriptor)=0
Horizontal segmented selector — a row of mutually-exclusive labeled segments sharing one inset track,...
Definition ui_components.hpp:443
Definition data_display.hpp:39
Definition gap_widgets.hpp:95
Definition buttons.hpp:17
Text editing widget with comprehensive keyboard/mouse interaction.
Definition text_editor.hpp:47
Definition widgets.hpp:2599
Code generation from a DesignIR: native-bridge / web-compat JS emission, baked-C++ view artifact expo...
Normalized intermediate representation (IR) for imported designs: the IR value model (style,...
Keyboard-shortcut import for designs: static-scan extracted shortcuts, platform-convention default sh...
Source adapters that lower external design exports into the normalized DesignIR: Figma / Stitch / v0 ...
W3C Design Tokens and external-tool token sync.
TextRasterPolicy
Glyph preblend a surface is created with.
Definition text_raster_policy.hpp:33
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
void invoke_legacy_import_binder(std::string_view id, NativeImportBindingContext &, View &, const NativeImportMeterBindingDescriptor *meter, const NativeImportWaveformBindingDescriptor *waveform)
int 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 nod...
std::unique_ptr< View > build_native_view_tree(const DesignIR &ir, const IRAssetManifest &manifest, const NativeMaterializeOptions &options={})
std::vector< DuplicateAnchor > find_duplicate_anchors(const IRNode &root)
canvas::TextRasterPolicy 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 n...
void register_legacy_import_binder(std::string id, LegacyImportBinder binder)
void reconnect_slider_fill(IRNode &root)
Reconnect a slider's progress fill to its thumb.
void normalize_border_shorthand(IRNode &root)
Split the CSS border shorthand — "1px solid #333" — into the discrete border_color / border_width / b...
void 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 virtua...
int apply_swap_target_verification(IRNode &root)
std::string import_report_to_text(const ImportReport &report)
@ fader
Definition design_ir.hpp:261
@ stepper
Definition design_ir.hpp:281
@ waveform
Definition design_ir.hpp:264
@ knob
Definition design_ir.hpp:260
void 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 on...
void hoist_captured_art_knobs(DesignIR &ir)
Captured-art knob promotion.
void(*)(NativeImportBindingContext &, View &, const NativeImportMeterBindingDescriptor *, const NativeImportWaveformBindingDescriptor *) LegacyImportBinder
Definition design_import.hpp:341
void 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.
std::optional< std::unordered_map< std::string, std::string > > 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-para...
int apply_placement_verification(IRNode &root, float frame_w=0.0f, float frame_h=0.0f)
void synthesize_primitive_paths(IRNode &root)
Source-agnostic IR normalization for vector SHAPE PRIMITIVES.
@ meter
a Meter's level
Definition binding_diagnostics.hpp:20
ImportReport collect_import_report(const IRNode &root, float low_confidence_threshold=0.6f)
std::string import_report_to_json(const ImportReport &report)
std::vector< UnrenderableFrameSet > find_unrenderable_alternate_frames(const IRNode &root)
void bind_imported_series_display(NativeImportBindingContext &ctx, View &view, SeriesDisplay &display, const NativeImportWaveformBindingDescriptor &descriptor)
@ error
Definition design_ir.hpp:697
Complete design IR document.
Definition design_ir.hpp:791
Definition design_import.hpp:128
std::string anchor
Definition design_import.hpp:129
std::string node_name
the repeat's name, or "<unnamed>"
Definition design_import.hpp:131
std::string first_node_name
Definition design_import.hpp:133
std::string first_path
the earlier node that keeps the anchor
Definition design_import.hpp:132
std::string path
$/children[i]/... of the repeat
Definition design_import.hpp:130
Definition design_ir.hpp:739
Definition design_ir.hpp:614
Definition design_import.hpp:59
bool verification_pass
Definition design_import.hpp:65
std::string source_node_id
Figma node id (empty if unknown).
Definition design_import.hpp:60
std::string kind
resolved interactive-element kind
Definition design_import.hpp:61
int resolution_rung
0=unset..5=inert (see InteractiveElementKind)
Definition design_import.hpp:62
std::vector< std::string > conflict_signals
cross-signal conflicts
Definition design_import.hpp:64
float confidence_score
0..1
Definition design_import.hpp:63
Definition design_import.hpp:68
bool ok() const
True when the import is clean enough to pass a CI gate at the given policy (no conflicts and nothing ...
Definition design_import.hpp:75
int conflicted
controls with >=1 conflict signal
Definition design_import.hpp:70
int unresolved
controls resolved only at the inert rung (5)
Definition design_import.hpp:72
int low_confidence
controls with confidence below the threshold
Definition design_import.hpp:71
std::vector< ImportReportEntry > controls
Definition design_import.hpp:69
Definition design_import.hpp:157
std::string_view event_contract
Definition design_import.hpp:162
std::string_view param_key
Definition design_import.hpp:159
std::string_view route_id
Definition design_import.hpp:158
std::string_view binding_module
Definition design_import.hpp:160
std::string_view binding_param
Definition design_import.hpp:161
std::string_view gesture_contract
Definition design_import.hpp:163
Definition design_import.hpp:153
std::vector< ImportDiagnostic > * diagnostics_out
Definition design_import.hpp:154
Definition design_import.hpp:208
std::string_view event_contract
Definition design_import.hpp:213
std::string_view choice_value
Definition design_import.hpp:211
std::string_view route_id
Definition design_import.hpp:209
std::string_view param_key
Definition design_import.hpp:210
std::string_view gesture_contract
Definition design_import.hpp:214
std::string_view choice_label
Definition design_import.hpp:212
Definition design_import.hpp:233
std::string_view event_contract
Definition design_import.hpp:238
std::string_view payload_contract
Definition design_import.hpp:237
std::string_view action
Definition design_import.hpp:235
std::string_view route_id
Definition design_import.hpp:234
std::string_view gesture_contract
Definition design_import.hpp:239
std::string_view label
Definition design_import.hpp:236
A level display's binding.
Definition design_import.hpp:200
std::string_view meter_source
Definition design_import.hpp:202
std::string_view value_key
Definition design_import.hpp:204
std::string_view route_id
Definition design_import.hpp:201
std::string_view event_contract
Definition design_import.hpp:205
std::string_view channel
Definition design_import.hpp:203
Definition design_import.hpp:166
std::string_view route_id
Definition design_import.hpp:167
std::string_view binding_module
Definition design_import.hpp:169
std::string_view param_key
Definition design_import.hpp:168
std::string_view binding_param
Definition design_import.hpp:170
int segment_count
Definition design_import.hpp:171
Definition design_import.hpp:174
std::string_view binding_module
Definition design_import.hpp:177
std::string_view binding_param
Definition design_import.hpp:178
double step
Definition design_import.hpp:181
std::string_view param_key
Definition design_import.hpp:176
std::string_view route_id
Definition design_import.hpp:175
double max
Definition design_import.hpp:180
double min
Definition design_import.hpp:179
Definition design_import.hpp:224
std::string_view value_key
Definition design_import.hpp:226
std::string_view event_contract
Definition design_import.hpp:229
std::string_view focus_contract
Definition design_import.hpp:230
std::string_view initial_value
Definition design_import.hpp:227
std::string_view route_id
Definition design_import.hpp:225
std::string_view placeholder
Definition design_import.hpp:228
Definition design_import.hpp:184
std::string_view y_param_key
Definition design_import.hpp:187
std::string_view gesture_contract
Definition design_import.hpp:193
std::string_view event_contract
Definition design_import.hpp:192
std::string_view x_param_key
Definition design_import.hpp:186
std::string_view x_binding_module
Definition design_import.hpp:188
std::string_view y_binding_module
Definition design_import.hpp:190
std::string_view y_binding_param
Definition design_import.hpp:191
std::string_view x_binding_param
Definition design_import.hpp:189
std::string_view route_id
Definition design_import.hpp:185
Definition design_import.hpp:143
std::filesystem::path asset_base_directory
Resolve relative manifest local_path values against the DesignIR document directory.
Definition design_import.hpp:150
bool preview_mode
Definition design_import.hpp:145
std::vector< ImportDiagnostic > * diagnostics_out
Definition design_import.hpp:146
bool apply_token_theme
Definition design_import.hpp:144
Definition design_import.hpp:112
std::size_t alternates
how many captured states would be dropped
Definition design_import.hpp:114
std::string node_name
the node's name, or "<unnamed>"
Definition design_import.hpp:113
std::string reason
why they cannot render
Definition design_import.hpp:115