112 const std::vector<ImportDiagnostic>& diagnostics,
113 const std::function<std::string(
const IRNode&)>& node_id_of,
114 std::vector<FidelityIssue>& sink);
Normalized intermediate representation (IR) for imported designs: the IR value model (style,...
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
@ text
Plain text (default color).
Definition code_editor_tokenizer.hpp:37
@ type
Built-in / common type name (e.g. int, Number).
Definition code_editor_tokenizer.hpp:39
std::optional< FidelityIssue > check_gross_size_divergence(const FidelityContext &)
Gross-size: a node the user pinned on BOTH axes (SizingMode::fixed) must not be emitted >3x its sourc...
std::optional< FidelityIssue > check_widget_intrinsic_size(const FidelityContext &)
Widget-intrinsic-size: a recognized audio widget whose emitted box diverges >1.5x from its source int...
std::optional< FidelityIssue > check_text_vertical_centering(const FidelityContext &)
Text-vertical-centering: a SINGLE-LINE text given a reserved vertical slot (emitted box taller than o...
std::size_t count_strict_fidelity_failures(const std::vector< FidelityIssue > &issues)
Number of findings that should fail --strict-fidelity.
void check_vector_renderability(const IRNode &root, const std::vector< ImportDiagnostic > &diagnostics, const std::function< std::string(const IRNode &)> &node_id_of, std::vector< FidelityIssue > &sink)
Vector-renderability: every visible vector/path-like node (svg path/rect/ line, ellipse,...
FidelityElement
What codegen branch produced the emitted geometry — lets a check apply only where it is meaningful wi...
Definition design_fidelity.hpp:37
@ container
Definition design_fidelity.hpp:37
@ image
Definition design_fidelity.hpp:37
@ widget
Definition design_fidelity.hpp:37
void run_fidelity_checks(const FidelityContext &ctx, std::vector< FidelityIssue > &sink)
Run every registered fidelity check against ctx, appending findings to sink.
std::optional< FidelityIssue > check_image_sizing_fidelity(const FidelityContext &)
No-skew: a BLEED sprite (render_bounds or asset_bleed) must be emitted at an aspect matching its sour...
bool is_vector_kind(const std::string &type)
True for every normalized IR type that represents a vector / path-like shape (svg path/rect/line,...
Everything a check needs: the node, its sanitized bridge id, the dimensions codegen emitted for it,...
Definition design_fidelity.hpp:41
std::string node_id
Definition design_fidelity.hpp:43
float emitted_h
Definition design_fidelity.hpp:45
FidelityElement element
Definition design_fidelity.hpp:46
float emitted_w
Definition design_fidelity.hpp:44
const IRNode & node
Definition design_fidelity.hpp:42
A single import-fidelity self-check finding.
Definition design_fidelity.hpp:24
std::string detail
one-line explanation with the measured numbers
Definition design_fidelity.hpp:30
std::string kind
"skew" | "aspect-unverified" | "gross-size" | "widget-size" | "widget-undersized" | "text-vcenter" | ...
Definition design_fidelity.hpp:27
std::string node_id
sanitized bridge id of the offending node
Definition design_fidelity.hpp:25
bool informational
advisory only (e.g.
Definition design_fidelity.hpp:31
std::string node_name
source layer name (for human-readable reports)
Definition design_fidelity.hpp:26
Definition design_ir.hpp:614