@asgard-js/react 0.0.5 → 0.0.7

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.
Files changed (59) hide show
  1. package/README.md +142 -21
  2. package/dist/components/chatbot/chatbot-body/chatbot-body.d.ts.map +1 -0
  3. package/dist/components/chatbot/chatbot-body/conversation-message-renderer.d.ts.map +1 -0
  4. package/dist/components/chatbot/chatbot-body/index.d.ts +2 -0
  5. package/dist/components/chatbot/chatbot-body/index.d.ts.map +1 -0
  6. package/dist/components/chatbot/chatbot-container/chatbot-container.d.ts +8 -0
  7. package/dist/components/chatbot/chatbot-container/chatbot-container.d.ts.map +1 -0
  8. package/dist/components/chatbot/chatbot-container/chatbot-full-screen-container.d.ts +4 -0
  9. package/dist/components/chatbot/chatbot-container/chatbot-full-screen-container.d.ts.map +1 -0
  10. package/dist/components/chatbot/chatbot-footer/chatbot-footer.d.ts.map +1 -1
  11. package/dist/components/chatbot/chatbot-header/chatbot-header.d.ts.map +1 -0
  12. package/dist/components/chatbot/chatbot-header/index.d.ts +2 -0
  13. package/dist/components/chatbot/chatbot-header/index.d.ts.map +1 -0
  14. package/dist/components/chatbot/chatbot.d.ts.map +1 -1
  15. package/dist/components/templates/hint-template/hint-template.d.ts.map +1 -1
  16. package/dist/components/templates/index.d.ts +0 -1
  17. package/dist/components/templates/index.d.ts.map +1 -1
  18. package/dist/components/templates/text-template/bot-typing-box.d.ts.map +1 -0
  19. package/dist/components/templates/text-template/bot-typing-placeholder.d.ts.map +1 -0
  20. package/dist/components/templates/text-template/index.d.ts +2 -0
  21. package/dist/components/templates/text-template/index.d.ts.map +1 -1
  22. package/dist/components/templates/text-template/text-template.d.ts.map +1 -1
  23. package/dist/context/asgard-service-context.d.ts.map +1 -1
  24. package/dist/context/asgard-theme-context.d.ts +0 -1
  25. package/dist/context/asgard-theme-context.d.ts.map +1 -1
  26. package/dist/hooks/index.d.ts +6 -0
  27. package/dist/hooks/index.d.ts.map +1 -1
  28. package/dist/hooks/use-channel.d.ts.map +1 -1
  29. package/dist/hooks/use-is-on-screen-keyboard-open.d.ts +2 -0
  30. package/dist/hooks/use-is-on-screen-keyboard-open.d.ts.map +1 -0
  31. package/dist/hooks/use-on-screen-keyboard-scroll-fix.d.ts +2 -0
  32. package/dist/hooks/use-on-screen-keyboard-scroll-fix.d.ts.map +1 -0
  33. package/dist/hooks/use-prevent-over-scrolling.d.ts +4 -0
  34. package/dist/hooks/use-prevent-over-scrolling.d.ts.map +1 -0
  35. package/dist/hooks/use-resize-observer.d.ts +9 -0
  36. package/dist/hooks/use-resize-observer.d.ts.map +1 -0
  37. package/dist/hooks/use-update-vh.d.ts +4 -0
  38. package/dist/hooks/use-update-vh.d.ts.map +1 -0
  39. package/dist/hooks/use-viewport-size.d.ts +6 -0
  40. package/dist/hooks/use-viewport-size.d.ts.map +1 -0
  41. package/dist/index.js +566 -380
  42. package/dist/style.css +1 -1
  43. package/package.json +1 -1
  44. package/dist/components/chatbot/chatbot-body.d.ts.map +0 -1
  45. package/dist/components/chatbot/chatbot-header.d.ts.map +0 -1
  46. package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts.map +0 -1
  47. package/dist/components/conversation-message-renderer/index.d.ts +0 -2
  48. package/dist/components/conversation-message-renderer/index.d.ts.map +0 -1
  49. package/dist/components/templates/bot-typing-box/bot-typing-box.d.ts.map +0 -1
  50. package/dist/components/templates/bot-typing-box/bot-typing-placeholder.d.ts.map +0 -1
  51. package/dist/components/templates/bot-typing-box/index.d.ts +0 -3
  52. package/dist/components/templates/bot-typing-box/index.d.ts.map +0 -1
  53. package/dist/components/templates/bot-typing-box/resize-observer-box.d.ts +0 -9
  54. package/dist/components/templates/bot-typing-box/resize-observer-box.d.ts.map +0 -1
  55. /package/dist/components/chatbot/{chatbot-body.d.ts → chatbot-body/chatbot-body.d.ts} +0 -0
  56. /package/dist/components/{conversation-message-renderer → chatbot/chatbot-body}/conversation-message-renderer.d.ts +0 -0
  57. /package/dist/components/chatbot/{chatbot-header.d.ts → chatbot-header/chatbot-header.d.ts} +0 -0
  58. /package/dist/components/templates/{bot-typing-box → text-template}/bot-typing-box.d.ts +0 -0
  59. /package/dist/components/templates/{bot-typing-box → text-template}/bot-typing-placeholder.d.ts +0 -0
