Commit Graph

5 Commits

Author SHA1 Message Date
Will Anderson 143137e2b4 add ssr-counter example demonstrating SSR + hydration end-to-end
Counter.el defines Counter, CounterPair, and App components with {#if}
conditionals, event handlers, and child component composition.

render.js (generated by elc-ui --target=server) is the Node.js render
script the server calls. app.js (generated by elc-ui --target=web) is the
compiled browser module. hydrate.js attaches the runtime to the
server-rendered DOM without replacing it.

index.html shows the integration point with instructions for injecting
server output and the two CLI commands needed to regenerate both targets.
2026-05-04 12:49:19 -05:00
Will Anderson f8e32e7719 add elc-ui CLI with --target=web and --target=server
elc-ui is a Node.js compiler CLI that reads .el component files and emits
either a browser ES2022 module (web target) or a Node.js CJS render script
(server target).

The server target embeds the component source at compile time and exports
renderToString(componentName, props) -> HTML string, which any El web server
can require() and call. CLI mode (node render.js ComponentName propsJson)
lets the web server invoke it via exec() as a subprocess.

The web target emits class-per-component JS matching the hand-compiled
format, so compiler output and hand-written components are interchangeable.
2026-05-04 12:47:34 -05:00
Will Anderson 9f0da76ca2 remove rust scaffolding — el is the implementation 2026-05-03 04:05:04 -05:00
Will Anderson c5e34ed09b snapshot before rust archive 2026-05-03 04:04:43 -05:00
Will Anderson f4abfe6fdc feat: rename crates/ → vessels/ + add El ports per sub-vessel
Belated rename commit for foundation/el-ui — was missed in the
workspace-wide crates→vessels pass earlier today. Same structural
intent as the rename in the other repos: 'crates' is the Rust word,
'vessel' is El's, and the directory rename is the marker that this
slot holds an El buildable unit even if its current contents are
still Rust pending port.

Plus the El ports themselves — manifest.el + src/main.el per sub-
vessel (el-aop, el-auth, el-config, el-i18n, el-identity, el-layout,
el-platform, el-publish, el-secrets, el-services, el-style, el-ui-
compiler). The ui-compiler is a stub: elc only emits C right now;
generating browser-target JS/Wasm is the biggest open language gap
and gets its own project. Until then, el-ui-compiler emits a JS
module that throws elc.backend_missing so callers fail loudly.
Cross-repo path dependencies in Cargo.toml updated to vessels/.
2026-04-30 18:18:39 -05:00