@wexio/messenger-widget-react 1.0.1 → 1.0.3
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 +5 -6
- package/dist/widget-react.d.ts +0 -6
- package/dist/widget-react.js +1 -1
- package/dist/widget-react.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@wexio/messenger-widget-react)
|
|
4
4
|
[](./LICENSE)
|
|
5
|
-
[](https://wexio.io
|
|
5
|
+
[](https://learn.wexio.io)
|
|
6
6
|
|
|
7
7
|
Native React component for the [Wexio](https://wexio.io) web messenger. Renders inside a Shadow DOM portal for full style isolation — same `WidgetShell` runtime as the script-injected iframe and the `<wexio-widget>` web component. Same chat, same visitor identity, same backend; the only difference is **where the React tree mounts.**
|
|
8
8
|
|
|
9
9
|
🏠 [Website](https://wexio.io)
|
|
10
|
-
📚 [Developer Docs](https://wexio.io
|
|
10
|
+
📚 [Developer Docs](https://learn.wexio.io)
|
|
11
11
|
|
|
12
12
|
## 📂 Description
|
|
13
13
|
|
|
@@ -86,11 +86,10 @@ For an **unverified pre-fill** (skip the prechat form when the visitor's email i
|
|
|
86
86
|
| ------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
87
87
|
| `publicKey` | `string` | Wexio integration public key (`pk_live_...`). Omit to render in demo mode (bundled mock content for landing pages or Storybook). |
|
|
88
88
|
| `locale` | `"en" \| "uk"` | UI locale. Defaults to the visitor's browser language. Extend by contributing a new bundle to the source repo. |
|
|
89
|
-
| `mode` | `"production"` | Always `"production"` on the public package. (Preview + demo modes are dashboard-only.) |
|
|
90
89
|
| `user` | [`VisitorIdentity`](#visitoridentity) | Verified identity. See [Identifying users](#identifying-users). |
|
|
91
90
|
| `prefill` | [`VisitorPrefill`](#visitorprefill) | Unverified pre-fill for the prechat form. |
|
|
92
91
|
| `config` | [`InjectableWidgetConfig`](#injectablewidgetconfig) | Pre-resolved widget config. Set this if you already have the config server-rendered or fetched app-wide — skips the bootstrap fetch. |
|
|
93
|
-
| `lightboxViewport` | `boolean`
|
|
92
|
+
| `lightboxViewport` | `boolean` (default `true`) | Render the media lightbox (image / video gallery) as a viewport-fixed overlay. Pass `false` to contain the gallery inside the widget's host box. |
|
|
94
93
|
| `onResize` | `(size: { width: number; height: number }) => void` | Fired whenever the widget's intended dimensions change (open ↔ closed ↔ expanded). Use for host-side layout sync. |
|
|
95
94
|
| `onClose` | `() => void` | Fired when the visitor taps the close chip. |
|
|
96
95
|
| `className` | `string` | Pass-through class on the outer host `<div>`. Style this with normal layout CSS. |
|
|
@@ -250,7 +249,7 @@ interface VisitorPrefill {
|
|
|
250
249
|
|
|
251
250
|
### InjectableWidgetConfig
|
|
252
251
|
|
|
253
|
-
The pre-resolved widget config shape (theme, features, blocks, prechat, messenger chrome, sounds, locale strategy).
|
|
252
|
+
The pre-resolved widget config shape (theme, features, blocks, prechat, messenger chrome, sounds, locale strategy). Pull it from the package:
|
|
254
253
|
|
|
255
254
|
```ts
|
|
256
255
|
import type { InjectableWidgetConfig } from "@wexio/messenger-widget-react";
|
|
@@ -296,7 +295,7 @@ Typed wrappers are on the roadmap:
|
|
|
296
295
|
- `@wexio/messenger-widget-angular` — coming soon
|
|
297
296
|
- `@wexio/messenger-widget-ember` — coming soon
|
|
298
297
|
|
|
299
|
-
For plain HTML / script-injection setups, paste the loader snippet from https://wexio.io
|
|
298
|
+
For plain HTML / script-injection setups, paste the loader snippet from https://learn.wexio.io.
|
|
300
299
|
|
|
301
300
|
## Author
|
|
302
301
|
|
package/dist/widget-react.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
|
|
3
3
|
export type WexioWidgetLocale = "en" | "uk";
|
|
4
|
-
/** Public surface — mode is always production. Preview + demo are
|
|
5
|
-
* private-only (dashboard embed) and not reachable from npm. */
|
|
6
|
-
export type WexioWidgetMode = "production";
|
|
7
4
|
|
|
8
5
|
export type WidgetTab = "home" | "messages" | "help" | "news" | "profile";
|
|
9
6
|
|
|
@@ -246,9 +243,6 @@ export interface VisitorPrefill {
|
|
|
246
243
|
export interface WexioWidgetProps {
|
|
247
244
|
publicKey?: string;
|
|
248
245
|
locale?: WexioWidgetLocale;
|
|
249
|
-
/** Always `"production"` on the public package. `preview` and `demo`
|
|
250
|
-
* modes are dashboard-only and not exposed here. */
|
|
251
|
-
mode?: WexioWidgetMode;
|
|
252
246
|
/**
|
|
253
247
|
* Log a known user into the widget (the React equivalent of
|
|
254
248
|
* Intercom's `boot({ user_id, ... })`). Provide ONE proof:
|
package/dist/widget-react.js
CHANGED
|
@@ -22226,7 +22226,7 @@ function gv({ publicKey: e, locale: t, user: n, prefill: r, mode: i, configOverr
|
|
|
22226
22226
|
embedded: !0,
|
|
22227
22227
|
visitorIdentity: n,
|
|
22228
22228
|
visitorPrefill: r,
|
|
22229
|
-
lightboxViewport: l ?? !
|
|
22229
|
+
lightboxViewport: l ?? !0,
|
|
22230
22230
|
themeRoot: h ?? void 0,
|
|
22231
22231
|
styleRoot: y ?? void 0,
|
|
22232
22232
|
onResize: (e, t) => {
|