@saar-ai/web-widget 0.9.0 → 0.11.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.
Files changed (78) hide show
  1. package/dist/adopt-stylesheet.d.ts +11 -0
  2. package/dist/adopt-stylesheet.d.ts.map +1 -0
  3. package/dist/chunks/{chat-DAgqVvIS.js → chat-CU9VPqVO.js} +112 -16
  4. package/dist/chunks/{host-widget-CTK7C95y.js → host-widget-BZKCb7yR.js} +7752 -989
  5. package/dist/chunks/{schemas-D-uDc-9q.js → schemas-YN3wGSGZ.js} +7 -4
  6. package/dist/chunks/{telemetry-DQUulENJ.js → telemetry-B1xBTk1s.js} +1 -1
  7. package/dist/concierge-shell.css +2 -0
  8. package/dist/concierge-state.d.ts +234 -0
  9. package/dist/concierge-state.d.ts.map +1 -0
  10. package/dist/dock/dock-drag.d.ts +5 -5
  11. package/dist/dock/dock-drag.d.ts.map +1 -1
  12. package/dist/dock/dock-float.d.ts +116 -0
  13. package/dist/dock/dock-float.d.ts.map +1 -0
  14. package/dist/dock/dock-motion.d.ts +61 -6
  15. package/dist/dock/dock-motion.d.ts.map +1 -1
  16. package/dist/dock/dock-pill.d.ts +18 -1
  17. package/dist/dock/dock-pill.d.ts.map +1 -1
  18. package/dist/dock/dock-renderer.d.ts +3 -0
  19. package/dist/dock/dock-renderer.d.ts.map +1 -0
  20. package/dist/dock/dock-row.d.ts +128 -10
  21. package/dist/dock/dock-row.d.ts.map +1 -1
  22. package/dist/dock/dock-sheet.d.ts.map +1 -1
  23. package/dist/dock/dock-state.d.ts +115 -135
  24. package/dist/dock/dock-state.d.ts.map +1 -1
  25. package/dist/dock/dock.d.ts +103 -24
  26. package/dist/dock/dock.d.ts.map +1 -1
  27. package/dist/dock/geometry.d.ts +129 -3
  28. package/dist/dock/geometry.d.ts.map +1 -1
  29. package/dist/generated/concierge-shell-css.d.ts +2 -0
  30. package/dist/generated/concierge-shell-css.d.ts.map +1 -0
  31. package/dist/generated/widget-css.d.ts.map +1 -1
  32. package/dist/host-widget.d.ts +84 -2
  33. package/dist/host-widget.d.ts.map +1 -1
  34. package/dist/index.d.ts +9 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +206 -4024
  37. package/dist/messages.d.ts +88 -1
  38. package/dist/messages.d.ts.map +1 -1
  39. package/dist/mount.d.ts +4 -5
  40. package/dist/mount.d.ts.map +1 -1
  41. package/dist/next/index.js +1 -1
  42. package/dist/renderers.d.ts +3 -0
  43. package/dist/renderers.d.ts.map +1 -0
  44. package/dist/rope-knot.d.ts +67 -0
  45. package/dist/rope-knot.d.ts.map +1 -1
  46. package/dist/styles.d.ts +1 -0
  47. package/dist/styles.d.ts.map +1 -1
  48. package/dist/theme/derive.d.ts +1 -1
  49. package/dist/theme/derive.d.ts.map +1 -1
  50. package/dist/use-chat-session.d.ts +33 -1
  51. package/dist/use-chat-session.d.ts.map +1 -1
  52. package/dist/use-voice-session.d.ts +2 -0
  53. package/dist/use-voice-session.d.ts.map +1 -1
  54. package/dist/voice-widget.d.ts +114 -3
  55. package/dist/voice-widget.d.ts.map +1 -1
  56. package/dist/widget/concierge-launcher.d.ts +53 -0
  57. package/dist/widget/concierge-launcher.d.ts.map +1 -0
  58. package/dist/widget/concierge-shell.d.ts +255 -0
  59. package/dist/widget/concierge-shell.d.ts.map +1 -0
  60. package/dist/widget/position.d.ts +65 -0
  61. package/dist/widget/position.d.ts.map +1 -0
  62. package/dist/widget/shell-renderer.d.ts +3 -0
  63. package/dist/widget/shell-renderer.d.ts.map +1 -0
  64. package/dist/widget/transcript-geometry.d.ts +220 -0
  65. package/dist/widget/transcript-geometry.d.ts.map +1 -0
  66. package/dist/widget/widget-view.d.ts +74 -0
  67. package/dist/widget/widget-view.d.ts.map +1 -0
  68. package/dist/widget-cards.d.ts +21 -1
  69. package/dist/widget-cards.d.ts.map +1 -1
  70. package/dist/widget-cart-summary.d.ts +10 -1
  71. package/dist/widget-cart-summary.d.ts.map +1 -1
  72. package/dist/widget.css +1 -1
  73. package/package.json +7 -3
  74. package/src/styles/concierge-shell-entry.css +42 -0
  75. package/src/styles/concierge.css +528 -65
  76. package/src/styles/dock-surface.css +284 -0
  77. package/src/styles/tokens.css +22 -6
  78. package/src/styles/widget-entry.css +42 -1
