reachat 2.1.0-alpha.2 → 2.1.0-alpha.21

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 (56) hide show
  1. package/dist/AppBar/AppBar.d.ts +1 -1
  2. package/dist/{CSVFileRenderer-CpB8ngRc.js → CSVFileRenderer-GYEEFRXD.js} +15 -14
  3. package/dist/CSVFileRenderer-GYEEFRXD.js.map +1 -0
  4. package/dist/Chat.d.ts +3 -3
  5. package/dist/ChatBubble/ChatBubble.d.ts +1 -1
  6. package/dist/ChatContext.d.ts +2 -2
  7. package/dist/ChatInput/ChatInput.d.ts +16 -0
  8. package/dist/ChatInput/FileInput.d.ts +5 -1
  9. package/dist/{DefaultFileRenderer-DEgyNAd4.js → DefaultFileRenderer-CUcl0kc2.js} +2 -2
  10. package/dist/DefaultFileRenderer-CUcl0kc2.js.map +1 -0
  11. package/dist/ImageFileRenderer-C8tVW3I8.js.map +1 -1
  12. package/dist/Markdown/CodeHighlighter.d.ts +4 -0
  13. package/dist/Markdown/Markdown.d.ts +5 -0
  14. package/dist/Markdown/Table.d.ts +1 -1
  15. package/dist/Markdown/index.d.ts +2 -2
  16. package/dist/Markdown/plugins/remarkCve.d.ts +2 -1
  17. package/dist/PDFFileRenderer-BBn2EVrV.js +16 -0
  18. package/dist/PDFFileRenderer-BBn2EVrV.js.map +1 -0
  19. package/dist/SessionMessages/SessionEmpty.d.ts +1 -4
  20. package/dist/SessionMessages/SessionMessage/MessageFile/renderers/index.d.ts +1 -1
  21. package/dist/SessionMessages/SessionMessage/MessageFiles.d.ts +1 -1
  22. package/dist/SessionMessages/SessionMessage/MessageQuestion.d.ts +4 -0
  23. package/dist/SessionMessages/SessionMessage/MessageSources.d.ts +1 -1
  24. package/dist/SessionMessages/SessionMessage/SessionMessage.d.ts +4 -0
  25. package/dist/SessionMessages/SessionMessage/index.d.ts +2 -2
  26. package/dist/SessionMessages/SessionMessages.d.ts +14 -1
  27. package/dist/SessionMessages/index.d.ts +2 -2
  28. package/dist/SessionsList/index.d.ts +2 -2
  29. package/dist/docs.json +216 -20
  30. package/dist/{index-DVFyp_Cz.js → index-CwH75cwk.js} +1336 -1269
  31. package/dist/index-CwH75cwk.js.map +1 -0
  32. package/dist/index.css +6358 -727
  33. package/dist/index.d.ts +7 -6
  34. package/dist/index.js +32 -31
  35. package/dist/index.umd.cjs +1321 -1246
  36. package/dist/index.umd.cjs.map +1 -1
  37. package/dist/stories/Changelog.mdx +1 -1
  38. package/dist/stories/Chat.stories.tsx +28 -23
  39. package/dist/stories/ChatBubble.stories.tsx +3 -3
  40. package/dist/stories/Companion.stories.tsx +6 -6
  41. package/dist/stories/Console.stories.tsx +23 -23
  42. package/dist/stories/Integration.stories.tsx +2 -2
  43. package/dist/stories/Intro.mdx +1 -1
  44. package/dist/stories/Markdown.stories.tsx +318 -0
  45. package/dist/stories/assets/logo.svg +38 -19
  46. package/dist/stories/assets/paperclip.svg +4 -1
  47. package/dist/stories/assets/search.svg +5 -1
  48. package/dist/stories/examples.ts +20 -13
  49. package/dist/theme.d.ts +21 -0
  50. package/dist/utils/index.d.ts +1 -0
  51. package/package.json +63 -47
  52. package/dist/CSVFileRenderer-CpB8ngRc.js.map +0 -1
  53. package/dist/DefaultFileRenderer-DEgyNAd4.js.map +0 -1
  54. package/dist/PDFFileRenderer-DQdFS2l6.js +0 -9
  55. package/dist/PDFFileRenderer-DQdFS2l6.js.map +0 -1
  56. package/dist/index-DVFyp_Cz.js.map +0 -1
