@mgamadeus/ddd-agents 0.1.0-alpha.22 → 0.1.0-alpha.24

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 (164) hide show
  1. package/README.md +3 -2
  2. package/dist/chat.js +87 -893
  3. package/dist/chat.js.map +1 -1
  4. package/dist/chunks/ConversationMessageInputComposerWidgets-BxyaFBA6.js +631 -0
  5. package/dist/chunks/ConversationMessageInputComposerWidgets-BxyaFBA6.js.map +1 -0
  6. package/dist/chunks/{WebSearchResultsConversationWidget-BvnLWHyi.js → WebSearchResultsConversationWidget-as3p5bHw.js} +147 -1125
  7. package/dist/chunks/WebSearchResultsConversationWidget-as3p5bHw.js.map +1 -0
  8. package/dist/chunks/{canvas-behaviours-BRFR1ALE.js → canvas-behaviours-AvzKSYyv.js} +4 -4
  9. package/dist/chunks/{canvas-behaviours-BRFR1ALE.js.map → canvas-behaviours-AvzKSYyv.js.map} +1 -1
  10. package/dist/chunks/canvas-reducers-Bfp_i7lc.js +88 -0
  11. package/dist/chunks/canvas-reducers-Bfp_i7lc.js.map +1 -0
  12. package/dist/chunks/{canvasBodies-9SuF6NAB.js → canvasBodies-Cvu3l38p.js} +12 -6
  13. package/dist/chunks/canvasBodies-Cvu3l38p.js.map +1 -0
  14. package/dist/chunks/canvasStorage-EvQsGdto.js +65 -0
  15. package/dist/chunks/canvasStorage-EvQsGdto.js.map +1 -0
  16. package/dist/chunks/contract-BxmMxYPF.js +96 -0
  17. package/dist/chunks/contract-BxmMxYPF.js.map +1 -0
  18. package/dist/chunks/conversation-BEF0aesf.js +31 -0
  19. package/dist/chunks/conversation-BEF0aesf.js.map +1 -0
  20. package/dist/chunks/entity-detail-name-3A82gDAp.js +15 -0
  21. package/dist/chunks/entity-detail-name-3A82gDAp.js.map +1 -0
  22. package/dist/chunks/icon-names-Di6c4zLo.js +86 -0
  23. package/dist/chunks/icon-names-Di6c4zLo.js.map +1 -0
  24. package/dist/chunks/index-7Qc_3GbG.js +1046 -0
  25. package/dist/chunks/index-7Qc_3GbG.js.map +1 -0
  26. package/dist/chunks/{ConversationMarkdown-W7NHglmL.js → widget-click-signal-sources-DulRkNvZ.js} +54 -7
  27. package/dist/chunks/widget-click-signal-sources-DulRkNvZ.js.map +1 -0
  28. package/dist/chunks/{widget-image-readiness-signal-DeOuL89j.js → widget-image-readiness-signal-D3ci53xr.js} +2 -2
  29. package/dist/chunks/{widget-image-readiness-signal-DeOuL89j.js.map → widget-image-readiness-signal-D3ci53xr.js.map} +1 -1
  30. package/dist/chunks/{widget-name-resolver-DyIY6Zu4.js → widget-name-resolver-BGN3HpoG.js} +80 -117
  31. package/dist/chunks/widget-name-resolver-BGN3HpoG.js.map +1 -0
  32. package/dist/chunks/{withPollingChangeSubscription-BLDAWF-o.js → withPollingChangeSubscription-B16htQGd.js} +2 -2
  33. package/dist/chunks/{withPollingChangeSubscription-BLDAWF-o.js.map → withPollingChangeSubscription-B16htQGd.js.map} +1 -1
  34. package/dist/client-testing.js +91 -2
  35. package/dist/client-testing.js.map +1 -1
  36. package/dist/client.js +1 -1
  37. package/dist/contract.js +8 -27
  38. package/dist/contract.js.map +1 -1
  39. package/dist/files/chat/Conversation.module.scss +268 -0
  40. package/dist/files/chat/ConversationViewBody/ConversationViewBody.module.scss +336 -0
  41. package/dist/files/chat/_conversation-tokens.scss +37 -0
  42. package/dist/files/image-render/WidgetImageRender.module.scss +22 -0
  43. package/dist/files/kit/ComposedViewConversationWidget.md +59 -0
  44. package/dist/files/kit/components/data/data.preview-fixtures.json +3298 -0
  45. package/dist/files/kit/components/embedding/widget.preview-fixtures.json +147 -0
  46. package/dist/files/kit/components/entity/entity-link.preview-fixtures.json +340 -0
  47. package/dist/files/kit/components/form/form.preview-fixtures.json +319 -0
  48. package/dist/files/kit/components/inputs/button.preview-fixtures.json +301 -0
  49. package/dist/files/kit/components/inputs/checkbox.preview-fixtures.json +35 -0
  50. package/dist/files/kit/components/inputs/date-picker.preview-fixtures.json +36 -0
  51. package/dist/files/kit/components/inputs/input.preview-fixtures.json +55 -0
  52. package/dist/files/kit/components/inputs/radio-group.preview-fixtures.json +76 -0
  53. package/dist/files/kit/components/inputs/select.preview-fixtures.json +314 -0
  54. package/dist/files/kit/components/inputs/slider.preview-fixtures.json +178 -0
  55. package/dist/files/kit/components/inputs/tabs.preview-fixtures.json +304 -0
  56. package/dist/files/kit/components/inputs/textarea.preview-fixtures.json +37 -0
  57. package/dist/files/kit/components/layout/layout.preview-fixtures.json +892 -0
  58. package/dist/files/kit/components/map/map.preview-fixtures.json +339 -0
  59. package/dist/files/kit/components/media/image-group.preview-fixtures.json +228 -0
  60. package/dist/files/kit/components/media/image.preview-fixtures.json +61 -0
  61. package/dist/files/kit/components/media/video-card/video-card.preview-fixtures.json +121 -0
  62. package/dist/files/kit/components/media/video.preview-fixtures.json +68 -0
  63. package/dist/files/kit/components/rich/code.preview-fixtures.json +105 -0
  64. package/dist/files/kit/components/rich/diagram.preview-fixtures.json +89 -0
  65. package/dist/files/kit/components/rich/math.preview-fixtures.json +152 -0
  66. package/dist/files/kit/components/rich/svg.preview-fixtures.json +243 -0
  67. package/dist/files/kit/components/text/badge.preview-fixtures.json +44 -0
  68. package/dist/files/kit/components/text/caption.preview-fixtures.json +31 -0
  69. package/dist/files/kit/components/text/favicon.preview-fixtures.json +69 -0
  70. package/dist/files/kit/components/text/label.preview-fixtures.json +48 -0
  71. package/dist/files/kit/components/text/link.preview-fixtures.json +103 -0
  72. package/dist/files/kit/components/text/markdown.preview-fixtures.json +29 -0
  73. package/dist/files/kit/components/text/source-ref.preview-fixtures.json +51 -0
  74. package/dist/files/kit/components/text/text.preview-fixtures.json +106 -0
  75. package/dist/files/kit/components/text/title.preview-fixtures.json +172 -0
  76. package/dist/files/kit/composed-view-widget-contract.json +88 -0
  77. package/dist/files/kit/composed-view.preview-fixtures.json +376 -0
  78. package/dist/files/renderer/conversation-widget-layout.module.scss +47 -0
  79. package/dist/files/renderer/widget-tree/composed-node-schema.json +3428 -0
  80. package/dist/files/styles/_conversation-widget-container.scss +6 -0
  81. package/dist/files/styles/_media.scss +50 -0
  82. package/dist/files/styles/_spacings.scss +23 -0
  83. package/dist/files/styles/_surfaces.scss +28 -0
  84. package/dist/files/widgets/ClockConversationWidget/ClockConversationWidget.md +53 -0
  85. package/dist/files/widgets/ClockConversationWidget/clock.preview-fixtures.json +76 -0
  86. package/dist/files/widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget.md +86 -0
  87. package/dist/files/widgets/ConceptExplainerConversationWidget/concept-explainer.preview-fixtures.json +23 -0
  88. package/dist/files/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.md +59 -0
  89. package/dist/files/widgets/ConversationSearchResultsConversationWidget/conversation-search-results.preview-fixtures.json +85 -0
  90. package/dist/files/widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.md +51 -0
  91. package/dist/files/widgets/CurrencyConverterConversationWidget/currency-converter.preview-fixtures.json +73 -0
  92. package/dist/files/widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.md +83 -0
  93. package/dist/files/widgets/CustomVisualizationConversationWidget/custom-visualization.preview-fixtures.json +227 -0
  94. package/dist/files/widgets/CustomVisualizationConversationWidget/sandbox-frame/custom-visualization-frame.html +188 -0
  95. package/dist/files/widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.md +55 -0
  96. package/dist/files/widgets/EntityMentionConversationWidget/entity-mention.preview-fixtures.json +55 -0
  97. package/dist/files/widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.md +61 -0
  98. package/dist/files/widgets/MultiChoiceConversationWidget/multi-choice-widget-contract.json +43 -0
  99. package/dist/files/widgets/MultiChoiceConversationWidget/multi-choice.preview-fixtures.json +103 -0
  100. package/dist/files/widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.md +65 -0
  101. package/dist/files/widgets/QuickRepliesConversationWidget/quick-replies-widget-contract.json +43 -0
  102. package/dist/files/widgets/QuickRepliesConversationWidget/quick-replies.preview-fixtures.json +45 -0
  103. package/dist/files/widgets/SuggestedActions/SuggestedActions.md +60 -0
  104. package/dist/files/widgets/SuggestedActions/suggested-actions.preview-fixtures.json +19 -0
  105. package/dist/files/widgets/ToolTraceConversationWidget/ToolTraceConversationWidget.md +48 -0
  106. package/dist/files/widgets/ToolTraceConversationWidget/tool-trace.preview-fixtures.json +32 -0
  107. package/dist/files/widgets/WebSearchResultsConversationWidget/WebSearchResultsConversationWidget.md +49 -0
  108. package/dist/files/widgets/WebSearchResultsConversationWidget/web-search-results.preview-fixtures.json +57 -0
  109. package/dist/files/widgets/WritingDraftConversationWidget/WritingDraftConversationWidget.md +66 -0
  110. package/dist/files/widgets/WritingDraftConversationWidget/writing-draft.preview-fixtures.json +129 -0
  111. package/dist/image-render.js +11 -10
  112. package/dist/image-render.js.map +1 -1
  113. package/dist/index.js +32 -27
  114. package/dist/index.js.map +1 -1
  115. package/dist/kit.js +11 -2
  116. package/dist/kit.js.map +1 -1
  117. package/dist/preview.js +47 -18
  118. package/dist/preview.js.map +1 -1
  119. package/dist/provider.js +71 -0
  120. package/dist/provider.js.map +1 -0
  121. package/dist/renderer.js +142 -62
  122. package/dist/renderer.js.map +1 -1
  123. package/dist/styles.css +86 -38
  124. package/dist/types/client/testing/test-conversation-widgets.d.ts +25 -0
  125. package/dist/types/client/testing/widget-hydration-stand-ins.d.ts +42 -0
  126. package/dist/types/entries/chat.d.ts +12 -0
  127. package/dist/types/entries/client-testing.d.ts +4 -0
  128. package/dist/types/entries/contract.d.ts +1 -0
  129. package/dist/types/entries/index.d.ts +4 -3
  130. package/dist/types/entries/kit.d.ts +7 -0
  131. package/dist/types/entries/preview.d.ts +2 -0
  132. package/dist/types/entries/provider.d.ts +1 -0
  133. package/dist/types/entries/renderer.d.ts +19 -1
  134. package/dist/types/entries/widgets.d.ts +13 -0
  135. package/dist/types/kit/components/data/apex-chart-component.d.ts +3 -0
  136. package/dist/types/kit/components/data/chart-model.d.ts +164 -0
  137. package/dist/types/kit/components/data/data-value-format.d.ts +44 -0
  138. package/dist/types/kit/components/data/use-chart-palette.d.ts +9 -0
  139. package/dist/types/kit/components/data/use-number-locale.d.ts +5 -0
  140. package/dist/types/kit/components/map/use-google-maps-auth-failure.d.ts +18 -0
  141. package/dist/types/kit/entity-detail/entity-detail-bodies.d.ts +2 -0
  142. package/dist/types/provider/index.d.ts +1 -0
  143. package/dist/types/renderer/_access/ConversationWidgetGateSkeleton.d.ts +6 -0
  144. package/dist/types/renderer/_agent-space/use-conversation-widget-agent-space-fallback.d.ts +16 -0
  145. package/dist/types/renderer/canvas/entity-detail-instance.d.ts +5 -3
  146. package/dist/types/renderer/canvas/use-anchor-widget-agent-space-key.d.ts +17 -0
  147. package/dist/types/renderer/conversationWidgetRegistry.d.ts +6 -0
  148. package/dist/types/renderer/read-conversation-widget-variant.d.ts +22 -0
  149. package/dist/types/renderer/widget-hydration/use-widget-hydration.d.ts +5 -0
  150. package/dist/types/widgets/EntityMentionConversationWidget/stories/EntityMentionAskFlowStory.d.ts +8 -0
  151. package/dist/types/widgets/_shared/CardFooter.d.ts +6 -0
  152. package/dist/types/widgets/_shared/WidgetLabel.d.ts +8 -0
  153. package/dist/types/widgets/_shared/entity-update-channel.d.ts +17 -0
  154. package/dist/types/widgets/_shared/use-element-visible.d.ts +6 -0
  155. package/dist/widgets.js +120 -27
  156. package/dist/widgets.js.map +1 -1
  157. package/package.json +74 -1
  158. package/public-api.json +779 -0
  159. package/dist/chunks/ConversationMarkdown-W7NHglmL.js.map +0 -1
  160. package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js.map +0 -1
  161. package/dist/chunks/canvasBodies-9SuF6NAB.js.map +0 -1
  162. package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js +0 -20
  163. package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js.map +0 -1
  164. package/dist/chunks/widget-name-resolver-DyIY6Zu4.js.map +0 -1
