wu-framework 1.1.14 → 1.1.16

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 (90) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +408 -408
  3. package/dist/wu-framework.cjs.js.map +1 -1
  4. package/dist/wu-framework.dev.js +15151 -15151
  5. package/dist/wu-framework.dev.js.map +1 -1
  6. package/dist/wu-framework.esm.js.map +1 -1
  7. package/dist/wu-framework.umd.js.map +1 -1
  8. package/integrations/astro/README.md +127 -127
  9. package/integrations/astro/WuApp.astro +63 -63
  10. package/integrations/astro/WuShell.astro +39 -39
  11. package/integrations/astro/index.js +68 -68
  12. package/integrations/astro/package.json +38 -38
  13. package/integrations/astro/types.d.ts +53 -53
  14. package/package.json +161 -161
  15. package/src/adapters/angular/ai.js +30 -30
  16. package/src/adapters/angular/index.d.ts +154 -154
  17. package/src/adapters/angular/index.js +932 -932
  18. package/src/adapters/angular.d.ts +3 -3
  19. package/src/adapters/angular.js +3 -3
  20. package/src/adapters/index.js +168 -168
  21. package/src/adapters/lit/ai.js +20 -20
  22. package/src/adapters/lit/index.d.ts +120 -120
  23. package/src/adapters/lit/index.js +721 -721
  24. package/src/adapters/lit.d.ts +3 -3
  25. package/src/adapters/lit.js +3 -3
  26. package/src/adapters/preact/ai.js +33 -33
  27. package/src/adapters/preact/index.d.ts +108 -108
  28. package/src/adapters/preact/index.js +661 -661
  29. package/src/adapters/preact.d.ts +3 -3
  30. package/src/adapters/preact.js +3 -3
  31. package/src/adapters/react/index.js +48 -54
  32. package/src/adapters/react.d.ts +3 -3
  33. package/src/adapters/react.js +3 -3
  34. package/src/adapters/shared.js +64 -64
  35. package/src/adapters/solid/ai.js +32 -32
  36. package/src/adapters/solid/index.d.ts +101 -101
  37. package/src/adapters/solid/index.js +586 -586
  38. package/src/adapters/solid.d.ts +3 -3
  39. package/src/adapters/solid.js +3 -3
  40. package/src/adapters/svelte/ai.js +31 -31
  41. package/src/adapters/svelte/index.d.ts +166 -166
  42. package/src/adapters/svelte/index.js +798 -798
  43. package/src/adapters/svelte.d.ts +3 -3
  44. package/src/adapters/svelte.js +3 -3
  45. package/src/adapters/vanilla/ai.js +30 -30
  46. package/src/adapters/vanilla/index.d.ts +179 -179
  47. package/src/adapters/vanilla/index.js +785 -785
  48. package/src/adapters/vanilla.d.ts +3 -3
  49. package/src/adapters/vanilla.js +3 -3
  50. package/src/adapters/vue/ai.js +52 -52
  51. package/src/adapters/vue/index.d.ts +299 -299
  52. package/src/adapters/vue/index.js +610 -610
  53. package/src/adapters/vue.d.ts +3 -3
  54. package/src/adapters/vue.js +3 -3
  55. package/src/ai/wu-ai-actions.js +261 -261
  56. package/src/ai/wu-ai-agent.js +546 -546
  57. package/src/ai/wu-ai-browser-primitives.js +354 -354
  58. package/src/ai/wu-ai-browser.js +380 -380
  59. package/src/ai/wu-ai-context.js +332 -332
  60. package/src/ai/wu-ai-conversation.js +613 -613
  61. package/src/ai/wu-ai-orchestrate.js +1021 -1021
  62. package/src/ai/wu-ai-permissions.js +381 -381
  63. package/src/ai/wu-ai-provider.js +700 -700
  64. package/src/ai/wu-ai-schema.js +225 -225
  65. package/src/ai/wu-ai-triggers.js +396 -396
  66. package/src/ai/wu-ai.js +804 -804
  67. package/src/core/wu-app.js +236 -236
  68. package/src/core/wu-cache.js +477 -477
  69. package/src/core/wu-core.js +1398 -1398
  70. package/src/core/wu-error-boundary.js +382 -382
  71. package/src/core/wu-event-bus.js +348 -348
  72. package/src/core/wu-hooks.js +350 -350
  73. package/src/core/wu-html-parser.js +190 -190
  74. package/src/core/wu-iframe-sandbox.js +328 -328
  75. package/src/core/wu-loader.js +272 -272
  76. package/src/core/wu-logger.js +134 -134
  77. package/src/core/wu-manifest.js +509 -509
  78. package/src/core/wu-mcp-bridge.js +432 -432
  79. package/src/core/wu-overrides.js +510 -510
  80. package/src/core/wu-performance.js +228 -228
  81. package/src/core/wu-plugin.js +348 -348
  82. package/src/core/wu-prefetch.js +414 -414
  83. package/src/core/wu-proxy-sandbox.js +476 -476
  84. package/src/core/wu-sandbox.js +779 -779
  85. package/src/core/wu-script-executor.js +113 -113
  86. package/src/core/wu-snapshot-sandbox.js +227 -227
  87. package/src/core/wu-strategies.js +256 -256
  88. package/src/core/wu-style-bridge.js +477 -477
  89. package/src/index.js +224 -224
  90. package/src/utils/dependency-resolver.js +327 -327
