wu-framework 1.1.7 → 1.1.9

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 (95) hide show
  1. package/LICENSE +19 -1
  2. package/README.md +257 -1122
  3. package/dist/wu-framework.cjs.js +3 -1
  4. package/dist/wu-framework.cjs.js.map +1 -0
  5. package/dist/wu-framework.dev.js +9867 -3183
  6. package/dist/wu-framework.dev.js.map +1 -1
  7. package/dist/wu-framework.esm.js +3 -0
  8. package/dist/wu-framework.esm.js.map +1 -0
  9. package/dist/wu-framework.umd.js +3 -1
  10. package/dist/wu-framework.umd.js.map +1 -0
  11. package/integrations/astro/README.md +127 -0
  12. package/integrations/astro/WuApp.astro +63 -0
  13. package/integrations/astro/WuShell.astro +39 -0
  14. package/integrations/astro/index.js +68 -0
  15. package/integrations/astro/package.json +38 -0
  16. package/integrations/astro/types.d.ts +53 -0
  17. package/package.json +96 -72
  18. package/src/adapters/angular/ai.js +30 -0
  19. package/src/adapters/angular/index.d.ts +154 -0
  20. package/src/adapters/angular/index.js +932 -0
  21. package/src/adapters/angular.d.ts +3 -154
  22. package/src/adapters/angular.js +3 -813
  23. package/src/adapters/index.js +35 -24
  24. package/src/adapters/lit/ai.js +20 -0
  25. package/src/adapters/lit/index.d.ts +120 -0
  26. package/src/adapters/lit/index.js +721 -0
  27. package/src/adapters/lit.d.ts +3 -120
  28. package/src/adapters/lit.js +3 -726
  29. package/src/adapters/preact/ai.js +33 -0
  30. package/src/adapters/preact/index.d.ts +108 -0
  31. package/src/adapters/preact/index.js +661 -0
  32. package/src/adapters/preact.d.ts +3 -108
  33. package/src/adapters/preact.js +3 -665
  34. package/src/adapters/react/ai.js +135 -0
  35. package/src/adapters/react/index.d.ts +246 -0
  36. package/src/adapters/react/index.js +694 -0
  37. package/src/adapters/react.d.ts +3 -212
  38. package/src/adapters/react.js +3 -513
  39. package/src/adapters/shared.js +64 -0
  40. package/src/adapters/solid/ai.js +32 -0
  41. package/src/adapters/solid/index.d.ts +101 -0
  42. package/src/adapters/solid/index.js +586 -0
  43. package/src/adapters/solid.d.ts +3 -101
  44. package/src/adapters/solid.js +3 -591
  45. package/src/adapters/svelte/ai.js +31 -0
  46. package/src/adapters/svelte/index.d.ts +166 -0
  47. package/src/adapters/svelte/index.js +798 -0
  48. package/src/adapters/svelte.d.ts +3 -166
  49. package/src/adapters/svelte.js +3 -803
  50. package/src/adapters/vanilla/ai.js +30 -0
  51. package/src/adapters/vanilla/index.d.ts +179 -0
  52. package/src/adapters/vanilla/index.js +785 -0
  53. package/src/adapters/vanilla.d.ts +3 -179
  54. package/src/adapters/vanilla.js +3 -791
  55. package/src/adapters/vue/ai.js +52 -0
  56. package/src/adapters/vue/index.d.ts +299 -0
  57. package/src/adapters/vue/index.js +608 -0
  58. package/src/adapters/vue.d.ts +3 -299
  59. package/src/adapters/vue.js +3 -611
  60. package/src/ai/wu-ai-actions.js +261 -0
  61. package/src/ai/wu-ai-agent.js +546 -0
  62. package/src/ai/wu-ai-browser-primitives.js +354 -0
  63. package/src/ai/wu-ai-browser.js +380 -0
  64. package/src/ai/wu-ai-context.js +332 -0
  65. package/src/ai/wu-ai-conversation.js +613 -0
  66. package/src/ai/wu-ai-orchestrate.js +1021 -0
  67. package/src/ai/wu-ai-permissions.js +381 -0
  68. package/src/ai/wu-ai-provider.js +700 -0
  69. package/src/ai/wu-ai-schema.js +225 -0
  70. package/src/ai/wu-ai-triggers.js +396 -0
  71. package/src/ai/wu-ai.js +804 -0
  72. package/src/core/wu-app.js +50 -8
  73. package/src/core/wu-cache.js +2 -3
  74. package/src/core/wu-core.js +648 -681
  75. package/src/core/wu-html-parser.js +121 -211
  76. package/src/core/wu-iframe-sandbox.js +328 -0
  77. package/src/core/wu-mcp-bridge.js +431 -0
  78. package/src/core/wu-overrides.js +510 -0
  79. package/src/core/wu-plugin.js +4 -1
  80. package/src/core/wu-prefetch.js +414 -0
  81. package/src/core/wu-proxy-sandbox.js +398 -75
  82. package/src/core/wu-sandbox.js +86 -268
  83. package/src/core/wu-script-executor.js +79 -182
  84. package/src/core/wu-snapshot-sandbox.js +149 -106
  85. package/src/core/wu-strategies.js +13 -0
  86. package/src/core/wu-style-bridge.js +23 -23
  87. package/src/index.js +162 -665
  88. package/dist/wu-framework.hex.js +0 -23
  89. package/dist/wu-framework.min.js +0 -1
  90. package/dist/wu-framework.obf.js +0 -1
  91. package/scripts/build-protected.js +0 -366
  92. package/scripts/build.js +0 -212
  93. package/scripts/rollup-plugin-hex.js +0 -143
  94. package/src/core/wu-registry.js +0 -60
  95. package/src/core/wu-sandbox-pool.js +0 -390
