code wiki / _hdl_build / nx_editor_validate.nx
nx_editor_validate.nx
buildroot/runtime/_hdl_build/nx_editor_validate.nx
about
nx_editor_validate.nx -- the editor CAPABILITY that earns an exceed on better-at-job (not sovereignty): the editor
GUARANTEES valid + accessible layouts. ev_violations detects off-canvas / zero-size / sub-target elements; ev_enforce
makes ANY layout valid (clamp on-canvas + min size + WCAG 2.5.5 44px target for interactive) -- so the editor CANNOT
emit a broken or inaccessible layout. Mature editors (Webflow/Wix) happily let a user ship overlapping, off-canvas,
or sub-44px-target layouts; ours can't. That is a capability they lack. REUSE: nx_editor_canvas (EC_STRIDE).
license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_editor_canvas.nx
imported by: nx_editor_validate_gate.nx
structs
| none |
consts
| 10 | const EV_MIN_TARGET: i64 = 44 // WCAG 2.5.5 minimum interactive target (px) |
| 11 | const EV_BUTTON: i64 = 3 // element kind = button (interactive) |
functions
| 13 | func ev_on_canvas(c: *i64, i: i64, cw: i64, ch: i64) -> i64 called by 1: ev_violations |
| 21 | func ev_nonzero(c: *i64, i: i64) -> i64 { if c[i*EC_STRIDE+3] > 0 { if c[i*EC_STRIDE+4] > 0 { return 1 } } return 0 } called by 1: ev_violations |
| 23 | func ev_target_ok(c: *i64, i: i64) -> i64 |
| 28 | func ev_violations(c: *i64, n: i64, cw: i64, ch: i64) -> i64 |
| 40 | func ev_enforce(c: *i64, n: i64, cw: i64, ch: i64) -> i64 called by 1: main |