@@ -0,0 +1,284 @@
1
+ /* ═══════════════════════════════════════════════════════════════════════════
2
+ * THE DOCK'S PAINT TRANSITIONS — docs/DOCK_SPEC.md §2 (the activity slot's
3
+ * collapse) and §3.6 (the glass row).
4
+ *
5
+ * WHY THIS IS A SEPARATE FILE. §7.1 rule 1 says the widget animates
6
+ * `transform`, `opacity` and `clip-path` only, and
7
+ * `tools/check-widget-motion.mjs` enforces it STRICT. On 2026-09-15 the user
8
+ * ruled that "transitions should be subtle, not abrupt" outranks that rule for
9
+ * exactly two things: the glass surface (`background-color`, `border-color`,
10
+ * `box-shadow`, `filter`, `backdrop-filter`) and the activity slot's collapse
11
+ * (`width`, `margin-inline-end`). The guard allowlists WHOLE FILES only, so
12
+ * those transitions live here and nowhere else, and `concierge.css` stays
13
+ * compositor-only and strictly guarded. Anything added to this file is added
14
+ * to the allowlist with it — keep it to §7.1 rule 1's named exception.
15
+ *
16
+ * WHY IT MUST COME AFTER `concierge.css`. `transition` is a shorthand, and
17
+ * the `.wgt-row` / `.wgt-mark-face` rules below REPLACE the lists
18
+ * `concierge.css` declares at equal specificity; the glass `border-color`
19
+ * likewise beats `.wgt-row[data-border='primary']` only by coming later.
20
+ * `widget-entry.css` imports this file last, and every light-DOM host that
21
+ * imports `concierge.css` imports this one straight after it.
22
+ * `concierge-css.test.ts` asserts the order on the compiled bundle.
23
+ *
24
+ * THE COST, stated plainly: these are paints, one element each, for a few
25
+ * hundred milliseconds when the state changes — never per frame, never on
26
+ * scroll. The collapse is a layout of the row's own contents, which
27
+ * `contain: layout style paint` on the row keeps out of the merchant's
28
+ * document.
29
+ * ═══════════════════════════════════════════════════════════════════════════ */
30
+
31
+ /* ── The row's transition list, re-declared in full ─────────────────────────
32
+ *
33
+ * The first four entries are `concierge.css`'s `.wgt-row` list, VERBATIM: the
34
+ * pill ↔ row FLIP (§7.2) and the stalled-transition finaliser (§7.1 rule 12)
35
+ * both depend on `transform`, `opacity` and `visibility` being in it, and a
36
+ * list here that forgot one would silently delete it. `dock-surface.test.tsx`
37
+ * checks every entry of that list survives.
38
+ *
39
+ * One duration custom property drives the surface entries in both directions,
40
+ * because a transition takes the DESTINATION's timing: the glass rule sets
41
+ * `--wgt-dur-surface: 320ms` (the slow ease INTO glass), and the solid row —
42
+ * or a wake rule — resolves it to 180 ms (the quick wake). The property
43
+ * inherits, so the mark face picks up the same value from its row.
44
+ *
45
+ * `box-shadow` was in this list until 2026-09-17 and was a no-op: `.wgt-row`
46
+ * declares no shadow in any state (the only `box-shadow: none` near it is the
47
+ * one on `.wgt-row > *`, which is §2's "nothing inside the row has an edge of
48
+ * its own" and never changes). A transition entry for a property that never
49
+ * changes is bytes in an artefact every visitor downloads, and it advertises
50
+ * a surface treatment the row does not have. */
51
+ .wgt-row {
52
+ transition:
53
+ border-color var(--wgt-dur-border, 160ms) linear,
54
+ transform var(--wgt-dur-swap, 240ms) cubic-bezier(0.2, 0, 0, 1),
55
+ opacity var(--wgt-dur-swap, 240ms) cubic-bezier(0.2, 0, 0, 1),
56
+ visibility var(--wgt-dur-swap, 240ms) linear,
57
+ background-color var(--wgt-dur-surface, 180ms) ease,
58
+ backdrop-filter var(--wgt-dur-surface, 180ms) ease;
59
+ }
60
+
61
+ /* `concierge.css`'s mark-face list (the dimmed/live opacity), plus the glass
62
+ * row's grayscale. The pill's mark never gets a `filter`, so the extra entry
63
+ * does nothing there. */
64
+ .wgt-mark-face {
65
+ transition:
66
+ opacity var(--wgt-dur-border, 160ms) linear,
67
+ filter var(--wgt-dur-surface, 180ms) ease;
68
+ }
69
+
70
+ /* ── The activity slot's collapse (§2, revised 2026-09-15) ──────────────────
71
+ *
72
+ * An empty slot gives its whole width back to the caption. `width: 0` alone
73
+ * would still leave the row's 8 px flex gap beside a box nobody can see; the
74
+ * negative END margin cancels that gap (logical, so RTL cancels the right
75
+ * one). Width and margin ease over 200 ms so the caption SLIDES into the
76
+ * space.
77
+ *
78
+ * There is no `opacity` entry, and there was never anything for one to run
79
+ * on (removed 2026-09-17). `dock-row.tsx` writes `data-empty='true'` from
80
+ * `activity === 'none'`, which is the same condition that renders no
81
+ * children — the slot is emptied and marked in ONE commit, so there is never
82
+ * a frame with contents at `opacity: 1` and `data-empty` set for them to fade
83
+ * from. The `opacity: 0` below stays: it is a correct end state, and it costs
84
+ * nothing if a future slot keeps a child while collapsing.
85
+ *
86
+ * The core dock (`cdn/dock-dom.ts`) paints its dormant slot at these same
87
+ * collapsed values inline, so the §4.2 handover never moves the caption. */
88
+ .wgt-activity {
89
+ transition:
90
+ width 200ms ease,
91
+ margin-inline-end 200ms ease;
92
+ }
93
+
94
+ .wgt-activity[data-empty='true'] {
95
+ width: 0;
96
+ margin-inline-end: -8px;
97
+ opacity: 0;
98
+ }
99
+
100
+ /* ── The glass row (§3.6) ───────────────────────────────────────────────────
101
+ *
102
+ * The row stepping back without leaving: `ducked`, or an idle text session.
103
+ * `dock-row.tsx` writes `data-surface='glass'` only while `dock.tsx` says so
104
+ * AND the shopper has not pressed the row since.
105
+ *
106
+ * Only the SURFACE goes clear. Caption text and controls keep full
107
+ * `--wgt-text` contrast — nothing here touches their colour or opacity — so
108
+ * the resume control is exactly as legible as it was.
109
+ *
110
+ * THIS RULE IS THE FALLBACK: the 70 % veil, opaque enough to be legible with
111
+ * no help at all, and what every device gets that the `@supports` block below
112
+ * does not reach — no `backdrop-filter`, a coarse pointer, or a shopper who
113
+ * asked their OS for reduced transparency.
114
+ *
115
+ * 70 % and not the 38 % it shipped with (revised 2026-09-17). A veil is
116
+ * composited over whatever the merchant's page is scrolled to, so where it is
117
+ * thin the colour under the caption is mostly the PAGE's, and a blur
118
+ * redistributes luminance between neighbouring pixels without changing the
119
+ * average: it buys texture, never a point of contrast. A light tenant's
120
+ * `--wgt-text` on the 38 % veil over a dark photograph measured 2.88:1, and a
121
+ * dark tenant's over a white product grid 2.22:1, against §11's 4.5:1. At
122
+ * 70 % the same three backdrops give 8.51:1 and 6.18:1.
123
+ *
124
+ * On THIS path the row's PLACEHOLDER is a known shortfall: it is
125
+ * `--wgt-text-muted`, 62 % of text, which is only 4.97:1 on the OPAQUE
126
+ * surface and so has nothing to spend on translucency — 3.52:1 through the
127
+ * veil, and ~90 % of text would be needed to fix it, which is not a muted
128
+ * colour any more. The FILTERED path below clears it (4.93:1 light, 4.90:1
129
+ * dark) because the filter bounds the backdrop instead of hiding it; this one
130
+ * cannot, because there is nothing bounding what is behind it. §3.6 records
131
+ * the gap and `theme/derive.test.ts` pins it rather than rounding it away.
132
+ *
133
+ * `--wgt-primary` leaves the border, the waveform and the progress track: a
134
+ * colourless surface is how the row says "not now" without a word. The border
135
+ * stays a light hairline so the row keeps an edge over a busy page. There is
136
+ * no `box-shadow: none` here: `.wgt-row` has no shadow in any state, so the
137
+ * declaration reverted nothing (removed 2026-09-17, with its transition). */
138
+ .wgt-row[data-surface='glass'] {
139
+ --wgt-dur-surface: 320ms;
140
+ background: var(--wgt-surface-veil);
141
+ border-color: var(--wgt-border);
142
+ }
143
+
144
+ /* §2 wins over §3.6 on the HANDOFF disc, and this is where the two rules met.
145
+ *
146
+ * `concierge.css`'s `.wgt-mark-face[data-handoff]` paints the operator's disc
147
+ * in the tenant's own primary, so "a widget that has been skinned still looks
148
+ * like itself" while a PERSON holds the conversation; §3.6 greys the avatar
149
+ * so the receded row is colourless. Applied to the disc, the second one wins
150
+ * a state signal it does not own: a greyed-out initials disc reads as the
151
+ * operator having left, at the one moment the dock is promising a human is
152
+ * there. Glass is about the SURFACE stepping back, and the person on the
153
+ * other end has not. Same exclusion, same reason, as `concierge.css`'s live
154
+ * ring on an `image` avatar. */
155
+ .wgt-row[data-surface='glass'] .wgt-mark-face:not([data-handoff]) {
156
+ filter: grayscale(1);
157
+ }
158
+
159
+ .wgt-row[data-surface='glass'] .wgt-bar,
160
+ .wgt-row[data-surface='glass'] .wgt-progress::after {
161
+ background: var(--wgt-text);
162
+ }
163
+
164
+ /* STANDARD `backdrop-filter` ONLY — never also `-webkit-backdrop-filter`.
165
+ * Lightning CSS (Tailwind v4's minifier) treats the alias as the same property
166
+ * with a prefix flag, so a hand-written alias after this line REPLACES the
167
+ * standard declaration and Chrome receives an empty rule; left alone, the
168
+ * pipeline emits both spellings itself. `concierge.css`'s sheet blur carries
169
+ * the full incident, and `concierge-css.test.ts` gates the compiled output.
170
+ *
171
+ * `pointer: fine` for the same reason as the sheet's blur: a backdrop blur is
172
+ * the one paint a mid-range phone cannot do for free (§1 rule 8), and three
173
+ * filter functions are dearer than two — the phone never pays either, because
174
+ * this whole block is behind that query.
175
+ *
176
+ * THE GATE SWITCHES THE ALPHA AGAIN (revised 2026-09-18), and this time the
177
+ * thin surface is earned rather than assumed. On 2026-09-17 it stopped doing
178
+ * so, because a 38 % veil under a plain blur measured 2.88:1 and 2.22:1: a
179
+ * blur destroys DETAIL and leaves LUMINANCE alone, so the merchant's page
180
+ * still reached the caption at full range and no thin alpha was safe.
181
+ * `--wgt-glass-tune` is what changes that — `contrast()` collapses the page's
182
+ * range toward mid-grey and `brightness()` slides the collapsed band onto the
183
+ * tenant's own tone, so 25 % of surface covers a NARROW band instead of the
184
+ * whole of 0–1. Worst case measured over black, white and mid-grey backdrops:
185
+ * `--wgt-text` 8.80:1 light / 7.75:1 dark, `--wgt-text-muted` 4.93:1 /
186
+ * 4.90:1, all of it in `theme/derive.test.ts`. The fallback below this gate is
187
+ * untouched: no filter, no `pointer: fine`, or reduced transparency, and the
188
+ * row is back on the opaque 70 % veil that passes without help.
189
+ *
190
+ * ONE MATERIAL with the visor and the float (§3.3): same tune, same
191
+ * `--wgt-surface-glass-blurred`, a different blur radius for a 48 px bar
192
+ * against a 260 px visor. The row used to `saturate(0.6)` here to say
193
+ * "colourless"; the tune saturates instead, and §3.6's receded reading is
194
+ * carried by the grayscale mark and by primary leaving the border, the
195
+ * waveform and the progress track — which is where §1 rule 5 always put it.
196
+ * Desaturating the MERCHANT'S page was never what made the row look receded.
197
+ *
198
+ * The `background` fallback is `--wgt-surface-veil`, not `--wgt-surface`: if
199
+ * the thin token is ever missing, the declaration lands on the opaque veil
200
+ * this block overrides rather than on a solid row that never recedes. */
201
+ @supports (backdrop-filter: blur(18px)) {
202
+ @media (pointer: fine) {
203
+ .wgt-row[data-surface='glass'] {
204
+ backdrop-filter: blur(18px) var(--wgt-glass-tune);
205
+ background: var(--wgt-surface-glass-blurred, var(--wgt-surface-veil));
206
+ }
207
+ }
208
+ }
209
+
210
+ /* ── Waking the glass row without JavaScript (§3.6) ─────────────────────────
211
+ *
212
+ * Hover on a fine pointer and focus inside the row both restore the solid
213
+ * surface, on the quick 180 ms clock. `:focus-within` and not
214
+ * `:focus-visible`: a shopper who clicks into the caption field is engaging,
215
+ * however they got there. A TAP is the JavaScript half (`dock-row.tsx`),
216
+ * because a touch screen has no hover to rest on.
217
+ *
218
+ * `(hover: hover)` as well as `(pointer: fine)`: a touch device that emulates
219
+ * `:hover` leaves it stuck on after a tap, and that must not be what keeps a
220
+ * row solid.
221
+ *
222
+ * A wake restores the SURFACE and the mark, and deliberately nothing that is
223
+ * primary. `--wgt-primary` only reaches the border, the waveform and the
224
+ * progress track in `listening`, `thinking` and `speaking` (`dock-state.ts`'s
225
+ * `AUDIO_OPEN`; `ducked` has no activity at all), and §3.6 never goes glass in
226
+ * those states — so restore rules for them would be bytes that can never
227
+ * match, in a bundle with a budget. The glass rules above that REMOVE primary
228
+ * stay, as the spec's statement of what glass is. */
229
+ .wgt-row[data-surface='glass']:focus-within {
230
+ --wgt-dur-surface: 180ms;
231
+ background: var(--wgt-surface);
232
+ backdrop-filter: none;
233
+ }
234
+
235
+ .wgt-row[data-surface='glass']:focus-within .wgt-mark-face {
236
+ filter: none;
237
+ }
238
+
239
+ @media (hover: hover) and (pointer: fine) {
240
+ .wgt-row[data-surface='glass']:hover {
241
+ --wgt-dur-surface: 180ms;
242
+ background: var(--wgt-surface);
243
+ backdrop-filter: none;
244
+ }
245
+
246
+ .wgt-row[data-surface='glass']:hover .wgt-mark-face {
247
+ filter: none;
248
+ }
249
+ }
250
+
251
+ /* §7.1 rule 10 — reduced motion wins here too. `concierge.css` already zeroes
252
+ * the row and the mark face; they are restated so this file keeps its own
253
+ * promise if it is ever loaded on its own. The slot then collapses and the
254
+ * surface changes in place, which is still the right end state. */
255
+ @media (prefers-reduced-motion: reduce) {
256
+ .wgt-row,
257
+ .wgt-mark-face,
258
+ .wgt-activity {
259
+ transition-duration: 0ms !important;
260
+ }
261
+ }
262
+
263
+ /* §3.3's `prefers-reduced-transparency: reduce`, for the glass ROW (§3.6).
264
+ *
265
+ * `concierge.css` has the same block for the sheet and the float, and it
266
+ * CANNOT carry this one: `.wgt-row[data-surface='glass']` is (0,2,0), the
267
+ * rules above are (0,2,0) too, and this file loads last — a revert written
268
+ * there would lose the cascade to them and do nothing. So it lives here,
269
+ * after the rules it reverts, which is the same ordering argument the top of
270
+ * this file makes for the transition lists.
271
+ *
272
+ * The veil AND the blur go. A shopper who has asked their OS for reduced
273
+ * transparency is telling us translucency costs them legibility, and §3.6's
274
+ * whole effect is translucency; there is nothing left to soften. The row is
275
+ * still receded — the mark is still grey, primary is still out of the border,
276
+ * the waveform and the progress track — it just says so on a solid surface.
277
+ * The wake rules stay at (0,3,0) above this and already paint
278
+ * `var(--wgt-surface)` with no blur, which is the same end state. */
279
+ @media (prefers-reduced-transparency: reduce) {
280
+ .wgt-row[data-surface='glass'] {
281
+ background: var(--wgt-surface);
282
+ backdrop-filter: none;
283
+ }
284
+ }
@@ -95,19 +95,34 @@
95
95
  * `prefers-color-scheme` — the shadow host's class is what the mount controls,
