wu-framework 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wu-framework",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "🚀 Universal Microfrontends Framework - Framework agnostic, zero config, Shadow DOM isolation",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ if (typeof window !== 'undefined') {
89
89
  window.wu = wu;
90
90
 
91
91
  // Agregar información de versión
92
- wu.version = '1.0.0';
92
+ wu.version = '1.0.1';
93
93
  wu.info = {
94
94
  name: 'Wu Framework',
95
95
  description: 'Universal Microfrontends',
@@ -102,6 +102,13 @@ if (typeof window !== 'undefined') {
102
102
  ]
103
103
  };
104
104
 
105
+ // 📡 Exponer Event Bus API globalmente para microfrontends
106
+ // Esto permite que los microfrontends usen: window.wu.emit(), window.wu.on(), etc.
107
+ wu.emit = (eventName, data, options) => wu.eventBus.emit(eventName, data, options);
108
+ wu.on = (eventName, callback) => wu.eventBus.on(eventName, callback);
109
+ wu.once = (eventName, callback) => wu.eventBus.once(eventName, callback);
110
+ wu.off = (eventName, callback) => wu.eventBus.off(eventName, callback);
111
+
105
112
  console.log('🚀 Wu Framework loaded - Universal Microfrontends ready');
106
113
  }
107
114