@cloudcrane/app-spec 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +22 -2
- package/dist/src/a2ui.d.ts +12 -0
- package/dist/src/a2ui.js +89 -0
- package/dist/src/blueprint.d.ts +27 -0
- package/dist/src/blueprint.js +62 -0
- package/dist/src/canonical.d.ts +2 -0
- package/dist/src/canonical.js +8 -0
- package/dist/src/catalog.d.ts +7 -0
- package/dist/src/catalog.js +83 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.js +11 -0
- package/dist/src/jsonschema.d.ts +2 -0
- package/dist/src/jsonschema.js +11 -0
- package/dist/src/leak.d.ts +3 -0
- package/dist/src/leak.js +141 -0
- package/dist/src/logic.d.ts +36 -0
- package/dist/src/logic.js +197 -0
- package/dist/src/schema.d.ts +418 -0
- package/dist/src/schema.js +137 -0
- package/dist/src/validate.d.ts +6 -0
- package/dist/src/validate.js +54 -0
- package/dist/vendor/a2ui/v0_9_1/catalogs/basic/catalog.json +1383 -0
- package/dist/vendor/a2ui/v0_9_1/common_types.json +305 -0
- package/dist/vendor/a2ui/v0_9_1/server_to_client.json +131 -0
- package/package.json +78 -3
- package/schema/app-spec.v1.json +460 -0
- package/vendor/a2ui/v0_9_1/LICENSE +227 -0
- package/vendor/a2ui/v0_9_1/VENDOR.json +6 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/catalog.json +1383 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_complex-layout.json +65 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_formatted-text.json +56 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_incremental.json +134 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_interactive-button.json +51 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_row-layout.json +40 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_simple-login-form.json +77 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/00_simple-text.json +27 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/01_flight-status.json +201 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/02_email-compose.json +185 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/03_calendar-day.json +166 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/04_weather-current.json +168 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/05_product-card.json +151 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/06_music-player.json +165 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/07_task-card.json +107 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/08_user-profile.json +190 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/09_login-form.json +214 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/10_notification-permission.json +105 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/11_purchase-complete.json +169 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/12_chat-message.json +144 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/13_coffee-order.json +253 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/14_sports-player.json +177 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/15_account-balance.json +126 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/16_workout-summary.json +160 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/17_event-detail.json +144 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/18_track-list.json +152 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/19_software-purchase.json +194 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/20_restaurant-card.json +140 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/21_shipping-status.json +137 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/22_credit-card.json +117 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/23_step-counter.json +149 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/24_recipe-card.json +204 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/25_contact-card.json +175 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/26_podcast-episode.json +123 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/27_stats-card.json +106 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/28_countdown-timer.json +135 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/29_movie-card.json +156 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/30_live-invitation-builder.json +205 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/31_incremental-dashboard.json +128 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/32_advanced-form-validator.json +166 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/33_financial-data-grid.json +171 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/34_child-list-template.json +80 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/35_markdown-text.json +44 -0
- package/vendor/a2ui/v0_9_1/catalogs/basic/examples/36_modal.json +65 -0
- package/vendor/a2ui/v0_9_1/client_capabilities.json +89 -0
- package/vendor/a2ui/v0_9_1/client_data_model.json +22 -0
- package/vendor/a2ui/v0_9_1/client_to_server.json +98 -0
- package/vendor/a2ui/v0_9_1/client_to_server_list.json +10 -0
- package/vendor/a2ui/v0_9_1/client_to_server_list_wrapper.json +14 -0
- package/vendor/a2ui/v0_9_1/common_types.json +305 -0
- package/vendor/a2ui/v0_9_1/sample.json +22 -0
- package/vendor/a2ui/v0_9_1/server_capabilities.json +26 -0
- package/vendor/a2ui/v0_9_1/server_to_client.json +132 -0
- package/vendor/a2ui/v0_9_1/server_to_client_list.json +10 -0
- package/vendor/a2ui/v0_9_1/server_to_client_list_wrapper.json +14 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Track List",
|
|
3
|
+
"description": "Example of track list demonstrating templating, relative paths, and number formatting.",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-track-list",
|
|
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-track-list",
|
|
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", "tracks-list"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "header",
|
|
30
|
+
"component": "Row",
|
|
31
|
+
"children": ["playlist-icon", "playlist-name"],
|
|
32
|
+
"align": "center"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "playlist-icon",
|
|
36
|
+
"component": "Icon",
|
|
37
|
+
"name": "play"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "playlist-name",
|
|
41
|
+
"component": "Text",
|
|
42
|
+
"text": {
|
|
43
|
+
"path": "/playlistName"
|
|
44
|
+
},
|
|
45
|
+
"variant": "h3"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "divider",
|
|
49
|
+
"component": "Divider"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "tracks-list",
|
|
53
|
+
"component": "Column",
|
|
54
|
+
"children": {
|
|
55
|
+
"path": "/tracks",
|
|
56
|
+
"componentId": "track-item-template"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "track-item-template",
|
|
61
|
+
"component": "Row",
|
|
62
|
+
"children": ["track-num", "track-art", "track-info", "track-duration"],
|
|
63
|
+
"align": "center"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "track-num",
|
|
67
|
+
"component": "Text",
|
|
68
|
+
"text": {
|
|
69
|
+
"call": "formatNumber",
|
|
70
|
+
"args": {
|
|
71
|
+
"value": {
|
|
72
|
+
"path": "number"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"returnType": "string"
|
|
76
|
+
},
|
|
77
|
+
"variant": "caption"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "track-art",
|
|
81
|
+
"component": "Image",
|
|
82
|
+
"url": {
|
|
83
|
+
"path": "art"
|
|
84
|
+
},
|
|
85
|
+
"fit": "cover"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "track-info",
|
|
89
|
+
"component": "Column",
|
|
90
|
+
"children": ["track-title", "track-artist"]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "track-title",
|
|
94
|
+
"component": "Text",
|
|
95
|
+
"text": {
|
|
96
|
+
"path": "title"
|
|
97
|
+
},
|
|
98
|
+
"variant": "body"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "track-artist",
|
|
102
|
+
"component": "Text",
|
|
103
|
+
"text": {
|
|
104
|
+
"path": "artist"
|
|
105
|
+
},
|
|
106
|
+
"variant": "caption"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "track-duration",
|
|
110
|
+
"component": "Text",
|
|
111
|
+
"text": {
|
|
112
|
+
"path": "duration"
|
|
113
|
+
},
|
|
114
|
+
"variant": "caption"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"version": "v0.9",
|
|
121
|
+
"updateDataModel": {
|
|
122
|
+
"surfaceId": "gallery-track-list",
|
|
123
|
+
"value": {
|
|
124
|
+
"playlistName": "Focus Flow",
|
|
125
|
+
"tracks": [
|
|
126
|
+
{
|
|
127
|
+
"number": 1,
|
|
128
|
+
"art": "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=50&h=50&fit=crop",
|
|
129
|
+
"title": "Weightless",
|
|
130
|
+
"artist": "Marconi Union",
|
|
131
|
+
"duration": "8:09"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"number": 2,
|
|
135
|
+
"art": "https://images.unsplash.com/photo-1511379938547-c1f69419868d?w=50&h=50&fit=crop",
|
|
136
|
+
"title": "Clair de Lune",
|
|
137
|
+
"artist": "Debussy",
|
|
138
|
+
"duration": "5:12"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"number": 3,
|
|
142
|
+
"art": "https://images.unsplash.com/photo-1507838153414-b4b713384a76?w=50&h=50&fit=crop",
|
|
143
|
+
"title": "Ambient Light",
|
|
144
|
+
"artist": "Brian Eno",
|
|
145
|
+
"duration": "6:45"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Software Purchase",
|
|
3
|
+
"description": "Example of software purchase demonstrating currency formatting and ChoicePicker.",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-software-purchase",
|
|
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-software-purchase",
|
|
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
|
+
"title",
|
|
28
|
+
"product-name",
|
|
29
|
+
"divider1",
|
|
30
|
+
"options",
|
|
31
|
+
"divider2",
|
|
32
|
+
"total-row",
|
|
33
|
+
"actions"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "title",
|
|
38
|
+
"component": "Text",
|
|
39
|
+
"text": "Purchase License",
|
|
40
|
+
"variant": "h3"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "product-name",
|
|
44
|
+
"component": "Text",
|
|
45
|
+
"text": {
|
|
46
|
+
"path": "/productName"
|
|
47
|
+
},
|
|
48
|
+
"variant": "h2"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "divider1",
|
|
52
|
+
"component": "Divider"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "options",
|
|
56
|
+
"component": "Column",
|
|
57
|
+
"children": ["seats-row", "period-row"]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "seats-row",
|
|
61
|
+
"component": "Row",
|
|
62
|
+
"children": ["seats-label", "seats-value"],
|
|
63
|
+
"justify": "spaceBetween",
|
|
64
|
+
"align": "center"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "seats-label",
|
|
68
|
+
"component": "Text",
|
|
69
|
+
"text": "Number of seats",
|
|
70
|
+
"variant": "body"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "seats-value",
|
|
74
|
+
"component": "Text",
|
|
75
|
+
"text": {
|
|
76
|
+
"path": "/seats"
|
|
77
|
+
},
|
|
78
|
+
"variant": "h4"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "period-row",
|
|
82
|
+
"component": "Row",
|
|
83
|
+
"children": ["period-label", "period-picker"],
|
|
84
|
+
"justify": "spaceBetween",
|
|
85
|
+
"align": "center"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "period-label",
|
|
89
|
+
"component": "Text",
|
|
90
|
+
"text": "Billing period",
|
|
91
|
+
"variant": "body"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "period-picker",
|
|
95
|
+
"component": "ChoicePicker",
|
|
96
|
+
"options": [
|
|
97
|
+
{
|
|
98
|
+
"label": "Annual",
|
|
99
|
+
"value": "annual"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"label": "Monthly",
|
|
103
|
+
"value": "monthly"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"value": {
|
|
107
|
+
"path": "/billingPeriod"
|
|
108
|
+
},
|
|
109
|
+
"variant": "mutuallyExclusive",
|
|
110
|
+
"displayStyle": "chips"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "divider2",
|
|
114
|
+
"component": "Divider"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "total-row",
|
|
118
|
+
"component": "Row",
|
|
119
|
+
"children": ["total-label", "total-value"],
|
|
120
|
+
"justify": "spaceBetween",
|
|
121
|
+
"align": "center"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "total-label",
|
|
125
|
+
"component": "Text",
|
|
126
|
+
"text": "Total",
|
|
127
|
+
"variant": "h4"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "total-value",
|
|
131
|
+
"component": "Text",
|
|
132
|
+
"text": {
|
|
133
|
+
"call": "formatString",
|
|
134
|
+
"args": {
|
|
135
|
+
"value": "${formatCurrency(value: ${/total}, currency: 'USD')}/year"
|
|
136
|
+
},
|
|
137
|
+
"returnType": "string"
|
|
138
|
+
},
|
|
139
|
+
"variant": "h2"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "actions",
|
|
143
|
+
"component": "Row",
|
|
144
|
+
"children": ["confirm-btn", "cancel-btn"]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "confirm-btn-text",
|
|
148
|
+
"component": "Text",
|
|
149
|
+
"text": "Confirm Purchase"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "confirm-btn",
|
|
153
|
+
"component": "Button",
|
|
154
|
+
"child": "confirm-btn-text",
|
|
155
|
+
"action": {
|
|
156
|
+
"event": {
|
|
157
|
+
"name": "confirm",
|
|
158
|
+
"context": {}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "cancel-btn-text",
|
|
164
|
+
"component": "Text",
|
|
165
|
+
"text": "Cancel"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "cancel-btn",
|
|
169
|
+
"component": "Button",
|
|
170
|
+
"child": "cancel-btn-text",
|
|
171
|
+
"action": {
|
|
172
|
+
"event": {
|
|
173
|
+
"name": "cancel",
|
|
174
|
+
"context": {}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"version": "v0.9",
|
|
183
|
+
"updateDataModel": {
|
|
184
|
+
"surfaceId": "gallery-software-purchase",
|
|
185
|
+
"value": {
|
|
186
|
+
"productName": "Design Suite Pro",
|
|
187
|
+
"seats": "10 seats",
|
|
188
|
+
"billingPeriod": ["annual"],
|
|
189
|
+
"total": 1188.0
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Restaurant Card",
|
|
3
|
+
"description": "Example of restaurant card",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-restaurant-card",
|
|
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-restaurant-card",
|
|
17
|
+
"components": [
|
|
18
|
+
{
|
|
19
|
+
"id": "root",
|
|
20
|
+
"component": "Card",
|
|
21
|
+
"child": "main-column"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "main-column",
|
|
25
|
+
"component": "Column",
|
|
26
|
+
"children": ["restaurant-image", "content"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "restaurant-image",
|
|
30
|
+
"component": "Image",
|
|
31
|
+
"url": {
|
|
32
|
+
"path": "/image"
|
|
33
|
+
},
|
|
34
|
+
"fit": "cover"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "content",
|
|
38
|
+
"component": "Column",
|
|
39
|
+
"children": ["name-row", "cuisine", "rating-row", "details-row"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "name-row",
|
|
43
|
+
"component": "Row",
|
|
44
|
+
"children": ["restaurant-name", "price-range"],
|
|
45
|
+
"justify": "spaceBetween",
|
|
46
|
+
"align": "center"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "restaurant-name",
|
|
50
|
+
"component": "Text",
|
|
51
|
+
"text": {
|
|
52
|
+
"path": "/name"
|
|
53
|
+
},
|
|
54
|
+
"variant": "h3"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "price-range",
|
|
58
|
+
"component": "Text",
|
|
59
|
+
"text": {
|
|
60
|
+
"path": "/priceRange"
|
|
61
|
+
},
|
|
62
|
+
"variant": "body"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "cuisine",
|
|
66
|
+
"component": "Text",
|
|
67
|
+
"text": {
|
|
68
|
+
"path": "/cuisine"
|
|
69
|
+
},
|
|
70
|
+
"variant": "caption"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "rating-row",
|
|
74
|
+
"component": "Row",
|
|
75
|
+
"children": ["star-icon", "rating", "reviews"],
|
|
76
|
+
"align": "center"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "star-icon",
|
|
80
|
+
"component": "Icon",
|
|
81
|
+
"name": "star"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "rating",
|
|
85
|
+
"component": "Text",
|
|
86
|
+
"text": {
|
|
87
|
+
"path": "/rating"
|
|
88
|
+
},
|
|
89
|
+
"variant": "body"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "reviews",
|
|
93
|
+
"component": "Text",
|
|
94
|
+
"text": {
|
|
95
|
+
"path": "/reviewCount"
|
|
96
|
+
},
|
|
97
|
+
"variant": "caption"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "details-row",
|
|
101
|
+
"component": "Row",
|
|
102
|
+
"children": ["distance", "delivery-time"]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "distance",
|
|
106
|
+
"component": "Text",
|
|
107
|
+
"text": {
|
|
108
|
+
"path": "/distance"
|
|
109
|
+
},
|
|
110
|
+
"variant": "caption"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "delivery-time",
|
|
114
|
+
"component": "Text",
|
|
115
|
+
"text": {
|
|
116
|
+
"path": "/deliveryTime"
|
|
117
|
+
},
|
|
118
|
+
"variant": "caption"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"version": "v0.9",
|
|
125
|
+
"updateDataModel": {
|
|
126
|
+
"surfaceId": "gallery-restaurant-card",
|
|
127
|
+
"value": {
|
|
128
|
+
"image": "https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=300&h=150&fit=crop",
|
|
129
|
+
"name": "The Italian Kitchen",
|
|
130
|
+
"priceRange": "$$$",
|
|
131
|
+
"cuisine": "Italian \u2022 Pasta \u2022 Wine Bar",
|
|
132
|
+
"rating": "4.8",
|
|
133
|
+
"reviewCount": "(2,847 reviews)",
|
|
134
|
+
"distance": "0.8 mi",
|
|
135
|
+
"deliveryTime": "25-35 min"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Shipping Status",
|
|
3
|
+
"description": "Example of shipping status demonstrating templating and relative paths.",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-shipping-status",
|
|
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-shipping-status",
|
|
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", "tracking-number", "divider", "steps-list", "eta"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "header",
|
|
30
|
+
"component": "Row",
|
|
31
|
+
"children": ["package-icon", "title"],
|
|
32
|
+
"align": "center"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "package-icon",
|
|
36
|
+
"component": "Icon",
|
|
37
|
+
"name": "info"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "title",
|
|
41
|
+
"component": "Text",
|
|
42
|
+
"text": "Package Status",
|
|
43
|
+
"variant": "h3"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "tracking-number",
|
|
47
|
+
"component": "Text",
|
|
48
|
+
"text": {
|
|
49
|
+
"path": "/trackingNumber"
|
|
50
|
+
},
|
|
51
|
+
"variant": "caption"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "divider",
|
|
55
|
+
"component": "Divider"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "steps-list",
|
|
59
|
+
"component": "Column",
|
|
60
|
+
"children": {
|
|
61
|
+
"path": "/steps",
|
|
62
|
+
"componentId": "step-item-template"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "step-item-template",
|
|
67
|
+
"component": "Row",
|
|
68
|
+
"children": ["step-icon", "step-text"],
|
|
69
|
+
"align": "center"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "step-icon",
|
|
73
|
+
"component": "Icon",
|
|
74
|
+
"name": {
|
|
75
|
+
"path": "icon"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "step-text",
|
|
80
|
+
"component": "Text",
|
|
81
|
+
"text": {
|
|
82
|
+
"path": "label"
|
|
83
|
+
},
|
|
84
|
+
"variant": "body"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "eta",
|
|
88
|
+
"component": "Row",
|
|
89
|
+
"children": ["eta-icon", "eta-text"],
|
|
90
|
+
"align": "center"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "eta-icon",
|
|
94
|
+
"component": "Icon",
|
|
95
|
+
"name": "calendarToday"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "eta-text",
|
|
99
|
+
"component": "Text",
|
|
100
|
+
"text": {
|
|
101
|
+
"path": "/eta"
|
|
102
|
+
},
|
|
103
|
+
"variant": "body"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"version": "v0.9",
|
|
110
|
+
"updateDataModel": {
|
|
111
|
+
"surfaceId": "gallery-shipping-status",
|
|
112
|
+
"value": {
|
|
113
|
+
"trackingNumber": "Tracking: 1Z999AA10123456784",
|
|
114
|
+
"steps": [
|
|
115
|
+
{
|
|
116
|
+
"icon": "check",
|
|
117
|
+
"label": "Order Placed"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"icon": "check",
|
|
121
|
+
"label": "Shipped"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"icon": "send",
|
|
125
|
+
"label": "Out for Delivery"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"icon": "check",
|
|
129
|
+
"label": "Delivered"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"eta": "Estimated delivery: Today by 8 PM"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|