malinajs 0.7.2-a4 → 0.7.2-a5
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/malina-esbuild.js +0 -1
- package/malina.js +6 -2
- package/package.json +1 -1
- package/runtime.js +6 -6
package/malina-esbuild.js
CHANGED
package/malina.js
CHANGED
|
@@ -2137,7 +2137,11 @@
|
|
|
2137
2137
|
|
|
2138
2138
|
if(n.name == 'component') {
|
|
2139
2139
|
// dyn-component
|
|
2140
|
-
|
|
2140
|
+
if(isRoot) {
|
|
2141
|
+
requireFragment = true;
|
|
2142
|
+
if(!tpl.getLast()) tpl.push(xNode('node:comment', { label: true }));
|
|
2143
|
+
}
|
|
2144
|
+
const label = requireLabel(true, isRoot);
|
|
2141
2145
|
binds.push(this.makeComponentDyn(n, label));
|
|
2142
2146
|
} else {
|
|
2143
2147
|
const label = requireLabel();
|
|
@@ -6634,7 +6638,7 @@
|
|
|
6634
6638
|
return { event, fn, rootModifier };
|
|
6635
6639
|
}
|
|
6636
6640
|
|
|
6637
|
-
const version = '0.7.2-
|
|
6641
|
+
const version = '0.7.2-a5';
|
|
6638
6642
|
|
|
6639
6643
|
|
|
6640
6644
|
async function compile(source, config = {}) {
|
package/package.json
CHANGED
package/runtime.js
CHANGED
|
@@ -75,7 +75,7 @@ const cd_component = cd => {
|
|
|
75
75
|
return cd.component;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
const cd_new = () => new $ChangeDetector();
|
|
78
|
+
const cd_new = (parent) => new $ChangeDetector(parent);
|
|
79
79
|
|
|
80
80
|
const cd_attach = (parent, cd) => {
|
|
81
81
|
if(cd) {
|
|
@@ -414,7 +414,7 @@ const attachDynComponent = (label, exp, bind, parentLabel) => {
|
|
|
414
414
|
if(component) {
|
|
415
415
|
destroyList = current_destroyList = [];
|
|
416
416
|
current_mountList = [];
|
|
417
|
-
$cd = current_cd = cd_new();
|
|
417
|
+
$cd = current_cd = cd_new(parentCD);
|
|
418
418
|
try {
|
|
419
419
|
const $dom = bind(component).$dom;
|
|
420
420
|
cd_attach(parentCD, $cd);
|
|
@@ -882,7 +882,7 @@ function ifBlock(label, fn, parts, parentLabel) {
|
|
|
882
882
|
let $dom;
|
|
883
883
|
destroyList = current_destroyList = [];
|
|
884
884
|
let mountList = current_mountList = [];
|
|
885
|
-
$cd = current_cd = cd_new();
|
|
885
|
+
$cd = current_cd = cd_new(parentCD);
|
|
886
886
|
try {
|
|
887
887
|
$dom = builder();
|
|
888
888
|
} finally {
|
|
@@ -955,7 +955,7 @@ function awaitBlock(label, parentLabel, relation, fn, build_main, build_then, bu
|
|
|
955
955
|
|
|
956
956
|
if(!builder) return;
|
|
957
957
|
destroyList = current_destroyList = [];
|
|
958
|
-
$cd = current_cd = cd_new();
|
|
958
|
+
$cd = current_cd = cd_new(parentCD);
|
|
959
959
|
let $dom, mountList = current_mountList = [];
|
|
960
960
|
try {
|
|
961
961
|
$dom = builder(value);
|
|
@@ -1015,7 +1015,7 @@ const makeEachElseBlock = (fn) => {
|
|
|
1015
1015
|
return (label, mode, parentCD) => {
|
|
1016
1016
|
let first, last;
|
|
1017
1017
|
let destroyList = current_destroyList = [];
|
|
1018
|
-
let $cd = current_cd = cd_new();
|
|
1018
|
+
let $cd = current_cd = cd_new(parentCD);
|
|
1019
1019
|
current_mountList = [];
|
|
1020
1020
|
const parentNode = mode ? label : label.parentNode;
|
|
1021
1021
|
try {
|
|
@@ -1173,7 +1173,7 @@ function $$eachBlock(label, mode, fn, getKey, bind, buildElseBlock) {
|
|
|
1173
1173
|
let $dom, rebind,
|
|
1174
1174
|
d = current_destroyList = [],
|
|
1175
1175
|
m = current_mountList = [],
|
|
1176
|
-
$cd = current_cd = cd_new();
|
|
1176
|
+
$cd = current_cd = cd_new(eachCD);
|
|
1177
1177
|
try {
|
|
1178
1178
|
([$dom, rebind] = bind(item, i));
|
|
1179
1179
|
} finally {
|