maquito-chat-plugin 1.0.0
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 +73 -0
- package/fesm2022/maquito-chat-plugin.mjs +970 -0
- package/fesm2022/maquito-chat-plugin.mjs.map +1 -0
- package/package.json +46 -0
- package/types/maquito-chat-plugin.d.ts +187 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Maquito Chat Plugin
|
|
2
|
+
|
|
3
|
+
> Widget de chat flotante inteligente para aplicaciones Angular — impulsado por [Maquito Core](https://github.com/INDESAD/TGLR_INTELLIGENCE).
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install maquito-chat-plugin
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Requisitos
|
|
12
|
+
|
|
13
|
+
| Dependencia | Versión |
|
|
14
|
+
| ----------- | --------- |
|
|
15
|
+
| Angular | `^21.0.0` |
|
|
16
|
+
| marked | `>=9.0.0` |
|
|
17
|
+
|
|
18
|
+
## Uso rápido
|
|
19
|
+
|
|
20
|
+
### 1. Importar el componente
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { IntelligentChatPluginComponent } from "maquito-chat-plugin";
|
|
24
|
+
|
|
25
|
+
@Component({
|
|
26
|
+
standalone: true,
|
|
27
|
+
imports: [IntelligentChatPluginComponent],
|
|
28
|
+
template: ` <maquito-chat-plugin [config]="chatConfig" /> `,
|
|
29
|
+
})
|
|
30
|
+
export class AppComponent {
|
|
31
|
+
chatConfig = {
|
|
32
|
+
apiUrl: "https://your-api.com/api",
|
|
33
|
+
systemId: "your-system-id",
|
|
34
|
+
token: "your-api-key",
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Configuración
|
|
40
|
+
|
|
41
|
+
| Propiedad | Tipo | Default | Descripción |
|
|
42
|
+
| ------------- | --------------------------------- | ------------------------------- | ------------------------------------------------- |
|
|
43
|
+
| `apiUrl` | `string` | **requerido** | URL base de la API Maquito Core |
|
|
44
|
+
| `systemId` | `string` | **requerido** | ID del sistema satélite |
|
|
45
|
+
| `token` | `string` | **requerido** | API key (enviado como `X-Api-Key`) |
|
|
46
|
+
| `title` | `string` | `'Maquito Chat'` | Título del panel de chat |
|
|
47
|
+
| `placeholder` | `string` | `'Escribe tu consulta aquí...'` | Placeholder del input |
|
|
48
|
+
| `position` | `'bottom-right' \| 'bottom-left'` | `'bottom-right'` | Posición del botón flotante |
|
|
49
|
+
| `bubbleIcon` | `string` | `'🤖'` | Emoji/texto del botón |
|
|
50
|
+
| `theme` | `Partial<PluginTheme>` | — | Personalización de colores CSS |
|
|
51
|
+
| `userName` | `string` | — | Nombre del usuario para respuestas personalizadas |
|
|
52
|
+
| `personality` | `string` | — | Instrucciones de personalidad del AI |
|
|
53
|
+
|
|
54
|
+
Para la lista completa de opciones, ver la interfaz `IntelligentChatConfig`.
|
|
55
|
+
|
|
56
|
+
### 3. Servicio programático
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { IntelligentChatService } from 'maquito-chat-plugin';
|
|
60
|
+
|
|
61
|
+
@Component({ ... })
|
|
62
|
+
export class MyComponent {
|
|
63
|
+
private chat = inject(IntelligentChatService);
|
|
64
|
+
|
|
65
|
+
openChat() {
|
|
66
|
+
this.chat.toggle();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Licencia
|
|
72
|
+
|
|
73
|
+
MIT © [INDESAD](https://github.com/INDESAD)
|