@uraiagent/react 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -0
- package/dist/Root.d.ts +8 -0
- package/dist/Widget.d.ts +1 -0
- package/dist/components/Agent/AgentAvatar.d.ts +1 -0
- package/dist/components/Agent/AgentInitialMessage.d.ts +3 -0
- package/dist/components/Agent/AgentMaximize.d.ts +1 -0
- package/dist/components/Agent/AgentMessage.d.ts +2 -0
- package/dist/components/Agent/AgentMessageWrapper.d.ts +9 -0
- package/dist/components/Agent/index.d.ts +5 -0
- package/dist/components/Chat/ChatFooter.d.ts +1 -0
- package/dist/components/Chat/ChatHeader.d.ts +1 -0
- package/dist/components/Chat/ChatLoader.d.ts +6 -0
- package/dist/components/Chat/ChatScreen.d.ts +1 -0
- package/dist/components/Chat/ChatWarning.d.ts +4 -0
- package/dist/components/Chat/WidgetTrigger.d.ts +10 -0
- package/dist/components/Chat/index.d.ts +6 -0
- package/dist/components/Dialog/Dialog.d.ts +12 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Event/Confirmation.d.ts +4 -0
- package/dist/components/Event/EventMessage.d.ts +2 -0
- package/dist/components/Event/Fallback.d.ts +7 -0
- package/dist/components/Event/FollowUp.d.ts +4 -0
- package/dist/components/Event/Handoff.d.ts +4 -0
- package/dist/components/Event/Progress.d.ts +1 -0
- package/dist/components/Event/Text.d.ts +9 -0
- package/dist/components/Event/index.d.ts +7 -0
- package/dist/components/Loader.d.ts +5 -0
- package/dist/components/User/UserAvatar.d.ts +1 -0
- package/dist/components/User/UserMessage.d.ts +2 -0
- package/dist/components/User/index.d.ts +2 -0
- package/dist/components/Voice/VoiceRecorder.d.ts +4 -0
- package/dist/components/Voice/index.d.ts +1 -0
- package/dist/components/Vote/Vote.d.ts +3 -0
- package/dist/components/Vote/index.d.ts +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/contexts/ConfigContext.d.ts +10 -0
- package/dist/contexts/DialogContext.d.ts +10 -0
- package/dist/contexts/LanguageProvider.d.ts +10 -0
- package/dist/contexts/MessageProvider.d.ts +12 -0
- package/dist/contexts/WidgetContext.d.ts +23 -0
- package/dist/contexts/index.d.ts +5 -0
- package/dist/contexts/session/SessionContext.d.ts +12 -0
- package/dist/contexts/session/index.d.ts +2 -0
- package/dist/contexts/session/session.api.d.ts +61 -0
- package/dist/contexts/session/session.cookie.d.ts +3 -0
- package/dist/contexts/socket/SocketContext.d.ts +15 -0
- package/dist/contexts/socket/channels.d.ts +2 -0
- package/dist/contexts/socket/index.d.ts +1 -0
- package/dist/contexts/socket/pusher.client.d.ts +9 -0
- package/dist/contexts/socket/ws.config.d.ts +15 -0
- package/dist/helpers/ComponentRegistry.d.ts +13 -0
- package/dist/helpers/MessageHandler.d.ts +78 -0
- package/dist/hooks/index.d.ts +11 -0
- package/dist/hooks/useAsyncFn.d.ts +23 -0
- package/dist/hooks/useAudioRecord.d.ts +27 -0
- package/dist/hooks/useCanSend.d.ts +6 -0
- package/dist/hooks/useChatLoading.d.ts +1 -0
- package/dist/hooks/useChatState.d.ts +1 -0
- package/dist/hooks/useDocumentDirection.d.ts +7 -0
- package/dist/hooks/useMountedState.d.ts +1 -0
- package/dist/hooks/useOutsideClick.d.ts +1 -0
- package/dist/hooks/useScrollTo.d.ts +2 -0
- package/dist/hooks/useSendMessage.d.ts +3 -0
- package/dist/hooks/useToast.d.ts +44 -0
- package/dist/hooks/useToggle.d.ts +2 -0
- package/dist/hooks/useTrigger.d.ts +1 -0
- package/dist/hooks/useVote.d.ts +2 -0
- package/dist/index.cjs.js +202 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +88453 -0
- package/dist/interfaces/components.d.ts +9 -0
- package/dist/interfaces/config.d.ts +101 -0
- package/dist/interfaces/form.d.ts +15 -0
- package/dist/interfaces/helpers.d.ts +2 -0
- package/dist/interfaces/index.d.ts +5 -0
- package/dist/interfaces/messages.d.ts +127 -0
- package/dist/interfaces/translations.d.ts +3 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/icons.d.ts +1 -0
- package/dist/utils/index.d.ts +126 -0
- package/dist/utils/map.d.ts +9 -0
- package/dist-embed/agent.js +204 -0
- package/package.json +110 -0
package/package.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uraiagent/react",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Customizable, embeddable AI chat widget — use as a React library or a drop-in inline embed script.",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "vite --host",
|
|
12
|
+
"clean": "rm -rf ./dist ./dist-embed",
|
|
13
|
+
"build:embed": "tsc && vite build",
|
|
14
|
+
"build:lib": "vite build -c vite.lib.config.ts",
|
|
15
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
16
|
+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"release": "release-it",
|
|
19
|
+
"prepublishOnly": "pnpm build:lib && pnpm build:embed",
|
|
20
|
+
"update-dashboard-agent": "pnpm build:embed && mv ./dist-embed/*.js ../dashboard/public/agent.js"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"framer-motion": "^11.2.4",
|
|
24
|
+
"postcss": "^8.4.33",
|
|
25
|
+
"react": "^18.x"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@eslint/js": "^10.0.1",
|
|
29
|
+
"@types/node": "^25.8.0",
|
|
30
|
+
"@types/react": "^19.2.14",
|
|
31
|
+
"@types/react-dom": "^19.2.3",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
|
33
|
+
"@typescript-eslint/parser": "^8.59.3",
|
|
34
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
35
|
+
"eslint": "^10.4.0",
|
|
36
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
37
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
38
|
+
"postcss": "^8.5.14",
|
|
39
|
+
"prettier": "^3.8.3",
|
|
40
|
+
"react": "^19.2.6",
|
|
41
|
+
"react-dom": "^19.2.6",
|
|
42
|
+
"release-it": "^20.0.1",
|
|
43
|
+
"typescript": "^6.0.3",
|
|
44
|
+
"typescript-eslint": "^8.59.3",
|
|
45
|
+
"vite": "^8.0.13",
|
|
46
|
+
"vite-plugin-dts": "^5.0.0",
|
|
47
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist",
|
|
51
|
+
"dist-embed"
|
|
52
|
+
],
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Abdellatif-E",
|
|
55
|
+
"url": "https://github.com/Abdellatif-E"
|
|
56
|
+
},
|
|
57
|
+
"main": "./dist/index.js",
|
|
58
|
+
"types": "./dist/index.d.ts",
|
|
59
|
+
"exports": {
|
|
60
|
+
".": {
|
|
61
|
+
"require": "./dist/index.cjs.js",
|
|
62
|
+
"import": "./dist/index.es.js",
|
|
63
|
+
"default": "./dist/index.es.js",
|
|
64
|
+
"types": "./dist/index.d.ts"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@heroicons/react": "^2.2.0",
|
|
69
|
+
"@hookform/resolvers": "^5.2.2",
|
|
70
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
71
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
72
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
73
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
74
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
75
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
76
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
77
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
78
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
79
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
80
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
81
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
82
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
83
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
84
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
85
|
+
"@radix-ui/react-toast": "^1.2.15",
|
|
86
|
+
"@uidotdev/usehooks": "^2.4.1",
|
|
87
|
+
"class-variance-authority": "^0.7.1",
|
|
88
|
+
"clsx": "^2.1.1",
|
|
89
|
+
"cmdk": "^1.1.1",
|
|
90
|
+
"date-fns": "^4.1.0",
|
|
91
|
+
"framer-motion": "^12.38.0",
|
|
92
|
+
"html-react-parser": "^6.1.1",
|
|
93
|
+
"immer": "^11.1.8",
|
|
94
|
+
"input-otp": "^1.4.2",
|
|
95
|
+
"lucide-react": "^1.8.0",
|
|
96
|
+
"nanoid": "^5.1.16",
|
|
97
|
+
"pusher-js": "^8.5.0",
|
|
98
|
+
"react-day-picker": "^10.0.1",
|
|
99
|
+
"react-dropzone": "^15.0.0",
|
|
100
|
+
"react-hook-form": "^7.76.0",
|
|
101
|
+
"react-intersection-observer": "^10.0.3",
|
|
102
|
+
"react-markdown": "^10.1.0",
|
|
103
|
+
"react-phone-number-input": "^3.4.16",
|
|
104
|
+
"react-textarea-autosize": "^8.5.9",
|
|
105
|
+
"remark-gfm": "^4.0.1",
|
|
106
|
+
"sonner": "^2.0.7",
|
|
107
|
+
"vaul": "^1.1.2",
|
|
108
|
+
"zod": "^4.4.3"
|
|
109
|
+
}
|
|
110
|
+
}
|