code wiki / _hdl_build / nx_studio_tiers.nx
nx_studio_tiers.nx
buildroot/runtime/_hdl_build/nx_studio_tiers.nx
about
nx_studio_tiers.nx -- CAPABILITY-ADAPTIVE WYSIWYG (operator's idea: let users select, by their capability,
HOW they want to build). The editor offers tiers -- GUIDED (novice/elderly: answer a few fields, the
structure is guaranteed), BLOCK (intermediate: arrange blocks), FREE-FORM (power: place freely) -- but ALL
tiers normalize to the ONE governed, portable .site data model and build through the SAME sovereign engine
(se_build_site). So escaping, the publish-time UX gate, and portability are INVARIANT across tiers: no
capability tier can escape governance. tier_normalize is the single funnel.
GUIDED : a compact answer set (brand|.. headline|.. cta|.. ..) -> a COMPLETE compliant .site by
construction (every required block is in the template; missing answers fall back to defaults),
so a novice CANNOT produce a broken page.
FREE-FORM: a .site plus layout-only `place|idx|x|y` lines -> the placement lines are stripped to the
governed block .site (free placement is a presentation hint, never a way around the engine).
BLOCK : already a .site -> passthrough.
license_tier: ORIGINAL
dependencies 3 imports · 6 importers
imports: nx_sitegen_studio.nxnx_sitegen_freeform.nxnx_syscalls.nx
imported by: nx_freeform_exceed_gate.nxnx_sitegen_studio_daemon.nxnx_studio_freeform_ui_gate.nxnx_studio_guided_gate.nxnx_studio_tier_endpoint_gate.nxnx_studio_tiers_gate.nx
structs
| none |
consts
| 17 | const TIER_MAGIC_65536: i64 = 65536 |
| 18 | const TIER_MAGIC_65535: i64 = 65535 |
| 20 | const TIER_GUIDED: i64 = 0 |
| 21 | const TIER_BLOCK: i64 = 1 |
| 22 | const TIER_FREEFORM: i64 = 2 |
functions
| 24 | func tn_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: tn_appget |
| 25 | func tn_puts(out: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var k: i64=0; while s[k]!=(0 as u8){out[o]=s[k];o=o+1;k=k+1} return o } |
| 26 | func tn_putrange(out: *u8, off: i64, src: *u8, a: i64, b: i64) -> i64 { var o: i64=off; var j: i64=a; while j<b { out[o]=src[j]; o=o+1; j=j+1 } if o>off { if (out[o-1] as i64)==13 { o=o-1 } } return o } |
| 29 | func tn_linematch(input: *u8, ls: i64, le: i64, key: *u8, klen: i64) -> i64 |
| 38 | func tn_appget(out: *u8, off: i64, input: *u8, n: i64, key: *u8, dflt: *u8) -> i64 |
| 60 | func tier_normalize(tier: i64, input: *u8, n: i64, out: *u8, cap: i64) -> i64 |
| 108 | func tn_range_eq(s: *u8, a: i64, b: i64, lit: *u8) -> i64 called by 1: se_build_tier |
| 127 | func se_build_tier(payload: *u8, n: i64, out: *u8, cap: i64) -> i64 |