code wiki / wiki / nx_wiki_search_render.nx

nx_wiki_search_render.nx

buildroot/runtime/wiki/nx_wiki_search_render.nx

3925 B96 linesdepth 10pulls 27 transitivereach 6 importersview sourcekind librarytopic wiki
docsdependenciesstructsconstsfunctions

about

nx_wiki_search_render.nx -- WIKI-SPECIFIC THIN ADAPTER. All actual render logic lives in hub/nx_search_render_html.nx (HUB primitive; site-agnostic; reusable across wiki, obd-config, sprinkler-config, future Nishi-hosted third-party sites). This file ONLY: 1. Builds the wiki-themed NxSearchRenderTheme constant 2. Adapts NxWikiDocCtx -> raw byte writer for hub render 3. Delegates to nx_search_render_html Per operator cardinal 2026-05-27: "make sure you make the onsite and offsite search reusable and not just tied to the wiki but with capabilities to be used on other sites" -- enforced structurally by moving render logic to hub/, keeping per-site files THIN. COMPOSES: hub/nx_search_render_html (all logic; this file is glue) wiki/nx_wiki_doc_render (NxWikiDocCtx writer cursor) COMPOSED BY: wiki/nx_wiki_search_wiring (next commit)

dependencies 5 imports · 1 importers

nx_syscalls.nx nx_search_render_html.nx nx_wiki_doc_render.nx nx_search_query_parser.nx nx_search_onsite_engine.nx nx_wiki_search_render.nx nx_wiki_search_wiring.nx

imports: nx_syscalls.nxnx_search_render_html.nxnx_wiki_doc_render.nxnx_search_query_parser.nxnx_search_onsite_engine.nx

imported by: nx_wiki_search_wiring.nx

structs

none

consts

31const NX_WIKI_THEME_CONTAINER: *u8 = "wiki-search-results" as *u8
32const NX_WIKI_THEME_CONTAINER_N: i64 = 19
33const NX_WIKI_THEME_BANNER: *u8 = "wiki-search-banner" as *u8
34const NX_WIKI_THEME_BANNER_N: i64 = 18
35const NX_WIKI_THEME_RESULT: *u8 = "wiki-search-result" as *u8
36const NX_WIKI_THEME_RESULT_N: i64 = 18
37const NX_WIKI_THEME_META: *u8 = "wiki-search-meta" as *u8
38const NX_WIKI_THEME_META_N: i64 = 16
39const NX_WIKI_THEME_SNIPPET: *u8 = "wiki-search-snippet" as *u8
40const NX_WIKI_THEME_SNIPPET_N: i64 = 19
41const NX_WIKI_THEME_EMPTY: *u8 = "wiki-search-empty" as *u8
42const NX_WIKI_THEME_EMPTY_N: i64 = 17
47const NX_WSR_OK: i64 = 0
48const NX_WSR_BAD_INPUT: i64 = 2000
49const NX_WSR_CTX_INVALID: i64 = 2001

functions

56func nx_wiki_search_theme_init(t: *NxSearchRenderTheme) -> i64
71func nx_wiki_search_render(ctx: *NxWikiDocCtx,