@opencx/widget 2.6.3 → 3.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/dist/basic.cjs +89 -89
- package/dist/basic.cjs.map +1 -1
- package/dist/basic.d.ts +1 -1
- package/dist/basic.js +34083 -34125
- package/dist/basic.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -22
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +20 -10
- package/dist/react.js.map +1 -1
- package/dist/src/designs/react/basic/index.d.ts +10 -0
- package/dist/src/designs/{basic → react/basic}/utils/group-messages-by-type.d.ts +1 -1
- package/dist/src/{@components → designs/react/components}/BotOrAgentMessage.d.ts +1 -1
- package/dist/src/{@components → designs/react/components}/BotOrAgentMessageGroup.d.ts +2 -2
- package/dist/src/designs/react/components/BotOrAgentMessageWrapper.d.ts +7 -0
- package/dist/src/{@components → designs/react/components}/Fallback.component.d.ts +2 -2
- package/dist/src/{components → designs/react/components}/RenderFile.d.ts +2 -2
- package/dist/src/{@components → designs/react/components}/Text.component.d.ts +1 -1
- package/dist/src/{components → designs/react/components}/UserMessageGroup.d.ts +1 -1
- package/dist/src/{components → designs/react/components}/VoteButtons.d.ts +1 -1
- package/dist/src/designs/{constants.d.ts → react/constants.d.ts} +2 -4
- package/dist/src/designs/react/hooks/useLocale.d.ts +6 -0
- package/dist/src/{index.d.ts → designs/react/index.d.ts} +2 -2
- package/dist/src/designs/translation/ar.locale.d.ts +2 -0
- package/dist/src/designs/translation/de.locale.d.ts +2 -0
- package/dist/src/designs/translation/en.locale.d.ts +2 -0
- package/dist/src/designs/translation/fr.locale.d.ts +2 -0
- package/dist/src/designs/translation/index.d.ts +14 -0
- package/dist/src/designs/translation/nl.locale.d.ts +2 -0
- package/dist/src/designs/translation/pt.locale.d.ts +2 -0
- package/dist/src/designs/translation/translation.types.d.ts +4 -0
- package/dist/{core/client → src/headless/core}/api.d.ts +49 -103
- package/dist/src/headless/core/context/contact.d.ts +25 -0
- package/dist/src/headless/core/context/message.d.ts +40 -0
- package/dist/src/headless/core/context/session.d.ts +74 -0
- package/dist/src/headless/core/context/widget.d.ts +16 -0
- package/dist/src/headless/core/index.d.ts +7 -0
- package/dist/src/headless/core/types/WidgetConfig.d.ts +34 -0
- package/dist/src/headless/core/types/agent-or-bot.d.ts +6 -0
- package/dist/src/headless/core/types/helpers.d.ts +4 -0
- package/dist/{core → src/headless/core}/types/messages.d.ts +11 -31
- package/dist/src/headless/core/types/schemas.d.ts +9 -0
- package/dist/src/headless/core/utils/Poller.d.ts +12 -0
- package/dist/{core/types/pub-sub.d.ts → src/headless/core/utils/PubSub.d.ts} +6 -9
- package/dist/{react-web/core-integration/components.d.ts → src/headless/react/ComponentRegistry.d.ts} +1 -1
- package/dist/src/headless/react/WidgetProvider.d.ts +17 -0
- package/dist/src/headless/react/hooks/useConfig.d.ts +1 -0
- package/dist/src/headless/react/hooks/useContact.d.ts +10 -0
- package/dist/src/headless/react/hooks/useIsAwaitingBotReply.d.ts +3 -0
- package/dist/src/headless/react/hooks/useMessages.d.ts +8 -0
- package/dist/{react-web/core-integration → src/headless/react}/hooks/usePreludeData.d.ts +2 -2
- package/dist/{react-web/core-integration → src/headless/react}/hooks/usePubsub.d.ts +1 -1
- package/dist/src/headless/react/hooks/useSession.d.ts +6 -0
- package/dist/{react-web/core-integration → src/headless/react}/hooks/useVote.d.ts +2 -2
- package/dist/src/headless/react/index.d.ts +11 -0
- package/dist/src/headless/react/types/components.d.ts +15 -0
- package/dist/style.css +1 -1
- package/dist/useUploadFiles-BZa0DENN.cjs +18 -0
- package/dist/useUploadFiles-BZa0DENN.cjs.map +1 -0
- package/dist/useUploadFiles-BaCcqTwX.js +1336 -0
- package/dist/useUploadFiles-BaCcqTwX.js.map +1 -0
- package/dist/widget-BlvH6dre.cjs +2 -0
- package/dist/widget-BlvH6dre.cjs.map +1 -0
- package/dist/widget-DbgWez1r.js +514 -0
- package/dist/widget-DbgWez1r.js.map +1 -0
- package/dist-embed/script.js +120 -140
- package/dist-embed/script.js.map +1 -1
- package/package.json +9 -4
- package/dist/api-CAm3rFZk.js +0 -1070
- package/dist/api-CAm3rFZk.js.map +0 -1
- package/dist/api-oIDR-KZx.cjs +0 -2
- package/dist/api-oIDR-KZx.cjs.map +0 -1
- package/dist/core/client/chat.d.ts +0 -101
- package/dist/core/client/config.d.ts +0 -43
- package/dist/core/client/contact.d.ts +0 -29
- package/dist/core/client/index.d.ts +0 -4
- package/dist/core/errors/index.d.ts +0 -27
- package/dist/core/index.d.ts +0 -9
- package/dist/core/platform/audio.d.ts +0 -38
- package/dist/core/platform/index.d.ts +0 -15
- package/dist/core/platform/logger.d.ts +0 -14
- package/dist/core/platform/storage.d.ts +0 -52
- package/dist/core/tests/platform/logger.test.d.ts +0 -1
- package/dist/core/tests/platform/storage.test.d.ts +0 -1
- package/dist/core/tests/test-utils.d.ts +0 -2
- package/dist/core/tests/types/pub-sub.test.d.ts +0 -1
- package/dist/core/types/contact.d.ts +0 -2
- package/dist/core/types/helpers.d.ts +0 -20
- package/dist/core/types/index.d.ts +0 -52
- package/dist/core/types/prelude.d.ts +0 -14
- package/dist/core/types/schemas-v2.d.ts +0 -10
- package/dist/index-CSptf_Dw.cjs +0 -18
- package/dist/index-CSptf_Dw.cjs.map +0 -1
- package/dist/index-cUkS-tdv.js +0 -1232
- package/dist/index-cUkS-tdv.js.map +0 -1
- package/dist/react-web/core-integration/ChatProvider.d.ts +0 -107
- package/dist/react-web/core-integration/hooks/useChatMessages.d.ts +0 -70
- package/dist/react-web/core-integration/hooks/useChatSession.d.ts +0 -83
- package/dist/react-web/core-integration/hooks/useConfig.d.ts +0 -1
- package/dist/react-web/core-integration/hooks/useContact.d.ts +0 -17
- package/dist/react-web/core-integration/hooks/useLocale.d.ts +0 -4
- package/dist/react-web/core-integration/hooks.d.ts +0 -9
- package/dist/react-web/core-integration/index.d.ts +0 -2
- package/dist/react-web/core-integration/locales/ar.locale.d.ts +0 -2
- package/dist/react-web/core-integration/locales/de.locale.d.ts +0 -2
- package/dist/react-web/core-integration/locales/en.locale.d.ts +0 -55
- package/dist/react-web/core-integration/locales/fr.locale.d.ts +0 -2
- package/dist/react-web/core-integration/locales/helper.d.ts +0 -65
- package/dist/react-web/core-integration/locales/index.d.ts +0 -3
- package/dist/react-web/core-integration/locales/nl.locale.d.ts +0 -2
- package/dist/react-web/core-integration/locales/pt.locale.d.ts +0 -2
- package/dist/react-web/hooks/useScrollTo.d.ts +0 -2
- package/dist/react-web/index.d.ts +0 -4
- package/dist/react-web/types/components.d.ts +0 -13
- package/dist/react-web/types/index.d.ts +0 -8
- package/dist/react-web/types/options.d.ts +0 -17
- package/dist/src/@components/BotOrAgentMessageWrapper.d.ts +0 -9
- package/dist/src/@components/ChatEvent.component.d.ts +0 -9
- package/dist/src/@components/index.d.ts +0 -6
- package/dist/src/designs/basic/index.d.ts +0 -8
- /package/dist/src/designs/{basic → react/basic}/WidgetPopoverTrigger.d.ts +0 -0
- /package/dist/src/designs/{basic → react/basic}/screens/chat-screen/ChatFooter.d.ts +0 -0
- /package/dist/src/designs/{basic → react/basic}/screens/chat-screen/ChatHeader.d.ts +0 -0
- /package/dist/src/designs/{basic → react/basic}/screens/chat-screen/ChatMain.d.ts +0 -0
- /package/dist/src/designs/{basic → react/basic}/screens/chat-screen/ChatScreen.d.ts +0 -0
- /package/dist/src/designs/{basic → react/basic}/screens/root-screen.d.ts +0 -0
- /package/dist/src/designs/{basic → react/basic}/screens/welcome-screen/WelcomeScreen.d.ts +0 -0
- /package/dist/{core/tests/client/integration-perisitance.test.d.ts → src/designs/react/basic/widget-interaction-tests/widget.test.d.ts} +0 -0
- /package/dist/src/{@components → designs/react/components}/Loading.component.d.ts +0 -0
- /package/dist/src/{@components → designs/react/components}/OpenLogoSvg.d.ts +0 -0
- /package/dist/src/{components → designs/react/components}/keyboard.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/MotionDiv.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/avatar.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/button.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/dialog.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/dropdown-menu.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/input.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/popover.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/skeleton.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/switch.d.ts +0 -0
- /package/dist/src/{components → designs/react/components/lib}/tooltip.d.ts +0 -0
- /package/dist/src/{utils.d.ts → designs/react/components/lib/utils/cn.d.ts} +0 -0
- /package/dist/src/{components → designs/react/components/lib}/wobble.d.ts +0 -0
- /package/dist/src/{@components → designs/react/components}/markdown.d.ts +0 -0
- /package/dist/{react-web → src/designs/react}/hooks/useWidgetContentHeight.d.ts +0 -0
- /package/dist/src/{render.d.ts → designs/react/render.d.ts} +0 -0
- /package/dist/{core → src/headless/core}/sdk/index.d.ts +0 -0
- /package/dist/{core/tests/client/integration.test.d.ts → src/headless/core/utils/PubSub.test.d.ts} +0 -0
- /package/dist/{core/utils/genUuid.d.ts → src/headless/core/utils/uuid.d.ts} +0 -0
- /package/dist/{react-web/core-integration → src/headless/react}/hooks/useUploadFiles.d.ts +0 -0
- /package/dist/{react-web → src/headless/react}/utils/create-safe-context.d.ts +0 -0
- /package/dist/{core/tests/platform/audio.test.d.ts → vitest/setup.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencx/widget",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"@testing-library/dom": "^10.4.0",
|
|
106
106
|
"@testing-library/jest-dom": "^6.5.0",
|
|
107
107
|
"@testing-library/react": "^16.0.1",
|
|
108
|
+
"@testing-library/user-event": "^14.5.2",
|
|
108
109
|
"@types/lodash.debounce": "^4.0.9",
|
|
109
110
|
"@types/lodash.isequal": "^4.5.8",
|
|
110
111
|
"@types/lodash.set": "^4.3.9",
|
|
@@ -114,10 +115,12 @@
|
|
|
114
115
|
"@types/tinycolor2": "^1.4.6",
|
|
115
116
|
"@uiw/react-iframe": "^1.0.3",
|
|
116
117
|
"@vitejs/plugin-react": "^4.3.4",
|
|
118
|
+
"@vitest/browser": "^3.0.2",
|
|
117
119
|
"autoprefixer": "^10.4.20",
|
|
118
120
|
"class-variance-authority": "^0.7.0",
|
|
119
121
|
"jsdom": "^25.0.1",
|
|
120
122
|
"mutative": "^1.0.11",
|
|
123
|
+
"playwright": "^1.49.1",
|
|
121
124
|
"postcss": "^8.4.41",
|
|
122
125
|
"postcss-prefix-selector": "^1.16.1",
|
|
123
126
|
"react": "^18.3.1",
|
|
@@ -135,7 +138,8 @@
|
|
|
135
138
|
"vite-plugin-dts": "4.0.3",
|
|
136
139
|
"vite-plugin-externalize-deps": "^0.8.0",
|
|
137
140
|
"vite-tsconfig-paths": "^5.0.1",
|
|
138
|
-
"vitest": "^
|
|
141
|
+
"vitest": "^3.0.2",
|
|
142
|
+
"vitest-browser-react": "^0.0.4"
|
|
139
143
|
},
|
|
140
144
|
"scripts": {
|
|
141
145
|
"clean": "rm -rf ./dist ./dist-embed",
|
|
@@ -143,7 +147,7 @@
|
|
|
143
147
|
"dev": "vite -c vite.config.ts",
|
|
144
148
|
"build:lib": "vite build",
|
|
145
149
|
"build:embed": "vite build -c vite.embed.config.ts",
|
|
146
|
-
"gen:sdk": "pnpm dlx openapi-typescript http://localhost:8080/widget-api-yaml -o ./core/sdk/schema.d.ts",
|
|
150
|
+
"gen:sdk": "pnpm dlx openapi-typescript http://localhost:8080/widget-api-yaml -o ./src/headless/core/sdk/schema.d.ts && biome format --fix ./src/headless/core/sdk/schema.d.ts",
|
|
147
151
|
"test": "vitest run",
|
|
148
152
|
"test:watch": "vitest --watch",
|
|
149
153
|
"cs": "changeset",
|
|
@@ -152,6 +156,7 @@
|
|
|
152
156
|
"type-check": "tsc --noEmit",
|
|
153
157
|
"lint": "biome lint --fix",
|
|
154
158
|
"format": "biome format --fix",
|
|
155
|
-
"batman": "pnpm build:lib && pnpm build:embed"
|
|
159
|
+
"batman": "pnpm build:lib && pnpm build:embed",
|
|
160
|
+
"test:browser": "vitest --workspace=vitest.workspace.ts"
|
|
156
161
|
}
|
|
157
162
|
}
|