dalila 1.5.3 → 1.5.4

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.
@@ -31,6 +31,12 @@ export function fromHtml(html, options = {}) {
31
31
  const container = document.createElement('div');
32
32
  container.style.display = 'contents';
33
33
  container.appendChild(template.content);
34
+ // Bind BEFORE inserting children so the layout's bind() only processes
35
+ // the layout's own HTML — children are already bound by their own fromHtml() call.
36
+ const dispose = bind(container, data ?? {}, { _internal: true });
37
+ if (scope) {
38
+ scope.onCleanup(dispose);
39
+ }
34
40
  if (children) {
35
41
  const slot = container.querySelector('[data-slot="children"]');
36
42
  if (slot) {
@@ -42,10 +48,5 @@ export function fromHtml(html, options = {}) {
42
48
  }
43
49
  }
44
50
  }
45
- // Router/template rendering should not register global HMR bind context.
46
- const dispose = bind(container, data ?? {}, { _internal: true });
47
- if (scope) {
48
- scope.onCleanup(dispose);
49
- }
50
51
  return container;
51
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dalila",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "DOM-first reactive framework based on signals",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",