96
96
  * and a media query here would fight it. `themeToCss` emits the media query
97
97
  * for a themed dock; this fallback follows the host's explicit choice.
98
+ *
99
+ * WHICH MEANS THESE DARK VALUES ARE A LIGHT-DOM FALLBACK ONLY, and a reader
100
+ * looking for somewhere cheap to put a tone-dependent value should read this
101
+ * before they do (2026-09-18). NOTHING in the shipped widget sets `.dark`:
102
+ * `cdn/dock-dom.ts` reads `prefers-color-scheme` in JavaScript, picks
103
+ * `theme.dark` or `theme.light`, and writes that block as an inline `style`
104
+ * attribute on the host — which beats every rule here. This block matches
105
+ * only where a HOST sets the class itself (Storybook, `apps/web`'s console
106
+ * preview, a light-DOM mount). So a value that has to follow the tenant's
107
+ * tone at runtime — `--wgt-glass-tune` is the one that tried — belongs in
108
+ * `theme/derive.ts`, arriving through the same channel as the surface it is
109
+ * tuned for. A `@media (prefers-color-scheme: dark)` here would be no better:
110
+ * it is right only for `tone: 'auto'` and exactly inverted for a tenant who
111
+ * pinned `light` or `dark`.
98
112
  * --------------------------------------------------------------------------- */
