htmx demos working: activation, fetch, swap, OOB filtering, test runner page
- htmx-boot-subtree! wired into process-elements for auto-activation
- Fixed cond compilation bug in hx-verb-info (Clojure-style flat cond)
- Platform io-fetch upgraded: method/body/headers support, full response dict
- Replaced perform IO ops with browser primitives (set-timeout, browser-confirm, etc)
- SX→HTML rendering in hx-do-swap with OOB section filtering
- hx-collect-params: collects input name/value for all methods
- Handler naming: ex-{slug} convention, removed perform IO dependencies
- Test runner page at (test.(applications.(htmx))) with iframe-based runner
- Header "test" link on every page linking to test URL
- Page file restructure: 285 files moved to URL-matching paths (a/b/c/index.sx)
- page-functions.sx: ~100 component name references updated
- _test added to skip_dirs, test- file prefix convention for test files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2846,13 +2846,9 @@ let http_inject_shell_statics env static_dir sx_sxc =
|
||||
(* Hash each .sxbc module individually and add to the hash index.
|
||||
Each module's content is stored by hash; exported symbols map to the module hash. *)
|
||||
let sxbc_dir = static_dir ^ "/wasm/sx" in
|
||||
let module_manifest_path = sxbc_dir ^ "/module-manifest.json" in
|
||||
let module_manifest_path = sxbc_dir ^ "/module-manifest.sx" in
|
||||
let module_hashes : (string, string) Hashtbl.t = Hashtbl.create 32 in (* module key → hash *)
|
||||
(if Sys.file_exists module_manifest_path then begin
|
||||
let manifest_src = In_channel.with_open_text module_manifest_path In_channel.input_all in
|
||||
(* Simple JSON parse — extract "key": { "file": "...", "exports": [...] } *)
|
||||
let exprs = try Sx_parser.parse_all ("(" ^ manifest_src ^ ")") with _ -> [] in
|
||||
ignore exprs; (* The manifest is JSON, not SX — parse it manually *)
|
||||
(* Read each .sxbc file, hash it, store in hash_to_def *)
|
||||
if Sys.file_exists sxbc_dir && Sys.is_directory sxbc_dir then begin
|
||||
let files = Array.to_list (Sys.readdir sxbc_dir) in
|
||||
@@ -3485,7 +3481,7 @@ let http_mode port =
|
||||
(* Files to skip — declarative metadata, not needed for rendering *)
|
||||
let skip_files = ["primitives.sx"; "types.sx"; "boundary.sx";
|
||||
"harness.sx"; "eval-rules.sx"; "vm-inline.sx"] in
|
||||
let skip_dirs = ["tests"; "test"; "plans"; "essays"; "spec"; "client-libs"] in
|
||||
let skip_dirs = ["tests"; "test"; "plans"; "essays"; "spec"; "client-libs"; "_test"] in
|
||||
let rec load_dir ?(base="") dir =
|
||||
if Sys.file_exists dir && Sys.is_directory dir then begin
|
||||
let entries = Sys.readdir dir in
|
||||
|
||||
Reference in New Issue
Block a user