@@ -1,154 +1,154 @@
1
- /**
2
- * 🚀 WU-FRAMEWORK ANGULAR ADAPTER - TypeScript Declarations
3
- */
4
-
5
- import type { WuCore } from '../core/wu-core';
6
-
7
- // Angular types (generics to avoid hard dependency)
8
- type NgModuleRef<T> = any;
9
- type ApplicationRef = any;
10
- type Type<T> = new (...args: any[]) => T;
11
- type ApplicationConfig = any;
12
-
13
- /**
14
- * Opciones para registrar un módulo Angular
15
- */
16
- export interface AngularRegisterOptions {
17
- /** Factory del platform (platformBrowserDynamic) */
18
- platformFactory?: () => any;
19
- /** Providers adicionales para bootstrap */
20
- providers?: any[];
21
- /** Callback después de montar */
22
- onMount?: (container: HTMLElement, moduleRef: NgModuleRef<any>) => void;
23
- /** Callback antes de desmontar */
24
- onUnmount?: (container: HTMLElement, moduleRef: NgModuleRef<any>) => void;
25
- /** Permitir ejecución standalone (default: true) */
26
- standalone?: boolean;
27
- /** Selector para modo standalone (default: '#root') */
28
- standaloneContainer?: string;
29
- /** Selector del componente root (default: 'app-root') */
30
- rootSelector?: string;
31
- }
32
-
33
- /**
34
- * Opciones para registrar un componente standalone Angular
35
- */
36
- export interface AngularStandaloneOptions {
37
- /** Configuración de la aplicación */
38
- appConfig?: ApplicationConfig;
39
- /** Callback después de montar */
40
- onMount?: (container: HTMLElement, appRef: ApplicationRef) => void;
41
- /** Callback antes de desmontar */
42
- onUnmount?: (container: HTMLElement, appRef: ApplicationRef) => void;
43
- /** Permitir ejecución standalone (default: true) */
44
- standalone?: boolean;
45
- /** Selector para modo standalone (default: '#root') */
46
- standaloneContainer?: string;
47
- }
48
-
49
- /**
50
- * Servicio de Wu Framework para Angular
51
- */
52
- export interface WuService {
53
- /** Emitir evento */
54
- emit: (event: string, data?: any, options?: any) => void;
55
- /** Suscribirse a evento */
56
- on: (event: string, callback: (data: any) => void) => () => void;
57
- /** Suscribirse a evento una vez */
58
- once: (event: string, callback: (data: any) => void) => () => void;
59
- /** Desuscribirse de evento */
60
- off: (event: string, callback: (data: any) => void) => void;
61
- /** Obtener estado */
62
- getState: (path?: string) => any;
63
- /** Establecer estado */
64
- setState: (path: string, value: any) => void;
65
- /** Suscribirse a cambios de estado */
66
- onStateChange: (pattern: string, callback: (value: any) => void) => () => void;
67
- /** Destruir servicio y limpiar suscripciones */
68
- destroy: () => void;
69
- /** Acceso a instancia de Wu */
70
- readonly wu: WuCore | null;
71
- }
72
-
73
- /**
74
- * Configuración del componente WuSlot
75
- */
76
- export interface WuSlotComponentConfig {
77
- selector: string;
78
- template: string;
79
- styles: string[];
80
- methods: {
81
- ngOnInit: () => Promise<void>;
82
- ngOnDestroy: () => void;
83
- mountMicrofrontend: () => Promise<void>;
84
- unmountMicrofrontend: () => Promise<void>;
85
- };
86
- }
87
-
88
- /**
89
- * Configuración del módulo WuSlot
90
- */
91
- export interface WuSlotModuleConfig {
92
- imports: string[];
93
- declarations: string[];
94
- exports: string[];
95
- }
96
-
97
- /**
98
- * Registra un módulo Angular como microfrontend
99
- */
100
- export function register(
101
- appName: string,
102
- AppModule: Type<any>,
103
- options?: AngularRegisterOptions
104
- ): Promise<boolean>;
105
-
106
- /**
107
- * Registra un componente standalone Angular como microfrontend (Angular 14+)
108
- */
109
- export function registerStandalone(
110
- appName: string,
111
- RootComponent: Type<any>,
112
- options?: AngularStandaloneOptions
113
- ): Promise<boolean>;
114
-
115
- /**
116
- * Crea un servicio Wu para usar en Angular
117
- */
118
- export function createWuService(): WuService;
119
-
120
- /**
121
- * Crea la configuración para un componente WuSlot
122
- */
123
- export function createWuSlotComponent(): WuSlotComponentConfig;
124
-
125
- /**
126
- * Obtiene la configuración del módulo WuSlot
127
- */
128
- export function getWuSlotModuleConfig(): WuSlotModuleConfig;
129
-
130
- /**
131
- * Obtiene la instancia de Wu Framework
132
- */
133
- export function getWuInstance(): WuCore | null;
134
-
135
- /**
136
- * Espera a que Wu Framework esté disponible
137
- */
138
- export function waitForWu(timeout?: number): Promise<WuCore>;
139
-
140
- /**
141
- * API del adapter Angular
142
- */
143
- export interface WuAngularAdapter {
144
- register: typeof register;
145
- registerStandalone: typeof registerStandalone;
146
- createWuService: typeof createWuService;
147
- createWuSlotComponent: typeof createWuSlotComponent;
148
- getWuSlotModuleConfig: typeof getWuSlotModuleConfig;
149
- getWuInstance: typeof getWuInstance;
150
- waitForWu: typeof waitForWu;
151
- }
152
-
153
- export const wuAngular: WuAngularAdapter;
154
- export default wuAngular;
1
+ /**
2
+ * 🚀 WU-FRAMEWORK ANGULAR ADAPTER - TypeScript Declarations
3
+ */
4
+
5
+ import type { WuCore } from '../core/wu-core';
6
+
7
+ // Angular types (generics to avoid hard dependency)
8
+ type NgModuleRef<T> = any;
9
+ type ApplicationRef = any;
10
+ type Type<T> = new (...args: any[]) => T;
11
+ type ApplicationConfig = any;
12
+
13
+ /**
14
+ * Opciones para registrar un módulo Angular
15
+ */
16
+ export interface AngularRegisterOptions {
17
+ /** Factory del platform (platformBrowserDynamic) */
18
+ platformFactory?: () => any;
19
+ /** Providers adicionales para bootstrap */
20
+ providers?: any[];
21
+ /** Callback después de montar */
22
+ onMount?: (container: HTMLElement, moduleRef: NgModuleRef<any>) => void;
23
+ /** Callback antes de desmontar */
24
+ onUnmount?: (container: HTMLElement, moduleRef: NgModuleRef<any>) => void;
25
+ /** Permitir ejecución standalone (default: true) */
26
+ standalone?: boolean;
27
+ /** Selector para modo standalone (default: '#root') */
28
+ standaloneContainer?: string;
29
+ /** Selector del componente root (default: 'app-root') */
30
+ rootSelector?: string;
31
+ }
32
+
33
+ /**
34
+ * Opciones para registrar un componente standalone Angular
35
+ */
36
+ export interface AngularStandaloneOptions {
37
+ /** Configuración de la aplicación */
38
+ appConfig?: ApplicationConfig;
39
+ /** Callback después de montar */
40
+ onMount?: (container: HTMLElement, appRef: ApplicationRef) => void;
41
+ /** Callback antes de desmontar */
42
+ onUnmount?: (container: HTMLElement, appRef: ApplicationRef) => void;
43
+ /** Permitir ejecución standalone (default: true) */
44
+ standalone?: boolean;
45
+ /** Selector para modo standalone (default: '#root') */
46
+ standaloneContainer?: string;
47
+ }
48
+
49
+ /**
50
+ * Servicio de Wu Framework para Angular
51
+ */
52
+ export interface WuService {
53
+ /** Emitir evento */
54
+ emit: (event: string, data?: any, options?: any) => void;
55
+ /** Suscribirse a evento */
56
+ on: (event: string, callback: (data: any) => void) => () => void;
57
+ /** Suscribirse a evento una vez */
58
+ once: (event: string, callback: (data: any) => void) => () => void;
59
+ /** Desuscribirse de evento */
60
+ off: (event: string, callback: (data: any) => void) => void;
61
+ /** Obtener estado */
62
+ getState: (path?: string) => any;
63
+ /** Establecer estado */
64
+ setState: (path: string, value: any) => void;
65
+ /** Suscribirse a cambios de estado */
66
+ onStateChange: (pattern: string, callback: (value: any) => void) => () => void;
67
+ /** Destruir servicio y limpiar suscripciones */
68
+ destroy: () => void;
69
+ /** Acceso a instancia de Wu */
70
+ readonly wu: WuCore | null;
71
+ }
72
+
73
+ /**
74
+ * Configuración del componente WuSlot
75
+ */
76
+ export interface WuSlotComponentConfig {
77
+ selector: string;
78
+ template: string;
79
+ styles: string[];
80
+ methods: {
81
+ ngOnInit: () => Promise<void>;
82
+ ngOnDestroy: () => void;
83
+ mountMicrofrontend: () => Promise<void>;
84
+ unmountMicrofrontend: () => Promise<void>;
85
+ };
86
+ }
87
+
88
+ /**
89
+ * Configuración del módulo WuSlot
90
+ */
91
+ export interface WuSlotModuleConfig {
92
+ imports: string[];
93
+ declarations: string[];
94
+ exports: string[];
95
+ }
96
+
97
+ /**
98
+ * Registra un módulo Angular como microfrontend
99
+ */
100
+ export function register(
101
+ appName: string,
102
+ AppModule: Type<any>,
103
+ options?: AngularRegisterOptions
104
+ ): Promise<boolean>;
105
+
106
+ /**
107
+ * Registra un componente standalone Angular como microfrontend (Angular 14+)
108
+ */
109
+ export function registerStandalone(
110
+ appName: string,
111
+ RootComponent: Type<any>,
112
+ options?: AngularStandaloneOptions
113
+ ): Promise<boolean>;
114
+
115
+ /**
116
+ * Crea un servicio Wu para usar en Angular
117
+ */
118
+ export function createWuService(): WuService;
119
+
120
+ /**
121
+ * Crea la configuración para un componente WuSlot
122
+ */
123
+ export function createWuSlotComponent(): WuSlotComponentConfig;
124
+
125
+ /**
126
+ * Obtiene la configuración del módulo WuSlot
127
+ */
128
+ export function getWuSlotModuleConfig(): WuSlotModuleConfig;
129
+
130
+ /**
131
+ * Obtiene la instancia de Wu Framework
132
+ */
133
+ export function getWuInstance(): WuCore | null;
134
+
135
+ /**
136
+ * Espera a que Wu Framework esté disponible
137
+ */
138
+ export function waitForWu(timeout?: number): Promise<WuCore>;
139
+
140
+ /**
141
+ * API del adapter Angular
142
+ */
143
+ export interface WuAngularAdapter {
144
+ register: typeof register;
145
+ registerStandalone: typeof registerStandalone;
146
+ createWuService: typeof createWuService;
147
+ createWuSlotComponent: typeof createWuSlotComponent;
148
+ getWuSlotModuleConfig: typeof getWuSlotModuleConfig;
149
+ getWuInstance: typeof getWuInstance;
150
+ waitForWu: typeof waitForWu;
151
+ }
152
+
153
+ export const wuAngular: WuAngularAdapter;
154
+ export default wuAngular;