hyperframes 0.1.13 → 0.1.15
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 +5 -1
- package/dist/cli.js +940 -380
- package/dist/hyperframe-runtime.js +8 -4
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +8 -4
- package/dist/skills/hyperframes-captions/SKILL.md +195 -29
- package/dist/skills/hyperframes-compose/SKILL.md +1 -0
- package/dist/skills/hyperframes-compose/house-style.md +2 -2
- package/dist/studio/assets/index-CLmYRLY-.css +1 -0
- package/dist/studio/assets/index-CRvFpc0E.js +84 -0
- package/dist/studio/index.html +2 -2
- package/dist/templates/_shared/CLAUDE.md +14 -2
- package/dist/templates/blank/compositions/captions.html +3 -0
- package/dist/templates/blank/index.html +1 -1
- package/dist/templates/decision-tree/compositions/decision_tree.html +420 -0
- package/dist/templates/decision-tree/index.html +56 -0
- package/dist/templates/generators.ts +32 -0
- package/dist/templates/kinetic-type/compositions/main-graphics.html +588 -0
- package/dist/templates/kinetic-type/index.html +61 -0
- package/dist/templates/nyt-graph/compositions/nyt-chart.html +450 -0
- package/dist/templates/nyt-graph/index.html +51 -0
- package/dist/templates/product-promo/assets/figma-cursors.svg +30 -0
- package/dist/templates/product-promo/assets/figma-logo-pieces.svg +15 -0
- package/dist/templates/product-promo/assets/figma-logo-pills.svg +6 -0
- package/dist/templates/product-promo/compositions/scene1-logo-intro.html +189 -0
- package/dist/templates/product-promo/compositions/scene2-4-canvas.html +570 -0
- package/dist/templates/product-promo/compositions/scene5-logo-outro.html +226 -0
- package/dist/templates/product-promo/index.html +158 -0
- package/package.json +2 -2
- package/dist/studio/assets/index-2uBPlHR_.css +0 -1
- package/dist/studio/assets/index-uQ8cgxb3.js +0 -92
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<template id="scene1-logo-intro-template">
|
|
2
|
+
<div
|
|
3
|
+
data-composition-id="scene1-logo-intro"
|
|
4
|
+
data-width="1920"
|
|
5
|
+
data-height="1080"
|
|
6
|
+
data-duration="1.5"
|
|
7
|
+
>
|
|
8
|
+
<div class="canvas">
|
|
9
|
+
<!-- Logo Container -->
|
|
10
|
+
<div class="logo-container">
|
|
11
|
+
<svg viewBox="0 0 160 240" width="160" height="240">
|
|
12
|
+
<!-- Figma Logo Pieces -->
|
|
13
|
+
<!-- Top-left: Red (F24E1E) -->
|
|
14
|
+
<path
|
|
15
|
+
class="logo-piece logo-tl"
|
|
16
|
+
d="M 0 40 C 0 17.9 17.9 0 40 0 L 80 0 L 80 80 L 40 80 C 17.9 80 0 62.1 0 40 Z"
|
|
17
|
+
fill="#F24E1E"
|
|
18
|
+
/>
|
|
19
|
+
<!-- Top-right: Purple (A259FF) -->
|
|
20
|
+
<path
|
|
21
|
+
class="logo-piece logo-tr"
|
|
22
|
+
d="M 80 0 L 120 0 C 142.1 0 160 17.9 160 40 C 160 62.1 142.1 80 120 80 L 80 80 L 80 0 Z"
|
|
23
|
+
fill="#A259FF"
|
|
24
|
+
/>
|
|
25
|
+
<!-- Middle-left: Pink (FF7262) -->
|
|
26
|
+
<path
|
|
27
|
+
class="logo-piece logo-ml"
|
|
28
|
+
d="M 0 120 C 0 97.9 17.9 80 40 80 L 80 80 L 80 160 L 40 160 C 17.9 160 0 142.1 0 120 Z"
|
|
29
|
+
fill="#FF7262"
|
|
30
|
+
/>
|
|
31
|
+
<!-- Middle-right: Blue (1ABCFE) -->
|
|
32
|
+
<circle class="logo-piece logo-mr" cx="120" cy="120" r="40" fill="#1ABCFE" />
|
|
33
|
+
<!-- Bottom-left: Green (0ACF83) -->
|
|
34
|
+
<path
|
|
35
|
+
class="logo-piece logo-bl"
|
|
36
|
+
d="M 0 200 C 0 177.9 17.9 160 40 160 L 80 160 L 80 200 C 80 222.1 62.1 240 40 240 C 17.9 240 0 222.1 0 200 Z"
|
|
37
|
+
fill="#0ACF83"
|
|
38
|
+
/>
|
|
39
|
+
</svg>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<!-- Expanding Ring -->
|
|
43
|
+
<div class="ring-container">
|
|
44
|
+
<svg viewBox="0 0 400 400" width="400" height="400">
|
|
45
|
+
<circle
|
|
46
|
+
class="ring"
|
|
47
|
+
cx="200"
|
|
48
|
+
cy="200"
|
|
49
|
+
r="80"
|
|
50
|
+
fill="none"
|
|
51
|
+
stroke="#FFFFFF"
|
|
52
|
+
stroke-width="4"
|
|
53
|
+
/>
|
|
54
|
+
</svg>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<style>
|
|
59
|
+
[data-composition-id="scene1-logo-intro"] .canvas {
|
|
60
|
+
width: 1920px;
|
|
61
|
+
height: 1080px;
|
|
62
|
+
background-color: #0a0a0f;
|
|
63
|
+
position: relative;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[data-composition-id="scene1-logo-intro"] .logo-container {
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 880px; /* Center X: 960 - 80 */
|
|
70
|
+
top: 420px; /* Center Y: 540 - 120 */
|
|
71
|
+
width: 160px;
|
|
72
|
+
height: 240px;
|
|
73
|
+
transform-origin: center center;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-composition-id="scene1-logo-intro"] .ring-container {
|
|
77
|
+
position: absolute;
|
|
78
|
+
left: 760px; /* 960 - 200 */
|
|
79
|
+
top: 340px; /* 540 - 200 */
|
|
80
|
+
width: 400px;
|
|
81
|
+
height: 400px;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-composition-id="scene1-logo-intro"] .ring {
|
|
86
|
+
transform-origin: center center;
|
|
87
|
+
opacity: 0;
|
|
88
|
+
}
|
|
89
|
+
</style>
|
|
90
|
+
|
|
91
|
+
<script>
|
|
92
|
+
(function () {
|
|
93
|
+
const tl = gsap.timeline({ paused: true });
|
|
94
|
+
|
|
95
|
+
const pieces = {
|
|
96
|
+
tl: '[data-composition-id="scene1-logo-intro"] .logo-tl',
|
|
97
|
+
tr: '[data-composition-id="scene1-logo-intro"] .logo-tr',
|
|
98
|
+
ml: '[data-composition-id="scene1-logo-intro"] .logo-ml',
|
|
99
|
+
mr: '[data-composition-id="scene1-logo-intro"] .logo-mr',
|
|
100
|
+
bl: '[data-composition-id="scene1-logo-intro"] .logo-bl',
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const ring = '[data-composition-id="scene1-logo-intro"] .ring';
|
|
104
|
+
const logoContainer = '[data-composition-id="scene1-logo-intro"] .logo-container';
|
|
105
|
+
|
|
106
|
+
// Initial positions: Corners of the screen
|
|
107
|
+
// Viewport is 1920x1080. Center is 960, 540.
|
|
108
|
+
// logo-container is at 880, 420.
|
|
109
|
+
|
|
110
|
+
tl.set(pieces.tl, { x: -960, y: -540 });
|
|
111
|
+
tl.set(pieces.tr, { x: 960, y: -540 });
|
|
112
|
+
tl.set(pieces.ml, { x: -960, y: 0 });
|
|
113
|
+
tl.set(pieces.mr, { x: 960, y: 0 });
|
|
114
|
+
tl.set(pieces.bl, { x: -960, y: 540 });
|
|
115
|
+
|
|
116
|
+
// 1. Converge to center with 3-frame stagger (approx 0.05s at 60fps)
|
|
117
|
+
// 2. Collide with slight bounce (overshoot 1.1x)
|
|
118
|
+
const convergeDuration = 0.6;
|
|
119
|
+
const stagger = 0.05;
|
|
120
|
+
|
|
121
|
+
const pieceArray = [pieces.tl, pieces.tr, pieces.ml, pieces.mr, pieces.bl];
|
|
122
|
+
|
|
123
|
+
pieceArray.forEach((piece, i) => {
|
|
124
|
+
tl.to(
|
|
125
|
+
piece,
|
|
126
|
+
{
|
|
127
|
+
x: 0,
|
|
128
|
+
y: 0,
|
|
129
|
+
duration: convergeDuration,
|
|
130
|
+
ease: "back.out(1.1)",
|
|
131
|
+
},
|
|
132
|
+
i * stagger,
|
|
133
|
+
);
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// 3. On collision (approx at 0.6 + 4*0.05 = 0.8s), white ring expands
|
|
137
|
+
const collisionTime = convergeDuration + (pieceArray.length - 1) * stagger;
|
|
138
|
+
|
|
139
|
+
tl.fromTo(
|
|
140
|
+
ring,
|
|
141
|
+
{ scale: 0.2, opacity: 1 },
|
|
142
|
+
{
|
|
143
|
+
scale: 2.5,
|
|
144
|
+
opacity: 0,
|
|
145
|
+
duration: 0.4,
|
|
146
|
+
ease: "power2.out",
|
|
147
|
+
},
|
|
148
|
+
collisionTime,
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
// 4. Logo pulses slightly
|
|
152
|
+
tl.to(
|
|
153
|
+
logoContainer,
|
|
154
|
+
{
|
|
155
|
+
scale: 1.05,
|
|
156
|
+
duration: 0.15,
|
|
157
|
+
ease: "power2.out",
|
|
158
|
+
},
|
|
159
|
+
collisionTime,
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
tl.to(
|
|
163
|
+
logoContainer,
|
|
164
|
+
{
|
|
165
|
+
scale: 1,
|
|
166
|
+
duration: 0.15,
|
|
167
|
+
ease: "power2.in",
|
|
168
|
+
},
|
|
169
|
+
collisionTime + 0.15,
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
// 5. Scale down to 0
|
|
173
|
+
tl.to(
|
|
174
|
+
logoContainer,
|
|
175
|
+
{
|
|
176
|
+
scale: 0,
|
|
177
|
+
duration: 0.3,
|
|
178
|
+
ease: "expo.in",
|
|
179
|
+
delay: 0.1,
|
|
180
|
+
},
|
|
181
|
+
collisionTime + 0.3,
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
window.__timelines = window.__timelines || {};
|
|
185
|
+
window.__timelines["scene1-logo-intro"] = tl;
|
|
186
|
+
})();
|
|
187
|
+
</script>
|
|
188
|
+
</div>
|
|
189
|
+
</template>
|