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

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 (143) hide show
  1. package/README.md +3 -2
  2. package/dist/chat.js +22 -72
  3. package/dist/chat.js.map +1 -1
  4. package/dist/chunks/{ConversationMarkdown-W7NHglmL.js → ConversationMarkdown-CJhAnuVa.js} +110 -8
  5. package/dist/chunks/ConversationMarkdown-CJhAnuVa.js.map +1 -0
  6. package/dist/chunks/{WebSearchResultsConversationWidget-BvnLWHyi.js → WebSearchResultsConversationWidget-DRBQvycE.js} +140 -1125
  7. package/dist/chunks/WebSearchResultsConversationWidget-DRBQvycE.js.map +1 -0
  8. package/dist/chunks/{canvasBodies-9SuF6NAB.js → canvasBodies-DLjDkviP.js} +9 -6
  9. package/dist/chunks/canvasBodies-DLjDkviP.js.map +1 -0
  10. package/dist/chunks/{canvas-behaviours-BRFR1ALE.js → decide-canvas-open-DBWoWtAC.js} +18 -2
  11. package/dist/chunks/decide-canvas-open-DBWoWtAC.js.map +1 -0
  12. package/dist/chunks/entity-detail-name-3A82gDAp.js +15 -0
  13. package/dist/chunks/entity-detail-name-3A82gDAp.js.map +1 -0
  14. package/dist/chunks/icon-names-Di6c4zLo.js +86 -0
  15. package/dist/chunks/icon-names-Di6c4zLo.js.map +1 -0
  16. package/dist/chunks/index-7Qc_3GbG.js +1046 -0
  17. package/dist/chunks/index-7Qc_3GbG.js.map +1 -0
  18. package/dist/chunks/{widget-image-readiness-signal-DeOuL89j.js → widget-image-readiness-signal-D3ci53xr.js} +2 -2
  19. package/dist/chunks/{widget-image-readiness-signal-DeOuL89j.js.map → widget-image-readiness-signal-D3ci53xr.js.map} +1 -1
  20. package/dist/chunks/{widget-name-resolver-DyIY6Zu4.js → widget-name-resolver-C8SfpiR5.js} +48 -116
  21. package/dist/chunks/widget-name-resolver-C8SfpiR5.js.map +1 -0
  22. package/dist/client-testing.js +68 -1
  23. package/dist/client-testing.js.map +1 -1
  24. package/dist/files/chat/Conversation.module.scss +268 -0
  25. package/dist/files/chat/ConversationViewBody/ConversationViewBody.module.scss +336 -0
  26. package/dist/files/chat/_conversation-tokens.scss +37 -0
  27. package/dist/files/image-render/WidgetImageRender.module.scss +22 -0
  28. package/dist/files/kit/ComposedViewConversationWidget.md +59 -0
  29. package/dist/files/kit/components/data/data.preview-fixtures.json +3298 -0
  30. package/dist/files/kit/components/embedding/widget.preview-fixtures.json +147 -0
  31. package/dist/files/kit/components/entity/entity-link.preview-fixtures.json +340 -0
  32. package/dist/files/kit/components/form/form.preview-fixtures.json +319 -0
  33. package/dist/files/kit/components/inputs/button.preview-fixtures.json +301 -0
  34. package/dist/files/kit/components/inputs/checkbox.preview-fixtures.json +35 -0
  35. package/dist/files/kit/components/inputs/date-picker.preview-fixtures.json +36 -0
  36. package/dist/files/kit/components/inputs/input.preview-fixtures.json +55 -0
  37. package/dist/files/kit/components/inputs/radio-group.preview-fixtures.json +76 -0
  38. package/dist/files/kit/components/inputs/select.preview-fixtures.json +314 -0
  39. package/dist/files/kit/components/inputs/slider.preview-fixtures.json +178 -0
  40. package/dist/files/kit/components/inputs/tabs.preview-fixtures.json +304 -0
  41. package/dist/files/kit/components/inputs/textarea.preview-fixtures.json +37 -0
  42. package/dist/files/kit/components/layout/layout.preview-fixtures.json +892 -0
  43. package/dist/files/kit/components/map/map.preview-fixtures.json +339 -0
  44. package/dist/files/kit/components/media/image-group.preview-fixtures.json +228 -0
  45. package/dist/files/kit/components/media/image.preview-fixtures.json +61 -0
  46. package/dist/files/kit/components/media/video-card/video-card.preview-fixtures.json +121 -0
  47. package/dist/files/kit/components/media/video.preview-fixtures.json +68 -0
  48. package/dist/files/kit/components/rich/code.preview-fixtures.json +105 -0
  49. package/dist/files/kit/components/rich/diagram.preview-fixtures.json +89 -0
  50. package/dist/files/kit/components/rich/math.preview-fixtures.json +152 -0
  51. package/dist/files/kit/components/rich/svg.preview-fixtures.json +243 -0
  52. package/dist/files/kit/components/text/badge.preview-fixtures.json +44 -0
  53. package/dist/files/kit/components/text/caption.preview-fixtures.json +31 -0
  54. package/dist/files/kit/components/text/favicon.preview-fixtures.json +69 -0
  55. package/dist/files/kit/components/text/label.preview-fixtures.json +48 -0
  56. package/dist/files/kit/components/text/link.preview-fixtures.json +103 -0
  57. package/dist/files/kit/components/text/markdown.preview-fixtures.json +29 -0
  58. package/dist/files/kit/components/text/source-ref.preview-fixtures.json +51 -0
  59. package/dist/files/kit/components/text/text.preview-fixtures.json +106 -0
  60. package/dist/files/kit/components/text/title.preview-fixtures.json +172 -0
  61. package/dist/files/kit/composed-view-widget-contract.json +88 -0
  62. package/dist/files/kit/composed-view.preview-fixtures.json +376 -0
  63. package/dist/files/renderer/conversation-widget-layout.module.scss +47 -0
  64. package/dist/files/renderer/widget-tree/composed-node-schema.json +3428 -0
  65. package/dist/files/styles/_conversation-widget-container.scss +6 -0
  66. package/dist/files/styles/_media.scss +50 -0
  67. package/dist/files/styles/_spacings.scss +23 -0
  68. package/dist/files/styles/_surfaces.scss +28 -0
  69. package/dist/files/widgets/ClockConversationWidget/ClockConversationWidget.md +53 -0
  70. package/dist/files/widgets/ClockConversationWidget/clock.preview-fixtures.json +76 -0
  71. package/dist/files/widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget.md +86 -0
  72. package/dist/files/widgets/ConceptExplainerConversationWidget/concept-explainer.preview-fixtures.json +23 -0
  73. package/dist/files/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.md +59 -0
  74. package/dist/files/widgets/ConversationSearchResultsConversationWidget/conversation-search-results.preview-fixtures.json +85 -0
  75. package/dist/files/widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.md +51 -0
  76. package/dist/files/widgets/CurrencyConverterConversationWidget/currency-converter.preview-fixtures.json +73 -0
  77. package/dist/files/widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.md +83 -0
  78. package/dist/files/widgets/CustomVisualizationConversationWidget/custom-visualization.preview-fixtures.json +227 -0
  79. package/dist/files/widgets/CustomVisualizationConversationWidget/sandbox-frame/custom-visualization-frame.html +188 -0
  80. package/dist/files/widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.md +55 -0
  81. package/dist/files/widgets/EntityMentionConversationWidget/entity-mention.preview-fixtures.json +55 -0
  82. package/dist/files/widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.md +61 -0
  83. package/dist/files/widgets/MultiChoiceConversationWidget/multi-choice-widget-contract.json +43 -0
  84. package/dist/files/widgets/MultiChoiceConversationWidget/multi-choice.preview-fixtures.json +103 -0
  85. package/dist/files/widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.md +65 -0
  86. package/dist/files/widgets/QuickRepliesConversationWidget/quick-replies-widget-contract.json +43 -0
  87. package/dist/files/widgets/QuickRepliesConversationWidget/quick-replies.preview-fixtures.json +45 -0
  88. package/dist/files/widgets/SuggestedActions/SuggestedActions.md +60 -0
  89. package/dist/files/widgets/SuggestedActions/suggested-actions.preview-fixtures.json +19 -0
  90. package/dist/files/widgets/ToolTraceConversationWidget/ToolTraceConversationWidget.md +48 -0
  91. package/dist/files/widgets/ToolTraceConversationWidget/tool-trace.preview-fixtures.json +32 -0
  92. package/dist/files/widgets/WebSearchResultsConversationWidget/WebSearchResultsConversationWidget.md +49 -0
  93. package/dist/files/widgets/WebSearchResultsConversationWidget/web-search-results.preview-fixtures.json +57 -0
  94. package/dist/files/widgets/WritingDraftConversationWidget/WritingDraftConversationWidget.md +66 -0
  95. package/dist/files/widgets/WritingDraftConversationWidget/writing-draft.preview-fixtures.json +129 -0
  96. package/dist/image-render.js +11 -10
  97. package/dist/image-render.js.map +1 -1
  98. package/dist/index.js +32 -28
  99. package/dist/index.js.map +1 -1
  100. package/dist/kit.js +11 -2
  101. package/dist/kit.js.map +1 -1
  102. package/dist/preview.js +7 -6
  103. package/dist/provider.js +71 -0
  104. package/dist/provider.js.map +1 -0
  105. package/dist/renderer.js +138 -63
  106. package/dist/renderer.js.map +1 -1
  107. package/dist/styles.css +32 -17
  108. package/dist/types/client/testing/test-conversation-widgets.d.ts +25 -0
  109. package/dist/types/client/testing/widget-hydration-stand-ins.d.ts +33 -0
  110. package/dist/types/entries/chat.d.ts +10 -0
  111. package/dist/types/entries/client-testing.d.ts +2 -0
  112. package/dist/types/entries/index.d.ts +4 -3
  113. package/dist/types/entries/kit.d.ts +7 -0
  114. package/dist/types/entries/preview.d.ts +1 -0
  115. package/dist/types/entries/provider.d.ts +1 -0
  116. package/dist/types/entries/renderer.d.ts +16 -0
  117. package/dist/types/entries/widgets.d.ts +13 -0
  118. package/dist/types/kit/components/data/apex-chart-component.d.ts +3 -0
  119. package/dist/types/kit/components/data/chart-model.d.ts +164 -0
  120. package/dist/types/kit/components/data/data-value-format.d.ts +44 -0
  121. package/dist/types/kit/components/data/use-chart-palette.d.ts +9 -0
  122. package/dist/types/kit/components/data/use-number-locale.d.ts +5 -0
  123. package/dist/types/provider/index.d.ts +1 -0
  124. package/dist/types/renderer/_access/ConversationWidgetGateSkeleton.d.ts +6 -0
  125. package/dist/types/renderer/_agent-space/use-conversation-widget-agent-space-fallback.d.ts +16 -0
  126. package/dist/types/renderer/canvas/use-anchor-widget-agent-space-key.d.ts +17 -0
  127. package/dist/types/renderer/conversationWidgetRegistry.d.ts +6 -0
  128. package/dist/types/renderer/read-conversation-widget-variant.d.ts +22 -0
  129. package/dist/types/widgets/_shared/CardFooter.d.ts +6 -0
  130. package/dist/types/widgets/_shared/WidgetLabel.d.ts +8 -0
  131. package/dist/types/widgets/_shared/entity-update-channel.d.ts +17 -0
  132. package/dist/types/widgets/_shared/use-element-visible.d.ts +6 -0
  133. package/dist/widgets.js +120 -27
  134. package/dist/widgets.js.map +1 -1
  135. package/package.json +74 -1
  136. package/public-api.json +761 -0
  137. package/dist/chunks/ConversationMarkdown-W7NHglmL.js.map +0 -1
  138. package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js.map +0 -1
  139. package/dist/chunks/canvas-behaviours-BRFR1ALE.js.map +0 -1
  140. package/dist/chunks/canvasBodies-9SuF6NAB.js.map +0 -1
  141. package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js +0 -20
  142. package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js.map +0 -1
  143. package/dist/chunks/widget-name-resolver-DyIY6Zu4.js.map +0 -1
