@yuktishaalaa/yuktai 1.0.1 → 1.0.2

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/dist/index.d.cts CHANGED
@@ -1,30 +1,43 @@
1
+ import React from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+
1
4
  interface Plugin {
2
5
  name: string;
3
6
  execute(input: any): any | Promise<any>;
4
7
  }
5
8
  declare class Runtime {
6
9
  private plugins;
10
+ register(name: string, plugin: Plugin): void;
7
11
  /**
8
- * 🔹 Register plugin safely
9
- * Ensures the plugin exists and has a valid execute function.
12
+ * 🔹 Direct Plugin Access
13
+ * This is what YuktAI.use(name) calls.
10
14
  */
11
- register(name: string, plugin: Plugin): void;
15
+ use(name: string): Plugin | undefined;
12
16
  /**
13
17
  * 🔹 Run task
14
- * Simplified execution without lifecycle event overhead.
15
18
  */
16
19
  run(task: string, input: unknown): Promise<unknown>;
17
- /**
18
- * 🔹 Safe plugin listing
19
- */
20
20
  getPlugins(): string[];
21
21
  }
22
22
 
23
+ /**
24
+ * Layer 2: Global DOM Renderer
25
+ * Renders React into the DOM with auto-fixes applied.
26
+ */
27
+ declare function render(element: React.ReactNode, selector: string): void;
28
+
29
+ interface YuktAIWrapperProps {
30
+ children?: React.ReactNode;
31
+ }
32
+ declare function YuktAIWrapper({ children }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
33
+
23
34
  declare global {
24
35
  var __yuktai_runtime__: Runtime | undefined;
25
36
  }
26
37
  declare const YuktAI: {
38
+ render: typeof render;
27
39
  list(): string[];
40
+ use(name: string): Plugin | undefined;
28
41
  };
29
42
 
30
- export { YuktAI as default };
43
+ export { YuktAI, YuktAIWrapper, YuktAI as default };
package/dist/index.d.ts CHANGED
@@ -1,30 +1,43 @@
1
+ import React from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+
1
4
  interface Plugin {
2
5
  name: string;
3
6
  execute(input: any): any | Promise<any>;
4
7
  }
5
8
  declare class Runtime {
6
9
  private plugins;
10
+ register(name: string, plugin: Plugin): void;
7
11
  /**
8
- * 🔹 Register plugin safely
9
- * Ensures the plugin exists and has a valid execute function.
12
+ * 🔹 Direct Plugin Access
13
+ * This is what YuktAI.use(name) calls.
10
14
  */
11
- register(name: string, plugin: Plugin): void;
15
+ use(name: string): Plugin | undefined;
12
16
  /**
13
17
  * 🔹 Run task
14
- * Simplified execution without lifecycle event overhead.
15
18
  */
16
19
  run(task: string, input: unknown): Promise<unknown>;
17
- /**
18
- * 🔹 Safe plugin listing
19
- */
20
20
  getPlugins(): string[];
21
21
  }
22
22
 
23
+ /**
24
+ * Layer 2: Global DOM Renderer
25
+ * Renders React into the DOM with auto-fixes applied.
26
+ */
27
+ declare function render(element: React.ReactNode, selector: string): void;
28
+
29
+ interface YuktAIWrapperProps {
30
+ children?: React.ReactNode;
31
+ }
32
+ declare function YuktAIWrapper({ children }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
33
+
23
34
  declare global {
24
35
  var __yuktai_runtime__: Runtime | undefined;
25
36
  }
26
37
  declare const YuktAI: {
38
+ render: typeof render;
27
39
  list(): string[];
40
+ use(name: string): Plugin | undefined;
28
41
  };
29
42
 
30
- export { YuktAI as default };
43
+ export { YuktAI, YuktAIWrapper, YuktAI as default };