@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.
- 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 +138 -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,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Podcast Episode",
|
|
3
|
+
"description": "Example of podcast episode demonstrating AudioPlayer and date formatting.",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-podcast-episode",
|
|
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-podcast-episode",
|
|
17
|
+
"components": [
|
|
18
|
+
{
|
|
19
|
+
"id": "root",
|
|
20
|
+
"component": "Card",
|
|
21
|
+
"child": "main-row"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "main-row",
|
|
25
|
+
"component": "Row",
|
|
26
|
+
"children": ["artwork", "content"],
|
|
27
|
+
"align": "start"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "artwork",
|
|
31
|
+
"component": "Image",
|
|
32
|
+
"url": {
|
|
33
|
+
"path": "/artwork"
|
|
34
|
+
},
|
|
35
|
+
"fit": "cover"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "content",
|
|
39
|
+
"component": "Column",
|
|
40
|
+
"children": ["show-name", "episode-title", "meta-row", "description", "audio-player"]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "show-name",
|
|
44
|
+
"component": "Text",
|
|
45
|
+
"text": {
|
|
46
|
+
"path": "/showName"
|
|
47
|
+
},
|
|
48
|
+
"variant": "caption"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "episode-title",
|
|
52
|
+
"component": "Text",
|
|
53
|
+
"text": {
|
|
54
|
+
"path": "/episodeTitle"
|
|
55
|
+
},
|
|
56
|
+
"variant": "h4"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "meta-row",
|
|
60
|
+
"component": "Row",
|
|
61
|
+
"children": ["duration", "date"]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "duration",
|
|
65
|
+
"component": "Text",
|
|
66
|
+
"text": {
|
|
67
|
+
"path": "/duration"
|
|
68
|
+
},
|
|
69
|
+
"variant": "caption"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "date",
|
|
73
|
+
"component": "Text",
|
|
74
|
+
"text": {
|
|
75
|
+
"call": "formatDate",
|
|
76
|
+
"args": {
|
|
77
|
+
"value": {
|
|
78
|
+
"path": "/date"
|
|
79
|
+
},
|
|
80
|
+
"format": "MMM d, yyyy"
|
|
81
|
+
},
|
|
82
|
+
"returnType": "string"
|
|
83
|
+
},
|
|
84
|
+
"variant": "caption"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "description",
|
|
88
|
+
"component": "Text",
|
|
89
|
+
"text": {
|
|
90
|
+
"path": "/description"
|
|
91
|
+
},
|
|
92
|
+
"variant": "body"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "audio-player",
|
|
96
|
+
"component": "AudioPlayer",
|
|
97
|
+
"url": {
|
|
98
|
+
"path": "/audioUrl"
|
|
99
|
+
},
|
|
100
|
+
"description": {
|
|
101
|
+
"path": "/episodeTitle"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"version": "v0.9",
|
|
109
|
+
"updateDataModel": {
|
|
110
|
+
"surfaceId": "gallery-podcast-episode",
|
|
111
|
+
"value": {
|
|
112
|
+
"artwork": "https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=100&h=100&fit=crop",
|
|
113
|
+
"showName": "Tech Talk Daily",
|
|
114
|
+
"episodeTitle": "The Future of AI in Product Design",
|
|
115
|
+
"duration": "45 min",
|
|
116
|
+
"date": "2024-12-15",
|
|
117
|
+
"description": "How AI is transforming the way we design and build products.",
|
|
118
|
+
"audioUrl": "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Stats Card",
|
|
3
|
+
"description": "Example of stats card demonstrating currency and number formatting.",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-stats-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-stats-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": ["header", "value", "trend-row"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "header",
|
|
30
|
+
"component": "Row",
|
|
31
|
+
"children": ["metric-icon", "metric-name"],
|
|
32
|
+
"align": "center"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "metric-icon",
|
|
36
|
+
"component": "Icon",
|
|
37
|
+
"name": {
|
|
38
|
+
"path": "/icon"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "metric-name",
|
|
43
|
+
"component": "Text",
|
|
44
|
+
"text": {
|
|
45
|
+
"path": "/metricName"
|
|
46
|
+
},
|
|
47
|
+
"variant": "caption"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "value",
|
|
51
|
+
"component": "Text",
|
|
52
|
+
"text": {
|
|
53
|
+
"call": "formatCurrency",
|
|
54
|
+
"args": {
|
|
55
|
+
"value": {
|
|
56
|
+
"path": "/value"
|
|
57
|
+
},
|
|
58
|
+
"currency": "USD"
|
|
59
|
+
},
|
|
60
|
+
"returnType": "string"
|
|
61
|
+
},
|
|
62
|
+
"variant": "h1"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "trend-row",
|
|
66
|
+
"component": "Row",
|
|
67
|
+
"children": ["trend-icon", "trend-text"],
|
|
68
|
+
"align": "center"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "trend-icon",
|
|
72
|
+
"component": "Icon",
|
|
73
|
+
"name": {
|
|
74
|
+
"path": "/trendIcon"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "trend-text",
|
|
79
|
+
"component": "Text",
|
|
80
|
+
"text": {
|
|
81
|
+
"call": "formatString",
|
|
82
|
+
"args": {
|
|
83
|
+
"value": "+${/trendPercent}% from last month"
|
|
84
|
+
},
|
|
85
|
+
"returnType": "string"
|
|
86
|
+
},
|
|
87
|
+
"variant": "body"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"version": "v0.9",
|
|
94
|
+
"updateDataModel": {
|
|
95
|
+
"surfaceId": "gallery-stats-card",
|
|
96
|
+
"value": {
|
|
97
|
+
"icon": "payment",
|
|
98
|
+
"metricName": "Monthly Revenue",
|
|
99
|
+
"value": 48294,
|
|
100
|
+
"trendIcon": "arrowForward",
|
|
101
|
+
"trendPercent": 12.5
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Countdown Timer",
|
|
3
|
+
"description": "Example of countdown timer demonstrating date formatting.",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-countdown-timer",
|
|
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-countdown-timer",
|
|
17
|
+
"components": [
|
|
18
|
+
{
|
|
19
|
+
"id": "root",
|
|
20
|
+
"component": "Card",
|
|
21
|
+
"child": "main-column"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "main-column",
|
|
25
|
+
"component": "Column",
|
|
26
|
+
"children": ["event-name", "countdown-row", "target-date"],
|
|
27
|
+
"align": "center"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "event-name",
|
|
31
|
+
"component": "Text",
|
|
32
|
+
"text": {
|
|
33
|
+
"path": "/eventName"
|
|
34
|
+
},
|
|
35
|
+
"variant": "h3"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "countdown-row",
|
|
39
|
+
"component": "Row",
|
|
40
|
+
"children": ["days-col", "hours-col", "minutes-col"],
|
|
41
|
+
"justify": "spaceAround"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "days-col",
|
|
45
|
+
"component": "Column",
|
|
46
|
+
"children": ["days-value", "days-label"],
|
|
47
|
+
"align": "center"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "days-value",
|
|
51
|
+
"component": "Text",
|
|
52
|
+
"text": {
|
|
53
|
+
"path": "/days"
|
|
54
|
+
},
|
|
55
|
+
"variant": "h1"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "days-label",
|
|
59
|
+
"component": "Text",
|
|
60
|
+
"text": "Days",
|
|
61
|
+
"variant": "caption"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "hours-col",
|
|
65
|
+
"component": "Column",
|
|
66
|
+
"children": ["hours-value", "hours-label"],
|
|
67
|
+
"align": "center"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "hours-value",
|
|
71
|
+
"component": "Text",
|
|
72
|
+
"text": {
|
|
73
|
+
"path": "/hours"
|
|
74
|
+
},
|
|
75
|
+
"variant": "h1"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "hours-label",
|
|
79
|
+
"component": "Text",
|
|
80
|
+
"text": "Hours",
|
|
81
|
+
"variant": "caption"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "minutes-col",
|
|
85
|
+
"component": "Column",
|
|
86
|
+
"children": ["minutes-value", "minutes-label"],
|
|
87
|
+
"align": "center"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "minutes-value",
|
|
91
|
+
"component": "Text",
|
|
92
|
+
"text": {
|
|
93
|
+
"path": "/minutes"
|
|
94
|
+
},
|
|
95
|
+
"variant": "h1"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "minutes-label",
|
|
99
|
+
"component": "Text",
|
|
100
|
+
"text": "Minutes",
|
|
101
|
+
"variant": "caption"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "target-date",
|
|
105
|
+
"component": "Text",
|
|
106
|
+
"text": {
|
|
107
|
+
"call": "formatDate",
|
|
108
|
+
"args": {
|
|
109
|
+
"value": {
|
|
110
|
+
"path": "/targetDate"
|
|
111
|
+
},
|
|
112
|
+
"format": "MMMM d, yyyy"
|
|
113
|
+
},
|
|
114
|
+
"returnType": "string"
|
|
115
|
+
},
|
|
116
|
+
"variant": "body"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"version": "v0.9",
|
|
123
|
+
"updateDataModel": {
|
|
124
|
+
"surfaceId": "gallery-countdown-timer",
|
|
125
|
+
"value": {
|
|
126
|
+
"eventName": "Product Launch",
|
|
127
|
+
"days": "14",
|
|
128
|
+
"hours": "08",
|
|
129
|
+
"minutes": "32",
|
|
130
|
+
"targetDate": "2025-01-15"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Movie Card",
|
|
3
|
+
"description": "Example of movie card demonstrating Modal and Video components.",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"version": "v0.9",
|
|
7
|
+
"createSurface": {
|
|
8
|
+
"surfaceId": "gallery-movie-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-movie-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": ["poster", "content", "trailer-modal"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "poster",
|
|
30
|
+
"component": "Image",
|
|
31
|
+
"url": {
|
|
32
|
+
"path": "/poster"
|
|
33
|
+
},
|
|
34
|
+
"fit": "cover"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "content",
|
|
38
|
+
"component": "Column",
|
|
39
|
+
"children": ["title-row", "genre", "rating-row", "runtime", "watch-trailer-btn"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "title-row",
|
|
43
|
+
"component": "Row",
|
|
44
|
+
"children": ["movie-title", "year"],
|
|
45
|
+
"align": "start"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "movie-title",
|
|
49
|
+
"component": "Text",
|
|
50
|
+
"text": {
|
|
51
|
+
"path": "/title"
|
|
52
|
+
},
|
|
53
|
+
"variant": "h3"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "year",
|
|
57
|
+
"component": "Text",
|
|
58
|
+
"text": {
|
|
59
|
+
"path": "/year"
|
|
60
|
+
},
|
|
61
|
+
"variant": "caption"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "genre",
|
|
65
|
+
"component": "Text",
|
|
66
|
+
"text": {
|
|
67
|
+
"path": "/genre"
|
|
68
|
+
},
|
|
69
|
+
"variant": "caption"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "rating-row",
|
|
73
|
+
"component": "Row",
|
|
74
|
+
"children": ["star-icon", "rating-value"],
|
|
75
|
+
"align": "center"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "star-icon",
|
|
79
|
+
"component": "Icon",
|
|
80
|
+
"name": "star"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "rating-value",
|
|
84
|
+
"component": "Text",
|
|
85
|
+
"text": {
|
|
86
|
+
"path": "/rating"
|
|
87
|
+
},
|
|
88
|
+
"variant": "body"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "runtime",
|
|
92
|
+
"component": "Row",
|
|
93
|
+
"children": ["time-icon", "runtime-text"],
|
|
94
|
+
"align": "center"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "time-icon",
|
|
98
|
+
"component": "Icon",
|
|
99
|
+
"name": "calendarToday"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "runtime-text",
|
|
103
|
+
"component": "Text",
|
|
104
|
+
"text": {
|
|
105
|
+
"path": "/runtime"
|
|
106
|
+
},
|
|
107
|
+
"variant": "caption"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "watch-trailer-btn-text",
|
|
111
|
+
"component": "Text",
|
|
112
|
+
"text": "Watch Trailer"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "watch-trailer-btn",
|
|
116
|
+
"component": "Button",
|
|
117
|
+
"child": "watch-trailer-btn-text",
|
|
118
|
+
"action": {
|
|
119
|
+
"event": {
|
|
120
|
+
"name": "open_trailer"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "trailer-modal",
|
|
126
|
+
"component": "Modal",
|
|
127
|
+
"trigger": "watch-trailer-btn",
|
|
128
|
+
"content": "trailer-video"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "trailer-video",
|
|
132
|
+
"component": "Video",
|
|
133
|
+
"url": {
|
|
134
|
+
"path": "/trailerUrl"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"version": "v0.9",
|
|
142
|
+
"updateDataModel": {
|
|
143
|
+
"surfaceId": "gallery-movie-card",
|
|
144
|
+
"value": {
|
|
145
|
+
"poster": "https://images.unsplash.com/photo-1536440136628-849c177e76a1?w=200&h=300&fit=crop",
|
|
146
|
+
"title": "Interstellar",
|
|
147
|
+
"year": "(2014)",
|
|
148
|
+
"genre": "Sci-Fi • Adventure • Drama",
|
|
149
|
+
"rating": "8.7/10",
|
|
150
|
+
"runtime": "2h 49min",
|
|
151
|
+
"trailerUrl": "https://www.w3schools.com/html/mov_bbb.mp4"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|