@vnejs/module 0.0.8 → 0.0.10

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/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { CONST, EVENTS, PARAMS, SETTINGS } from "@vnejs/shared";
2
+
1
3
  declare type GlobalState = {};
2
4
 
3
5
  declare type SHARED = {};
@@ -31,6 +33,7 @@ export class Module {
31
33
  on: OnFunc;
32
34
  emit: EmitFunc;
33
35
  emitOne: EmitOneFunc;
36
+ emitReal: EmitOneFunc;
34
37
 
35
38
  globalState: GlobalState;
36
39
  state: StateType;
package/modules/module.js CHANGED
@@ -8,11 +8,12 @@ export class Module {
8
8
  SETTINGS = VNE.SETTINGS;
9
9
  PARAMS = VNE.PARAMS;
10
10
 
11
- inject = ({ on, emit, emitOne, state, shared, media, options } = {}) => {
11
+ inject = ({ on, emit, emitOne, emitReal, state, shared, media } = {}) => {
12
12
  // observer
13
13
  this.on = on;
14
14
  this.emit = emit;
15
15
  this.emitOne = emitOne;
16
+ this.emitReal = emitReal;
16
17
 
17
18
  // state
18
19
  this.globalState = state;
@@ -20,7 +21,6 @@ export class Module {
20
21
 
21
22
  this.shared = shared;
22
23
  this.media = media;
23
- this.options = options;
24
24
  }; // abstract
25
25
  subscribe = () => {}; // implement
26
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/module",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,6 +12,6 @@
12
12
  "author": "",
13
13
  "license": "ISC",
14
14
  "peerDependencies": {
15
- "@vnejs/shared": "*"
15
+ "@vnejs/shared": "~0.0.8"
16
16
  }
17
17
  }
package/shared.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { Module } from ".";
2
+
3
+ declare module "@vnejs/shared" {
4
+ export const VNE_MODULES: Module[];
5
+
6
+ export const regModule: (m: Module) => void;
7
+ }