@opencx/widget 2.0.0
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 +105 -0
- package/dist/basic.cjs +259 -0
- package/dist/basic.cjs.map +1 -0
- package/dist/basic.d.ts +2 -0
- package/dist/basic.js +40507 -0
- package/dist/basic.js.map +1 -0
- package/dist/core/client/api.d.ts +15 -0
- package/dist/core/client/client.d.ts +39 -0
- package/dist/core/client/index.d.ts +1 -0
- package/dist/core/errors/index.d.ts +21 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/managers/chathistory-manager.d.ts +61 -0
- package/dist/core/managers/session-manager.d.ts +35 -0
- package/dist/core/platform/index.d.ts +20 -0
- package/dist/core/transport/http.transport.d.ts +17 -0
- package/dist/core/transport/transport.d.ts +25 -0
- package/dist/core/types/helpers.d.ts +5 -0
- package/dist/core/types/index.d.ts +32 -0
- package/dist/core/types/messages.d.ts +43 -0
- package/dist/core/types/prelude.d.ts +14 -0
- package/dist/core/types/pub-sub.d.ts +94 -0
- package/dist/core/types/schemas.d.ts +489 -0
- package/dist/core/types/transport.d.ts +31 -0
- package/dist/core/utils/genId.d.ts +2 -0
- package/dist/core/utils/genId.test.d.ts +1 -0
- package/dist/core/utils/history-to-widget-messages.d.ts +4 -0
- package/dist/history-to-widget-messages-CP0hKjhv.js +195 -0
- package/dist/history-to-widget-messages-CP0hKjhv.js.map +1 -0
- package/dist/history-to-widget-messages-CdbZolRN.cjs +2 -0
- package/dist/history-to-widget-messages-CdbZolRN.cjs.map +1 -0
- package/dist/index-C11ivBh5.js +2604 -0
- package/dist/index-C11ivBh5.js.map +1 -0
- package/dist/index-DQmRZV3b.cjs +18 -0
- package/dist/index-DQmRZV3b.cjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +445 -0
- package/dist/index.js.map +1 -0
- package/dist/react-lib/Root.d.ts +6 -0
- package/dist/react-lib/hooks/handle-socket-messages.d.ts +27 -0
- package/dist/react-lib/hooks/index.d.ts +6 -0
- package/dist/react-lib/hooks/socket.d.ts +11 -0
- package/dist/react-lib/hooks/socketState.d.ts +2 -0
- package/dist/react-lib/hooks/use-sound.d.ts +13 -0
- package/dist/react-lib/hooks/use-sound.test.d.ts +1 -0
- package/dist/react-lib/hooks/use-sync-state.test.d.ts +1 -0
- package/dist/react-lib/hooks/useAbstractChat.d.ts +159 -0
- package/dist/react-lib/hooks/useAxiosInstance.d.ts +121 -0
- package/dist/react-lib/hooks/useBaseClient.d.ts +2 -0
- package/dist/react-lib/hooks/useScrollTo.d.ts +2 -0
- package/dist/react-lib/hooks/useSyncState.d.ts +4 -0
- package/dist/react-lib/hooks/useTimeoutState.d.ts +3 -0
- package/dist/react-lib/hooks/useUploadFiles.d.ts +21 -0
- package/dist/react-lib/hooks/useVote.d.ts +2 -0
- package/dist/react-lib/hooks/useWidgetContentHeight.d.ts +9 -0
- package/dist/react-lib/index.d.ts +10 -0
- package/dist/react-lib/locales/ar.locale.d.ts +2 -0
- package/dist/react-lib/locales/de.locale.d.ts +2 -0
- package/dist/react-lib/locales/en.locale.d.ts +55 -0
- package/dist/react-lib/locales/fr.locale.d.ts +2 -0
- package/dist/react-lib/locales/helper.d.ts +65 -0
- package/dist/react-lib/locales/index.d.ts +3 -0
- package/dist/react-lib/locales/nl.locale.d.ts +2 -0
- package/dist/react-lib/locales/pt.locale.d.ts +2 -0
- package/dist/react-lib/providers/ChatProvider.d.ts +135 -0
- package/dist/react-lib/providers/ClientProvider.d.ts +7 -0
- package/dist/react-lib/providers/ConfigDataProvider.d.ts +62 -0
- package/dist/react-lib/providers/ContactProvider.d.ts +58 -0
- package/dist/react-lib/providers/LocalesProvider.d.ts +11 -0
- package/dist/react-lib/providers/componentRegistry.d.ts +13 -0
- package/dist/react-lib/providers/use-widget-sfx.d.ts +7 -0
- package/dist/react-lib/providers/usePreludeData.d.ts +2 -0
- package/dist/react-lib/types/components.d.ts +10 -0
- package/dist/react-lib/types/index.d.ts +6 -0
- package/dist/react-lib/types/options.d.ts +43 -0
- package/dist/react-lib/utils/create-safe-context.d.ts +1 -0
- package/dist/react-lib/utils/debug.d.ts +2 -0
- package/dist/react-lib/utils/getters.d.ts +24 -0
- package/dist/react-lib/utils/index.d.ts +1 -0
- package/dist/react.cjs +2 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.ts +2 -0
- package/dist/react.js +41 -0
- package/dist/react.js.map +1 -0
- package/dist/src/@components/BotMessage.d.ts +9 -0
- package/dist/src/@components/BotMessageWrapper.d.ts +7 -0
- package/dist/src/@components/ChatEvent.component.d.ts +9 -0
- package/dist/src/@components/Fallback.component.d.ts +8 -0
- package/dist/src/@components/Loading.component.d.ts +2 -0
- package/dist/src/@components/OpenLogoSvg.d.ts +4 -0
- package/dist/src/@components/Text.component.d.ts +3 -0
- package/dist/src/@components/index.d.ts +6 -0
- package/dist/src/@components/markdown.d.ts +3 -0
- package/dist/src/components/MotionDiv.d.ts +18 -0
- package/dist/src/components/RenderFile.d.ts +7 -0
- package/dist/src/components/avatar.d.ts +6 -0
- package/dist/src/components/button.d.ts +11 -0
- package/dist/src/components/dialog.d.ts +276 -0
- package/dist/src/components/dropdown-menu.d.ts +27 -0
- package/dist/src/components/input.d.ts +5 -0
- package/dist/src/components/keyboard.d.ts +7 -0
- package/dist/src/components/popover.d.ts +8 -0
- package/dist/src/components/skeleton.d.ts +3 -0
- package/dist/src/components/switch.d.ts +4 -0
- package/dist/src/components/tooltip.d.ts +10 -0
- package/dist/src/components/userMessage.d.ts +8 -0
- package/dist/src/components/wobble.d.ts +15 -0
- package/dist/src/designs/basic/WidgetPopoverTrigger.d.ts +5 -0
- package/dist/src/designs/basic/index.d.ts +5 -0
- package/dist/src/designs/basic/screens/chat-screen/ChatFooter.d.ts +2 -0
- package/dist/src/designs/basic/screens/chat-screen/ChatHeader.d.ts +2 -0
- package/dist/src/designs/basic/screens/chat-screen/ChatScreen.d.ts +2 -0
- package/dist/src/designs/basic/screens/chat-screen/SessionClosedDialog.d.ts +2 -0
- package/dist/src/designs/basic/screens/root-screen.d.ts +2 -0
- package/dist/src/designs/basic/screens/welcome-screen/WelcomeScreen.d.ts +2 -0
- package/dist/src/designs/constants.d.ts +15 -0
- package/dist/src/hooks/useShouldCollectData.d.ts +3 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/render.d.ts +2 -0
- package/dist/src/utils.d.ts +2 -0
- package/dist/style.css +1 -0
- package/dist-embed/script.js +476 -0
- package/dist-embed/script.js.map +1 -0
- package/package.json +153 -0
package/package.json
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opencx/widget",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"lucide-react": "^0.412.0",
|
|
11
|
+
"react": "^18.3.1",
|
|
12
|
+
"rehype-raw": "^7.0.0"
|
|
13
|
+
},
|
|
14
|
+
"peerDependenciesMeta": {
|
|
15
|
+
"react": {
|
|
16
|
+
"optional": true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"optionalDependencies": {
|
|
20
|
+
"axios": "^1.7.5",
|
|
21
|
+
"socket.io-client": "^4.7.5",
|
|
22
|
+
"zod": "^3.23.8"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@radix-ui/react-avatar": "^1.1.0",
|
|
26
|
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
27
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
28
|
+
"@radix-ui/react-switch": "^1.1.0",
|
|
29
|
+
"@radix-ui/react-tooltip": "^1.1.2",
|
|
30
|
+
"clsx": "^2.1.1",
|
|
31
|
+
"date-fns": "^4.1.0",
|
|
32
|
+
"framer-motion": "^11.3.30",
|
|
33
|
+
"lodash.set": "^4.3.2",
|
|
34
|
+
"lucide-react": "^0.436.0",
|
|
35
|
+
"mutative": "^1.0.11",
|
|
36
|
+
"react-dropzone": "^14.3.5",
|
|
37
|
+
"react-hot-toast": "^2.4.1",
|
|
38
|
+
"tinycolor2": "^1.6.0",
|
|
39
|
+
"zod": "^3.23.8"
|
|
40
|
+
},
|
|
41
|
+
"overrides": {
|
|
42
|
+
"@opencx/widget": {
|
|
43
|
+
"react": {
|
|
44
|
+
"optional": true,
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"react-hot-toast": "^2.4.1",
|
|
47
|
+
"react-markdown": "^9.0.1",
|
|
48
|
+
"framer-motion": "^11.3.30",
|
|
49
|
+
"date-fns": "^4.1.0"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"conditionalDependencies": {
|
|
55
|
+
"react": {
|
|
56
|
+
"react-hot-toast": "^2.4.1",
|
|
57
|
+
"react-markdown": "^9.0.1",
|
|
58
|
+
"framer-motion": "^11.3.30",
|
|
59
|
+
"date-fns": "^4.1.0"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist",
|
|
64
|
+
"dist-embed"
|
|
65
|
+
],
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/openchatai/OpenCopilot/issues"
|
|
68
|
+
},
|
|
69
|
+
"author": {
|
|
70
|
+
"name": "openchatai",
|
|
71
|
+
"url": "https://github.com/openchatai"
|
|
72
|
+
},
|
|
73
|
+
"main": "./dist/index.js",
|
|
74
|
+
"module": "./dist/index.js",
|
|
75
|
+
"types": "./dist/index.d.ts",
|
|
76
|
+
"sideEffects": false,
|
|
77
|
+
"exports": {
|
|
78
|
+
".": {
|
|
79
|
+
"types": "./dist/index.d.ts",
|
|
80
|
+
"import": "./dist/index.js",
|
|
81
|
+
"require": "./dist/index.cjs"
|
|
82
|
+
},
|
|
83
|
+
"./basic": {
|
|
84
|
+
"types": "./dist/basic.d.ts",
|
|
85
|
+
"import": "./dist/basic.js",
|
|
86
|
+
"require": "./dist/basic.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./react": {
|
|
89
|
+
"types": "./dist/react.d.ts",
|
|
90
|
+
"import": "./dist/react.js",
|
|
91
|
+
"require": "./dist/react.cjs"
|
|
92
|
+
},
|
|
93
|
+
"./package.json": "./package.json",
|
|
94
|
+
"./dist/*.css": "./dist/*.css"
|
|
95
|
+
},
|
|
96
|
+
"devDependencies": {
|
|
97
|
+
"@biomejs/biome": "1.9.4",
|
|
98
|
+
"@changesets/cli": "^2.27.9",
|
|
99
|
+
"@radix-ui/react-popover": "^1.1.2",
|
|
100
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
101
|
+
"@testing-library/dom": "^10.4.0",
|
|
102
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
103
|
+
"@testing-library/react": "^16.0.1",
|
|
104
|
+
"@types/lodash.debounce": "^4.0.9",
|
|
105
|
+
"@types/lodash.set": "^4.3.9",
|
|
106
|
+
"@types/node": "^20.14.8",
|
|
107
|
+
"@types/react": "^18.3.4",
|
|
108
|
+
"@types/react-dom": "^18.3.0",
|
|
109
|
+
"@types/tinycolor2": "^1.4.6",
|
|
110
|
+
"@uiw/react-iframe": "^1.0.3",
|
|
111
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
112
|
+
"autoprefixer": "^10.4.20",
|
|
113
|
+
"axios": "^1.7.5",
|
|
114
|
+
"class-variance-authority": "^0.7.0",
|
|
115
|
+
"jsdom": "^25.0.1",
|
|
116
|
+
"mutative": "^1.0.11",
|
|
117
|
+
"postcss": "^8.4.41",
|
|
118
|
+
"postcss-prefix-selector": "^1.16.1",
|
|
119
|
+
"react": "^18.3.1",
|
|
120
|
+
"react-dom": "^18.3.1",
|
|
121
|
+
"react-markdown": "^9.0.1",
|
|
122
|
+
"react-use": "^17.5.1",
|
|
123
|
+
"rehype-raw": "^7.0.0",
|
|
124
|
+
"remark-gfm": "^4.0.0",
|
|
125
|
+
"socket.io-client": "^4.7.5",
|
|
126
|
+
"swr": "^2.2.5",
|
|
127
|
+
"tailwind-merge": "^2.4.0",
|
|
128
|
+
"tailwindcss": "^3.4.6",
|
|
129
|
+
"tailwindcss-animate": "^1.0.7",
|
|
130
|
+
"typescript": "^5.5.4",
|
|
131
|
+
"vite": "^5.4.2",
|
|
132
|
+
"vite-plugin-dts": "4.0.3",
|
|
133
|
+
"vite-plugin-externalize-deps": "^0.8.0",
|
|
134
|
+
"vite-tsconfig-paths": "^5.0.1",
|
|
135
|
+
"vitest": "^2.0.5"
|
|
136
|
+
},
|
|
137
|
+
"scripts": {
|
|
138
|
+
"clean": "rm -rf ./dist ./dist-embed",
|
|
139
|
+
"clean:dist": "rm -rf ./dist ./dist-embed",
|
|
140
|
+
"build:lib": "vite build",
|
|
141
|
+
"dev": "vite -c vite.config.ts",
|
|
142
|
+
"build:embed": "vite build -c vite.embed.config.ts",
|
|
143
|
+
"test": "vitest run",
|
|
144
|
+
"batman": "pnpm build:lib && pnpm build:embed",
|
|
145
|
+
"test:watch": "vitest --watch",
|
|
146
|
+
"cs": "changeset",
|
|
147
|
+
"csv": "changeset version",
|
|
148
|
+
"csp": "changeset publish",
|
|
149
|
+
"type-check": "tsc --noEmit",
|
|
150
|
+
"lint": "biome lint --fix",
|
|
151
|
+
"format": "biome format --fix"
|
|
152
|
+
}
|
|
153
|
+
}
|