Repository navigation
webspine 0.1.26
Component child content
Cards, modals, and other wrapper components can now receive caller-rendered child content through an optional children: callback on $ui->component() and $app->theme->component(). The wrapper renders the resulting $children string without passing HTML through an ordinary prop. Resolves #65; implemented in #96.
- Callbacks run once before the wrapper. Buffered markup comes first, followed by an optional returned HTML string. Reusing
$childrenreuses that string without rerunning the callback. - Omitted or empty children produce an empty string. Invalid return types and callback failures throw explicitly and restore renderer-owned output buffers. Nested slots use the existing 64-component nesting limit.
- Components keep explicit props and isolated scopes. Props named
childrenoruiremain accessible in$props; they cannot replace renderer locals. The presentation helper retains its three methods, and existing two-argument component calls remain compatible. - Slots compose trusted theme markup; they do not sanitize content. Escape plain-text content and URLs with
e(). Named slots are not included.
See core/docs/site.md, under "Caller-supplied child content", for a card example and callback semantics.
Compatibility and installation
PHP 8.3+ and framework API 1 remain unchanged. No database migration is required. Existing websites should apply webspine-core-0.1.26.zip through the CLI updater after making a verified backup; webspine-0.1.26.zip is the bootstrap for new websites. Each ZIP includes a SHA-256 JSON sidecar. Checksums verify integrity, not release authenticity; signature verification is not implemented.
Validation
- 304 framework checks and 15 Starter checks passed for the PR; all PR CI checks passed.
- Merged-commit hosting CI passed.
- Release ZIPs, inventories, vendor checksums, source bytes, and both SHA-256 sidecars verified against the clean merged checkout.
- Fresh packaged installation/health, child-content composition, and core updater staging verified with disposable local data.