@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.
- 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,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "youtube-video-cards",
|
|
6
|
+
"description": "What searchYouTubeVideos dictates for two results (ChatGPT 45, the Münster walking tour): a two-column grid of VideoCards with thumbnail, length chip, title, channel · views · date and the watch link; play swaps in the embed.",
|
|
7
|
+
"payload": {
|
|
8
|
+
"view": {
|
|
9
|
+
"type": "Grid",
|
|
10
|
+
"columns": 2,
|
|
11
|
+
"minColumnWidth": "regular",
|
|
12
|
+
"children": [
|
|
13
|
+
{
|
|
14
|
+
"type": "VideoCard",
|
|
15
|
+
"title": "Münster, Germany 4k Walking Tour | Explore the Charming Streets & Landmarks",
|
|
16
|
+
"videoId": "x5-yoDUoz5k",
|
|
17
|
+
"thumbnail": "https://i.ytimg.com/vi/x5-yoDUoz5k/hqdefault.jpg",
|
|
18
|
+
"durationSeconds": 1418,
|
|
19
|
+
"channel": "Duslin Travels",
|
|
20
|
+
"viewCount": 18234,
|
|
21
|
+
"publishedAt": "2025-02-08"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "VideoCard",
|
|
25
|
+
"title": "Münster Walking Tour Germany | Spring Sunny day Walk in Münster | 4K HDR 60fps",
|
|
26
|
+
"videoId": "QZRHqiz_oH4",
|
|
27
|
+
"thumbnail": "https://i.ytimg.com/vi/QZRHqiz_oH4/hqdefault.jpg",
|
|
28
|
+
"durationSeconds": 3725,
|
|
29
|
+
"channel": "Walking Germany",
|
|
30
|
+
"viewCount": 1284000,
|
|
31
|
+
"publishedAt": "2024-05-19"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"expectedState": "data",
|
|
37
|
+
"width": 528,
|
|
38
|
+
"interactions": [
|
|
39
|
+
{
|
|
40
|
+
"name": "play the first video in place",
|
|
41
|
+
"click": {
|
|
42
|
+
"selector": "button[aria-label^=\"Play the video Münster, Germany\"]"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "youtube-video-card-single",
|
|
49
|
+
"description": "One search result: the VideoCard at the root of the tree — the shape of a one-video answer.",
|
|
50
|
+
"payload": {
|
|
51
|
+
"view": {
|
|
52
|
+
"type": "VideoCard",
|
|
53
|
+
"title": "Münster, Germany 4k Walking Tour | Explore the Charming Streets & Landmarks",
|
|
54
|
+
"videoId": "x5-yoDUoz5k",
|
|
55
|
+
"thumbnail": "https://i.ytimg.com/vi/x5-yoDUoz5k/hqdefault.jpg",
|
|
56
|
+
"durationSeconds": 1418,
|
|
57
|
+
"channel": "Duslin Travels",
|
|
58
|
+
"viewCount": 18234,
|
|
59
|
+
"publishedAt": "2025-02-08"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"expectedState": "data",
|
|
63
|
+
"width": 528,
|
|
64
|
+
"interactions": [
|
|
65
|
+
{
|
|
66
|
+
"name": "play in place",
|
|
67
|
+
"click": {
|
|
68
|
+
"selector": "button[aria-label^=\"Play the video\"]"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "youtube-video-card-without-details",
|
|
75
|
+
"description": "A result whose detail read failed: no length and no views, the thumbnail taken from the videoId — the card still plays.",
|
|
76
|
+
"payload": {
|
|
77
|
+
"view": {
|
|
78
|
+
"type": "VideoCard",
|
|
79
|
+
"title": "Münster, Germany 4k Walking Tour",
|
|
80
|
+
"videoId": "x5-yoDUoz5k",
|
|
81
|
+
"channel": "Duslin Travels",
|
|
82
|
+
"publishedAt": "2025-02-08"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"expectedState": "data",
|
|
86
|
+
"width": 528
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "youtube-video-card-loading",
|
|
90
|
+
"description": "The card bound to a pending tool result: the card-shaped skeleton.",
|
|
91
|
+
"payload": {
|
|
92
|
+
"view": {
|
|
93
|
+
"type": "VideoCard",
|
|
94
|
+
"title": "Pending video",
|
|
95
|
+
"videoId": {
|
|
96
|
+
"$from": {
|
|
97
|
+
"toolCall": "call_preview_youtube",
|
|
98
|
+
"path": "$.videos[0].videoId",
|
|
99
|
+
"state": "pending"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"expectedState": "loading",
|
|
105
|
+
"width": 528
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "youtube-video-card-unplayable",
|
|
109
|
+
"description": "A card whose videoId is no YouTube id: it shows its title only and reports failed.",
|
|
110
|
+
"payload": {
|
|
111
|
+
"view": {
|
|
112
|
+
"type": "VideoCard",
|
|
113
|
+
"title": "A tour without a playable video",
|
|
114
|
+
"videoId": "not a video id!"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"expectedState": "error",
|
|
118
|
+
"width": 528
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "video-youtube",
|
|
6
|
+
"description": "The YouTube walking tour of ChatGPT (45): a connector video with its derived thumbnail, length, channel and the watch link; play swaps in the embed.",
|
|
7
|
+
"payload": {
|
|
8
|
+
"title": "Video – YouTube-Stadtrundgang Münster",
|
|
9
|
+
"view": {
|
|
10
|
+
"type": "Video",
|
|
11
|
+
"title": "Münster, Germany 4k Walking Tour | Explore the Charming Streets & Landmarks",
|
|
12
|
+
"videoId": "x5-yoDUoz5k",
|
|
13
|
+
"durationSeconds": 1418,
|
|
14
|
+
"channel": "Duslin Travels",
|
|
15
|
+
"source": {
|
|
16
|
+
"name": "YouTube",
|
|
17
|
+
"url": "https://www.youtube.com"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"expectedState": "data",
|
|
22
|
+
"width": 528,
|
|
23
|
+
"interactions": [
|
|
24
|
+
{
|
|
25
|
+
"name": "play in place",
|
|
26
|
+
"click": {
|
|
27
|
+
"selector": "button[aria-label^=\"Play the video\"]"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "video-link",
|
|
34
|
+
"description": "A video with a plain url and its own thumbnail: play opens the watch page in a new tab.",
|
|
35
|
+
"payload": {
|
|
36
|
+
"view": {
|
|
37
|
+
"type": "Video",
|
|
38
|
+
"title": "Münster in 4K — a summer evening",
|
|
39
|
+
"url": "https://www.youtube.com/watch?v=x5-yoDUoz5k",
|
|
40
|
+
"thumbnail": "https://thumb.wikimedia.org/wikipedia/commons/thumb/5/5a/M%C3%BCnster%2C_Prinzipalmarkt%2C_Stadtweinhaus_und_Rathaus_--_2023_--_7969-73.jpg/960px-M%C3%BCnster%2C_Prinzipalmarkt%2C_Stadtweinhaus_und_Rathaus_--_2023_--_7969-73.jpg",
|
|
41
|
+
"durationSeconds": 734,
|
|
42
|
+
"channel": "City Walks"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"expectedState": "data",
|
|
46
|
+
"width": 528
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "video-loading",
|
|
50
|
+
"description": "The video is bound to a pending tool result: the 16:9 frame as a skeleton.",
|
|
51
|
+
"payload": {
|
|
52
|
+
"view": {
|
|
53
|
+
"type": "Video",
|
|
54
|
+
"title": "Pending video",
|
|
55
|
+
"videoId": {
|
|
56
|
+
"$from": {
|
|
57
|
+
"toolCall": "call_preview_1",
|
|
58
|
+
"path": "$.videos[0].videoId",
|
|
59
|
+
"state": "pending"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"expectedState": "loading",
|
|
65
|
+
"width": 528
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "code-php",
|
|
6
|
+
"description": "ChatGPT reference 49, the code block: language header, copy and wrap controls, highlighted PHP. The copy button is driven by the spec (_Code.spec.tsx): a headless browser grants no clipboard, so the click changes nothing the preview can wait for.",
|
|
7
|
+
"payload": {
|
|
8
|
+
"view": {
|
|
9
|
+
"type": "Code",
|
|
10
|
+
"code": "<?php\n\ndeclare(strict_types=1);\n\nfunction conversionRate(\n int $conversions,\n int $visitors\n): float {\n return $visitors > 0\n ? ($conversions / $visitors) * 100.0\n : 0.0;\n}\n\necho conversionRate(750, 25000); // 3",
|
|
11
|
+
"language": "php"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"expectedState": "data",
|
|
15
|
+
"width": 528,
|
|
16
|
+
"interactions": [
|
|
17
|
+
{
|
|
18
|
+
"name": "wrap lines",
|
|
19
|
+
"click": {
|
|
20
|
+
"text": "Wrap lines"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "code-long",
|
|
27
|
+
"description": "Long code (40 lines) collapses to 24 lines behind 'Show all 40 lines'.",
|
|
28
|
+
"payload": {
|
|
29
|
+
"view": {
|
|
30
|
+
"type": "Code",
|
|
31
|
+
"code": "echo 'line 1';\necho 'line 2';\necho 'line 3';\necho 'line 4';\necho 'line 5';\necho 'line 6';\necho 'line 7';\necho 'line 8';\necho 'line 9';\necho 'line 10';\necho 'line 11';\necho 'line 12';\necho 'line 13';\necho 'line 14';\necho 'line 15';\necho 'line 16';\necho 'line 17';\necho 'line 18';\necho 'line 19';\necho 'line 20';\necho 'line 21';\necho 'line 22';\necho 'line 23';\necho 'line 24';\necho 'line 25';\necho 'line 26';\necho 'line 27';\necho 'line 28';\necho 'line 29';\necho 'line 30';\necho 'line 31';\necho 'line 32';\necho 'line 33';\necho 'line 34';\necho 'line 35';\necho 'line 36';\necho 'line 37';\necho 'line 38';\necho 'line 39';\necho 'line 40';",
|
|
32
|
+
"language": "php",
|
|
33
|
+
"title": "loop.php"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"expectedState": "data",
|
|
37
|
+
"width": 528,
|
|
38
|
+
"interactions": [
|
|
39
|
+
{
|
|
40
|
+
"name": "show all lines",
|
|
41
|
+
"click": {
|
|
42
|
+
"text": "Show all 40 lines"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "code-unknown-language",
|
|
49
|
+
"description": "A language without a grammar stays plain text under its written name.",
|
|
50
|
+
"payload": {
|
|
51
|
+
"view": {
|
|
52
|
+
"type": "Code",
|
|
53
|
+
"code": "IDENTIFICATION DIVISION.\nPROGRAM-ID. HELLO.",
|
|
54
|
+
"language": "COBOL"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"expectedState": "data",
|
|
58
|
+
"width": 528
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "code-empty",
|
|
62
|
+
"description": "Empty state: empty code renders nothing and reports empty.",
|
|
63
|
+
"payload": {
|
|
64
|
+
"view": {
|
|
65
|
+
"type": "Code",
|
|
66
|
+
"code": ""
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"expectedState": "empty",
|
|
70
|
+
"width": 528
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "code-loading",
|
|
74
|
+
"description": "Loading state: the code is bound to a pending tool result — the skeleton shows.",
|
|
75
|
+
"payload": {
|
|
76
|
+
"view": {
|
|
77
|
+
"type": "Code",
|
|
78
|
+
"language": "php",
|
|
79
|
+
"code": {
|
|
80
|
+
"$from": {
|
|
81
|
+
"toolCall": "call_code_1",
|
|
82
|
+
"path": "$.code",
|
|
83
|
+
"state": "pending"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"expectedState": "loading",
|
|
89
|
+
"width": 528
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "code-narrow",
|
|
93
|
+
"description": "The PHP block at the narrow width: the header controls wrap, long lines scroll.",
|
|
94
|
+
"payload": {
|
|
95
|
+
"view": {
|
|
96
|
+
"type": "Code",
|
|
97
|
+
"code": "<?php\n\ndeclare(strict_types=1);\n\nfunction conversionRate(\n int $conversions,\n int $visitors\n): float {\n return $visitors > 0\n ? ($conversions / $visitors) * 100.0\n : 0.0;\n}\n\necho conversionRate(750, 25000); // 3",
|
|
98
|
+
"language": "php"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"expectedState": "data",
|
|
102
|
+
"width": 360
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "diagram-widget-lifecycle",
|
|
6
|
+
"description": "ChatGPT reference 48: the widget life cycle as a Mermaid flowchart (top to bottom, one decision with Ja / Nein branches that join again).",
|
|
7
|
+
"payload": {
|
|
8
|
+
"view": {
|
|
9
|
+
"type": "Diagram",
|
|
10
|
+
"title": "Mermaid-Diagramm – Widget-Lebenszyklus",
|
|
11
|
+
"caption": "Hier wird aus einer textuellen Diagrammbeschreibung direkt eine Flowchart-Vorschau.",
|
|
12
|
+
"source": "flowchart TD\n A[User-Anfrage] --> B[Widget-Suche]\n B --> C{Passendes Widget?}\n C -- Ja --> D[Widget auswählen]\n C -- Nein --> E[UI-Bausteine kombinieren]\n D --> F[Datenquelle abfragen]\n E --> F\n F --> G[Daten validieren]\n G --> H[Darstellung erzeugen]\n H --> I[Interaktion im Chat]"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"expectedState": "data",
|
|
16
|
+
"width": 528
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "diagram-sequence",
|
|
20
|
+
"description": "A second diagram type (sequence) — the reference shows a flowchart only.",
|
|
21
|
+
"payload": {
|
|
22
|
+
"view": {
|
|
23
|
+
"type": "Diagram",
|
|
24
|
+
"title": "Report e-mail",
|
|
25
|
+
"source": "sequenceDiagram\n participant Agent\n participant Worker\n Agent->>Worker: Queue the report\n Worker-->>Agent: Delivered"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"expectedState": "data",
|
|
29
|
+
"width": 528
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "diagram-invalid-source",
|
|
33
|
+
"description": "Error state: Mermaid cannot read the source — one muted line shows (observed as data), the node reports failed RENDER_FAILED with Mermaid's parse message.",
|
|
34
|
+
"payload": {
|
|
35
|
+
"view": {
|
|
36
|
+
"type": "Diagram",
|
|
37
|
+
"title": "Widget-Lebenszyklus",
|
|
38
|
+
"source": "flowchart TD\n A[User-Anfrage] -->\n B -- -- C"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"expectedState": "error",
|
|
42
|
+
"width": 528
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "diagram-empty",
|
|
46
|
+
"description": "Empty state: an empty source renders nothing and reports empty.",
|
|
47
|
+
"payload": {
|
|
48
|
+
"view": {
|
|
49
|
+
"type": "Diagram",
|
|
50
|
+
"source": ""
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"expectedState": "empty",
|
|
54
|
+
"width": 528
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "diagram-loading",
|
|
58
|
+
"description": "Loading state: the source is bound to a pending tool result — the skeleton shows.",
|
|
59
|
+
"payload": {
|
|
60
|
+
"view": {
|
|
61
|
+
"type": "Diagram",
|
|
62
|
+
"title": "Widget-Lebenszyklus",
|
|
63
|
+
"source": {
|
|
64
|
+
"$from": {
|
|
65
|
+
"toolCall": "call_diagram_1",
|
|
66
|
+
"path": "$.source",
|
|
67
|
+
"state": "pending"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"expectedState": "loading",
|
|
73
|
+
"width": 528
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "diagram-narrow",
|
|
77
|
+
"description": "The flowchart at the narrow width: it scales down to the box.",
|
|
78
|
+
"payload": {
|
|
79
|
+
"view": {
|
|
80
|
+
"type": "Diagram",
|
|
81
|
+
"title": "Widget-Lebenszyklus",
|
|
82
|
+
"source": "flowchart TD\n A[User-Anfrage] --> B[Widget-Suche]\n B --> C{Passendes Widget?}\n C -- Ja --> D[Widget auswählen]\n C -- Nein --> E[UI-Bausteine kombinieren]\n D --> F[Datenquelle abfragen]\n E --> F\n F --> G[Daten validieren]\n G --> H[Darstellung erzeugen]\n H --> I[Interaktion im Chat]"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"expectedState": "data",
|
|
86
|
+
"width": 360
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "ComposedView",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "math-conversion-rate",
|
|
6
|
+
"description": "ChatGPT reference 49, the formula block alone (Math node only): heading, LaTeX badge, the formula, the worked example under a hairline.",
|
|
7
|
+
"payload": {
|
|
8
|
+
"view": {
|
|
9
|
+
"type": "Math",
|
|
10
|
+
"title": "Conversion Rate",
|
|
11
|
+
"latex": "CR = \\frac{N_{\\text{Conversions}}}{N_{\\text{Visitors}}} \\times 100\\%",
|
|
12
|
+
"caption": "Beispiel: 750 Conversions bei 25.000 Besuchern ergeben 3 %."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"expectedState": "data",
|
|
16
|
+
"width": 528
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "math-and-code-composition",
|
|
20
|
+
"description": "ChatGPT reference 49 in full: the formula card (Surface with a LaTeX badge, two Math nodes, the example line), the sentence, then the PHP Code block — composed with the layout and text components of lanes L1/L2.",
|
|
21
|
+
"payload": {
|
|
22
|
+
"view": {
|
|
23
|
+
"type": "Stack",
|
|
24
|
+
"direction": "column",
|
|
25
|
+
"gap": "medium",
|
|
26
|
+
"children": [
|
|
27
|
+
{
|
|
28
|
+
"type": "Surface",
|
|
29
|
+
"title": "Conversion Rate",
|
|
30
|
+
"slots": {
|
|
31
|
+
"header": [
|
|
32
|
+
{
|
|
33
|
+
"type": "Badge",
|
|
34
|
+
"text": "LaTeX"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"children": [
|
|
39
|
+
{
|
|
40
|
+
"type": "Math",
|
|
41
|
+
"latex": "CR = \\frac{N_{\\text{Conversions}}}{N_{\\text{Visitors}}} \\times 100\\%"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "Divider"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "Text",
|
|
48
|
+
"text": "Beispiel: 750 Conversions bei 25.000 Besuchern ergeben 3 %.",
|
|
49
|
+
"tone": "muted"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "Math",
|
|
53
|
+
"latex": "CR = \\frac{750}{25\\,000} \\times 100\\% = 3\\%"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "Text",
|
|
59
|
+
"text": "Das gleiche als PHP 8 mit strenger Typisierung:"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "Code",
|
|
63
|
+
"code": "<?php\n\ndeclare(strict_types=1);\n\nfunction conversionRate(\n int $conversions,\n int $visitors\n): float {\n return $visitors > 0\n ? ($conversions / $visitors) * 100.0\n : 0.0;\n}\n\necho conversionRate(750, 25000); // 3",
|
|
64
|
+
"language": "php"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"expectedState": "data",
|
|
70
|
+
"width": 528,
|
|
71
|
+
"interactions": [
|
|
72
|
+
{
|
|
73
|
+
"name": "wrap lines",
|
|
74
|
+
"click": {
|
|
75
|
+
"text": "Wrap lines"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "math-inline",
|
|
82
|
+
"description": "An inline formula (display inline) — the ChatGPT reference shows block formulas only; this covers the inline rendering.",
|
|
83
|
+
"payload": {
|
|
84
|
+
"view": {
|
|
85
|
+
"type": "Math",
|
|
86
|
+
"latex": "E = mc^2",
|
|
87
|
+
"display": "inline"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"expectedState": "data",
|
|
91
|
+
"width": 528
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "math-invalid-latex",
|
|
95
|
+
"description": "Error state: LaTeX KaTeX cannot read — the source and one muted line show (observed as data), the node reports failed RENDER_FAILED.",
|
|
96
|
+
"payload": {
|
|
97
|
+
"view": {
|
|
98
|
+
"type": "Math",
|
|
99
|
+
"title": "Conversion Rate",
|
|
100
|
+
"latex": "CR = \\frac{N_{Conversions}{N_{Visitors}}"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"expectedState": "error",
|
|
104
|
+
"width": 528
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "math-empty",
|
|
108
|
+
"description": "Empty state: an empty formula renders nothing and reports empty.",
|
|
109
|
+
"payload": {
|
|
110
|
+
"view": {
|
|
111
|
+
"type": "Math",
|
|
112
|
+
"latex": ""
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"expectedState": "empty",
|
|
116
|
+
"width": 528
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "math-loading",
|
|
120
|
+
"description": "Loading state: the formula is bound to a tool result that has not arrived yet ($from pending) — the skeleton shows.",
|
|
121
|
+
"payload": {
|
|
122
|
+
"view": {
|
|
123
|
+
"type": "Math",
|
|
124
|
+
"title": "Conversion Rate",
|
|
125
|
+
"latex": {
|
|
126
|
+
"$from": {
|
|
127
|
+
"toolCall": "call_math_1",
|
|
128
|
+
"path": "$.formula",
|
|
129
|
+
"state": "pending"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"expectedState": "loading",
|
|
135
|
+
"width": 528
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "math-narrow",
|
|
139
|
+
"description": "The formula block at the narrow width.",
|
|
140
|
+
"payload": {
|
|
141
|
+
"view": {
|
|
142
|
+
"type": "Math",
|
|
143
|
+
"title": "Conversion Rate",
|
|
144
|
+
"latex": "CR = \\frac{N_{\\text{Conversions}}}{N_{\\text{Visitors}}} \\times 100\\%",
|
|
145
|
+
"caption": "Beispiel: 750 Conversions bei 25.000 Besuchern ergeben 3 %."
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"expectedState": "data",
|
|
149
|
+
"width": 360
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|