@@ -0,0 +1,318 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import remarkGfm from 'remark-gfm';
3
+ import remarkMath from 'remark-math';
4
+
5
+ import { Markdown, remarkCve } from 'reachat';
6
+ import { chatTheme } from 'reachat';
7
+
8
+ export default {
9
+ title: 'Components/Markdown',
10
+ component: Markdown,
11
+ args: {
12
+ theme: chatTheme,
13
+ remarkPlugins: [remarkGfm, remarkMath]
14
+ }
15
+ } as Meta<typeof Markdown>;
16
+
17
+ type Story = StoryObj<typeof Markdown>;
18
+
19
+ const riskTableMarkdown = `
20
+ Austin, based strictly on the provided organizational profile of Acme Controls International plc and the Dragos Q2 2025 ransomware threat intelligence, I have created a concise Risk Table illustrating key risk areas, their impact domains, likelihood, and priority levels for your strategic assessment.
21
+
22
+ | Risk Category | Description | Impacted Areas | Likelihood | Priority Level | Remarks/Notes |
23
+ |-------------------------------|--------------------------------------------------------------------------------------------------------------|----------------------------------------|-----------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------|
24
+ | Ransomware Attacks | CVE-2024-21762 High-volume ransomware targeting manufacturing and industrial control systems; sophisticated groups like Qilin, SafePay, Devman active | Manufacturing, ICS, Supply Chains | Highly Likely | Critical | Qilin alone accounted for ~15% of all industrial ransomware incidents Q2 2025; ties to nation-state actors increase strategic risk|
25
+ | Critical Vulnerability Exploits| Exploitation of unpatched Fortinet, SAP Netweaver, SimpleHelp vulnerabilities leading to network compromise | IT-OT networks, Remote Access Points | Highly Likely | High | Notable CVEs: CVE-2024-21762 (Fortinet), CVE-2025-31324 (SAP); patch management is critical |
26
+ | Supply Chain Disruptions | Ransomware, component shortages, geopolitical conflict impact supply and finance operations | Supply Chain, Procurement, Vendors | Likely | High | Includes semiconductor shortages, geopolitical events in Middle East and Russia/Ukraine impacting component availability |
27
+ | Social Engineering Attacks | Increased phishing, vishing, and helpdesk impersonation leading to credential theft and initial access | Employees, IT helpdesk | Likely | High | Attackers use voice spoofing, Teams calls, and email bombing; training and awareness crucial |
28
+ | AI-driven Attack Enhancements | Emerging use of AI for phishing, evasion, and automated reconnaissance reducing detection windows | Security Operations, SOC | Medium Likely | Medium | Threat actors enhance sophistication, requiring advanced detection technologies |
29
+ | Data Privacy and Compliance Risks| Potential violations of GDPR, US state privacy laws and sector-specific reporting obligations due to breaches | Legal, Compliance Departments | Even Chance | Medium | Incident impacts can trigger complex regulatory reporting and fines |
30
+ | Environmental and Product Liability Litigation| PFAS contamination and asbestos-related claims risk operational and reputational impact | Legal, Environmental Compliance, Public Affairs | Even Chance | Medium | Ongoing remediation and litigation in Wisconsin sites; impacts company reputation and financial reserves |
31
+ | Competitor-led Market Shifts | Competition from Honeywell, Siemens, Schneider Electric in smart building and cooling systems sectors | Product Development, Strategic Planning | Medium | Low | Market dynamics but outside direct cybersecurity scope |
32
+
33
+ This risk table uses Dragos ransomware intelligence trends along with Acme Controls' industrial, geographic, regulatory, and operational context to prioritize risks most pertinent for strategic decision-making.
34
+
35
+ Let me know your next question or if you want me to elaborate on specific risks before we proceed to complete the Strategic Risk Assessment.`;
36
+
37
+ export const RiskAssessmentTable: Story = {
38
+ render: args => (
39
+ <div className="p-8 bg-background-neutral-canvas-base max-w-full overflow-x-auto">
40
+ <Markdown {...args} remarkPlugins={[remarkGfm, remarkMath, remarkCve]}>
41
+ {riskTableMarkdown}
42
+ </Markdown>
43
+ </div>
44
+ )
45
+ };
46
+
47
+ export const SimpleTable: Story = {
48
+ render: args => (
49
+ <div className="p-8 bg-background-neutral-canvas-base">
50
+ <Markdown {...args}>
51
+ {`
52
+ | Name | Age | Location |
53
+ |------|-----|----------|
54
+ | Alice | 30 | New York |
55
+ | Bob | 25 | London |
56
+ | Charlie | 35 | Tokyo |
57
+ `}
58
+ </Markdown>
59
+ </div>
60
+ )
61
+ };
62
+
63
+ export const TableWithMarkdown: Story = {
64
+ render: args => (
65
+ <div className="p-8 bg-background-neutral-canvas-base">
66
+ <Markdown {...args}>
67
+ {`
68
+ ## Security Vulnerabilities
69
+
70
+ | CVE ID | Severity | Description | Fix Available |
71
+ |--------|----------|-------------|---------------|
72
+ | CVE-2024-21762 | **Critical** | Remote code execution in Fortinet SSL VPN | Yes - Patch v7.2.3 |
73
+ | CVE-2025-31324 | **High** | SQL injection in SAP Netweaver | Yes - Update required |
74
+ | CVE-2024-12345 | *Medium* | XSS vulnerability in web interface | Yes - v2.1.0+ |
75
+ `}
76
+ </Markdown>
77
+ </div>
78
+ )
79
+ };
80
+
81
+ export const InlineAndCodeBlocks: Story = {
82
+ render: args => (
83
+ <div className="p-8 bg-background-neutral-canvas-base max-w-4xl">
84
+ <Markdown {...args}>
85
+ {`
86
+ # Inline Code vs Code Blocks
87
+
88
+ ## Inline Code Examples
89
+
90
+ Use inline code when referencing code elements within sentences:
91
+
92
+ - Call the \`useState\` hook to manage component state
93
+ - Import the component with \`import { Button } from 'reablocks'\`
94
+ - Set the variable using \`const name = 'John'\`
95
+ - The function \`calculateTotal()\` returns a number
96
+ - Access the property with \`user.email\`
97
+ - Use the className \`bg-blue-500\` for styling
98
+
99
+ You can also use inline code for short commands like \`npm install\` or file paths like \`/src/components/App.tsx\`.
100
+
101
+ ## Code Block Examples
102
+
103
+ Use code blocks for multi-line code snippets:
104
+ \`\`\`
105
+ Hello, world!
106
+ \`\`\`
107
+
108
+ ### TypeScript/React Component
109
+
110
+ \`\`\`typescript
111
+ import { useState } from 'react';
112
+ import { Button } from 'reablocks';
113
+
114
+ interface UserProps {
115
+ name: string;
116
+ email: string;
117
+ }
118
+
119
+ export const UserProfile = ({ name, email }: UserProps) => {
120
+ const [isEditing, setIsEditing] = useState(false);
121
+
122
+ return (
123
+ <div className="p-4 border rounded">
124
+ <h2>{name}</h2>
125
+ <p>{email}</p>
126
+ <Button onClick={() => setIsEditing(!isEditing)}>
127
+ {isEditing ? 'Save' : 'Edit'}
128
+ </Button>
129
+ </div>
130
+ );
131
+ };
132
+ \`\`\`
133
+
134
+ ### JavaScript
135
+
136
+ \`\`\`javascript
137
+ function fetchUserData(userId) {
138
+ return fetch(\`/api/users/\${userId}\`)
139
+ .then(response => response.json())
140
+ .then(data => {
141
+ console.log('User data:', data);
142
+ return data;
143
+ })
144
+ .catch(error => {
145
+ console.error('Error fetching user:', error);
146
+ });
147
+ }
148
+ \`\`\`
149
+
150
+ ### Python
151
+
152
+ \`\`\`python
153
+ def calculate_total(items):
154
+ total = sum(item['price'] * item['quantity'] for item in items)
155
+ return round(total, 2)
156
+
157
+ items = [
158
+ {'name': 'Book', 'price': 12.99, 'quantity': 2},
159
+ {'name': 'Pen', 'price': 1.50, 'quantity': 5}
160
+ ]
161
+
162
+ print(f"Total: $\{calculate_total(items)}")
163
+ \`\`\`
164
+
165
+ ### JSON
166
+
167
+ \`\`\`json
168
+ {
169
+ "name": "reachat",
170
+ "version": "1.0.0",
171
+ "dependencies": {
172
+ "react": "^18.3.0",
173
+ "reablocks": "^8.0.0"
174
+ },
175
+ "devDependencies": {
176
+ "typescript": "^5.0.0",
177
+ "vite": "^5.0.0"
178
+ }
179
+ }
180
+ \`\`\`
181
+
182
+ ### CSS/Tailwind
183
+
184
+ \`\`\`css
185
+ .chat-bubble {
186
+ padding: 1rem;
187
+ border-radius: 0.5rem;
188
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
189
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
190
+ }
191
+
192
+ .chat-bubble:hover {
193
+ transform: translateY(-2px);
194
+ box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
195
+ }
196
+ \`\`\`
197
+
198
+ ### Bash/Shell
199
+
200
+ \`\`\`bash
201
+ # Install dependencies
202
+ npm install
203
+
204
+ # Run development server
205
+ npm run dev
206
+
207
+ # Build for production
208
+ npm run build
209
+
210
+ # Run tests
211
+ npm test
212
+ \`\`\`
213
+
214
+ ### SQL
215
+
216
+ \`\`\`sql
217
+ SELECT
218
+ u.id,
219
+ u.name,
220
+ u.email,
221
+ COUNT(o.id) as order_count
222
+ FROM users u
223
+ LEFT JOIN orders o ON u.id = o.user_id
224
+ WHERE u.created_at > '2024-01-01'
225
+ GROUP BY u.id, u.name, u.email
226
+ ORDER BY order_count DESC
227
+ LIMIT 10;
228
+ \`\`\`
229
+
230
+ ## Mixed Usage
231
+
232
+ You can combine inline code and code blocks in the same content:
233
+
234
+ To create a new React component, first import \`React\` and \`useState\`:
235
+
236
+ \`\`\`tsx
237
+ import React, { useState } from 'react';
238
+
239
+ export const Counter = () => {
240
+ const [count, setCount] = useState(0);
241
+ return <button onClick={() => setCount(count + 1)}>{count}</button>;
242
+ };
243
+ \`\`\`
244
+
245
+ Then use it in your app by importing it with \`import { Counter } from './Counter'\` and rendering \`<Counter />\` in your JSX.
246
+ `}
247
+ </Markdown>
248
+ </div>
249
+ )
250
+ };
251
+
252
+ export const AllMarkdownFeatures: Story = {
253
+ render: args => (
254
+ <div className="p-8 bg-background-neutral-canvas-base max-w-4xl">
255
+ <Markdown {...args}>
256
+ {`
257
+ # Comprehensive Markdown Test
258
+
259
+ ## Tables
260
+
261
+ ### Simple Table
262
+ | Header 1 | Header 2 | Header 3 |
263
+ |----------|----------|----------|
264
+ | Cell 1 | Cell 2 | Cell 3 |
265
+ | Cell 4 | Cell 5 | Cell 6 |
266
+
267
+ ### Table with Alignment
268
+ | Left Aligned | Center Aligned | Right Aligned |
269
+ |:-------------|:--------------:|--------------:|
270
+ | Text | Text | Text |
271
+ | More text | More text | More text |
272
+
273
+ ---
274
+
275
+ ## Text Formatting
276
+
277
+ **Bold text** and *italic text* and ***bold italic***.
278
+
279
+ ## Links
280
+
281
+ Check out [this link](https://example.com).
282
+
283
+ ## Lists
284
+
285
+ ### Unordered List
286
+ - Item 1
287
+ - Item 2
288
+ - Nested item
289
+ - Item 3
290
+
291
+ ### Ordered List
292
+ 1. First item
293
+ 2. Second item
294
+ 3. Third item
295
+
296
+ ## Code
297
+
298
+ Inline \`code\` example.
299
+
300
+ \`\`\`typescript
301
+ function greet(name: string): string {
302
+ return \`Hello, \${name}!\`;
303
+ }
304
+ \`\`\`
305
+
306
+ ## Headings
307
+
308
+ # H1 Heading
309
+ ## H2 Heading
310
+ ### H3 Heading
311
+ #### H4 Heading
312
+ ##### H5 Heading
313
+ ###### H6 Heading
314
+ `}
315
+ </Markdown>
316
+ </div>
317
+ )
318
+ };
@@ -1,21 +1,40 @@
1
1
  <svg width="795" height="140" viewBox="0 0 795 140" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M18.3191 17.5C10.2662 17.5 3.73579 24.0304 3.73579 32.0833V102.083L30.2775 84.5833H82.4858C90.5387 84.5833 97.0691 78.0529 97.0691 70V17.5H18.3191Z" fill="url(#paint0_linear_182_647)"/>
3
- <path d="M137.902 61.2501V134.167L111.361 116.667H59.1525C51.0995 116.667 44.5691 110.136 44.5691 102.083V84.5834H82.4858C90.5387 84.5834 97.0691 78.053 97.0691 70.0001V46.6667H123.319C131.372 46.6667 137.902 53.1972 137.902 61.2501Z" fill="url(#paint1_linear_182_647)"/>
4
- <path d="M251.987 103.6H237.683L224.147 80.2719H214.067V103.6H200.819V36.3999H227.699C233.939 36.3999 239.219 38.6079 243.539 42.9279C247.859 47.2479 250.067 52.5279 250.067 58.6719C250.067 67.0239 244.883 74.7039 237.107 78.2559L251.987 103.6ZM227.699 48.7839H200.819V68.6559H227.699C232.691 68.6559 236.819 64.1439 236.819 58.6719C236.819 53.1999 232.691 48.7839 227.699 48.7839Z" fill="white"/>
5
- <path d="M290.508 75.8559V90.9279H332.076V103.6H290.508V36.3999H331.596V49.0719H290.508V63.3759H329.196V75.8559H290.508Z" fill="white"/>
6
- <path d="M430.765 103.6H416.365L412.333 91.5039H385.549L381.517 103.6H367.213L390.733 36.3999H407.149L430.765 103.6ZM398.989 51.6639L385.549 91.5039H412.333L398.989 51.6639Z" fill="white"/>
7
- <path d="M497.445 104.944C487.365 104.944 479.013 101.584 472.389 94.8639C465.765 88.1439 462.501 79.8879 462.501 69.9999C462.501 60.1119 465.765 51.7599 472.389 45.1359C479.013 38.4159 487.365 35.0559 497.445 35.0559C509.637 35.0559 520.581 41.1999 526.341 50.8959L514.917 57.5199C511.557 51.4719 505.125 47.9199 497.445 47.9199C490.917 47.9199 485.637 49.9359 481.605 54.0639C477.669 58.1919 475.653 63.4719 475.653 69.9999C475.653 76.4319 477.669 81.7119 481.605 85.8399C485.637 89.9679 490.917 91.9839 497.445 91.9839C505.125 91.9839 511.749 88.3359 514.917 82.4799L526.341 89.1039C520.581 98.7999 509.733 104.944 497.445 104.944Z" fill="white"/>
8
- <path d="M603.407 63.0879V36.3999H616.559V103.6H603.407V75.7599H578.447V103.6H565.199V36.3999H578.447V63.0879H603.407Z" fill="white"/>
9
- <path d="M717.363 103.6H702.963L698.931 91.5039H672.147L668.115 103.6H653.811L677.331 36.3999H693.747L717.363 103.6ZM685.587 51.6639L672.147 91.5039H698.931L685.587 51.6639Z" fill="white"/>
10
- <path d="M744.741 36.3999H794.181V49.0719H776.037V103.6H762.789V49.0719H744.741V36.3999Z" fill="white"/>
11
- <defs>
12
- <linearGradient id="paint0_linear_182_647" x1="50.4025" y1="17.5" x2="50.4025" y2="102.083" gradientUnits="userSpaceOnUse">
13
- <stop stop-color="#105EFF"/>
14
- <stop offset="1" stop-color="#2E2E77"/>
15
- </linearGradient>
16
- <linearGradient id="paint1_linear_182_647" x1="141.706" y1="169.085" x2="61.445" y2="30.0709" gradientUnits="userSpaceOnUse">
17
- <stop stop-color="#105EFF"/>
18
- <stop offset="1" stop-color="#105EFF" stop-opacity="0.71"/>
19
- </linearGradient>
20
- </defs>
2
+ <path
3
+ d="M18.3191 17.5C10.2662 17.5 3.73579 24.0304 3.73579 32.0833V102.083L30.2775 84.5833H82.4858C90.5387 84.5833 97.0691 78.0529 97.0691 70V17.5H18.3191Z"
4
+ fill="url(#paint0_linear_182_647)" />
5
+ <path
6
+ d="M137.902 61.2501V134.167L111.361 116.667H59.1525C51.0995 116.667 44.5691 110.136 44.5691 102.083V84.5834H82.4858C90.5387 84.5834 97.0691 78.053 97.0691 70.0001V46.6667H123.319C131.372 46.6667 137.902 53.1972 137.902 61.2501Z"
7
+ fill="url(#paint1_linear_182_647)" />
8
+ <path
9
+ d="M251.987 103.6H237.683L224.147 80.2719H214.067V103.6H200.819V36.3999H227.699C233.939 36.3999 239.219 38.6079 243.539 42.9279C247.859 47.2479 250.067 52.5279 250.067 58.6719C250.067 67.0239 244.883 74.7039 237.107 78.2559L251.987 103.6ZM227.699 48.7839H200.819V68.6559H227.699C232.691 68.6559 236.819 64.1439 236.819 58.6719C236.819 53.1999 232.691 48.7839 227.699 48.7839Z"
10
+ fill="currentColor" />
11
+ <path
12
+ d="M290.508 75.8559V90.9279H332.076V103.6H290.508V36.3999H331.596V49.0719H290.508V63.3759H329.196V75.8559H290.508Z"
13
+ fill="currentColor" />
14
+ <path
15
+ d="M430.765 103.6H416.365L412.333 91.5039H385.549L381.517 103.6H367.213L390.733 36.3999H407.149L430.765 103.6ZM398.989 51.6639L385.549 91.5039H412.333L398.989 51.6639Z"
16
+ fill="currentColor" />
17
+ <path
18
+ d="M497.445 104.944C487.365 104.944 479.013 101.584 472.389 94.8639C465.765 88.1439 462.501 79.8879 462.501 69.9999C462.501 60.1119 465.765 51.7599 472.389 45.1359C479.013 38.4159 487.365 35.0559 497.445 35.0559C509.637 35.0559 520.581 41.1999 526.341 50.8959L514.917 57.5199C511.557 51.4719 505.125 47.9199 497.445 47.9199C490.917 47.9199 485.637 49.9359 481.605 54.0639C477.669 58.1919 475.653 63.4719 475.653 69.9999C475.653 76.4319 477.669 81.7119 481.605 85.8399C485.637 89.9679 490.917 91.9839 497.445 91.9839C505.125 91.9839 511.749 88.3359 514.917 82.4799L526.341 89.1039C520.581 98.7999 509.733 104.944 497.445 104.944Z"
19
+ fill="currentColor" />
20
+ <path
21
+ d="M603.407 63.0879V36.3999H616.559V103.6H603.407V75.7599H578.447V103.6H565.199V36.3999H578.447V63.0879H603.407Z"
22
+ fill="currentColor" />
23
+ <path
24
+ d="M717.363 103.6H702.963L698.931 91.5039H672.147L668.115 103.6H653.811L677.331 36.3999H693.747L717.363 103.6ZM685.587 51.6639L672.147 91.5039H698.931L685.587 51.6639Z"
25
+ fill="currentColor" />
26
+ <path d="M744.741 36.3999H794.181V49.0719H776.037V103.6H762.789V49.0719H744.741V36.3999Z"
27
+ fill="currentColor" />
28
+ <defs>
29
+ <linearGradient id="paint0_linear_182_647" x1="50.4025" y1="17.5" x2="50.4025" y2="102.083"
30
+ gradientUnits="userSpaceOnUse">
31
+ <stop stop-color="#105EFF" />
32
+ <stop offset="1" stop-color="#2E2E77" />
33
+ </linearGradient>
34
+ <linearGradient id="paint1_linear_182_647" x1="141.706" y1="169.085" x2="61.445" y2="30.0709"
35
+ gradientUnits="userSpaceOnUse">
36
+ <stop stop-color="#105EFF" />
37
+ <stop offset="1" stop-color="#105EFF" stop-opacity="0.71" />
38
+ </linearGradient>
39
+ </defs>
21
40
  </svg>
@@ -1 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-paperclip"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="24px" height="24px">
2
+ <path
3
+ d="M25.3,56.007c-3.409,0-6.818-1.297-9.414-3.893c-2.595-2.596-3.893-6.005-3.893-9.415c0-3.409,1.298-6.819,3.893-9.414 l20.4-20.4c1.847-1.847,4.302-2.864,6.914-2.864c2.611,0,5.067,1.017,6.914,2.864c3.812,3.813,3.812,10.016,0,13.829l-20.4,20.4 c-2.438,2.439-6.385,2.441-8.828,0c-2.434-2.435-2.434-6.395,0-8.829l13.7-13.7c0.781-0.781,2.047-0.781,2.828,0 c0.781,0.781,0.781,2.047,0,2.828l-13.7,13.7c-0.874,0.875-0.874,2.297,0.001,3.172c0.847,0.846,2.324,0.846,3.171,0l20.4-20.4 c2.252-2.253,2.252-5.919,0-8.172c-1.092-1.091-2.543-1.692-4.086-1.692c-1.544,0-2.994,0.601-4.086,1.692l-20.4,20.4 c-1.815,1.816-2.723,4.201-2.723,6.586c0,2.385,0.908,4.77,2.723,6.586c1.816,1.815,4.201,2.723,6.586,2.723 c2.385,0,4.771-0.907,6.586-2.723l12.7-12.7c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828l-12.7,12.7 C32.119,54.709,28.71,56.007,25.3,56.007z" fill="currentColor" />
4
+ </svg>
@@ -1 +1,5 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-search"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
2
+ <path
3
+ d="M7.75 2C10.92 2 13.5 4.58 13.5 7.75C13.5 9.06476 13.0552 10.2773 12.3096 11.2471L15.7812 14.7188C16.0743 15.0118 16.0743 15.4873 15.7812 15.7803C15.6353 15.9263 15.443 16 15.251 16H15.25C15.058 16 14.8657 15.9273 14.7197 15.7803L11.248 12.3086C10.2781 13.0547 9.06525 13.5 7.75 13.5C4.58 13.5 2 10.92 2 7.75C2 4.58 4.58 2 7.75 2ZM7.75 3.5C5.407 3.5 3.5 5.407 3.5 7.75C3.5 10.093 5.407 12 7.75 12C10.093 12 12 10.093 12 7.75C12 5.407 10.093 3.5 7.75 3.5Z"
4
+ fill="currentColor" />
5
+ </svg>
@@ -1,6 +1,7 @@
1
- import { Session } from '@/types';
2
1
  import { subHours } from 'date-fns';
3
2
 
3
+ import type { Session } from '@/types';
4
+
4
5
  export const fakeSessions: Session[] = [
5
6
  {
6
7
  id: '1',
@@ -187,12 +188,11 @@ export const sessionWithDataDocs: Session[] = [
187
188
  {
188
189
  id: '1',
189
190
  question: 'Summarize the contents of the CSV.',
190
- response: 'The CSV file contains a dataset with the following columns: Name, Age, Occupation, and City.',
191
+ response:
192
+ 'The CSV file contains a dataset with the following columns: Name, Age, Occupation, and City.',
191
193
  createdAt: new Date(),
192
194
  updatedAt: new Date(),
193
- files: [
194
- { name: 'sample.csv', size: 1024000, type: 'text/csv' }
195
- ]
195
+ files: [{ name: 'sample.csv', size: 1024000, type: 'text/csv' }]
196
196
  },
197
197
  {
198
198
  id: '2',
@@ -201,7 +201,7 @@ export const sessionWithDataDocs: Session[] = [
201
201
  createdAt: new Date(),
202
202
  updatedAt: new Date(),
203
203
  files: [
204
- { name: 'document.pdf', size: 1024000, type: 'application/pdf' },
204
+ { name: 'document.pdf', size: 1024000, type: 'application/pdf' }
205
205
  ]
206
206
  }
207
207
  ]
@@ -218,11 +218,17 @@ export const sessionWithCSVFiles: Session[] = [
218
218
  {
219
219
  id: '1',
220
220
  question: 'Summarize the contents of the CSV.',
221
- response: 'The CSV file contains a dataset with the following columns: Name, HEX, RGB.',
221
+ response:
222
+ 'The CSV file contains a dataset with the following columns: Name, HEX, RGB.',
222
223
  createdAt: new Date(),
223
224
  updatedAt: new Date(),
224
225
  files: [
225
- { name: 'sample.csv', size: 500, type: 'text/csv', url: 'https://gist.githubusercontent.com/RobVanGroenewoud/ba89ad7684df8cefe5c183adb498cc65/raw/f2eec6d2cb89f5d779e16b28ed0dab89d738ba96/sample.csv' }
226
+ {
227
+ name: 'sample.csv',
228
+ size: 500,
229
+ type: 'text/csv',
230
+ url: 'https://gist.githubusercontent.com/RobVanGroenewoud/ba89ad7684df8cefe5c183adb498cc65/raw/f2eec6d2cb89f5d779e16b28ed0dab89d738ba96/sample.csv'
231
+ }
226
232
  ]
227
233
  },
228
234
  {
@@ -232,7 +238,7 @@ export const sessionWithCSVFiles: Session[] = [
232
238
  createdAt: new Date(),
233
239
  updatedAt: new Date(),
234
240
  files: [
235
- { name: 'document.pdf', size: 1024000, type: 'application/pdf' },
241
+ { name: 'document.pdf', size: 1024000, type: 'application/pdf' }
236
242
  ]
237
243
  }
238
244
  ]
@@ -243,25 +249,26 @@ export const chatTemplates = [
243
249
  {
244
250
  id: '1',
245
251
  title: 'Explore Components',
246
- message: "Can you show me the main components available in Reachat?",
252
+ message: 'Can you show me the main components available in Reachat?',
247
253
  icon: 'SendPlane'
248
254
  },
249
255
  {
250
256
  id: '2',
251
257
  title: 'Customize Chat UI',
252
- message: "How can I customize the appearance of my Reachat interface?",
258
+ message: 'How can I customize the appearance of my Reachat interface?',
253
259
  icon: 'SendPlane'
254
260
  },
255
261
  {
256
262
  id: '3',
257
263
  title: 'Manage Sessions',
258
- message: "What are the best practices for managing chat sessions in Reachat?",
264
+ message:
265
+ 'What are the best practices for managing chat sessions in Reachat?',
259
266
  icon: 'SendPlane'
260
267
  },
261
268
  {
262
269
  id: '4',
263
270
  title: 'Tailwind Setup',
264
- message: "How do I properly set up Tailwind CSS with Reachat?",
271
+ message: 'How do I properly set up Tailwind CSS with Reachat?',
265
272
  icon: 'SendPlane'
266
273
  }
267
274
  ];
package/dist/theme.d.ts CHANGED
@@ -52,17 +52,38 @@ export interface ChatTheme {
52
52
  };
53
53
  };
54
54
  markdown: {
55
+ hr: string;
55
56
  p: string;
56
57
  a: string;
57
58
  table: string;
58
59
  th: string;
59
60
  td: string;
60
61
  code: string;
62
+ inlineCode: string;
61
63
  toolbar: string;
62
64
  li: string;
63
65
  ul: string;
64
66
  ol: string;
65
67
  copy: string;
68
+ h1: string;
69
+ h2: string;
70
+ h3: string;
71
+ h4: string;
72
+ h5: string;
73
+ h6: string;
74
+ };
75
+ csvPreview: {
76
+ base: string;
77
+ header: {
78
+ base: string;
79
+ icon: string;
80
+ actions: string;
81
+ };
82
+ tableContainer: string;
83
+ dialog: {
84
+ base: string;
85
+ container: string;
86
+ };
66
87
  };
67
88
  footer: {
68
89
  base: string;
@@ -0,0 +1 @@
1
+ export * from './grouping';