@asgard-js/react 0.0.4 → 0.0.6
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 +206 -4
- package/dist/components/chatbot/chatbot-body.d.ts +4 -0
- package/dist/components/chatbot/chatbot-body.d.ts.map +1 -0
- package/dist/components/chatbot/chatbot-footer/chatbot-footer.d.ts +4 -0
- package/dist/components/chatbot/chatbot-footer/chatbot-footer.d.ts.map +1 -0
- package/dist/components/chatbot/chatbot-footer/index.d.ts +2 -0
- package/dist/components/chatbot/chatbot-footer/index.d.ts.map +1 -0
- package/dist/components/chatbot/chatbot-footer/speech-input-button.d.ts +9 -0
- package/dist/components/chatbot/chatbot-footer/speech-input-button.d.ts.map +1 -0
- package/dist/components/chatbot/chatbot-header.d.ts +10 -0
- package/dist/components/chatbot/chatbot-header.d.ts.map +1 -0
- package/dist/components/chatbot/chatbot.d.ts +20 -0
- package/dist/components/chatbot/chatbot.d.ts.map +1 -0
- package/dist/components/chatbot/profile-icon.d.ts +8 -0
- package/dist/components/chatbot/profile-icon.d.ts.map +1 -0
- package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts +9 -0
- package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts.map +1 -0
- package/dist/components/conversation-message-renderer/index.d.ts +2 -0
- package/dist/components/conversation-message-renderer/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/templates/avatar/avatar.d.ts +8 -0
- package/dist/components/templates/avatar/avatar.d.ts.map +1 -0
- package/dist/components/templates/avatar/index.d.ts +2 -0
- package/dist/components/templates/avatar/index.d.ts.map +1 -0
- package/dist/components/templates/bot-typing-box/bot-typing-box.d.ts +9 -0
- package/dist/components/templates/bot-typing-box/bot-typing-box.d.ts.map +1 -0
- package/dist/components/templates/bot-typing-box/bot-typing-placeholder.d.ts +8 -0
- package/dist/components/templates/bot-typing-box/bot-typing-placeholder.d.ts.map +1 -0
- package/dist/components/templates/bot-typing-box/index.d.ts +3 -0
- package/dist/components/templates/bot-typing-box/index.d.ts.map +1 -0
- package/dist/components/templates/bot-typing-box/resize-observer-box.d.ts +9 -0
- package/dist/components/templates/bot-typing-box/resize-observer-box.d.ts.map +1 -0
- package/dist/components/templates/button-template/button-template.d.ts +9 -0
- package/dist/components/templates/button-template/button-template.d.ts.map +1 -0
- package/dist/components/templates/button-template/card.d.ts +9 -0
- package/dist/components/templates/button-template/card.d.ts.map +1 -0
- package/dist/components/templates/button-template/index.d.ts +2 -0
- package/dist/components/templates/button-template/index.d.ts.map +1 -0
- package/dist/components/templates/carousel-template/carousel-template.d.ts +9 -0
- package/dist/components/templates/carousel-template/carousel-template.d.ts.map +1 -0
- package/dist/components/templates/carousel-template/index.d.ts +2 -0
- package/dist/components/templates/carousel-template/index.d.ts.map +1 -0
- package/dist/components/templates/hint-template/hint-template.d.ts +9 -0
- package/dist/components/templates/hint-template/hint-template.d.ts.map +1 -0
- package/dist/components/templates/hint-template/index.d.ts +2 -0
- package/dist/components/templates/hint-template/index.d.ts.map +1 -0
- package/dist/components/templates/index.d.ts +8 -0
- package/dist/components/templates/index.d.ts.map +1 -0
- package/dist/components/templates/quick-replies/index.d.ts +2 -0
- package/dist/components/templates/quick-replies/index.d.ts.map +1 -0
- package/dist/components/templates/quick-replies/quick-replies.d.ts +10 -0
- package/dist/components/templates/quick-replies/quick-replies.d.ts.map +1 -0
- package/dist/components/templates/template-box/index.d.ts +3 -0
- package/dist/components/templates/template-box/index.d.ts.map +1 -0
- package/dist/components/templates/template-box/template-box-content.d.ts +12 -0
- package/dist/components/templates/template-box/template-box-content.d.ts.map +1 -0
- package/dist/components/templates/template-box/template-box.d.ts +14 -0
- package/dist/components/templates/template-box/template-box.d.ts.map +1 -0
- package/dist/components/templates/text-template/index.d.ts +2 -0
- package/dist/components/templates/text-template/index.d.ts.map +1 -0
- package/dist/components/templates/text-template/text-template.d.ts +9 -0
- package/dist/components/templates/text-template/text-template.d.ts.map +1 -0
- package/dist/components/templates/time/index.d.ts +2 -0
- package/dist/components/templates/time/index.d.ts.map +1 -0
- package/dist/components/templates/time/time.d.ts +9 -0
- package/dist/components/templates/time/time.d.ts.map +1 -0
- package/dist/context/asgard-service-context.d.ts +35 -0
- package/dist/context/asgard-service-context.d.ts.map +1 -0
- package/dist/context/asgard-theme-context.d.ts +17 -0
- package/dist/context/asgard-theme-context.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-asgard-service-client.d.ts +8 -0
- package/dist/hooks/use-asgard-service-client.d.ts.map +1 -0
- package/dist/hooks/use-channel.d.ts +21 -0
- package/dist/hooks/use-channel.d.ts.map +1 -0
- package/dist/hooks/use-debounce.d.ts +2 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +470 -473
- package/dist/style.css +1 -1
- package/dist/utils/deep-merge.d.ts +3 -0
- package/dist/utils/deep-merge.d.ts.map +1 -0
- package/dist/utils/format-time.d.ts +2 -0
- package/dist/utils/format-time.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,209 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AsgardJs React
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This package provides React components and hooks for integrating with the Asgard AI platform, allowing you to build interactive chat interfaces.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
To install the React package, use the following command:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
yarn add @asgard-js/core @asgard-js/react
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Here's a basic example of how to use the React components:
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { Chatbot } from '@asgard-js/react';
|
|
20
|
+
|
|
21
|
+
const App = () => {
|
|
22
|
+
return (
|
|
23
|
+
<Chatbot
|
|
24
|
+
title="Asgard AI Chatbot"
|
|
25
|
+
config={{
|
|
26
|
+
apiKey: 'your-api-key',
|
|
27
|
+
endpoint: 'https://api.asgard-ai.com',
|
|
28
|
+
onExecutionError: (error) => {
|
|
29
|
+
console.error('Execution error:', error);
|
|
30
|
+
},
|
|
31
|
+
transformSsePayload: (payload) => {
|
|
32
|
+
return payload;
|
|
33
|
+
}
|
|
34
|
+
}}
|
|
35
|
+
customChannelId="your-channel-id"
|
|
36
|
+
initMessages={[]}
|
|
37
|
+
debugMode={false}
|
|
38
|
+
fullScreen={false}
|
|
39
|
+
avatar="https://example.com/avatar.png"
|
|
40
|
+
botTypingPlaceholder="Bot is typing..."
|
|
41
|
+
onReset={() => {
|
|
42
|
+
console.log('Chat reset');
|
|
43
|
+
}}
|
|
44
|
+
onClose={() => {
|
|
45
|
+
console.log('Chat closed');
|
|
46
|
+
}}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default App;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Chatbot Component Props
|
|
55
|
+
|
|
56
|
+
- **title**: `string` - The title of the chatbot.
|
|
57
|
+
- **config**: `ClientConfig` - Configuration object for the Asgard service client, including:
|
|
58
|
+
- `apiKey`: `string` (required) - API key for authentication
|
|
59
|
+
- `endpoint`: `string` (required) - API endpoint URL
|
|
60
|
+
- `onExecutionError?`: `(error: ErrorEventData) => void` - Error handler for execution errors
|
|
61
|
+
- `transformSsePayload?`: `(payload: FetchSsePayload) => FetchSsePayload` - SSE payload transformer
|
|
62
|
+
- **customChannelId**: `string` - Custom channel identifier for the chat session
|
|
63
|
+
- **initMessages**: `ConversationMessage[]` - Initial messages to display in the chat
|
|
64
|
+
- **debugMode**: `boolean` - Enable debug mode, defaults to `false`
|
|
65
|
+
- **fullScreen**: `boolean` - Display chatbot in full screen mode, defaults to `false`
|
|
66
|
+
- **avatar**: `string` - URL for the chatbot's avatar image
|
|
67
|
+
- **botTypingPlaceholder**: `string` - Text to display while the bot is typing
|
|
68
|
+
- **theme**: `Partial<AsgardThemeContextValue>` - Custom theme configuration
|
|
69
|
+
- **onReset**: `() => void` - Callback function when chat is reset
|
|
70
|
+
- **onClose**: `() => void` - Callback function when chat is closed
|
|
71
|
+
|
|
72
|
+
### Theme Configuration
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
interface AsgardThemeContextValue {
|
|
76
|
+
chatbot: {
|
|
77
|
+
width?: string;
|
|
78
|
+
height?: string;
|
|
79
|
+
maxWidth?: string;
|
|
80
|
+
minWidth?: string;
|
|
81
|
+
maxHeight?: string;
|
|
82
|
+
minHeight?: string;
|
|
83
|
+
backgroundColor?: string;
|
|
84
|
+
borderColor?: string;
|
|
85
|
+
borderRadius?: string;
|
|
86
|
+
contentMaxWidth?: string;
|
|
87
|
+
};
|
|
88
|
+
botMessage: {
|
|
89
|
+
color?: string;
|
|
90
|
+
backgroundColor?: string;
|
|
91
|
+
};
|
|
92
|
+
userMessage: {
|
|
93
|
+
color?: string;
|
|
94
|
+
backgroundColor?: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Default Theme
|
|
100
|
+
|
|
101
|
+
The default theme uses CSS variables for consistent styling:
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
const defaultTheme = {
|
|
105
|
+
chatbot: {
|
|
106
|
+
width: '375px',
|
|
107
|
+
height: '640px',
|
|
108
|
+
backgroundColor: 'var(--asg-color-bg)',
|
|
109
|
+
borderColor: 'var(--asg-color-border)',
|
|
110
|
+
borderRadius: 'var(--asg-radius-md)',
|
|
111
|
+
contentMaxWidth: '1200px',
|
|
112
|
+
},
|
|
113
|
+
botMessage: {
|
|
114
|
+
color: 'var(--asg-color-text)',
|
|
115
|
+
backgroundColor: 'var(--asg-color-secondary)',
|
|
116
|
+
},
|
|
117
|
+
userMessage: {
|
|
118
|
+
color: 'var(--asg-color-text)',
|
|
119
|
+
backgroundColor: 'var(--asg-color-primary)',
|
|
120
|
+
},
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Usage Example
|
|
125
|
+
|
|
126
|
+
```javascript
|
|
127
|
+
const App = () => {
|
|
128
|
+
const customTheme = {
|
|
129
|
+
chatbot: {
|
|
130
|
+
width: '400px',
|
|
131
|
+
height: '600px',
|
|
132
|
+
backgroundColor: '#ffffff',
|
|
133
|
+
borderRadius: '12px',
|
|
134
|
+
},
|
|
135
|
+
botMessage: {
|
|
136
|
+
backgroundColor: '#f0f0f0',
|
|
137
|
+
},
|
|
138
|
+
userMessage: {
|
|
139
|
+
backgroundColor: '#007bff',
|
|
140
|
+
color: '#ffffff',
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
<Chatbot
|
|
146
|
+
// ... other props
|
|
147
|
+
theme={customTheme}
|
|
148
|
+
/>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Note: When `fullScreen` prop is set to `true`, the chatbot's width and height will be set to `100vw` and `100vh` respectively, and `borderRadius` will be set to zero, regardless of theme settings.
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
To develop the React package locally, follow these steps:
|
|
158
|
+
|
|
159
|
+
1. Clone the repository and navigate to the project root directory.
|
|
160
|
+
|
|
161
|
+
2. Install dependencies:
|
|
162
|
+
```sh
|
|
163
|
+
yarn install
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
3. Start development:
|
|
167
|
+
|
|
168
|
+
You can use the following commands to work with the React package:
|
|
169
|
+
|
|
170
|
+
```sh
|
|
171
|
+
# Lint the React package
|
|
172
|
+
yarn lint:react
|
|
173
|
+
|
|
174
|
+
# Run tests
|
|
175
|
+
yarn test:react
|
|
176
|
+
|
|
177
|
+
# Build the package
|
|
178
|
+
yarn build:react
|
|
179
|
+
|
|
180
|
+
# Watch mode for development
|
|
181
|
+
yarn watch:react
|
|
182
|
+
|
|
183
|
+
# Run the demo application
|
|
184
|
+
yarn serve:react-demo
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
For working with both core and React packages:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
# Lint both packages
|
|
191
|
+
yarn lint:packages
|
|
192
|
+
|
|
193
|
+
# Build core package (required for React package)
|
|
194
|
+
yarn build:core
|
|
195
|
+
|
|
196
|
+
# Release packages
|
|
197
|
+
yarn release:core # Release core package
|
|
198
|
+
yarn release:react # Release React package
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
All builds will be available in the `dist` directory of their respective packages.
|
|
202
|
+
|
|
203
|
+
## Contributing
|
|
204
|
+
|
|
205
|
+
We welcome contributions! Please read our [contributing guide](../../CONTRIBUTING.md) to get started.
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatbot-body.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,MAAM,OAAO,CAAC;AAOtD,wBAAgB,WAAW,IAAI,SAAS,CAiCvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatbot-footer.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-footer/chatbot-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAKV,MAAM,OAAO,CAAC;AAQf,wBAAgB,aAAa,IAAI,SAAS,CAiGzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-footer/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SpeechInputButtonProps {
|
|
4
|
+
setValue: Dispatch<SetStateAction<string>>;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function SpeechInputButton(props: SpeechInputButtonProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=speech-input-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speech-input-button.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-footer/speech-input-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,SAAS,EACT,cAAc,EAMf,MAAM,OAAO,CAAC;AAIf,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,SAAS,CA6G1E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ChatbotHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
onReset?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function ChatbotHeader(props: ChatbotHeaderProps): ReactNode;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=chatbot-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatbot-header.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAwB,MAAM,OAAO,CAAC;AAQ3E,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAuDlE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AsgardThemeContextValue } from '../../context/asgard-theme-context';
|
|
2
|
+
import { ClientConfig, ConversationMessage } from '@asgard-js/core';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
interface ChatbotProps {
|
|
6
|
+
title: string;
|
|
7
|
+
theme?: Partial<AsgardThemeContextValue>;
|
|
8
|
+
config: ClientConfig;
|
|
9
|
+
customChannelId: string;
|
|
10
|
+
initMessages?: ConversationMessage[];
|
|
11
|
+
debugMode?: boolean;
|
|
12
|
+
fullScreen?: boolean;
|
|
13
|
+
avatar?: string;
|
|
14
|
+
botTypingPlaceholder?: string;
|
|
15
|
+
onReset?: () => void;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function Chatbot(props: ChatbotProps): ReactNode;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=chatbot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatbot.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAEL,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAO1C,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACzC,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAmCtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-icon.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/profile-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAkB9D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConversationMessage } from '@asgard-js/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ConversationMessageRendererProps {
|
|
5
|
+
message: ConversationMessage;
|
|
6
|
+
}
|
|
7
|
+
export declare function ConversationMessageRenderer(props: ConversationMessageRendererProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=conversation-message-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-message-renderer/conversation-message-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAuB,MAAM,iBAAiB,CAAC;AAS3E,UAAU,gCAAgC;IACxC,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,GACtC,SAAS,CAgCX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-message-renderer/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,OAAO,CAAC;AAIxC,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,8CAAgB,WAAW,KAAG,SAAS,CAYxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-typing-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/bot-typing-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAS/C,UAAU,iBAAiB;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA+BhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-typing-placeholder.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/bot-typing-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAI3C,UAAU,yBAAyB;IACjC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,yBAAyB,GAC/B,SAAS,CAiBX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ResizeObserverBoxProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
onResize: (width: number, height: number) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ResizeObserverBox(props: ResizeObserverBoxProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=resize-observer-box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-observer-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/resize-observer-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAErD,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,SAAS,CAsB1E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ConversationBotMessage } from '@asgard-js/core';
|
|
3
|
+
|
|
4
|
+
interface ButtonTemplateProps {
|
|
5
|
+
message: ConversationBotMessage;
|
|
6
|
+
}
|
|
7
|
+
export declare function ButtonTemplate(props: ButtonTemplateProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=button-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/button-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,SAAS,CAkBpE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ButtonMessageTemplate, CarouselMessageTemplate } from '@asgard-js/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface CardProps {
|
|
5
|
+
template: ButtonMessageTemplate | CarouselMessageTemplate['columns'][number];
|
|
6
|
+
}
|
|
7
|
+
export declare function Card(props: CardProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAwB,MAAM,OAAO,CAAC;AAE3E,OAAO,EAEL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,SAAS;IACjB,QAAQ,EAAE,qBAAqB,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;CAC9E;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAsEhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConversationBotMessage } from '@asgard-js/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface CarouselTemplateProps {
|
|
5
|
+
message: ConversationBotMessage;
|
|
6
|
+
}
|
|
7
|
+
export declare function CarouselTemplate(props: CarouselTemplateProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=carousel-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/carousel-template/carousel-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAEL,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAIzB,UAAU,qBAAqB;IAC7B,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAkBxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/carousel-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConversationMessage } from '@asgard-js/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface HintTemplateProps {
|
|
5
|
+
message: ConversationMessage;
|
|
6
|
+
}
|
|
7
|
+
export declare function HintTemplate(props: HintTemplateProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=hint-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hint-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/hint-template/hint-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,mBAAmB,EAAuB,MAAM,iBAAiB,CAAC;AAG3E,UAAU,iBAAiB;IACzB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAuBhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/hint-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './template-box';
|
|
2
|
+
export * from './bot-typing-box';
|
|
3
|
+
export * from './button-template';
|
|
4
|
+
export * from './text-template';
|
|
5
|
+
export * from './carousel-template';
|
|
6
|
+
export * from './hint-template';
|
|
7
|
+
export * from './quick-replies';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/quick-replies/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-replies.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/quick-replies/quick-replies.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAI/C,UAAU,iBAAiB;IACzB,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA8BhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/template-box/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface TemplateBoxContentProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
time?: Date;
|
|
6
|
+
quickReplies?: {
|
|
7
|
+
text: string;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
export declare function TemplateBoxContent(props: TemplateBoxContentProps): ReactNode;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=template-box-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-box-content.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/template-box/template-box-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACnC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,SAAS,CAY5E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type TemplateBoxProps = {
|
|
4
|
+
type: 'user';
|
|
5
|
+
direction: 'horizontal';
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'bot';
|
|
9
|
+
direction: 'horizontal' | 'vertical';
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export declare function TemplateBox(props: TemplateBoxProps): ReactNode;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=template-box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/template-box/template-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAI3C,KAAK,gBAAgB,GACjB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,YAAY,GAAG,UAAU,CAAC;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEN,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAoB9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConversationMessage } from '@asgard-js/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface TextTemplateProps {
|
|
5
|
+
message: ConversationMessage;
|
|
6
|
+
}
|
|
7
|
+
export declare function TextTemplate(props: TextTemplateProps): ReactNode;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=text-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/text-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAOtD,UAAU,iBAAiB;IACzB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA+BhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/time/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/time/time.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAMhD"}
|