@memberjunction/realtime-widget 6.2.0-edge.5 → 6.2.0-edge.7

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.
Files changed (33) hide show
  1. package/README.md +11 -2
  2. package/dist/embed/chunks/UserViewEngine-H2CVAVG5.js +7 -0
  3. package/dist/embed/chunks/chunk-46L5OHPT.js +163629 -0
  4. package/dist/embed/chunks/chunk-4IZZL4GA.js +2513 -0
  5. package/dist/embed/chunks/chunk-FOFOZNZC.js +6165 -0
  6. package/dist/embed/chunks/chunk-MQPAK26D.js +39413 -0
  7. package/dist/embed/chunks/chunk-S3LX5KYE.js +46 -0
  8. package/dist/embed/chunks/chunk-VXA62VEQ.js +17259 -0
  9. package/dist/embed/chunks/dist-S5YIFSWR.js +66 -0
  10. package/dist/embed/chunks/guest-tool-relay-2MP5GU67.js +30 -0
  11. package/dist/embed/chunks/guest-voice-mint-MNMKTI3E.js +94 -0
  12. package/dist/embed/chunks/realtime-voice-controller-D2GLGIK2.js +30589 -0
  13. package/dist/embed/chunks/runtime-widget-transport-V7B2B3TL.js +162 -0
  14. package/dist/embed/mj-widget.js +1056 -0
  15. package/dist/embed.js +3 -2
  16. package/dist/embed.js.map +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/loader.d.ts +9 -0
  22. package/dist/loader.d.ts.map +1 -1
  23. package/dist/loader.js +56 -7
  24. package/dist/loader.js.map +1 -1
  25. package/dist/session/widget-session-client.d.ts +46 -5
  26. package/dist/session/widget-session-client.d.ts.map +1 -1
  27. package/dist/session/widget-session-client.js +118 -17
  28. package/dist/session/widget-session-client.js.map +1 -1
  29. package/dist/transport/runtime-widget-transport.d.ts +0 -6
  30. package/dist/transport/runtime-widget-transport.d.ts.map +1 -1
  31. package/dist/transport/runtime-widget-transport.js +3 -31
  32. package/dist/transport/runtime-widget-transport.js.map +1 -1
  33. package/package.json +10 -10
package/README.md CHANGED
@@ -26,6 +26,15 @@ The loader reads the `data-*` attributes, calls `POST /widget/session` to mint a
26
26
  mounts `<mj-support-widget>` **inside a shadow DOM** so host CSS cannot bleed in or out. See
27
27
  [`examples/blank-host.html`](./examples/blank-host.html).
28
28
 
29
+ **The host page must be served over HTTPS** (or from `localhost`). The widget binds its guest session to a
30
+ Web Crypto key and signs each token refresh with it, and browsers expose Web Crypto (`crypto.subtle`) only in a
31
+ secure context. On a plain `http://` page no widget is shown, and the console says why (`[mj-widget] The support
32
+ widget needs a secure context …`). There is no fallback: a session that cannot prove the key could be renewed by
33
+ anyone who copied its token.
34
+
35
+ The refresh proof and the refresh timer run on the server's clock, which the widget learns from each token's
36
+ `iat`, so a visitor whose device clock is minutes off keeps one session instead of restarting it at each refresh.
37
+
29
38
  ### Programmatic mount
30
39
 
31
40
  ```ts
@@ -85,8 +94,8 @@ host page → <mj-support-widget> (shadow DOM, design-token-scoped)
85
94
  ## Scripts
86
95
 
87
96
  ```bash
88
- npm run build # tsc → dist/ (ESM)
89
- npm run bundle # esbuild → dist/mj-widget.js (single-file browser ESM)
97
+ npm run build # tsc → dist/ (ESM), then the bundle below, so a build never leaves a stale mj-widget.js
98
+ npm run bundle # esbuild → dist/embed/mj-widget.js (browser ESM, code-split into dist/embed/chunks)
90
99
  npm run bundle:min # minified variant
91
100
  npm run test # vitest (jsdom): session client, element, loader
92
101
  ```
@@ -0,0 +1,7 @@
1
+ import {
2
+ UserViewEngine
3
+ } from "./chunk-MQPAK26D.js";
4
+ import "./chunk-VXA62VEQ.js";
5
+ export {
6
+ UserViewEngine
7
+ };