code wiki / (root) / nx_sclass_enforce_lib.nx

nx_sclass_enforce_lib.nx

buildroot/runtime/nx_sclass_enforce_lib.nx

1710 B26 linesdepth 1pulls 1 transitivereach 2 importersview sourcekind librarytopic sclass
docsdependenciesstructsconstsfunctions

about

nx_sclass_enforce_lib.nx -- THE ONE canonical "gorgeous-by-default" S-class check (pure lib, no main). Single source of truth for the 6 design-adoption invariants. Both the enforcement gate (nx_brand_apply_enforced) and the fleet ship-gate (nx_ui_ship_gate) compose these -> zero duplicated check logic (consolidation doctrine, [[feedback-sovereign-consolidation-no-shell]]). Composes nx_uxcx_grade's pure byte-scan (uxg_*). license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_uxcx_grade.nx nx_sclass_enforce_lib.nx nx_brand_apply_enforced.nx nx_ui_ship_gate.nx

imports: nx_uxcx_grade.nx

imported by: nx_brand_apply_enforced.nxnx_ui_ship_gate.nx

structs

none

consts

none

functions

8func sce_tokens(h: *u8, n: i64) -> i64 { return uxg_has_lit(h,n,"var(--nx-" as *u8) } // canonical --nx- SSOT
9func sce_responsive(h: *u8, n: i64) -> i64 { return uxg_has_lit(h,n,"@media(max-width" as *u8) }
10func sce_motion(h: *u8, n: i64) -> i64 { return uxg_has_lit(h,n,"prefers-reduced-motion" as *u8) }
11func sce_focus(h: *u8, n: i64) -> i64 { return uxg_has_lit(h,n,":focus-visible" as *u8) }
12func sce_sovereign(h: *u8, n: i64) -> i64 { return uxg_sovereign_ok(h,n) } // no external http asset
13func sce_landmarks(h: *u8, n: i64) -> i64 { if uxg_has_lit(h,n,"<main" as *u8)==1 { return 1 } if uxg_has_lit(h,n,"<header" as *u8)==1 { if uxg_has_lit(h,n,"<footer" as *u8)==1 { return 1 } } return 0 }
17func sce_violations(h: *u8, n: i64) -> i64