hyperframes 0.1.0 → 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.
@@ -1,195 +1,281 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Warm Grain - Hyperframes</title>
7
7
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
8
8
  <style>
9
- body, html {
10
- margin: 0;
11
- padding: 0;
12
- width: 1920px;
13
- height: 1080px;
14
- overflow: hidden;
15
- background-color: #F5F0E0; /* Cream background */
16
- font-family: 'Outfit', 'Lexend', sans-serif;
17
- }
9
+ body,
10
+ html {
11
+ margin: 0;
12
+ padding: 0;
13
+ width: 1920px;
14
+ height: 1080px;
15
+ overflow: hidden;
16
+ background-color: #f5f0e0; /* Cream background */
17
+ font-family: "Outfit", "Lexend", sans-serif;
18
+ }
18
19
 
19
- #main-composition {
20
- position: relative;
21
- width: 1920px;
22
- height: 1080px;
23
- overflow: hidden;
24
- }
20
+ #main-composition {
21
+ position: relative;
22
+ width: 1920px;
23
+ height: 1080px;
24
+ overflow: hidden;
25
+ }
25
26
 
26
- /* Paper texture and Grain overlay */
27
- #grain-overlay-comp {
28
- position: absolute;
29
- top: 0;
30
- left: 0;
31
- width: 100%;
32
- height: 100%;
33
- pointer-events: none;
34
- z-index: 100;
35
- }
27
+ /* Paper texture and Grain overlay */
28
+ #grain-overlay-comp {
29
+ position: absolute;
30
+ top: 0;
31
+ left: 0;
32
+ width: 100%;
33
+ height: 100%;
34
+ pointer-events: none;
35
+ z-index: 100;
36
+ }
36
37
 
