@foisit/angular-wrapper 2.1.1 → 2.4.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.
package/README.md CHANGED
@@ -7,39 +7,38 @@
7
7
 
8
8
  Transform your Angular app into an intelligent, voice-ready platform. Foisit provides a drop-in AI layer that understands natural language, manages multi-step workflows, and executes actions—all with zero backend required.
9
9
 
10
- > [!NOTE]
11
- > 🎙️ **Voice Support Status**: Voice recognition and responses are currently in development and will be released in a future update. The current version focuses on high-performance text-based interactions and AI intent matching.
10
+ > [!NOTE] > **Voice Support Status**: Voice recognition and responses are currently in development and will be released in a future update. The current version focuses on high-performance text-based interactions and AI intent matching.
12
11
 
13
12
  ---
14
13
 
15
- ## 📋 Table of Contents
14
+ ## Table of Contents
16
15
 
17
- - [Features](#-features)
18
- - [Installation](#-installation)
19
- - [Quick Start](#-quick-start)
20
- - [Core Concepts](#-core-concepts)
21
- - [API Reference](#-api-reference)
22
- - [Advanced Usage](#-advanced-usage)
23
- - [Examples](#-examples)
24
- - [TypeScript Support](#-typescript-support)
25
- - [Best Practices](#-best-practices)
16
+ - [Features](#features)
17
+ - [Installation](#installation)
18
+ - [Quick Start](#quick-start)
19
+ - [Core Concepts](#core-concepts)
20
+ - [API Reference](#api-reference)
21
+ - [Advanced Usage](#advanced-usage)
22
+ - [Examples](#examples)
23
+ - [TypeScript Support](#typescript-support)
24
+ - [Best Practices](#best-practices)
26
25
 
27
26
  ---
28
27
 
29
- ## Features
28
+ ## Features
30
29
 
31
- - **🧠 Natural Language Understanding** - AI-powered intent matching using GPT-4o mini (proxied securely)
32
- - **📝 Smart Slot Filling** - Auto-generates forms for missing parameters
33
- - **⚠️ Critical Action Protection** - Built-in confirmation dialogs for dangerous operations
34
- - **🎨 Premium UI** - Glassmorphic overlay with dark/light mode support
35
- - **🔒 Zero Backend Required** - Secure proxy architecture keeps API keys server-side
36
- - **⚡ Angular Native** - Uses Dependency Injection, Signals, and RxJS
37
- - **🎯 Type-Safe** - Full TypeScript support with comprehensive types
38
- - **📱 Responsive** - Works flawlessly on desktop and mobile
30
+ - **Natural Language Understanding** - AI-powered intent matching using GPT-4o mini (proxied securely)
31
+ - **Smart Slot Filling** - Auto-generates forms for missing parameters
32
+ - **Critical Action Protection** - Built-in confirmation dialogs for dangerous operations
33
+ - **Premium UI** - Glassmorphic overlay with dark/light mode support
34
+ - **Zero Backend Required** - Secure proxy architecture keeps API keys server-side
35
+ - **Angular Native** - Uses Dependency Injection, Signals, and RxJS
36
+ - **Type-Safe** - Full TypeScript support with comprehensive types
37
+ - **Responsive** - Works flawlessly on desktop and mobile
39
38
 
40
39
  ---
41
40
 
42
- ## 🚀 Installation
41
+ ## Installation
43
42
 
44
43
  ```bash
45
44
  npm install @foisit/angular-wrapper
@@ -56,7 +55,7 @@ npm install @foisit/angular-wrapper
56
55
 
57
56
  ---
58
57
 
59
- ## 🏁 Quick Start
58
+ ## Quick Start
60
59
 
61
60
  ### Step 1: Import the Module
62
61
 
@@ -127,7 +126,7 @@ export class MyComponent {
127
126
 
128
127
  ---
129
128
 
130
- ## 🎯 Core Concepts
129
+ ## Core Concepts
131
130
 
132
131
  ### 1. Commands
133
132
 
@@ -164,24 +163,57 @@ Define parameters and Foisit will automatically generate forms to collect them:
164
163
  - `number` - Numeric input
165
164
  - `date` - Date picker
166
165
  - `select` - Dropdown (static or async options)
166
+ - `file` - File upload input
167
167
 
168
- ### 3. Critical Actions
168
+ ### 3. File Parameters
169
+
170
+ Collect files via the built-in form UI and receive them in your command `action`.
171
+
172
+ ```typescript
173
+ {
174
+ command: 'upload file',
175
+ description: 'Pick a file and return it to the action',
176
+ parameters: [
177
+ {
178
+ name: 'attachment',
179
+ type: 'file',
180
+ required: true,
181
+ accept: ['image/*', 'audio/*', 'video/*'],
182
+ multiple: false,
183
+ // delivery: 'file' | 'base64' (default: 'file')
184
+ delivery: 'file',
185
+ },
186
+ ],
187
+ action: async (params) => {
188
+ const file = params?.attachment as File | undefined;
189
+ if (!file) return { type: 'error', message: 'No file provided.' };
190
+ return {
191
+ type: 'success',
192
+ message: `File received. Name: ${file.name}, Type: ${file.type || 'unknown'}, Size: ${file.size} bytes`,
193
+ };
194
+ },
195
+ }
196
+ ```
197
+
198
+ `FileParameter` supports validations like `maxFiles`, `maxSizeBytes`, `maxTotalBytes`, and media/image constraints like `maxDurationSec`, `maxWidth`, and `maxHeight`.
199
+
200
+ ### 4. Critical Actions
169
201
 
170
202
  Protect dangerous operations with automatic confirmation dialogs:
171
203
 
172
204
  ```typescript
173
205
  {
174
206
  command: 'delete all data',
175
- critical: true, // 🔒 Requires confirmation
207
+ critical: true, // Requires confirmation
176
208
  description: 'Permanently delete all application data',
177
209
  action: async () => {
178
210
  await this.dataService.deleteAll();
179
- return 'All data deleted successfully.';
211
+ return 'All data deleted successfully.';
180
212
  }
181
213
  }
182
214
  ```
183
215
 
184
- ### 4. Select Parameters (Static)
216
+ ### 5. Select Parameters (Static)
185
217
 
186
218
  Provide predefined options:
187
219
 
@@ -201,7 +233,7 @@ Provide predefined options:
201
233
  }
202
234
  ```
203
235
 
204
- ### 5. Dynamic Select Parameters
236
+ ### 6. Dynamic Select Parameters
205
237
 
206
238
  Load options from APIs:
207
239
 
@@ -225,7 +257,7 @@ Load options from APIs:
225
257
 
226
258
  ---
227
259
 
228
- ## 📘 API Reference
260
+ ## API Reference
229
261
 
230
262
  ### `AssistantService`
231
263
 
@@ -250,7 +282,7 @@ this.assistant.toggle(
250
282
 
251
283
  ##### `addCommand(command, action?)`
252
284
 
253
- Dynamically add a command at runtime.
285
+ Dynamically add or update a command at runtime. Commands added via `addCommand` take effect immediately in the running application; they are stored in memory for the current session (they are not persisted after a page reload unless you re-register them during app startup).
254
286
 
255
287
  ```typescript
256
288
  // Add a simple command
@@ -280,6 +312,35 @@ this.assistant.addCommand({
280
312
  });
281
313
  ```
282
314
 
315
+ ### Dynamic Updates (Add / Remove / Update commands at runtime) ✅
316
+
317
+ - Use `addCommand` to register a new command or to replace an existing command's behavior (remove first if you want a clean replacement).
318
+ - Use `removeCommand(commandPhrase)` to unregister a command. This is useful for temporary or context-specific commands.
319
+ - Commands are in-memory only; to persist them across reloads, re-register on app startup (e.g., in an initialization hook).
320
+
321
+ Example — register a temporary command and clean it up in `ngOnDestroy`:
322
+
323
+ ```typescript
324
+ // component.ts
325
+ import { OnDestroy } from '@angular/core';
326
+
327
+ export class MyComponent implements OnDestroy {
328
+ constructor(private assistant: AssistantService) {
329
+ this.assistant.addCommand('temp action', () => 'Temporary action executed');
330
+ }
331
+
332
+ ngOnDestroy() {
333
+ // Remove the temporary command when component unmounts
334
+ this.assistant.removeCommand('temp action');
335
+ }
336
+ }
337
+ ```
338
+
339
+ Notes:
340
+
341
+ - If a command has only optional params, consider returning a `form` InteractiveResponse to prompt the user when no params are provided.
342
+ - Always remove transient commands in your cleanup lifecycle to avoid leaks and confusing UX.
343
+
283
344
  ##### `removeCommand(commandPhrase)`
284
345
 
285
346
  Remove a registered command.
@@ -299,7 +360,7 @@ console.log('Available commands:', commands);
299
360
 
300
361
  ---
301
362
 
302
- ## 🔧 Configuration Options
363
+ ## Configuration Options
303
364
 
304
365
  ### `AssistantConfig`
305
366
 
@@ -335,7 +396,7 @@ interface AssistantConfig {
335
396
 
336
397
  ---
337
398
 
338
- ## 🎨 Advanced Usage
399
+ ## Advanced Usage
339
400
 
340
401
  ### Example 1: Multi-Step Booking System
341
402
 
@@ -471,7 +532,7 @@ this.assistant.addCommand({
471
532
 
472
533
  ---
473
534
 
474
- ## 📝 TypeScript Support
535
+ ## TypeScript Support
475
536
 
476
537
  ### Full Type Definitions
477
538
 
@@ -505,7 +566,7 @@ const myCommand: AssistantCommand = {
505
566
 
506
567
  ---
507
568
 
508
- ## 🎯 Best Practices
569
+ ## Best Practices
509
570
 
510
571
  ### 1. Command Naming
511
572
 
@@ -571,7 +632,7 @@ export class MyComponent {
571
632
 
572
633
  ---
573
634
 
574
- ## 🧪 Testing
635
+ ## Testing
575
636
 
576
637
  ### Unit Testing Commands
577
638
 
@@ -606,7 +667,7 @@ describe('AssistantService', () => {
606
667
 
607
668
  ---
608
669
 
609
- ## Related Packages
670
+ ## Related Packages
610
671
 
611
672
  - **[@foisit/core](../core)** - Core engine (auto-installed)
612
673
  - **[@foisit/react-wrapper](../react-wrapper)** - React integration
@@ -614,7 +675,7 @@ describe('AssistantService', () => {
614
675
 
615
676
  ---
616
677
 
617
- ## 🐛 Troubleshooting
678
+ ## Troubleshooting
618
679
 
619
680
  ### Assistant not appearing
620
681
 
@@ -630,24 +691,24 @@ Make sure you're using Angular 17+ and have `@angular/core` installed.
630
691
 
631
692
  ---
632
693
 
633
- ## 📄 License
694
+ ## License
634
695
 
635
696
  MIT © [Foisit](https://github.com/boluwatifee4/foisit)
636
697
 
637
698
  ---
638
699
 
639
- ## 🤝 Contributing
700
+ ## Contributing
640
701
 
641
702
  Contributions are welcome! Please read our [Contributing Guide](../../CONTRIBUTING.md) first.
642
703
 
643
704
  ---
644
705
 
645
- ## 📬 Support
706
+ ## Support
646
707
 
647
- - 📧 Email: support@foisit.com
648
- - 💬 Discord: [Join our community](https://discord.gg/foisit)
649
- - 🐛 Issues: [GitHub Issues](https://github.com/boluwatifee4/foisit/issues)
708
+ - Email: support@foisit.com
709
+ - Discord: [Join our community](https://discord.gg/foisit)
710
+ - Issues: [GitHub Issues](https://github.com/boluwatifee4/foisit/issues)
650
711
 
651
712
  ---
652
713
 
653
- **Made with ❤️ by the Foisit Team**
714
+ **Made by the Foisit Team**
@@ -0,0 +1,288 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Inject, Injectable, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { CommandHandler, FallbackHandler, VoiceProcessor, TextToSpeech, StateManager, GestureHandler, OverlayManager } from '@foisit/core';
5
+
6
+ class AngularWrapperComponent {
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AngularWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: AngularWrapperComponent, isStandalone: true, selector: "lib-angular-wrapper", ngImport: i0, template: "<p>AngularWrapper works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AngularWrapperComponent, decorators: [{
11
+ type: Component,
12
+ args: [{ selector: 'lib-angular-wrapper', imports: [CommonModule], template: "<p>AngularWrapper works!</p>\n" }]
13
+ }] });
14
+
15
+ class AssistantService {
16
+ config;
17
+ commandHandler;
18
+ fallbackHandler;
19
+ voiceProcessor;
20
+ textToSpeech;
21
+ stateManager;
22
+ lastProcessedInput = '';
23
+ processingLock = false;
24
+ isActivated = false; // Tracks activation status
25
+ gestureHandler;
26
+ overlayManager;
27
+ defaultIntroMessage = 'How can I help you?';
28
+ constructor(config) {
29
+ this.config = config;
30
+ // Pass enableSmartIntent (default true) and potential apiKey (if we add it to config later)
31
+ this.commandHandler = new CommandHandler({
32
+ enableSmartIntent: this.config.enableSmartIntent !== false,
33
+ intentEndpoint: this.config.intentEndpoint,
34
+ });
35
+ this.fallbackHandler = new FallbackHandler();
36
+ this.voiceProcessor = new VoiceProcessor();
37
+ this.textToSpeech = new TextToSpeech();
38
+ this.stateManager = new StateManager();
39
+ this.gestureHandler = new GestureHandler();
40
+ this.overlayManager = new OverlayManager({
41
+ floatingButton: this.config.floatingButton,
42
+ inputPlaceholder: this.config.inputPlaceholder,
43
+ });
44
+ // Setup commands from config
45
+ this.config.commands.forEach((cmd) => this.commandHandler.addCommand(cmd));
46
+ // Setup fallback response
47
+ if (this.config.fallbackResponse) {
48
+ this.fallbackHandler.setFallbackMessage(this.config.fallbackResponse);
49
+ }
50
+ // Voice disabled for text-first pivot
51
+ // this.startListening();
52
+ // Setup double-tap/double-click listener
53
+ this.gestureHandler.setupDoubleTapListener(() => this.toggle());
54
+ // Register global callbacks for floating button
55
+ this.overlayManager.registerCallbacks(async (input) => {
56
+ if (typeof input === 'string') {
57
+ this.overlayManager.addMessage(input, 'user');
58
+ }
59
+ else if (input && typeof input === 'object') {
60
+ const label = this.extractUserLabel(input);
61
+ if (label) {
62
+ this.overlayManager.addMessage(label, 'user');
63
+ }
64
+ }
65
+ await this.handleCommand(input);
66
+ }, () => console.log('AssistantService: Overlay closed.'));
67
+ }
68
+ /** Start listening for activation and commands */
69
+ startListening() {
70
+ // Voice is currently disabled (text-only mode)
71
+ console.log('AssistantService: Voice is disabled; startListening() is a no-op.');
72
+ return;
73
+ /*
74
+ this.voiceProcessor.startListening(async (transcript: string) => {
75
+ if (this.processingLock) return;
76
+
77
+ const normalizedTranscript = transcript.toLowerCase().trim();
78
+
79
+ // Skip repeated or irrelevant inputs
80
+ if (
81
+ !normalizedTranscript ||
82
+ normalizedTranscript.length < 3 ||
83
+ normalizedTranscript === this.lastProcessedInput
84
+ ) {
85
+ console.log('AssistantService: Ignoring irrelevant input.');
86
+ return;
87
+ }
88
+
89
+ this.lastProcessedInput = normalizedTranscript;
90
+
91
+ if (!this.isActivated) {
92
+ await this.processActivation(normalizedTranscript);
93
+ return;
94
+ }
95
+
96
+ const isFallbackOrIntroMessage =
97
+ normalizedTranscript === this.config.fallbackResponse?.toLowerCase() ||
98
+ normalizedTranscript === this.config.introMessage?.toLowerCase() ||
99
+ normalizedTranscript === this.defaultIntroMessage.toLowerCase();
100
+
101
+ if (!isFallbackOrIntroMessage) {
102
+ await this.handleCommand(normalizedTranscript);
103
+ } else {
104
+ console.log('AssistantService: Ignoring fallback or intro message.');
105
+ }
106
+
107
+ // Throttle input processing to prevent rapid feedback
108
+ this.processingLock = true;
109
+ setTimeout(() => (this.processingLock = false), 1000);
110
+ });
111
+ */
112
+ }
113
+ /** Stop listening for voice input */
114
+ stopListening() {
115
+ // Voice is currently disabled (text-only mode)
116
+ console.log('AssistantService: Voice is disabled; stopListening() is a no-op.');
117
+ this.isActivated = false;
118
+ }
119
+ /** Reset activation state so the next activation flow can occur. */
120
+ reactivate() {
121
+ console.log('AssistantService: Reactivating assistant...');
122
+ this.isActivated = false;
123
+ try {
124
+ this.startListening();
125
+ }
126
+ catch {
127
+ // no-op
128
+ }
129
+ }
130
+ /** Process activation command */
131
+ async processActivation(transcript) {
132
+ const activationCmd = this.config.activationCommand?.toLowerCase();
133
+ // If no activation command is set, we can't activate via voice
134
+ if (!activationCmd)
135
+ return;
136
+ if (transcript === activationCmd) {
137
+ console.log('AssistantService: Activation matched.');
138
+ this.isActivated = true;
139
+ this.textToSpeech.speak(this.config.introMessage || this.defaultIntroMessage);
140
+ // this.stateManager.setState('listening'); // DISABLED - no gradient animation
141
+ }
142
+ else {
143
+ console.log('AssistantService: Activation command not recognized.');
144
+ }
145
+ }
146
+ /** Handle recognized commands */
147
+ async handleCommand(input) {
148
+ this.overlayManager.showLoading();
149
+ let response;
150
+ try {
151
+ response = await this.commandHandler.executeCommand(input);
152
+ }
153
+ finally {
154
+ this.overlayManager.hideLoading();
155
+ }
156
+ const originalText = typeof input === 'string' ? input : undefined;
157
+ this.processResponse(response, originalText);
158
+ }
159
+ /**
160
+ * Cleanup resources
161
+ */
162
+ destroy() {
163
+ this.voiceProcessor.stopListening();
164
+ this.gestureHandler.destroy();
165
+ this.overlayManager.destroy();
166
+ }
167
+ /** Unified response processing */
168
+ processResponse(response, originalText) {
169
+ if (response.type === 'error' && originalText) {
170
+ this.fallbackHandler.handleFallback(originalText);
171
+ this.overlayManager.addMessage(this.fallbackHandler.getFallbackMessage(), 'system');
172
+ return;
173
+ }
174
+ if (response.type === 'form' && response.fields) {
175
+ this.overlayManager.addForm(response.message, response.fields, async (data) => {
176
+ this.overlayManager.showLoading();
177
+ let nextReponse;
178
+ try {
179
+ nextReponse = await this.commandHandler.executeCommand(data);
180
+ }
181
+ finally {
182
+ this.overlayManager.hideLoading();
183
+ }
184
+ this.processResponse(nextReponse);
185
+ });
186
+ return;
187
+ }
188
+ if ((response.type === 'ambiguous' || response.type === 'confirm') && response.options) {
189
+ if (response.message) {
190
+ this.overlayManager.addMessage(response.message, 'system');
191
+ }
192
+ this.overlayManager.addOptions(response.options);
193
+ return;
194
+ }
195
+ if (response.message) {
196
+ this.overlayManager.addMessage(response.message, 'system');
197
+ }
198
+ }
199
+ /** Add a command dynamically (supports string or rich object) */
200
+ addCommand(commandOrObj, action) {
201
+ if (typeof commandOrObj === 'string') {
202
+ console.log(`AssistantService: Adding command "${commandOrObj}".`);
203
+ }
204
+ else {
205
+ console.log(`AssistantService: Adding rich command "${commandOrObj.command}".`);
206
+ }
207
+ this.commandHandler.addCommand(commandOrObj, action);
208
+ }
209
+ /** Remove a command dynamically */
210
+ removeCommand(command) {
211
+ console.log(`AssistantService: Removing command "${command}".`);
212
+ this.commandHandler.removeCommand(command);
213
+ }
214
+ /** Get all registered commands */
215
+ getCommands() {
216
+ return this.commandHandler.getCommands();
217
+ }
218
+ /** Toggle the assistant overlay */
219
+ toggle(onSubmit, onClose) {
220
+ console.log('AssistantService: Toggling overlay...');
221
+ this.overlayManager.toggle(async (input) => {
222
+ if (typeof input === 'string') {
223
+ this.overlayManager.addMessage(input, 'user');
224
+ }
225
+ else if (input && typeof input === 'object') {
226
+ const label = this.extractUserLabel(input);
227
+ if (label) {
228
+ this.overlayManager.addMessage(label, 'user');
229
+ }
230
+ }
231
+ if (onSubmit)
232
+ onSubmit(input);
233
+ await this.handleCommand(input);
234
+ }, () => {
235
+ console.log('AssistantService: Overlay closed.');
236
+ if (onClose)
237
+ onClose();
238
+ });
239
+ }
240
+ extractUserLabel(payload) {
241
+ const label = payload['label'];
242
+ if (typeof label === 'string' && label.trim()) {
243
+ return label.trim();
244
+ }
245
+ const commandId = payload['commandId'];
246
+ if (typeof commandId === 'string' && commandId.trim()) {
247
+ return commandId.trim();
248
+ }
249
+ return null;
250
+ }
251
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AssistantService, deps: [{ token: 'ASSISTANT_CONFIG' }], target: i0.ɵɵFactoryTarget.Injectable });
252
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AssistantService, providedIn: 'root' });
253
+ }
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AssistantService, decorators: [{
255
+ type: Injectable,
256
+ args: [{
257
+ providedIn: 'root',
258
+ }]
259
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
260
+ type: Inject,
261
+ args: ['ASSISTANT_CONFIG']
262
+ }] }] });
263
+
264
+ class AssistantModule {
265
+ static forRoot(config) {
266
+ return {
267
+ ngModule: AssistantModule,
268
+ providers: [
269
+ { provide: 'ASSISTANT_CONFIG', useValue: config },
270
+ AssistantService,
271
+ ],
272
+ };
273
+ }
274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AssistantModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
275
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: AssistantModule });
276
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AssistantModule });
277
+ }
278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: AssistantModule, decorators: [{
279
+ type: NgModule,
280
+ args: [{}]
281
+ }] });
282
+
283
+ /**
284
+ * Generated bundle index. Do not edit.
285
+ */
286
+
287
+ export { AngularWrapperComponent, AssistantModule, AssistantService };
288
+ //# sourceMappingURL=foisit-angular-wrapper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foisit-angular-wrapper.mjs","sources":["../../../../libs/angular-wrapper/src/lib/angular-wrapper/angular-wrapper.component.ts","../../../../libs/angular-wrapper/src/lib/angular-wrapper/angular-wrapper.component.html","../../../../libs/angular-wrapper/src/lib/service/assistant.service.ts","../../../../libs/angular-wrapper/src/lib/assistant.module.ts","../../../../libs/angular-wrapper/src/foisit-angular-wrapper.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'lib-angular-wrapper',\n imports: [CommonModule],\n templateUrl: './angular-wrapper.component.html',\n styleUrl: './angular-wrapper.component.css',\n})\nexport class AngularWrapperComponent {}\n","<p>AngularWrapper works!</p>\n","import { Injectable, Inject } from '@angular/core';\nimport {\n CommandHandler,\n FallbackHandler,\n VoiceProcessor,\n StateManager,\n AssistantConfig,\n TextToSpeech,\n GestureHandler,\n OverlayManager,\n AssistantCommand,\n AssistantCommandParams,\n InteractiveResponse,\n} from '@foisit/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AssistantService {\n private commandHandler: CommandHandler;\n private fallbackHandler: FallbackHandler;\n private voiceProcessor: VoiceProcessor;\n private textToSpeech: TextToSpeech;\n private stateManager: StateManager;\n private lastProcessedInput = '';\n private processingLock = false;\n private isActivated = false; // Tracks activation status\n private gestureHandler: GestureHandler;\n private overlayManager: OverlayManager;\n private defaultIntroMessage = 'How can I help you?';\n\n constructor(@Inject('ASSISTANT_CONFIG') private config: AssistantConfig) {\n // Pass enableSmartIntent (default true) and potential apiKey (if we add it to config later)\n this.commandHandler = new CommandHandler({\n enableSmartIntent: this.config.enableSmartIntent !== false,\n intentEndpoint: this.config.intentEndpoint,\n });\n this.fallbackHandler = new FallbackHandler();\n this.voiceProcessor = new VoiceProcessor();\n this.textToSpeech = new TextToSpeech();\n this.stateManager = new StateManager();\n this.gestureHandler = new GestureHandler();\n this.overlayManager = new OverlayManager({\n floatingButton: this.config.floatingButton,\n inputPlaceholder: this.config.inputPlaceholder,\n });\n\n // Setup commands from config\n this.config.commands.forEach((cmd) => this.commandHandler.addCommand(cmd));\n\n // Setup fallback response\n if (this.config.fallbackResponse) {\n this.fallbackHandler.setFallbackMessage(this.config.fallbackResponse);\n }\n\n // Voice disabled for text-first pivot\n // this.startListening();\n\n // Setup double-tap/double-click listener\n this.gestureHandler.setupDoubleTapListener(() => this.toggle());\n\n // Register global callbacks for floating button\n this.overlayManager.registerCallbacks(\n async (input) => {\n if (typeof input === 'string') {\n this.overlayManager.addMessage(input, 'user');\n } else if (input && typeof input === 'object') {\n const label = this.extractUserLabel(input as Record<string, unknown>);\n if (label) {\n this.overlayManager.addMessage(label, 'user');\n }\n }\n\n await this.handleCommand(input);\n },\n () => console.log('AssistantService: Overlay closed.')\n );\n }\n\n /** Start listening for activation and commands */\n startListening(): void {\n // Voice is currently disabled (text-only mode)\n console.log('AssistantService: Voice is disabled; startListening() is a no-op.');\n return;\n\n /*\n this.voiceProcessor.startListening(async (transcript: string) => {\n if (this.processingLock) return;\n\n const normalizedTranscript = transcript.toLowerCase().trim();\n\n // Skip repeated or irrelevant inputs\n if (\n !normalizedTranscript ||\n normalizedTranscript.length < 3 ||\n normalizedTranscript === this.lastProcessedInput\n ) {\n console.log('AssistantService: Ignoring irrelevant input.');\n return;\n }\n\n this.lastProcessedInput = normalizedTranscript;\n\n if (!this.isActivated) {\n await this.processActivation(normalizedTranscript);\n return;\n }\n\n const isFallbackOrIntroMessage =\n normalizedTranscript === this.config.fallbackResponse?.toLowerCase() ||\n normalizedTranscript === this.config.introMessage?.toLowerCase() ||\n normalizedTranscript === this.defaultIntroMessage.toLowerCase();\n\n if (!isFallbackOrIntroMessage) {\n await this.handleCommand(normalizedTranscript);\n } else {\n console.log('AssistantService: Ignoring fallback or intro message.');\n }\n\n // Throttle input processing to prevent rapid feedback\n this.processingLock = true;\n setTimeout(() => (this.processingLock = false), 1000);\n });\n */\n }\n\n /** Stop listening for voice input */\n stopListening(): void {\n // Voice is currently disabled (text-only mode)\n console.log('AssistantService: Voice is disabled; stopListening() is a no-op.');\n this.isActivated = false;\n }\n\n /** Reset activation state so the next activation flow can occur. */\n reactivate(): void {\n console.log('AssistantService: Reactivating assistant...');\n this.isActivated = false;\n try {\n this.startListening();\n } catch {\n // no-op\n }\n }\n\n /** Process activation command */\n private async processActivation(transcript: string): Promise<void> {\n const activationCmd = this.config.activationCommand?.toLowerCase();\n\n // If no activation command is set, we can't activate via voice\n if (!activationCmd) return;\n\n if (transcript === activationCmd) {\n console.log('AssistantService: Activation matched.');\n this.isActivated = true;\n this.textToSpeech.speak(\n this.config.introMessage || this.defaultIntroMessage\n );\n // this.stateManager.setState('listening'); // DISABLED - no gradient animation\n } else {\n console.log('AssistantService: Activation command not recognized.');\n }\n }\n\n /** Handle recognized commands */\n private async handleCommand(\n input: string | Record<string, unknown>\n ): Promise<void> {\n this.overlayManager.showLoading();\n let response: InteractiveResponse;\n try {\n response = await this.commandHandler.executeCommand(input);\n } finally {\n this.overlayManager.hideLoading();\n }\n\n const originalText = typeof input === 'string' ? input : undefined;\n this.processResponse(response, originalText);\n }\n\n /**\n * Cleanup resources\n */\n destroy(): void {\n this.voiceProcessor.stopListening();\n this.gestureHandler.destroy();\n this.overlayManager.destroy();\n }\n\n /** Unified response processing */\n private processResponse(\n response: InteractiveResponse,\n originalText?: string\n ): void {\n if (response.type === 'error' && originalText) {\n this.fallbackHandler.handleFallback(originalText);\n this.overlayManager.addMessage(this.fallbackHandler.getFallbackMessage(), 'system');\n return;\n }\n\n if (response.type === 'form' && response.fields) {\n this.overlayManager.addForm(\n response.message,\n response.fields,\n async (data: Record<string, unknown>) => {\n this.overlayManager.showLoading();\n let nextReponse: InteractiveResponse;\n try {\n nextReponse = await this.commandHandler.executeCommand(data);\n } finally {\n this.overlayManager.hideLoading();\n }\n this.processResponse(nextReponse);\n }\n );\n return;\n }\n\n if ((response.type === 'ambiguous' || response.type === 'confirm') && response.options) {\n if (response.message) {\n this.overlayManager.addMessage(response.message, 'system');\n }\n this.overlayManager.addOptions(response.options);\n return;\n }\n\n if (response.message) {\n this.overlayManager.addMessage(response.message, 'system');\n }\n }\n\n /** Add a command dynamically (supports string or rich object) */\n addCommand(\n commandOrObj: string | AssistantCommand,\n action?: (\n params?: AssistantCommandParams\n ) => Promise<string | InteractiveResponse | void> | void\n ): void {\n if (typeof commandOrObj === 'string') {\n console.log(`AssistantService: Adding command \"${commandOrObj}\".`);\n } else {\n console.log(\n `AssistantService: Adding rich command \"${commandOrObj.command}\".`\n );\n }\n this.commandHandler.addCommand(commandOrObj, action);\n }\n\n /** Remove a command dynamically */\n removeCommand(command: string): void {\n console.log(`AssistantService: Removing command \"${command}\".`);\n this.commandHandler.removeCommand(command);\n }\n\n /** Get all registered commands */\n getCommands(): string[] {\n return this.commandHandler.getCommands();\n }\n\n /** Toggle the assistant overlay */\n toggle(\n onSubmit?: (input: string | Record<string, unknown>) => void,\n onClose?: () => void\n ): void {\n console.log('AssistantService: Toggling overlay...');\n this.overlayManager.toggle(\n async (input) => {\n if (typeof input === 'string') {\n this.overlayManager.addMessage(input, 'user');\n } else if (input && typeof input === 'object') {\n const label = this.extractUserLabel(input);\n if (label) {\n this.overlayManager.addMessage(label, 'user');\n }\n }\n\n if (onSubmit) onSubmit(input);\n await this.handleCommand(input);\n },\n () => {\n console.log('AssistantService: Overlay closed.');\n if (onClose) onClose();\n }\n );\n }\n\n private extractUserLabel(payload: Record<string, unknown>): string | null {\n const label = payload['label'];\n if (typeof label === 'string' && label.trim()) {\n return label.trim();\n }\n\n const commandId = payload['commandId'];\n if (typeof commandId === 'string' && commandId.trim()) {\n return commandId.trim();\n }\n\n return null;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { AssistantService } from './service/assistant.service';\nimport { AssistantConfig } from '@foisit/core';\n\n@NgModule({})\nexport class AssistantModule {\n static forRoot(config: AssistantConfig): ModuleWithProviders<AssistantModule> {\n return {\n ngModule: AssistantModule,\n providers: [\n { provide: 'ASSISTANT_CONFIG', useValue: config },\n AssistantService,\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;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A,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAcc,MAAM;2BAAC,kBAAkB;;;MC1B3B,eAAe,CAAA;IAC1B,OAAO,OAAO,CAAC,MAAuB,EAAA;QACpC,OAAO;AACL,YAAA,QAAQ,EAAE,eAAe;AACzB,YAAA,SAAS,EAAE;AACT,gBAAA,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE;gBACjD,gBAAgB;AACjB,aAAA;SACF;IACH;uGATW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,CAAA;wGAAf,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,QAAQ;mBAAC,EAAE;;;ACJZ;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './lib/angular-wrapper/angular-wrapper.component';
2
+ export * from './lib/service/assistant.service';
3
+ export * from './lib/assistant.module';
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@foisit/angular-wrapper",
3
- "version": "2.1.1",
3
+ "version": "2.4.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
7
7
  },
8
8
  "sideEffects": false,
9
9
  "files": [
10
- "dist",
10
+ "fesm2022",
11
+ "esm2022",
12
+ "index.d.ts",
11
13
  "README.md"
12
14
  ],
13
15
  "description": "Foisit: Speak, and its done. A voice assistant library for angular apps",