loopwind 0.23.0 → 0.24.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.
Files changed (497) hide show
  1. package/README.md +13 -117
  2. package/dist/cli.js +16 -10
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/add.d.ts.map +1 -1
  5. package/dist/commands/add.js +6 -10
  6. package/dist/commands/add.js.map +1 -1
  7. package/dist/commands/agent.d.ts +8 -0
  8. package/dist/commands/agent.d.ts.map +1 -0
  9. package/dist/commands/agent.js +101 -0
  10. package/dist/commands/agent.js.map +1 -0
  11. package/dist/commands/init.d.ts.map +1 -1
  12. package/dist/commands/init.js +17 -7
  13. package/dist/commands/init.js.map +1 -1
  14. package/dist/commands/render.d.ts.map +1 -1
  15. package/dist/commands/render.js +17 -19
  16. package/dist/commands/render.js.map +1 -1
  17. package/dist/default-templates/AGENTS.md +10 -24
  18. package/dist/lib/config.d.ts +2 -3
  19. package/dist/lib/config.d.ts.map +1 -1
  20. package/dist/lib/config.js +4 -9
  21. package/dist/lib/config.js.map +1 -1
  22. package/dist/lib/constants.d.ts +1 -3
  23. package/dist/lib/constants.d.ts.map +1 -1
  24. package/dist/lib/constants.js +2 -4
  25. package/dist/lib/constants.js.map +1 -1
  26. package/dist/lib/installer.d.ts +2 -0
  27. package/dist/lib/installer.d.ts.map +1 -1
  28. package/dist/lib/installer.js +6 -7
  29. package/dist/lib/installer.js.map +1 -1
  30. package/dist/lib/renderer.d.ts.map +1 -1
  31. package/dist/lib/renderer.js +4 -1
  32. package/dist/lib/renderer.js.map +1 -1
  33. package/dist/lib/utils.d.ts +13 -29
  34. package/dist/lib/utils.d.ts.map +1 -1
  35. package/dist/lib/utils.js +45 -155
  36. package/dist/lib/utils.js.map +1 -1
  37. package/dist/types/config.d.ts +0 -2
  38. package/dist/types/config.d.ts.map +1 -1
  39. package/dist/types/config.js.map +1 -1
  40. package/package.json +1 -15
  41. package/REGISTRY_SETUP.md +0 -363
  42. package/dist/default-templates/image/template.d.ts +0 -20
  43. package/dist/default-templates/image/template.d.ts.map +0 -1
  44. package/dist/default-templates/image/template.js +0 -18
  45. package/dist/default-templates/image/template.js.map +0 -1
  46. package/dist/default-templates/image/template.tsx +0 -20
  47. package/dist/default-templates/kitchen-sink/template.tsx +0 -64
  48. package/dist/default-templates/page/template.tsx +0 -37
  49. package/dist/default-templates/video/template.d.ts +0 -26
  50. package/dist/default-templates/video/template.d.ts.map +0 -1
  51. package/dist/default-templates/video/template.js +0 -33
  52. package/dist/default-templates/video/template.js.map +0 -1
  53. package/dist/default-templates/video/template.tsx +0 -37
  54. package/dist/default-templates/website/pages/home.tsx +0 -17
  55. package/dist/default-templates/website/parts/footer.tsx +0 -17
  56. package/dist/default-templates/website/parts/header.tsx +0 -17
  57. package/dist/default-templates/website/template.tsx +0 -17
  58. package/dist/default-templates/website-template/pages/home.tsx +0 -13
  59. package/dist/default-templates/website-template/parts/footer.tsx +0 -15
  60. package/dist/default-templates/website-template/parts/header.tsx +0 -15
  61. package/dist/default-templates/website-template/template.tsx +0 -32
  62. package/dist/lib/encode-worker.d.ts +0 -2
  63. package/dist/lib/encode-worker.d.ts.map +0 -1
  64. package/dist/lib/encode-worker.js +0 -29
  65. package/dist/lib/encode-worker.js.map +0 -1
  66. package/dist/lib/mjpeg-muxer.d.ts +0 -46
  67. package/dist/lib/mjpeg-muxer.d.ts.map +0 -1
  68. package/dist/lib/mjpeg-muxer.js +0 -513
  69. package/dist/lib/mjpeg-muxer.js.map +0 -1
  70. package/dist/lib/render-core.d.ts +0 -63
  71. package/dist/lib/render-core.d.ts.map +0 -1
  72. package/dist/lib/render-core.js +0 -65
  73. package/dist/lib/render-core.js.map +0 -1
  74. package/dist/lib/tailwind-browser.d.ts +0 -27
  75. package/dist/lib/tailwind-browser.d.ts.map +0 -1
  76. package/dist/lib/tailwind-browser.js +0 -853
  77. package/dist/lib/tailwind-browser.js.map +0 -1
  78. package/dist/lib/video-player.d.ts +0 -25
  79. package/dist/lib/video-player.d.ts.map +0 -1
  80. package/dist/lib/video-player.js +0 -392
  81. package/dist/lib/video-player.js.map +0 -1
  82. package/dist/sdk/compiler.d.ts +0 -94
  83. package/dist/sdk/compiler.d.ts.map +0 -1
  84. package/dist/sdk/compiler.js +0 -122
  85. package/dist/sdk/compiler.js.map +0 -1
  86. package/dist/sdk/edge/index.d.ts +0 -91
  87. package/dist/sdk/edge/index.d.ts.map +0 -1
  88. package/dist/sdk/edge/index.js +0 -187
  89. package/dist/sdk/edge/index.js.map +0 -1
  90. package/dist/sdk/index.d.ts +0 -62
  91. package/dist/sdk/index.d.ts.map +0 -1
  92. package/dist/sdk/index.js +0 -141
  93. package/dist/sdk/index.js.map +0 -1
  94. package/dist/sdk/preview.d.ts +0 -65
  95. package/dist/sdk/preview.d.ts.map +0 -1
  96. package/dist/sdk/preview.js +0 -262
  97. package/dist/sdk/preview.js.map +0 -1
  98. package/dist/sdk/template.d.ts +0 -162
  99. package/dist/sdk/template.d.ts.map +0 -1
  100. package/dist/sdk/template.js +0 -231
  101. package/dist/sdk/template.js.map +0 -1
  102. package/dist/sdk/workers/index.d.ts +0 -135
  103. package/dist/sdk/workers/index.d.ts.map +0 -1
  104. package/dist/sdk/workers/index.js +0 -271
  105. package/dist/sdk/workers/index.js.map +0 -1
  106. package/dist/sdk/workers/tailwind-config.d.ts +0 -48
  107. package/dist/sdk/workers/tailwind-config.d.ts.map +0 -1
  108. package/dist/sdk/workers/tailwind-config.js +0 -187
  109. package/dist/sdk/workers/tailwind-config.js.map +0 -1
  110. package/dist/sdk/workers/tailwind.d.ts +0 -9
  111. package/dist/sdk/workers/tailwind.d.ts.map +0 -1
  112. package/dist/sdk/workers/tailwind.js +0 -8
  113. package/dist/sdk/workers/tailwind.js.map +0 -1
  114. package/examples/code-editor-templates.ts +0 -173
  115. package/examples/nextjs-api/README.md +0 -180
  116. package/examples/nextjs-api/package.json +0 -21
  117. package/examples/nextjs-api/pages/api/intro-video.ts +0 -53
  118. package/examples/nextjs-api/pages/api/og-image.ts +0 -50
  119. package/examples/nextjs-template-import.ts +0 -58
  120. package/examples/sdk-video-preview.tsx +0 -120
  121. package/examples/template-compiler-workflow.ts +0 -251
  122. package/examples/visual-builder-templates.ts +0 -336
  123. package/render-examples-600x400.mjs +0 -161
  124. package/render-spring-variants-fixed.mjs +0 -60
  125. package/render-staggered-text.mjs +0 -56
  126. package/test-cloudflare-worker/README.md +0 -64
  127. package/test-cloudflare-worker/dist/README.md +0 -1
  128. package/test-cloudflare-worker/dist/index.js +0 -23743
  129. package/test-cloudflare-worker/dist/index.js.map +0 -8
  130. package/test-cloudflare-worker/package-lock.json +0 -1773
  131. package/test-cloudflare-worker/package.json +0 -25
  132. package/test-cloudflare-worker/test-sdk.mjs +0 -75
  133. package/test-cloudflare-worker/wrangler.toml +0 -14
  134. package/test-font-files.mjs +0 -72
  135. package/test-jsx-support.mjs +0 -146
  136. package/test-sdk-config.mjs +0 -454
  137. package/test-sdk-source-config.mjs +0 -427
  138. package/test-sdk-user-templates.mjs +0 -469
  139. package/test-static-debug.tsx +0 -19
  140. package/test-templates/TESTS.md +0 -63
  141. package/test-templates/config-test.mjs +0 -17
  142. package/test-templates/demo-intro-props.json +0 -4
  143. package/test-templates/run-tests.sh +0 -44
  144. package/test-templates/test-sdk.mjs +0 -139
  145. package/test-video-720p.mjs +0 -96
  146. package/test-video-breakdown.mjs +0 -98
  147. package/test-video-perf-1080.mjs +0 -67
  148. package/test-video-perf.mjs +0 -56
  149. package/test-video-props.json +0 -3
  150. package/test-worker-1080p.mjs +0 -103
  151. package/test-worker-viability.mjs +0 -140
  152. package/website/.astro/content.db +0 -0
  153. package/website/.astro/integrations/_inox-tools_astro-when/types.d.ts +0 -1
  154. package/website/.astro/integrations/astro_db/db.d.ts +0 -15
  155. package/website/.astro/settings.json +0 -5
  156. package/website/.astro/types.d.ts +0 -2
  157. package/website/DEPLOYMENT.md +0 -143
  158. package/website/OG_IMAGES.md +0 -142
  159. package/website/README.md +0 -158
  160. package/website/astro.config.mjs +0 -41
  161. package/website/dist/.gitkeep +0 -5
  162. package/website/dist/_astro/PlaygroundEditor.DzFavsm8.js +0 -26
  163. package/website/dist/_astro/VideoPreviewClient.BrajhYmh.js +0 -1
  164. package/website/dist/_astro/agents.CZXv4DCM.css +0 -1
  165. package/website/dist/_astro/client.BHSq4mdQ.js +0 -33
  166. package/website/dist/_astro/index.CTbGshLK.js +0 -9
  167. package/website/dist/_astro/jsx-runtime.BjG_zV1W.js +0 -9
  168. package/website/dist/_routes.json +0 -31
  169. package/website/dist/_worker.js/_@astrojs-ssr-adapter.mjs +0 -1033
  170. package/website/dist/_worker.js/_astro-internal_middleware.mjs +0 -40
  171. package/website/dist/_worker.js/chunks/Logo_Cud5QvBJ.mjs +0 -22
  172. package/website/dist/_worker.js/chunks/_@astro-renderers_-YVK7NHa.mjs +0 -15015
  173. package/website/dist/_worker.js/chunks/abap_BTmsHiP5.mjs +0 -1
  174. package/website/dist/_worker.js/chunks/actionscript-3_DmBelb1E.mjs +0 -1
  175. package/website/dist/_worker.js/chunks/ada_8-E0ahCN.mjs +0 -1
  176. package/website/dist/_worker.js/chunks/andromeeda_XI-CXx50.mjs +0 -1
  177. package/website/dist/_worker.js/chunks/angular-html_DKGh3gGH.mjs +0 -1
  178. package/website/dist/_worker.js/chunks/angular-ts_-qZGsJoA.mjs +0 -1
  179. package/website/dist/_worker.js/chunks/apache_ijTUt0Ee.mjs +0 -1
  180. package/website/dist/_worker.js/chunks/apex_agu1c6Sh.mjs +0 -1
  181. package/website/dist/_worker.js/chunks/apl_Bj2f7Art.mjs +0 -1
  182. package/website/dist/_worker.js/chunks/applescript_B_vXrOh3.mjs +0 -1
  183. package/website/dist/_worker.js/chunks/ara_DCEQ2rnh.mjs +0 -1
  184. package/website/dist/_worker.js/chunks/asciidoc_CGN_EkYS.mjs +0 -1
  185. package/website/dist/_worker.js/chunks/asm_BBWZgnDp.mjs +0 -1
  186. package/website/dist/_worker.js/chunks/astro/assets-service_j52rQLzU.mjs +0 -721
  187. package/website/dist/_worker.js/chunks/astro/server_CsUrSZgd.mjs +0 -2512
  188. package/website/dist/_worker.js/chunks/astro-designed-error-pages_1ELXm5Tt.mjs +0 -542
  189. package/website/dist/_worker.js/chunks/astro_Dr_hht3h.mjs +0 -1
  190. package/website/dist/_worker.js/chunks/aurora-x_9GHG8nSq.mjs +0 -1
  191. package/website/dist/_worker.js/chunks/awk_DHRvhXot.mjs +0 -1
  192. package/website/dist/_worker.js/chunks/ayu-dark_CcvqmEHE.mjs +0 -1
  193. package/website/dist/_worker.js/chunks/ballerina_C7SdeSZb.mjs +0 -1
  194. package/website/dist/_worker.js/chunks/bat_Dv4A3u45.mjs +0 -1
  195. package/website/dist/_worker.js/chunks/beancount_BfPf9Luv.mjs +0 -1
  196. package/website/dist/_worker.js/chunks/berry_B8rfM3lL.mjs +0 -1
  197. package/website/dist/_worker.js/chunks/bibtex_TcjYgtJM.mjs +0 -1
  198. package/website/dist/_worker.js/chunks/bicep_CrlFWCdN.mjs +0 -1
  199. package/website/dist/_worker.js/chunks/blade_lanKVYID.mjs +0 -1
  200. package/website/dist/_worker.js/chunks/bsl_BhppzXMB.mjs +0 -1
  201. package/website/dist/_worker.js/chunks/c_6FBALJTK.mjs +0 -1
  202. package/website/dist/_worker.js/chunks/cadence_2txU9LVE.mjs +0 -1
  203. package/website/dist/_worker.js/chunks/cairo_BkrFAIlP.mjs +0 -1
  204. package/website/dist/_worker.js/chunks/catppuccin-frappe_CkEqIYhU.mjs +0 -1
  205. package/website/dist/_worker.js/chunks/catppuccin-latte_DG4Gx_-v.mjs +0 -1
  206. package/website/dist/_worker.js/chunks/catppuccin-macchiato_Cwi3vCXf.mjs +0 -1
  207. package/website/dist/_worker.js/chunks/catppuccin-mocha_L9_OPlFX.mjs +0 -1
  208. package/website/dist/_worker.js/chunks/clarity_BEAe4Ulu.mjs +0 -1
  209. package/website/dist/_worker.js/chunks/clojure_VnUX6p2g.mjs +0 -1
  210. package/website/dist/_worker.js/chunks/cmake_0-SGkZEj.mjs +0 -1
  211. package/website/dist/_worker.js/chunks/cobol_92M_KGaE.mjs +0 -1
  212. package/website/dist/_worker.js/chunks/codeowners_CzMwskBv.mjs +0 -1
  213. package/website/dist/_worker.js/chunks/codeql_DWJZNHv1.mjs +0 -1
  214. package/website/dist/_worker.js/chunks/coffee_CQjKU2fh.mjs +0 -1
  215. package/website/dist/_worker.js/chunks/common-lisp_BBLWDpS5.mjs +0 -1
  216. package/website/dist/_worker.js/chunks/coq_hedRFV3D.mjs +0 -1
  217. package/website/dist/_worker.js/chunks/cpp_DlS1i6Zs.mjs +0 -1
  218. package/website/dist/_worker.js/chunks/crystal_D6n65fKV.mjs +0 -1
  219. package/website/dist/_worker.js/chunks/csharp_C6FCVFzc.mjs +0 -1
  220. package/website/dist/_worker.js/chunks/css_C5uJEgmJ.mjs +0 -1
  221. package/website/dist/_worker.js/chunks/csv_CtMYuuJl.mjs +0 -1
  222. package/website/dist/_worker.js/chunks/cue_BsPexqx6.mjs +0 -1
  223. package/website/dist/_worker.js/chunks/cypher_apzf6OBi.mjs +0 -1
  224. package/website/dist/_worker.js/chunks/d_DcvIRcgm.mjs +0 -1
  225. package/website/dist/_worker.js/chunks/dark-plus_C01ONtzj.mjs +0 -1
  226. package/website/dist/_worker.js/chunks/dart_WkzM5WrV.mjs +0 -1
  227. package/website/dist/_worker.js/chunks/dax_DjXAO5V4.mjs +0 -1
  228. package/website/dist/_worker.js/chunks/desktop_C92LCxdc.mjs +0 -1
  229. package/website/dist/_worker.js/chunks/diff_CVwM_9XJ.mjs +0 -1
  230. package/website/dist/_worker.js/chunks/docker_DPzgJf6Z.mjs +0 -1
  231. package/website/dist/_worker.js/chunks/dotenv_D_vgANvA.mjs +0 -1
  232. package/website/dist/_worker.js/chunks/dracula-soft_CLnUBwFm.mjs +0 -1
  233. package/website/dist/_worker.js/chunks/dracula_lBVpb6Lb.mjs +0 -1
  234. package/website/dist/_worker.js/chunks/dream-maker_DTLbzd_J.mjs +0 -1
  235. package/website/dist/_worker.js/chunks/edge_i54JYm3_.mjs +0 -1
  236. package/website/dist/_worker.js/chunks/elixir_BJCIjTu4.mjs +0 -1
  237. package/website/dist/_worker.js/chunks/elm_BbXD39-_.mjs +0 -1
  238. package/website/dist/_worker.js/chunks/emacs-lisp_pxa5cXaN.mjs +0 -1
  239. package/website/dist/_worker.js/chunks/erb_Ccjijeee.mjs +0 -1
  240. package/website/dist/_worker.js/chunks/erlang_B2VM_hi7.mjs +0 -1
  241. package/website/dist/_worker.js/chunks/everforest-dark_BxvIPBim.mjs +0 -1
  242. package/website/dist/_worker.js/chunks/everforest-light_B7VoyaJM.mjs +0 -1
  243. package/website/dist/_worker.js/chunks/fennel_D-uo7X6c.mjs +0 -1
  244. package/website/dist/_worker.js/chunks/fish_BjePoK3m.mjs +0 -1
  245. package/website/dist/_worker.js/chunks/fluent_C8fgkzLX.mjs +0 -1
  246. package/website/dist/_worker.js/chunks/fortran-fixed-form_D1pu5zrc.mjs +0 -1
  247. package/website/dist/_worker.js/chunks/fortran-free-form_CSGOhJD6.mjs +0 -1
  248. package/website/dist/_worker.js/chunks/fsharp_B0xy-A4Y.mjs +0 -1
  249. package/website/dist/_worker.js/chunks/gdresource_CWppjlHq.mjs +0 -1
  250. package/website/dist/_worker.js/chunks/gdscript_eQCHchcS.mjs +0 -1
  251. package/website/dist/_worker.js/chunks/gdshader_C4kxepX7.mjs +0 -1
  252. package/website/dist/_worker.js/chunks/genie_ACtQLcDW.mjs +0 -1
  253. package/website/dist/_worker.js/chunks/gherkin_BFp2uKUd.mjs +0 -1
  254. package/website/dist/_worker.js/chunks/git-commit_CLg9ZwMV.mjs +0 -1
  255. package/website/dist/_worker.js/chunks/git-rebase_DG8A80Nt.mjs +0 -1
  256. package/website/dist/_worker.js/chunks/github-dark-default_BI0EP2Kv.mjs +0 -1
  257. package/website/dist/_worker.js/chunks/github-dark-dimmed_a_NIC0Xb.mjs +0 -1
  258. package/website/dist/_worker.js/chunks/github-dark-high-contrast_jZGqT7hk.mjs +0 -1
  259. package/website/dist/_worker.js/chunks/github-dark_CHCDNd2O.mjs +0 -1
  260. package/website/dist/_worker.js/chunks/github-light-default_DRbOW5RG.mjs +0 -1
  261. package/website/dist/_worker.js/chunks/github-light-high-contrast_tn_kWutM.mjs +0 -1
  262. package/website/dist/_worker.js/chunks/github-light_D9brYzot.mjs +0 -1
  263. package/website/dist/_worker.js/chunks/gleam_Dmhu1oxW.mjs +0 -1
  264. package/website/dist/_worker.js/chunks/glimmer-js_BfZbXy8A.mjs +0 -1
  265. package/website/dist/_worker.js/chunks/glimmer-ts_B9QVICrD.mjs +0 -1
  266. package/website/dist/_worker.js/chunks/glsl_DD2PPwOs.mjs +0 -1
  267. package/website/dist/_worker.js/chunks/gnuplot_D2OYChUX.mjs +0 -1
  268. package/website/dist/_worker.js/chunks/go_DYGFTe3h.mjs +0 -1
  269. package/website/dist/_worker.js/chunks/graphql_B7XsT3nH.mjs +0 -1
  270. package/website/dist/_worker.js/chunks/groovy_BO12Uwkl.mjs +0 -1
  271. package/website/dist/_worker.js/chunks/hack_CB2_ztCP.mjs +0 -1
  272. package/website/dist/_worker.js/chunks/haml_CyfDcDD3.mjs +0 -1
  273. package/website/dist/_worker.js/chunks/handlebars_CfpxpWm2.mjs +0 -1
  274. package/website/dist/_worker.js/chunks/haskell_jUeC5uN5.mjs +0 -1
  275. package/website/dist/_worker.js/chunks/haxe_B6GxP1WB.mjs +0 -1
  276. package/website/dist/_worker.js/chunks/hcl_DwoHV2oh.mjs +0 -1
  277. package/website/dist/_worker.js/chunks/hjson_DV7cJRk4.mjs +0 -1
  278. package/website/dist/_worker.js/chunks/hlsl_BlFCscPI.mjs +0 -1
  279. package/website/dist/_worker.js/chunks/houston_COBFG1Mx.mjs +0 -1
  280. package/website/dist/_worker.js/chunks/html-derivative_C9pJ337h.mjs +0 -1
  281. package/website/dist/_worker.js/chunks/html_D1OkrZS5.mjs +0 -1
  282. package/website/dist/_worker.js/chunks/http_DIGXRqvJ.mjs +0 -1
  283. package/website/dist/_worker.js/chunks/hxml_DEwh9i-c.mjs +0 -1
  284. package/website/dist/_worker.js/chunks/hy_DDoIgW1K.mjs +0 -1
  285. package/website/dist/_worker.js/chunks/imba_B00zbHo4.mjs +0 -1
  286. package/website/dist/_worker.js/chunks/index_BDWR1Q-q.mjs +0 -1861
  287. package/website/dist/_worker.js/chunks/ini_D7XQA_p8.mjs +0 -1
  288. package/website/dist/_worker.js/chunks/java_B9wdFd8K.mjs +0 -1
  289. package/website/dist/_worker.js/chunks/javascript_CLsPGOON.mjs +0 -1
  290. package/website/dist/_worker.js/chunks/jinja_jarBCAN1.mjs +0 -1
  291. package/website/dist/_worker.js/chunks/jison_oGg3J708.mjs +0 -1
  292. package/website/dist/_worker.js/chunks/json5_DlZ1Kyaa.mjs +0 -1
  293. package/website/dist/_worker.js/chunks/json_DaYk_FMp.mjs +0 -1
  294. package/website/dist/_worker.js/chunks/jsonc_DlwgfSDs.mjs +0 -1
  295. package/website/dist/_worker.js/chunks/jsonl_BbCCVaZF.mjs +0 -1
  296. package/website/dist/_worker.js/chunks/jsonnet_Dt-G75xe.mjs +0 -1
  297. package/website/dist/_worker.js/chunks/jssm_BtKFTj2A.mjs +0 -1
  298. package/website/dist/_worker.js/chunks/jsx_DDx_xAZ8.mjs +0 -1
  299. package/website/dist/_worker.js/chunks/julia_CK0lv68l.mjs +0 -1
  300. package/website/dist/_worker.js/chunks/kanagawa-dragon_BldAK3Oo.mjs +0 -1
  301. package/website/dist/_worker.js/chunks/kanagawa-lotus_DVM8FX9_.mjs +0 -1
  302. package/website/dist/_worker.js/chunks/kanagawa-wave_Dpih0AKP.mjs +0 -1
  303. package/website/dist/_worker.js/chunks/kotlin_kWneB9V_.mjs +0 -1
  304. package/website/dist/_worker.js/chunks/kusto_BKVATd95.mjs +0 -1
  305. package/website/dist/_worker.js/chunks/laserwave_BqatxsVl.mjs +0 -1
  306. package/website/dist/_worker.js/chunks/latex_LVDcGBbc.mjs +0 -1
  307. package/website/dist/_worker.js/chunks/lean_W7qo-5M2.mjs +0 -1
  308. package/website/dist/_worker.js/chunks/less_DFNwJnBH.mjs +0 -1
  309. package/website/dist/_worker.js/chunks/light-plus_Dp0AoWsO.mjs +0 -1
  310. package/website/dist/_worker.js/chunks/liquid_D24qs0pc.mjs +0 -1
  311. package/website/dist/_worker.js/chunks/log_IPWMXriF.mjs +0 -1
  312. package/website/dist/_worker.js/chunks/logo_C6KaatrQ.mjs +0 -1
  313. package/website/dist/_worker.js/chunks/lua_CwnEf-T7.mjs +0 -1
  314. package/website/dist/_worker.js/chunks/luau_Br3-CXjS.mjs +0 -1
  315. package/website/dist/_worker.js/chunks/make_UBNG-kOo.mjs +0 -1
  316. package/website/dist/_worker.js/chunks/markdown_C7mhJFCm.mjs +0 -1
  317. package/website/dist/_worker.js/chunks/marko_4tchUvI7.mjs +0 -1
  318. package/website/dist/_worker.js/chunks/material-theme-darker_SKtaNEPn.mjs +0 -1
  319. package/website/dist/_worker.js/chunks/material-theme-lighter_zOX_DZCH.mjs +0 -1
  320. package/website/dist/_worker.js/chunks/material-theme-ocean_BN9WbhdC.mjs +0 -1
  321. package/website/dist/_worker.js/chunks/material-theme-palenight_DT_covjH.mjs +0 -1
  322. package/website/dist/_worker.js/chunks/material-theme_6RpeM3kc.mjs +0 -1
  323. package/website/dist/_worker.js/chunks/matlab_DCOXsPKR.mjs +0 -1
  324. package/website/dist/_worker.js/chunks/mdc_B9gb2UFP.mjs +0 -1
  325. package/website/dist/_worker.js/chunks/mdx_DGU7Nu9u.mjs +0 -1
  326. package/website/dist/_worker.js/chunks/mermaid_B69URzsZ.mjs +0 -1
  327. package/website/dist/_worker.js/chunks/min-dark_BgxifOMI.mjs +0 -1
  328. package/website/dist/_worker.js/chunks/min-light_BrPjXxUp.mjs +0 -1
  329. package/website/dist/_worker.js/chunks/mipsasm_9U-4_t7k.mjs +0 -1
  330. package/website/dist/_worker.js/chunks/mojo_B0wt7ug3.mjs +0 -1
  331. package/website/dist/_worker.js/chunks/monokai_B6Pxpoyi.mjs +0 -1
  332. package/website/dist/_worker.js/chunks/move_1eid4CyR.mjs +0 -1
  333. package/website/dist/_worker.js/chunks/narrat_Ds6-p5JZ.mjs +0 -1
  334. package/website/dist/_worker.js/chunks/nextflow_v2N1Qlqa.mjs +0 -1
  335. package/website/dist/_worker.js/chunks/nginx_Bp9Ab2NH.mjs +0 -1
  336. package/website/dist/_worker.js/chunks/night-owl_CdwOw_sc.mjs +0 -1
  337. package/website/dist/_worker.js/chunks/nim_BXGDUe53.mjs +0 -1
  338. package/website/dist/_worker.js/chunks/nix_CUig1nJH.mjs +0 -1
  339. package/website/dist/_worker.js/chunks/noop-middleware_B8fH5jha.mjs +0 -10
  340. package/website/dist/_worker.js/chunks/nord_SPoG1iae.mjs +0 -1
  341. package/website/dist/_worker.js/chunks/nushell_DJw1Lca8.mjs +0 -1
  342. package/website/dist/_worker.js/chunks/objective-c_Bktzl_CO.mjs +0 -1
  343. package/website/dist/_worker.js/chunks/objective-cpp_CP4DWdDp.mjs +0 -1
  344. package/website/dist/_worker.js/chunks/ocaml_CeEAs7bZ.mjs +0 -1
  345. package/website/dist/_worker.js/chunks/one-dark-pro_-hIwCNMi.mjs +0 -1
  346. package/website/dist/_worker.js/chunks/one-light_DSmYvJ05.mjs +0 -1
  347. package/website/dist/_worker.js/chunks/pascal_C-S_Ms_o.mjs +0 -1
  348. package/website/dist/_worker.js/chunks/perl_CKamvo15.mjs +0 -1
  349. package/website/dist/_worker.js/chunks/php_BlmcX_F3.mjs +0 -1
  350. package/website/dist/_worker.js/chunks/plastic_Ryt8tVoA.mjs +0 -1
  351. package/website/dist/_worker.js/chunks/plsql_Cb3v7cBj.mjs +0 -1
  352. package/website/dist/_worker.js/chunks/po_DZbdNRlo.mjs +0 -1
  353. package/website/dist/_worker.js/chunks/poimandres_bYmE3_5d.mjs +0 -1
  354. package/website/dist/_worker.js/chunks/polar_pJkMGwoW.mjs +0 -1
  355. package/website/dist/_worker.js/chunks/postcss_BAXSOKgk.mjs +0 -1
  356. package/website/dist/_worker.js/chunks/powerquery_oITMGN4x.mjs +0 -1
  357. package/website/dist/_worker.js/chunks/powershell_6306-xIF.mjs +0 -1
  358. package/website/dist/_worker.js/chunks/prisma_DSDxnZGz.mjs +0 -1
  359. package/website/dist/_worker.js/chunks/prolog_CxG7tjZR.mjs +0 -1
  360. package/website/dist/_worker.js/chunks/proto_CS9ByXm1.mjs +0 -1
  361. package/website/dist/_worker.js/chunks/pug_BMtLJo6U.mjs +0 -1
  362. package/website/dist/_worker.js/chunks/puppet_BfeeSzee.mjs +0 -1
  363. package/website/dist/_worker.js/chunks/purescript_BFfueNaH.mjs +0 -1
  364. package/website/dist/_worker.js/chunks/python_Cc4Faapv.mjs +0 -1
  365. package/website/dist/_worker.js/chunks/qml_C1CTJTK8.mjs +0 -1
  366. package/website/dist/_worker.js/chunks/qmldir_nG1KaqKR.mjs +0 -1
  367. package/website/dist/_worker.js/chunks/qss_Cncxk263.mjs +0 -1
  368. package/website/dist/_worker.js/chunks/r_ChR54Ihi.mjs +0 -1
  369. package/website/dist/_worker.js/chunks/racket_BDrhptDs.mjs +0 -1
  370. package/website/dist/_worker.js/chunks/raku_07OUHa0P.mjs +0 -1
  371. package/website/dist/_worker.js/chunks/razor_DIP3INLa.mjs +0 -1
  372. package/website/dist/_worker.js/chunks/red_DOPXfj-6.mjs +0 -1
  373. package/website/dist/_worker.js/chunks/reg_B64SwEDj.mjs +0 -1
  374. package/website/dist/_worker.js/chunks/regexp_ButFGoB5.mjs +0 -1
  375. package/website/dist/_worker.js/chunks/rel_BWJAWqZD.mjs +0 -1
  376. package/website/dist/_worker.js/chunks/riscv_79gXlbsF.mjs +0 -1
  377. package/website/dist/_worker.js/chunks/rose-pine-dawn_DHIjVGd3.mjs +0 -1
  378. package/website/dist/_worker.js/chunks/rose-pine-moon_t86aEbs0.mjs +0 -1
  379. package/website/dist/_worker.js/chunks/rose-pine_BHgrcDCs.mjs +0 -1
  380. package/website/dist/_worker.js/chunks/rst_D3F4Fcpj.mjs +0 -1
  381. package/website/dist/_worker.js/chunks/ruby_Cs7vM9iv.mjs +0 -1
  382. package/website/dist/_worker.js/chunks/rust_DpyRVatH.mjs +0 -1
  383. package/website/dist/_worker.js/chunks/sas_DW45xZXN.mjs +0 -1
  384. package/website/dist/_worker.js/chunks/sass_C6SiMwN_.mjs +0 -1
  385. package/website/dist/_worker.js/chunks/scala_DlZOjNZk.mjs +0 -1
  386. package/website/dist/_worker.js/chunks/scheme_D2ezSJXu.mjs +0 -1
  387. package/website/dist/_worker.js/chunks/scss_DG5Spjqu.mjs +0 -1
  388. package/website/dist/_worker.js/chunks/sdbl_ZCYaj4VN.mjs +0 -1
  389. package/website/dist/_worker.js/chunks/shaderlab_CAcRkg1_.mjs +0 -1
  390. package/website/dist/_worker.js/chunks/shellscript_BWwhkDVh.mjs +0 -1
  391. package/website/dist/_worker.js/chunks/shellsession_BfEA3juK.mjs +0 -1
  392. package/website/dist/_worker.js/chunks/slack-dark_CL3lSpCc.mjs +0 -1
  393. package/website/dist/_worker.js/chunks/slack-ochin_DdZKOQVh.mjs +0 -1
  394. package/website/dist/_worker.js/chunks/smalltalk_DgilzSui.mjs +0 -1
  395. package/website/dist/_worker.js/chunks/snazzy-light_eJU08Pz_.mjs +0 -1
  396. package/website/dist/_worker.js/chunks/solarized-dark_Dg_YQywx.mjs +0 -1
  397. package/website/dist/_worker.js/chunks/solarized-light_BnIsrA6p.mjs +0 -1
  398. package/website/dist/_worker.js/chunks/solidity_DkseH8pQ.mjs +0 -1
  399. package/website/dist/_worker.js/chunks/soy_DU7bOYoG.mjs +0 -1
  400. package/website/dist/_worker.js/chunks/sparql_BuI1DBDH.mjs +0 -1
  401. package/website/dist/_worker.js/chunks/splunk_B8Ha9Pkg.mjs +0 -1
  402. package/website/dist/_worker.js/chunks/sql_BniHwea5.mjs +0 -1
  403. package/website/dist/_worker.js/chunks/ssh-config_CkE1GuVe.mjs +0 -1
  404. package/website/dist/_worker.js/chunks/stata_Dtqpbd_l.mjs +0 -1
  405. package/website/dist/_worker.js/chunks/stylus_CXTtglzO.mjs +0 -1
  406. package/website/dist/_worker.js/chunks/svelte_BjWYcUCN.mjs +0 -1
  407. package/website/dist/_worker.js/chunks/swift_BzHql_rM.mjs +0 -1
  408. package/website/dist/_worker.js/chunks/synthwave-84_DLRNhxNA.mjs +0 -1
  409. package/website/dist/_worker.js/chunks/system-verilog_ChyInPph.mjs +0 -1
  410. package/website/dist/_worker.js/chunks/systemd_Bi9Qa2qD.mjs +0 -1
  411. package/website/dist/_worker.js/chunks/talonscript_B3sH_Y-V.mjs +0 -1
  412. package/website/dist/_worker.js/chunks/tasl_BJ5yipRs.mjs +0 -1
  413. package/website/dist/_worker.js/chunks/tcl_CoJQjNoP.mjs +0 -1
  414. package/website/dist/_worker.js/chunks/templ_CrU7Ffil.mjs +0 -1
  415. package/website/dist/_worker.js/chunks/terraform_DT9JSFpC.mjs +0 -1
  416. package/website/dist/_worker.js/chunks/tex_5PKu2yA0.mjs +0 -1
  417. package/website/dist/_worker.js/chunks/tokyo-night_Buo8OK7-.mjs +0 -1
  418. package/website/dist/_worker.js/chunks/toml_CPuXX3oc.mjs +0 -1
  419. package/website/dist/_worker.js/chunks/ts-tags_D0M_1VSH.mjs +0 -1
  420. package/website/dist/_worker.js/chunks/tsv_CuivVNot.mjs +0 -1
  421. package/website/dist/_worker.js/chunks/tsx_MkuGr8MY.mjs +0 -1
  422. package/website/dist/_worker.js/chunks/turtle_BqgEPK7f.mjs +0 -1
  423. package/website/dist/_worker.js/chunks/twig_r1G9rpYJ.mjs +0 -1
  424. package/website/dist/_worker.js/chunks/typescript_Au5buqzM.mjs +0 -1
  425. package/website/dist/_worker.js/chunks/typespec_47rhBK_z.mjs +0 -1
  426. package/website/dist/_worker.js/chunks/typst_BAtuQLh-.mjs +0 -1
  427. package/website/dist/_worker.js/chunks/v_BIvWImHg.mjs +0 -1
  428. package/website/dist/_worker.js/chunks/vala_DYEacj30.mjs +0 -1
  429. package/website/dist/_worker.js/chunks/vb_CikQuqGJ.mjs +0 -1
  430. package/website/dist/_worker.js/chunks/verilog_BQRENwI-.mjs +0 -1
  431. package/website/dist/_worker.js/chunks/vesper_DA0kvTmj.mjs +0 -1
  432. package/website/dist/_worker.js/chunks/vhdl_DHscJIyg.mjs +0 -1
  433. package/website/dist/_worker.js/chunks/viml_F2pvMwvG.mjs +0 -1
  434. package/website/dist/_worker.js/chunks/vitesse-black_D9tjNzd0.mjs +0 -1
  435. package/website/dist/_worker.js/chunks/vitesse-dark_Bnm5d0hd.mjs +0 -1
  436. package/website/dist/_worker.js/chunks/vitesse-light_CHwbyjNR.mjs +0 -1
  437. package/website/dist/_worker.js/chunks/vue-html_DyYtbbMK.mjs +0 -1
  438. package/website/dist/_worker.js/chunks/vue_DofN6juy.mjs +0 -1
  439. package/website/dist/_worker.js/chunks/vyper_CiR0m-OV.mjs +0 -1
  440. package/website/dist/_worker.js/chunks/wasm_CwIGgRGf.mjs +0 -1
  441. package/website/dist/_worker.js/chunks/wasm_jKWhg0J0.mjs +0 -1
  442. package/website/dist/_worker.js/chunks/wenyan_DKvVZKXW.mjs +0 -1
  443. package/website/dist/_worker.js/chunks/wgsl_BOWZY7yw.mjs +0 -1
  444. package/website/dist/_worker.js/chunks/wikitext_CXDhhHPy.mjs +0 -1
  445. package/website/dist/_worker.js/chunks/wolfram_ChkmGnW0.mjs +0 -1
  446. package/website/dist/_worker.js/chunks/xml_DXH3hHIu.mjs +0 -1
  447. package/website/dist/_worker.js/chunks/xsl_DuP2mFjg.mjs +0 -1
  448. package/website/dist/_worker.js/chunks/yaml_IGiEkTge.mjs +0 -1
  449. package/website/dist/_worker.js/chunks/zenscript_59iXGyNw.mjs +0 -1
  450. package/website/dist/_worker.js/chunks/zig_DKzb0zdT.mjs +0 -1
  451. package/website/dist/_worker.js/index.js +0 -61
  452. package/website/dist/_worker.js/manifest_Bk6136-u.mjs +0 -98
  453. package/website/dist/_worker.js/pages/_image.astro.mjs +0 -24
  454. package/website/dist/_worker.js/pages/agents.astro.mjs +0 -1
  455. package/website/dist/_worker.js/pages/animation.astro.mjs +0 -1
  456. package/website/dist/_worker.js/pages/api/playground/render.astro.mjs +0 -25562
  457. package/website/dist/_worker.js/pages/api/playground/templates.astro.mjs +0 -92
  458. package/website/dist/_worker.js/pages/api/raw-markdown/_---path_.astro.mjs +0 -44
  459. package/website/dist/_worker.js/pages/config.astro.mjs +0 -1
  460. package/website/dist/_worker.js/pages/fonts.astro.mjs +0 -1
  461. package/website/dist/_worker.js/pages/getting-started.astro.mjs +0 -1
  462. package/website/dist/_worker.js/pages/helpers.astro.mjs +0 -1
  463. package/website/dist/_worker.js/pages/images.astro.mjs +0 -1
  464. package/website/dist/_worker.js/pages/index.astro.mjs +0 -1
  465. package/website/dist/_worker.js/pages/llm.txt.astro.mjs +0 -1
  466. package/website/dist/_worker.js/pages/playground/_example_.astro.mjs +0 -95
  467. package/website/dist/_worker.js/pages/playground.astro.mjs +0 -1
  468. package/website/dist/_worker.js/pages/preview.astro.mjs +0 -1
  469. package/website/dist/_worker.js/pages/sdk.astro.mjs +0 -1
  470. package/website/dist/_worker.js/pages/sitemap.xml.astro.mjs +0 -1
  471. package/website/dist/_worker.js/pages/styling.astro.mjs +0 -1
  472. package/website/dist/_worker.js/pages/templates.astro.mjs +0 -1
  473. package/website/dist/_worker.js/pages/video.astro.mjs +0 -1
  474. package/website/dist/_worker.js/renderers.mjs +0 -2
  475. package/website/dist/agents/index.html +0 -54
  476. package/website/dist/animation/index.html +0 -1505
  477. package/website/dist/config/index.html +0 -186
  478. package/website/dist/fonts/index.html +0 -200
  479. package/website/dist/getting-started/index.html +0 -109
  480. package/website/dist/helpers/index.html +0 -350
  481. package/website/dist/images/index.html +0 -337
  482. package/website/dist/index.html +0 -141
  483. package/website/dist/llm.txt +0 -3626
  484. package/website/dist/playground/index.html +0 -6
  485. package/website/dist/preview/index.html +0 -113
  486. package/website/dist/robots.txt +0 -40
  487. package/website/dist/sdk/index.html +0 -1588
  488. package/website/dist/sitemap.xml +0 -76
  489. package/website/dist/styling/index.html +0 -368
  490. package/website/dist/templates/index.html +0 -76
  491. package/website/dist/video/index.html +0 -354
  492. package/website/package-lock.json +0 -8099
  493. package/website/package.json +0 -43
  494. package/website/public/.gitkeep +0 -5
  495. package/website/public/robots.txt +0 -40
  496. package/website/templates/og-image.tsx +0 -60
  497. package/website/wrangler.toml +0 -9
