Add fonts, autotable, autotable examples
This commit is contained in:
20
CLAUDE.md
20
CLAUDE.md
@@ -48,6 +48,26 @@ go -C go vet ./...
|
||||
go -C go test ./...
|
||||
```
|
||||
|
||||
**The wasm host API** (`wasmruntime/host.go` + `host_wasm.go` / `host_native.go`) is how neutral
|
||||
component code reaches the browser: element measurement (`Measure`, `Viewport`), imperative style
|
||||
writes (`SetStyle` — positioning must NOT go through signals, which re-render the whole tree),
|
||||
the post-commit hook (`AfterRender`, the only point at which a just-rendered element can be
|
||||
measured), document/window listeners, timers, localStorage, and file download. It is **dual-build**:
|
||||
real under `js && wasm`, no-op stubs natively — which is what lets `webui` call it unconditionally
|
||||
and still SSR. Refs come from `vdom.Ref` + `vdom.WithRef`; `vdom.Portal` mounts children at
|
||||
`document.body` (needed to escape `overflow:hidden` / `transform` ancestors).
|
||||
|
||||
The reconciler is wasm-only and needs a DOM, so `go test ./...` cannot reach it. It has its own
|
||||
harness — a minimal DOM under node:
|
||||
```
|
||||
GOOS=js GOARCH=wasm go -C go test -exec="node testdata/domexec.js" ./wasmruntime
|
||||
```
|
||||
|
||||
`webui` components that measure the page (Tooltip, Popover, Menu, Modal, DatePicker, Tutorial,
|
||||
AutoTable) are **controllers**: create them once alongside your signals, never inside a render
|
||||
closure. Floating panels share one positioning engine (`webui/position.go`, pure math, unit-tested
|
||||
natively) driven by the `Floating` controller (`webui/floating.go`).
|
||||
|
||||
### web/
|
||||
|
||||
- `kit/` — Solid.js `.tsx` component kit. Apps import components as `@ui/*`.
|
||||
|
||||
Reference in New Issue
Block a user