@saar-ai/web-widget 0.11.0 → 0.13.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/capture-card/capture-card-dom.d.ts +52 -0
- package/dist/capture-card/capture-card-dom.d.ts.map +1 -0
- package/dist/capture-card/capture-card-host.d.ts +9 -0
- package/dist/capture-card/capture-card-host.d.ts.map +1 -0
- package/dist/chunks/capture-card-BlJ6EkWn.js +156 -0
- package/dist/chunks/capture-card-dom-BqDqOvQF.js +383 -0
- package/dist/chunks/{chat-CU9VPqVO.js → chat-R7z4DtMM.js} +110 -8
- package/dist/chunks/form-fill-B-h6Uw1t.js +45 -0
- package/dist/chunks/form-fill-dom-skU-ZwLB.js +191 -0
- package/dist/chunks/{host-widget-BZKCb7yR.js → host-widget-BZAYL5tQ.js} +1370 -425
- package/dist/chunks/{schemas-YN3wGSGZ.js → schemas-B2B3k74u.js} +2427 -1167
- package/dist/chunks/{telemetry-B1xBTk1s.js → telemetry-3f--vvdX.js} +18 -12
- package/dist/concierge-shell.css +1 -1
- package/dist/consent/consent-prompt-dom.d.ts +57 -0
- package/dist/consent/consent-prompt-dom.d.ts.map +1 -0
- package/dist/consent/consent-prompt-preview.d.ts +16 -0
- package/dist/consent/consent-prompt-preview.d.ts.map +1 -0
- package/dist/dock/dock-renderer.d.ts +1 -1
- package/dist/dock/dock-renderer.d.ts.map +1 -1
- package/dist/dock/dock-row.d.ts +3 -23
- package/dist/dock/dock-row.d.ts.map +1 -1
- package/dist/dock/dock.d.ts +11 -0
- package/dist/dock/dock.d.ts.map +1 -1
- package/dist/flow-link.d.ts +13 -0
- package/dist/flow-link.d.ts.map +1 -0
- package/dist/form-fill/form-fill-dom.d.ts +39 -0
- package/dist/form-fill/form-fill-dom.d.ts.map +1 -0
- package/dist/format-money.d.ts +3 -2
- package/dist/format-money.d.ts.map +1 -1
- package/dist/generated/concierge-shell-css.d.ts.map +1 -1
- package/dist/handoff-initials.d.ts +34 -0
- package/dist/handoff-initials.d.ts.map +1 -0
- package/dist/host-widget.d.ts +8 -5
- package/dist/host-widget.d.ts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +139 -173
- package/dist/next/index.js +1 -1
- package/dist/use-chat-session.d.ts +23 -3
- package/dist/use-chat-session.d.ts.map +1 -1
- package/dist/use-voice-session.d.ts +39 -4
- package/dist/use-voice-session.d.ts.map +1 -1
- package/dist/voice-widget.d.ts +11 -5
- package/dist/voice-widget.d.ts.map +1 -1
- package/dist/widget/concierge-launcher.d.ts +16 -1
- package/dist/widget/concierge-launcher.d.ts.map +1 -1
- package/dist/widget/concierge-shell.d.ts +48 -2
- package/dist/widget/concierge-shell.d.ts.map +1 -1
- package/dist/widget/shell-renderer.d.ts +1 -1
- package/dist/widget/shell-renderer.d.ts.map +1 -1
- package/dist/widget/widget-view.d.ts +66 -2
- package/dist/widget/widget-view.d.ts.map +1 -1
- package/dist/widget-cart-summary.d.ts +4 -3
- package/dist/widget-cart-summary.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/styles/brand.css +51 -0
- package/src/styles/concierge-shell-entry.css +13 -0
- package/src/styles/concierge.css +9 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saar-ai/web-widget",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"saar:distribution": "publishable",
|
|
5
5
|
"description": "The concierge widget's React UI — ConciergeShell chrome plus the full end-user conversation (VoiceWidget, useChatSession, useVoiceSession) — de-Nexted for the merchant-site embed (docs/WIDGET_EMBED_PLAN.md §4 Phase 3). Publishes PUBLICLY to npmjs (docs/WIDGET_EMBED_PLAN.md §5.1) — every workspace and third-party runtime dependency is bundled into dist/ at build time, so \"dependencies\" is empty. React and react-dom are peer dependencies only; next is an optional peer, needed only by the ./next subpath (Phase 5).",
|
|
6
6
|
"type": "module",
|
|
@@ -53,29 +53,29 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@tailwindcss/cli": "^4.3.3",
|
|
56
|
-
"@testing-library/jest-dom": "^7.0.
|
|
57
|
-
"@testing-library/react": "^16.3.
|
|
58
|
-
"@testing-library/user-event": "^14.6.
|
|
59
|
-
"@types/node": "^26.
|
|
60
|
-
"@types/react": "^19.
|
|
61
|
-
"@types/react-dom": "^19.
|
|
62
|
-
"@vitejs/plugin-react": "^6.
|
|
56
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
57
|
+
"@testing-library/react": "^16.3.3",
|
|
58
|
+
"@testing-library/user-event": "^14.6.7",
|
|
59
|
+
"@types/node": "^26.6.1",
|
|
60
|
+
"@types/react": "^19.3.0",
|
|
61
|
+
"@types/react-dom": "^19.3.0",
|
|
62
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
63
63
|
"clsx": "^2.1.1",
|
|
64
|
-
"jsdom": "^30.0
|
|
64
|
+
"jsdom": "^30.1.0",
|
|
65
65
|
"livekit-client": "^2.21.0",
|
|
66
|
-
"lucide-react": "^1.
|
|
67
|
-
"next": "^16.3.
|
|
66
|
+
"lucide-react": "^1.47.0",
|
|
67
|
+
"next": "^16.3.8",
|
|
68
68
|
"preact": "^10.29.8",
|
|
69
|
-
"react": "^19.
|
|
70
|
-
"react-dom": "^19.
|
|
69
|
+
"react": "^19.3.0",
|
|
70
|
+
"react-dom": "^19.3.0",
|
|
71
71
|
"socket.io-client": "^4.8.3",
|
|
72
|
-
"tailwind-merge": "^3.
|
|
72
|
+
"tailwind-merge": "^3.7.0",
|
|
73
73
|
"tailwindcss": "^4.3.3",
|
|
74
74
|
"typescript": "^7.0.2",
|
|
75
75
|
"vite": "8.0.16",
|
|
76
76
|
"vitest": "4.1.10",
|
|
77
|
-
"@saar-ai/widget-bridge": "0.
|
|
78
|
-
"@saar-ai/widget-protocol": "0.
|
|
77
|
+
"@saar-ai/widget-bridge": "0.8.0",
|
|
78
|
+
"@saar-ai/widget-protocol": "0.9.0",
|
|
79
79
|
"@wesence/branding": "0.0.1",
|
|
80
80
|
"@wesence/vitest-presets": "0.0.1"
|
|
81
81
|
},
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The concierge's brand aliases, and the utilities they register.
|
|
3
|
+
*
|
|
4
|
+
* Split out of `concierge.css` for docs/CONCIERGE_GENERATIONS.md §3: that file
|
|
5
|
+
* is the DOCK's decoration and the widget's entry deliberately does not import
|
|
6
|
+
* it, but these aliases are not the dock's — the shared transcript
|
|
7
|
+
* (`voice-widget.tsx`) colours the shopper's own bubble with
|
|
8
|
+
* `from-brand-plum`, so a generation without them draws that bubble with no
|
|
9
|
+
* rules at all. Which is exactly what shipped until phase 4's baselines showed
|
|
10
|
+
* the caller's line missing from the widget entirely.
|
|
11
|
+
*
|
|
12
|
+
* Both entries import this; neither owns it.
|
|
13
|
+
*
|
|
14
|
+
* `@theme inline` on purpose: the values track the mode-dependent aliases
|
|
15
|
+
* above rather than freezing the light-mode value at build time.
|
|
16
|
+
*/
|
|
17
|
+
:root {
|
|
18
|
+
--brand-plum: var(--color-brand-plum-800);
|
|
19
|
+
--brand-rose: var(--color-brand-rose-500);
|
|
20
|
+
--brand-amber: var(--color-brand-amber-400);
|
|
21
|
+
/* Darkened amber for text gradients, so they clear WCAG AA large text. */
|
|
22
|
+
--brand-amber-deep: var(--color-brand-amber-500);
|
|
23
|
+
--brand-ink: var(--color-brand-ink);
|
|
24
|
+
--brand-surface: var(--background);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dark {
|
|
28
|
+
/* Brand plum at 42% lightness on a 15% background is unreadable; the shared
|
|
29
|
+
theme lifts `--primary` to a lighter step for exactly this reason, and the
|
|
30
|
+
widget makes the same move. */
|
|
31
|
+
--brand-plum: var(--color-brand-plum-400);
|
|
32
|
+
--brand-rose: var(--color-brand-rose-400);
|
|
33
|
+
--brand-amber: var(--color-brand-amber-400);
|
|
34
|
+
--brand-amber-deep: var(--color-brand-amber-300);
|
|
35
|
+
--brand-ink: var(--foreground);
|
|
36
|
+
--brand-surface: var(--background);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* Utility colours (`bg-brand-plum`, `text-brand-amber-deep`, …). Registered
|
|
41
|
+
* `inline` so they track the mode-dependent values above rather than freezing
|
|
42
|
+
* the light-mode value at build time.
|
|
43
|
+
*/
|
|
44
|
+
@theme inline {
|
|
45
|
+
--color-brand-plum: var(--brand-plum);
|
|
46
|
+
--color-brand-rose: var(--brand-rose);
|
|
47
|
+
--color-brand-amber: var(--brand-amber);
|
|
48
|
+
--color-brand-amber-deep: var(--brand-amber-deep);
|
|
49
|
+
--color-brand-ink: var(--brand-ink);
|
|
50
|
+
--color-brand-surface: var(--brand-surface);
|
|
51
|
+
}
|
|
@@ -36,7 +36,20 @@
|
|
|
36
36
|
@source '../avatar-face.tsx';
|
|
37
37
|
@source '../rope-knot.tsx';
|
|
38
38
|
@source '../morphing-loader.tsx';
|
|
39
|
+
/*
|
|
40
|
+
* The TRANSCRIPT and everything in it — `renderLog`, the turn bubbles, the
|
|
41
|
+
* transcript events, the delivery ticks, the attachment list, the typing dots
|
|
42
|
+
* and the opener chips all live in `voice-widget.tsx`, which builds the
|
|
43
|
+
* `ConversationView` BOTH renderers draw. It is shared chrome, not the dock's,
|
|
44
|
+
* and leaving it out of this scan shipped a widget whose shopper-side bubbles
|
|
45
|
+
* had no rules at all: `from-brand-plum`, `rounded-ee-md` and the rest existed
|
|
46
|
+
* only in the dock's sheet. Caught by phase 4's baselines, where the caller's
|
|
47
|
+
* own line was invisible.
|
|
48
|
+
*/
|
|
49
|
+
@source '../voice-widget.tsx';
|
|
39
50
|
@source '../widget-markdown.tsx';
|
|
40
51
|
@source '../widget-cards.tsx';
|
|
41
52
|
@source '../widget-cart-summary.tsx';
|
|
42
53
|
@import './tokens.css';
|
|
54
|
+
/* The brand aliases the shared transcript colours itself with — see `brand.css`. */
|
|
55
|
+
@import './brand.css';
|
package/src/styles/concierge.css
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
2
|
+
* The DOCK's decoration: every animation its face and panel run on.
|
|
3
|
+
*
|
|
4
|
+
* The brand aliases these rules read (`--brand-plum` and friends, and the
|
|
5
|
+
* `@theme inline` block that turns them into `bg-brand-plum` utilities) moved
|
|
6
|
+
* to `brand.css` in phase 4, because the WIDGET needs them and does not import
|
|
7
|
+
* this file. Imported back below, so every consumer that has only ever
|
|
8
|
+
* imported `concierge.css` — `apps/storybook`, `apps/marketing` — keeps the
|
|
9
|
+
* theme it always had. Importing it twice is free: Tailwind emits one copy.
|
|
4
10
|
*
|
|
5
11
|
* ## Why this is in the shared theme and not in one app
|
|
6
12
|
*
|
|
@@ -22,6 +28,7 @@
|
|
|
22
28
|
* widget announces its state through a live region, so `prefers-reduced-motion`
|
|
23
29
|
* can stop all of it wholesale without a caller losing anything.
|
|
24
30
|
*/
|
|
31
|
+
@import './brand.css';
|
|
25
32
|
|
|
26
33
|
/*
|
|
27
34
|
* Single-name aliases onto the shared ramps in `color-tokens.css`.
|
|
@@ -31,42 +38,6 @@
|
|
|
31
38
|
* whole widget without touching a class. Editing a colour still means editing
|
|
32
39
|
* the ramp, once, for the product and the site together.
|
|
33
40
|
*/
|
|
34
|
-
:root {
|
|
35
|
-
--brand-plum: var(--color-brand-plum-800);
|
|
36
|
-
--brand-rose: var(--color-brand-rose-500);
|
|
37
|
-
--brand-amber: var(--color-brand-amber-400);
|
|
38
|
-
/* Darkened amber for text gradients, so they clear WCAG AA large text. */
|
|
39
|
-
--brand-amber-deep: var(--color-brand-amber-500);
|
|
40
|
-
--brand-ink: var(--color-brand-ink);
|
|
41
|
-
--brand-surface: var(--background);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.dark {
|
|
45
|
-
/* Brand plum at 42% lightness on a 15% background is unreadable; the shared
|
|
46
|
-
theme lifts `--primary` to a lighter step for exactly this reason, and the
|
|
47
|
-
widget makes the same move. */
|
|
48
|
-
--brand-plum: var(--color-brand-plum-400);
|
|
49
|
-
--brand-rose: var(--color-brand-rose-400);
|
|
50
|
-
--brand-amber: var(--color-brand-amber-400);
|
|
51
|
-
--brand-amber-deep: var(--color-brand-amber-300);
|
|
52
|
-
--brand-ink: var(--foreground);
|
|
53
|
-
--brand-surface: var(--background);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
* Utility colours (`bg-brand-plum`, `text-brand-amber-deep`, …). Registered
|
|
58
|
-
* `inline` so they track the mode-dependent values above rather than freezing
|
|
59
|
-
* the light-mode value at build time.
|
|
60
|
-
*/
|
|
61
|
-
@theme inline {
|
|
62
|
-
--color-brand-plum: var(--brand-plum);
|
|
63
|
-
--color-brand-rose: var(--brand-rose);
|
|
64
|
-
--color-brand-amber: var(--brand-amber);
|
|
65
|
-
--color-brand-amber-deep: var(--brand-amber-deep);
|
|
66
|
-
--color-brand-ink: var(--brand-ink);
|
|
67
|
-
--color-brand-surface: var(--brand-surface);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
41
|
/* Widget preview ------------------------------------------------------ */
|
|
71
42
|
@keyframes scan {
|
|
72
43
|
0% {
|