code wiki / _hdl_build / nx_mindmap.nx

nx_mindmap.nx

buildroot/runtime/_hdl_build/nx_mindmap.nx

13226 B237 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_mindmap.nx -- DATA-DRIVEN sovereign tree/mind-map -> NAVIGABLE HTML (the Nishi Visualization Suite, made data-driven + navigable so you can LOGICALLY PARSE any node/parent dataset, not a hardcoded chart). Ingests node_id <TAB> type <TAB> parent_id <TAB> axis <TAB> sovereignty <TAB> label <TAB> safety (parent="-" = root) computes a LAYERED tree layout (x = depth from root, y = sibling order), and emits ONE self-contained HTML page: an inline native SVG (no mermaid.js/d3.js) with every node a rounded rect COLOR-CODED BY SOVEREIGNTY (per-node id anchor + full label on hover), plus a SIDEBAR INDEX grouped by sovereignty -- click a node to jump to it (and :target highlights it), Ctrl+F to search, native browser scroll/zoom to pan. All emitted by the organ; the only browser dependency is native scroll/zoom/find (no app-JS). Point it at any tree (family genealogy, arcs, workstreams). usage: nx_mindmap <input.tsv> <output.html>. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_mindmap.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_write mm_atoi sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close mm_first mm_streq sys_openat_wr gw sys_write ↻ mm_slen gwn sys_mmap ↻ sys_write ↻ mm_color mm_streq ↻ gw_esc gw ↻ sys_mmap ↻ sys_write ↻ mm_known_sov mm_streq ↻ sys_close ↻

structs

none

consts

12const MM_MAXN: i64 = 256
13const MM_NODE_W: i64 = 300
14const MM_NODE_H: i64 = 30
15const MM_COL_W: i64 = 340
16const MM_ROW_H: i64 = 44
17const MM_MARGIN: i64 = 30

functions

19func mm_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: gw
20func mm_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while 1 == 1 { if a[i] != b[i] { return 0 } if a[i] == (0 as u8) { return 1 } i = i + 1 } return 1 }
21func mm_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c >= 48 { if c <= 57 { v = v * 10 + (c - 48) } } i = i + 1 } return v }
called by 1: main
23func mm_first(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { if (s[i] as i64) == 44 { s[i] = 0 as u8; return 0 } i = i + 1 } return 0 }
called by 1: main
24func mm_known_sov(sov: *u8) -> i64
called by 1: main calls 1: mm_streq
34func gw(fd: i64, s: *u8) -> i64 { sys_write(fd, s, mm_slen(s)); return 0 }
called by 2: gw_escmain calls 2: sys_writemm_slen
35func gwn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
43func gw_esc(fd: i64, s: *u8, cap: i64) -> i64
called by 1: main calls 3: gwsys_mmapsys_write
53func mm_color(sov: *u8) -> *u8
called by 1: main calls 1: mm_streq
64func main(argc: i64, argv: *i64) -> i64