hyperframes 0.1.1 → 0.1.2
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 +121 -0
- package/dist/cli.js +1050 -657
- package/dist/docs/compositions.md +8 -1
- package/dist/docs/data-attributes.md +4 -0
- package/dist/docs/gsap.md +3 -0
- package/dist/docs/rendering.md +4 -0
- package/dist/docs/templates.md +4 -0
- package/dist/docs/troubleshooting.md +7 -0
- package/dist/hyperframe-runtime.js +3 -3
- package/dist/studio/index.html +11 -11
- package/dist/templates/play-mode/compositions/captions.html +89 -29
- package/dist/templates/play-mode/compositions/intro.html +89 -71
- package/dist/templates/play-mode/compositions/stats.html +203 -73
- package/dist/templates/play-mode/index.html +204 -148
- package/dist/templates/swiss-grid/compositions/captions.html +63 -16
- package/dist/templates/swiss-grid/compositions/graphics.html +51 -43
- package/dist/templates/swiss-grid/compositions/intro.html +41 -25
- package/dist/templates/swiss-grid/index.html +216 -165
- package/dist/templates/vignelli/compositions/captions.html +80 -27
- package/dist/templates/vignelli/compositions/overlays.html +82 -31
- package/dist/templates/vignelli/index.html +171 -164
- package/dist/templates/warm-grain/compositions/captions.html +73 -65
- package/dist/templates/warm-grain/compositions/graphics.html +28 -22
- package/dist/templates/warm-grain/compositions/intro.html +28 -20
- package/dist/templates/warm-grain/index.html +265 -179
- package/package.json +15 -15
- package/LICENSE +0 -21
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
<style>
|
|
33
33
|
[data-composition-id="graphics"] {
|
|
34
|
-
font-family:
|
|
35
|
-
color: #
|
|
34
|
+
font-family: "Helvetica", Arial, sans-serif;
|
|
35
|
+
color: #0a1e3d;
|
|
36
36
|
background: transparent;
|
|
37
37
|
width: 1920px;
|
|
38
38
|
height: 1080px;
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
flex-direction: column;
|
|
57
57
|
justify-content: flex-start;
|
|
58
58
|
align-items: flex-start;
|
|
59
|
-
background: #
|
|
59
|
+
background: #f2f2f2;
|
|
60
60
|
padding: 40px;
|
|
61
|
-
border-left: 10px solid #
|
|
61
|
+
border-left: 10px solid #d4a017;
|
|
62
62
|
box-shadow: 20px 20px 0px rgba(10, 30, 61, 0.1);
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
[data-composition-id="graphics"] .stat-value {
|
|
82
82
|
font-size: 140px;
|
|
83
83
|
font-weight: 900;
|
|
84
|
-
color: #
|
|
84
|
+
color: #d4a017;
|
|
85
85
|
line-height: 0.8;
|
|
86
86
|
margin-bottom: 15px;
|
|
87
87
|
}
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
[data-composition-id="graphics"] .stat-label {
|
|
90
90
|
font-size: 24px;
|
|
91
91
|
font-weight: 300; /* Lighter weight */
|
|
92
|
-
color: #
|
|
92
|
+
color: #0a1e3d;
|
|
93
93
|
letter-spacing: 2px;
|
|
94
94
|
text-transform: uppercase;
|
|
95
95
|
}
|
|
@@ -98,16 +98,16 @@
|
|
|
98
98
|
[data-composition-id="graphics"] .progress-container {
|
|
99
99
|
width: 100%;
|
|
100
100
|
height: 24px;
|
|
101
|
-
background: #
|
|
101
|
+
background: #e0e0e0;
|
|
102
102
|
margin-top: 30px;
|
|
103
|
-
border: 2px solid #
|
|
103
|
+
border: 2px solid #0a1e3d;
|
|
104
104
|
position: relative;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
[data-composition-id="graphics"] .progress-bar {
|
|
108
108
|
width: 0%;
|
|
109
109
|
height: 100%;
|
|
110
|
-
background: #
|
|
110
|
+
background: #d4a017;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/* Grid Blocks for Stat 3 */
|
|
@@ -120,23 +120,23 @@
|
|
|
120
120
|
[data-composition-id="graphics"] .block {
|
|
121
121
|
width: 80px;
|
|
122
122
|
height: 80px;
|
|
123
|
-
border: 3px solid #
|
|
123
|
+
border: 3px solid #0a1e3d;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
[data-composition-id="graphics"] .block.gold {
|
|
127
|
-
background: #
|
|
127
|
+
background: #d4a017;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
[data-composition-id="graphics"] .block.navy {
|
|
131
|
-
background: #
|
|
131
|
+
background: #0a1e3d;
|
|
132
132
|
}
|
|
133
133
|
</style>
|
|
134
134
|
|
|
135
135
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
|
|
136
136
|
<script>
|
|
137
|
-
(function() {
|
|
137
|
+
(function () {
|
|
138
138
|
const tl = gsap.timeline({ paused: true });
|
|
139
|
-
|
|
139
|
+
|
|
140
140
|
// Timing Constants
|
|
141
141
|
const S1_START = 1.86;
|
|
142
142
|
const S1_END = 4.5;
|
|
@@ -144,55 +144,63 @@
|
|
|
144
144
|
const S2_END = 8.6;
|
|
145
145
|
const S3_START = 8.88;
|
|
146
146
|
const S3_END = 14.2;
|
|
147
|
-
|
|
147
|
+
|
|
148
148
|
const SLIDE_DUR = 0.25; // 250ms
|
|
149
149
|
const SHARP_EASE = "power2.out";
|
|
150
150
|
|
|
151
151
|
// Stat 1 Animation
|
|
152
|
-
tl.fromTo(
|
|
153
|
-
|
|
154
|
-
{ x:
|
|
155
|
-
|
|
152
|
+
tl.fromTo(
|
|
153
|
+
"#stat1",
|
|
154
|
+
{ x: -200, opacity: 0 },
|
|
155
|
+
{ x: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
|
|
156
|
+
S1_START,
|
|
156
157
|
);
|
|
157
|
-
tl.to(
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
tl.to(
|
|
159
|
+
"#stat1",
|
|
160
|
+
{ x: 200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
|
|
161
|
+
S1_END - SLIDE_DUR,
|
|
160
162
|
);
|
|
161
163
|
|
|
162
164
|
// Stat 2 Animation
|
|
163
|
-
tl.fromTo(
|
|
164
|
-
|
|
165
|
-
{ y:
|
|
166
|
-
|
|
165
|
+
tl.fromTo(
|
|
166
|
+
"#stat2",
|
|
167
|
+
{ y: 200, opacity: 0 },
|
|
168
|
+
{ y: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
|
|
169
|
+
S2_START,
|
|
167
170
|
);
|
|
168
171
|
// Progress bar fill
|
|
169
|
-
tl.to(
|
|
170
|
-
|
|
171
|
-
S2_START
|
|
172
|
+
tl.to(
|
|
173
|
+
"#stat2 .progress-bar",
|
|
174
|
+
{ width: "62%", duration: S2_END - S2_START - SLIDE_DUR * 2, ease: "none" },
|
|
175
|
+
S2_START + SLIDE_DUR,
|
|
172
176
|
);
|
|
173
|
-
tl.to(
|
|
174
|
-
|
|
175
|
-
|
|
177
|
+
tl.to(
|
|
178
|
+
"#stat2",
|
|
179
|
+
{ y: -200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
|
|
180
|
+
S2_END - SLIDE_DUR,
|
|
176
181
|
);
|
|
177
182
|
|
|
178
183
|
// Stat 3 Animation
|
|
179
|
-
tl.fromTo(
|
|
180
|
-
|
|
181
|
-
{ x:
|
|
182
|
-
|
|
184
|
+
tl.fromTo(
|
|
185
|
+
"#stat3",
|
|
186
|
+
{ x: 200, opacity: 0 },
|
|
187
|
+
{ x: 0, opacity: 1, duration: SLIDE_DUR, ease: SHARP_EASE },
|
|
188
|
+
S3_START,
|
|
183
189
|
);
|
|
184
190
|
// Stagger blocks
|
|
185
|
-
tl.from(
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
tl.from(
|
|
192
|
+
"#stat3 .block",
|
|
193
|
+
{ scale: 0, duration: 0.3, stagger: 0.1, ease: "back.out(1.7)" },
|
|
194
|
+
S3_START + SLIDE_DUR,
|
|
188
195
|
);
|
|
189
|
-
tl.to(
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
tl.to(
|
|
197
|
+
"#stat3",
|
|
198
|
+
{ x: -200, opacity: 0, duration: SLIDE_DUR, ease: "power2.in" },
|
|
199
|
+
S3_END - SLIDE_DUR,
|
|
192
200
|
);
|
|
193
201
|
|
|
194
202
|
window.__timelines["graphics"] = tl;
|
|
195
203
|
})();
|
|
196
204
|
</script>
|
|
197
205
|
</div>
|
|
198
|
-
</template>
|
|
206
|
+
</template>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<style>
|
|
12
12
|
[data-composition-id="intro"] {
|
|
13
|
-
background-color: #
|
|
13
|
+
background-color: #f5f5f5; /* Off-white */
|
|
14
14
|
width: 1920px;
|
|
15
15
|
height: 1080px;
|
|
16
16
|
display: flex;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
top: 50%;
|
|
37
37
|
width: 0px;
|
|
38
38
|
height: 12px;
|
|
39
|
-
background-color: #
|
|
39
|
+
background-color: #0a1e3d; /* Navy */
|
|
40
40
|
transform: translateY(-180px); /* Positioned above the text */
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
[data-composition-id="intro"] .title {
|
|
51
|
-
color: #
|
|
51
|
+
color: #0a1e3d;
|
|
52
52
|
font-size: 180px;
|
|
53
53
|
font-weight: 900; /* Black weight */
|
|
54
54
|
line-height: 0.9;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
[data-composition-id="intro"] .subtitle {
|
|
62
|
-
color: #
|
|
62
|
+
color: #0a1e3d;
|
|
63
63
|
font-size: 64px;
|
|
64
64
|
font-weight: 300; /* Lighter weight for contrast */
|
|
65
65
|
line-height: 1.2;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
</style>
|
|
73
73
|
|
|
74
74
|
<script>
|
|
75
|
-
(function() {
|
|
75
|
+
(function () {
|
|
76
76
|
const tl = gsap.timeline({ paused: true });
|
|
77
77
|
|
|
78
78
|
// Mechanical timing: 200ms (0.2s)
|
|
@@ -80,32 +80,48 @@
|
|
|
80
80
|
const STAGGER = 0.1;
|
|
81
81
|
|
|
82
82
|
// 1. Animate the grid line first
|
|
83
|
-
tl.to(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
tl.to(
|
|
84
|
+
".grid-line",
|
|
85
|
+
{
|
|
86
|
+
width: "1200px",
|
|
87
|
+
duration: 0.4,
|
|
88
|
+
ease: "power4.out",
|
|
89
|
+
},
|
|
90
|
+
0.2,
|
|
91
|
+
);
|
|
88
92
|
|
|
89
93
|
// 2. Slide in the title
|
|
90
|
-
tl.to(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
tl.to(
|
|
95
|
+
".title",
|
|
96
|
+
{
|
|
97
|
+
x: 0,
|
|
98
|
+
duration: MECHANICAL_DURATION,
|
|
99
|
+
ease: "power2.inOut",
|
|
100
|
+
},
|
|
101
|
+
0.5,
|
|
102
|
+
);
|
|
95
103
|
|
|
96
104
|
// 3. Slide in the subtitle with a slight stagger
|
|
97
|
-
tl.to(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
tl.to(
|
|
106
|
+
".subtitle",
|
|
107
|
+
{
|
|
108
|
+
x: 0,
|
|
109
|
+
duration: MECHANICAL_DURATION,
|
|
110
|
+
ease: "power2.inOut",
|
|
111
|
+
},
|
|
112
|
+
0.5 + STAGGER,
|
|
113
|
+
);
|
|
102
114
|
|
|
103
115
|
// 4. Subtle ambient motion (slow drift) to keep it alive
|
|
104
|
-
tl.to(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
116
|
+
tl.to(
|
|
117
|
+
".text-wrapper",
|
|
118
|
+
{
|
|
119
|
+
x: 30,
|
|
120
|
+
duration: 1.16, // Adjusted to fit 1.86s total
|
|
121
|
+
ease: "none",
|
|
122
|
+
},
|
|
123
|
+
0.7,
|
|
124
|
+
);
|
|
109
125
|
|
|
110
126
|
window.__timelines["intro"] = tl;
|
|
111
127
|
})();
|