loopwind 0.9.2 → 0.10.0

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.
Files changed (137) hide show
  1. package/FONTS.md +13 -13
  2. package/HELPERS_DEMO.md +2 -2
  3. package/PROJECT_STRUCTURE.md +38 -38
  4. package/PUBLISHING.md +13 -13
  5. package/README.md +40 -48
  6. package/REGISTRY_SETUP.md +18 -18
  7. package/SHADCN_INTEGRATION.md +7 -7
  8. package/TAILWIND.md +4 -4
  9. package/TEMPLATE_SOURCES.md +30 -30
  10. package/dist/commands/render.d.ts +1 -1
  11. package/dist/commands/render.d.ts.map +1 -1
  12. package/dist/commands/render.js +53 -26
  13. package/dist/commands/render.js.map +1 -1
  14. package/dist/default-templates/AGENTS.md +29 -29
  15. package/dist/default-templates/image-template/template.tsx +15 -0
  16. package/dist/default-templates/video-template/template.tsx +19 -0
  17. package/dist/default-templates/website-template/template.tsx +18 -0
  18. package/dist/lib/renderer.js +15 -15
  19. package/dist/lib/renderer.js.map +1 -1
  20. package/dist/lib/tailwind-detector.js +1 -1
  21. package/dist/lib/tailwind-detector.js.map +1 -1
  22. package/dist/lib/tailwind.d.ts +1 -1
  23. package/dist/lib/tailwind.d.ts.map +1 -1
  24. package/dist/lib/tailwind.js +19 -19
  25. package/dist/lib/tailwind.js.map +1 -1
  26. package/dist/lib/template-validator.js +1 -1
  27. package/dist/lib/template-validator.js.map +1 -1
  28. package/dist/lib/utils.d.ts +1 -1
  29. package/dist/lib/utils.d.ts.map +1 -1
  30. package/dist/lib/utils.js +8 -7
  31. package/dist/lib/utils.js.map +1 -1
  32. package/dist/lib/video-renderer.d.ts +6 -0
  33. package/dist/lib/video-renderer.d.ts.map +1 -1
  34. package/dist/lib/video-renderer.js +69 -0
  35. package/dist/lib/video-renderer.js.map +1 -1
  36. package/dist/sdk/index.d.ts.map +1 -1
  37. package/dist/sdk/index.js +8 -8
  38. package/dist/sdk/index.js.map +1 -1
  39. package/examples/nextjs-api/README.md +6 -6
  40. package/examples/nextjs-api/pages/api/intro-video.ts +1 -1
  41. package/examples/nextjs-api/pages/api/og-image.ts +2 -2
  42. package/package.json +2 -1
  43. package/test-templates/TESTS.md +1 -1
  44. package/test-templates/test-sdk.mjs +2 -2
  45. package/website/README.md +2 -2
  46. package/website/package-lock.json +186 -2480
  47. package/_dsgn/templates/banner-hero/banner-hero.tsx +0 -57
  48. package/_dsgn/templates/banner-hero/meta.json +0 -14
  49. package/_dsgn/templates/composite-card/meta.json +0 -16
  50. package/_dsgn/templates/composite-card/template.tsx +0 -44
  51. package/_dsgn/templates/image/meta.json +0 -13
  52. package/_dsgn/templates/image/template.tsx +0 -28
  53. package/_dsgn/templates/kitchen-sink/meta.json +0 -13
  54. package/_dsgn/templates/kitchen-sink/template.tsx +0 -72
  55. package/_dsgn/templates/qr-card/meta.json +0 -14
  56. package/_dsgn/templates/qr-card/template.tsx +0 -39
  57. package/_dsgn/templates/test-parent/child/meta.json +0 -11
  58. package/_dsgn/templates/test-parent/child/template.tsx +0 -27
  59. package/_dsgn/templates/test-parent/meta.json +0 -12
  60. package/_dsgn/templates/test-parent/template.tsx +0 -30
  61. package/_dsgn/templates/test-sibling/meta.json +0 -11
  62. package/_dsgn/templates/test-sibling/template.tsx +0 -20
  63. package/_dsgn/templates/video/.tmp/template-1763421345296.mjs +0 -43
  64. package/_dsgn/templates/video/.tmp/template-1763421362228.mjs +0 -43
  65. package/_dsgn/templates/video/.tmp/template-1763421377706.mjs +0 -43
  66. package/_dsgn/templates/video/meta.json +0 -17
  67. package/_dsgn/templates/video/template.tsx +0 -48
  68. package/dist/default-templates/image/meta.json +0 -13
  69. package/dist/default-templates/image-template/meta.json +0 -13
  70. package/dist/default-templates/kitchen-sink/meta.json +0 -13
  71. package/dist/default-templates/page/meta.json +0 -17
  72. package/dist/default-templates/video/meta.json +0 -17
  73. package/dist/default-templates/video-template/meta.json +0 -17
  74. package/dist/default-templates/website/meta.json +0 -16
  75. package/dist/default-templates/website-template/meta.json +0 -16
  76. package/test-templates/_dsgn/templates/absolute-spin/meta.json +0 -7
  77. package/test-templates/_dsgn/templates/absolute-spin/template.tsx +0 -16
  78. package/test-templates/_dsgn/templates/animated-intro/.tmp/template-1763468771640.mjs +0 -7
  79. package/test-templates/_dsgn/templates/animated-intro/meta.json +0 -10
  80. package/test-templates/_dsgn/templates/animated-intro/template.tsx +0 -23
  81. package/test-templates/_dsgn/templates/centered-spin/.tmp/template-1763468525386.mjs +0 -7
  82. package/test-templates/_dsgn/templates/centered-spin/meta.json +0 -7
  83. package/test-templates/_dsgn/templates/centered-spin/template.tsx +0 -11
  84. package/test-templates/_dsgn/templates/composite/.tmp/template-1763468815645.mjs +0 -7
  85. package/test-templates/_dsgn/templates/composite/meta.json +0 -9
  86. package/test-templates/_dsgn/templates/composite/template.tsx +0 -23
  87. package/test-templates/_dsgn/templates/easing-test/.tmp/template-1763468824501.mjs +0 -7
  88. package/test-templates/_dsgn/templates/easing-test/meta.json +0 -7
  89. package/test-templates/_dsgn/templates/easing-test/template.tsx +0 -47
  90. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466364336.mjs +0 -10
  91. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466584319.mjs +0 -10
  92. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466667797.mjs +0 -10
  93. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466746504.mjs +0 -10
  94. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466930225.mjs +0 -10
  95. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467004552.mjs +0 -10
  96. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467060334.mjs +0 -10
  97. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467124493.mjs +0 -10
  98. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467174690.mjs +0 -10
  99. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467359134.mjs +0 -10
  100. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467451928.mjs +0 -10
  101. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467758275.mjs +0 -10
  102. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467985201.mjs +0 -10
  103. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468020563.mjs +0 -10
  104. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468090428.mjs +0 -10
  105. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468211036.mjs +0 -10
  106. package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468394057.mjs +0 -10
  107. package/test-templates/_dsgn/templates/minimal-spin/meta.json +0 -7
  108. package/test-templates/_dsgn/templates/minimal-spin/template.tsx +0 -13
  109. package/test-templates/_dsgn/templates/no-origin-spin/meta.json +0 -7
  110. package/test-templates/_dsgn/templates/no-origin-spin/template.tsx +0 -10
  111. package/test-templates/_dsgn/templates/opacity-test/meta.json +0 -7
  112. package/test-templates/_dsgn/templates/opacity-test/template.tsx +0 -9
  113. package/test-templates/_dsgn/templates/qr-code/.tmp/template-1763468758954.mjs +0 -17
  114. package/test-templates/_dsgn/templates/qr-code/.tmp/template-1763468815672.mjs +0 -17
  115. package/test-templates/_dsgn/templates/qr-code/meta.json +0 -9
  116. package/test-templates/_dsgn/templates/qr-code/template.tsx +0 -20
  117. package/test-templates/_dsgn/templates/rotation-abs-test/meta.json +0 -7
  118. package/test-templates/_dsgn/templates/rotation-abs-test/template.tsx +0 -15
  119. package/test-templates/_dsgn/templates/rotation-corner/meta.json +0 -7
  120. package/test-templates/_dsgn/templates/rotation-corner/template.tsx +0 -12
  121. package/test-templates/_dsgn/templates/rotation-test/meta.json +0 -7
  122. package/test-templates/_dsgn/templates/rotation-test/template.tsx +0 -12
  123. package/test-templates/_dsgn/templates/shake-test/meta.json +0 -7
  124. package/test-templates/_dsgn/templates/shake-test/template.tsx +0 -12
  125. package/test-templates/_dsgn/templates/static-image/.tmp/template-1763468746271.mjs +0 -7
  126. package/test-templates/_dsgn/templates/static-image/meta.json +0 -9
  127. package/test-templates/_dsgn/templates/static-image/template.tsx +0 -19
  128. package/test-templates/_dsgn/templates/translate-test/meta.json +0 -7
  129. package/test-templates/_dsgn/templates/translate-test/template.tsx +0 -9
  130. package/test-templates/_dsgn/templates/video-loops/.tmp/template-1763468793192.mjs +0 -15
  131. package/test-templates/_dsgn/templates/video-loops/meta.json +0 -9
  132. package/test-templates/_dsgn/templates/video-loops/template.tsx +0 -39
  133. package/test-templates/_dsgn/templates/wrapped-spin/meta.json +0 -7
  134. package/test-templates/_dsgn/templates/wrapped-spin/template.tsx +0 -17
  135. package/test-templates/compare-svgs.mjs +0 -30
  136. package/test-templates/convert-frames.mjs +0 -15
  137. package/test-templates/debug-rotation.mjs +0 -25
