Repository navigation
v0.7.6
Summary
Child components first render with the props their parent gives them, lists update a new item before inserting it, and Light DOM slots take only content written in HTML, so children a framework renders go to shadow: true components. Recorded in CHANGELOG under 0.7.6.
Changes
- Start order: a component inside another component, in its Light DOM or its shadow tree at any depth, starts after the outer component's first render, as a browser orders a shadow host and its shadow tree. A child of a template first renders with the props that render gives it. Starts are isolated from each other's errors, still run when the outer first render throws, and run once.
- Lists:
replace()andupsert()callupdatefor a new item before inserting it, as assigningitemsdoes; anupsert()whoseupdatethrows leaves no item behind. - Light DOM slots: they place the children an element has when it is built and nodes a list or
data-ifof a parent template puts in later. A node other code adds afterwards stays where it was put, with the console warningunplaced-childonce per tag. Slots move a node to another slot withmoveBeforewhere the browser has it. - Cleanups: every cleanup and
disconnected()runs when one throws; the errors are rethrown together. - Docs and Skills: the slot boundary is a design decision; the framework Skills give framework children
shadow: trueonly; render writes compare first; a prop the parent always gives is declared withnull, typedDeepReadonly<T> | nullin an interface. Seven Skills re-verified by agent trials on 0.7.6.
Verification
npm run check,npm test(764),npm run lint,npm run test:browser(124),npm run bench:check,npm run smoke,npm run smoke:no-bundler.- Chrome tests of the start order in both modes, of nested parsing, of
moveBeforein slots and of the slot rules; the start-order test fails without the change. - Fresh Sonnet agent trials of core, testing, react, vue, svelte, angular and integration, each checked again independently.
Breaking Changes
- Child components of a Light DOM template start after the parent's first render: in that render a child has not built its own content, so calling its methods there moves to a later render or an event handler.
replace()andupsert()runupdateon a new item before it is in the document: read layout after the list call.- Light DOM slots no longer place nodes that code or a framework adds after the element is built: give such a component
shadow: true, or put TypeScript content into an element the component exposes through a ref.
🤖 Generated with Claude Code