@vnejs/plugins.core.system 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.
package/modules/resize.js CHANGED
@@ -30,11 +30,6 @@ export class Resize extends Module {
30
30
  subscribe = () => {
31
31
  this.on(this.EVENTS.SYSTEM.RESIZE, this.onResize);
32
32
  };
33
- init = async () => {
34
- window.addEventListener("resize", this.emitResize);
35
-
36
- await this.emitResize();
37
- };
38
33
 
39
34
  onResize = () => {
40
35
  LENGTH_ARRAY.forEach((len) =>
@@ -44,6 +39,4 @@ export class Resize extends Module {
44
39
  ),
45
40
  );
46
41
  };
47
-
48
- emitResize = () => this.emit(this.EVENTS.SYSTEM.RESIZE);
49
42
  }
package/modules/system.js CHANGED
@@ -9,6 +9,12 @@ export class System extends Module {
9
9
  this.on(this.EVENTS.SYSTEM.FULLSCREEN, this.onFullScreen);
10
10
  };
11
11
 
12
+ init = () => {
13
+ window.addEventListener("resize", this.emitResize);
14
+
15
+ return this.emitResize();
16
+ };
17
+
12
18
  onClose = async () => {
13
19
  await this.emit(this.EVENTS.SYSTEM.CLOSE_BEFORE);
14
20
 
@@ -20,4 +26,6 @@ export class System extends Module {
20
26
  window.location.reload();
21
27
  };
22
28
  onFullScreen = () => (document.fullscreenElement ? document.exitFullscreen() : document.body.requestFullscreen());
29
+
30
+ emitResize = () => this.emit(this.EVENTS.SYSTEM.RESIZE);
23
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.core.system",
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
  }