@cloudcrane/app-spec 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -2
  3. package/dist/src/a2ui.d.ts +12 -0
  4. package/dist/src/a2ui.js +89 -0
  5. package/dist/src/blueprint.d.ts +27 -0
  6. package/dist/src/blueprint.js +62 -0
  7. package/dist/src/canonical.d.ts +2 -0
  8. package/dist/src/canonical.js +8 -0
  9. package/dist/src/catalog.d.ts +7 -0
  10. package/dist/src/catalog.js +83 -0
  11. package/dist/src/index.d.ts +9 -0
  12. package/dist/src/index.js +11 -0
  13. package/dist/src/jsonschema.d.ts +2 -0
  14. package/dist/src/jsonschema.js +11 -0
  15. package/dist/src/leak.d.ts +3 -0
  16. package/dist/src/leak.js +138 -0
  17. package/dist/src/logic.d.ts +36 -0
  18. package/dist/src/logic.js +197 -0
  19. package/dist/src/schema.d.ts +418 -0
  20. package/dist/src/schema.js +137 -0
  21. package/dist/src/validate.d.ts +6 -0
  22. package/dist/src/validate.js +54 -0
  23. package/dist/vendor/a2ui/v0_9_1/catalogs/basic/catalog.json +1383 -0
  24. package/dist/vendor/a2ui/v0_9_1/common_types.json +305 -0
  25. package/dist/vendor/a2ui/v0_9_1/server_to_client.json +131 -0
  26. package/package.json +78 -3
  27. package/schema/app-spec.v1.json +460 -0
  28. package/vendor/a2ui/v0_9_1/LICENSE +227 -0
  29. package/vendor/a2ui/v0_9_1/VENDOR.json +6 -0
  30. package/vendor/a2ui/v0_9_1/catalogs/basic/catalog.json +1383 -0
  31. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_complex-layout.json +65 -0
  32. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_formatted-text.json +56 -0
  33. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_incremental.json +134 -0
  34. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_interactive-button.json +51 -0
  35. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_row-layout.json +40 -0
  36. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_simple-login-form.json +77 -0
  37. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_simple-text.json +27 -0
  38. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/01_flight-status.json +201 -0
  39. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/02_email-compose.json +185 -0
  40. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/03_calendar-day.json +166 -0
  41. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/04_weather-current.json +168 -0
  42. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/05_product-card.json +151 -0
  43. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/06_music-player.json +165 -0
  44. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/07_task-card.json +107 -0
  45. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/08_user-profile.json +190 -0
  46. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/09_login-form.json +214 -0
  47. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/10_notification-permission.json +105 -0
  48. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/11_purchase-complete.json +169 -0
  49. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/12_chat-message.json +144 -0
  50. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/13_coffee-order.json +253 -0
  51. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/14_sports-player.json +177 -0
  52. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/15_account-balance.json +126 -0
  53. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/16_workout-summary.json +160 -0
  54. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/17_event-detail.json +144 -0
  55. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/18_track-list.json +152 -0
  56. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/19_software-purchase.json +194 -0
  57. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/20_restaurant-card.json +140 -0
  58. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/21_shipping-status.json +137 -0
  59. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/22_credit-card.json +117 -0
  60. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/23_step-counter.json +149 -0
  61. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/24_recipe-card.json +204 -0
  62. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/25_contact-card.json +175 -0
  63. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/26_podcast-episode.json +123 -0
  64. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/27_stats-card.json +106 -0
  65. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/28_countdown-timer.json +135 -0
  66. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/29_movie-card.json +156 -0
  67. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/30_live-invitation-builder.json +205 -0
  68. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/31_incremental-dashboard.json +128 -0
  69. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/32_advanced-form-validator.json +166 -0
  70. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/33_financial-data-grid.json +171 -0
  71. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/34_child-list-template.json +80 -0
  72. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/35_markdown-text.json +44 -0
  73. package/vendor/a2ui/v0_9_1/catalogs/basic/examples/36_modal.json +65 -0
  74. package/vendor/a2ui/v0_9_1/client_capabilities.json +89 -0
  75. package/vendor/a2ui/v0_9_1/client_data_model.json +22 -0
  76. package/vendor/a2ui/v0_9_1/client_to_server.json +98 -0
  77. package/vendor/a2ui/v0_9_1/client_to_server_list.json +10 -0
  78. package/vendor/a2ui/v0_9_1/client_to_server_list_wrapper.json +14 -0
  79. package/vendor/a2ui/v0_9_1/common_types.json +305 -0
  80. package/vendor/a2ui/v0_9_1/sample.json +22 -0
  81. package/vendor/a2ui/v0_9_1/server_capabilities.json +26 -0
  82. package/vendor/a2ui/v0_9_1/server_to_client.json +132 -0
  83. package/vendor/a2ui/v0_9_1/server_to_client_list.json +10 -0
  84. package/vendor/a2ui/v0_9_1/server_to_client_list_wrapper.json +14 -0
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "Notification Permission",
3
+ "description": "Example of notification permission",
4
+ "messages": [
5
+ {
6
+ "version": "v0.9",
7
+ "createSurface": {
8
+ "surfaceId": "gallery-notification-permission",
9
+ "catalogId": "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json",
10
+ "sendDataModel": true
11
+ }
12
+ },
13
+ {
14
+ "version": "v0.9",
15
+ "updateComponents": {
16
+ "surfaceId": "gallery-notification-permission",
17
+ "components": [
18
+ {
19
+ "id": "root",
20
+ "component": "Card",
21
+ "child": "main-column"
22
+ },
23
+ {
24
+ "id": "main-column",
25
+ "component": "Column",
26
+ "children": ["icon", "title", "description", "actions"],
27
+ "align": "center"
28
+ },
29
+ {
30
+ "id": "icon",
31
+ "component": "Icon",
32
+ "name": {
33
+ "path": "/icon"
34
+ }
35
+ },
36
+ {
37
+ "id": "title",
38
+ "component": "Text",
39
+ "text": {
40
+ "path": "/title"
41
+ },
42
+ "variant": "h3"
43
+ },
44
+ {
45
+ "id": "description",
46
+ "component": "Text",
47
+ "text": {
48
+ "path": "/description"
49
+ },
50
+ "variant": "body"
51
+ },
52
+ {
53
+ "id": "actions",
54
+ "component": "Row",
55
+ "children": ["yes-btn", "no-btn"],
56
+ "justify": "center"
57
+ },
58
+ {
59
+ "id": "yes-btn-text",
60
+ "component": "Text",
61
+ "text": "Yes"
62
+ },
63
+ {
64
+ "id": "yes-btn",
65
+ "component": "Button",
66
+ "child": "yes-btn-text",
67
+ "action": {
68
+ "event": {
69
+ "name": "accept",
70
+ "context": {}
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "id": "no-btn-text",
76
+ "component": "Text",
77
+ "text": "No"
78
+ },
79
+ {
80
+ "id": "no-btn",
81
+ "component": "Button",
82
+ "child": "no-btn-text",
83
+ "action": {
84
+ "event": {
85
+ "name": "decline",
86
+ "context": {}
87
+ }
88
+ }
89
+ }
90
+ ]
91
+ }
92
+ },
93
+ {
94
+ "version": "v0.9",
95
+ "updateDataModel": {
96
+ "surfaceId": "gallery-notification-permission",
97
+ "value": {
98
+ "icon": "check",
99
+ "title": "Enable notification",
100
+ "description": "Get alerts for order status changes"
101
+ }
102
+ }
103
+ }
104
+ ]
105
+ }
@@ -0,0 +1,169 @@
1
+ {
2
+ "name": "Purchase Complete",
3
+ "description": "Example of purchase complete demonstrating currency formatting.",
4
+ "messages": [
5
+ {
6
+ "version": "v0.9",
7
+ "createSurface": {
8
+ "surfaceId": "gallery-purchase-complete",
9
+ "catalogId": "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json",
10
+ "sendDataModel": true
11
+ }
12
+ },
13
+ {
14
+ "version": "v0.9",
15
+ "updateComponents": {
16
+ "surfaceId": "gallery-purchase-complete",
17
+ "components": [
18
+ {
19
+ "id": "root",
20
+ "component": "Card",
21
+ "child": "main-column"
22
+ },
23
+ {
24
+ "id": "main-column",
25
+ "component": "Column",
26
+ "children": [
27
+ "success-icon",
28
+ "title",
29
+ "product-row",
30
+ "divider",
31
+ "details-col",
32
+ "view-btn"
33
+ ],
34
+ "align": "center"
35
+ },
36
+ {
37
+ "id": "success-icon",
38
+ "component": "Icon",
39
+ "name": "check"
40
+ },
41
+ {
42
+ "id": "title",
43
+ "component": "Text",
44
+ "text": "Purchase Complete",
45
+ "variant": "h2"
46
+ },
47
+ {
48
+ "id": "product-row",
49
+ "component": "Row",
50
+ "children": ["product-image", "product-info"],
51
+ "align": "center"
52
+ },
53
+ {
54
+ "id": "product-image",
55
+ "component": "Image",
56
+ "url": {
57
+ "path": "/productImage"
58
+ },
59
+ "fit": "cover"
60
+ },
61
+ {
62
+ "id": "product-info",
63
+ "component": "Column",
64
+ "children": ["product-name", "product-price"]
65
+ },
66
+ {
67
+ "id": "product-name",
68
+ "component": "Text",
69
+ "text": {
70
+ "path": "/productName"
71
+ },
72
+ "variant": "h4"
73
+ },
74
+ {
75
+ "id": "product-price",
76
+ "component": "Text",
77
+ "text": {
78
+ "call": "formatCurrency",
79
+ "args": {
80
+ "value": {
81
+ "path": "/price"
82
+ },
83
+ "currency": "USD"
84
+ },
85
+ "returnType": "string"
86
+ },
87
+ "variant": "body"
88
+ },
89
+ {
90
+ "id": "divider",
91
+ "component": "Divider"
92
+ },
93
+ {
94
+ "id": "details-col",
95
+ "component": "Column",
96
+ "children": ["delivery-row", "seller-row"]
97
+ },
98
+ {
99
+ "id": "delivery-row",
100
+ "component": "Row",
101
+ "children": ["delivery-icon", "delivery-text"],
102
+ "align": "center"
103
+ },
104
+ {
105
+ "id": "delivery-icon",
106
+ "component": "Icon",
107
+ "name": "arrowForward"
108
+ },
109
+ {
110
+ "id": "delivery-text",
111
+ "component": "Text",
112
+ "text": {
113
+ "path": "/deliveryDate"
114
+ },
115
+ "variant": "body"
116
+ },
117
+ {
118
+ "id": "seller-row",
119
+ "component": "Row",
120
+ "children": ["seller-label", "seller-name"]
121
+ },
122
+ {
123
+ "id": "seller-label",
124
+ "component": "Text",
125
+ "text": "Sold by:",
126
+ "variant": "caption"
127
+ },
128
+ {
129
+ "id": "seller-name",
130
+ "component": "Text",
131
+ "text": {
132
+ "path": "/seller"
133
+ },
134
+ "variant": "body"
135
+ },
136
+ {
137
+ "id": "view-btn-text",
138
+ "component": "Text",
139
+ "text": "View Order Details"
140
+ },
141
+ {
142
+ "id": "view-btn",
143
+ "component": "Button",
144
+ "child": "view-btn-text",
145
+ "action": {
146
+ "event": {
147
+ "name": "view_details",
148
+ "context": {}
149
+ }
150
+ }
151
+ }
152
+ ]
153
+ }
154
+ },
155
+ {
156
+ "version": "v0.9",
157
+ "updateDataModel": {
158
+ "surfaceId": "gallery-purchase-complete",
159
+ "value": {
160
+ "productImage": "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=100&h=100&fit=crop",
161
+ "productName": "Wireless Headphones Pro",
162
+ "price": 199.99,
163
+ "deliveryDate": "Arrives Dec 18 - Dec 20",
164
+ "seller": "TechStore Official"
165
+ }
166
+ }
167
+ }
168
+ ]
169
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "name": "Chat Message",
3
+ "description": "Example of chat message demonstrating templating and relative paths.",
4
+ "messages": [
5
+ {
6
+ "version": "v0.9",
7
+ "createSurface": {
8
+ "surfaceId": "gallery-chat-message",
9
+ "catalogId": "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json",
10
+ "sendDataModel": true
11
+ }
12
+ },
13
+ {
14
+ "version": "v0.9",
15
+ "updateComponents": {
16
+ "surfaceId": "gallery-chat-message",
17
+ "components": [
18
+ {
19
+ "id": "root",
20
+ "component": "Card",
21
+ "child": "main-column"
22
+ },
23
+ {
24
+ "id": "main-column",
25
+ "component": "Column",
26
+ "children": ["header", "divider", "messages-list"]
27
+ },
28
+ {
29
+ "id": "header",
30
+ "component": "Row",
31
+ "children": ["channel-icon", "channel-name"],
32
+ "align": "center"
33
+ },
34
+ {
35
+ "id": "channel-icon",
36
+ "component": "Icon",
37
+ "name": "info"
38
+ },
39
+ {
40
+ "id": "channel-name",
41
+ "component": "Text",
42
+ "text": {
43
+ "path": "/channelName"
44
+ },
45
+ "variant": "h3"
46
+ },
47
+ {
48
+ "id": "divider",
49
+ "component": "Divider"
50
+ },
51
+ {
52
+ "id": "messages-list",
53
+ "component": "Column",
54
+ "children": {
55
+ "path": "/messages",
56
+ "componentId": "message-template"
57
+ },
58
+ "align": "start"
59
+ },
60
+ {
61
+ "id": "message-template",
62
+ "component": "Row",
63
+ "children": ["msg-avatar", "msg-content"],
64
+ "align": "start"
65
+ },
66
+ {
67
+ "id": "msg-avatar",
68
+ "component": "Image",
69
+ "url": {
70
+ "path": "avatar"
71
+ },
72
+ "fit": "cover",
73
+ "variant": "avatar"
74
+ },
75
+ {
76
+ "id": "msg-content",
77
+ "component": "Column",
78
+ "children": ["msg-header", "msg-text"]
79
+ },
80
+ {
81
+ "id": "msg-header",
82
+ "component": "Row",
83
+ "children": ["msg-username", "msg-time"],
84
+ "align": "center"
85
+ },
86
+ {
87
+ "id": "msg-username",
88
+ "component": "Text",
89
+ "text": {
90
+ "path": "username"
91
+ },
92
+ "variant": "h4"
93
+ },
94
+ {
95
+ "id": "msg-time",
96
+ "component": "Text",
97
+ "text": {
98
+ "call": "formatDate",
99
+ "args": {
100
+ "value": {
101
+ "path": "timestamp"
102
+ },
103
+ "format": "h:mm a"
104
+ },
105
+ "returnType": "string"
106
+ },
107
+ "variant": "caption"
108
+ },
109
+ {
110
+ "id": "msg-text",
111
+ "component": "Text",
112
+ "text": {
113
+ "path": "text"
114
+ },
115
+ "variant": "body"
116
+ }
117
+ ]
118
+ }
119
+ },
120
+ {
121
+ "version": "v0.9",
122
+ "updateDataModel": {
123
+ "surfaceId": "gallery-chat-message",
124
+ "value": {
125
+ "channelName": "project-updates",
126
+ "messages": [
127
+ {
128
+ "avatar": "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=40&h=40&fit=crop",
129
+ "username": "Mike Chen",
130
+ "timestamp": "2025-12-15T10:32:00Z",
131
+ "text": "Just pushed the new API changes. Ready for review."
132
+ },
133
+ {
134
+ "avatar": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=40&h=40&fit=crop",
135
+ "username": "Sarah Kim",
136
+ "timestamp": "2025-12-15T10:45:00Z",
137
+ "text": "Great! I'll take a look after standup."
138
+ }
139
+ ]
140
+ }
141
+ }
142
+ }
143
+ ]
144
+ }
@@ -0,0 +1,253 @@
1
+ {
2
+ "name": "Coffee Order",
3
+ "description": "Example of coffee order demonstrating templating and currency formatting.",
4
+ "messages": [
5
+ {
6
+ "version": "v0.9",
7
+ "createSurface": {
8
+ "surfaceId": "gallery-coffee-order",
9
+ "catalogId": "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json",
10
+ "sendDataModel": true
11
+ }
12
+ },
13
+ {
14
+ "version": "v0.9",
15
+ "updateComponents": {
16
+ "surfaceId": "gallery-coffee-order",
17
+ "components": [
18
+ {
19
+ "id": "root",
20
+ "component": "Card",
21
+ "child": "main-column"
22
+ },
23
+ {
24
+ "id": "main-column",
25
+ "component": "Column",
26
+ "children": ["header", "items-list", "divider", "totals", "actions"]
27
+ },
28
+ {
29
+ "id": "header",
30
+ "component": "Row",
31
+ "children": ["coffee-icon", "store-name"],
32
+ "align": "center"
33
+ },
34
+ {
35
+ "id": "coffee-icon",
36
+ "component": "Icon",
37
+ "name": "favorite"
38
+ },
39
+ {
40
+ "id": "store-name",
41
+ "component": "Text",
42
+ "text": {
43
+ "path": "/storeName"
44
+ },
45
+ "variant": "h3"
46
+ },
47
+ {
48
+ "id": "items-list",
49
+ "component": "Column",
50
+ "children": {
51
+ "path": "/items",
52
+ "componentId": "order-item-template"
53
+ }
54
+ },
55
+ {
56
+ "id": "order-item-template",
57
+ "component": "Row",
58
+ "children": ["item-details", "item-price"],
59
+ "justify": "spaceBetween",
60
+ "align": "start"
61
+ },
62
+ {
63
+ "id": "item-details",
64
+ "component": "Column",
65
+ "children": ["item-name", "item-size"]
66
+ },
67
+ {
68
+ "id": "item-name",
69
+ "component": "Text",
70
+ "text": {
71
+ "path": "name"
72
+ },
73
+ "variant": "body"
74
+ },
75
+ {
76
+ "id": "item-size",
77
+ "component": "Text",
78
+ "text": {
79
+ "path": "size"
80
+ },
81
+ "variant": "caption"
82
+ },
83
+ {
84
+ "id": "item-price",
85
+ "component": "Text",
86
+ "text": {
87
+ "call": "formatCurrency",
88
+ "args": {
89
+ "value": {
90
+ "path": "price"
91
+ },
92
+ "currency": "USD"
93
+ },
94
+ "returnType": "string"
95
+ },
96
+ "variant": "body"
97
+ },
98
+ {
99
+ "id": "divider",
100
+ "component": "Divider"
101
+ },
102
+ {
103
+ "id": "totals",
104
+ "component": "Column",
105
+ "children": ["subtotal-row", "tax-row", "total-row"]
106
+ },
107
+ {
108
+ "id": "subtotal-row",
109
+ "component": "Row",
110
+ "children": ["subtotal-label", "subtotal-value"],
111
+ "justify": "spaceBetween"
112
+ },
113
+ {
114
+ "id": "subtotal-label",
115
+ "component": "Text",
116
+ "text": "Subtotal",
117
+ "variant": "caption"
118
+ },
119
+ {
120
+ "id": "subtotal-value",
121
+ "component": "Text",
122
+ "text": {
123
+ "call": "formatCurrency",
124
+ "args": {
125
+ "value": {
126
+ "path": "/subtotal"
127
+ },
128
+ "currency": "USD"
129
+ },
130
+ "returnType": "string"
131
+ },
132
+ "variant": "body"
133
+ },
134
+ {
135
+ "id": "tax-row",
136
+ "component": "Row",
137
+ "children": ["tax-label", "tax-value"],
138
+ "justify": "spaceBetween"
139
+ },
140
+ {
141
+ "id": "tax-label",
142
+ "component": "Text",
143
+ "text": "Tax",
144
+ "variant": "caption"
145
+ },
146
+ {
147
+ "id": "tax-value",
148
+ "component": "Text",
149
+ "text": {
150
+ "call": "formatCurrency",
151
+ "args": {
152
+ "value": {
153
+ "path": "/tax"
154
+ },
155
+ "currency": "USD"
156
+ },
157
+ "returnType": "string"
158
+ },
159
+ "variant": "body"
160
+ },
161
+ {
162
+ "id": "total-row",
163
+ "component": "Row",
164
+ "children": ["total-label", "total-value"],
165
+ "justify": "spaceBetween"
166
+ },
167
+ {
168
+ "id": "total-label",
169
+ "component": "Text",
170
+ "text": "Total",
171
+ "variant": "h4"
172
+ },
173
+ {
174
+ "id": "total-value",
175
+ "component": "Text",
176
+ "text": {
177
+ "call": "formatCurrency",
178
+ "args": {
179
+ "value": {
180
+ "path": "/total"
181
+ },
182
+ "currency": "USD"
183
+ },
184
+ "returnType": "string"
185
+ },
186
+ "variant": "h4"
187
+ },
188
+ {
189
+ "id": "actions",
190
+ "component": "Row",
191
+ "children": ["purchase-btn", "add-btn"]
192
+ },
193
+ {
194
+ "id": "purchase-btn-text",
195
+ "component": "Text",
196
+ "text": "Purchase"
197
+ },
198
+ {
199
+ "id": "purchase-btn",
200
+ "component": "Button",
201
+ "child": "purchase-btn-text",
202
+ "action": {
203
+ "event": {
204
+ "name": "purchase",
205
+ "context": {}
206
+ }
207
+ }
208
+ },
209
+ {
210
+ "id": "add-btn-text",
211
+ "component": "Text",
212
+ "text": "Add to cart"
213
+ },
214
+ {
215
+ "id": "add-btn",
216
+ "component": "Button",
217
+ "child": "add-btn-text",
218
+ "action": {
219
+ "event": {
220
+ "name": "add_to_cart",
221
+ "context": {}
222
+ }
223
+ }
224
+ }
225
+ ]
226
+ }
227
+ },
228
+ {
229
+ "version": "v0.9",
230
+ "updateDataModel": {
231
+ "surfaceId": "gallery-coffee-order",
232
+ "value": {
233
+ "storeName": "Sunrise Coffee",
234
+ "items": [
235
+ {
236
+ "name": "Oat Milk Latte",
237
+ "size": "Grande, Extra Shot",
238
+ "price": 6.45
239
+ },
240
+ {
241
+ "name": "Chocolate Croissant",
242
+ "size": "Warmed",
243
+ "price": 4.25
244
+ }
245
+ ],
246
+ "subtotal": 10.7,
247
+ "tax": 0.96,
248
+ "total": 11.66
249
+ }
250
+ }
251
+ }
252
+ ]
253
+ }