@foisit/react-wrapper 2.0.1 → 2.1.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.
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface AssistantActivatorProps {
4
+ label?: string;
5
+ onActivate?: () => void;
6
+ }
7
+ export declare const AssistantActivator: React.FC<AssistantActivatorProps>;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import { AssistantService } from '../services/AssistantService';
2
+ import { AssistantConfig } from '../../../../core/src/index.ts';
3
+ import { default as React } from 'react';
4
+
5
+ export declare const AssistantContext: React.Context<AssistantService | null>;
6
+ export declare const AssistantProvider: React.FC<{
7
+ config: AssistantConfig;
8
+ children: React.ReactNode;
9
+ }>;
@@ -0,0 +1,3 @@
1
+ import { AssistantService } from '../services/AssistantService';
2
+
3
+ export declare const useAssistant: () => AssistantService;
@@ -0,0 +1,3 @@
1
+ import { StateManager } from '../../../../core/src/index.ts';
2
+
3
+ export declare const useAssistantState: (stateManager: StateManager) => "idle" | "listening" | "processing";
@@ -0,0 +1,2 @@
1
+ export declare function ReactWrapper(): import("react/jsx-runtime").JSX.Element;
2
+ export default ReactWrapper;
@@ -0,0 +1,39 @@
1
+ import { AssistantConfig, AssistantCommand, InteractiveResponse } from '../../../../core/src/index.ts';
2
+
3
+ export declare class AssistantService {
4
+ private config;
5
+ private commandHandler;
6
+ private fallbackHandler;
7
+ private voiceProcessor;
8
+ private textToSpeech;
9
+ private stateManager;
10
+ private isActivated;
11
+ private lastProcessedInput;
12
+ private processingLock;
13
+ private gestureHandler;
14
+ private overlayManager;
15
+ private defaultIntroMessage;
16
+ constructor(config: AssistantConfig);
17
+ /** Start listening for activation and commands */
18
+ startListening(): void;
19
+ /** Stop listening */
20
+ stopListening(): void;
21
+ /** Process activation command */
22
+ private processActivation;
23
+ /** Handle recognized commands */
24
+ private handleCommand;
25
+ /**
26
+ * Cleanup resources
27
+ */
28
+ destroy(): void;
29
+ /** Unified response processing */
30
+ private processResponse;
31
+ /** Add a command dynamically (supports string or rich object) */
32
+ addCommand(commandOrObj: string | AssistantCommand, action?: (params?: any) => Promise<string | InteractiveResponse | void> | void): void;
33
+ /** Remove a command dynamically */
34
+ removeCommand(command: string): void;
35
+ /** Get all registered commands */
36
+ getCommands(): string[];
37
+ /** Toggle the assistant overlay */
38
+ toggle(onSubmit?: (text: string) => void, onClose?: () => void): void;
39
+ }
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foisit/react-wrapper",
3
- "version": "2.0.1",
3
+ "version": "2.1.2",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -11,7 +11,11 @@
11
11
  }
12
12
  },
13
13
  "files": [
14
- "dist",
14
+ "index.js",
15
+ "index.mjs",
16
+ "index.d.ts",
17
+ "lib",
18
+ "style.css",
15
19
  "README.md"
16
20
  ],
17
21
  "sideEffects": false,
package/style.css ADDED
File without changes