@kudzujs/core 0.16.47 → 0.16.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/framework/binding-runtime.js +5 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Kudzu compiles ordinary React-shaped TypeScript and TSX into complete static HTM
|
|
|
14
14
|
|
|
15
15
|
> Experimental `0.16.x`: the compiler API and supported TSX surface may change.
|
|
16
16
|
|
|
17
|
-
**Current release: [0.16.
|
|
17
|
+
**Current release: [0.16.48](https://github.com/kudzujs/kudzu/releases/tag/v0.16.48).** Binding setup uses one native attribute read per selected property and removes temporary arrays and name conversion. Measured JavaScript savings are 53 raw / 43 gzip bytes in C2 and 153 / 119 in Project, with unchanged HTML, route plans and application behavior. The 21-profile comparison does not establish faster row restoration. Generator `create-kudzu@0.1.160` is unchanged. No reliable AI-token saving is established; the AI-cost/1.0 gates remain blocked.
|
|
18
18
|
|
|
19
19
|
- [Documentation](https://kudzujs.cloud/docs)
|
|
20
20
|
- [Installation guide](https://kudzujs.cloud/docs#install)
|
|
@@ -71,9 +71,11 @@ function mountBindings(root) {
|
|
|
71
71
|
mountedBindings.add(node)
|
|
72
72
|
const registrations = []
|
|
73
73
|
bindingRegistrations.set(node, registrations)
|
|
74
|
-
const descriptors =
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
const descriptors = []
|
|
75
|
+
if (globalThis.__KUDZU_PROPERTY_BINDINGS__ !== false) for (const target of bindingTypes) {
|
|
76
|
+
const encoded = node.getAttribute(`data-k-bind-${target}`)
|
|
77
|
+
if (encoded !== null) descriptors.push([target, JSON.parse(encoded)])
|
|
78
|
+
}
|
|
77
79
|
if (globalThis.__KUDZU_ATTRIBUTE_BINDINGS__ !== false && node.dataset.kBindAttrs) descriptors.push(...JSON.parse(node.dataset.kBindAttrs).map(({ target, ...descriptor }) => [target, descriptor]))
|
|
78
80
|
for (const [target, descriptor] of descriptors) {
|
|
79
81
|
if (descriptor.state) {
|
|
@@ -340,10 +342,6 @@ function patchText(start, value) {
|
|
|
340
342
|
if (next) end.before(start.ownerDocument.createTextNode(next))
|
|
341
343
|
}
|
|
342
344
|
|
|
343
|
-
function capitalize(value) {
|
|
344
|
-
return value[0].toUpperCase() + value.slice(1)
|
|
345
|
-
}
|
|
346
|
-
|
|
347
345
|
function isStringBooleanAttribute(name) {
|
|
348
346
|
return name.startsWith("aria-") || name.startsWith("data-")
|
|
349
347
|
}
|