loopwind 0.12.0 → 0.12.1

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 CHANGED
@@ -749,24 +749,16 @@ export const meta = {
749
749
  }
750
750
  };
751
751
 
752
- export default function Template({ title, subtitle, frame, progress, tw, qr, template }) {
753
- const opacity = Math.min(1, progress * 2);
754
- const translateY = 20 - (progress * 20);
755
-
752
+ export default function Template({ title, subtitle, tw }) {
756
753
  return (
757
754
  <div style={tw('w-full h-full flex flex-col justify-center items-center bg-background p-20')}>
758
755
  <div style={tw('bg-card border rounded-xl p-16 flex flex-col')}>
759
- <h1
760
- style={{
761
- ...tw('text-9xl font-bold text-foreground'),
762
- opacity,
763
- transform: `translateY(${translateY}px)`
764
- }}
765
- >
756
+ {/* Bounce in from below: starts at 0ms, lasts 600ms */}
757
+ <h1 style={tw('text-9xl font-bold text-foreground ease-out enter-bounce-in-up/0/600')}>
766
758
  {title}
767
759
  </h1>
768
760
  {subtitle && (
769
- <p style={tw('text-5xl text-muted-foreground/75 mt-6')}>
761
+ <p style={tw('text-5xl text-muted-foreground/75 mt-6 ease-out enter-fade-in-up/300/600')}>
770
762
  {subtitle}
771
763
  </p>
772
764
  )}
@@ -776,6 +768,82 @@ export default function Template({ title, subtitle, frame, progress, tw, qr, tem
776
768
  }
777
769
  ```
778
770
 
771
+ ## Animation Classes (Video Only)
772
+
773
+ Tailwind-style animation classes for video templates. No manual `progress` or `frame` calculations needed!
774
+
775
+ ### Format
776
+
777
+ ```
778
+ enter-{animation}/{startMs}/{durationMs}
779
+ exit-{animation}/{startMs}/{durationMs}
780
+ loop-{animation}/{durationMs}
781
+ ```
782
+
783
+ - **startMs** - when animation begins (milliseconds)
784
+ - **durationMs** - how long it lasts (milliseconds)
785
+
786
+ ### Enter Animations
787
+
788
+ ```tsx
789
+ // Fade in: starts at 0ms, lasts 500ms
790
+ <h1 style={tw('enter-fade-in/0/500')}>Hello</h1>
791
+
792
+ // Bounce in from below with easing
793
+ <h1 style={tw('ease-out enter-bounce-in-up/0/600')}>Title</h1>
794
+
795
+ // Staggered animations
796
+ <h1 style={tw('ease-out enter-fade-in-up/0/400')}>First</h1>
797
+ <p style={tw('ease-out enter-fade-in-up/200/400')}>Second</p>
798
+ ```
799
+
800
+ **Available:** `fade-in`, `fade-in-up`, `fade-in-down`, `fade-in-left`, `fade-in-right`, `slide-up`, `slide-down`, `slide-left`, `slide-right`, `bounce-in`, `bounce-in-up`, `bounce-in-down`, `bounce-in-left`, `bounce-in-right`, `scale-in`, `zoom-in`, `rotate-in`, `flip-in-x`, `flip-in-y`
801
+
802
+ ### Exit Animations
803
+
804
+ ```tsx
805
+ // Fade out: starts at 2500ms, lasts 500ms
806
+ <h1 style={tw('exit-fade-out/2500/500')}>Goodbye</h1>
807
+
808
+ // Combined enter and exit
809
+ <h1 style={tw('enter-fade-in/0/500 exit-fade-out/2500/500')}>
810
+ Hello and Goodbye
811
+ </h1>
812
+ ```
813
+
814
+ ### Loop Animations
815
+
816
+ ```tsx
817
+ // Pulse opacity every 500ms
818
+ <div style={tw('loop-fade/500')}>Pulsing</div>
819
+
820
+ // Continuous rotation every 2000ms
821
+ <div style={tw('loop-spin/2000')}>Spinning</div>
822
+ ```
823
+
824
+ **Available:** `loop-fade`, `loop-bounce`, `loop-spin`, `loop-ping`, `loop-wiggle`, `loop-float`, `loop-pulse`, `loop-shake`
825
+
826
+ ### Easing Functions
827
+
828
+ Add before animation class:
829
+
830
+ ```tsx
831
+ <h1 style={tw('ease-out-cubic enter-bounce-in/0/500')}>Dramatic</h1>
832
+ ```
833
+
834
+ **Available:** `linear`, `ease-in`, `ease-out`, `ease-in-out`, `ease-in-cubic`, `ease-out-cubic`, `ease-in-out-cubic`, `ease-in-quart`, `ease-out-quart`, `ease-in-out-quart`
835
+
836
+ ### Bracket Notation
837
+
838
+ For CSS-like syntax:
839
+
840
+ ```tsx
841
+ <h1 style={tw('enter-slide-up/[0.6s]/[1.5s]')}>Hello</h1>
842
+ <h1 style={tw('enter-fade-in/[300ms]/[800ms]')}>World</h1>
843
+ ```
844
+
845
+ See the [Animation Documentation](https://loopwind.dev/animation) for complete reference.
846
+
779
847
  ## Commands
780
848
 
781
849
  ### `loopwind init`
@@ -178,50 +178,83 @@ export default function Template({
178
178
 
179
179
  ## Animation Classes (Video Only)
180
180
 
181
- Tailwind-style animation classes for video templates. Format: `animate-{type}/{start}/{end}`
181
+ Tailwind-style animation classes for video templates. No manual `progress` calculations needed!
182
182
 
183
- ### Transition Animations
183
+ ### Format
184
+
185
+ ```
186
+ enter-{animation}/{startMs}/{durationMs}
187
+ exit-{animation}/{startMs}/{durationMs}
188
+ loop-{animation}/{durationMs}
189
+ ```
190
+
191
+ - **startMs** - when animation begins (milliseconds)
192
+ - **durationMs** - how long it lasts (milliseconds)
193
+
194
+ ### Enter Animations
184
195
 
185
196
  ```tsx
186
- // Fade in from 0% to 50% of video
187
- <h1 style={tw('animate-fade-in/0/0.5')}>Hello</h1>
197
+ // Fade in: starts at 0ms, lasts 500ms
198
+ <h1 style={tw('enter-fade-in/0/500')}>Hello</h1>
188
199
 
189
- // Bounce in from below, with easing
190
- <h1 style={tw('ease-out animate-bounce-in-up/0/0.4')}>Title</h1>
200
+ // Bounce in from below with easing
201
+ <h1 style={tw('ease-out enter-bounce-in-up/0/600')}>Title</h1>
191
202
 
192
203
  // Staggered animations
193
- <h1 style={tw('ease-out animate-fade-in-up/0/0.3')}>First</h1>
194
- <p style={tw('ease-out animate-fade-in-up/0.2/0.5')}>Second</p>
204
+ <h1 style={tw('ease-out enter-fade-in-up/0/400')}>First</h1>
205
+ <p style={tw('ease-out enter-fade-in-up/200/400')}>Second</p>
195
206
  ```
196
207
 
197
- **Available animations:**
198
- - **Fade:** `fade-in`, `fade-out`, `fade-in-up`, `fade-in-down`, `fade-in-left`, `fade-in-right`
199
- - **Slide:** `slide-left`, `slide-right`, `slide-up`, `slide-down`
200
- - **Bounce:** `bounce-in`, `bounce-in-up`, `bounce-in-down`, `bounce-in-left`, `bounce-in-right`
201
- - **Scale:** `scale-in`, `scale-out`, `zoom-in`, `zoom-out`
202
- - **Rotate:** `rotate-in`, `rotate-out`, `flip-in-x`, `flip-in-y`
208
+ **Available:** `fade-in`, `fade-in-up`, `fade-in-down`, `fade-in-left`, `fade-in-right`, `slide-up`, `slide-down`, `slide-left`, `slide-right`, `bounce-in`, `bounce-in-up`, `bounce-in-down`, `bounce-in-left`, `bounce-in-right`, `scale-in`, `zoom-in`, `rotate-in`, `flip-in-x`, `flip-in-y`
203
209
 
204
- ### Loop Animations
210
+ ### Exit Animations
211
+
212
+ ```tsx
213
+ // Fade out: starts at 2500ms, lasts 500ms
214
+ <h1 style={tw('exit-fade-out/2500/500')}>Goodbye</h1>
215
+
216
+ // Combined enter and exit
217
+ <h1 style={tw('enter-fade-in/0/500 exit-fade-out/2500/500')}>
218
+ Hello and Goodbye
219
+ </h1>
220
+ ```
205
221
 
206
- Format: `animate-{type}/{frameLength}` (at 30fps: /30 = 1s, /15 = 0.5s)
222
+ **Available:** Same as enter animations but with "out" suffix (e.g., `fade-out`, `bounce-out-up`)
223
+
224
+ ### Loop Animations
207
225
 
208
226
  ```tsx
209
- <div style={tw('animate-pulse/15')}>Pulsing</div>
210
- <div style={tw('animate-spin/60')}>Spinning</div>
227
+ // Pulse opacity every 500ms
228
+ <div style={tw('loop-fade/500')}>Pulsing</div>
229
+
230
+ // Continuous rotation every 2000ms
231
+ <div style={tw('loop-spin/2000')}>Spinning</div>
232
+
233
+ // Ping effect (radar) every 500ms
234
+ <div style={tw('loop-ping/500')}>Ping</div>
211
235
  ```
212
236
 
213
- **Available:** `pulse`, `bounce`, `spin`, `ping`, `wiggle`, `float`
237
+ **Available:** `loop-fade`, `loop-bounce`, `loop-spin`, `loop-ping`, `loop-wiggle`, `loop-float`, `loop-pulse`, `loop-shake`
214
238
 
215
239
  ### Easing Functions
216
240
 
217
241
  Add before animation class:
218
242
 
219
243
  ```tsx
220
- <h1 style={tw('ease-out-cubic animate-bounce-in/0/0.5')}>Dramatic</h1>
244
+ <h1 style={tw('ease-out-cubic enter-bounce-in/0/500')}>Dramatic</h1>
221
245
  ```
222
246
 
223
247
  **Available:** `linear`, `ease-in`, `ease-out`, `ease-in-out`, `ease-in-cubic`, `ease-out-cubic`, `ease-in-out-cubic`, `ease-in-quart`, `ease-out-quart`, `ease-in-out-quart`
224
248
 
249
+ ### Bracket Notation
250
+
251
+ For CSS-like syntax:
252
+
253
+ ```tsx
254
+ <h1 style={tw('enter-slide-up/[0.6s]/[1.5s]')}>Hello</h1>
255
+ <h1 style={tw('enter-fade-in/[300ms]/[800ms]')}>World</h1>
256
+ ```
257
+
225
258
  ### Example: Intro Video
226
259
 
227
260
  ```tsx
@@ -236,10 +269,12 @@ export const meta = {
236
269
  export default function Intro({ tw, title, subtitle }) {
237
270
  return (
238
271
  <div style={tw('flex flex-col items-center justify-center w-full h-full bg-black')}>
239
- <h1 style={tw('text-8xl font-bold text-white ease-out animate-bounce-in-up/0/0.4')}>
272
+ {/* Bounce in: starts at 0ms, lasts 600ms */}
273
+ <h1 style={tw('text-8xl font-bold text-white ease-out enter-bounce-in-up/0/600')}>
240
274
  {title}
241
275
  </h1>
242
- <p style={tw('text-2xl text-white/80 mt-4 ease-out animate-fade-in-up/0.3/0.6')}>
276
+ {/* Fade in: starts at 400ms, lasts 600ms */}
277
+ <p style={tw('text-2xl text-white/80 mt-4 ease-out enter-fade-in-up/400/600')}>
243
278
  {subtitle}
244
279
  </p>
245
280
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopwind",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "A CLI tool for AI code agents and developers for generating images and videos.",
5
5
  "type": "module",
6
6
  "bin": {