37
- /* Grain animation */
38
- @keyframes grain-noise {
39
- 0%, 100% { transform: translate(0, 0); }
40
- 10% { transform: translate(-5%, -5%); }
41
- 20% { transform: translate(-10%, 5%); }
42
- 30% { transform: translate(5%, -10%); }
43
- 40% { transform: translate(-5%, 15%); }
44
- 50% { transform: translate(-10%, 5%); }
45
- 60% { transform: translate(15%, 0); }
46
- 70% { transform: translate(0, 10%); }
47
- 80% { transform: translate(-15%, 0); }
48
- 90% { transform: translate(10%, 5%); }
38
+ /* Grain animation */
39
+ @keyframes grain-noise {
40
+ 0%,
41
+ 100% {
42
+ transform: translate(0, 0);
49
43
  }
50
-
51
- .grain-texture {
52
- position: absolute;
53
- top: -50%;
54
- left: -50%;
55
- width: 200%;
56
- height: 200%;
57
- background: url('https://www.transparenttextures.com/patterns/natural-paper.png');
58
- opacity: 0.15;
59
- animation: grain-noise 0.5s steps(1) infinite;
44
+ 10% {
45
+ transform: translate(-5%, -5%);
60
46
  }
61
-
62
- #a-roll {
63
- position: absolute;
64
- border-radius: 16px;
65
- object-fit: cover;
66
- box-shadow: 0 10px 30px rgba(0,0,0,0.1);
47
+ 20% {
48
+ transform: translate(-10%, 5%);
67
49
  }
68
-
69
- .comp-layer {
70
- position: absolute;
71
- top: 0;
72
- left: 0;
73
- width: 100%;
74
- height: 100%;
75
- pointer-events: none;
50
+ 30% {
51
+ transform: translate(5%, -10%);
76
52
  }
77
- </style>
78
- </head>
79
- <body>
80
- <div id="main-composition" data-composition-id="main-video" data-width="1920" data-height="1080" data-duration="17">
81
-
82
- <!-- Background Layer -->
83
- <div id="grain-overlay-comp" data-composition-id="grain-overlay" data-width="1920" data-height="1080" data-duration="17" data-track-index="100">
84
- <div class="grain-texture"></div>
85
- <script>
86
- const grainTl = gsap.timeline({ paused: true });
87
- window.__timelines["grain-overlay"] = grainTl;
88
- </script>
89
- </div>
90
-
91
- <!-- A-Roll Video -->
92
- <video id="a-roll"
93
- src="__VIDEO_SRC__"
94
- data-start="0"
95
- data-duration="17"
96
- data-track-index="0">
97
- </video>
98
-
99
- <!-- Compositions -->
100
- <div id="intro-layer" class="comp-layer"
101
- data-composition-id="intro"
102
- data-composition-src="compositions/intro.html"
103
- data-start="0"
104
- data-duration="2.5"
105
- data-track-index="1">
106
- </div>
107
-
108
- <div id="graphics-layer" class="comp-layer"
109
- data-composition-id="graphics"
110
- data-composition-src="compositions/graphics.html"
111
- data-start="0"
112
- data-duration="17"
113
- data-track-index="2">
114
- </div>
115
-
116
- <div id="captions-layer" class="comp-layer"
117
- data-composition-id="captions"
118
- data-composition-src="compositions/captions.html"
119
- data-start="0"
120
- data-duration="17"
121
- data-track-index="3">
122
- </div>
123
-
124
- <!-- SFX -->
125
- <audio id="sfx-swipe-1" src="" data-start="1.8" data-duration="1" data-track-index="4"></audio>
126
- <audio id="sfx-swipe-2" src="" data-start="4.6" data-duration="1" data-track-index="4"></audio>
127
- <audio id="sfx-swipe-3" src="" data-start="8.8" data-duration="1" data-track-index="4"></audio>
53
+ 40% {
54
+ transform: translate(-5%, 15%);
55
+ }
56
+ 50% {
57
+ transform: translate(-10%, 5%);
58
+ }
59
+ 60% {
60
+ transform: translate(15%, 0);
61
+ }
62
+ 70% {
63
+ transform: translate(0, 10%);
64
+ }
65
+ 80% {
66
+ transform: translate(-15%, 0);
67
+ }
68
+ 90% {
69
+ transform: translate(10%, 5%);
70
+ }
71
+ }
72
+
73
+ .grain-texture {
74
+ position: absolute;
75
+ top: -50%;
76
+ left: -50%;
77
+ width: 200%;
78
+ height: 200%;
79
+ background: url("https://www.transparenttextures.com/patterns/natural-paper.png");
80
+ opacity: 0.15;
81
+ animation: grain-noise 0.5s steps(1) infinite;
82
+ }
83
+
84
+ #a-roll {
85
+ position: absolute;
86
+ border-radius: 16px;
87
+ object-fit: cover;
88
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
89
+ }
128
90
 
91
+ .comp-layer {
92
+ position: absolute;
93
+ top: 0;
94
+ left: 0;
95
+ width: 100%;
96
+ height: 100%;
97
+ pointer-events: none;
98
+ }
99
+ </style>
100
+ </head>
101
+ <body>
102
+ <div
103
+ id="main-composition"
104
+ data-composition-id="main-video"
105
+ data-width="1920"
106
+ data-height="1080"
107
+ data-duration="17"
108
+ >
109
+ <!-- Background Layer -->
110
+ <div
111
+ id="grain-overlay-comp"
112
+ data-composition-id="grain-overlay"
113
+ data-width="1920"
114
+ data-height="1080"
115
+ data-duration="17"
116
+ data-track-index="100"
117
+ >
118
+ <div class="grain-texture"></div>
129
119
  <script>
130
- const tl = gsap.timeline({ paused: true });
131
-
132
- // A-Roll Framing Strategy
133
- // 1. 0s-1.8s: Intro scale up from small (60%) to medium (80%) - Shifted right slightly to clear speaker card
134
- // 2. 1.8s-4.6s: Grid view / Shift Left (x: 600, scale: 70%) for 47% graphic
135
- // 3. 4.6s-8.8s: Shift Center-Bottom (y: 800, scale: 70%) for 62% graphic (top)
136
- // 4. 8.8s-14s: Shift Right (x: 1320, scale: 75%) for Editing Skills graphic (left)
137
- // 5. 14s-17s: Final Reveal (Center, scale: 100%)
138
-
139
- // Initial state
140
- gsap.set('#a-roll', { x: 1100, y: 540, xPercent: -50, yPercent: -50, width: 1920 * 0.6, height: 1080 * 0.6 });
141
-
142
- // 1. Intro Scale Up (0s - 1.8s)
143
- tl.to('#a-roll', {
144
- x: 1200,
145
- width: 1920 * 0.8,
146
- height: 1080 * 0.8,
147
- duration: 1.8,
148
- ease: "power2.inOut"
149
- }, 0);
150
-
151
- // 2. Moment 1: 47% Graphic Trigger (1.8s) - Shift Left
152
- tl.to('#a-roll', {
153
- x: 600,
154
- y: 540,
155
- width: 1920 * 0.7,
156
- height: 1080 * 0.7,
157
- duration: 0.5,
158
- ease: "power2.inOut"
159
- }, 1.8);
160
-
161
- // 3. Moment 2: 62% Graphic Trigger (4.6s) - Shift Center-Bottom
162
- tl.to('#a-roll', {
163
- x: 960,
164
- y: 750,
165
- width: 1920 * 0.7,
166
- height: 1080 * 0.7,
167
- duration: 0.5,
168
- ease: "power2.inOut"
169
- }, 4.6);
170
-
171
- // 4. Moment 3: Editing Skills Trigger (8.8s) - Shift Right
172
- tl.to('#a-roll', {
173
- x: 1320,
174
- y: 540,
175
- width: 1920 * 0.75,
176
- height: 1080 * 0.75,
177
- duration: 0.5,
178
- ease: "power2.inOut"
179
- }, 8.8);
180
-
181
- // 5. Final Reveal (14s - 17s)
182
- tl.to('#a-roll', {
183
- x: 960,
184
- y: 540,
185
- width: 1920 * 1.0,
186
- height: 1080 * 1.0,
187
- duration: 1.0,
188
- ease: "power2.inOut"
189
- }, 14);
190
-
191
- window.__timelines["main-video"] = tl;
120
+ const grainTl = gsap.timeline({ paused: true });
121
+ window.__timelines["grain-overlay"] = grainTl;
192
122
  </script>
123
+ </div>
124
+
125
+ <!-- A-Roll Video -->
126
+ <video
127
+ id="a-roll"
128
+ src="__VIDEO_SRC__"
129
+ data-start="0"
130
+ data-duration="17"
131
+ data-track-index="0"
132
+ ></video>
133
+
134
+ <!-- Compositions -->
135
+ <div
136
+ id="intro-layer"
137
+ class="comp-layer"
138
+ data-composition-id="intro"
139
+ data-composition-src="compositions/intro.html"
140
+ data-start="0"
141
+ data-duration="2.5"
142
+ data-track-index="1"
143
+ ></div>
144
+
145
+ <div
146
+ id="graphics-layer"
147
+ class="comp-layer"
148
+ data-composition-id="graphics"
149
+ data-composition-src="compositions/graphics.html"
150
+ data-start="0"
151
+ data-duration="17"
152
+ data-track-index="2"
153
+ ></div>
154
+
155
+ <div
156
+ id="captions-layer"
157
+ class="comp-layer"
158
+ data-composition-id="captions"
159
+ data-composition-src="compositions/captions.html"
160
+ data-start="0"
161
+ data-duration="17"
162
+ data-track-index="3"
163
+ ></div>
164
+
165
+ <!-- SFX -->
166
+ <audio
167
+ id="sfx-swipe-1"
168
+ src=""
169
+ data-start="1.8"
170
+ data-duration="1"
171
+ data-track-index="4"
172
+ ></audio>
173
+ <audio
174
+ id="sfx-swipe-2"
175
+ src=""
176
+ data-start="4.6"
177
+ data-duration="1"
178
+ data-track-index="4"
179
+ ></audio>
180
+ <audio
181
+ id="sfx-swipe-3"
182
+ src=""
183
+ data-start="8.8"
184
+ data-duration="1"
185
+ data-track-index="4"
186
+ ></audio>
187
+
188
+ <script>
189
+ const tl = gsap.timeline({ paused: true });
190
+
191
+ // A-Roll Framing Strategy
192
+ // 1. 0s-1.8s: Intro scale up from small (60%) to medium (80%) - Shifted right slightly to clear speaker card
193
+ // 2. 1.8s-4.6s: Grid view / Shift Left (x: 600, scale: 70%) for 47% graphic
194
+ // 3. 4.6s-8.8s: Shift Center-Bottom (y: 800, scale: 70%) for 62% graphic (top)
195
+ // 4. 8.8s-14s: Shift Right (x: 1320, scale: 75%) for Editing Skills graphic (left)
196
+ // 5. 14s-17s: Final Reveal (Center, scale: 100%)
197
+
198
+ // Initial state
199
+ gsap.set("#a-roll", {
200
+ x: 1100,
201
+ y: 540,
202
+ xPercent: -50,
203
+ yPercent: -50,
204
+ width: 1920 * 0.6,
205
+ height: 1080 * 0.6,
206
+ });
207
+
208
+ // 1. Intro Scale Up (0s - 1.8s)
209
+ tl.to(
210
+ "#a-roll",
211
+ {
212
+ x: 1200,
213
+ width: 1920 * 0.8,
214
+ height: 1080 * 0.8,
215
+ duration: 1.8,
216
+ ease: "power2.inOut",
217
+ },
218
+ 0,
219
+ );
220
+
221
+ // 2. Moment 1: 47% Graphic Trigger (1.8s) - Shift Left
222
+ tl.to(
223
+ "#a-roll",
224
+ {
225
+ x: 600,
226
+ y: 540,
227
+ width: 1920 * 0.7,
228
+ height: 1080 * 0.7,
229
+ duration: 0.5,
230
+ ease: "power2.inOut",
231
+ },
232
+ 1.8,
233
+ );
234
+
235
+ // 3. Moment 2: 62% Graphic Trigger (4.6s) - Shift Center-Bottom
236
+ tl.to(
237
+ "#a-roll",
238
+ {
239
+ x: 960,
240
+ y: 750,
241
+ width: 1920 * 0.7,
242
+ height: 1080 * 0.7,
243
+ duration: 0.5,
244
+ ease: "power2.inOut",
245
+ },
246
+ 4.6,
247
+ );
248
+
249
+ // 4. Moment 3: Editing Skills Trigger (8.8s) - Shift Right
250
+ tl.to(
251
+ "#a-roll",
252
+ {
253
+ x: 1320,
254
+ y: 540,
255
+ width: 1920 * 0.75,
256
+ height: 1080 * 0.75,
257
+ duration: 0.5,
258
+ ease: "power2.inOut",
259
+ },
260
+ 8.8,
261
+ );
262
+
263
+ // 5. Final Reveal (14s - 17s)
264
+ tl.to(
265
+ "#a-roll",
266
+ {
267
+ x: 960,
268
+ y: 540,
269
+ width: 1920 * 1.0,
270
+ height: 1080 * 1.0,
271
+ duration: 1.0,
272
+ ease: "power2.inOut",
273
+ },
274
+ 14,
275
+ );
276
+
277
+ window.__timelines["main-video"] = tl;
278
+ </script>
193
279
  </div>
194
- </body>
280
+ </body>
195
281
  </html>
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "hyperframes",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "HyperFrames CLI — create, preview, and render HTML video compositions",
5
- "type": "module",
6
5
  "bin": {
7
6
  "hyperframes": "./dist/cli.js"
8
7
  },
9
8
  "files": [
10
9
  "dist"
11
10
  ],
11
+ "type": "module",
12
12
  "scripts": {
13
13
  "dev": "tsx src/cli.ts",
14
- "build": "pnpm build:studio && tsup && pnpm build:runtime && pnpm build:copy",
15
- "build:studio": "cd ../studio && pnpm build",
14
+ "build": "bun run build:studio && tsup && bun run build:runtime && bun run build:copy",
15
+ "build:studio": "cd ../studio && bun run build",
16
16
  "build:runtime": "tsx scripts/build-runtime.ts",
17
17
  "build:copy": "mkdir -p dist/studio dist/docs dist/templates && cp -r ../studio/dist/* dist/studio/ && cp -r src/templates/warm-grain src/templates/play-mode src/templates/swiss-grid src/templates/vignelli dist/templates/ && (cp src/docs/*.md dist/docs/ 2>/dev/null || true)",
18
18
  "typecheck": "tsc --noEmit"
@@ -30,9 +30,9 @@
30
30
  "puppeteer-core": "^24.39.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@hyperframes/core": "workspace:*",
34
33
  "@clack/prompts": "^1.1.0",
35
34
  "@hono/node-server": "^1.0.0",
35
+ "@hyperframes/core": "workspace:*",
36
36
  "@hyperframes/engine": "workspace:*",
37
37
  "@hyperframes/producer": "workspace:*",
38
38
  "@types/adm-zip": "^0.5.7",