@@ -0,0 +1,319 @@
1
+ {
2
+ "wireName": "ComposedView",
3
+ "fixtures": [
4
+ {
5
+ "name": "contact-request",
6
+ "description": "A Form with a recipient, a subject and a message (the editable e-mail draft of ChatGPT reference 47): the owner edits the fields and sends them to the agent, or declines.",
7
+ "payload": {
8
+ "state": {
9
+ "recipient": "",
10
+ "subject": "Short request",
11
+ "message": "Hello,\n\nI am interested in your offer and would like more information on prices, availability and terms.\n\nCould you send me the documents?\n\nKind regards"
12
+ },
13
+ "view": {
14
+ "type": "Form",
15
+ "name": "shortRequest",
16
+ "title": "Short request",
17
+ "description": "Edit the draft, then send it to me — I will e-mail it for you.",
18
+ "submitLabel": "Send request",
19
+ "declineLabel": "Not now",
20
+ "requiredFields": [
21
+ "recipient",
22
+ "message"
23
+ ],
24
+ "children": [
25
+ {
26
+ "type": "Input",
27
+ "label": "Recipient",
28
+ "inputType": "email",
29
+ "placeholder": "name@example.com",
30
+ "value": {
31
+ "$state": "recipient"
32
+ },
33
+ "onChange": {
34
+ "set": "recipient"
35
+ }
36
+ },
37
+ {
38
+ "type": "Input",
39
+ "label": "Subject",
40
+ "value": {
41
+ "$state": "subject"
42
+ },
43
+ "onChange": {
44
+ "set": "subject"
45
+ }
46
+ },
47
+ {
48
+ "type": "Textarea",
49
+ "label": "Your question",
50
+ "rows": 7,
51
+ "value": {
52
+ "$state": "message"
53
+ },
54
+ "onChange": {
55
+ "set": "message"
56
+ }
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ "expectedState": "data",
62
+ "width": 528,
63
+ "interactions": [
64
+ {
65
+ "name": "send without a recipient",
66
+ "click": {
67
+ "text": "Send request"
68
+ }
69
+ },
70
+ {
71
+ "name": "type the recipient",
72
+ "fill": {
73
+ "selector": "input[type=email]",
74
+ "value": "info@example.com"
75
+ }
76
+ },
77
+ {
78
+ "name": "send the request",
79
+ "click": {
80
+ "text": "Send request"
81
+ }
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "name": "filter-and-state",
87
+ "description": "The 'Filter & State' panel of ChatGPT reference 52 as a Form: period tabs, a channel select, a reference date, a traffic slider and a checkbox; Apply sends the chosen settings.",
88
+ "payload": {
89
+ "state": {
90
+ "period": "7d",
91
+ "channel": "all",
92
+ "asOf": "2026-10-25",
93
+ "scale": 100,
94
+ "benchmark": true
95
+ },
96
+ "view": {
97
+ "type": "Form",
98
+ "name": "dashboardFilters",
99
+ "title": "Filter & state",
100
+ "description": "Pick what the dashboard shows.",
101
+ "submitLabel": "Apply",
102
+ "children": [
103
+ {
104
+ "type": "Tabs",
105
+ "label": "Period",
106
+ "options": [
107
+ {
108
+ "id": "7d",
109
+ "label": "7 days"
110
+ },
111
+ {
112
+ "id": "4w",
113
+ "label": "4 weeks"
114
+ }
115
+ ],
116
+ "value": {
117
+ "$state": "period"
118
+ },
119
+ "onChange": {
120
+ "set": "period"
121
+ }
122
+ },
123
+ {
124
+ "type": "Stack",
125
+ "direction": "row",
126
+ "children": [
127
+ {
128
+ "type": "Select",
129
+ "label": "Channel",
130
+ "options": [
131
+ {
132
+ "id": "all",
133
+ "label": "All channels"
134
+ },
135
+ {
136
+ "id": "organic",
137
+ "label": "Organic"
138
+ },
139
+ {
140
+ "id": "paid",
141
+ "label": "Paid"
142
+ },
143
+ {
144
+ "id": "direct",
145
+ "label": "Direct"
146
+ }
147
+ ],
148
+ "value": {
149
+ "$state": "channel"
150
+ },
151
+ "onChange": {
152
+ "set": "channel"
153
+ }
154
+ },
155
+ {
156
+ "type": "DatePicker",
157
+ "label": "Reference date",
158
+ "value": {
159
+ "$state": "asOf"
160
+ },
161
+ "onChange": {
162
+ "set": "asOf"
163
+ }
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "type": "Slider",
169
+ "label": "Traffic scaling",
170
+ "min": 50,
171
+ "max": 150,
172
+ "step": 5,
173
+ "unit": "%",
174
+ "value": {
175
+ "$state": "scale"
176
+ },
177
+ "onChange": {
178
+ "set": "scale"
179
+ }
180
+ },
181
+ {
182
+ "type": "Checkbox",
183
+ "label": "Show comparison values (90 % of visitors)",
184
+ "checked": {
185
+ "$state": "benchmark"
186
+ },
187
+ "onChange": {
188
+ "set": "benchmark"
189
+ }
190
+ }
191
+ ],
192
+ "slots": {
193
+ "header": [
194
+ {
195
+ "type": "Popover",
196
+ "label": "Method",
197
+ "icon": "info",
198
+ "placement": "end",
199
+ "text": "All numbers are demo data. The filters work locally and react to your input."
200
+ }
201
+ ]
202
+ }
203
+ }
204
+ },
205
+ "expectedState": "data",
206
+ "width": 528,
207
+ "interactions": [
208
+ {
209
+ "name": "open the method popover",
210
+ "click": {
211
+ "text": "Method"
212
+ }
213
+ },
214
+ {
215
+ "name": "pick 4 weeks",
216
+ "click": {
217
+ "text": "4 weeks"
218
+ }
219
+ },
220
+ {
221
+ "name": "apply",
222
+ "click": {
223
+ "text": "Apply"
224
+ }
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "name": "confirm-only",
230
+ "description": "A Form without inputs (the empty state): one line of text and the two buttons — sends an empty submit or the decline.",
231
+ "payload": {
232
+ "view": {
233
+ "type": "Form",
234
+ "name": "publishConfirm",
235
+ "title": "Publish the draft?",
236
+ "submitLabel": "Publish",
237
+ "declineLabel": "Not now",
238
+ "children": [
239
+ {
240
+ "type": "Text",
241
+ "text": "The post goes live on Google and Facebook.",
242
+ "tone": "muted"
243
+ }
244
+ ]
245
+ }
246
+ },
247
+ "expectedState": "data",
248
+ "width": 528,
249
+ "interactions": [
250
+ {
251
+ "name": "decline",
252
+ "click": {
253
+ "text": "Not now"
254
+ }
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "name": "contact-request-email",
260
+ "description": "The contact-request form as the e-mail capture shows it: the fields frozen at their values, no action row (run with --mode email).",
261
+ "payload": {
262
+ "state": {
263
+ "recipient": "",
264
+ "subject": "Short request",
265
+ "message": "Hello,\n\nI am interested in your offer and would like more information on prices, availability and terms.\n\nCould you send me the documents?\n\nKind regards"
266
+ },
267
+ "view": {
268
+ "type": "Form",
269
+ "name": "shortRequest",
270
+ "title": "Short request",
271
+ "description": "Edit the draft, then send it to me — I will e-mail it for you.",
272
+ "submitLabel": "Send request",
273
+ "declineLabel": "Not now",
274
+ "requiredFields": [
275
+ "recipient",
276
+ "message"
277
+ ],
278
+ "children": [
279
+ {
280
+ "type": "Input",
281
+ "label": "Recipient",
282
+ "inputType": "email",
283
+ "placeholder": "name@example.com",
284
+ "value": {
285
+ "$state": "recipient"
286
+ },
287
+ "onChange": {
288
+ "set": "recipient"
289
+ }
290
+ },
291
+ {
292
+ "type": "Input",
293
+ "label": "Subject",
294
+ "value": {
295
+ "$state": "subject"
296
+ },
297
+ "onChange": {
298
+ "set": "subject"
299
+ }
300
+ },
301
+ {
302
+ "type": "Textarea",
303
+ "label": "Your question",
304
+ "rows": 7,
305
+ "value": {
306
+ "$state": "message"
307
+ },
308
+ "onChange": {
309
+ "set": "message"
310
+ }
311
+ }
312
+ ]
313
+ }
314
+ },
315
+ "expectedState": "data",
316
+ "width": 528
317
+ }
318
+ ]
319
+ }
@@ -0,0 +1,301 @@
1
+ {
2
+ "wireName": "ComposedView",
3
+ "fixtures": [
4
+ {
5
+ "name": "button-mrr-growth-simulator",
6
+ "description": "The MRR growth simulator: Bear/Base/Bull tabs, KPIs, the MRR line and a starting-customers slider share one state; a button copies the scenario as JSON (ChatGPT reference 16).",
7
+ "payload": {
8
+ "state": {
9
+ "scenario": "base",
10
+ "startCustomers": 800
11
+ },
12
+ "data": {
13
+ "months": [
14
+ {
15
+ "month": "M1",
16
+ "bear": 1.0,
17
+ "base": 1.0,
18
+ "bull": 1.0
19
+ },
20
+ {
21
+ "month": "M2",
22
+ "bear": 1.02,
23
+ "base": 1.05,
24
+ "bull": 1.08
25
+ },
26
+ {
27
+ "month": "M3",
28
+ "bear": 1.0404,
29
+ "base": 1.1025,
30
+ "bull": 1.1664
31
+ },
32
+ {
33
+ "month": "M4",
34
+ "bear": 1.0612,
35
+ "base": 1.1576,
36
+ "bull": 1.2597
37
+ },
38
+ {
39
+ "month": "M5",
40
+ "bear": 1.0824,
41
+ "base": 1.2155,
42
+ "bull": 1.3605
43
+ },
44
+ {
45
+ "month": "M6",
46
+ "bear": 1.1041,
47
+ "base": 1.2763,
48
+ "bull": 1.4693
49
+ },
50
+ {
51
+ "month": "M7",
52
+ "bear": 1.1262,
53
+ "base": 1.3401,
54
+ "bull": 1.5869
55
+ },
56
+ {
57
+ "month": "M8",
58
+ "bear": 1.1487,
59
+ "base": 1.4071,
60
+ "bull": 1.7138
61
+ },
62
+ {
63
+ "month": "M9",
64
+ "bear": 1.1717,
65
+ "base": 1.4775,
66
+ "bull": 1.8509
67
+ },
68
+ {
69
+ "month": "M10",
70
+ "bear": 1.1951,
71
+ "base": 1.5513,
72
+ "bull": 1.999
73
+ },
74
+ {
75
+ "month": "M11",
76
+ "bear": 1.219,
77
+ "base": 1.6289,
78
+ "bull": 2.1589
79
+ },
80
+ {
81
+ "month": "M12",
82
+ "bear": 1.2434,
83
+ "base": 1.7103,
84
+ "bull": 2.3316
85
+ }
86
+ ]
87
+ },
88
+ "computed": {
89
+ "growth": "scenario == \"bear\" ? 4 : scenario == \"base\" ? 8 : 12",
90
+ "churn": "scenario == \"bear\" ? 2 : scenario == \"base\" ? 3 : 4",
91
+ "netGrowth": "growth - churn",
92
+ "series": "map(months, m => ({ month: m.month, mrr: round(startCustomers * 79 * (scenario == \"bear\" ? m.bear : scenario == \"base\" ? m.base : m.bull)) }))",
93
+ "mrrMonth12": "last(series).mrr",
94
+ "scenarioJson": "\"{\\\"scenario\\\":\\\"\" + scenario + \"\\\",\\\"startCustomers\\\":\" + string(startCustomers) + \",\\\"mrrMonth12\\\":\" + string(mrrMonth12) + \"}\""
95
+ },
96
+ "actions": {
97
+ "copyScenario": {
98
+ "type": "copy",
99
+ "value": {
100
+ "$computed": "scenarioJson"
101
+ }
102
+ }
103
+ },
104
+ "view": {
105
+ "type": "Surface",
106
+ "title": "MRR Growth Simulator",
107
+ "subtitle": "12-month model · €79 ARPA · example data",
108
+ "children": [
109
+ {
110
+ "type": "Tabs",
111
+ "options": [
112
+ {
113
+ "id": "bear",
114
+ "label": "Bear"
115
+ },
116
+ {
117
+ "id": "base",
118
+ "label": "Base"
119
+ },
120
+ {
121
+ "id": "bull",
122
+ "label": "Bull"
123
+ }
124
+ ],
125
+ "value": {
126
+ "$state": "scenario"
127
+ },
128
+ "onChange": {
129
+ "set": "scenario"
130
+ }
131
+ },
132
+ {
133
+ "type": "Grid",
134
+ "columns": 2,
135
+ "gap": "small",
136
+ "children": [
137
+ {
138
+ "type": "KpiTile",
139
+ "label": "MRR month 12",
140
+ "value": {
141
+ "$computed": "mrrMonth12"
142
+ },
143
+ "format": "currency",
144
+ "currency": "EUR",
145
+ "decimals": 0
146
+ },
147
+ {
148
+ "type": "KpiTile",
149
+ "label": "Net growth / month",
150
+ "value": {
151
+ "$computed": "netGrowth"
152
+ },
153
+ "format": "percent",
154
+ "decimals": 0,
155
+ "tone": "success",
156
+ "signed": true
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "type": "Chart",
162
+ "kind": "line",
163
+ "data": {
164
+ "$computed": "series"
165
+ },
166
+ "x": "month",
167
+ "series": [
168
+ {
169
+ "field": "mrr",
170
+ "label": "MRR"
171
+ }
172
+ ],
173
+ "valueFormat": "currency",
174
+ "currency": "EUR"
175
+ },
176
+ {
177
+ "type": "Slider",
178
+ "label": "Starting customers",
179
+ "min": 100,
180
+ "max": 2000,
181
+ "step": 50,
182
+ "value": {
183
+ "$state": "startCustomers"
184
+ },
185
+ "onChange": {
186
+ "set": "startCustomers"
187
+ }
188
+ },
189
+ {
190
+ "type": "Divider"
191
+ },
192
+ {
193
+ "type": "Grid",
194
+ "columns": 2,
195
+ "gap": "small",
196
+ "children": [
197
+ {
198
+ "type": "KpiTile",
199
+ "label": "Growth rate",
200
+ "value": {
201
+ "$computed": "growth"
202
+ },
203
+ "format": "percent",
204
+ "decimals": 0,
205
+ "signed": true
206
+ },
207
+ {
208
+ "type": "KpiTile",
209
+ "label": "Churn rate",
210
+ "value": {
211
+ "$computed": "churn"
212
+ },
213
+ "format": "percent",
214
+ "decimals": 0
215
+ }
216
+ ]
217
+ },
218
+ {
219
+ "type": "Button",
220
+ "label": "Copy scenario data as JSON",
221
+ "icon": "copy",
222
+ "fullWidth": true,
223
+ "onClick": {
224
+ "action": "copyScenario"
225
+ }
226
+ }
227
+ ]
228
+ }
229
+ },
230
+ "expectedState": "data",
231
+ "width": 528,
232
+ "interactions": [
233
+ {
234
+ "name": "bull scenario",
235
+ "click": {
236
+ "text": "Bull"
237
+ }
238
+ },
239
+ {
240
+ "name": "more starting customers",
241
+ "click": {
242
+ "selector": ".MuiSlider-thumb"
243
+ },
244
+ "press": "ArrowRight"
245
+ },
246
+ {
247
+ "name": "copy scenario",
248
+ "click": {
249
+ "text": "Copy scenario data as JSON"
250
+ }
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "name": "button-replay",
256
+ "description": "The same buttons on a replayed message: visible, inert (mode replay shows it; here the tree is the plain button row).",
257
+ "payload": {
258
+ "state": {
259
+ "visitors": 35000
260
+ },
261
+ "actions": {
262
+ "reset": {
263
+ "type": "resetState"
264
+ },
265
+ "copyResult": {
266
+ "type": "copy",
267
+ "value": {
268
+ "$state": "visitors"
269
+ }
270
+ }
271
+ },
272
+ "view": {
273
+ "type": "Stack",
274
+ "direction": "row",
275
+ "gap": "small",
276
+ "children": [
277
+ {
278
+ "type": "Button",
279
+ "label": "Copy JSON",
280
+ "icon": "copy",
281
+ "onClick": {
282
+ "action": "copyResult"
283
+ }
284
+ },
285
+ {
286
+ "type": "Button",
287
+ "label": "Reset",
288
+ "icon": "reset",
289
+ "variant": "secondary",
290
+ "onClick": {
291
+ "action": "reset"
292
+ }
293
+ }
294
+ ]
295
+ }
296
+ },
297
+ "expectedState": "data",
298
+ "width": 528
299
+ }
300
+ ]
301
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "wireName": "ComposedView",
3
+ "fixtures": [
4
+ {
5
+ "name": "checkbox-benchmark",
6
+ "description": "One checkbox with a muted explanation (ChatGPT reference 52).",
7
+ "payload": {
8
+ "state": {
9
+ "benchmark": true
10
+ },
11
+ "view": {
12
+ "type": "Checkbox",
13
+ "label": "Show comparison values",
14
+ "description": "The comparison line is 90 % of the visitors.",
15
+ "checked": {
16
+ "$state": "benchmark"
17
+ },
18
+ "onChange": {
19
+ "set": "benchmark"
20
+ }
21
+ }
22
+ },
23
+ "expectedState": "data",
24
+ "width": 528,
25
+ "interactions": [
26
+ {
27
+ "name": "clear",
28
+ "click": {
29
+ "text": "Show comparison values"
30
+ }
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "wireName": "ComposedView",
3
+ "fixtures": [
4
+ {
5
+ "name": "date-picker-reference-date",
6
+ "description": "The reference date of the analytics studio (ChatGPT reference 52).",
7
+ "payload": {
8
+ "state": {
9
+ "asOf": "2026-10-25"
10
+ },
11
+ "view": {
12
+ "type": "DatePicker",
13
+ "label": "Reference date",
14
+ "value": {
15
+ "$state": "asOf"
16
+ },
17
+ "onChange": {
18
+ "set": "asOf"
19
+ },
20
+ "min": "2026-01-01",
21
+ "max": "2026-12-31"
22
+ }
23
+ },
24
+ "expectedState": "data",
25
+ "width": 528,
26
+ "interactions": [
27
+ {
28
+ "name": "open the calendar",
29
+ "click": {
30
+ "selector": "input"
31
+ }
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }