@kudzujs/core 0.17.4 → 0.17.6

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 CHANGED
@@ -14,7 +14,7 @@ Kudzu compiles ordinary React-shaped TypeScript and TSX into complete static HTM
14
14
 
15
15
  > Experimental `0.17.x`: the compiler API and supported TSX surface may change.
16
16
 
17
- **Current release: [0.17.4](https://github.com/kudzujs/kudzu/releases/tag/v0.17.4).** Array updates made before the list runtime arrives now reach visible row text and attributes on mounting. The compiler output preserves row identity and uncontrolled input values. Removing the incorrect initial shortcut saves 264 raw JavaScript bytes in C2; static siblings remain JavaScript-free. Generator `create-kudzu@0.1.165` targets core `^0.17.4`. Initial mounting performs necessary row writes; no speed improvement is claimed. Restoration latency and AI-cost/1.0 gates remain unresolved.
17
+ **Current release: [0.17.6](https://github.com/kudzujs/kudzu/releases/tag/v0.17.6).** Item-capturing row handlers retain correctly scoped state and refs after repeated same-key updates. Event templates resolve through existing row ownership before receiving current item captures. Chrome verifies delayed loading, repeated updates, cleanup and fresh clones. Project-app output adds 94 raw bytes; C2 raw JavaScript is unchanged. Generator `create-kudzu@0.1.167` targets core `^0.17.6`. No speed improvement is claimed; startup, restoration and AI-cost/1.0 gates remain unresolved.
18
18
 
19
19
  - [Documentation](https://kudzujs.cloud/docs)
20
20
  - [Installation guide](https://kudzujs.cloud/docs#install)
@@ -18,6 +18,7 @@ function printEffectEntry(effects, output, handlerModules, assetsDirectory, runt
18
18
  ? `import * as __kRuntime from ${JSON.stringify(relativeModulePath(output, join(runtimeDirectory, runtimeName)))}\nconst { browserState, commitDom } = __kRuntime`
19
19
  : `import { browserState, commitDom } from ${JSON.stringify(relativeModulePath(output, join(runtimeDirectory, runtimeName)))}`,
20
20
  `import { createEffectContext } from ${JSON.stringify(relativeModulePath(output, join(runtimeDirectory, "kudzu-effect.js")))}`,
21
+ ...(effects.some(effect => effect.list) ? [`import ${JSON.stringify(relativeModulePath(output, join(runtimeDirectory, "kudzu-list.js")))}`] : []),
21
22
  ...(hasDependencyExpressions ? [`import { evaluateCollectionExpression as __kEvaluateDependency } from ${JSON.stringify(relativeModulePath(output, join(runtimeDirectory, "kudzu-collection-selector.js")))}`] : []),
22
23
  ...(paramPath ? [`import ${JSON.stringify(relativeModulePath(output, join(assetsDirectory, paramPath)))}`] : []),
23
24
  ...modules.map((module, index) => `import * as __kEffectModule${index} from ${JSON.stringify(relativeModulePath(output, join(assetsDirectory, module.path)))}`)
@@ -630,7 +630,12 @@ function fillListParts(root, parts, item, revision, index = 0, previous) {
630
630
  }
631
631
  }
632
632
  if (__KUDZU_LIST_EVENTS__) {
633
- for (const [node, events] of parts.events) {
633
+ for (let [node, events] of parts.events) {
634
+ if (__KUDZU_GENERAL_ROW_HOOKS__) {
635
+ let owner = root
636
+ while (owner && !listRowPaths.has(owner)) owner = owner.parentElement
637
+ if (owner && !rowReplacements.has(owner)) events = events.replaceAll("$k", listRowPaths.get(owner))
638
+ }
634
639
  for (const [event, native] of JSON.parse(events)) {
635
640
  native.scope = Object.fromEntries(Object.entries(native.scope).map(([name, value]) => [name, value?.type === "list-item" ? serializeItem(item) : value?.type === "list-index" ? index : value]))
636
641
  node.dataset[`kNative${capitalize(event)}`] = JSON.stringify(native)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kudzujs/core",
3
- "version": "0.17.4",
3
+ "version": "0.17.6",
4
4
  "description": "HTML-first TSX framework with synchronous state semantics and no virtual DOM",
5
5
  "type": "module",
6
6
  "license": "MIT",