@@ -1,853 +0,0 @@
1
- /**
2
- * Browser-safe version of tailwind.ts
3
- * This version doesn't import any Node.js modules and can be bundled for browser use.
4
- */
5
- // Tailwind color palette
6
- const TAILWIND_COLORS = {
7
- slate: { 50: '#f8fafc', 100: '#f1f5f9', 200: '#e2e8f0', 300: '#cbd5e1', 400: '#94a3b8', 500: '#64748b', 600: '#475569', 700: '#334155', 800: '#1e293b', 900: '#0f172a', 950: '#020617' },
8
- gray: { 50: '#f9fafb', 100: '#f3f4f6', 200: '#e5e7eb', 300: '#d1d5db', 400: '#9ca3af', 500: '#6b7280', 600: '#4b5563', 700: '#374151', 800: '#1f2937', 900: '#111827', 950: '#030712' },
9
- zinc: { 50: '#fafafa', 100: '#f4f4f5', 200: '#e4e4e7', 300: '#d4d4d8', 400: '#a1a1aa', 500: '#71717a', 600: '#52525b', 700: '#3f3f46', 800: '#27272a', 900: '#18181b', 950: '#09090b' },
10
- neutral: { 50: '#fafafa', 100: '#f5f5f5', 200: '#e5e5e5', 300: '#d4d4d4', 400: '#a3a3a3', 500: '#737373', 600: '#525252', 700: '#404040', 800: '#262626', 900: '#171717', 950: '#0a0a0a' },
11
- stone: { 50: '#fafaf9', 100: '#f5f5f4', 200: '#e7e5e4', 300: '#d6d3d1', 400: '#a8a29e', 500: '#78716c', 600: '#57534e', 700: '#44403c', 800: '#292524', 900: '#1c1917', 950: '#0c0a09' },
12
- red: { 50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5', 400: '#f87171', 500: '#ef4444', 600: '#dc2626', 700: '#b91c1c', 800: '#991b1b', 900: '#7f1d1d', 950: '#450a0a' },
13
- orange: { 50: '#fff7ed', 100: '#ffedd5', 200: '#fed7aa', 300: '#fdba74', 400: '#fb923c', 500: '#f97316', 600: '#ea580c', 700: '#c2410c', 800: '#9a3412', 900: '#7c2d12', 950: '#431407' },
14
- amber: { 50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d', 400: '#fbbf24', 500: '#f59e0b', 600: '#d97706', 700: '#b45309', 800: '#92400e', 900: '#78350f', 950: '#451a03' },
15
- yellow: { 50: '#fefce8', 100: '#fef9c3', 200: '#fef08a', 300: '#fde047', 400: '#facc15', 500: '#eab308', 600: '#ca8a04', 700: '#a16207', 800: '#854d0e', 900: '#713f12', 950: '#422006' },
16
- lime: { 50: '#f7fee7', 100: '#ecfccb', 200: '#d9f99d', 300: '#bef264', 400: '#a3e635', 500: '#84cc16', 600: '#65a30d', 700: '#4d7c0f', 800: '#3f6212', 900: '#365314', 950: '#1a2e05' },
17
- green: { 50: '#f0fdf4', 100: '#dcfce7', 200: '#bbf7d0', 300: '#86efac', 400: '#4ade80', 500: '#22c55e', 600: '#16a34a', 700: '#15803d', 800: '#166534', 900: '#14532d', 950: '#052e16' },
18
- emerald: { 50: '#ecfdf5', 100: '#d1fae5', 200: '#a7f3d0', 300: '#6ee7b7', 400: '#34d399', 500: '#10b981', 600: '#059669', 700: '#047857', 800: '#065f46', 900: '#064e3b', 950: '#022c22' },
19
- teal: { 50: '#f0fdfa', 100: '#ccfbf1', 200: '#99f6e4', 300: '#5eead4', 400: '#2dd4bf', 500: '#14b8a6', 600: '#0d9488', 700: '#0f766e', 800: '#115e59', 900: '#134e4a', 950: '#042f2e' },
20
- cyan: { 50: '#ecfeff', 100: '#cffafe', 200: '#a5f3fc', 300: '#67e8f9', 400: '#22d3ee', 500: '#06b6d4', 600: '#0891b2', 700: '#0e7490', 800: '#155e75', 900: '#164e63', 950: '#083344' },
21
- sky: { 50: '#f0f9ff', 100: '#e0f2fe', 200: '#bae6fd', 300: '#7dd3fc', 400: '#38bdf8', 500: '#0ea5e9', 600: '#0284c7', 700: '#0369a1', 800: '#075985', 900: '#0c4a6e', 950: '#082f49' },
22
- blue: { 50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd', 400: '#60a5fa', 500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', 900: '#1e3a8a', 950: '#172554' },
23
- indigo: { 50: '#eef2ff', 100: '#e0e7ff', 200: '#c7d2fe', 300: '#a5b4fc', 400: '#818cf8', 500: '#6366f1', 600: '#4f46e5', 700: '#4338ca', 800: '#3730a3', 900: '#312e81', 950: '#1e1b4b' },
24
- violet: { 50: '#f5f3ff', 100: '#ede9fe', 200: '#ddd6fe', 300: '#c4b5fd', 400: '#a78bfa', 500: '#8b5cf6', 600: '#7c3aed', 700: '#6d28d9', 800: '#5b21b6', 900: '#4c1d95', 950: '#2e1065' },
25
- purple: { 50: '#faf5ff', 100: '#f3e8ff', 200: '#e9d5ff', 300: '#d8b4fe', 400: '#c084fc', 500: '#a855f7', 600: '#9333ea', 700: '#7e22ce', 800: '#6b21a8', 900: '#581c87', 950: '#3b0764' },
26
- fuchsia: { 50: '#fdf4ff', 100: '#fae8ff', 200: '#f5d0fe', 300: '#f0abfc', 400: '#e879f9', 500: '#d946ef', 600: '#c026d3', 700: '#a21caf', 800: '#86198f', 900: '#701a75', 950: '#4a044e' },
27
- pink: { 50: '#fdf2f8', 100: '#fce7f3', 200: '#fbcfe8', 300: '#f9a8d4', 400: '#f472b6', 500: '#ec4899', 600: '#db2777', 700: '#be185d', 800: '#9d174d', 900: '#831843', 950: '#500724' },
28
- rose: { 50: '#fff1f2', 100: '#ffe4e6', 200: '#fecdd3', 300: '#fda4af', 400: '#fb7185', 500: '#f43f5e', 600: '#e11d48', 700: '#be123c', 800: '#9f1239', 900: '#881337', 950: '#4c0519' },
29
- };
30
- // Browser-safe resolver functions
31
- function resolveColor(colorName, config) {
32
- // First check Tailwind palette (e.g., "blue-600")
33
- const colorMatch = colorName.match(/^(\w+)-(\d+)$/);
34
- if (colorMatch) {
35
- const [, name, shade] = colorMatch;
36
- if (TAILWIND_COLORS[name]?.[shade]) {
37
- return TAILWIND_COLORS[name][shade];
38
- }
39
- }
40
- // Check config
41
- if (!config?.theme)
42
- return null;
43
- // Check extend first
44
- const extendColors = config.theme.extend?.colors;
45
- if (extendColors?.[colorName])
46
- return extendColors[colorName];
47
- // Check base colors
48
- const baseColors = config.theme.colors;
49
- if (baseColors?.[colorName])
50
- return baseColors[colorName];
51
- return null;
52
- }
53
- function resolveSpacing(value, config) {
54
- if (!config?.theme)
55
- return null;
56
- const extendSpacing = config.theme.extend?.spacing;
57
- if (extendSpacing?.[value])
58
- return extendSpacing[value];
59
- const baseSpacing = config.theme.spacing;
60
- if (baseSpacing?.[value])
61
- return baseSpacing[value];
62
- return null;
63
- }
64
- function resolveFontSize(size, config) {
65
- if (!config?.theme)
66
- return null;
67
- const extendFontSize = config.theme.extend?.fontSize;
68
- if (extendFontSize?.[size]) {
69
- const val = extendFontSize[size];
70
- if (Array.isArray(val)) {
71
- return { fontSize: val[0], lineHeight: val[1] };
72
- }
73
- return { fontSize: val };
74
- }
75
- const baseFontSize = config.theme.fontSize;
76
- if (baseFontSize?.[size]) {
77
- const val = baseFontSize[size];
78
- if (Array.isArray(val)) {
79
- return { fontSize: val[0], lineHeight: val[1] };
80
- }
81
- return { fontSize: val };
82
- }
83
- return null;
84
- }
85
- function resolveBorderRadius(value, config) {
86
- if (!config?.theme)
87
- return null;
88
- const extendRadius = config.theme.extend?.borderRadius;
89
- if (extendRadius?.[value])
90
- return extendRadius[value];
91
- const baseRadius = config.theme.borderRadius;
92
- if (baseRadius?.[value])
93
- return baseRadius[value];
94
- return null;
95
- }
96
- /**
97
- * Tailwind class to style property mapping
98
- */
99
- const TAILWIND_MAP = {
100
- // Display
101
- 'flex': { display: 'flex' },
102
- 'inline-flex': { display: 'inline-flex' },
103
- 'block': { display: 'block' },
104
- 'inline-block': { display: 'inline-block' },
105
- 'hidden': { display: 'none' },
106
- 'contents': { display: 'contents' },
107
- // Position
108
- 'static': { position: 'static' },
109
- 'relative': { position: 'relative' },
110
- 'absolute': { position: 'absolute' },
111
- // Overflow
112
- 'overflow-visible': { overflow: 'visible' },
113
- 'overflow-hidden': { overflow: 'hidden' },
114
- // Flex Direction
115
- 'flex-row': { flexDirection: 'row' },
116
- 'flex-col': { flexDirection: 'column' },
117
- 'flex-row-reverse': { flexDirection: 'row-reverse' },
118
- 'flex-col-reverse': { flexDirection: 'column-reverse' },
119
- // Flex Wrap
120
- 'flex-wrap': { flexWrap: 'wrap' },
121
- 'flex-nowrap': { flexWrap: 'nowrap' },
122
- 'flex-wrap-reverse': { flexWrap: 'wrap-reverse' },
123
- // Flex
124
- 'flex-1': { flex: '1 1 0%' },
125
- 'flex-auto': { flex: '1 1 auto' },
126
- 'flex-initial': { flex: '0 1 auto' },
127
- 'flex-none': { flex: 'none' },
128
- // Justify Content
129
- 'justify-start': { justifyContent: 'flex-start' },
130
- 'justify-end': { justifyContent: 'flex-end' },
131
- 'justify-center': { justifyContent: 'center' },
132
- 'justify-between': { justifyContent: 'space-between' },
133
- 'justify-around': { justifyContent: 'space-around' },
134
- 'justify-evenly': { justifyContent: 'space-evenly' },
135
- // Align Items
136
- 'items-start': { alignItems: 'flex-start' },
137
- 'items-end': { alignItems: 'flex-end' },
138
- 'items-center': { alignItems: 'center' },
139
- 'items-baseline': { alignItems: 'baseline' },
140
- 'items-stretch': { alignItems: 'stretch' },
141
- // Width & Height
142
- 'w-full': { width: '100%' },
143
- 'h-full': { height: '100%' },
144
- 'w-screen': { width: '100vw' },
145
- 'h-screen': { height: '100vh' },
146
- 'w-auto': { width: 'auto' },
147
- 'h-auto': { height: 'auto' },
148
- // Text Alignment
149
- 'text-left': { textAlign: 'left' },
150
- 'text-center': { textAlign: 'center' },
151
- 'text-right': { textAlign: 'right' },
152
- 'text-justify': { textAlign: 'justify' },
153
- // Font Weight
154
- 'font-thin': { fontWeight: 100 },
155
- 'font-extralight': { fontWeight: 200 },
156
- 'font-light': { fontWeight: 300 },
157
- 'font-normal': { fontWeight: 400 },
158
- 'font-medium': { fontWeight: 500 },
159
- 'font-semibold': { fontWeight: 600 },
160
- 'font-bold': { fontWeight: 700 },
161
- 'font-extrabold': { fontWeight: 800 },
162
- 'font-black': { fontWeight: 900 },
163
- // Font Style
164
- 'italic': { fontStyle: 'italic' },
165
- 'not-italic': { fontStyle: 'normal' },
166
- // Colors
167
- 'text-white': { color: '#ffffff' },
168
- 'text-black': { color: '#000000' },
169
- 'bg-white': { background: '#ffffff' },
170
- 'bg-black': { background: '#000000' },
171
- 'bg-transparent': { background: 'transparent' },
172
- // Rounded
173
- 'rounded': { borderRadius: '0.25rem' },
174
- 'rounded-none': { borderRadius: '0' },
175
- 'rounded-sm': { borderRadius: '0.125rem' },
176
- 'rounded-md': { borderRadius: '0.375rem' },
177
- 'rounded-lg': { borderRadius: '0.5rem' },
178
- 'rounded-xl': { borderRadius: '0.75rem' },
179
- 'rounded-2xl': { borderRadius: '1rem' },
180
- 'rounded-3xl': { borderRadius: '1.5rem' },
181
- 'rounded-full': { borderRadius: '9999px' },
182
- };
183
- // Spacing scale
184
- const SPACING_SCALE = {
185
- '0': '0px',
186
- '1': '0.25rem',
187
- '2': '0.5rem',
188
- '3': '0.75rem',
189
- '4': '1rem',
190
- '5': '1.25rem',
191
- '6': '1.5rem',
192
- '8': '2rem',
193
- '10': '2.5rem',
194
- '12': '3rem',
195
- '16': '4rem',
196
- '20': '5rem',
197
- '24': '6rem',
198
- '32': '8rem',
199
- '40': '10rem',
200
- '48': '12rem',
201
- '56': '14rem',
202
- '64': '16rem',
203
- };
204
- // Font size map
205
- const FONT_SIZE_MAP = {
206
- 'text-xs': { fontSize: '0.75rem', lineHeight: '1rem' },
207
- 'text-sm': { fontSize: '0.875rem', lineHeight: '1.25rem' },
208
- 'text-base': { fontSize: '1rem', lineHeight: '1.5rem' },
209
- 'text-lg': { fontSize: '1.125rem', lineHeight: '1.75rem' },
210
- 'text-xl': { fontSize: '1.25rem', lineHeight: '1.75rem' },
211
- 'text-2xl': { fontSize: '1.5rem', lineHeight: '2rem' },
212
- 'text-3xl': { fontSize: '1.875rem', lineHeight: '2.25rem' },
213
- 'text-4xl': { fontSize: '2.25rem', lineHeight: '2.5rem' },
214
- 'text-5xl': { fontSize: '3rem', lineHeight: '1' },
215
- 'text-6xl': { fontSize: '3.75rem', lineHeight: '1' },
216
- 'text-7xl': { fontSize: '4.5rem', lineHeight: '1' },
217
- 'text-8xl': { fontSize: '6rem', lineHeight: '1' },
218
- 'text-9xl': { fontSize: '8rem', lineHeight: '1' },
219
- };
220
- /**
221
- * Interpolate linearly between spring keyframes
222
- * Based on CSS linear() spring easing
223
- */
224
- function interpolateSpringKeyframes(t) {
225
- // Spring keyframes: [progress, value] pairs
226
- const keyframes = [
227
- [0, 0],
228
- [0.0115, 0.0069],
229
- [0.023, 0.026],
230
- [0.0518, 0.1135],
231
- [0.0778, 0.2229],
232
- [0.1584, 0.5977],
233
- [0.1783, 0.7014],
234
- [0.1982, 0.7904],
235
- [0.2181, 0.8641],
236
- [0.238, 0.9228],
237
- [0.288, 0.9676],
238
- [0.3168, 1.0032],
239
- [0.3367, 1.0225],
240
- [0.3629, 1.0352],
241
- [0.3888, 1.0431],
242
- [0.4205, 1.046],
243
- [0.4435, 1.0448],
244
- [0.4723, 1.0407],
245
- [0.6163, 1.0118],
246
- [0.6941, 1.0025],
247
- [0.8035, 0.9981],
248
- [0.9994, 0.9992],
249
- [1, 1]
250
- ];
251
- // Find the two keyframes to interpolate between
252
- for (let i = 0; i < keyframes.length - 1; i++) {
253
- const [t1, v1] = keyframes[i];
254
- const [t2, v2] = keyframes[i + 1];
255
- if (t >= t1 && t <= t2) {
256
- // Linear interpolation between keyframes
257
- const progress = (t - t1) / (t2 - t1);
258
- return v1 + (v2 - v1) * progress;
259
- }
260
- }
261
- return t < 0.5 ? 0 : 1;
262
- }
263
- /**
264
- * Generate a spring easing function with custom parameters
265
- * Based on kvin.me/css-springs implementation
266
- * @param mass - Mass of the spring (default: 1)
267
- * @param stiffness - Stiffness of the spring (default: 100)
268
- * @param damping - Damping coefficient (default: 10)
269
- * @param velocity - Initial velocity (default: 0)
270
- * @returns Spring easing function
271
- */
272
- function generateSpringEasing(mass = 1, stiffness = 100, damping = 10, velocity = 0) {
273
- const w0 = Math.sqrt(stiffness / mass);
274
- const zeta = damping / (2 * Math.sqrt(stiffness * mass));
275
- const wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0;
276
- const b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0;
277
- function solver(t) {
278
- let result;
279
- if (zeta < 1) {
280
- result = Math.exp(-t * zeta * w0) * (1 * Math.cos(wd * t) + b * Math.sin(wd * t));
281
- }
282
- else {
283
- result = (1 + b * t) * Math.exp(-t * w0);
284
- }
285
- return 1 - result;
286
- }
287
- // Calculate ideal duration (when spring settles)
288
- const duration = (() => {
289
- const step = 1 / 6;
290
- let time = 0;
291
- while (true) {
292
- if (Math.abs(1 - solver(time)) < 0.001) {
293
- const restStart = time;
294
- let restSteps = 1;
295
- while (true) {
296
- time += step;
297
- if (Math.abs(1 - solver(time)) >= 0.001)
298
- break;
299
- restSteps++;
300
- if (restSteps === 16)
301
- return restStart;
302
- }
303
- }
304
- time += step;
305
- }
306
- })();
307
- // Return easing function normalized to 0-1 range
308
- return (t) => solver(duration * t);
309
- }
310
- // Easing functions
311
- const easingFunctions = {
312
- 'linear': (t) => t,
313
- 'ease-in': (t) => t * t,
314
- 'ease-out': (t) => t * (2 - t),
315
- 'ease-in-out': (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t,
316
- 'ease-in-cubic': (t) => t * t * t,
317
- 'ease-out-cubic': (t) => (--t) * t * t + 1,
318
- 'ease-in-out-cubic': (t) => t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
319
- 'ease-in-quart': (t) => t * t * t * t,
320
- 'ease-out-quart': (t) => 1 - (--t) * t * t * t,
321
- 'ease-in-out-quart': (t) => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t,
322
- 'spring': interpolateSpringKeyframes,
323
- };
324
- function hexToRgba(hex, opacity) {
325
- const cleanHex = hex.replace('#', '');
326
- const r = parseInt(cleanHex.substring(0, 2), 16);
327
- const g = parseInt(cleanHex.substring(2, 4), 16);
328
- const b = parseInt(cleanHex.substring(4, 6), 16);
329
- return `rgba(${r}, ${g}, ${b}, ${opacity})`;
330
- }
331
- function parseTimeValue(value) {
332
- if (value.startsWith('[') && value.endsWith(']')) {
333
- const inner = value.slice(1, -1);
334
- if (inner.endsWith('ms')) {
335
- return parseFloat(inner.slice(0, -2));
336
- }
337
- else if (inner.endsWith('s')) {
338
- return parseFloat(inner.slice(0, -1)) * 1000;
339
- }
340
- return parseFloat(inner);
341
- }
342
- return parseFloat(value);
343
- }
344
- function parseClass(className, tailwindConfig = null, loopwindConfig = null) {
345
- if (TAILWIND_MAP[className]) {
346
- return TAILWIND_MAP[className];
347
- }
348
- // Handle font-family classes (font-sans, font-serif, font-mono)
349
- const fontFamilyMatch = className.match(/^font-(sans|serif|mono)$/);
350
- if (fontFamilyMatch) {
351
- const fontType = fontFamilyMatch[1];
352
- // Check loopwindConfig for custom font definitions
353
- if (loopwindConfig?.fonts?.[fontType]) {
354
- const fontDef = loopwindConfig.fonts[fontType];
355
- // Could be array format or object with family
356
- let familyArray;
357
- if (Array.isArray(fontDef)) {
358
- familyArray = fontDef;
359
- }
360
- else if (fontDef.family) {
361
- familyArray = fontDef.family;
362
- }
363
- else {
364
- familyArray = [];
365
- }
366
- if (familyArray.length > 0) {
367
- const fontFamily = familyArray.map(f => f.includes(' ') ? `'${f}'` : f).join(', ');
368
- return { fontFamily };
369
- }
370
- }
371
- // Default fallbacks if not in loopwindConfig (Inter is bundled with loopwind)
372
- const defaultFonts = {
373
- 'sans': "Inter, ui-sans-serif, system-ui, sans-serif",
374
- 'serif': "ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif",
375
- 'mono': "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, monospace"
376
- };
377
- return { fontFamily: defaultFonts[fontType] };
378
- }
379
- // Parse arbitrary values like text-[62px], w-[200px], etc.
380
- const arbitraryFontMatch = className.match(/^text-\[(.+)\]$/);
381
- if (arbitraryFontMatch) {
382
- return { fontSize: arbitraryFontMatch[1] };
383
- }
384
- const arbitraryWidthMatch = className.match(/^w-\[(.+)\]$/);
385
- if (arbitraryWidthMatch) {
386
- return { width: arbitraryWidthMatch[1] };
387
- }
388
- const arbitraryHeightMatch = className.match(/^h-\[(.+)\]$/);
389
- if (arbitraryHeightMatch) {
390
- return { height: arbitraryHeightMatch[1] };
391
- }
392
- const arbitraryPaddingMatch = className.match(/^(p)(x|y|t|b|l|r)?-\[(.+)\]$/);
393
- if (arbitraryPaddingMatch) {
394
- const [, , direction, value] = arbitraryPaddingMatch;
395
- if (!direction)
396
- return { padding: value };
397
- if (direction === 'x')
398
- return { paddingLeft: value, paddingRight: value };
399
- if (direction === 'y')
400
- return { paddingTop: value, paddingBottom: value };
401
- const dirMap = { t: 'Top', b: 'Bottom', l: 'Left', r: 'Right' };
402
- return { [`padding${dirMap[direction]}`]: value };
403
- }
404
- const arbitraryMarginMatch = className.match(/^(m)(x|y|t|b|l|r)?-\[(.+)\]$/);
405
- if (arbitraryMarginMatch) {
406
- const [, , direction, value] = arbitraryMarginMatch;
407
- if (!direction)
408
- return { margin: value };
409
- if (direction === 'x')
410
- return { marginLeft: value, marginRight: value };
411
- if (direction === 'y')
412
- return { marginTop: value, marginBottom: value };
413
- const dirMap = { t: 'Top', b: 'Bottom', l: 'Left', r: 'Right' };
414
- return { [`margin${dirMap[direction]}`]: value };
415
- }
416
- const arbitraryGapMatch = className.match(/^gap(-x|-y)?-\[(.+)\]$/);
417
- if (arbitraryGapMatch) {
418
- const [, direction, value] = arbitraryGapMatch;
419
- if (!direction)
420
- return { gap: value };
421
- if (direction === '-x')
422
- return { columnGap: value };
423
- if (direction === '-y')
424
- return { rowGap: value };
425
- }
426
- const arbitraryRoundedMatch = className.match(/^rounded-\[(.+)\]$/);
427
- if (arbitraryRoundedMatch) {
428
- return { borderRadius: arbitraryRoundedMatch[1] };
429
- }
430
- const arbitraryLeadingMatch = className.match(/^leading-\[(.+)\]$/);
431
- if (arbitraryLeadingMatch) {
432
- return { lineHeight: arbitraryLeadingMatch[1] };
433
- }
434
- const arbitraryTrackingMatch = className.match(/^tracking-\[(.+)\]$/);
435
- if (arbitraryTrackingMatch) {
436
- return { letterSpacing: arbitraryTrackingMatch[1] };
437
- }
438
- // Parse font sizes
439
- const fontSizeMatch = className.match(/^text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/);
440
- if (fontSizeMatch) {
441
- const size = fontSizeMatch[1];
442
- const configSize = resolveFontSize(size, tailwindConfig);
443
- if (configSize)
444
- return configSize;
445
- if (FONT_SIZE_MAP[className])
446
- return FONT_SIZE_MAP[className];
447
- }
448
- // Parse padding/margin
449
- const spacingMatch = className.match(/^(p|m)(x|y|t|b|l|r)?-(\d+|px)$/);
450
- if (spacingMatch) {
451
- const [, type, direction, value] = spacingMatch;
452
- let size = resolveSpacing(value, tailwindConfig) || SPACING_SCALE[value] || `${parseInt(value) * 0.25}rem`;
453
- const prop = type === 'p' ? 'padding' : 'margin';
454
- if (!direction) {
455
- return { [prop]: size };
456
- }
457
- else if (direction === 'x') {
458
- return { [`${prop}Left`]: size, [`${prop}Right`]: size };
459
- }
460
- else if (direction === 'y') {
461
- return { [`${prop}Top`]: size, [`${prop}Bottom`]: size };
462
- }
463
- else {
464
- const dirMap = { t: 'Top', b: 'Bottom', l: 'Left', r: 'Right' };
465
- return { [`${prop}${dirMap[direction]}`]: size };
466
- }
467
- }
468
- // Parse width/height
469
- const sizeMatch = className.match(/^(w|h)-(\d+)$/);
470
- if (sizeMatch) {
471
- const [, prop, value] = sizeMatch;
472
- const size = resolveSpacing(value, tailwindConfig) || SPACING_SCALE[value] || `${parseInt(value) * 0.25}rem`;
473
- return { [prop === 'w' ? 'width' : 'height']: size };
474
- }
475
- // Parse gap
476
- const gapMatch = className.match(/^gap(-x|-y)?-(\d+)$/);
477
- if (gapMatch) {
478
- const [, direction, value] = gapMatch;
479
- const size = resolveSpacing(value, tailwindConfig) || SPACING_SCALE[value] || `${parseInt(value) * 0.25}rem`;
480
- if (!direction) {
481
- return { gap: size };
482
- }
483
- else if (direction === '-x') {
484
- return { columnGap: size };
485
- }
486
- else if (direction === '-y') {
487
- return { rowGap: size };
488
- }
489
- }
490
- // Parse opacity
491
- const opacityMatch = className.match(/^opacity-(\d+)$/);
492
- if (opacityMatch) {
493
- return { opacity: parseInt(opacityMatch[1]) / 100 };
494
- }
495
- // Parse colors with opacity modifier
496
- const bgMatch = className.match(/^bg-([\w-]+)(?:\/(\d+))?$/);
497
- if (bgMatch) {
498
- const colorName = bgMatch[1];
499
- const opacityValue = bgMatch[2];
500
- let color = resolveColor(colorName, tailwindConfig);
501
- if (!color && loopwindConfig?.colors?.[colorName]) {
502
- color = loopwindConfig.colors[colorName];
503
- }
504
- if (color) {
505
- if (opacityValue) {
506
- const opacity = parseInt(opacityValue) / 100;
507
- const hex = color.replace('#', '');
508
- const r = parseInt(hex.substring(0, 2), 16);
509
- const g = parseInt(hex.substring(2, 4), 16);
510
- const b = parseInt(hex.substring(4, 6), 16);
511
- return { background: `rgba(${r}, ${g}, ${b}, ${opacity})` };
512
- }
513
- return { background: color };
514
- }
515
- }
516
- const textMatch = className.match(/^text-([\w-]+)(?:\/(\d+))?$/);
517
- if (textMatch) {
518
- const colorName = textMatch[1];
519
- const opacityValue = textMatch[2];
520
- let color = resolveColor(colorName, tailwindConfig);
521
- if (!color && loopwindConfig?.colors?.[colorName]) {
522
- color = loopwindConfig.colors[colorName];
523
- }
524
- if (color) {
525
- if (opacityValue) {
526
- const opacity = parseInt(opacityValue) / 100;
527
- const hex = color.replace('#', '');
528
- const r = parseInt(hex.substring(0, 2), 16);
529
- const g = parseInt(hex.substring(2, 4), 16);
530
- const b = parseInt(hex.substring(4, 6), 16);
531
- return { color: `rgba(${r}, ${g}, ${b}, ${opacity})` };
532
- }
533
- return { color: color };
534
- }
535
- }
536
- // Parse gradients
537
- const gradientMatch = className.match(/^bg-(?:gradient|linear)-to-(t|b|l|r|tr|tl|br|bl)$/);
538
- if (gradientMatch) {
539
- const normalizedClass = className.replace('bg-linear-to-', 'bg-gradient-to-');
540
- return { __gradientDirection: normalizedClass };
541
- }
542
- const gradientStopMatch = className.match(/^(from|via|to)-([\w-]+)(?:\/(\d+))?$/);
543
- if (gradientStopMatch) {
544
- const [, position, colorName, opacityValue] = gradientStopMatch;
545
- let color = resolveColor(colorName, tailwindConfig);
546
- if (!color && loopwindConfig?.colors?.[colorName]) {
547
- color = loopwindConfig.colors[colorName];
548
- }
549
- if (color) {
550
- let finalColor = color;
551
- if (opacityValue) {
552
- const opacity = parseInt(opacityValue) / 100;
553
- const hex = color.replace('#', '');
554
- const r = parseInt(hex.substring(0, 2), 16);
555
- const g = parseInt(hex.substring(2, 4), 16);
556
- const b = parseInt(hex.substring(4, 6), 16);
557
- finalColor = `rgba(${r}, ${g}, ${b}, ${opacity})`;
558
- }
559
- return { [`__gradient${position.charAt(0).toUpperCase() + position.slice(1)}`]: finalColor };
560
- }
561
- }
562
- return {};
563
- }
564
- function parseAnimationClass(className, context, easing, customEasingFunctions = {}) {
565
- const { frame = 0, totalFrames = 100, durationMs = 3000 } = context;
566
- const allEasingFunctions = { ...easingFunctions, ...customEasingFunctions };
567
- const easeFn = allEasingFunctions[easing] || allEasingFunctions['ease-out'];
568
- const currentMs = (frame / totalFrames) * durationMs;
569
- // Enter animations
570
- const enterMatch = className.match(/^enter-([\w-]+)(?:\/(\[[\d.]+(?:ms|s)?\]|\d+)\/(\[[\d.]+(?:ms|s)?\]|\d+))?$/);
571
- if (enterMatch) {
572
- const [, type, startStr, durationStr] = enterMatch;
573
- const startMs = startStr ? parseTimeValue(startStr) : 0;
574
- const animDurationMs = durationStr ? parseTimeValue(durationStr) : durationMs;
575
- const endMs = startMs + animDurationMs;
576
- let localProgress = 0;
577
- if (currentMs <= startMs) {
578
- localProgress = 0;
579
- }
580
- else if (currentMs >= endMs) {
581
- localProgress = 1;
582
- }
583
- else {
584
- localProgress = (currentMs - startMs) / animDurationMs;
585
- }
586
- const easedProgress = easeFn(localProgress);
587
- return getEnterAnimationStyles(type, easedProgress);
588
- }
589
- // Exit animations
590
- const exitMatch = className.match(/^exit-([\w-]+)(?:\/(\[[\d.]+(?:ms|s)?\]|\d+)\/(\[[\d.]+(?:ms|s)?\]|\d+))?$/);
591
- if (exitMatch) {
592
- const [, type, startStr, durationStr] = exitMatch;
593
- const startMs = startStr ? parseTimeValue(startStr) : 0;
594
- const animDurationMs = durationStr ? parseTimeValue(durationStr) : durationMs;
595
- const endMs = startMs + animDurationMs;
596
- let localProgress = 0;
597
- if (currentMs <= startMs) {
598
- localProgress = 0;
599
- }
600
- else if (currentMs >= endMs) {
601
- localProgress = 1;
602
- }
603
- else {
604
- localProgress = (currentMs - startMs) / animDurationMs;
605
- }
606
- const easedProgress = easeFn(localProgress);
607
- return getExitAnimationStyles(type, easedProgress);
608
- }
609
- // Loop animations
610
- const loopMatch = className.match(/^loop-([\w-]+)(?:\/(\[[\d.]+(?:ms|s)?\]|\d+))?$/);
611
- if (loopMatch) {
612
- const [, type, loopDurationStr] = loopMatch;
613
- const loopDurationMs = loopDurationStr ? parseTimeValue(loopDurationStr) : 1000;
614
- const loopProgress = (currentMs % loopDurationMs) / loopDurationMs;
615
- return getLoopAnimationStyles(type, loopProgress);
616
- }
617
- return null;
618
- }
619
- function getEnterAnimationStyles(type, easedProgress) {
620
- switch (type) {
621
- case 'fade-in':
622
- return { opacity: easedProgress };
623
- case 'fade-in-up':
624
- return { transform: `translateY(${(1 - easedProgress) * 30}px)`, opacity: easedProgress };
625
- case 'fade-in-down':
626
- return { transform: `translateY(${(1 - easedProgress) * -30}px)`, opacity: easedProgress };
627
- case 'fade-in-left':
628
- return { transform: `translateX(${(1 - easedProgress) * -30}px)`, opacity: easedProgress };
629
- case 'fade-in-right':
630
- return { transform: `translateX(${(1 - easedProgress) * 30}px)`, opacity: easedProgress };
631
- case 'slide-up':
632
- return { transform: `translateY(${(1 - easedProgress) * 100}px)`, opacity: easedProgress };
633
- case 'slide-down':
634
- return { transform: `translateY(${(1 - easedProgress) * -100}px)`, opacity: easedProgress };
635
- case 'slide-left':
636
- return { transform: `translateX(${(1 - easedProgress) * -100}px)`, opacity: easedProgress };
637
- case 'slide-right':
638
- return { transform: `translateX(${(1 - easedProgress) * 100}px)`, opacity: easedProgress };
639
- case 'scale-in':
640
- return { transform: `scale(${0.5 + easedProgress * 0.5})`, opacity: easedProgress };
641
- case 'zoom-in':
642
- return { transform: `scale(${easedProgress})`, opacity: easedProgress };
643
- case 'bounce-in': {
644
- const bounce = easedProgress < 0.7
645
- ? easedProgress / 0.7 * 1.1
646
- : 1.1 - Math.sin((easedProgress - 0.7) / 0.3 * Math.PI / 2) * 0.1;
647
- return { transform: `scale(${bounce})`, opacity: Math.min(1, easedProgress * 2) };
648
- }
649
- case 'bounce-in-up': {
650
- const bounceY = easedProgress < 0.7
651
- ? (1 - easedProgress / 0.7) * 50 - (easedProgress / 0.7) * 8
652
- : -8 + (easedProgress - 0.7) / 0.3 * 8;
653
- return { transform: `translateY(${bounceY}px)`, opacity: Math.min(1, easedProgress * 2) };
654
- }
655
- default:
656
- return null;
657
- }
658
- }
659
- function getExitAnimationStyles(type, easedProgress) {
660
- switch (type) {
661
- case 'fade-out':
662
- return { opacity: 1 - easedProgress };
663
- case 'fade-out-up':
664
- return { transform: `translateY(${easedProgress * -30}px)`, opacity: 1 - easedProgress };
665
- case 'fade-out-down':
666
- return { transform: `translateY(${easedProgress * 30}px)`, opacity: 1 - easedProgress };
667
- default:
668
- return null;
669
- }
670
- }
671
- function getLoopAnimationStyles(type, loopProgress) {
672
- switch (type) {
673
- case 'fade': {
674
- const pulseValue = 0.5 + Math.sin(loopProgress * Math.PI * 2) * 0.5;
675
- return { opacity: pulseValue };
676
- }
677
- case 'bounce': {
678
- const bounceY = Math.abs(Math.sin(loopProgress * Math.PI)) * -20;
679
- return { transform: `translateY(${bounceY}px)` };
680
- }
681
- case 'spin': {
682
- const spinAngle = loopProgress * 360;
683
- return { transform: `rotate(${spinAngle}deg)` };
684
- }
685
- case 'ping': {
686
- const pingScale = 1 + loopProgress;
687
- const pingOpacity = 1 - loopProgress;
688
- return { transform: `scale(${pingScale})`, opacity: pingOpacity };
689
- }
690
- case 'float': {
691
- const floatY = Math.sin(loopProgress * Math.PI * 2) * 10;
692
- return { transform: `translateY(${floatY}px)` };
693
- }
694
- case 'pulse': {
695
- const pulseScale = 1 + Math.sin(loopProgress * Math.PI * 2) * 0.05;
696
- return { transform: `scale(${pulseScale})` };
697
- }
698
- default:
699
- return null;
700
- }
701
- }
702
- export function tw(classes, tailwindConfig = null, loopwindConfig = null, animationContext = {}) {
703
- const classArray = classes.split(' ').filter(Boolean);
704
- let styles = {};
705
- let gradientData = {};
706
- let transforms = [];
707
- let animationOpacities = [];
708
- // Default easing (backwards compatible - applies to all animations)
709
- let defaultEasing = 'ease-out';
710
- // Per-animation-type easing (overrides default for specific types)
711
- let enterEasing = null;
712
- let exitEasing = null;
713
- let loopEasing = null;
714
- // Custom spring easing functions (generated on-demand)
715
- const customEasingFunctions = {};
716
- for (const className of classArray) {
717
- // Check for configurable spring easing: spring/mass/stiffness/damping
718
- const springConfigMatch = className.match(/^(enter-ease-|exit-ease-|loop-ease-)?spring\/([^\/]+)\/([^\/]+)\/([^\/]+)$/);
719
- if (springConfigMatch) {
720
- const [, prefix, massStr, stiffnessStr, dampingStr] = springConfigMatch;
721
- const mass = parseFloat(massStr);
722
- const stiffness = parseFloat(stiffnessStr);
723
- const damping = parseFloat(dampingStr);
724
- if (!isNaN(mass) && !isNaN(stiffness) && !isNaN(damping)) {
725
- const customSpring = generateSpringEasing(mass, stiffness, damping);
726
- const customKey = `spring-${mass}-${stiffness}-${damping}`;
727
- customEasingFunctions[customKey] = customSpring;
728
- if (prefix === 'enter-ease-') {
729
- enterEasing = customKey;
730
- }
731
- else if (prefix === 'exit-ease-') {
732
- exitEasing = customKey;
733
- }
734
- else if (prefix === 'loop-ease-') {
735
- loopEasing = customKey;
736
- }
737
- else {
738
- defaultEasing = customKey;
739
- }
740
- }
741
- continue;
742
- }
743
- // Check for default easing modifier (applies to all animations)
744
- if (easingFunctions[className]) {
745
- defaultEasing = className;
746
- continue;
747
- }
748
- // Check for per-animation-type easing modifiers
749
- const enterEasingMatch = className.match(/^enter-ease-(.+)$/);
750
- if (enterEasingMatch) {
751
- const easingName = enterEasingMatch[1];
752
- if (easingFunctions[easingName]) {
753
- enterEasing = easingName;
754
- }
755
- continue;
756
- }
757
- const exitEasingMatch = className.match(/^exit-ease-(.+)$/);
758
- if (exitEasingMatch) {
759
- const easingName = exitEasingMatch[1];
760
- if (easingFunctions[easingName]) {
761
- exitEasing = easingName;
762
- }
763
- continue;
764
- }
765
- const loopEasingMatch = className.match(/^loop-ease-(.+)$/);
766
- if (loopEasingMatch) {
767
- const easingName = loopEasingMatch[1];
768
- if (easingFunctions[easingName]) {
769
- loopEasing = easingName;
770
- }
771
- continue;
772
- }
773
- // Determine which easing to use for this animation class
774
- let currentEasing = defaultEasing;
775
- if (className.startsWith('enter-') && enterEasing) {
776
- currentEasing = enterEasing;
777
- }
778
- else if (className.startsWith('exit-') && exitEasing) {
779
- currentEasing = exitEasing;
780
- }
781
- else if (className.startsWith('loop-') && loopEasing) {
782
- currentEasing = loopEasing;
783
- }
784
- // Merge custom easing functions with built-in ones for this animation
785
- const allEasingFunctions = { ...easingFunctions, ...customEasingFunctions };
786
- // Check for animation classes
787
- const animationResult = parseAnimationClass(className, animationContext, currentEasing, allEasingFunctions);
788
- if (animationResult) {
789
- if (animationResult.opacity !== undefined) {
790
- animationOpacities.push(animationResult.opacity);
791
- }
792
- if (animationResult.transform) {
793
- transforms.push(animationResult.transform);
794
- }
795
- if (animationResult.transformOrigin) {
796
- styles.transformOrigin = animationResult.transformOrigin;
797
- }
798
- continue;
799
- }
800
- const parsed = parseClass(className, tailwindConfig, loopwindConfig);
801
- // Collect gradient markers
802
- if (parsed.__gradientDirection) {
803
- gradientData.direction = parsed.__gradientDirection;
804
- }
805
- else if (parsed.__gradientFrom) {
806
- gradientData.from = parsed.__gradientFrom;
807
- }
808
- else if (parsed.__gradientVia) {
809
- gradientData.via = parsed.__gradientVia;
810
- }
811
- else if (parsed.__gradientTo) {
812
- gradientData.to = parsed.__gradientTo;
813
- }
814
- else if (parsed.transform) {
815
- transforms.push(parsed.transform);
816
- }
817
- else {
818
- styles = { ...styles, ...parsed };
819
- }
820
- }
821
- // Convert gradient data to backgroundImage
822
- if (gradientData.direction && (gradientData.from || gradientData.to)) {
823
- const directionMap = {
824
- 'bg-gradient-to-t': 'to top',
825
- 'bg-gradient-to-b': 'to bottom',
826
- 'bg-gradient-to-l': 'to left',
827
- 'bg-gradient-to-r': 'to right',
828
- 'bg-gradient-to-tr': 'to top right',
829
- 'bg-gradient-to-tl': 'to top left',
830
- 'bg-gradient-to-br': 'to bottom right',
831
- 'bg-gradient-to-bl': 'to bottom left',
832
- };
833
- const direction = directionMap[gradientData.direction] || 'to bottom';
834
- const stops = [];
835
- if (gradientData.from)
836
- stops.push(gradientData.from);
837
- if (gradientData.via)
838
- stops.push(gradientData.via);
839
- if (gradientData.to)
840
- stops.push(gradientData.to);
841
- styles.backgroundImage = `linear-gradient(${direction}, ${stops.join(', ')})`;
842
- }
843
- // Combine transforms
844
- if (transforms.length > 0) {
845
- styles.transform = transforms.join(' ');
846
- }
847
- // Combine animation opacities
848
- if (animationOpacities.length > 0) {
849
- styles.opacity = animationOpacities.reduce((acc, val) => acc * val, 1);
850
- }
851
- return styles;
852
- }
853
- //# sourceMappingURL=tailwind-browser.js.map