@opencx/widget 3.0.100 → 4.0.18
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 +3 -73
- package/dist-embed/script.js +151 -194
- package/dist-embed/script.js.map +1 -1
- package/package.json +10 -173
- package/dist/designs.cjs +0 -79
- package/dist/designs.cjs.map +0 -1
- package/dist/designs.d.ts +0 -2
- package/dist/designs.js +0 -17770
- package/dist/designs.js.map +0 -1
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -8
- package/dist/index.js.map +0 -1
- package/dist/is-exhaustive-9o43S91P.cjs +0 -2
- package/dist/is-exhaustive-9o43S91P.cjs.map +0 -1
- package/dist/is-exhaustive-DGJzQK69.js +0 -7
- package/dist/is-exhaustive-DGJzQK69.js.map +0 -1
- package/dist/react.cjs +0 -2
- package/dist/react.cjs.map +0 -1
- package/dist/react.d.ts +0 -2
- package/dist/react.js +0 -34
- package/dist/react.js.map +0 -1
- package/dist/src/designs/react/WidgetPopoverAnchor.d.ts +0 -2
- package/dist/src/designs/react/WidgetPopoverContent.d.ts +0 -3
- package/dist/src/designs/react/WidgetPopoverTrigger.d.ts +0 -3
- package/dist/src/designs/react/components/AgentOrBotAvatar.d.ts +0 -6
- package/dist/src/designs/react/components/AttachmentPreview.d.ts +0 -7
- package/dist/src/designs/react/components/BotOrAgentMessage.d.ts +0 -7
- package/dist/src/designs/react/components/BotOrAgentMessageGroup.d.ts +0 -7
- package/dist/src/designs/react/components/Header.d.ts +0 -3
- package/dist/src/designs/react/components/MightSolveUserIssueSuggestedReplies.d.ts +0 -2
- package/dist/src/designs/react/components/PoweredByOpen.d.ts +0 -4
- package/dist/src/designs/react/components/SuggestedReplyButton.d.ts +0 -5
- package/dist/src/designs/react/components/UserMessage.d.ts +0 -8
- package/dist/src/designs/react/components/UserMessageGroup.d.ts +0 -5
- package/dist/src/designs/react/components/VoteButtons.d.ts +0 -8
- package/dist/src/designs/react/components/custom-components/BotOrAgentTextResponse.component.d.ts +0 -16
- package/dist/src/designs/react/components/custom-components/Fallback.component.d.ts +0 -6
- package/dist/src/designs/react/components/custom-components/Handoff.component.d.ts +0 -3
- package/dist/src/designs/react/components/custom-components/Loading.component.d.ts +0 -6
- package/dist/src/designs/react/components/lib/DynamicIcon.d.ts +0 -6
- package/dist/src/designs/react/components/lib/LoadingSpinner.d.ts +0 -4
- package/dist/src/designs/react/components/lib/MotionDiv.d.ts +0 -19
- package/dist/src/designs/react/components/lib/avatar.d.ts +0 -6
- package/dist/src/designs/react/components/lib/button.d.ts +0 -11
- package/dist/src/designs/react/components/lib/dialog.d.ts +0 -24
- package/dist/src/designs/react/components/lib/dropdown-menu.d.ts +0 -27
- package/dist/src/designs/react/components/lib/input.d.ts +0 -4
- package/dist/src/designs/react/components/lib/popover.d.ts +0 -8
- package/dist/src/designs/react/components/lib/skeleton.d.ts +0 -3
- package/dist/src/designs/react/components/lib/switch.d.ts +0 -4
- package/dist/src/designs/react/components/lib/tooltip.d.ts +0 -10
- package/dist/src/designs/react/components/lib/utils/cn.d.ts +0 -2
- package/dist/src/designs/react/components/lib/widget-portal.d.ts +0 -9
- package/dist/src/designs/react/components/lib/wobble.d.ts +0 -26
- package/dist/src/designs/react/components/markdown.d.ts +0 -3
- package/dist/src/designs/react/components/svg/ChatBubbleSvg.d.ts +0 -5
- package/dist/src/designs/react/components/svg/OpenLogoSvg.d.ts +0 -4
- package/dist/src/designs/react/hooks/useCanvas.d.ts +0 -3
- package/dist/src/designs/react/hooks/useIsSmallScreen.d.ts +0 -3
- package/dist/src/designs/react/hooks/useLocale.d.ts +0 -6
- package/dist/src/designs/react/hooks/useSetWidgetSize.d.ts +0 -8
- package/dist/src/designs/react/hooks/useTheme.d.ts +0 -62
- package/dist/src/designs/react/hooks/useWidgetContentHeight.d.ts +0 -3
- package/dist/src/designs/react/index.d.ts +0 -9
- package/dist/src/designs/react/screens/chat/ChatCanvas.d.ts +0 -2
- package/dist/src/designs/react/screens/chat/ChatFooter.d.ts +0 -2
- package/dist/src/designs/react/screens/chat/ChatMain.d.ts +0 -2
- package/dist/src/designs/react/screens/chat/index.d.ts +0 -2
- package/dist/src/designs/react/screens/index.d.ts +0 -2
- package/dist/src/designs/react/screens/sessions/index.d.ts +0 -2
- package/dist/src/designs/react/screens/welcome/index.d.ts +0 -2
- package/dist/src/designs/react/utils/data-component.d.ts +0 -7
- package/dist/src/designs/react/utils/group-messages-by-type.d.ts +0 -5
- package/dist/src/designs/translation/ar.locale.d.ts +0 -2
- package/dist/src/designs/translation/de.locale.d.ts +0 -2
- package/dist/src/designs/translation/en.locale.d.ts +0 -2
- package/dist/src/designs/translation/es.locale.d.ts +0 -2
- package/dist/src/designs/translation/fr.locale.d.ts +0 -2
- package/dist/src/designs/translation/index.d.ts +0 -16
- package/dist/src/designs/translation/nl.locale.d.ts +0 -2
- package/dist/src/designs/translation/pt.locale.d.ts +0 -2
- package/dist/src/designs/translation/tr.locale.d.ts +0 -2
- package/dist/src/designs/translation/translation.types.d.ts +0 -4
- package/dist/src/embedded/index.d.ts +0 -11
- package/dist/src/headless/core/__tests__/api-caller.mock.d.ts +0 -1
- package/dist/src/headless/core/__tests__/context/contact/auth/auto-create-unverified-anonymous.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/auth/auto-create-unverified-with-user-data-provided-by-org.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/auth/manually-create-unverified-with-user-data-provided-by-user.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/auth/with-secure-token.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/context/contact/should-collect-data.spec.d.ts +0 -0
- package/dist/src/headless/core/__tests__/test-utils.d.ts +0 -419
- package/dist/src/headless/core/__tests__/utils/Poller.spec.d.ts +0 -1
- package/dist/src/headless/core/__tests__/utils/PrimitiveState.spec.d.ts +0 -1
- package/dist/src/headless/core/__tests__/utils/uuid.spec.d.ts +0 -1
- package/dist/src/headless/core/api/api-caller.d.ts +0 -437
- package/dist/src/headless/core/api/client.d.ts +0 -12
- package/dist/src/headless/core/api/schema.d.ts +0 -928
- package/dist/src/headless/core/context/active-session-polling.ctx.d.ts +0 -25
- package/dist/src/headless/core/context/contact.ctx.d.ts +0 -30
- package/dist/src/headless/core/context/message.ctx.d.ts +0 -38
- package/dist/src/headless/core/context/router.ctx.d.ts +0 -33
- package/dist/src/headless/core/context/session.ctx.d.ts +0 -119
- package/dist/src/headless/core/context/storage.ctx.d.ts +0 -15
- package/dist/src/headless/core/context/widget.ctx.d.ts +0 -27
- package/dist/src/headless/core/index.d.ts +0 -15
- package/dist/src/headless/core/types/agent-or-bot.d.ts +0 -6
- package/dist/src/headless/core/types/component-name.d.ts +0 -1
- package/dist/src/headless/core/types/dtos.d.ts +0 -12
- package/dist/src/headless/core/types/external-storage.d.ts +0 -5
- package/dist/src/headless/core/types/helpers.d.ts +0 -2
- package/dist/src/headless/core/types/icons.d.ts +0 -3
- package/dist/src/headless/core/types/json-value.d.ts +0 -7
- package/dist/src/headless/core/types/messages.d.ts +0 -55
- package/dist/src/headless/core/types/widget-config.d.ts +0 -400
- package/dist/src/headless/core/utils/Poller.d.ts +0 -12
- package/dist/src/headless/core/utils/PrimitiveState.d.ts +0 -13
- package/dist/src/headless/core/utils/is-exhaustive.d.ts +0 -1
- package/dist/src/headless/core/utils/run-catching.d.ts +0 -13
- package/dist/src/headless/core/utils/uuid.d.ts +0 -1
- package/dist/src/headless/react/ComponentRegistry.d.ts +0 -10
- package/dist/src/headless/react/WidgetProvider.d.ts +0 -25
- package/dist/src/headless/react/hooks/useConfig.d.ts +0 -1
- package/dist/src/headless/react/hooks/useContact.d.ts +0 -12
- package/dist/src/headless/react/hooks/useDocumentDir.d.ts +0 -3
- package/dist/src/headless/react/hooks/useIsAwaitingBotReply.d.ts +0 -3
- package/dist/src/headless/react/hooks/useMessages.d.ts +0 -14
- package/dist/src/headless/react/hooks/useModes.d.ts +0 -15
- package/dist/src/headless/react/hooks/usePreludeData.d.ts +0 -38
- package/dist/src/headless/react/hooks/usePrimitiveState.d.ts +0 -2
- package/dist/src/headless/react/hooks/useSessions.d.ts +0 -104
- package/dist/src/headless/react/hooks/useUploadFiles.d.ts +0 -21
- package/dist/src/headless/react/hooks/useVote.d.ts +0 -18
- package/dist/src/headless/react/hooks/useWidgetRouter.d.ts +0 -7
- package/dist/src/headless/react/hooks/useWidgetTrigger.d.ts +0 -10
- package/dist/src/headless/react/index.d.ts +0 -14
- package/dist/src/headless/react/types/components.d.ts +0 -7
- package/dist/useModes-B1EFXU-e.cjs +0 -2
- package/dist/useModes-B1EFXU-e.cjs.map +0 -1
- package/dist/useModes-BCCAwNcR.js +0 -259
- package/dist/useModes-BCCAwNcR.js.map +0 -1
- package/dist/widget.ctx-B-jCTG4Y.js +0 -698
- package/dist/widget.ctx-B-jCTG4Y.js.map +0 -1
- package/dist/widget.ctx-XvIjOOOZ.cjs +0 -5
- package/dist/widget.ctx-XvIjOOOZ.cjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,202 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencx/widget",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.18",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
9
6
|
"repository": {
|
|
10
7
|
"type": "git",
|
|
11
8
|
"url": "https://github.com/openchatai/widget"
|
|
12
9
|
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/openchatai/widget/issues"
|
|
15
|
-
},
|
|
16
|
-
"author": {
|
|
17
|
-
"name": "openchatai",
|
|
18
|
-
"url": "https://github.com/openchatai"
|
|
19
|
-
},
|
|
20
10
|
"files": [
|
|
21
|
-
"dist",
|
|
22
11
|
"dist-embed"
|
|
23
12
|
],
|
|
24
|
-
"sideEffects": false,
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"import": "./dist/index.js",
|
|
29
|
-
"require": "./dist/index.cjs"
|
|
30
|
-
},
|
|
31
|
-
"./react": {
|
|
32
|
-
"types": "./dist/react.d.ts",
|
|
33
|
-
"import": "./dist/react.js",
|
|
34
|
-
"require": "./dist/react.cjs"
|
|
35
|
-
},
|
|
36
|
-
"./designs": {
|
|
37
|
-
"types": "./dist/designs.d.ts",
|
|
38
|
-
"import": "./dist/designs.js",
|
|
39
|
-
"require": "./dist/designs.cjs"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
13
|
"dependencies": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"uuid": "^11.0.4"
|
|
14
|
+
"@opencx/widget-react": "4.0.18",
|
|
15
|
+
"@opencx/widget-core": "4.0.18"
|
|
46
16
|
},
|
|
47
17
|
"peerDependencies": {
|
|
48
18
|
"@types/react": ">=18 <20",
|
|
49
19
|
"@types/react-dom": ">=18 <20",
|
|
50
20
|
"react": ">=18 <20",
|
|
51
|
-
"react-dom": ">=18 <20"
|
|
52
|
-
"@radix-ui/react-avatar": "^1.1.0",
|
|
53
|
-
"@radix-ui/react-dialog": "^1.1.5",
|
|
54
|
-
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
55
|
-
"@radix-ui/react-popover": "^1.1.2",
|
|
56
|
-
"@radix-ui/react-slot": "^1.1.0",
|
|
57
|
-
"@radix-ui/react-switch": "^1.1.0",
|
|
58
|
-
"@radix-ui/react-tooltip": "^1.1.2",
|
|
59
|
-
"clsx": "^2.1.1",
|
|
60
|
-
"framer-motion": "^11.3.30",
|
|
61
|
-
"lucide-react": "^0.436.0",
|
|
62
|
-
"react-dropzone": "^14.3.5",
|
|
63
|
-
"tinycolor2": "^1.6.0",
|
|
64
|
-
"zod": "^3.23.8",
|
|
65
|
-
"react-markdown": "^9.0.1",
|
|
66
|
-
"react-use": "^17.5.1",
|
|
67
|
-
"rehype-raw": "^7.0.0",
|
|
68
|
-
"remark-gfm": "^4.0.0",
|
|
69
|
-
"swr": "^2.2.5",
|
|
70
|
-
"tailwind-merge": "^2.4.0",
|
|
71
|
-
"class-variance-authority": "^0.7.0",
|
|
72
|
-
"@uiw/react-iframe": "^1.0.3"
|
|
73
|
-
},
|
|
74
|
-
"peerDependenciesMeta": {
|
|
75
|
-
"@types/react": {
|
|
76
|
-
"optional": true
|
|
77
|
-
},
|
|
78
|
-
"@types/react-dom": {
|
|
79
|
-
"optional": true
|
|
80
|
-
},
|
|
81
|
-
"react": {
|
|
82
|
-
"optional": true
|
|
83
|
-
},
|
|
84
|
-
"react-dom": {
|
|
85
|
-
"optional": true
|
|
86
|
-
},
|
|
87
|
-
"@radix-ui/react-avatar": {
|
|
88
|
-
"optional": true
|
|
89
|
-
},
|
|
90
|
-
"@radix-ui/react-dialog": {
|
|
91
|
-
"optional": true
|
|
92
|
-
},
|
|
93
|
-
"@radix-ui/react-dropdown-menu": {
|
|
94
|
-
"optional": true
|
|
95
|
-
},
|
|
96
|
-
"@radix-ui/react-popover": {
|
|
97
|
-
"optional": true
|
|
98
|
-
},
|
|
99
|
-
"@radix-ui/react-slot": {
|
|
100
|
-
"optional": true
|
|
101
|
-
},
|
|
102
|
-
"@radix-ui/react-switch": {
|
|
103
|
-
"optional": true
|
|
104
|
-
},
|
|
105
|
-
"@radix-ui/react-tooltip": {
|
|
106
|
-
"optional": true
|
|
107
|
-
},
|
|
108
|
-
"clsx": {
|
|
109
|
-
"optional": true
|
|
110
|
-
},
|
|
111
|
-
"framer-motion": {
|
|
112
|
-
"optional": true
|
|
113
|
-
},
|
|
114
|
-
"lucide-react": {
|
|
115
|
-
"optional": true
|
|
116
|
-
},
|
|
117
|
-
"react-dropzone": {
|
|
118
|
-
"optional": true
|
|
119
|
-
},
|
|
120
|
-
"tinycolor2": {
|
|
121
|
-
"optional": true
|
|
122
|
-
},
|
|
123
|
-
"zod": {
|
|
124
|
-
"optional": true
|
|
125
|
-
},
|
|
126
|
-
"react-markdown": {
|
|
127
|
-
"optional": true
|
|
128
|
-
},
|
|
129
|
-
"react-use": {
|
|
130
|
-
"optional": true
|
|
131
|
-
},
|
|
132
|
-
"rehype-raw": {
|
|
133
|
-
"optional": true
|
|
134
|
-
},
|
|
135
|
-
"remark-gfm": {
|
|
136
|
-
"optional": true
|
|
137
|
-
},
|
|
138
|
-
"swr": {
|
|
139
|
-
"optional": true
|
|
140
|
-
},
|
|
141
|
-
"tailwind-merge": {
|
|
142
|
-
"optional": true
|
|
143
|
-
},
|
|
144
|
-
"class-variance-authority": {
|
|
145
|
-
"optional": true
|
|
146
|
-
},
|
|
147
|
-
"@uiw/react-iframe": {
|
|
148
|
-
"optional": true
|
|
149
|
-
}
|
|
21
|
+
"react-dom": ">=18 <20"
|
|
150
22
|
},
|
|
151
23
|
"devDependencies": {
|
|
152
|
-
"@
|
|
153
|
-
"@eslint
|
|
154
|
-
"@eslint/js": "^9.23.0",
|
|
155
|
-
"@tailwindcss/typography": "^0.5.15",
|
|
156
|
-
"@types/lodash.isequal": "^4.5.8",
|
|
157
|
-
"@types/node": "^20.14.8",
|
|
158
|
-
"@types/tinycolor2": "^1.4.6",
|
|
159
|
-
"@typescript-eslint/eslint-plugin": "^8.29.0",
|
|
160
|
-
"@typescript-eslint/parser": "^8.29.0",
|
|
161
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
162
|
-
"tailwindcss": "^3.4.6",
|
|
163
|
-
"tailwindcss-animate": "^1.0.7",
|
|
164
|
-
"eslint": "^9.23.0",
|
|
165
|
-
"eslint-config-prettier": "^10.1.1",
|
|
166
|
-
"eslint-plugin-prettier": "^5.2.6",
|
|
167
|
-
"eslint-plugin-react": "^7.37.5",
|
|
168
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
169
|
-
"eslint-plugin-unused-imports": "^4.1.4",
|
|
170
|
-
"eslint-plugin-vitest": "^0.5.4",
|
|
171
|
-
"globals": "^16.0.0",
|
|
172
|
-
"jsdom": "^25.0.1",
|
|
173
|
-
"lucide": "^0.525.0",
|
|
174
|
-
"postcss": "^8.4.41",
|
|
175
|
-
"prettier": "^3.5.3",
|
|
176
|
-
"openapi-typescript": "^7.5.2",
|
|
177
|
-
"typescript": "^5.5.4",
|
|
178
|
-
"vite": "^5.4.2",
|
|
179
|
-
"vite-plugin-dts": "4.0.3",
|
|
180
|
-
"vite-plugin-externalize-deps": "^0.8.0",
|
|
181
|
-
"vite-tsconfig-paths": "^5.0.1",
|
|
182
|
-
"vitest": "^3.0.2"
|
|
24
|
+
"@opencx/tsconfig": "0.0.1",
|
|
25
|
+
"@opencx/eslint-config": "0.0.0"
|
|
183
26
|
},
|
|
184
27
|
"scripts": {
|
|
185
|
-
"clean": "rm -rf
|
|
186
|
-
"clean:dist": "rm -rf
|
|
187
|
-
"
|
|
188
|
-
"build:lib": "vite build -c vite.config.ts",
|
|
189
|
-
"build:embed": "vite build -c vite.embed.config.ts",
|
|
190
|
-
"gen:sdk": "pnpm dlx openapi-typescript http://localhost:8080/widget-api-yaml -o ./src/headless/core/api/schema.ts && prettier --write ./src/headless/core/api/schema.ts",
|
|
28
|
+
"clean": "rm -rf node_modules dist-embed .turbo",
|
|
29
|
+
"clean:dist": "rm -rf dist-embed .turbo",
|
|
30
|
+
"build": "vite build -c vite.config.ts",
|
|
191
31
|
"test": "vitest run",
|
|
192
|
-
"test:watch": "vitest --watch",
|
|
193
32
|
"cs": "changeset",
|
|
194
33
|
"csv": "changeset version",
|
|
195
34
|
"csp": "changeset publish",
|
|
196
35
|
"type-check": "tsc --noEmit",
|
|
197
36
|
"lint": "eslint .",
|
|
198
|
-
"format": "prettier --write ."
|
|
199
|
-
"batman": "pnpm tsc && pnpm build:lib && pnpm build:embed",
|
|
200
|
-
"test:browser": "vitest --workspace=vitest.workspace.ts"
|
|
37
|
+
"format": "prettier --write ."
|
|
201
38
|
}
|
|
202
39
|
}
|