code wiki / _hdl_build / nx_editor_validate.nx

nx_editor_validate.nx

buildroot/runtime/_hdl_build/nx_editor_validate.nx

3126 B62 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind librarytopic editor
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_editor_canvas.nx nx_editor_validate.nx nx_editor_validate_gate.nx

imports: nx_syscalls.nxnx_editor_canvas.nx

imported by: nx_editor_validate_gate.nx

structs

none

consts

10const EV_MIN_TARGET: i64 = 44 // WCAG 2.5.5 minimum interactive target (px)
11const EV_BUTTON: i64 = 3 // element kind = button (interactive)

functions

13func ev_on_canvas(c: *i64, i: i64, cw: i64, ch: i64) -> i64
called by 1: ev_violations
21func 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
23func ev_target_ok(c: *i64, i: i64) -> i64
called by 2: ev_violationsmain
28func ev_violations(c: *i64, n: i64, cw: i64, ch: i64) -> i64
40func ev_enforce(c: *i64, n: i64, cw: i64, ch: i64) -> i64
called by 1: main