99
113
 
100
114
  :host,
101
115
  :root {
102
116
  --wgt-primary: #111827;
103
117
  --wgt-on-primary: #ffffff;
104
- --wgt-accent: #191525;
105
118
  --wgt-surface: #ffffff;
106
119
  --wgt-surface-2: #f0efef;
107
120
  --wgt-surface-glass: rgb(255 255 255 / 0.97);
108
- --wgt-surface-glass-blurred: rgb(255 255 255 / 0.92);
121
+ --wgt-surface-glass-blurred: rgb(255 255 255 / 0.25);
122
+ --wgt-surface-veil: rgb(255 255 255 / 0.7);
123
+ --wgt-glass-tune: contrast(0.3) brightness(1.8);
109
124
  --wgt-text: #1c1618;
110
- --wgt-text-muted: rgb(28 22 24 / 0.62);
125
+ --wgt-text-muted: rgb(28 22 24 / 0.73);
111
126
  --wgt-border: rgb(28 22 24 / 0.12);
112
127
  --wgt-ring: #111827;
113
128
  --wgt-radius: 12px;
@@ -122,13 +137,14 @@
122
137
  .dark {
123
138
  --wgt-primary: #111827;
124
139
  --wgt-on-primary: #ffffff;
125
- --wgt-accent: #191525;
126
140
  --wgt-surface: #141414;
127
141
  --wgt-surface-2: #1f1f1f;
128
142
  --wgt-surface-glass: rgb(20 20 20 / 0.97);
129
- --wgt-surface-glass-blurred: rgb(20 20 20 / 0.92);
143
+ --wgt-surface-glass-blurred: rgb(20 20 20 / 0.25);
144
+ --wgt-surface-veil: rgb(20 20 20 / 0.7);
145
+ --wgt-glass-tune: contrast(0.9) brightness(0.32);
130
146
  --wgt-text: #fbf2f5;
131
- --wgt-text-muted: rgb(251 242 245 / 0.62);
147
+ --wgt-text-muted: rgb(251 242 245 / 0.73);
132
148
  --wgt-border: rgb(251 242 245 / 0.12);
133
149
  --wgt-ring: #5a6376;
134
150
  --wgt-radius: 12px;
@@ -7,7 +7,48 @@
7
7
  * components in light DOM via its own `@source` scan of `src/**`, per
8
8
  * AGENTS.md's "App CSS wiring" — this file is the OTHER, shadow-DOM path).
9
9
  */
10
- @import 'tailwindcss';
10
+ /*
11
+ * `source(none)`: ONLY the `@source` globs below are scanned. Without it,
12
+ * Tailwind v4 also auto-detects sources from the working directory — every
13
+ * non-ignored file under this package, docs and stories included — and a
14
+ * class name written in `AGENTS.md` or a story's comment became a rule in
15
+ * this sheet. That is how the other generation's transform-origin utility
16
+ * reached the dock's sheet once: named in prose, not used in markup.
17
+ */
18
+ @import 'tailwindcss' source(none);
11
19
  @source '../**/*.{ts,tsx}';
20
+ /*
21
+ * ...but NOT the widget generation (`src/widget/**`, revived 2026-09-17).
22
+ *
23
+ * This stylesheet is compiled into `WIDGET_CSS` and shipped inside the DOCK's
24
+ * CDN bundle. The widget generation's utilities are 16,989 bytes of raw CSS — about
25
+ * 1.9 KB gzipped — for markup that bundle never renders, and it pushed `ui`
26
+ * past its budget the moment `src/widget/` appeared in this scan.
27
+ *
28
+ * Nothing loses styling by this exclusion TODAY:
29
+ * - `apps/marketing` and `apps/web` render these components in LIGHT DOM and
30
+ * compile the classes themselves, through their own
31
+ * `@source '…/packages/web-widget/src/**'` in `globals.css`. That glob
32
+ * already covers `src/widget/**`.
33
+ * - The `v1` alias still serves the pre-dock 0.4.0 bundle, which
34
+ * carries its own stylesheet compiled before the split.
35
+ *
36
+ * When the widget generation ships from this source it will need a stylesheet
37
+ * of its own — a sibling entry scanning `../widget/**` — rather than this one
38
+ * widening again. One shared sheet across two generations means each bundle
39
+ * pays for the other's markup, which is the cost this line exists to refuse.
40
+ */
41
+ @source not '../widget/**/*.{ts,tsx}';
42
+ /*
43
+ * Neither generated output nor tests are shipped markup: `generated/` holds
44
+ * BOTH compiled sheets as strings, and tests name class names as
45
+ * fingerprints, which is not a use.
46
+ */
47
+ @source not '../generated/**';
48
+ @source not '../**/__tests__/**';
49
+ @source not '../**/*.test.{ts,tsx}';
12
50
  @import './tokens.css';
13
51
  @import './concierge.css';
52
+ /* LAST, after concierge.css — its rules win the cascade by order. See the
53
+ * file's own header and DOCK_SPEC §7.1 rule 1's 2026-09-15 exception. */
54
+ @import './dock-surface.css';