@vnejs/plugins.core.components 0.1.0 → 0.1.1

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.
@@ -8,9 +8,7 @@ export class Components extends Module {
8
8
  };
9
9
 
10
10
  init = async () => {
11
- this.props = { emit: this.emit, on: this.on, shared: this.shared, media: this.media, options: this.options };
12
-
13
- Object.assign(this.props, { SETTINGS: this.SETTINGS, CONST: this.CONST, EVENTS: this.EVENTS, PARAMS: this.PARAMS });
11
+ this.props = { emit: this.emit, shared: this.shared, SETTINGS: this.SETTINGS, CONST: this.CONST, EVENTS: this.EVENTS, PARAMS: this.PARAMS };
14
12
 
15
13
  this.shared.viewForceAnimationSources = [];
16
14
 
@@ -22,16 +20,13 @@ export class Components extends Module {
22
20
  await this.waitRender();
23
21
  };
24
22
 
25
- onComponentsReg = async ({ renderFunc } = {}) => {
23
+ onComponentsReg = async ({ renderFunc, store } = {}) => {
26
24
  await this.waitIsReady();
27
25
 
28
26
  let comp = null;
29
27
 
30
28
  await new Promise((resolve) => {
31
- const root = document.createElement("div");
32
-
33
- comp = renderFunc(this.props, root, resolve);
34
- [...root.children].forEach((child) => this.elem.appendChild(child));
29
+ comp = renderFunc({ ...this.props, onMount: resolve, store }, this.elem.appendChild(document.createElement("div")), resolve);
35
30
  });
36
31
 
37
32
  return comp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.core.components",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -13,9 +13,5 @@
13
13
  },
14
14
  "author": "",
15
15
  "license": "ISC",
16
- "description": "",
17
- "peerDependencies": {
18
- "@vnejs/shared": "*",
19
- "@vnejs/module": "*"
20
- }
16
+ "description": ""
21
17
  }