@mgamadeus/ddd-agents 0.1.0-alpha.21 → 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.
- package/README.md +3 -2
- package/dist/chat.js +22 -72
- package/dist/chat.js.map +1 -1
- package/dist/chunks/{ConversationMarkdown-W7NHglmL.js → ConversationMarkdown-CJhAnuVa.js} +110 -8
- package/dist/chunks/ConversationMarkdown-CJhAnuVa.js.map +1 -0
- package/dist/chunks/{WebSearchResultsConversationWidget-BvnLWHyi.js → WebSearchResultsConversationWidget-DRBQvycE.js} +140 -1125
- package/dist/chunks/WebSearchResultsConversationWidget-DRBQvycE.js.map +1 -0
- package/dist/chunks/{canvasBodies-9SuF6NAB.js → canvasBodies-DLjDkviP.js} +9 -6
- package/dist/chunks/canvasBodies-DLjDkviP.js.map +1 -0
- package/dist/chunks/{canvas-behaviours-BRFR1ALE.js → decide-canvas-open-DBWoWtAC.js} +18 -2
- package/dist/chunks/decide-canvas-open-DBWoWtAC.js.map +1 -0
- package/dist/chunks/entity-detail-name-3A82gDAp.js +15 -0
- package/dist/chunks/entity-detail-name-3A82gDAp.js.map +1 -0
- package/dist/chunks/icon-names-Di6c4zLo.js +86 -0
- package/dist/chunks/icon-names-Di6c4zLo.js.map +1 -0
- package/dist/chunks/index-7Qc_3GbG.js +1046 -0
- package/dist/chunks/index-7Qc_3GbG.js.map +1 -0
- package/dist/chunks/{widget-image-readiness-signal-DeOuL89j.js → widget-image-readiness-signal-D3ci53xr.js} +2 -2
- package/dist/chunks/{widget-image-readiness-signal-DeOuL89j.js.map → widget-image-readiness-signal-D3ci53xr.js.map} +1 -1
- package/dist/chunks/{widget-name-resolver-DyIY6Zu4.js → widget-name-resolver-C8SfpiR5.js} +48 -116
- package/dist/chunks/widget-name-resolver-C8SfpiR5.js.map +1 -0
- package/dist/client-testing.js +68 -1
- package/dist/client-testing.js.map +1 -1
- package/dist/files/chat/Conversation.module.scss +268 -0
- package/dist/files/chat/ConversationViewBody/ConversationViewBody.module.scss +336 -0
- package/dist/files/chat/_conversation-tokens.scss +37 -0
- package/dist/files/image-render/WidgetImageRender.module.scss +22 -0
- package/dist/files/kit/ComposedViewConversationWidget.md +59 -0
- package/dist/files/kit/components/data/data.preview-fixtures.json +3298 -0
- package/dist/files/kit/components/embedding/widget.preview-fixtures.json +147 -0
- package/dist/files/kit/components/entity/entity-link.preview-fixtures.json +340 -0
- package/dist/files/kit/components/form/form.preview-fixtures.json +319 -0
- package/dist/files/kit/components/inputs/button.preview-fixtures.json +301 -0
- package/dist/files/kit/components/inputs/checkbox.preview-fixtures.json +35 -0
- package/dist/files/kit/components/inputs/date-picker.preview-fixtures.json +36 -0
- package/dist/files/kit/components/inputs/input.preview-fixtures.json +55 -0
- package/dist/files/kit/components/inputs/radio-group.preview-fixtures.json +76 -0
- package/dist/files/kit/components/inputs/select.preview-fixtures.json +314 -0
- package/dist/files/kit/components/inputs/slider.preview-fixtures.json +178 -0
- package/dist/files/kit/components/inputs/tabs.preview-fixtures.json +304 -0
- package/dist/files/kit/components/inputs/textarea.preview-fixtures.json +37 -0
- package/dist/files/kit/components/layout/layout.preview-fixtures.json +892 -0
- package/dist/files/kit/components/map/map.preview-fixtures.json +339 -0
- package/dist/files/kit/components/media/image-group.preview-fixtures.json +228 -0
- package/dist/files/kit/components/media/image.preview-fixtures.json +61 -0
- package/dist/files/kit/components/media/video-card/video-card.preview-fixtures.json +121 -0
- package/dist/files/kit/components/media/video.preview-fixtures.json +68 -0
- package/dist/files/kit/components/rich/code.preview-fixtures.json +105 -0
- package/dist/files/kit/components/rich/diagram.preview-fixtures.json +89 -0
- package/dist/files/kit/components/rich/math.preview-fixtures.json +152 -0
- package/dist/files/kit/components/rich/svg.preview-fixtures.json +243 -0
- package/dist/files/kit/components/text/badge.preview-fixtures.json +44 -0
- package/dist/files/kit/components/text/caption.preview-fixtures.json +31 -0
- package/dist/files/kit/components/text/favicon.preview-fixtures.json +69 -0
- package/dist/files/kit/components/text/label.preview-fixtures.json +48 -0
- package/dist/files/kit/components/text/link.preview-fixtures.json +103 -0
- package/dist/files/kit/components/text/markdown.preview-fixtures.json +29 -0
- package/dist/files/kit/components/text/source-ref.preview-fixtures.json +51 -0
- package/dist/files/kit/components/text/text.preview-fixtures.json +106 -0
- package/dist/files/kit/components/text/title.preview-fixtures.json +172 -0
- package/dist/files/kit/composed-view-widget-contract.json +88 -0
- package/dist/files/kit/composed-view.preview-fixtures.json +376 -0
- package/dist/files/renderer/conversation-widget-layout.module.scss +47 -0
- package/dist/files/renderer/widget-tree/composed-node-schema.json +3428 -0
- package/dist/files/styles/_conversation-widget-container.scss +6 -0
- package/dist/files/styles/_media.scss +50 -0
- package/dist/files/styles/_spacings.scss +23 -0
- package/dist/files/styles/_surfaces.scss +28 -0
- package/dist/files/widgets/ClockConversationWidget/ClockConversationWidget.md +53 -0
- package/dist/files/widgets/ClockConversationWidget/clock.preview-fixtures.json +76 -0
- package/dist/files/widgets/ConceptExplainerConversationWidget/ConceptExplainerConversationWidget.md +86 -0
- package/dist/files/widgets/ConceptExplainerConversationWidget/concept-explainer.preview-fixtures.json +23 -0
- package/dist/files/widgets/ConversationSearchResultsConversationWidget/ConversationSearchResultsConversationWidget.md +59 -0
- package/dist/files/widgets/ConversationSearchResultsConversationWidget/conversation-search-results.preview-fixtures.json +85 -0
- package/dist/files/widgets/CurrencyConverterConversationWidget/CurrencyConverterConversationWidget.md +51 -0
- package/dist/files/widgets/CurrencyConverterConversationWidget/currency-converter.preview-fixtures.json +73 -0
- package/dist/files/widgets/CustomVisualizationConversationWidget/CustomVisualizationConversationWidget.md +83 -0
- package/dist/files/widgets/CustomVisualizationConversationWidget/custom-visualization.preview-fixtures.json +227 -0
- package/dist/files/widgets/CustomVisualizationConversationWidget/sandbox-frame/custom-visualization-frame.html +188 -0
- package/dist/files/widgets/EntityMentionConversationWidget/EntityMentionConversationWidget.md +55 -0
- package/dist/files/widgets/EntityMentionConversationWidget/entity-mention.preview-fixtures.json +55 -0
- package/dist/files/widgets/MultiChoiceConversationWidget/MultiChoiceConversationWidget.md +61 -0
- package/dist/files/widgets/MultiChoiceConversationWidget/multi-choice-widget-contract.json +43 -0
- package/dist/files/widgets/MultiChoiceConversationWidget/multi-choice.preview-fixtures.json +103 -0
- package/dist/files/widgets/QuickRepliesConversationWidget/QuickRepliesConversationWidget.md +65 -0
- package/dist/files/widgets/QuickRepliesConversationWidget/quick-replies-widget-contract.json +43 -0
- package/dist/files/widgets/QuickRepliesConversationWidget/quick-replies.preview-fixtures.json +45 -0
- package/dist/files/widgets/SuggestedActions/SuggestedActions.md +60 -0
- package/dist/files/widgets/SuggestedActions/suggested-actions.preview-fixtures.json +19 -0
- package/dist/files/widgets/ToolTraceConversationWidget/ToolTraceConversationWidget.md +48 -0
- package/dist/files/widgets/ToolTraceConversationWidget/tool-trace.preview-fixtures.json +32 -0
- package/dist/files/widgets/WebSearchResultsConversationWidget/WebSearchResultsConversationWidget.md +49 -0
- package/dist/files/widgets/WebSearchResultsConversationWidget/web-search-results.preview-fixtures.json +57 -0
- package/dist/files/widgets/WritingDraftConversationWidget/WritingDraftConversationWidget.md +66 -0
- package/dist/files/widgets/WritingDraftConversationWidget/writing-draft.preview-fixtures.json +129 -0
- package/dist/image-render.js +11 -10
- package/dist/image-render.js.map +1 -1
- package/dist/index.js +32 -28
- package/dist/index.js.map +1 -1
- package/dist/kit.js +11 -2
- package/dist/kit.js.map +1 -1
- package/dist/preview.js +7 -6
- package/dist/provider.js +71 -0
- package/dist/provider.js.map +1 -0
- package/dist/renderer.js +138 -63
- package/dist/renderer.js.map +1 -1
- package/dist/styles.css +32 -17
- package/dist/types/client/testing/test-conversation-widgets.d.ts +25 -0
- package/dist/types/client/testing/widget-hydration-stand-ins.d.ts +33 -0
- package/dist/types/entries/chat.d.ts +10 -0
- package/dist/types/entries/client-testing.d.ts +2 -0
- package/dist/types/entries/index.d.ts +4 -3
- package/dist/types/entries/kit.d.ts +7 -0
- package/dist/types/entries/preview.d.ts +1 -0
- package/dist/types/entries/provider.d.ts +1 -0
- package/dist/types/entries/renderer.d.ts +16 -0
- package/dist/types/entries/widgets.d.ts +13 -0
- package/dist/types/kit/components/data/apex-chart-component.d.ts +3 -0
- package/dist/types/kit/components/data/chart-model.d.ts +164 -0
- package/dist/types/kit/components/data/data-value-format.d.ts +44 -0
- package/dist/types/kit/components/data/use-chart-palette.d.ts +9 -0
- package/dist/types/kit/components/data/use-number-locale.d.ts +5 -0
- package/dist/types/provider/index.d.ts +1 -0
- package/dist/types/renderer/_access/ConversationWidgetGateSkeleton.d.ts +6 -0
- package/dist/types/renderer/_agent-space/use-conversation-widget-agent-space-fallback.d.ts +16 -0
- package/dist/types/renderer/canvas/use-anchor-widget-agent-space-key.d.ts +17 -0
- package/dist/types/renderer/conversationWidgetRegistry.d.ts +6 -0
- package/dist/types/renderer/read-conversation-widget-variant.d.ts +22 -0
- package/dist/types/widgets/_shared/CardFooter.d.ts +6 -0
- package/dist/types/widgets/_shared/WidgetLabel.d.ts +8 -0
- package/dist/types/widgets/_shared/entity-update-channel.d.ts +17 -0
- package/dist/types/widgets/_shared/use-element-visible.d.ts +6 -0
- package/dist/widgets.js +120 -27
- package/dist/widgets.js.map +1 -1
- package/package.json +74 -1
- package/public-api.json +761 -0
- package/dist/chunks/ConversationMarkdown-W7NHglmL.js.map +0 -1
- package/dist/chunks/WebSearchResultsConversationWidget-BvnLWHyi.js.map +0 -1
- package/dist/chunks/canvas-behaviours-BRFR1ALE.js.map +0 -1
- package/dist/chunks/canvasBodies-9SuF6NAB.js.map +0 -1
- package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js +0 -20
- package/dist/chunks/decide-canvas-open-Ct-wnNEJ.js.map +0 -1
- package/dist/chunks/widget-name-resolver-DyIY6Zu4.js.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "input-basket-value",
|
|
6
|
+
"description": "A number field and a text field.",
|
|
7
|
+
"payload": {
|
|
8
|
+
"state": {
|
|
9
|
+
"basketValue": 70,
|
|
10
|
+
"note": ""
|
|
11
|
+
},
|
|
12
|
+
"view": {
|
|
13
|
+
"type": "Stack",
|
|
14
|
+
"gap": "medium",
|
|
15
|
+
"children": [
|
|
16
|
+
{
|
|
17
|
+
"type": "Input",
|
|
18
|
+
"label": "Basket value (€)",
|
|
19
|
+
"inputType": "number",
|
|
20
|
+
"value": {
|
|
21
|
+
"$state": "basketValue"
|
|
22
|
+
},
|
|
23
|
+
"onChange": {
|
|
24
|
+
"set": "basketValue"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "Input",
|
|
29
|
+
"label": "Campaign name",
|
|
30
|
+
"placeholder": "Autumn sale",
|
|
31
|
+
"maxLength": 40,
|
|
32
|
+
"value": {
|
|
33
|
+
"$state": "note"
|
|
34
|
+
},
|
|
35
|
+
"onChange": {
|
|
36
|
+
"set": "note"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"expectedState": "data",
|
|
43
|
+
"width": 528,
|
|
44
|
+
"interactions": [
|
|
45
|
+
{
|
|
46
|
+
"name": "type a basket value",
|
|
47
|
+
"fill": {
|
|
48
|
+
"selector": "input[type=number]",
|
|
49
|
+
"value": "85"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "radio-group-goal",
|
|
6
|
+
"description": "Three explained choices under each other (ChatGPT's RadioGroup of the base kit).",
|
|
7
|
+
"payload": {
|
|
8
|
+
"state": {
|
|
9
|
+
"goal": "calls"
|
|
10
|
+
},
|
|
11
|
+
"view": {
|
|
12
|
+
"type": "RadioGroup",
|
|
13
|
+
"label": "What should the campaign bring?",
|
|
14
|
+
"options": [
|
|
15
|
+
{
|
|
16
|
+
"id": "calls",
|
|
17
|
+
"label": "More calls",
|
|
18
|
+
"description": "Phone calls from your Google profile"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "visits",
|
|
22
|
+
"label": "More visits",
|
|
23
|
+
"description": "Route requests to your shop"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "web",
|
|
27
|
+
"label": "More website visits"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"value": {
|
|
31
|
+
"$state": "goal"
|
|
32
|
+
},
|
|
33
|
+
"onChange": {
|
|
34
|
+
"set": "goal"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"expectedState": "data",
|
|
39
|
+
"width": 528,
|
|
40
|
+
"interactions": [
|
|
41
|
+
{
|
|
42
|
+
"name": "pick visits",
|
|
43
|
+
"click": {
|
|
44
|
+
"text": "More visits"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "radio-group-row",
|
|
51
|
+
"description": "Side by side.",
|
|
52
|
+
"payload": {
|
|
53
|
+
"state": {
|
|
54
|
+
"size": "M"
|
|
55
|
+
},
|
|
56
|
+
"view": {
|
|
57
|
+
"type": "RadioGroup",
|
|
58
|
+
"direction": "row",
|
|
59
|
+
"options": [
|
|
60
|
+
"S",
|
|
61
|
+
"M",
|
|
62
|
+
"L"
|
|
63
|
+
],
|
|
64
|
+
"value": {
|
|
65
|
+
"$state": "size"
|
|
66
|
+
},
|
|
67
|
+
"onChange": {
|
|
68
|
+
"set": "size"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"expectedState": "data",
|
|
73
|
+
"width": 528
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "select-analytics-studio-filters",
|
|
6
|
+
"description": "The filter card of the analytics studio: period tabs, channel select, reference date, traffic slider, comparison checkbox; the KPIs follow; Copy JSON and Reset (ChatGPT reference 52).",
|
|
7
|
+
"payload": {
|
|
8
|
+
"state": {
|
|
9
|
+
"period": "7d",
|
|
10
|
+
"channel": "all",
|
|
11
|
+
"scale": 100,
|
|
12
|
+
"benchmark": true,
|
|
13
|
+
"asOf": "2026-10-25"
|
|
14
|
+
},
|
|
15
|
+
"data": {
|
|
16
|
+
"days": [
|
|
17
|
+
{
|
|
18
|
+
"x": "Mon",
|
|
19
|
+
"visitors": 980
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"x": "Tue",
|
|
23
|
+
"visitors": 1120
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"x": "Wed",
|
|
27
|
+
"visitors": 1040
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"x": "Thu",
|
|
31
|
+
"visitors": 1260
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"x": "Fri",
|
|
35
|
+
"visitors": 1130
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"x": "Sat",
|
|
39
|
+
"visitors": 1460
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"x": "Sun",
|
|
43
|
+
"visitors": 1210
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"computed": {
|
|
48
|
+
"channelShare": "channel == \"all\" ? 1 : channel == \"organic\" ? 0.511 : channel == \"paid\" ? 0.32 : 0.169",
|
|
49
|
+
"periodFactor": "period == \"7d\" ? 1 : 4",
|
|
50
|
+
"visitors": "round(sum(days, d => d.visitors) * channelShare * scale / 100 * periodFactor)",
|
|
51
|
+
"comparison": "benchmark ? round(visitors * 0.9) : \"—\"",
|
|
52
|
+
"settingsJson": "\"{\\\"period\\\":\\\"\" + period + \"\\\",\\\"channel\\\":\\\"\" + channel + \"\\\",\\\"scale\\\":\" + string(scale) + \",\\\"asOf\\\":\\\"\" + asOf + \"\\\"}\"",
|
|
53
|
+
"channelLabel": "channel == \"all\" ? \"All channels\" : channel == \"organic\" ? \"Organic\" : channel == \"paid\" ? \"Paid\" : \"Direct\"",
|
|
54
|
+
"comparisonDetail": "benchmark ? \"90 % of the visitors\" : \"Comparison values are off\""
|
|
55
|
+
},
|
|
56
|
+
"actions": {
|
|
57
|
+
"copyJson": {
|
|
58
|
+
"type": "copy",
|
|
59
|
+
"value": {
|
|
60
|
+
"$computed": "settingsJson"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"reset": {
|
|
64
|
+
"type": "resetState"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"view": {
|
|
68
|
+
"type": "Surface",
|
|
69
|
+
"title": "Analytics Studio",
|
|
70
|
+
"subtitle": "Interactive component test · demo data",
|
|
71
|
+
"children": [
|
|
72
|
+
{
|
|
73
|
+
"type": "Surface",
|
|
74
|
+
"title": "Filter & state",
|
|
75
|
+
"density": "compact",
|
|
76
|
+
"children": [
|
|
77
|
+
{
|
|
78
|
+
"type": "Tabs",
|
|
79
|
+
"label": "Period",
|
|
80
|
+
"options": [
|
|
81
|
+
{
|
|
82
|
+
"id": "7d",
|
|
83
|
+
"label": "7 days"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "30d",
|
|
87
|
+
"label": "4 weeks"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"value": {
|
|
91
|
+
"$state": "period"
|
|
92
|
+
},
|
|
93
|
+
"onChange": {
|
|
94
|
+
"set": "period"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "Grid",
|
|
99
|
+
"columns": 2,
|
|
100
|
+
"gap": "small",
|
|
101
|
+
"children": [
|
|
102
|
+
{
|
|
103
|
+
"type": "Select",
|
|
104
|
+
"label": "Channel",
|
|
105
|
+
"options": [
|
|
106
|
+
{
|
|
107
|
+
"id": "all",
|
|
108
|
+
"label": "All channels"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "organic",
|
|
112
|
+
"label": "Organic"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "paid",
|
|
116
|
+
"label": "Paid"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "direct",
|
|
120
|
+
"label": "Direct"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"value": {
|
|
124
|
+
"$state": "channel"
|
|
125
|
+
},
|
|
126
|
+
"onChange": {
|
|
127
|
+
"set": "channel"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "DatePicker",
|
|
132
|
+
"label": "Reference date",
|
|
133
|
+
"value": {
|
|
134
|
+
"$state": "asOf"
|
|
135
|
+
},
|
|
136
|
+
"onChange": {
|
|
137
|
+
"set": "asOf"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "Slider",
|
|
144
|
+
"label": "Traffic scaling",
|
|
145
|
+
"min": 50,
|
|
146
|
+
"max": 150,
|
|
147
|
+
"step": 10,
|
|
148
|
+
"unit": "%",
|
|
149
|
+
"value": {
|
|
150
|
+
"$state": "scale"
|
|
151
|
+
},
|
|
152
|
+
"onChange": {
|
|
153
|
+
"set": "scale"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"type": "Checkbox",
|
|
158
|
+
"label": "Show comparison values (90 % of the visitors)",
|
|
159
|
+
"checked": {
|
|
160
|
+
"$state": "benchmark"
|
|
161
|
+
},
|
|
162
|
+
"onChange": {
|
|
163
|
+
"set": "benchmark"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "Grid",
|
|
170
|
+
"columns": 2,
|
|
171
|
+
"gap": "small",
|
|
172
|
+
"children": [
|
|
173
|
+
{
|
|
174
|
+
"type": "KpiTile",
|
|
175
|
+
"label": "Visitors",
|
|
176
|
+
"value": {
|
|
177
|
+
"$computed": "visitors"
|
|
178
|
+
},
|
|
179
|
+
"format": "number",
|
|
180
|
+
"detail": {
|
|
181
|
+
"$computed": "channelLabel"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "KpiTile",
|
|
186
|
+
"label": "Comparison",
|
|
187
|
+
"value": {
|
|
188
|
+
"$computed": "comparison"
|
|
189
|
+
},
|
|
190
|
+
"format": "number",
|
|
191
|
+
"detail": {
|
|
192
|
+
"$computed": "comparisonDetail"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "Stack",
|
|
199
|
+
"direction": "row",
|
|
200
|
+
"gap": "small",
|
|
201
|
+
"children": [
|
|
202
|
+
{
|
|
203
|
+
"type": "Button",
|
|
204
|
+
"label": "Copy JSON",
|
|
205
|
+
"icon": "copy",
|
|
206
|
+
"onClick": {
|
|
207
|
+
"action": "copyJson"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"type": "Button",
|
|
212
|
+
"label": "Reset",
|
|
213
|
+
"icon": "reset",
|
|
214
|
+
"variant": "secondary",
|
|
215
|
+
"onClick": {
|
|
216
|
+
"action": "reset"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"expectedState": "data",
|
|
225
|
+
"width": 720,
|
|
226
|
+
"interactions": [
|
|
227
|
+
{
|
|
228
|
+
"name": "4 weeks",
|
|
229
|
+
"click": {
|
|
230
|
+
"text": "4 weeks"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "open the channel list",
|
|
235
|
+
"click": {
|
|
236
|
+
"selector": "[role=combobox]"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "pick Organic",
|
|
241
|
+
"click": {
|
|
242
|
+
"selector": "[role=option] >> text=Organic"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "clear the comparison",
|
|
247
|
+
"click": {
|
|
248
|
+
"text": "Show comparison values (90 % of the visitors)"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "reset",
|
|
253
|
+
"click": {
|
|
254
|
+
"text": "Reset"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "select-alone",
|
|
261
|
+
"description": "One drop-down with a label and a placeholder, nothing picked.",
|
|
262
|
+
"payload": {
|
|
263
|
+
"state": {
|
|
264
|
+
"channel": ""
|
|
265
|
+
},
|
|
266
|
+
"view": {
|
|
267
|
+
"type": "Select",
|
|
268
|
+
"label": "Channel",
|
|
269
|
+
"placeholder": "Pick a channel",
|
|
270
|
+
"options": [
|
|
271
|
+
"Organic",
|
|
272
|
+
"Paid",
|
|
273
|
+
"Direct"
|
|
274
|
+
],
|
|
275
|
+
"value": {
|
|
276
|
+
"$state": "channel"
|
|
277
|
+
},
|
|
278
|
+
"onChange": {
|
|
279
|
+
"set": "channel"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"expectedState": "data",
|
|
284
|
+
"width": 528,
|
|
285
|
+
"interactions": [
|
|
286
|
+
{
|
|
287
|
+
"name": "open",
|
|
288
|
+
"click": {
|
|
289
|
+
"selector": "[role=combobox]"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "select-no-options",
|
|
296
|
+
"description": "No usable choice — the drop-down renders nothing inside its card and the block reports failed. The preview sees the card (state data); the block's render report says failed.",
|
|
297
|
+
"payload": {
|
|
298
|
+
"view": {
|
|
299
|
+
"type": "Surface",
|
|
300
|
+
"title": "Filter & state",
|
|
301
|
+
"children": [
|
|
302
|
+
{
|
|
303
|
+
"type": "Select",
|
|
304
|
+
"label": "Channel",
|
|
305
|
+
"options": []
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"expectedState": "error",
|
|
311
|
+
"width": 528
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "slider-revenue-simulator",
|
|
6
|
+
"description": "The revenue simulator: three sliders recompute two KPIs live; \"Copy result\" copies the summary (ChatGPT reference 10).",
|
|
7
|
+
"payload": {
|
|
8
|
+
"state": {
|
|
9
|
+
"visitors": 35000,
|
|
10
|
+
"conversionRate": 3.0,
|
|
11
|
+
"basketValue": 70
|
|
12
|
+
},
|
|
13
|
+
"computed": {
|
|
14
|
+
"orders": "round(visitors * conversionRate / 100)",
|
|
15
|
+
"revenue": "orders * basketValue",
|
|
16
|
+
"summary": "\"Monthly revenue: \" + string(revenue) + \" EUR, orders: \" + string(orders) + \", visitors: \" + string(visitors) + \", conversion rate: \" + string(conversionRate) + \" %, basket value: \" + string(basketValue) + \" EUR\""
|
|
17
|
+
},
|
|
18
|
+
"actions": {
|
|
19
|
+
"copyResult": {
|
|
20
|
+
"type": "copy",
|
|
21
|
+
"value": {
|
|
22
|
+
"$computed": "summary"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"view": {
|
|
27
|
+
"type": "Surface",
|
|
28
|
+
"title": "Revenue Simulator",
|
|
29
|
+
"subtitle": "E-commerce · example scenario",
|
|
30
|
+
"children": [
|
|
31
|
+
{
|
|
32
|
+
"type": "Grid",
|
|
33
|
+
"columns": 2,
|
|
34
|
+
"gap": "small",
|
|
35
|
+
"children": [
|
|
36
|
+
{
|
|
37
|
+
"type": "KpiTile",
|
|
38
|
+
"label": "Monthly revenue",
|
|
39
|
+
"value": {
|
|
40
|
+
"$computed": "revenue"
|
|
41
|
+
},
|
|
42
|
+
"format": "currency",
|
|
43
|
+
"currency": "EUR",
|
|
44
|
+
"decimals": 0
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "KpiTile",
|
|
48
|
+
"label": "Orders",
|
|
49
|
+
"value": {
|
|
50
|
+
"$computed": "orders"
|
|
51
|
+
},
|
|
52
|
+
"format": "number"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "Divider"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "Slider",
|
|
61
|
+
"label": "Visitors / month",
|
|
62
|
+
"min": 0,
|
|
63
|
+
"max": 100000,
|
|
64
|
+
"step": 1000,
|
|
65
|
+
"value": {
|
|
66
|
+
"$state": "visitors"
|
|
67
|
+
},
|
|
68
|
+
"onChange": {
|
|
69
|
+
"set": "visitors"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "Slider",
|
|
74
|
+
"label": "Conversion rate",
|
|
75
|
+
"min": 0.5,
|
|
76
|
+
"max": 8,
|
|
77
|
+
"step": 0.1,
|
|
78
|
+
"unit": "%",
|
|
79
|
+
"decimals": 1,
|
|
80
|
+
"value": {
|
|
81
|
+
"$state": "conversionRate"
|
|
82
|
+
},
|
|
83
|
+
"onChange": {
|
|
84
|
+
"set": "conversionRate"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "Slider",
|
|
89
|
+
"label": "Basket value",
|
|
90
|
+
"min": 10,
|
|
91
|
+
"max": 200,
|
|
92
|
+
"step": 5,
|
|
93
|
+
"unit": "€",
|
|
94
|
+
"value": {
|
|
95
|
+
"$state": "basketValue"
|
|
96
|
+
},
|
|
97
|
+
"onChange": {
|
|
98
|
+
"set": "basketValue"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "Button",
|
|
103
|
+
"label": "Copy result",
|
|
104
|
+
"icon": "copy",
|
|
105
|
+
"fullWidth": true,
|
|
106
|
+
"onClick": {
|
|
107
|
+
"action": "copyResult"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"expectedState": "data",
|
|
114
|
+
"width": 528,
|
|
115
|
+
"interactions": [
|
|
116
|
+
{
|
|
117
|
+
"name": "more visitors",
|
|
118
|
+
"click": {
|
|
119
|
+
"selector": ".MuiSlider-thumb >> nth=0"
|
|
120
|
+
},
|
|
121
|
+
"press": "ArrowRight"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "higher conversion rate",
|
|
125
|
+
"click": {
|
|
126
|
+
"selector": ".MuiSlider-thumb >> nth=1"
|
|
127
|
+
},
|
|
128
|
+
"press": "ArrowRight"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "copy result",
|
|
132
|
+
"click": {
|
|
133
|
+
"text": "Copy result"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "slider-loading",
|
|
140
|
+
"description": "The value is bound to a tool result that has not arrived yet — skeleton.",
|
|
141
|
+
"payload": {
|
|
142
|
+
"view": {
|
|
143
|
+
"type": "Slider",
|
|
144
|
+
"label": "Visitors / month",
|
|
145
|
+
"min": 0,
|
|
146
|
+
"max": {
|
|
147
|
+
"$from": {
|
|
148
|
+
"toolCall": "call_pending",
|
|
149
|
+
"path": "$.max"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"expectedState": "loading",
|
|
155
|
+
"width": 528
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "slider-invalid-range",
|
|
159
|
+
"description": "max is not above min — the slider renders nothing inside its card and the block reports failed. The preview sees the card (state data); the block's render report says failed.",
|
|
160
|
+
"payload": {
|
|
161
|
+
"view": {
|
|
162
|
+
"type": "Surface",
|
|
163
|
+
"title": "Revenue Simulator",
|
|
164
|
+
"children": [
|
|
165
|
+
{
|
|
166
|
+
"type": "Slider",
|
|
167
|
+
"label": "Visitors / month",
|
|
168
|
+
"min": 100,
|
|
169
|
+
"max": 100
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"expectedState": "error",
|
|
175
|
+
"width": 528
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|