@admin-layout/tailwind-chat-pro 12.2.4-alpha.76
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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/messages-container-ui/DefaultInputToolBar.d.ts +21 -0
- package/lib/components/messages-container-ui/DefaultInputToolBar.d.ts.map +1 -0
- package/lib/components/messages-container-ui/DefaultInputToolBar.js +46 -0
- package/lib/components/messages-container-ui/DefaultInputToolBar.js.map +1 -0
- package/lib/components/messages-container-ui/DefaultMessageGroup.d.ts +16 -0
- package/lib/components/messages-container-ui/DefaultMessageGroup.d.ts.map +1 -0
- package/lib/components/messages-container-ui/DefaultMessageGroup.js +64 -0
- package/lib/components/messages-container-ui/DefaultMessageGroup.js.map +1 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.d.ts +98 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.d.ts.map +1 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.js +88 -0
- package/lib/components/messages-container-ui/MessagesContainerUI.js.map +1 -0
- package/lib/components/messages-container-ui/PlanModeView.d.ts +107 -0
- package/lib/components/messages-container-ui/PlanModeView.d.ts.map +1 -0
- package/lib/components/messages-container-ui/PlanModeView.js +294 -0
- package/lib/components/messages-container-ui/PlanModeView.js.map +1 -0
- package/lib/components/messages-container-ui/index.d.ts +9 -0
- package/lib/components/messages-container-ui/index.d.ts.map +1 -0
- package/lib/components/messages-container-ui/types.d.ts +63 -0
- package/lib/components/messages-container-ui/types.d.ts.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -0
- package/lib/routes.json +1 -0
- package/package.json +42 -0
- package/rollup.config.mjs +34 -0
- package/src/components/index.ts +1 -0
- package/src/components/messages-container-ui/DefaultInputToolBar.tsx +63 -0
- package/src/components/messages-container-ui/DefaultMessageGroup.tsx +75 -0
- package/src/components/messages-container-ui/MessagesContainerUI.tsx +178 -0
- package/src/components/messages-container-ui/PlanModeView.tsx +457 -0
- package/src/components/messages-container-ui/index.ts +8 -0
- package/src/components/messages-container-ui/types.ts +68 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Messages container UI – types for plan mode (chat / search / research).
|
|
5
|
+
* Messages can be a simple PlanMessage or a full post-like shape passed through
|
|
6
|
+
* to the injected message-group renderer.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface PlanMessage {
|
|
10
|
+
id: string;
|
|
11
|
+
role: 'user' | 'assistant' | 'system';
|
|
12
|
+
content: string;
|
|
13
|
+
createdAt?: Date | string;
|
|
14
|
+
/** Optional: pass through to the injected message-group renderer (propsConfiguration, props, files, etc.) */
|
|
15
|
+
propsConfiguration?: any;
|
|
16
|
+
props?: any;
|
|
17
|
+
files?: any;
|
|
18
|
+
author?: any;
|
|
19
|
+
type?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Props passed to the input toolbar render function. */
|
|
23
|
+
export interface PlanModeViewInputToolbarProps {
|
|
24
|
+
value: string;
|
|
25
|
+
onChange: (text: string) => void;
|
|
26
|
+
onSend: () => void;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CurrentUser {
|
|
31
|
+
id: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
avatar?: string;
|
|
34
|
+
/** Optional: full author shape for the message-group renderer (givenName, familyName, username, etc.) */
|
|
35
|
+
givenName?: string;
|
|
36
|
+
familyName?: string;
|
|
37
|
+
fullName?: string;
|
|
38
|
+
username?: string;
|
|
39
|
+
email?: string;
|
|
40
|
+
picture?: string | null;
|
|
41
|
+
alias?: any[];
|
|
42
|
+
tokens?: any[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Props the base passes to the injected message-group renderer (`MessageGroupComponent`).
|
|
47
|
+
* Mirrors the shape consumed by richer renderers (e.g. messenger-box's
|
|
48
|
+
* `ModernMessageGroupComponent`) so they can be dropped in directly.
|
|
49
|
+
*/
|
|
50
|
+
export interface MessageGroupRenderProps {
|
|
51
|
+
/** One post group to render (the base passes a single mapped post per group). */
|
|
52
|
+
messages: any[];
|
|
53
|
+
currentUser: any;
|
|
54
|
+
onOpen?: (element?: any) => void;
|
|
55
|
+
onMessageClick?: (msg: any) => void;
|
|
56
|
+
isDesktopView?: boolean;
|
|
57
|
+
isSmallScreen?: boolean;
|
|
58
|
+
showAuthorName?: boolean;
|
|
59
|
+
showAvatar?: boolean;
|
|
60
|
+
showTimestamp?: boolean;
|
|
61
|
+
sandboxErrors?: any[];
|
|
62
|
+
currentFiles?: Record<string, string>;
|
|
63
|
+
onFixError?: (errorMessage: string) => Promise<void>;
|
|
64
|
+
showCopyDownloadOnCodeBlock?: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** The injectable message-group renderer. Defaults to a plain-text bubble renderer. */
|
|
68
|
+
export type MessageGroupComponentType = React.ComponentType<MessageGroupRenderProps>;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"resolveJsonModule": true,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"rootDir": "./src",
|
|
7
|
+
"outDir": "lib",
|
|
8
|
+
"declarationDir": "lib",
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"declarationMap": true,
|
|
11
|
+
"jsx": "react-jsx",
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": false,
|
|
14
|
+
"types": ["@types/node", "@types/jest", "../../../typings", "vite/client"]
|
|
15
|
+
},
|
|
16
|
+
"exclude": [
|
|
17
|
+
"node_modules",
|
|
18
|
+
"lib",
|
|
19
|
+
"dist",
|
|
20
|
+
"webpack.config.js",
|
|
21
|
+
"rollup.config.js",
|
|
22
|
+
"src/**/__tests__/**",
|
|
23
|
+
"src/**/*.test.ts",
|
|
24
|
+
"src/**/*.test.tsx"
|
|
25
|
+
],
|
|
26
|
+
"include": ["src"]
|
|
27
|
+
}
|