package/README.md CHANGED
@@ -7,7 +7,7 @@ This package provides React components and hooks for integrating with the Asgard
7
7
  To install the React package, use the following command:
8
8
 
9
9
  ```sh
10
- yarn add asgardjs-react
10
+ yarn add @asgard-js/core @asgard-js/react
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -16,7 +16,7 @@ Here's a basic example of how to use the React components:
16
16
 
17
17
  ```javascript
18
18
  import React from 'react';
19
- import { Chatbot } from 'asgardjs-react';
19
+ import { Chatbot } from '@asgard-js/react';
20
20
 
21
21
  const App = () => {
22
22
  return (
@@ -25,13 +25,25 @@ const App = () => {
25
25
  config={{
26
26
  apiKey: 'your-api-key',
27
27
  endpoint: 'https://api.asgard-ai.com',
28
+ onExecutionError: (error) => {
29
+ console.error('Execution error:', error);
30
+ },
31
+ transformSsePayload: (payload) => {
32
+ return payload;
33
+ }
28
34
  }}
29
35
  customChannelId="your-channel-id"
30
36
  initMessages={[]}
37
+ debugMode={false}
31
38
  fullScreen={false}
32
39
  avatar="https://example.com/avatar.png"
33
40
  botTypingPlaceholder="Bot is typing..."
34
- options={{ showDebugMessage: true }}
41
+ onReset={() => {
42
+ console.log('Chat reset');
43
+ }}
44
+ onClose={() => {
45
+ console.log('Chat closed');
46
+ }}
35
47
  />
36
48
  );
37
49
  };
@@ -42,43 +54,152 @@ export default App;
42
54
  ### Chatbot Component Props
43
55
 
44
56
  - **title**: `string` - The title of the chatbot.
45
- - **config**: `ClientConfig` - Configuration object for the Asgard service client.
46
- - **customChannelId**: `string` - Custom channel identifier.
47
- - **initMessages**: `ConversationMessage[]` - Initial messages to display in the chat.
48
- - **fullScreen**: `boolean` - Whether the chatbot should be displayed in full screen.
49
- - **avatar**: `string` - URL of the avatar image for the chatbot.
50
- - **botTypingPlaceholder**: `string` - Placeholder text to show when the bot is typing.
51
- - **options**: `object` - Additional options, such as `showDebugMessage`.
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.
52
154
 
53
155
  ## Development
54
156
 
55
- To start developing the React package, follow these steps:
157
+ To develop the React package locally, follow these steps:
56
158
 
57
- 1. Clone the repository and navigate to the `packages/react` directory.
58
- 2. Install dependencies:
159
+ 1. Clone the repository and navigate to the project root directory.
59
160
 
161
+ 2. Install dependencies:
60
162
  ```sh
61
163
  yarn install
62
164
  ```
63
165
 
64
- 3. Build the package:
166
+ 3. Start development:
167
+
168
+ You can use the following commands to work with the React package:
65
169
 
66
170
  ```sh
67
- yarn build
68
- ```
171
+ # Lint the React package
172
+ yarn lint:react
69
173
 
70
- 4. Run tests to ensure everything is working:
174
+ # Run tests
175
+ yarn test:react
71
176
 
72
- ```sh
73
- yarn test
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
74
185
  ```
75
186
 
76
- 5. Start the development server:
187
+ For working with both core and React packages:
77
188
 
78
189
  ```sh
79
- yarn start
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
80
199
  ```
81
200
 
201
+ All builds will be available in the `dist` directory of their respective packages.
202
+
82
203
  ## Contributing
83
204
 
84
205
  We welcome contributions! Please read our [contributing guide](../../CONTRIBUTING.md) to get started.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatbot-body.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-body/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":"conversation-message-renderer.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-body/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,2 @@
1
+ export * from './chatbot-body';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-body/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
+
3
+ interface ChatbotContainerProps extends PropsWithChildren {
4
+ fullScreen?: boolean;
5
+ }
6
+ export declare function ChatbotContainer(props: ChatbotContainerProps): ReactNode;
7
+ export {};
8
+ //# sourceMappingURL=chatbot-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatbot-container.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-container/chatbot-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAM7D,UAAU,qBAAsB,SAAQ,iBAAiB;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAoBxE"}
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
+
3
+ export declare function ChatbotFullScreenContainer(props: PropsWithChildren): ReactNode;
4
+ //# sourceMappingURL=chatbot-full-screen-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatbot-full-screen-container.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-container/chatbot-full-screen-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAU7D,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,GACvB,SAAS,CA2BX"}
@@ -1 +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"}
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,CA0GzC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatbot-header.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-header/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,CAwDlE"}
@@ -0,0 +1,2 @@
1
+ export * from './chatbot-header';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chatbot/chatbot-header/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1 +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"}
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;AACpE,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,CAiCtD"}
@@ -1 +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;AAE3E,UAAU,iBAAiB;IACzB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAehE"}
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"}
@@ -1,5 +1,4 @@
1
1
  export * from './template-box';
2
- export * from './bot-typing-box';
3
2
  export * from './button-template';
4
3
  export * from './text-template';
5
4
  export * from './carousel-template';
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAE/B,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":"bot-typing-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/bot-typing-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAgC,MAAM,OAAO,CAAC;AAS/E,UAAU,iBAAiB;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAiDhE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bot-typing-placeholder.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/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"}
@@ -1,2 +1,4 @@
1
1
  export * from './text-template';
2
+ export * from './bot-typing-box';
3
+ export * from './bot-typing-placeholder';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC"}
@@ -1 +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,CA6BhE"}
1
+ {"version":3,"file":"text-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/text-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAW,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQtD,UAAU,iBAAiB;IACzB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAwDhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"asgard-service-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-service-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAGnB,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAClD,mBAAmB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/C,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAChD,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,oBAAoB,mDAS/B,CAAC;AAEH,UAAU,iCACR,SAAQ,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzE,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,iCAAiC,GACvC,SAAS,CAsEX;AAED,wBAAgB,gBAAgB,IAAI,wBAAwB,CAE3D"}
1
+ {"version":3,"file":"asgard-service-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-service-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAEnB,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAClD,mBAAmB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/C,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAChD,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,oBAAoB,mDAS/B,CAAC;AAEH,UAAU,iCACR,SAAQ,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzE,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,iCAAiC,GACvC,SAAS,CA+DX;AAED,wBAAgB,gBAAgB,IAAI,wBAAwB,CAE3D"}
@@ -10,7 +10,6 @@ export interface AsgardThemeContextValue {
10
10
  export declare const defaultAsgardThemeContextValue: AsgardThemeContextValue;
11
11
  export declare const AsgardThemeContext: import('react').Context<AsgardThemeContextValue>;
12
12
  export declare function AsgardThemeContextProvider(props: PropsWithChildren<{
13
- fullScreen?: boolean;
14
13
  theme?: Partial<AsgardThemeContextValue>;
15
14
  }>): ReactNode;
16
15
  export declare function useAsgardThemeContext(): AsgardThemeContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"asgard-theme-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-theme-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,iBAAiB,EACjB,SAAS,EAGV,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CACX,aAAa,EACX,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,aAAa,GACb,cAAc,CACjB,GAAG;QACF,eAAe,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;KAC7C,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAC;IAC7D,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,8BAA8B,EAAE,uBAiB5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,kDAE9B,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC1C,CAAC,GACD,SAAS,CAyBX;AAED,wBAAgB,qBAAqB,IAAI,uBAAuB,CAE/D"}
1
+ {"version":3,"file":"asgard-theme-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-theme-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,iBAAiB,EACjB,SAAS,EAGV,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CACX,aAAa,EACX,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,aAAa,GACb,cAAc,CACjB,GAAG;QACF,eAAe,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;KAC7C,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAC;IAC7D,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,8BAA8B,EAAE,uBAiB5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,kDAE9B,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC1C,CAAC,GACD,SAAS,CAaX;AAED,wBAAgB,qBAAqB,IAAI,uBAAuB,CAE/D"}
@@ -1,4 +1,10 @@
1
1
  export * from './use-asgard-service-client';
2
2
  export * from './use-channel';
3
3
  export * from './use-debounce';
4
+ export * from './use-viewport-size';
5
+ export * from './use-is-on-screen-keyboard-open';
6
+ export * from './use-on-screen-keyboard-scroll-fix';
7
+ export * from './use-prevent-over-scrolling';
8
+ export * from './use-update-vh';
9
+ export * from './use-resize-observer';
4
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-channel.d.ts","sourceRoot":"","sources":["../../src/hooks/use-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,eAAe;IACvB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CA6GnE"}
1
+ {"version":3,"file":"use-channel.d.ts","sourceRoot":"","sources":["../../src/hooks/use-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,eAAe;IACvB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAgHnE"}
@@ -0,0 +1,2 @@
1
+ export declare function useIsOnScreenKeyboardOpen(): boolean;
2
+ //# sourceMappingURL=use-is-on-screen-keyboard-open.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-is-on-screen-keyboard-open.d.ts","sourceRoot":"","sources":["../../src/hooks/use-is-on-screen-keyboard-open.ts"],"names":[],"mappings":"AAYA,wBAAgB,yBAAyB,IAAI,OAAO,CA8BnD"}
@@ -0,0 +1,2 @@
1
+ export declare function useOnScreenKeyboardScrollFix(): void;
2
+ //# sourceMappingURL=use-on-screen-keyboard-scroll-fix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-on-screen-keyboard-scroll-fix.d.ts","sourceRoot":"","sources":["../../src/hooks/use-on-screen-keyboard-scroll-fix.ts"],"names":[],"mappings":"AAEA,wBAAgB,4BAA4B,IAAI,IAAI,CAYnD"}
@@ -0,0 +1,4 @@
1
+ import { RefObject } from 'react';
2
+
3
+ export declare function usePreventOverScrolling(ref: RefObject<HTMLDivElement>): void;
4
+ //# sourceMappingURL=use-prevent-over-scrolling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-prevent-over-scrolling.d.ts","sourceRoot":"","sources":["../../src/hooks/use-prevent-over-scrolling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAiB7C,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,IAAI,CA2D5E"}
@@ -0,0 +1,9 @@
1
+ import { RefObject } from 'react';
2
+
3
+ interface UseResizeObserverProps {
4
+ ref: RefObject<HTMLDivElement>;
5
+ onResize: (width: number, height: number) => void;
6
+ }
7
+ export declare function useResizeObserver(props: UseResizeObserverProps): void;
8
+ export {};
9
+ //# sourceMappingURL=use-resize-observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resize-observer.d.ts","sourceRoot":"","sources":["../../src/hooks/use-resize-observer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAE7C,UAAU,sBAAsB;IAC9B,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAmBrE"}
@@ -0,0 +1,4 @@
1
+ import { RefObject } from 'react';
2
+
3
+ export declare function useUpdateVh(ref: RefObject<HTMLDivElement>): void;
4
+ //# sourceMappingURL=use-update-vh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-update-vh.d.ts","sourceRoot":"","sources":["../../src/hooks/use-update-vh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA2C,MAAM,OAAO,CAAC;AAK3E,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,IAAI,CAwBhE"}
@@ -0,0 +1,6 @@
1
+ type Width = number;
2
+ type Height = number;
3
+ type Size = [Width, Height];
4
+ export declare function useViewportSize(): Size | undefined;
5
+ export {};
6
+ //# sourceMappingURL=use-viewport-size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-viewport-size.d.ts","sourceRoot":"","sources":["../../src/hooks/use-viewport-size.ts"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG,MAAM,CAAC;AACpB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAQ5B,wBAAgB,eAAe,IAAI,IAAI,GAAG,SAAS,CAmClD"}