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.
@@ -18,7 +18,7 @@
18
18
  }
19
19
 
20
20
  [data-composition-id="captions"] .caption-box {
21
- background-color: #7A6248;
21
+ background-color: #7a6248;
22
22
  padding: 12px 32px;
23
23
  border-radius: 24px;
24
24
  display: flex;
@@ -31,8 +31,8 @@
31
31
  }
32
32
 
33
33
  [data-composition-id="captions"] .caption-text {
34
- color: #F5F0E0;
35
- font-family: 'Outfit', sans-serif;
34
+ color: #f5f0e0;
35
+ font-family: "Outfit", sans-serif;
36
36
  font-size: 48px;
37
37
  font-weight: 700;
38
38
  text-align: center;
@@ -42,54 +42,54 @@
42
42
  </style>
43
43
 
44
44
  <script>
45
- (function() {
45
+ (function () {
46
46
  const script = [
47
- {"text": "We", "start": 0.119, "end": 0.259},
48
- {"text": "asked", "start": 0.319, "end": 0.479},
49
- {"text": "what", "start": 0.519, "end": 0.659},
50
- {"text": "you", "start": 0.699, "end": 0.819},
51
- {"text": "needed.", "start": 0.859, "end": 1.819},
52
- {"text": "Forty-seven", "start": 1.86, "end": 2.299},
53
- {"text": "percent", "start": 2.399, "end": 2.679},
54
- {"text": "of", "start": 2.7, "end": 2.799},
55
- {"text": "you", "start": 2.839, "end": 2.939},
56
- {"text": "said", "start": 3.039, "end": 3.179},
57
- {"text": "motion", "start": 3.24, "end": 3.559},
58
- {"text": "graphics,", "start": 3.579, "end": 4.599},
59
- {"text": "sixty-two", "start": 4.679, "end": 5.179},
60
- {"text": "percent", "start": 5.299, "end": 5.759},
61
- {"text": "said", "start": 5.859, "end": 5.98},
62
- {"text": "static", "start": 6.079, "end": 6.399},
63
- {"text": "content", "start": 6.46, "end": 6.879},
64
- {"text": "was", "start": 6.92, "end": 7.079},
65
- {"text": "costing", "start": 7.099, "end": 7.48},
66
- {"text": "you", "start": 7.5, "end": 7.579},
67
- {"text": "attention,", "start": 7.679, "end": 8.659},
68
- {"text": "and", "start": 8.699, "end": 8.86},
69
- {"text": "three", "start": 8.88, "end": 9.06},
70
- {"text": "out", "start": 9.079, "end": 9.18},
71
- {"text": "of", "start": 9.199, "end": 9.34},
72
- {"text": "four", "start": 9.38, "end": 9.799},
73
- {"text": "said", "start": 9.84, "end": 10.0},
74
- {"text": "you", "start": 10.019, "end": 10.159},
75
- {"text": "know", "start": 10.179, "end": 10.36},
76
- {"text": "the", "start": 10.38, "end": 10.42},
77
- {"text": "look", "start": 10.519, "end": 10.699},
78
- {"text": "you", "start": 10.739, "end": 10.859},
79
- {"text": "want", "start": 10.98, "end": 11.34},
80
- {"text": "but", "start": 11.359, "end": 11.52},
81
- {"text": "don't", "start": 11.56, "end": 11.779},
82
- {"text": "have", "start": 11.819, "end": 11.94},
83
- {"text": "the", "start": 11.96, "end": 12.06},
84
- {"text": "editing", "start": 12.079, "end": 12.4},
85
- {"text": "skills", "start": 12.52, "end": 12.86},
86
- {"text": "to", "start": 12.88, "end": 13.0},
87
- {"text": "get", "start": 13.019, "end": 13.18},
88
- {"text": "there.", "start": 13.22, "end": 14.22},
89
- {"text": "So", "start": 14.239, "end": 14.399},
90
- {"text": "we", "start": 14.42, "end": 14.52},
91
- {"text": "built", "start": 14.619, "end": 14.88},
92
- {"text": "Hyperframes.", "start": 15.079, "end": 16.02}
47
+ { text: "We", start: 0.119, end: 0.259 },
48
+ { text: "asked", start: 0.319, end: 0.479 },
49
+ { text: "what", start: 0.519, end: 0.659 },
50
+ { text: "you", start: 0.699, end: 0.819 },
51
+ { text: "needed.", start: 0.859, end: 1.819 },
52
+ { text: "Forty-seven", start: 1.86, end: 2.299 },
53
+ { text: "percent", start: 2.399, end: 2.679 },
54
+ { text: "of", start: 2.7, end: 2.799 },
55
+ { text: "you", start: 2.839, end: 2.939 },
56
+ { text: "said", start: 3.039, end: 3.179 },
57
+ { text: "motion", start: 3.24, end: 3.559 },
58
+ { text: "graphics,", start: 3.579, end: 4.599 },
59
+ { text: "sixty-two", start: 4.679, end: 5.179 },
60
+ { text: "percent", start: 5.299, end: 5.759 },
61
+ { text: "said", start: 5.859, end: 5.98 },
62
+ { text: "static", start: 6.079, end: 6.399 },
63
+ { text: "content", start: 6.46, end: 6.879 },
64
+ { text: "was", start: 6.92, end: 7.079 },
65
+ { text: "costing", start: 7.099, end: 7.48 },
66
+ { text: "you", start: 7.5, end: 7.579 },
67
+ { text: "attention,", start: 7.679, end: 8.659 },
68
+ { text: "and", start: 8.699, end: 8.86 },
69
+ { text: "three", start: 8.88, end: 9.06 },
70
+ { text: "out", start: 9.079, end: 9.18 },
71
+ { text: "of", start: 9.199, end: 9.34 },
72
+ { text: "four", start: 9.38, end: 9.799 },
73
+ { text: "said", start: 9.84, end: 10.0 },
74
+ { text: "you", start: 10.019, end: 10.159 },
75
+ { text: "know", start: 10.179, end: 10.36 },
76
+ { text: "the", start: 10.38, end: 10.42 },
77
+ { text: "look", start: 10.519, end: 10.699 },
78
+ { text: "you", start: 10.739, end: 10.859 },
79
+ { text: "want", start: 10.98, end: 11.34 },
80
+ { text: "but", start: 11.359, end: 11.52 },
81
+ { text: "don't", start: 11.56, end: 11.779 },
82
+ { text: "have", start: 11.819, end: 11.94 },
83
+ { text: "the", start: 11.96, end: 12.06 },
84
+ { text: "editing", start: 12.079, end: 12.4 },
85
+ { text: "skills", start: 12.52, end: 12.86 },
86
+ { text: "to", start: 12.88, end: 13.0 },
87
+ { text: "get", start: 13.019, end: 13.18 },
88
+ { text: "there.", start: 13.22, end: 14.22 },
89
+ { text: "So", start: 14.239, end: 14.399 },
90
+ { text: "we", start: 14.42, end: 14.52 },
91
+ { text: "built", start: 14.619, end: 14.88 },
92
+ { text: "Hyperframes.", start: 15.079, end: 16.02 },
93
93
  ];
94
94
 
95
95
  // Group words into lines (max 5 words per line)
@@ -97,9 +97,9 @@
97
97
  for (let i = 0; i < script.length; i += 5) {
98
98
  const lineWords = script.slice(i, i + 5);
99
99
  lines.push({
100
- text: lineWords.map(w => w.text).join(' '),
100
+ text: lineWords.map((w) => w.text).join(" "),
101
101
  start: lineWords[0].start,
102
- end: lineWords[lineWords.length - 1].end
102
+ end: lineWords[lineWords.length - 1].end,
103
103
  });
104
104
  }
105
105
 
@@ -109,21 +109,29 @@
109
109
 
110
110
  lines.forEach((line, index) => {
111
111
  // Fade in and set text
112
- tl.to(box, {
113
- opacity: 1,
114
- duration: 0.1,
115
- ease: "power2.out",
116
- onStart: () => {
117
- textEl.textContent = line.text;
118
- }
119
- }, line.start);
112
+ tl.to(
113
+ box,
114
+ {
115
+ opacity: 1,
116
+ duration: 0.1,
117
+ ease: "power2.out",
118
+ onStart: () => {
119
+ textEl.textContent = line.text;
120
+ },
121
+ },
122
+ line.start,
123
+ );
120
124
 
121
125
  // Fade out at the end of the line
122
- tl.to(box, {
123
- opacity: 0,
124
- duration: 0.1,
125
- ease: "power2.in"
126
- }, line.end);
126
+ tl.to(
127
+ box,
128
+ {
129
+ opacity: 0,
130
+ duration: 0.1,
131
+ ease: "power2.in",
132
+ },
133
+ line.end,
134
+ );
127
135
  });
128
136
 
129
137
  window.__timelines["captions"] = tl;
@@ -17,7 +17,10 @@
17
17
  <div id="moment-3" class="moment rect-stat">
18
18
  <div class="icon-shape">
19
19
  <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
20
- <path d="M20,20 Q50,0 80,20 Q100,50 80,80 Q50,100 20,80 Q0,50 20,20" fill="currentColor" />
20
+ <path
21
+ d="M20,20 Q50,0 80,20 Q100,50 80,80 Q50,100 20,80 Q0,50 20,20"
22
+ fill="currentColor"
23
+ />
21
24
  </svg>
22
25
  </div>
23
26
  <div class="stat-text">Editing Skills</div>
@@ -28,7 +31,7 @@
28
31
  position: relative;
29
32
  width: 1920px;
30
33
  height: 1080px;
31
- font-family: 'Outfit', sans-serif;
34
+ font-family: "Outfit", sans-serif;
32
35
  color: white;
33
36
  overflow: hidden;
34
37
  }
@@ -46,7 +49,7 @@
46
49
  [data-composition-id="graphics"] #moment-1 {
47
50
  width: 500px;
48
51
  height: 500px;
49
- background-color: #3B5E3A;
52
+ background-color: #3b5e3a;
50
53
  border-radius: 50%;
51
54
  left: 1400px;
52
55
  top: 540px;
@@ -72,7 +75,7 @@
72
75
  [data-composition-id="graphics"] #moment-2 {
73
76
  width: 500px;
74
77
  height: 220px;
75
- background-color: #CC8832;
78
+ background-color: #cc8832;
76
79
  border-radius: 110px;
77
80
  left: 960px;
78
81
  top: 200px;
@@ -83,7 +86,7 @@
83
86
  [data-composition-id="graphics"] #moment-3 {
84
87
  width: 550px;
85
88
  height: 180px;
86
- background-color: #C45D3E;
89
+ background-color: #c45d3e;
87
90
  border-radius: 40px;
88
91
  left: 400px;
89
92
  top: 540px;
@@ -117,41 +120,44 @@
117
120
  </style>
118
121
 
119
122
  <script>
120
- (function() {
123
+ (function () {
121
124
  const tl = gsap.timeline({ paused: true });
122
125
 
123
126
  // Moment 1: 1.8s - 4.5s
124
127
  // Gentle drift into place and settle
125
- tl.fromTo('#moment-1',
126
- { opacity: 0, x: '+=40', y: '+=15', scale: 0.8 },
127
- { opacity: 1, x: 0, y: 0, scale: 1, duration: 1.2, ease: 'back.out(1.7)' },
128
- 1.8
128
+ tl.fromTo(
129
+ "#moment-1",
130
+ { opacity: 0, x: "+=40", y: "+=15", scale: 0.8 },
131
+ { opacity: 1, x: 0, y: 0, scale: 1, duration: 1.2, ease: "back.out(1.7)" },
132
+ 1.8,
129
133
  );
130
134
  // Hold until 4.5s, then fade out
131
- tl.to('#moment-1', { opacity: 0, scale: 0.8, duration: 0.3, ease: 'power2.in' }, 4.2);
135
+ tl.to("#moment-1", { opacity: 0, scale: 0.8, duration: 0.3, ease: "power2.in" }, 4.2);
132
136
 
133
137
  // Moment 2: 4.6s - 8.6s
134
138
  // Gentle drift into place and settle
135
- tl.fromTo('#moment-2',
136
- { opacity: 0, y: '-=40', x: '+=10', scale: 0.8 },
137
- { opacity: 1, y: 0, x: 0, scale: 1, duration: 1.2, ease: 'back.out(1.7)' },
138
- 4.6
139
+ tl.fromTo(
140
+ "#moment-2",
141
+ { opacity: 0, y: "-=40", x: "+=10", scale: 0.8 },
142
+ { opacity: 1, y: 0, x: 0, scale: 1, duration: 1.2, ease: "back.out(1.7)" },
143
+ 4.6,
139
144
  );
140
145
  // Hold until 8.6s, then fade out
141
- tl.to('#moment-2', { opacity: 0, scale: 0.8, duration: 0.3, ease: 'power2.in' }, 8.3);
146
+ tl.to("#moment-2", { opacity: 0, scale: 0.8, duration: 0.3, ease: "power2.in" }, 8.3);
142
147
 
143
148
  // Moment 3: 8.8s - 14s
144
149
  // Gentle drift into place and settle
145
- tl.fromTo('#moment-3',
146
- { opacity: 0, x: '-=40', y: '-=10', scale: 0.8 },
147
- { opacity: 1, x: 0, y: 0, scale: 1, duration: 1.2, ease: 'back.out(1.7)' },
148
- 8.8
150
+ tl.fromTo(
151
+ "#moment-3",
152
+ { opacity: 0, x: "-=40", y: "-=10", scale: 0.8 },
153
+ { opacity: 1, x: 0, y: 0, scale: 1, duration: 1.2, ease: "back.out(1.7)" },
154
+ 8.8,
149
155
  );
150
156
  // Hold until end (14s)
151
- tl.to('#moment-3', { opacity: 0, duration: 0.5, ease: 'power2.in' }, 13.5);
157
+ tl.to("#moment-3", { opacity: 0, duration: 0.5, ease: "power2.in" }, 13.5);
152
158
 
153
159
  window.__timelines["graphics"] = tl;
154
160
  })();
155
161
  </script>
156
162
  </div>
157
- </template>
163
+ </template>
@@ -9,7 +9,7 @@
9
9
 
10
10
  <style>
11
11
  /* Import a rounded humanist sans-serif font */
12
- @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600&display=swap');
12
+ @import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;600&display=swap");
13
13
 
14
14
  [data-composition-id="intro"] .container {
15
15
  width: 100%;
@@ -18,15 +18,15 @@
18
18
  justify-content: flex-start; /* Align to left for speaker card */
19
19
  align-items: center;
20
20
  padding-left: 5%;
21
- font-family: 'Outfit', sans-serif;
21
+ font-family: "Outfit", sans-serif;
22
22
  background: transparent;
23
23
  }
24
24
 
25
25
  [data-composition-id="intro"] .title-card {
26
- background-color: #3B5E3A; /* Forest Green for contrast */
26
+ background-color: #3b5e3a; /* Forest Green for contrast */
27
27
  padding: 40px 60px;
28
28
  border-radius: 30px;
29
- box-shadow: 0 15px 40px rgba(0,0,0,0.2);
29
+ box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
30
30
  text-align: left;
31
31
  opacity: 0;
32
32
  transform: translateX(-100%); /* Start off-screen left */
@@ -35,7 +35,7 @@
35
35
  [data-composition-id="intro"] .title {
36
36
  font-size: 100px;
37
37
  font-weight: 600;
38
- color: #F5F0E0; /* Cream text on green card */
38
+ color: #f5f0e0; /* Cream text on green card */
39
39
  margin: 0;
40
40
  line-height: 1.1;
41
41
  letter-spacing: -2px;
@@ -44,31 +44,39 @@
44
44
  [data-composition-id="intro"] .subtitle {
45
45
  font-size: 50px;
46
46
  font-weight: 400;
47
- color: #CC8832; /* Ochre accent */
47
+ color: #cc8832; /* Ochre accent */
48
48
  margin: 10px 0 0 0;
49
49
  line-height: 1.2;
50
50
  }
51
51
  </style>
52
52
 
53
53
  <script>
54
- (function() {
54
+ (function () {
55
55
  const tl = gsap.timeline({ paused: true });
56
-
56
+
57
57
  // Animation: Speaker card slides in from the left
58
- tl.to('[data-composition-id="intro"] .title-card', {
59
- opacity: 1,
60
- x: 0,
61
- duration: 0.8,
62
- ease: 'power2.out'
63
- }, 0.2);
58
+ tl.to(
59
+ '[data-composition-id="intro"] .title-card',
60
+ {
61
+ opacity: 1,
62
+ x: 0,
63
+ duration: 0.8,
64
+ ease: "power2.out",
65
+ },
66
+ 0.2,
67
+ );
64
68
 
65
69
  // Exit: Slide off left at 1.8s (synced with 47% graphic)
66
- tl.to('[data-composition-id="intro"] .title-card', {
67
- x: '-120%',
68
- opacity: 0,
69
- duration: 0.6,
70
- ease: 'power2.in'
71
- }, 1.8);
70
+ tl.to(
71
+ '[data-composition-id="intro"] .title-card',
72
+ {
73
+ x: "-120%",
74
+ opacity: 0,
75
+ duration: 0.6,
76
+ ease: "power2.in",
77
+ },
78
+ 1.8,
79
+ );
72
80
 
73
81
  window.__timelines["intro"] = tl;
74
82
  })();