code wiki / _hdl_build / nx_sitegen_freeform.nx

nx_sitegen_freeform.nx

buildroot/runtime/_hdl_build/nx_sitegen_freeform.nx

8806 B172 linesdepth 3pulls 3 transitivereach 9 importersview sourcekind librarytopic sitegen
docsdependenciesstructsconstsfunctions

about

nx_sitegen_freeform.nx -- AUTO-BUILDER, FREE-FORM CANVAS page profile (the power-user capability tier). Unlike the responsive block-walk (structured) and the guided wizard, this lets elements be PLACED FREELY on a canvas (x/y/width), like Wix's free-form editor -- but, unlike Wix, the result stays SOVEREIGN (built by the engine), PORTABLE (the `el|..` lines are plain data that round-trips), and INJECTION-SAFE (every text + href escaped via hs_escape). The free-form tier trades the structural publish-gate (by design -- it's a free canvas) but KEEPS escaping + portability + sovereignty. Data format, one element per line: el|<heading|text|button|image>|x|y|w|text|href se_build_freeform = the free-form endpoint: parse the el| doc, build the canvas page. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_html_sanitize.nx nx_syscalls.nx nx_sitegen_freeform.nx nx_sitegen_freeform_gate.nx nx_studio_tiers.nx

imports: nx_html_sanitize.nxnx_syscalls.nx

imported by: nx_sitegen_freeform_gate.nxnx_studio_tiers.nx

structs

none

consts

11const K_MAGIC_131072: i64 = 131072

functions

13func ff_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd, s, n); return 0 }
called by 1: ff_build calls 1: sys_write
14func ff_wnum(fd: i64, v: i64) -> i64
called by 1: ff_build calls 2: sys_mmapsys_write
20func ff_esc(fd: i64, src: *u8) -> i64
called by 1: ff_build calls 3: sys_mmaphs_escapesys_write
30func ff_linematch(doc: *u8, ls: i64, le: i64, key: *u8, klen: i64) -> i64
called by 1: ff_parse
37func ff_range_eq(s: *u8, a: i64, b: i64, lit: *u8) -> i64
called by 1: ff_kind
45func ff_atoi(doc: *u8, a: i64, b: i64) -> i64
called by 1: ff_parse
50func ff_kind(doc: *u8, a: i64, b: i64) -> i64
called by 1: ff_parse calls 1: ff_range_eq
57func ff_cpy(arena: *u8, ap: i64, doc: *u8, a: i64, b: i64) -> i64
called by 1: ff_parse
66func ff_parse(doc: *u8, n: i64, kinds: *i64, xs: *i64, ys: *i64, ws: *i64, texts: *i64, hrefs: *i64, maxn: i64, arena: *u8, title_out: *u8, tcap: i64) -> i64
125func ff_build(fd: i64, title: *u8, n: i64, kinds: *i64, xs: *i64, ys: *i64, ws: *i64, texts: *i64, hrefs: *i64) -> i64
called by 1: se_build_freeform calls 3: ff_wff_escff_wnum
153func se_build_freeform(payload: *u8, n: i64, out: *u8, cap: i64) -> i64