@@ -1,6 +1,6 @@
1
1
  # shadcn/ui Design System Integration
2
2
 
3
- dsgn uses **shadcn/ui's design system** by default, providing beautiful and consistent colors, typography, and components.
3
+ loopwind uses **shadcn/ui's design system** by default, providing beautiful and consistent colors, typography, and components.
4
4
 
5
5
  ## Default Color Palette
6
6
 
@@ -139,7 +139,7 @@ export default function ShadcnCard({ title, description, status, tw }) {
139
139
  {/* Subtle border */}
140
140
  <div style={tw('border-t/50 mt-6 pt-6')}>
141
141
  <p style={tw('text-muted-foreground/75 text-sm')}>
142
- Powered by dsgn + shadcn
142
+ Powered by loopwind + shadcn
143
143
  </p>
144
144
  </div>
145
145
  </div>
@@ -150,7 +150,7 @@ export default function ShadcnCard({ title, description, status, tw }) {
150
150
 
151
151
  ## Customizing Colors
152
152
 
153
- Users can override the default shadcn colors in their `dsgn.json`:
153
+ Users can override the default shadcn colors in their `loopwind.json`:
154
154
 
155
155
  ```json
156
156
  {
@@ -164,11 +164,11 @@ Users can override the default shadcn colors in their `dsgn.json`:
164
164
  }
165
165
  ```
166
166
 
167
- Or use their existing `tailwind.config.js` colors - dsgn automatically detects and uses them!
167
+ Or use their existing `tailwind.config.js` colors - loopwind automatically detects and uses them!
168
168
 
169
169
  ## shadcn Themes
170
170
 
171
- dsgn uses the **Zinc theme** by default. Users can easily switch to other shadcn themes:
171
+ loopwind uses the **Zinc theme** by default. Users can easily switch to other shadcn themes:
172
172
 
173
173
  ### Slate Theme
174
174
  ```json
@@ -263,7 +263,7 @@ Much cleaner and themeable!
263
263
  | **Foreground variants** | ✅ | `text-muted-foreground` |
264
264
  | **Opacity modifiers** | ✅ | `bg-primary/50`, `text-muted/75` |
265
265
  | **Border colors** | ✅ | `border`, `border-destructive/50` |
266
- | **Dark mode** | ✅ | Override in dsgn.json |
266
+ | **Dark mode** | ✅ | Override in loopwind.json |
267
267
  | **Custom themes** | ✅ | Full shadcn palette customizable |
268
268
 
269
- **dsgn templates automatically work with shadcn's design system!** 🎨
269
+ **loopwind templates automatically work with shadcn's design system!** 🎨
package/TAILWIND.md CHANGED
@@ -108,20 +108,20 @@ tw('opacity-90') // opacity: 0.9
108
108
  ### Colors
109
109
 
110
110
  - **Static Colors**: `text-white`, `text-black`, `bg-white`, `bg-black`
111
- - **Config Colors**: `bg-primary`, `text-primary`, `bg-secondary`, etc. (from dsgn.json)
111
+ - **Config Colors**: `bg-primary`, `text-primary`, `bg-secondary`, etc. (from loopwind.json)
112
112
 
113
113
  Examples:
114
114
  ```tsx
115
115
  // Using static colors
116
116
  tw('bg-black text-white')
117
117
 
118
- // Using config colors (from dsgn.json)
118
+ // Using config colors (from loopwind.json)
119
119
  tw('bg-primary text-secondary')
120
120
  ```
121
121
 
122
122
  ## Config Color Integration
123
123
 
124
- The `tw()` function automatically uses colors from your `dsgn.json`:
124
+ The `tw()` function automatically uses colors from your `loopwind.json`:
125
125
 
126
126
  ```json
127
127
  {
@@ -215,7 +215,7 @@ const TAILWIND_MAP = {
215
215
 
216
216
  1. **Familiar Syntax**: Use the Tailwind classes you already know
217
217
  2. **Cleaner Code**: Less verbose than inline styles
218
- 3. **Config Integration**: Automatic color mapping from dsgn.json
218
+ 3. **Config Integration**: Automatic color mapping from loopwind.json
219
219
  4. **Type Safe**: TypeScript support with CSSProperties
220
220
  5. **Extensible**: Easy to add more utilities
221
221
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- dsgn supports installing templates from multiple sources:
5
+ loopwind supports installing templates from multiple sources:
6
6
 
7
7
  1. **Official Registry** (default)
8
8
  2. **Direct URLs**
@@ -11,25 +11,25 @@ dsgn supports installing templates from multiple sources:
11
11
 
12
12
  ## 1. Official Registry (Default)
13
13
 
14
- Install templates from the official dsgn registry at `https://dsgncli.com/r`
14
+ Install templates from the official loopwind registry at `https://loopwind.dev/r`
15
15
 
16
16
  ```bash
17
- dsgn add banner-hero
18
- dsgn add product-card
19
- dsgn add social-og-image
17
+ loopwind add banner-hero
18
+ loopwind add product-card
19
+ loopwind add social-og-image
20
20
  ```
21
21
 
22
22
  **How it works:**
23
- - Fetches from: `https://dsgncli.com/r/banner-hero`
23
+ - Fetches from: `https://loopwind.dev/r/banner-hero`
24
24
  - Returns JSON with template files
25
- - Installs to: `dsgn/templates/banner-hero/`
25
+ - Installs to: `loopwind/templates/banner-hero/`
26
26
 
27
27
  ### Custom Registry
28
28
 
29
29
  Use a different registry:
30
30
 
31
31
  ```bash
32
- dsgn add banner-hero --registry https://my-registry.com/templates
32
+ loopwind add banner-hero --registry https://my-registry.com/templates
33
33
  ```
34
34
 
35
35
  ## 2. Direct URLs
@@ -37,8 +37,8 @@ dsgn add banner-hero --registry https://my-registry.com/templates
37
37
  Install a template from any publicly accessible URL:
38
38
 
39
39
  ```bash
40
- dsgn add https://example.com/templates/my-template.json
41
- dsgn add https://cdn.example.com/templates/awesome-banner.json
40
+ loopwind add https://example.com/templates/my-template.json
41
+ loopwind add https://cdn.example.com/templates/awesome-banner.json
42
42
  ```
43
43
 
44
44
  **Requirements:**
@@ -71,13 +71,13 @@ Install templates directly from GitHub repos:
71
71
 
72
72
  ```bash
73
73
  # From a GitHub repo (looks for template.json in repo root)
74
- dsgn add github:username/repo
74
+ loopwind add github:username/repo
75
75
 
76
76
  # From a specific path in the repo
77
- dsgn add github:username/repo/templates/banner-hero
77
+ loopwind add github:username/repo/templates/banner-hero
78
78
 
79
79
  # From an organization
80
- dsgn add github:myorg/design-templates/social-media/og-image
80
+ loopwind add github:myorg/design-templates/social-media/og-image
81
81
  ```
82
82
 
83
83
  **How it works:**
@@ -132,11 +132,11 @@ Install templates from your local filesystem:
132
132
 
133
133
  ```bash
134
134
  # Relative path
135
- dsgn add ./my-templates/banner-hero
136
- dsgn add ../shared-templates/product-card
135
+ loopwind add ./my-templates/banner-hero
136
+ loopwind add ../shared-templates/product-card
137
137
 
138
138
  # Absolute path
139
- dsgn add /Users/you/templates/social-card
139
+ loopwind add /Users/you/templates/social-card
140
140
  ```
141
141
 
142
142
  **Requirements:**
@@ -181,9 +181,9 @@ interface RegistryTemplate {
181
181
 
182
182
  ```bash
183
183
  # Install from company repo
184
- dsgn add github:mycompany/design-templates/marketing/hero-banner
184
+ loopwind add github:mycompany/design-templates/marketing/hero-banner
185
185
 
186
- # Result: Installs to dsgn/templates/hero-banner/
186
+ # Result: Installs to loopwind/templates/hero-banner/
187
187
  ```
188
188
 
189
189
  ### Example 2: Local Development
@@ -198,30 +198,30 @@ cd my-template
198
198
 
199
199
  # Install from local
200
200
  cd ../my-project
201
- dsgn add ../my-template
201
+ loopwind add ../my-template
202
202
 
203
203
  # Test it
204
- dsgn render banner --props props.json
204
+ loopwind render banner --props props.json
205
205
  ```
206
206
 
207
207
  ### Example 3: Direct URL
208
208
 
209
209
  ```bash
210
210
  # Install from CDN
211
- dsgn add https://cdn.mycompany.com/templates/v2/social-card.json
211
+ loopwind add https://cdn.mycompany.com/templates/v2/social-card.json
212
212
 
213
213
  # Install from gist (if formatted correctly)
214
- dsgn add https://gist.githubusercontent.com/user/id/raw/template.json
214
+ loopwind add https://gist.githubusercontent.com/user/id/raw/template.json
215
215
  ```
216
216
 
217
217
  ### Example 4: Custom Registry
218
218
 
219
219
  ```bash
220
220
  # Team's private registry
221
- dsgn add product-card --registry https://templates.mycompany.com/api
221
+ loopwind add product-card --registry https://templates.mycompany.com/api
222
222
 
223
223
  # Alternative registry
224
- dsgn add banner --registry https://awesome-templates.dev/registry
224
+ loopwind add banner --registry https://awesome-templates.dev/registry
225
225
  ```
226
226
 
227
227
  ## Creating Shareable Templates
@@ -247,7 +247,7 @@ my-templates/
247
247
  2. Share installation command:
248
248
 
249
249
  ```bash
250
- dsgn add github:username/my-templates/templates/banner-hero
250
+ loopwind add github:username/my-templates/templates/banner-hero
251
251
  ```
252
252
 
253
253
  ### For Direct URL
@@ -257,7 +257,7 @@ dsgn add github:username/my-templates/templates/banner-hero
257
257
  3. Share the URL:
258
258
 
259
259
  ```bash
260
- dsgn add https://my-cdn.com/templates/banner.json
260
+ loopwind add https://my-cdn.com/templates/banner.json
261
261
  ```
262
262
 
263
263
  ### For Local Sharing (Teams)
@@ -277,7 +277,7 @@ company-monorepo/
277
277
  2. Team members install with relative paths:
278
278
 
279
279
  ```bash
280
- dsgn add ../../design-templates/banner
280
+ loopwind add ../../design-templates/banner
281
281
  ```
282
282
 
283
283
  ## Security Considerations
@@ -327,8 +327,8 @@ dsgn add ../../design-templates/banner
327
327
  Delete existing template and reinstall:
328
328
 
329
329
  ```bash
330
- rm -rf dsgn/templates/banner-hero
331
- dsgn add github:user/repo/banner-hero
330
+ rm -rf loopwind/templates/banner-hero
331
+ loopwind add github:user/repo/banner-hero
332
332
  ```
333
333
 
334
334
  ## Advanced: Publishing Your Own Registry
@@ -353,7 +353,7 @@ Returns:
353
353
  Users can install with:
354
354
 
355
355
  ```bash
356
- dsgn add your-template --registry https://your-registry.com
356
+ loopwind add your-template --registry https://your-registry.com
357
357
  ```
358
358
 
359
359
  See `ROADMAP.md` for future registry features (versioning, search, marketplace).
@@ -1,7 +1,7 @@
1
1
  interface RenderOptions {
2
2
  props?: string;
3
3
  out?: string;
4
- format?: 'png' | 'svg' | 'webp' | 'jpg' | 'jpeg';
4
+ format?: 'png' | 'svg' | 'webp' | 'jpg' | 'jpeg' | 'mp4' | 'gif';
5
5
  framesOnly?: boolean;
6
6
  crf?: number;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/commands/render.ts"],"names":[],"mappings":"AAYA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,aAAa,CACjC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CAgOf"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/commands/render.ts"],"names":[],"mappings":"AAYA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IACjE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,aAAa,CACjC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CAwPf"}
@@ -4,7 +4,7 @@ import gradient from 'gradient-string';
4
4
  import path from 'path';
5
5
  import { isTemplateInstalled, parseProps, ensureOutputDir, loadTemplateMeta } from '../lib/utils.js';
6
6
  import { render } from '../lib/renderer.js';
7
- import { renderVideo, renderVideoFrames } from '../lib/video-renderer.js';
7
+ import { renderVideo, renderVideoFrames, renderVideoToGif } from '../lib/video-renderer.js';
8
8
  import { validateTemplateForRendering, enhanceSatoriError } from '../lib/template-validator.js';
9
9
  import { getResolvedPaths } from '../lib/config.js';
10
10
  import { checkForUpdates } from '../lib/version-check.js';
@@ -76,17 +76,24 @@ export async function renderCommand(templateName, propsArg, options) {
76
76
  const paths = await getResolvedPaths();
77
77
  // Handle video templates
78
78
  if (templateType === 'video') {
79
- const defaultFileName = `${templateName}-${Date.now()}.mp4`;
79
+ // Determine video format (mp4 or gif)
80
+ const videoFormat = options.format === 'gif' ? 'gif' : 'mp4';
81
+ const defaultFileName = `${templateName}-${Date.now()}.${videoFormat}`;
80
82
  let outputPath = options.out
81
83
  ? options.out
82
84
  : path.join(paths.outputs, defaultFileName);
83
85
  // Auto-correct extension if user provided wrong format
84
- if (options.out && !outputPath.endsWith('.mp4')) {
85
- const wrongExt = path.extname(outputPath);
86
- outputPath = outputPath.replace(/\.[^.]+$/, '.mp4');
87
- spinner.warn(chalk.yellow(`Video templates must output to .mp4 (changed ${wrongExt} → .mp4)`));
86
+ const validVideoExts = ['.mp4', '.gif'];
87
+ const currentExt = path.extname(outputPath).toLowerCase();
88
+ if (options.out && !validVideoExts.includes(currentExt)) {
89
+ outputPath = outputPath.replace(/\.[^.]+$/, `.${videoFormat}`);
90
+ spinner.warn(chalk.yellow(`Video templates must output to .mp4 or .gif (changed ${currentExt} → .${videoFormat})`));
88
91
  spinner.start();
89
92
  }
93
+ else if (options.out && currentExt === '.gif') {
94
+ // If user specified .gif extension, use gif format
95
+ // videoFormat is already set based on options.format
96
+ }
90
97
  // Frames-only mode
91
98
  if (options.framesOnly) {
92
99
  const framesDir = options.out || path.join(paths.outputs, `${templateName}-frames-${Date.now()}`);
@@ -121,46 +128,66 @@ export async function renderCommand(templateName, propsArg, options) {
121
128
  return;
122
129
  }
123
130
  // Render video (no ffmpeg required - uses WASM encoder!)
124
- spinner.text = 'Rendering video...';
131
+ spinner.text = `Rendering ${videoFormat.toUpperCase()}...`;
125
132
  let lastUpdate = Date.now();
126
- await renderVideo(templateName, props, outputPath, {
127
- quality: options.crf ? parseInt(String(options.crf), 10) : undefined,
128
- onFrameProgress: (frame, total, phase) => {
129
- if (Date.now() - lastUpdate > 100) {
130
- if (phase === 'svg') {
131
- spinner.text = `Generating SVGs: ${frame}/${total} (${Math.round((frame / total) * 100)}%)`;
133
+ if (videoFormat === 'gif') {
134
+ await renderVideoToGif(templateName, props, outputPath, {
135
+ onFrameProgress: (frame, total, phase) => {
136
+ if (Date.now() - lastUpdate > 100) {
137
+ if (phase === 'svg') {
138
+ spinner.text = `Generating SVGs: ${frame}/${total} (${Math.round((frame / total) * 100)}%)`;
139
+ }
140
+ else if (phase === 'encode') {
141
+ spinner.text = `Encoding GIF: ${frame}/${total} (${Math.round((frame / total) * 100)}%)`;
142
+ }
143
+ lastUpdate = Date.now();
132
144
  }
133
- else if (phase === 'encode') {
134
- spinner.text = `Encoding video: ${frame}/${total} (${Math.round((frame / total) * 100)}%)`;
145
+ },
146
+ });
147
+ }
148
+ else {
149
+ await renderVideo(templateName, props, outputPath, {
150
+ quality: options.crf ? parseInt(String(options.crf), 10) : undefined,
151
+ onFrameProgress: (frame, total, phase) => {
152
+ if (Date.now() - lastUpdate > 100) {
153
+ if (phase === 'svg') {
154
+ spinner.text = `Generating SVGs: ${frame}/${total} (${Math.round((frame / total) * 100)}%)`;
155
+ }
156
+ else if (phase === 'encode') {
157
+ spinner.text = `Encoding video: ${frame}/${total} (${Math.round((frame / total) * 100)}%)`;
158
+ }
159
+ lastUpdate = Date.now();
135
160
  }
136
- lastUpdate = Date.now();
137
- }
138
- },
139
- });
140
- spinner.succeed(chalk.green(`Successfully rendered video to ${chalk.bold(outputPath)}`));
161
+ },
162
+ });
163
+ }
164
+ spinner.succeed(chalk.green(`Successfully rendered ${videoFormat.toUpperCase()} to ${chalk.bold(outputPath)}`));
141
165
  console.log(chalk.dim(`\nTemplate: ${templateName}`));
142
- console.log(chalk.dim(`Format: MP4`));
166
+ console.log(chalk.dim(`Format: ${videoFormat.toUpperCase()}`));
143
167
  console.log(chalk.dim(`Output: ${path.resolve(outputPath)}\n`));
144
168
  await showUpdateNotification();
145
169
  return;
146
170
  }
147
171
  // Handle image templates
148
- const format = options.format || 'png';
149
- const defaultFileName = `${templateName}-${Date.now()}.${format}`;
172
+ // Filter out video formats for image templates
173
+ const imageFormat = (options.format === 'mp4' || options.format === 'gif')
174
+ ? 'png'
175
+ : (options.format || 'png');
176
+ const defaultFileName = `${templateName}-${Date.now()}.${imageFormat}`;
150
177
  const outputPath = options.out
151
178
  ? options.out
152
179
  : path.join(paths.outputs, defaultFileName);
153
180
  // Render
154
- spinner.text = `Rendering to ${format.toUpperCase()}...`;
181
+ spinner.text = `Rendering to ${imageFormat.toUpperCase()}...`;
155
182
  await render({
156
183
  templateName,
157
184
  props,
158
185
  outputPath,
159
- format,
186
+ format: imageFormat,
160
187
  });
161
188
  spinner.succeed(chalk.green(`Successfully rendered to ${chalk.bold(outputPath)}`));
162
189
  console.log(chalk.dim(`\nTemplate: ${templateName}`));
163
- console.log(chalk.dim(`Format: ${format.toUpperCase()}`));
190
+ console.log(chalk.dim(`Format: ${imageFormat.toUpperCase()}`));
164
191
  console.log(chalk.dim(`Output: ${path.resolve(outputPath)}\n`));
165
192
  await showUpdateNotification();
166
193
  }
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/commands/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,o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CAAC;QACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,EAAE,CAAC;QAEd,IAAI,QAAQ,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;YAC1C,KAAK,MAAM,UAAU,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAC9C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,UAAU,EAAE,CAAC,CAAC,CAAC;YAC9C,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;QAED,oCAAoC;QACpC,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC1C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;YACpC,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -36,19 +36,24 @@ loopwind render banner-hero props.json --out output.png --format png
36
36
 
37
37
  ### 5. Render Videos
38
38
  ```bash
39
- # Requires ffmpeg installed
39
+ # Render to MP4 (default)
40
40
  loopwind render my-video '{"title":"Video Title"}'
41
41
 
42
- # With options
43
- loopwind render my-video props.json --preset fast --crf 23
42
+ # Render to GIF (great for emails, GitHub, Slack)
43
+ loopwind render my-video '{"title":"Video Title"}' --format gif
44
44
 
45
- # Export frames only (no ffmpeg needed)
45
+ # With quality options
46
+ loopwind render my-video props.json --crf 23
47
+
48
+ # Export frames only
46
49
  loopwind render my-video props.json --frames-only
47
50
 
48
51
  # Keep frames after encoding
49
52
  loopwind render my-video props.json --keep-frames
50
53
  ```
51
54
 
55
+ **Formats:** MP4 (default), GIF
56
+
52
57
  ### 6. Validate Templates
53
58
  ```bash
54
59
  loopwind validate [template] # Validate one or all templates
@@ -68,18 +73,15 @@ project/
68
73
  ## Template Types
69
74
 
70
75
  ### Image Template
71
- **meta.json:**
72
- ```json
73
- {
74
- "name": "my-template",
75
- "type": "image",
76
- "size": { "width": 1200, "height": 630 },
77
- "props": { "title": "string" }
78
- }
79
- ```
80
-
81
- **template.tsx:**
82
76
  ```tsx
77
+ // template.tsx
78
+ export const meta = {
79
+ name: "my-template",
80
+ type: "image",
81
+ size: { width: 1200, height: 630 },
82
+ props: { title: "string" }
83
+ };
84
+
83
85
  export default function Template({ title, tw }) {
84
86
  return (
85
87
  <div style={tw('flex items-center justify-center w-full h-full bg-primary')}>
@@ -90,19 +92,16 @@ export default function Template({ title, tw }) {
90
92
  ```
91
93
 
92
94
  ### Video Template
93
- **meta.json:**
94
- ```json
95
- {
96
- "name": "my-video",
97
- "type": "video",
98
- "size": { "width": 1920, "height": 1080 },
99
- "video": { "fps": 30, "duration": 3 },
100
- "props": { "title": "string" }
101
- }
102
- ```
103
-
104
- **template.tsx:**
105
95
  ```tsx
96
+ // template.tsx
97
+ export const meta = {
98
+ name: "my-video",
99
+ type: "video",
100
+ size: { width: 1920, height: 1080 },
101
+ video: { fps: 30, duration: 3 },
102
+ props: { title: "string" }
103
+ };
104
+
106
105
  export default function VideoTemplate({ title, tw, progress }) {
107
106
  const opacity = progress < 0.2 ? progress / 0.2 : 1;
108
107
 
@@ -189,7 +188,8 @@ loopwind render banner-hero '{"title":"Hello","subtitle":"World"}'
189
188
  ### Generate Video
190
189
  ```bash
191
190
  loopwind add my-video
192
- loopwind render my-video '{"title":"Amazing Video"}' # Requires ffmpeg
191
+ loopwind render my-video '{"title":"Amazing Video"}' # MP4 output
192
+ loopwind render my-video '{"title":"Amazing Video"}' --format gif # GIF output
193
193
  ```
194
194
 
195
195
  ### Use Custom Branding
@@ -216,7 +216,7 @@ loopwind render og-image '{"title":"My Page"}'
216
216
 
217
217
  1. Always run `loopwind init` first in new projects
218
218
  2. Check `loopwind list` to see available templates
219
- 3. Video rendering requires ffmpeg (or use `--frames-only`)
219
+ 3. Videos can be rendered to MP4 or GIF (use `--format gif`)
220
220
  4. Image props are auto-detected (any prop ending in .jpg, .png, etc.)
221
221
  5. Video props are extracted at template FPS and cached
222
222
  6. Use `tw()` for all styling - it uses project's Tailwind config
@@ -1,4 +1,19 @@
1
1
 
2
+
3
+ export const meta = {
4
+ "name": "image",
5
+ "description": "Simple image starter template",
6
+ "type": "image",
7
+ "size": {
8
+ "width": 1200,
9
+ "height": 630
10
+ },
11
+ "props": {
12
+ "title": "string",
13
+ "description": "string?"
14
+ }
15
+ };
16
+
2
17
  // Template metadata is defined in meta.json
3
18
 
4
19
  export default function Template({ title, description, tw }) {
@@ -1,4 +1,23 @@
1
1
 
2
+
3
+ export const meta = {
4
+ "name": "video",
5
+ "description": "Animated video starter template",
6
+ "type": "video",
7
+ "size": {
8
+ "width": 1200,
9
+ "height": 630
10
+ },
11
+ "props": {
12
+ "title": "string",
13
+ "description": "string?"
14
+ },
15
+ "video": {
16
+ "fps": 30,
17
+ "duration": 3
18
+ }
19
+ };
20
+
2
21
  // Template metadata is defined in meta.json
3
22
 
4
23
  export default function Template({ title, description, frame, progress, tw }) {
@@ -1,4 +1,22 @@
1
1
 
2
+
3
+ export const meta = {
4
+ "name": "website",
5
+ "description": "Generate websites",
6
+ "type": "website",
7
+ "size": {
8
+ "width": 1200
9
+ },
10
+ "props": {
11
+ "title": "string",
12
+ "description": "string?"
13
+ },
14
+ "url": {
15
+ "fps": 30,
16
+ "duration": 3
17
+ }
18
+ };
19
+
2
20
  // Template metadata is defined in meta.json
3
21
 
4
22
  export default function Template({ title, description}) {