hydrate(oldNode, newNode) normalizes the client tree to parser text-node granularity, walks both trees to report the first server/client markup disagreement (node, text, attribute, or child count, with a path), then morphs — matching nodes are adopted in place, the client render wins. choo.mount() now hydrates and console.warns on mismatch. Building this surfaced two real isomorphism divergences, both fixed: adjacent text nodes from template holes vs the parser's merged runs (folded via Node.normalize), and the server serializing onclick="" where the browser sets a property — event handlers now leave no trace in server markup at all. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
36 lines
720 B
JSON
36 lines
720 B
JSON
{
|
|
"name": "@choojs/html",
|
|
"version": "8.0.0-dev",
|
|
"description": "HTML template literals that render to DOM in the browser and strings on the server",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"browser": "./browser.js",
|
|
"default": "./server.js"
|
|
},
|
|
"./browser": "./browser.js",
|
|
"./server": "./server.js",
|
|
"./hydrate": "./hydrate.js",
|
|
"./raw": "./raw.js",
|
|
"./morph": "./morph.js"
|
|
},
|
|
"files": [
|
|
"browser.js",
|
|
"server.js",
|
|
"hydrate.js",
|
|
"raw.js",
|
|
"morph.js"
|
|
],
|
|
"engines": {
|
|
"node": ">=24"
|
|
},
|
|
"repository": "choojs/choo",
|
|
"keywords": [
|
|
"html",
|
|
"template",
|
|
"tagged-template",
|
|
"server-side-rendering"
|
|
],
|
|
"license": "MIT"
|
|
}
|