cmcts-c-agent-embedding 1.0.45 → 1.0.46-cagent
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/.eslintrc.cjs +1 -0
- package/.idea/{Flowise-share-chatbox.iml → flowise-chatbox.iml} +1 -4
- package/.idea/modules.xml +1 -2
- package/.idea/workspace.xml +4 -0
- package/AGENTS.md +166 -0
- package/dist/api/chatRoom.d.ts +85 -0
- package/dist/api/chatRoom.d.ts.map +1 -0
- package/dist/components/Bot.d.ts +6 -0
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -1
- package/dist/components/RoomReconnectAlert.d.ts +14 -0
- package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts +5 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/bubbles/ChartBubble.d.ts +73 -0
- package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts +8 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts +20 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts +4 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
- package/dist/components/bubbles/LoadingBubble.d.ts +7 -1
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -1
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -1
- package/dist/components/bubbles/StableChartWrapper.d.ts +18 -0
- package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
- package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts +8 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts +7 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts +1 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -1
- package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -1
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +5 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts +5 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts +3 -0
- package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
- package/dist/components/icons/ResetZoomIcon.d.ts +3 -0
- package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
- package/dist/components/icons/StopIcon.d.ts +3 -0
- package/dist/components/icons/StopIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomInIcon.d.ts +3 -0
- package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomOutIcon.d.ts +3 -0
- package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts +8 -0
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/image/PreviewImage.d.ts +5 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +4 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +19 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
- package/dist/features/full/components/Full.d.ts.map +1 -1
- package/dist/queries/sendMessageQuery.d.ts +41 -1
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/store/constant.d.ts +43 -0
- package/dist/store/constant.d.ts.map +1 -0
- package/dist/types/chart.d.ts +86 -0
- package/dist/types/chart.d.ts.map +1 -0
- package/dist/utils/chartInstanceManager.d.ts +43 -0
- package/dist/utils/chartInstanceManager.d.ts.map +1 -0
- package/dist/utils/chartTagParser.d.ts +39 -0
- package/dist/utils/chartTagParser.d.ts.map +1 -0
- package/dist/utils/chatStreamHelper.d.ts +19 -0
- package/dist/utils/chatStreamHelper.d.ts.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/transcriptApi.d.ts +8 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -1
- package/dist/web.d.ts +4 -2
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/dist/window.d.ts +2 -1
- package/dist/window.d.ts.map +1 -1
- package/docs/chart-rendering-implementation-plan.md +565 -0
- package/package.json +87 -80
- package/public/index.html +4 -114
- package/server.js +76 -0
- package/.env +0 -36
- package/.husky/pre-commit +0 -18
- package/.idea/AugmentWebviewStateStore.xml +0 -10
- package/.idea/codeStyles/Project.xml +0 -60
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -16
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -7
package/.eslintrc.cjs
CHANGED
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
<module type="WEB_MODULE" version="4">
|
|
3
3
|
<component name="NewModuleRootManager">
|
|
4
4
|
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
|
8
6
|
</content>
|
|
9
7
|
<orderEntry type="inheritedJdk" />
|
|
10
8
|
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
-
<orderEntry type="module" module-name="Flowise-share-chatbox-main" />
|
|
12
9
|
</component>
|
|
13
10
|
</module>
|
package/.idea/modules.xml
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ProjectModuleManager">
|
|
4
4
|
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/
|
|
6
|
-
<module fileurl="file://$PROJECT_DIR$/../Flowise-share-chatbox-main/.idea/Flowise-share-chatbox-main.iml" filepath="$PROJECT_DIR$/../Flowise-share-chatbox-main/.idea/Flowise-share-chatbox-main.iml" />
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/flowise-chatbox.iml" filepath="$PROJECT_DIR$/.idea/flowise-chatbox.iml" />
|
|
7
6
|
</modules>
|
|
8
7
|
</component>
|
|
9
8
|
</project>
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# AGENTS.md - Coding Guidelines
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Guidelines for code quality, development process, and decision-making
|
|
4
|
+
> **Target Audience:** AI coding assistants and developers
|
|
5
|
+
> **Version:** 1.0
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Code Quality Standards
|
|
10
|
+
|
|
11
|
+
### Core Principles
|
|
12
|
+
|
|
13
|
+
#### No Unused Code
|
|
14
|
+
- **Rule:** Don't write unused code
|
|
15
|
+
- **Requirement:** Ensure everything written is utilized in the project
|
|
16
|
+
- **Priority:** Critical
|
|
17
|
+
|
|
18
|
+
#### Readability First
|
|
19
|
+
- **Rule:** Prioritize readability for human understanding over execution efficiency
|
|
20
|
+
- **Priority:** Critical
|
|
21
|
+
|
|
22
|
+
#### Maintainability
|
|
23
|
+
- **Rule:** Maintain long-term maintainability over short-term optimization
|
|
24
|
+
- **Priority:** High
|
|
25
|
+
|
|
26
|
+
#### Simplicity
|
|
27
|
+
- **Rule:** Avoid unnecessary complexity
|
|
28
|
+
- **Approach:** Implement simple solutions unless complexity is truly required
|
|
29
|
+
- **Priority:** High
|
|
30
|
+
|
|
31
|
+
#### Clean Code Philosophy
|
|
32
|
+
- **Rule:** Follow Linus Torvalds' clean code principles
|
|
33
|
+
- **Priority:** High
|
|
34
|
+
- **Guidelines:**
|
|
35
|
+
1. Keep it simple
|
|
36
|
+
2. Make code readable like prose
|
|
37
|
+
3. Avoid premature optimization
|
|
38
|
+
4. Express intent clearly
|
|
39
|
+
5. Minimize abstraction layers
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Documentation Standards
|
|
44
|
+
|
|
45
|
+
#### Comment Purpose
|
|
46
|
+
- **Rule:** Comments must explain "what" (business logic/purpose) and "why" (reasoning/decisions), not "how"
|
|
47
|
+
- **Priority:** High
|
|
48
|
+
|
|
49
|
+
#### Avoid Over-Commenting
|
|
50
|
+
- **Rule:** Avoid over-commenting
|
|
51
|
+
- **Rationale:** Excessive comments indicate poor code quality
|
|
52
|
+
- **Priority:** Medium
|
|
53
|
+
|
|
54
|
+
#### Function Comments
|
|
55
|
+
- **Rule:** Function comments must explain purpose and reasoning
|
|
56
|
+
- **Placement:** Placed at function beginnings
|
|
57
|
+
- **Priority:** Medium
|
|
58
|
+
|
|
59
|
+
#### Self-Explanatory Code
|
|
60
|
+
- **Rule:** Well-written code should be self-explanatory
|
|
61
|
+
- **Method:** Through meaningful names and clear structure
|
|
62
|
+
- **Priority:** High
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Development Process
|
|
67
|
+
|
|
68
|
+
> **Description:** Follow these steps in order for effective development
|
|
69
|
+
> **Priority:** Critical
|
|
70
|
+
|
|
71
|
+
| Step | Name | Action/Rationale | Importance |
|
|
72
|
+
|------|------|------------------|------------|
|
|
73
|
+
| 1 | Understand First | Use available tools to understand data structures before implementation | Critical |
|
|
74
|
+
| 2 | Design Data Structures | Good data structures lead to good code | Critical |
|
|
75
|
+
| 3 | Define Interfaces | Specify all input/output structures before writing logic | High |
|
|
76
|
+
| 4 | Define Functions | Create all function signatures before implementation | High |
|
|
77
|
+
| 5 | Implement Logic | Write implementation only after structures and definitions are complete | High |
|
|
78
|
+
| 6 | Validate Code Quality | Always run lint and typecheck after writing code. Fix all linting errors and type errors before considering the task complete. Zero tolerance for lint and typecheck errors | Critical |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Quality Guidelines
|
|
83
|
+
|
|
84
|
+
#### Avoid Over-Engineering
|
|
85
|
+
- **Rule:** Avoid over-engineering
|
|
86
|
+
- **Focus:** Focus on minimal viable solutions meeting acceptance criteria
|
|
87
|
+
- **Priority:** High
|
|
88
|
+
|
|
89
|
+
#### Testing Approach
|
|
90
|
+
- **Rule:** Only create automated tests if explicitly required
|
|
91
|
+
- **Priority:** Medium
|
|
92
|
+
|
|
93
|
+
#### Feature Scope
|
|
94
|
+
- **Rule:** Never add functionality "just in case"
|
|
95
|
+
- **Requirement:** Implement only what's needed now
|
|
96
|
+
- **Priority:** High
|
|
97
|
+
|
|
98
|
+
#### Code Validation
|
|
99
|
+
- **Rule:** Always run lint and typecheck after code changes
|
|
100
|
+
- **Requirement:** Must fix all linting and type checking errors before completion
|
|
101
|
+
- **Process:** Run lint command, then typecheck command. Address all errors and warnings
|
|
102
|
+
- **Tolerance:** Zero tolerance for lint or typecheck errors
|
|
103
|
+
- **Priority:** Critical
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Decision Making Framework
|
|
108
|
+
|
|
109
|
+
> **Description:** Apply these principles systematically for all decisions
|
|
110
|
+
> **Priority:** High
|
|
111
|
+
|
|
112
|
+
| Step | Principle | Importance |
|
|
113
|
+
|------|-----------|------------|
|
|
114
|
+
| 1 | Gather Complete Information | Critical |
|
|
115
|
+
| 2 | Multi-Perspective Analysis | High |
|
|
116
|
+
| 3 | Consider All Stakeholders | High |
|
|
117
|
+
| 4 | Evaluate Alternatives | High |
|
|
118
|
+
| 5 | Assess Impact & Consequences | High |
|
|
119
|
+
| 6 | Apply Ethical Framework | Medium |
|
|
120
|
+
| 7 | Take Responsibility | High |
|
|
121
|
+
| 8 | Learn & Adapt | High |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Code Validation Workflow
|
|
126
|
+
|
|
127
|
+
> **Description:** Mandatory validation process after writing or modifying code
|
|
128
|
+
> **Priority:** Critical
|
|
129
|
+
|
|
130
|
+
#### Validation Commands
|
|
131
|
+
- **Lint Fix Command:** `yarn run lint-fix`
|
|
132
|
+
- **Type Check Command:** `yarn run type-check`
|
|
133
|
+
- **Combined Command:** `yarn run lint-fix && yarn run type-check`
|
|
134
|
+
|
|
135
|
+
#### Required Workflow
|
|
136
|
+
| Step | Action | Description |
|
|
137
|
+
|------|--------|-------------|
|
|
138
|
+
| 1 | Write/Edit Code | Make your code changes |
|
|
139
|
+
| 2 | Run Validation | Execute `yarn run lint-fix && yarn run type-check` |
|
|
140
|
+
| 3 | Review Results | Check for any remaining errors |
|
|
141
|
+
| 4 | Fix Errors | Address all lint and type errors |
|
|
142
|
+
| 5 | Repeat | Run validation again until all errors are resolved |
|
|
143
|
+
|
|
144
|
+
#### Rules
|
|
145
|
+
- **Rule:** Always run validation commands after every code change
|
|
146
|
+
- **Requirement:** Must run both lint-fix and type-check before considering task complete
|
|
147
|
+
- **Tolerance:** Zero errors allowed - all lint and type errors must be fixed
|
|
148
|
+
- **Priority:** Critical
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Package Manager
|
|
153
|
+
|
|
154
|
+
#### Required Package Manager
|
|
155
|
+
- **Rule:** Use `yarn` as the package manager for this project
|
|
156
|
+
- **Requirement:** All package installations and script executions must use `yarn`
|
|
157
|
+
- **Prohibited:** Do NOT use `npm`, `pnpm`, or `bun`
|
|
158
|
+
- **Priority:** Critical
|
|
159
|
+
|
|
160
|
+
#### Examples
|
|
161
|
+
| Action | Correct | Incorrect |
|
|
162
|
+
|--------|---------|-----------|
|
|
163
|
+
| Install dependencies | `yarn install` | `npm install`, `pnpm install` |
|
|
164
|
+
| Add package | `yarn add <package>` | `npm install <package>` |
|
|
165
|
+
| Run script | `yarn run <script>` | `npm run <script>` |
|
|
166
|
+
| Remove package | `yarn remove <package>` | `npm uninstall <package>` |
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Room API
|
|
3
|
+
* API functions for managing chat rooms and human advisor connections
|
|
4
|
+
*/
|
|
5
|
+
import { RoomStatus } from '@/store/constant';
|
|
6
|
+
export interface ApiResponse<T> {
|
|
7
|
+
success: boolean;
|
|
8
|
+
data?: T;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RoomInfo {
|
|
12
|
+
roomId: string;
|
|
13
|
+
status: RoomStatus;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
humanAdvisorId?: string;
|
|
16
|
+
humanAdvisorName?: string;
|
|
17
|
+
conversationId?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface MessageInfo {
|
|
20
|
+
id: string;
|
|
21
|
+
content: string;
|
|
22
|
+
sender: 'user' | 'agent' | 'human' | 'system';
|
|
23
|
+
timestamp: string;
|
|
24
|
+
metadata?: Record<string, any>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Create a new chat room
|
|
28
|
+
*/
|
|
29
|
+
export declare const createRoom: (chatflowId: string, chatId: string, apiHost?: string) => Promise<ApiResponse<RoomInfo>>;
|
|
30
|
+
/**
|
|
31
|
+
* Join an existing chat room
|
|
32
|
+
*/
|
|
33
|
+
export declare const joinRoom: (roomId: string, userId?: string, apiHost?: string) => Promise<ApiResponse<RoomInfo>>;
|
|
34
|
+
/**
|
|
35
|
+
* Leave a chat room
|
|
36
|
+
*/
|
|
37
|
+
export declare const leaveRoom: (roomId: string, userId?: string, apiHost?: string) => Promise<ApiResponse<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
}>>;
|
|
40
|
+
/**
|
|
41
|
+
* Close a chat room (end conversation with human advisor)
|
|
42
|
+
*/
|
|
43
|
+
export declare const closeRoom: (roomId: string, apiHost?: string) => Promise<ApiResponse<{
|
|
44
|
+
success: boolean;
|
|
45
|
+
}>>;
|
|
46
|
+
/**
|
|
47
|
+
* Get room status
|
|
48
|
+
*/
|
|
49
|
+
export declare const getRoomStatus: (roomId: string, apiHost?: string) => Promise<ApiResponse<RoomInfo>>;
|
|
50
|
+
/**
|
|
51
|
+
* Get messages from a room
|
|
52
|
+
*/
|
|
53
|
+
export declare const getRoomMessages: (roomId: string, limit?: number, before?: string, apiHost?: string) => Promise<ApiResponse<MessageInfo[]>>;
|
|
54
|
+
/**
|
|
55
|
+
* Request human advisor support
|
|
56
|
+
*/
|
|
57
|
+
export declare const requestHumanAdvisor: (roomId: string, chatflowId: string, userInfo?: {
|
|
58
|
+
name?: string;
|
|
59
|
+
email?: string;
|
|
60
|
+
phone?: string;
|
|
61
|
+
}, apiHost?: string) => Promise<ApiResponse<{
|
|
62
|
+
requestId: string;
|
|
63
|
+
status: string;
|
|
64
|
+
}>>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if room has active human advisor
|
|
67
|
+
*/
|
|
68
|
+
export declare const hasActiveHumanAdvisor: (roomInfo: RoomInfo | null) => boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Check if room is waiting for human advisor
|
|
71
|
+
*/
|
|
72
|
+
export declare const isWaitingForHuman: (roomInfo: RoomInfo | null) => boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Get stored room ID from localStorage
|
|
75
|
+
*/
|
|
76
|
+
export declare const getStoredRoomId: (chatflowId: string) => string | null;
|
|
77
|
+
/**
|
|
78
|
+
* Store room ID to localStorage
|
|
79
|
+
*/
|
|
80
|
+
export declare const storeRoomId: (chatflowId: string, roomId: string) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Clear stored room ID from localStorage
|
|
83
|
+
*/
|
|
84
|
+
export declare const clearStoredRoomId: (chatflowId: string) => void;
|
|
85
|
+
//# sourceMappingURL=chatRoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatRoom.d.ts","sourceRoot":"","sources":["../../src/api/chatRoom.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAG1E,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAoCD;;GAEG;AACH,eAAO,MAAM,UAAU,eAAsB,MAAM,UAAU,MAAM,YAAY,MAAM,KAAG,QAAQ,YAAY,QAAQ,CAAC,CASpH,CAAC;AAEF;;GAEG;AACH,e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AAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAAgB,MAAM,KAAG,IAMtD,CAAC"}
|
package/dist/components/Bot.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FilePreview } from '@/components/inputs/textInput/components/FilePreview';
|
|
2
2
|
import { BotMessageTheme, DateTimeToggleTheme, DisclaimerPopUpTheme, FeedbackTheme, FooterTheme, TextInputTheme, UserMessageTheme } from '@/features/bubble/types';
|
|
3
3
|
import { FeedbackRatingType } from '@/queries/sendMessageQuery';
|
|
4
|
+
import type { ChartConfig } from '@/types/chart';
|
|
4
5
|
export type FileEvent<T = EventTarget> = {
|
|
5
6
|
target: T;
|
|
6
7
|
};
|
|
@@ -65,6 +66,8 @@ export type MessageType = {
|
|
|
65
66
|
id?: string;
|
|
66
67
|
followUpPrompts?: string;
|
|
67
68
|
dateTime?: string;
|
|
69
|
+
chartConfigs?: ChartConfig[];
|
|
70
|
+
aborted?: boolean;
|
|
68
71
|
};
|
|
69
72
|
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
|
|
70
73
|
export type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
|
|
@@ -109,6 +112,9 @@ export type BotProps = {
|
|
|
109
112
|
externalData?: string;
|
|
110
113
|
callBackFunction?: (e: any) => void;
|
|
111
114
|
callBackIcon?: string;
|
|
115
|
+
onToggleFullScreen?: () => void;
|
|
116
|
+
isFullScreen?: boolean;
|
|
117
|
+
onResetChat?: () => void;
|
|
112
118
|
};
|
|
113
119
|
export type LeadsConfig = {
|
|
114
120
|
status: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bot.d.ts","sourceRoot":"","sources":["../../src/components/Bot.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,WAAW,EAC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,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAuDF,eAAO,MAAM,GAAG,aAAc,QAAQ,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,mCA6xG1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackContentDialog.d.ts","sourceRoot":"","sources":["../../src/components/FeedbackContentDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"FeedbackContentDialog.d.ts","sourceRoot":"","sources":["../../src/components/FeedbackContentDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAE5C,KAAK,0BAA0B,GAAG;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;CAC/B,CAAC;AAKF,QAAA,MAAM,qBAAqB,UAAW,0BAA0B,mCAuF/D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Room Reconnect Alert Component
|
|
3
|
+
* Shows alert when user has an active human advisor session that can be reconnected
|
|
4
|
+
*/
|
|
5
|
+
import { JSX } from 'solid-js';
|
|
6
|
+
export interface RoomReconnectAlertProps {
|
|
7
|
+
roomId: string;
|
|
8
|
+
advisorName?: string;
|
|
9
|
+
onReconnect: () => void;
|
|
10
|
+
onDismiss: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const RoomReconnectAlert: (props: RoomReconnectAlertProps) => JSX.Element;
|
|
13
|
+
export default RoomReconnectAlert;
|
|
14
|
+
//# sourceMappingURL=RoomReconnectAlert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoomReconnectAlert.d.ts","sourceRoot":"","sources":["../../src/components/RoomReconnectAlert.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,kBAAkB,UAAW,uBAAuB,KAAG,WA4D5D,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IAction, MessageType } from '../Bot';
|
|
2
2
|
import { DateTimeToggleTheme } from '@/features/bubble/types';
|
|
3
|
+
import type { ChartConfig } from '@/types/chart';
|
|
3
4
|
type Props = {
|
|
4
5
|
message: MessageType;
|
|
5
6
|
setMessages?: any;
|
|
@@ -29,6 +30,10 @@ type Props = {
|
|
|
29
30
|
callBackIcon?: string;
|
|
30
31
|
callBackFunction?: (e: any) => void;
|
|
31
32
|
checkShowCallbackBtn?: boolean;
|
|
33
|
+
pendingCharts?: Map<string, Partial<ChartConfig>>;
|
|
34
|
+
completedCharts?: Map<string, ChartConfig>;
|
|
35
|
+
isLastMessage?: boolean;
|
|
36
|
+
onRetry?: () => void;
|
|
32
37
|
};
|
|
33
38
|
export declare const BotBubble: (props: Props) => import("solid-js").JSX.Element;
|
|
34
39
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BotBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/BotBubble.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BotBubble.d.ts","source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AE,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IAClD,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAWF,eAAO,MAAM,SAAS,UAAW,KAAK,mCAo4BrC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ChartOptions } from 'chart.js';
|
|
2
|
+
import type { ChartBubbleProps, SupportedChartType } from '@/types/chart';
|
|
3
|
+
/**
|
|
4
|
+
* Vietnamese Government Style Color Palette
|
|
5
|
+
* Based on official Vietnamese flag colors and professional government design standards
|
|
6
|
+
* Primary: Red (#C8102E) - symbolizes revolution and sacrifice
|
|
7
|
+
* Secondary: Gold (#FFCD00) - symbolizes prosperity and national identity
|
|
8
|
+
* Supporting colors for multi-series data visualization with accessibility in mind
|
|
9
|
+
*/
|
|
10
|
+
export declare const vnGovColors: {
|
|
11
|
+
primary: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
palette: string[];
|
|
14
|
+
paletteFill: string[];
|
|
15
|
+
paletteLineFill: string[];
|
|
16
|
+
text: {
|
|
17
|
+
primary: string;
|
|
18
|
+
secondary: string;
|
|
19
|
+
light: string;
|
|
20
|
+
};
|
|
21
|
+
grid: {
|
|
22
|
+
line: string;
|
|
23
|
+
border: string;
|
|
24
|
+
axis: string;
|
|
25
|
+
};
|
|
26
|
+
container: {
|
|
27
|
+
background: string;
|
|
28
|
+
border: string;
|
|
29
|
+
shadow: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Professional Vietnamese government chart typography settings
|
|
34
|
+
* Using system sans-serif fonts for clean, official appearance
|
|
35
|
+
*/
|
|
36
|
+
export declare const vnGovTypography: {
|
|
37
|
+
fontFamily: string;
|
|
38
|
+
title: {
|
|
39
|
+
size: number;
|
|
40
|
+
weight: "bold";
|
|
41
|
+
lineHeight: number;
|
|
42
|
+
};
|
|
43
|
+
legend: {
|
|
44
|
+
size: number;
|
|
45
|
+
weight: "bold";
|
|
46
|
+
};
|
|
47
|
+
axis: {
|
|
48
|
+
size: number;
|
|
49
|
+
weight: "normal";
|
|
50
|
+
};
|
|
51
|
+
tooltip: {
|
|
52
|
+
size: number;
|
|
53
|
+
weight: "normal";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Applies Vietnamese government color palette to chart datasets
|
|
58
|
+
* Ensures consistent, professional appearance across all chart types
|
|
59
|
+
*/
|
|
60
|
+
export declare const applyVnGovColorsToDatasets: (data: ChartBubbleProps['config']['data'], chartType: SupportedChartType) => ChartBubbleProps['config']['data'];
|
|
61
|
+
/**
|
|
62
|
+
* Creates Vietnamese government-styled chart options
|
|
63
|
+
* Professional appearance suitable for official reports and dashboards
|
|
64
|
+
*/
|
|
65
|
+
export declare const createVnGovChartOptions: (chartType: SupportedChartType, title: string | undefined, textColor: string) => ChartOptions;
|
|
66
|
+
/**
|
|
67
|
+
* SolidJS component that renders a Chart.js chart with Vietnamese government styling.
|
|
68
|
+
* Features professional color palette, typography, and visual design appropriate
|
|
69
|
+
* for official government reports, dashboards, and publications.
|
|
70
|
+
*/
|
|
71
|
+
export declare const ChartBubble: (props: ChartBubbleProps) => import("solid-js").JSX.Element;
|
|
72
|
+
export default ChartBubble;
|
|
73
|
+
//# sourceMappingURL=ChartBubble.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAM1E;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;CA0DvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;CAmB3B,CAAC;AAoGF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,SAC/B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,aAC7B,kBAAkB,KAC5B,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAiGnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,cACvB,kBAAkB,SACtB,MAAM,GAAG,SAAS,aACd,MAAM,KAChB,YAkJF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,mCAsElD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChartLoadingPlaceholderProps } from '@/types/chart';
|
|
2
|
+
/**
|
|
3
|
+
* Loading skeleton component displayed while chart data is streaming.
|
|
4
|
+
* Shows an animated placeholder with a chart icon.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ChartLoadingPlaceholder: (props: ChartLoadingPlaceholderProps) => import("solid-js").JSX.Element;
|
|
7
|
+
export default ChartLoadingPlaceholder;
|
|
8
|
+
//# sourceMappingURL=ChartLoadingPlaceholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartLoadingPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartLoadingPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAIlE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,UAAW,4BAA4B,mCAkI1E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ChartConfig } from '@/types/chart';
|
|
2
|
+
export interface ChartPlaceholderProps {
|
|
3
|
+
chartId: string;
|
|
4
|
+
/** Getter function that returns the chart config. Using a getter ensures reactivity when rendered via SolidJS render(). */
|
|
5
|
+
getConfig?: () => ChartConfig | null | undefined;
|
|
6
|
+
/** Getter function that returns loading state. Using a getter ensures reactivity when rendered via SolidJS render(). */
|
|
7
|
+
getIsLoading?: () => boolean;
|
|
8
|
+
/** Getter function that returns true while streaming is in progress. Using a getter ensures reactivity when rendered via SolidJS render(). */
|
|
9
|
+
isStreaming?: () => boolean;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
textColor?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Simplified placeholder component that renders charts directly inline.
|
|
15
|
+
* Uses StableChartWrapper to ensure charts are only rendered once when config is available.
|
|
16
|
+
* Includes a fullscreen button to open the chart in a popup modal with zoom/pan capabilities.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ChartPlaceholder: (props: ChartPlaceholderProps) => import("solid-js").JSX.Element;
|
|
19
|
+
export default ChartPlaceholder;
|
|
20
|
+
//# sourceMappingURL=ChartPlaceholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartPlaceholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,2HAA2H;IAC3H,SAAS,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,wHAAwH;IACxH,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,8IAA8I;IAC9I,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,mCA+E5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartPopupModal.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/ChartPopupModal.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAS1D,eAAO,MAAM,eAAe,UAAW,oBAAoB,mCAiO1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
type Props = {
|
|
2
|
+
streamingStartTime?: number | null;
|
|
3
|
+
elapsedStreamingTime?: number;
|
|
4
|
+
hideTimer?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const LoadingBubble: (props: Props) => import("solid-js").JSX.Element;
|
|
7
|
+
export {};
|
|
2
8
|
//# sourceMappingURL=LoadingBubble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/LoadingBubble.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/LoadingBubble.tsx"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG;IACX,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,KAAK,mCAWzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/SourceBubble.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"SourceBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/SourceBubble.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,KAAK,mCAmDxC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChartConfig } from '@/types/chart';
|
|
2
|
+
export interface StableChartWrapperProps {
|
|
3
|
+
chartId: string;
|
|
4
|
+
/** Getter function for reactive config updates */
|
|
5
|
+
getConfig?: () => ChartConfig | null | undefined;
|
|
6
|
+
/** Getter function for reactive loading state updates */
|
|
7
|
+
getIsLoading?: () => boolean;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
textColor?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A stable wrapper component that renders ChartBubble only ONCE when config becomes available.
|
|
13
|
+
* Uses manual DOM rendering via solid-js/web render() to bypass reactive updates.
|
|
14
|
+
* This prevents re-renders during streaming updates.
|
|
15
|
+
*/
|
|
16
|
+
export declare const StableChartWrapper: (props: StableChartWrapperProps) => import("solid-js").JSX.Element;
|
|
17
|
+
export default StableChartWrapper;
|
|
18
|
+
//# sourceMappingURL=StableChartWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StableChartWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/StableChartWrapper.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,UAAW,uBAAuB,mCAmGhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StarterPromptBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/StarterPromptBubble.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AACF,eAAO,MAAM,mBAAmB,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"StarterPromptBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/StarterPromptBubble.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AACF,eAAO,MAAM,mBAAmB,UAAW,KAAK,mCA0B/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ICopyMessageButtonProps {
|
|
2
|
+
class?: string;
|
|
3
|
+
isLoading?: boolean;
|
|
4
|
+
onCopy?: (text: string) => void;
|
|
5
|
+
copiedDuration?: number;
|
|
6
|
+
textToCopy: string;
|
|
7
|
+
}
|
|
8
|
+
declare const CopyMessageButton: (props: ICopyMessageButtonProps) => import("solid-js").JSX.Element;
|
|
9
|
+
export default CopyMessageButton;
|
|
10
|
+
//# sourceMappingURL=CopyMessageButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyMessageButton.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/CopyMessageButton.tsx"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,iBAAiB,UAAW,uBAAuB,mCA6CxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface IEditMessageButtonProps {
|
|
2
|
+
class?: string;
|
|
3
|
+
isLoading?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const EditMessageButton: (props: IEditMessageButtonProps) => import("solid-js").JSX.Element;
|
|
7
|
+
export default EditMessageButton;
|
|
8
|
+
//# sourceMappingURL=EditMessageButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditMessageButton.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/EditMessageButton.tsx"],"names":[],"mappings":"AAEA,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,iBAAiB,UAAW,uBAAuB,mCAmBxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupToast.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/PopupToast.tsx"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,UAAU,UAAW,WAAW,mCAwCrC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -7,6 +7,7 @@ type SendButtonProps = {
|
|
|
7
7
|
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
8
|
export declare const SendButton: (props: SendButtonProps) => JSX.Element;
|
|
9
9
|
export declare const DeleteButton: (props: SendButtonProps) => JSX.Element;
|
|
10
|
+
export declare const FullScreenButton: (props: SendButtonProps) => JSX.Element;
|
|
10
11
|
export declare const Spinner: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=SendButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendButton.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/SendButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,UAAU,UAAW,eAAe,gBAiBhD,CAAC;AACF,eAAO,MAAM,YAAY,UAAW,eAAe,gBAsBlD,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAgBjE,CAAC"}
|
|
1
|
+
{"version":3,"file":"SendButton.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/SendButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,UAAU,UAAW,eAAe,gBAiBhD,CAAC;AACF,eAAO,MAAM,YAAY,UAAW,eAAe,gBAsBlD,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,eAAe,gBAsBtD,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAgBjE,CAAC"}
|