code wiki / _hdl_build / nx_brand_dark_gate.nx

nx_brand_dark_gate.nx

buildroot/runtime/_hdl_build/nx_brand_dark_gate.nx

4724 B78 linesdepth 5pulls 11 transitivereach 0 importersview sourcekind gate/prooftopic brand
docsdependenciesstructsconstsfunctions

about

nx_brand_dark_gate.nx -- R8 gate: dark-mode colour system. A brand with `dark|...` tokens emits a @media(prefers-color-scheme:dark){:root{...}} override; a brand WITHOUT them emits nothing (backward-compatible). BOTH light and dark must pass WCAG AA. Sovereignty + determinism hold. 100% sovereign. expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_sitegate_emit_lib.nx nx_brand_tokens.nx nx_brand_guard.nx nx_web_builder.nx nx_brand_dark_gate.nx

imports: nx_syscalls.nxnx_sitegate_emit_lib.nxnx_brand_tokens.nxnx_brand_guard.nxnx_web_builder.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap gw sys_write bt_len bt_emit_dark_root_buf bt_app sys_mmap ↻ bt_slice_eq bt_ident_safe bt_value_safe bt_find bt_app_n g_has bt_find ↻ bt_len ↻ t_row gw ↻ bt_default_brand inband8 sys_openat_wr wb_doc_open_branded wb_w sys_write ↻ bas_emit_head bas_emit_one sys_mmap ↻ bas_lookup sys_mmap ↻ bas_esc_attr bas_app bas_fw sys_write ↻ bt_emit_root_fd sys_mmap ↻ bt_emit_root_buf bt_app ↻ sys_mmap ↻ bt_slice_eq ↻ bt_ident_safe ↻

structs

none

consts

none

functions

11func g_has(s: *u8, n: i64, lit: *u8) -> i64 { if bt_find(s, n, lit, bt_len(lit)) >= 0 { return 1 } return 0 }
called by 1: main calls 2: bt_findbt_len
12func inband8(v: i64, lo: i64, hi: i64) -> i64 { if v < lo { return 0 } if v > hi { return 0 } return 1 }
called by 1: main
14func main() -> i64