@@ -0,0 +1,268 @@
1
+ @import "../styles/spacings";
2
+ @import "../styles/media";
3
+ @import "./conversation-tokens";
4
+
5
+ .chat {
6
+ width: 100%;
7
+ height: 100%;
8
+ background: linear-gradient(180deg, var(--agents-assistant-100) 0%, white 100%);
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ overflow: hidden;
13
+ position: relative;
14
+ }
15
+
16
+ .genericChat {
17
+ background: $chat-generic-bg;
18
+ }
19
+
20
+ .iconContainer {
21
+ border-radius: $x0_5;
22
+ aspect-ratio: 1;
23
+ width: $x4;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ background-color: var(--agents-assistant-600);
28
+ }
29
+
30
+ .contentWrapper {
31
+ display: flex;
32
+ align-items: flex-start;
33
+ justify-content: center;
34
+ width: 100%;
35
+ flex: 1 1 auto;
36
+ min-height: 0;
37
+ max-height: 100%;
38
+ overflow-y: auto;
39
+ overflow-anchor: none;
40
+ }
41
+
42
+ .chatCanvasOpen {
43
+ @include media(">=desktop") {
44
+ width: calc(100% - $chat-drawer-width);
45
+ }
46
+ }
47
+
48
+ // The shell's own re-open control on a narrow viewport (no divider there): a small pill over the chat, fed by
49
+ // `lastClosedCanvas`. Sits under the host's floating top bar and clear of the chat's right edge.
50
+ .canvasReopenControl {
51
+ position: absolute;
52
+ top: $x1 * 9;
53
+ right: $x2;
54
+ z-index: 3;
55
+ }
56
+
57
+ .splitViewRoot {
58
+ position: relative;
59
+ width: 100%;
60
+ height: 100%;
61
+ min-height: 0;
62
+ display: flex;
63
+ overflow: hidden;
64
+
65
+ // The canvas pane's width: ConversationView sets `--agents-canvas-width-set` (the default split, or the committed pull); while the
66
+ // customer pulls the edge (CanvasResizeHandle) the split follows the pointer through `--agents-canvas-width-drag`, nothing gets selected.
67
+ --agents-canvas-width: var(--agents-canvas-width-set);
68
+
69
+ &[data-resizing] {
70
+ --agents-canvas-width: var(--agents-canvas-width-drag);
71
+
72
+ user-select: none;
73
+ cursor: col-resize;
74
+ }
75
+ }
76
+
77
+ .splitViewPane {
78
+ width: 100%;
79
+ height: 100%;
80
+ min-height: 0;
81
+ display: flex;
82
+ overflow: hidden;
83
+ }
84
+
85
+ // Boxed canvas (side-split only): inset the pane so the canvas floats as a card clear of the floating top bar. The inset
86
+ // is `CANVAS_BOXED_INSET_PX`, which ConversationView hands over as `--agents-canvas-inset` (the pull tab sits on the card's edge).
87
+ .splitViewPaneBoxed {
88
+ padding: var(--agents-canvas-inset);
89
+ box-sizing: border-box;
90
+ }
91
+
92
+ .extensionIntro {
93
+ padding: $chat-top-padding $x3 0;
94
+ display: flex;
95
+ align-items: center;
96
+ flex-direction: column;
97
+ }
98
+
99
+ .extensionIntroTitle {
100
+ margin: $x2 0 $x1;
101
+ }
102
+
103
+ .input {
104
+ width: calc(100% - $x6);
105
+ max-width: $chat-content-max-width;
106
+ margin-bottom: $x2;
107
+ position: relative;
108
+ z-index: 10;
109
+ }
110
+
111
+ .sectionBackgroundSvg {
112
+ width: calc(100vw * 0.3);
113
+ transform: rotate(-15deg);
114
+ aspect-ratio: 1/1;
115
+ position: absolute;
116
+ bottom: -10%;
117
+ right: -$x6;
118
+ opacity: 0.2;
119
+ filter: blur($x0_5);
120
+ pointer-events: none;
121
+ }
122
+
123
+ .suggestions {
124
+ width: 100%;
125
+ padding: $x6 0;
126
+ display: flex;
127
+ flex-direction: row;
128
+ gap: $x2;
129
+ flex-wrap: wrap;
130
+ align-items: center;
131
+ justify-content: center;
132
+ }
133
+
134
+ .chatMessages {
135
+ composes: narrow from "../renderer/conversation-widget-layout.module.scss";
136
+ display: flex;
137
+ max-width: $chat-messages-max-width;
138
+ // Hosts can shrink the clearance under the floating header (e.g. A host compact
139
+ // panel sets --agents-chat-top-padding); default keeps the full 168px.
140
+ padding: var(--agents-chat-top-padding, #{$chat-top-padding}) $x3 0;
141
+ // Published for content a host renders into the list (renderAfterMessage): the activity history cancels it while
142
+ // it grows in, so the rows below never jump by it.
143
+ --chat-messages-gap: #{$x3};
144
+ gap: var(--chat-messages-gap);
145
+ flex-direction: column;
146
+ z-index: 2;
147
+
148
+ @include media("<=mobile") {
149
+ width: 100%;
150
+ margin-left: 0;
151
+ margin-right: 0;
152
+ padding-left: $x1;
153
+ padding-right: $x1;
154
+ }
155
+
156
+ // The composed `.narrow` only collapses the column to full width at <=768px;
157
+ // on the tablet-ish panes between 768px and the desktop breakpoint the 60%
158
+ // column leaves a wide empty margin on each side. As the pane approaches
159
+ // mobile, reclaim that margin and let the column run full width (padding still
160
+ // keeps content off the edges).
161
+ @container chatPane (max-width: 64rem) {
162
+ width: 100%;
163
+ margin-left: 0;
164
+ margin-right: 0;
165
+ }
166
+
167
+ @container chatPane (max-width: #{$chat-pane-narrow-breakpoint}) {
168
+ width: 100%;
169
+ margin-left: 0;
170
+ margin-right: 0;
171
+ // Hosts can widen the inset (e.g. A host compact panel sets --agents-chat-narrow-padding
172
+ // so content clears the rounded corners); default keeps the current 4px.
173
+ padding-left: var(--agents-chat-narrow-padding, #{$x0_5});
174
+ padding-right: var(--agents-chat-narrow-padding, #{$x0_5});
175
+ }
176
+ }
177
+
178
+ // Per-message anchor row (ConversationMessageList). A flex column so user bubbles keep `align-self: flex-end` and assistant
179
+ // messages keep full width — visually identical to the un-wrapped layout, the outer `gap` still spaces the rows.
180
+ // `scroll-margin-top` keeps a scrolled-to message clear of the ~88px floating agent top bar.
181
+ .messageRow {
182
+ display: flex;
183
+ flex-direction: column;
184
+ scroll-margin-top: calc(#{$x9} + #{$x3});
185
+ border-radius: $x1;
186
+
187
+ // Transient flash when a search result scrolls this message into view (data-flash toggled for ~2s).
188
+ &[data-flash="true"] {
189
+ animation: messageRowFlash 2s ease-out;
190
+ }
191
+ }
192
+
193
+ @keyframes messageRowFlash {
194
+ 0% {
195
+ background-color: var(--agents-bg-hover-primary);
196
+ }
197
+ 100% {
198
+ background-color: transparent;
199
+ }
200
+ }
201
+
202
+ .messagesBottom {
203
+ margin-top: $x5;
204
+ }
205
+
206
+ .genericIllustrationContainer {
207
+ pointer-events: none;
208
+
209
+ & img {
210
+ --agents-illustration-width: calc(100vh / 2);
211
+ --agents-illustration-overlap: calc(100vh / 3);
212
+
213
+ position: absolute;
214
+ filter: blur($x2);
215
+ opacity: 0.2;
216
+
217
+ bottom: calc(var(--agents-illustration-width) / -3);
218
+
219
+ &:nth-child(1) {
220
+ left: calc(-1 * var(--agents-illustration-overlap));
221
+ width: var(--agents-illustration-width);
222
+ height: var(--agents-illustration-width);
223
+ transform: rotate(-4.841deg);
224
+ aspect-ratio: 1;
225
+ }
226
+
227
+ &:nth-child(2) {
228
+ left: 0;
229
+ width: var(--agents-illustration-width);
230
+ height: var(--agents-illustration-width);
231
+ transform: rotate(-4.841deg);
232
+ aspect-ratio: 1;
233
+ }
234
+
235
+ &:nth-child(3) {
236
+ left: var(--agents-illustration-overlap);
237
+ width: var(--agents-illustration-width);
238
+ height: var(--agents-illustration-width);
239
+ transform: rotate(8.973deg);
240
+ aspect-ratio: 1;
241
+ }
242
+
243
+ &:nth-child(4) {
244
+ left: calc(2 * var(--agents-illustration-overlap));
245
+ width: var(--agents-illustration-width);
246
+ height: var(--agents-illustration-width);
247
+ transform: rotate(8.973deg);
248
+ aspect-ratio: 1;
249
+
250
+ }
251
+
252
+ &:nth-child(5) {
253
+ left: calc(3 * var(--agents-illustration-overlap));
254
+ width: var(--agents-illustration-width);
255
+ height: var(--agents-illustration-width);
256
+ transform: rotate(-4.841deg);
257
+ aspect-ratio: 1;
258
+ }
259
+
260
+ &:nth-child(6) {
261
+ left: calc(4 * var(--agents-illustration-overlap));
262
+ width: var(--agents-illustration-width);
263
+ height: var(--agents-illustration-width);
264
+ transform: rotate(-4.841deg);
265
+ aspect-ratio: 1;
266
+ }
267
+ }
268
+ }
@@ -0,0 +1,336 @@
1
+ @import "../../styles/spacings";
2
+ @import "../../styles/media";
3
+ @import "../conversation-tokens";
4
+ @import "../../styles/conversation-widget-container";
5
+
6
+ .chat {
7
+ width: 100%;
8
+ height: 100%;
9
+ background: linear-gradient(180deg, var(--agents-assistant-100) 0%, white 100%);
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ position: relative;
14
+ }
15
+
16
+ .genericChat {
17
+ background: $chat-generic-bg;
18
+ }
19
+
20
+ // When the caller supplies a custom background via the `background` prop, the
21
+ // default gradient is suppressed — the caller (and any solid color from a
22
+ // parent surface) paints the chat background entirely.
23
+ .customBg {
24
+ background: var(--agents-chat-background);
25
+ }
26
+
27
+ // The host paints an EQUIVALENT solid fill at its own root (behind the side panels too) — this pane must be fully
28
+ // transparent so that layer shows through instead of being occluded by this one.
29
+ .customBg.backgroundPaintedByHost {
30
+ background: transparent;
31
+ }
32
+
33
+ // Absolutely-positioned slot for the caller's background node. Lives BEHIND
34
+ // the chat content via z-index: 0 + content layered at z-index: 1.
35
+ .backgroundLayer {
36
+ position: absolute;
37
+ inset: 0;
38
+ z-index: 0;
39
+ overflow: hidden;
40
+ pointer-events: none;
41
+ }
42
+
43
+ // Agent full-screen ONLY (custom shader background, not the compact side-panel): the chat owns the whole viewport, so
44
+ // the background layer and the top blur band stretch edge-to-edge across it instead of being confined to the pane.
45
+ .customBg:not(.chatCompact) {
46
+ .backgroundLayer {
47
+ width: 100vw;
48
+ background-color: var(--agents-chat-background);
49
+ }
50
+
51
+ // Fixed (out of the flex flow) + full viewport width: the blur band pins to the top of the viewport across its
52
+ // whole width, rather than tracking the content column as the in-pane sticky version does.
53
+ .contentWrapper::before {
54
+ position: fixed;
55
+ width: 100vw;
56
+ }
57
+ }
58
+
59
+ // Opt-in override (agent host, docked side panel only): confine the band to the chat pane so it compresses with
60
+ // the chat when a sibling panel pushes it aside. Back to the base rule's `sticky` (NOT `absolute` — .contentWrapper
61
+ // IS the scroll container, an absolute band scrolls away with the messages); `width: 100%` undoes the 100vw.
62
+ .customBg.confineTopBlurBandToChatPane:not(.chatCompact) .contentWrapper::before {
63
+ position: sticky;
64
+ width: 100%;
65
+ // Two mask layers INTERSECTED: the base bottom fade-out plus a $x2 left/right edge fade, so the confined band
66
+ // doesn't end in a hard vertical line beside the docked side panel.
67
+ -webkit-mask-image:
68
+ linear-gradient(to bottom, black 0%, black 80%, transparent 100%),
69
+ linear-gradient(to right, transparent 0, black $x2, black calc(100% - #{$x2}), transparent 100%);
70
+ -webkit-mask-composite: source-in;
71
+ mask-image:
72
+ linear-gradient(to bottom, black 0%, black 80%, transparent 100%),
73
+ linear-gradient(to right, transparent 0, black $x2, black calc(100% - #{$x2}), transparent 100%);
74
+ mask-composite: intersect;
75
+ }
76
+
77
+ .contentWrapper {
78
+ position: relative;
79
+ z-index: 1;
80
+ display: flex;
81
+ // The blur (::before) and fade (::after) pseudos are full-width flex items; wrapping drops each onto its own
82
+ // line, so with a single content child there are three lines: blur, message column, fade.
83
+ flex-wrap: wrap;
84
+ // Pins the blur line to the top and the fade line to the viewport bottom when the conversation is too short to
85
+ // scroll (the message column sits centered between them); on overflow there's no free space, so `position: sticky`
86
+ // takes over and keeps both pinned to the top/bottom edges while scrolling.
87
+ align-content: space-between;
88
+ align-items: flex-start;
89
+ justify-content: center;
90
+ width: 100%;
91
+ height: 100%;
92
+ overflow-x: hidden;
93
+ overflow-y: auto;
94
+ @include conversation-widget-container;
95
+
96
+ // Top frosted-glass band that blurs the messages scrolling up under the floating top bar. Hosted here (not in
97
+ // the top bar) so it tracks the chat content column, and because this wrapper's container-type makes it the
98
+ // backdrop root the blur samples its own messages. Mirrors the
99
+ // bottom ::after: a full-width sticky flex line whose negative margin cancels its height so it adds nothing to
100
+ // the scrollable area. Masks out over its bottom 20% so the blur has no hard edge.
101
+ &::before {
102
+ content: "";
103
+ position: sticky;
104
+ top: 0;
105
+ left: 0;
106
+ flex: 0 0 100%;
107
+ height: $x9;
108
+ margin-bottom: -1 * $x9;
109
+ pointer-events: none;
110
+ z-index: 3;
111
+ -webkit-backdrop-filter: blur($x2);
112
+ backdrop-filter: blur($x2);
113
+ -webkit-mask-image: linear-gradient(to bottom, black 0%, black 80%, transparent 100%);
114
+ mask-image: linear-gradient(to bottom, black 0%, black 80%, transparent 100%);
115
+ }
116
+
117
+ // Bottom fade-out that keeps the last messages dissolving into the chat
118
+ // background as they scroll towards the bottom. Anchored to the scroll
119
+ // viewport (not the message list) so it stays at the bottom edge regardless
120
+ // of how tall the conversation is. Negative margin cancels its own height so
121
+ // it never adds to the scrollable area. Fades to the agent conversation tint
122
+ // when present (set on an ancestor), else the neutral page background.
123
+ &::after {
124
+ content: "";
125
+ position: sticky;
126
+ bottom: 0;
127
+ flex: 0 0 100%;
128
+ height: $x4;
129
+ margin-top: -$x4;
130
+ pointer-events: none;
131
+ background: linear-gradient(180deg, transparent 0%, var(--agents-chat-background) 75%);
132
+ z-index: 2;
133
+ }
134
+ }
135
+
136
+ // An active agent thread fills the scroll pane even before its first visible reply. A task CTA starts with a hidden
137
+ // signal, so there is no user row for question-pinning to reserve this room. Filling the pane keeps the activity
138
+ // at the top and the sticky fade at the bottom, instead of distributing spare space around a short message list.
139
+ .topAlignedMessages {
140
+ min-height: 100%;
141
+ box-sizing: border-box;
142
+ }
143
+
144
+ // Over an animated backdrop (`data-agent-shader-backdrop` on an ancestor of the chat): the backdrop has no flat colour
145
+ // to fade into, so the bottom band blurs the last messages into it (a mirror of the top ::before) instead of tinting
146
+ // them. Deliberately NOT a mask on .contentWrapper: a masked scroll container becomes the backdrop root and the top
147
+ // band's backdrop-filter stops sampling the messages.
148
+ [data-agent-shader-backdrop] .contentWrapper::after {
149
+ height: $x6;
150
+ margin-top: -$x6;
151
+ background: none;
152
+ -webkit-backdrop-filter: blur($x2);
153
+ backdrop-filter: blur($x2);
154
+ -webkit-mask-image: linear-gradient(to top, black 0%, black 40%, transparent 100%);
155
+ mask-image: linear-gradient(to top, black 0%, black 40%, transparent 100%);
156
+ }
157
+
158
+ // Zero-height positioning row for the scroll-to-latest button: a flex sibling directly above the
159
+ // input, so the button floats just over it regardless of the input's (multiline) height. z-index
160
+ // above the sticky bottom fade (z 2) and level with the input (z 10).
161
+ .scrollToLatestAnchor {
162
+ position: relative;
163
+ width: 100%;
164
+ height: 0;
165
+ z-index: 10;
166
+
167
+ >* {
168
+ position: absolute;
169
+ bottom: $x2;
170
+ left: 50%;
171
+ transform: translateX(-50%);
172
+ }
173
+ }
174
+
175
+ // The bottom slot of the pane: the chat input, and any caller-supplied node standing IN PLACE of it
176
+ // (`inputReplacementSlot` — the agent closed-conversation status bar). Same width, same stacking: positioned above
177
+ // the background layer (z-index 0) and the sticky bottom fade.
178
+ // Hosts can tighten the inset from the pane's edges (the agent compact panel sets --agents-chat-input-side-inset and
179
+ // --agents-chat-input-bottom-inset); the defaults keep $x3 at each side and $x2 below.
180
+ // The message column with a host layer over it (`contentOverlaySlot`, the voice chat's focus mode). Switching, both go
181
+ // by an ellipse growing up from the input: the column clears inside it (--agents-content-hide) as it rises, fades and blurs,
182
+ // a little quicker so it stays just ahead of the layer's ellipse (--agents-overlay-reveal) that reveals it. Back, the other
183
+ // way. The motion starts slow and drives hard into the end.
184
+ @property --agents-content-hide {
185
+ syntax: "<percentage>";
186
+ inherits: false;
187
+ initial-value: 0%;
188
+ }
189
+
190
+ @property --agents-overlay-reveal {
191
+ syntax: "<percentage>";
192
+ inherits: false;
193
+ initial-value: 0%;
194
+ }
195
+
196
+ .contentLayers {
197
+ --agents-layers-punch: cubic-bezier(0.7, 0, 0.84, 0.25);
198
+ --agents-layers-swap: 720ms var(--agents-layers-punch);
199
+ position: relative;
200
+ z-index: 1;
201
+ display: grid;
202
+ flex: 1 1 0;
203
+ min-height: 0;
204
+ width: 100%;
205
+
206
+ > .contentWrapper,
207
+ > .contentOverlay {
208
+ grid-area: 1 / 1;
209
+ min-height: 0;
210
+ }
211
+
212
+ > .contentWrapper {
213
+ -webkit-mask-image: radial-gradient(
214
+ calc(var(--agents-content-hide) * 4.8) calc(var(--agents-content-hide) * 3.9) at 50% 100%,
215
+ transparent 40%,
216
+ black 100%
217
+ );
218
+ mask-image: radial-gradient(
219
+ calc(var(--agents-content-hide) * 4.8) calc(var(--agents-content-hide) * 3.9) at 50% 100%,
220
+ transparent 40%,
221
+ black 100%
222
+ );
223
+ transition:
224
+ opacity var(--agents-layers-swap),
225
+ transform var(--agents-layers-swap),
226
+ filter var(--agents-layers-swap),
227
+ --agents-content-hide 600ms var(--agents-layers-punch) 120ms,
228
+ visibility 0s;
229
+ }
230
+
231
+ &[data-overlay-shown] > .contentWrapper {
232
+ --agents-content-hide: 100%;
233
+ visibility: hidden;
234
+ opacity: 0;
235
+ transform: translateY(-$x8);
236
+ filter: blur($x1);
237
+ transition:
238
+ opacity var(--agents-layers-swap),
239
+ transform var(--agents-layers-swap),
240
+ filter var(--agents-layers-swap),
241
+ --agents-content-hide 600ms var(--agents-layers-punch),
242
+ visibility 0s 720ms;
243
+ }
244
+ }
245
+
246
+ .contentOverlay {
247
+ position: relative;
248
+ z-index: 2;
249
+ display: flex;
250
+ flex-direction: column;
251
+ visibility: hidden;
252
+ pointer-events: none;
253
+ -webkit-mask-image: radial-gradient(
254
+ calc(var(--agents-overlay-reveal) * 4.4) calc(var(--agents-overlay-reveal) * 3.6) at 50% 100%,
255
+ black 35%,
256
+ transparent 100%
257
+ );
258
+ mask-image: radial-gradient(
259
+ calc(var(--agents-overlay-reveal) * 4.4) calc(var(--agents-overlay-reveal) * 3.6) at 50% 100%,
260
+ black 35%,
261
+ transparent 100%
262
+ );
263
+ transform: translateY($x8);
264
+ transition:
265
+ transform var(--agents-layers-swap),
266
+ --agents-overlay-reveal var(--agents-layers-swap),
267
+ visibility 0s 720ms;
268
+
269
+ .contentLayers[data-overlay-shown] > & {
270
+ --agents-overlay-reveal: 100%;
271
+ visibility: visible;
272
+ pointer-events: auto;
273
+ transform: none;
274
+ transition:
275
+ transform 0s,
276
+ --agents-overlay-reveal var(--agents-layers-swap),
277
+ visibility 0s;
278
+ }
279
+ }
280
+
281
+ @media (prefers-reduced-motion: reduce) {
282
+ .contentLayers > .contentWrapper,
283
+ .contentLayers[data-overlay-shown] > .contentWrapper,
284
+ .contentOverlay,
285
+ .contentLayers[data-overlay-shown] > .contentOverlay {
286
+ -webkit-mask-image: none;
287
+ mask-image: none;
288
+ transform: none;
289
+ filter: none;
290
+ transition:
291
+ opacity 200ms ease,
292
+ visibility 0s 200ms;
293
+ }
294
+
295
+ .contentOverlay {
296
+ opacity: 0;
297
+ }
298
+
299
+ .contentLayers[data-overlay-shown] > .contentOverlay {
300
+ opacity: 1;
301
+ transition:
302
+ opacity 200ms ease,
303
+ visibility 0s;
304
+ }
305
+ }
306
+
307
+ .input,
308
+ .inputReplacement {
309
+ width: calc(100% - 2 * var(--agents-chat-input-side-inset, #{$x3}));
310
+ max-width: $chat-content-max-width;
311
+ margin-bottom: var(--agents-chat-input-bottom-inset, #{$x2});
312
+ position: relative;
313
+ z-index: 10;
314
+ }
315
+
316
+ // AI-extension category conversation: the input's glow and send button take the category colour (`--agents-assistant-500`
317
+ // from the palette class on `.chat`; the theme's CTA colour where the category has none). Without a category they keep
318
+ // the inherited `--ai-base-color` — the agent's own colour inside the agent.
319
+ .inputInCategory {
320
+ --ai-base-color: var(--agents-assistant-500, var(--agents-bg-cta));
321
+ }
322
+
323
+ // Scroll-up pagination "loading older messages" hint — floats at the top-center of the scroll pane so it doesn't
324
+ // disturb the centered message column.
325
+ .olderLoading {
326
+ position: absolute;
327
+ top: $x2;
328
+ left: 50%;
329
+ transform: translateX(-50%);
330
+ z-index: 5;
331
+ padding: $x1 $x3;
332
+ border-radius: 999px;
333
+ background: var(--agents-bg-var);
334
+ color: var(--agents-fg-light);
335
+ pointer-events: none;
336
+ }
@@ -0,0 +1,37 @@
1
+ // Central design tokens for the Conversation module.
2
+ // Use these instead of inlining hex literals in component scss.
3
+ // If a value belongs to the global design system, promote it to a package variable
4
+ // (`--agents-…`, styles/_ai-variables.scss) instead of adding it here.
5
+
6
+ // Generic-chat (unbranded) background gradient — used when no product brand color is present.
7
+ $chat-generic-bg:
8
+ linear-gradient(236deg, #fff -0.85%, #eaf5fe 16.3%, #e9f3fd 22.63%, #e8f2fd 28.95%, #fde2ef 85.17%),
9
+ linear-gradient(165deg, #fff 13.02%, #e8f2fd 47.07%);
10
+
11
+ @import "../styles/surfaces";
12
+ // Alias of the card shadow; new code imports $card-shadow from styles/_surfaces.scss directly.
13
+ $chat-card-shadow: $card-shadow;
14
+
15
+ // Popup/menu shadow (MockCommandMenu).
16
+ $chat-popup-shadow: 0 $x0_5 $x2 0 rgba(0, 0, 0, 0.12);
17
+
18
+ // Translucent-white overlay for the selection pill inside a user bubble. Deliberately white
19
+ // (NOT a theme background token): it lightens whatever bubble colour sits under it — product
20
+ // colour, white, or dark — so the pill reads on every bubble theme. Flipping it to the
21
+ // background colour would darken it on the dark bubble, so it stays white.
22
+ $chat-selection-pill-overlay: rgba(255, 255, 255, 0.18);
23
+
24
+ // Container-query breakpoint for compact chat pane.
25
+ $chat-pane-narrow-breakpoint: 40rem;
26
+
27
+ // Layout widths shared across Conversation subcomponents.
28
+ // All expressed as multiples of $x1 (0.5rem / 8px) so they stay on the spacing grid.
29
+ $chat-content-max-width: 100 * $x1; // 800px
30
+ $chat-messages-max-width: 150 * $x1; // 1200px
31
+ $chat-user-message-max-width: 75 * $x1; // 600px
32
+ $chat-suggestion-card-max-width: 40 * $x1; // 320px
33
+ $chat-suggestion-card-min-height: 19 * $x1; // 152px (was 150px — rounded onto grid)
34
+ $chat-drawer-width: 45 * $x1; // 360px
35
+
36
+ // Top padding under the floating header (used by the intro + message list).
37
+ $chat-top-padding: 21 * $x1; // 168px
@@ -0,0 +1,22 @@
1
+ @import "../styles/conversation-widget-container";
2
+
3
+ :global(html), :global(body) {
4
+ margin: 0;
5
+ padding: 0;
6
+ }
7
+
8
+ .root {
9
+ @include conversation-widget-container;
10
+ width: var(--agents-widget-image-width);
11
+ display: flow-root;
12
+ overflow: visible;
13
+ pointer-events: none;
14
+ color: var(--agents-fg);
15
+ background: var(--agents-bg);
16
+
17
+ &, * {
18
+ animation: none !important;
19
+ transition: none !important;
20
+ caret-color: transparent !important;
21
+ }
22
+ }