@@ -1,120 +1,3 @@
1
- /**
2
- * 🚀 WU-FRAMEWORK LIT ADAPTER - TypeScript Declarations
3
- */
4
-
5
- import type { WuCore } from '../core/wu-core';
6
-
7
- // Lit types (generics to avoid hard dependency)
8
- type LitElement = any;
9
- type TemplateResult = any;
10
-
11
- /**
12
- * Opciones de registro Lit
13
- */
14
- export interface LitRegisterOptions {
15
- /** Nombre del custom element (auto-generado si no se provee) */
16
- tagName?: string;
17
- /** Propiedades iniciales */
18
- properties?: Record<string, any>;
19
- /** Callback después de montar */
20
- onMount?: (container: HTMLElement, element: HTMLElement) => void;
21
- /** Callback antes de desmontar */
22
- onUnmount?: (container: HTMLElement, element: HTMLElement) => void;
23
- /** Permitir ejecución standalone */
24
- standalone?: boolean;
25
- /** Selector para modo standalone */
26
- standaloneContainer?: string;
27
- }
28
-
29
- /**
30
- * Configuración para crear elemento simple
31
- */
32
- export interface SimpleElementConfig {
33
- /** Nombre del custom element */
34
- name: string;
35
- /** Template HTML */
36
- template: string | ((element: HTMLElement) => string);
37
- /** Estilos CSS */
38
- styles?: string;
39
- /** Usar Shadow DOM */
40
- shadow?: boolean;
41
- /** Atributos observados */
42
- observedAttributes?: string[];
43
- /** Callback cuando se conecta */
44
- connectedCallback?: (this: HTMLElement) => void;
45
- /** Callback cuando se desconecta */
46
- disconnectedCallback?: (this: HTMLElement) => void;
47
- /** Callback cuando cambia un atributo */
48
- attributeChangedCallback?: (this: HTMLElement, name: string, oldVal: string, newVal: string) => void;
49
- }
50
-
51
- /**
52
- * Clase WuSlot Element
53
- */
54
- export interface WuSlotElementClass {
55
- new(): HTMLElement & {
56
- name: string;
57
- url: string;
58
- appName: string | null;
59
- fallbackText: string | null;
60
- loading: boolean;
61
- error: string | null;
62
- };
63
- }
64
-
65
- /**
66
- * Tipo para el Mixin de Wu
67
- */
68
- export type WuMixinResult<T extends new (...args: any[]) => any> = T & {
69
- new (...args: any[]): InstanceType<T> & {
70
- readonly wu: WuCore | null;
71
- wuEmit(event: string, data?: any, options?: any): void;
72
- wuOn(event: string, callback: (data: any) => void): () => void;
73
- wuOnce(event: string, callback: (data: any) => void): () => void;
74
- wuGetState(path?: string): any;
75
- wuSetState(path: string, value: any): void;
76
- wuOnStateChange(pattern: string, callback: (value: any) => void): () => void;
77
- };
78
- };
79
-
80
- export function register(
81
- appName: string,
82
- ElementClass: CustomElementConstructor,
83
- options?: LitRegisterOptions
84
- ): Promise<boolean>;
85
-
86
- export function registerWebComponent(
87
- appName: string,
88
- ElementClass: CustomElementConstructor,
89
- options?: LitRegisterOptions
90
- ): Promise<boolean>;
91
-
92
- export function createWuSlotElement(
93
- LitElement: any,
94
- html: (strings: TemplateStringsArray, ...values: any[]) => TemplateResult,
95
- css?: (strings: TemplateStringsArray, ...values: any[]) => any
96
- ): WuSlotElementClass;
97
-
98
- export function WuMixin<T extends new (...args: any[]) => any>(Base: T): WuMixinResult<T>;
99
-
100
- export function wuProperty(storePath: string): PropertyDecorator;
101
-
102
- export function createSimpleElement(config: SimpleElementConfig): CustomElementConstructor;
103
-
104
- export function getWuInstance(): WuCore | null;
105
-
106
- export function waitForWu(timeout?: number): Promise<WuCore>;
107
-
108
- export interface WuLitAdapter {
109
- register: typeof register;
110
- registerWebComponent: typeof registerWebComponent;
111
- createWuSlotElement: typeof createWuSlotElement;
112
- WuMixin: typeof WuMixin;
113
- wuProperty: typeof wuProperty;
114
- createSimpleElement: typeof createSimpleElement;
115
- getWuInstance: typeof getWuInstance;
116
- waitForWu: typeof waitForWu;
117
- }
118
-
119
- export const wuLit: WuLitAdapter;
120
- export default wuLit;
1
+ // Re-export from folder structure — backward compatibility
2
+ export * from './lit/index';
3
+ export { default } from './lit/index';