native-document 1.0.57 → 1.0.58
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/package.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import {Anchor} from "../../elements.js";
|
|
2
2
|
|
|
3
3
|
const ComponentRegistry = (function() {
|
|
4
|
-
console.log('ça s excecute')
|
|
5
|
-
|
|
6
4
|
const registry = new Map();
|
|
7
5
|
|
|
8
6
|
const wrapper = function(id, factory, metadata, registryItem) {
|
|
@@ -10,11 +8,9 @@ const ComponentRegistry = (function() {
|
|
|
10
8
|
|
|
11
9
|
return function(...args) {
|
|
12
10
|
const lastParams = args[0];
|
|
13
|
-
console.log({ lastParams })
|
|
14
11
|
if(lastParams?.__instance) {
|
|
15
12
|
const instance = lastParams.__instance;
|
|
16
|
-
const
|
|
17
|
-
const newInstance = factory(...componentArgs);
|
|
13
|
+
const newInstance = factory(...instance.context.args);
|
|
18
14
|
instance.anchor.setContent(newInstance);
|
|
19
15
|
return;
|
|
20
16
|
}
|
|
@@ -27,7 +23,6 @@ const ComponentRegistry = (function() {
|
|
|
27
23
|
args
|
|
28
24
|
}
|
|
29
25
|
});
|
|
30
|
-
console.log({ instance, anchor });
|
|
31
26
|
return anchor;
|
|
32
27
|
};
|
|
33
28
|
}
|
|
@@ -74,7 +69,6 @@ const ComponentRegistry = (function() {
|
|
|
74
69
|
}
|
|
75
70
|
},
|
|
76
71
|
updateInstance(instance, newFactory) {
|
|
77
|
-
console.log(Array.from(registry.entries()))
|
|
78
72
|
return newFactory({ __instance: instance });
|
|
79
73
|
}
|
|
80
74
|
};
|