loopwind 0.23.0 → 0.24.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.
- package/README.md +13 -117
- package/dist/cli.js +16 -10
- package/dist/cli.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +6 -10
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/agent.d.ts +8 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +101 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +17 -7
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/render.d.ts.map +1 -1
- package/dist/commands/render.js +17 -19
- package/dist/commands/render.js.map +1 -1
- package/dist/default-templates/AGENTS.md +10 -24
- package/dist/lib/config.d.ts +2 -3
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +4 -9
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/constants.d.ts +1 -3
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +2 -4
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/installer.d.ts +2 -0
- package/dist/lib/installer.d.ts.map +1 -1
- package/dist/lib/installer.js +6 -7
- package/dist/lib/installer.js.map +1 -1
- package/dist/lib/renderer.d.ts.map +1 -1
- package/dist/lib/renderer.js +4 -1
- package/dist/lib/renderer.js.map +1 -1
- package/dist/lib/utils.d.ts +13 -29
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +45 -155
- package/dist/lib/utils.js.map +1 -1
- package/dist/types/config.d.ts +0 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js.map +1 -1
- package/package.json +1 -15
- package/REGISTRY_SETUP.md +0 -363
- package/dist/default-templates/image/template.d.ts +0 -20
- package/dist/default-templates/image/template.d.ts.map +0 -1
- package/dist/default-templates/image/template.js +0 -18
- package/dist/default-templates/image/template.js.map +0 -1
- package/dist/default-templates/image/template.tsx +0 -20
- package/dist/default-templates/kitchen-sink/template.tsx +0 -64
- package/dist/default-templates/page/template.tsx +0 -37
- package/dist/default-templates/video/template.d.ts +0 -26
- package/dist/default-templates/video/template.d.ts.map +0 -1
- package/dist/default-templates/video/template.js +0 -33
- package/dist/default-templates/video/template.js.map +0 -1
- package/dist/default-templates/video/template.tsx +0 -37
- package/dist/default-templates/website/pages/home.tsx +0 -17
- package/dist/default-templates/website/parts/footer.tsx +0 -17
- package/dist/default-templates/website/parts/header.tsx +0 -17
- package/dist/default-templates/website/template.tsx +0 -17
- package/dist/default-templates/website-template/pages/home.tsx +0 -13
- package/dist/default-templates/website-template/parts/footer.tsx +0 -15
- package/dist/default-templates/website-template/parts/header.tsx +0 -15
- package/dist/default-templates/website-template/template.tsx +0 -32
- package/dist/lib/encode-worker.d.ts +0 -2
- package/dist/lib/encode-worker.d.ts.map +0 -1
- package/dist/lib/encode-worker.js +0 -29
- package/dist/lib/encode-worker.js.map +0 -1
- package/dist/lib/mjpeg-muxer.d.ts +0 -46
- package/dist/lib/mjpeg-muxer.d.ts.map +0 -1
- package/dist/lib/mjpeg-muxer.js +0 -513
- package/dist/lib/mjpeg-muxer.js.map +0 -1
- package/dist/lib/render-core.d.ts +0 -63
- package/dist/lib/render-core.d.ts.map +0 -1
- package/dist/lib/render-core.js +0 -65
- package/dist/lib/render-core.js.map +0 -1
- package/dist/lib/tailwind-browser.d.ts +0 -27
- package/dist/lib/tailwind-browser.d.ts.map +0 -1
- package/dist/lib/tailwind-browser.js +0 -853
- package/dist/lib/tailwind-browser.js.map +0 -1
- package/dist/lib/video-player.d.ts +0 -25
- package/dist/lib/video-player.d.ts.map +0 -1
- package/dist/lib/video-player.js +0 -392
- package/dist/lib/video-player.js.map +0 -1
- package/dist/sdk/compiler.d.ts +0 -94
- package/dist/sdk/compiler.d.ts.map +0 -1
- package/dist/sdk/compiler.js +0 -122
- package/dist/sdk/compiler.js.map +0 -1
- package/dist/sdk/edge/index.d.ts +0 -91
- package/dist/sdk/edge/index.d.ts.map +0 -1
- package/dist/sdk/edge/index.js +0 -187
- package/dist/sdk/edge/index.js.map +0 -1
- package/dist/sdk/index.d.ts +0 -62
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js +0 -141
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/preview.d.ts +0 -65
- package/dist/sdk/preview.d.ts.map +0 -1
- package/dist/sdk/preview.js +0 -262
- package/dist/sdk/preview.js.map +0 -1
- package/dist/sdk/template.d.ts +0 -162
- package/dist/sdk/template.d.ts.map +0 -1
- package/dist/sdk/template.js +0 -231
- package/dist/sdk/template.js.map +0 -1
- package/dist/sdk/workers/index.d.ts +0 -135
- package/dist/sdk/workers/index.d.ts.map +0 -1
- package/dist/sdk/workers/index.js +0 -271
- package/dist/sdk/workers/index.js.map +0 -1
- package/dist/sdk/workers/tailwind-config.d.ts +0 -48
- package/dist/sdk/workers/tailwind-config.d.ts.map +0 -1
- package/dist/sdk/workers/tailwind-config.js +0 -187
- package/dist/sdk/workers/tailwind-config.js.map +0 -1
- package/dist/sdk/workers/tailwind.d.ts +0 -9
- package/dist/sdk/workers/tailwind.d.ts.map +0 -1
- package/dist/sdk/workers/tailwind.js +0 -8
- package/dist/sdk/workers/tailwind.js.map +0 -1
- package/examples/code-editor-templates.ts +0 -173
- package/examples/nextjs-api/README.md +0 -180
- package/examples/nextjs-api/package.json +0 -21
- package/examples/nextjs-api/pages/api/intro-video.ts +0 -53
- package/examples/nextjs-api/pages/api/og-image.ts +0 -50
- package/examples/nextjs-template-import.ts +0 -58
- package/examples/sdk-video-preview.tsx +0 -120
- package/examples/template-compiler-workflow.ts +0 -251
- package/examples/visual-builder-templates.ts +0 -336
- package/render-examples-600x400.mjs +0 -161
- package/render-spring-variants-fixed.mjs +0 -60
- package/render-staggered-text.mjs +0 -56
- package/test-cloudflare-worker/README.md +0 -64
- package/test-cloudflare-worker/dist/README.md +0 -1
- package/test-cloudflare-worker/dist/index.js +0 -23743
- package/test-cloudflare-worker/dist/index.js.map +0 -8
- package/test-cloudflare-worker/package-lock.json +0 -1773
- package/test-cloudflare-worker/package.json +0 -25
- package/test-cloudflare-worker/test-sdk.mjs +0 -75
- package/test-cloudflare-worker/wrangler.toml +0 -14
- package/test-font-files.mjs +0 -72
- package/test-jsx-support.mjs +0 -146
- package/test-sdk-config.mjs +0 -454
- package/test-sdk-source-config.mjs +0 -427
- package/test-sdk-user-templates.mjs +0 -469
- package/test-static-debug.tsx +0 -19
- package/test-templates/TESTS.md +0 -63
- package/test-templates/config-test.mjs +0 -17
- package/test-templates/demo-intro-props.json +0 -4
- package/test-templates/run-tests.sh +0 -44
- package/test-templates/test-sdk.mjs +0 -139
- package/test-video-720p.mjs +0 -96
- package/test-video-breakdown.mjs +0 -98
- package/test-video-perf-1080.mjs +0 -67
- package/test-video-perf.mjs +0 -56
- package/test-video-props.json +0 -3
- package/test-worker-1080p.mjs +0 -103
- package/test-worker-viability.mjs +0 -140
- package/website/.astro/content.db +0 -0
- package/website/.astro/integrations/_inox-tools_astro-when/types.d.ts +0 -1
- package/website/.astro/integrations/astro_db/db.d.ts +0 -15
- package/website/.astro/settings.json +0 -5
- package/website/.astro/types.d.ts +0 -2
- package/website/DEPLOYMENT.md +0 -143
- package/website/OG_IMAGES.md +0 -142
- package/website/README.md +0 -158
- package/website/astro.config.mjs +0 -41
- package/website/dist/.gitkeep +0 -5
- package/website/dist/_astro/PlaygroundEditor.DzFavsm8.js +0 -26
- package/website/dist/_astro/VideoPreviewClient.BrajhYmh.js +0 -1
- package/website/dist/_astro/agents.CZXv4DCM.css +0 -1
- package/website/dist/_astro/client.BHSq4mdQ.js +0 -33
- package/website/dist/_astro/index.CTbGshLK.js +0 -9
- package/website/dist/_astro/jsx-runtime.BjG_zV1W.js +0 -9
- package/website/dist/_routes.json +0 -31
- package/website/dist/_worker.js/_@astrojs-ssr-adapter.mjs +0 -1033
- package/website/dist/_worker.js/_astro-internal_middleware.mjs +0 -40
- package/website/dist/_worker.js/chunks/Logo_Cud5QvBJ.mjs +0 -22
- package/website/dist/_worker.js/chunks/_@astro-renderers_-YVK7NHa.mjs +0 -15015
- package/website/dist/_worker.js/chunks/abap_BTmsHiP5.mjs +0 -1
- package/website/dist/_worker.js/chunks/actionscript-3_DmBelb1E.mjs +0 -1
- package/website/dist/_worker.js/chunks/ada_8-E0ahCN.mjs +0 -1
- package/website/dist/_worker.js/chunks/andromeeda_XI-CXx50.mjs +0 -1
- package/website/dist/_worker.js/chunks/angular-html_DKGh3gGH.mjs +0 -1
- package/website/dist/_worker.js/chunks/angular-ts_-qZGsJoA.mjs +0 -1
- package/website/dist/_worker.js/chunks/apache_ijTUt0Ee.mjs +0 -1
- package/website/dist/_worker.js/chunks/apex_agu1c6Sh.mjs +0 -1
- package/website/dist/_worker.js/chunks/apl_Bj2f7Art.mjs +0 -1
- package/website/dist/_worker.js/chunks/applescript_B_vXrOh3.mjs +0 -1
- package/website/dist/_worker.js/chunks/ara_DCEQ2rnh.mjs +0 -1
- package/website/dist/_worker.js/chunks/asciidoc_CGN_EkYS.mjs +0 -1
- package/website/dist/_worker.js/chunks/asm_BBWZgnDp.mjs +0 -1
- package/website/dist/_worker.js/chunks/astro/assets-service_j52rQLzU.mjs +0 -721
- package/website/dist/_worker.js/chunks/astro/server_CsUrSZgd.mjs +0 -2512
- package/website/dist/_worker.js/chunks/astro-designed-error-pages_1ELXm5Tt.mjs +0 -542
- package/website/dist/_worker.js/chunks/astro_Dr_hht3h.mjs +0 -1
- package/website/dist/_worker.js/chunks/aurora-x_9GHG8nSq.mjs +0 -1
- package/website/dist/_worker.js/chunks/awk_DHRvhXot.mjs +0 -1
- package/website/dist/_worker.js/chunks/ayu-dark_CcvqmEHE.mjs +0 -1
- package/website/dist/_worker.js/chunks/ballerina_C7SdeSZb.mjs +0 -1
- package/website/dist/_worker.js/chunks/bat_Dv4A3u45.mjs +0 -1
- package/website/dist/_worker.js/chunks/beancount_BfPf9Luv.mjs +0 -1
- package/website/dist/_worker.js/chunks/berry_B8rfM3lL.mjs +0 -1
- package/website/dist/_worker.js/chunks/bibtex_TcjYgtJM.mjs +0 -1
- package/website/dist/_worker.js/chunks/bicep_CrlFWCdN.mjs +0 -1
- package/website/dist/_worker.js/chunks/blade_lanKVYID.mjs +0 -1
- package/website/dist/_worker.js/chunks/bsl_BhppzXMB.mjs +0 -1
- package/website/dist/_worker.js/chunks/c_6FBALJTK.mjs +0 -1
- package/website/dist/_worker.js/chunks/cadence_2txU9LVE.mjs +0 -1
- package/website/dist/_worker.js/chunks/cairo_BkrFAIlP.mjs +0 -1
- package/website/dist/_worker.js/chunks/catppuccin-frappe_CkEqIYhU.mjs +0 -1
- package/website/dist/_worker.js/chunks/catppuccin-latte_DG4Gx_-v.mjs +0 -1
- package/website/dist/_worker.js/chunks/catppuccin-macchiato_Cwi3vCXf.mjs +0 -1
- package/website/dist/_worker.js/chunks/catppuccin-mocha_L9_OPlFX.mjs +0 -1
- package/website/dist/_worker.js/chunks/clarity_BEAe4Ulu.mjs +0 -1
- package/website/dist/_worker.js/chunks/clojure_VnUX6p2g.mjs +0 -1
- package/website/dist/_worker.js/chunks/cmake_0-SGkZEj.mjs +0 -1
- package/website/dist/_worker.js/chunks/cobol_92M_KGaE.mjs +0 -1
- package/website/dist/_worker.js/chunks/codeowners_CzMwskBv.mjs +0 -1
- package/website/dist/_worker.js/chunks/codeql_DWJZNHv1.mjs +0 -1
- package/website/dist/_worker.js/chunks/coffee_CQjKU2fh.mjs +0 -1
- package/website/dist/_worker.js/chunks/common-lisp_BBLWDpS5.mjs +0 -1
- package/website/dist/_worker.js/chunks/coq_hedRFV3D.mjs +0 -1
- package/website/dist/_worker.js/chunks/cpp_DlS1i6Zs.mjs +0 -1
- package/website/dist/_worker.js/chunks/crystal_D6n65fKV.mjs +0 -1
- package/website/dist/_worker.js/chunks/csharp_C6FCVFzc.mjs +0 -1
- package/website/dist/_worker.js/chunks/css_C5uJEgmJ.mjs +0 -1
- package/website/dist/_worker.js/chunks/csv_CtMYuuJl.mjs +0 -1
- package/website/dist/_worker.js/chunks/cue_BsPexqx6.mjs +0 -1
- package/website/dist/_worker.js/chunks/cypher_apzf6OBi.mjs +0 -1
- package/website/dist/_worker.js/chunks/d_DcvIRcgm.mjs +0 -1
- package/website/dist/_worker.js/chunks/dark-plus_C01ONtzj.mjs +0 -1
- package/website/dist/_worker.js/chunks/dart_WkzM5WrV.mjs +0 -1
- package/website/dist/_worker.js/chunks/dax_DjXAO5V4.mjs +0 -1
- package/website/dist/_worker.js/chunks/desktop_C92LCxdc.mjs +0 -1
- package/website/dist/_worker.js/chunks/diff_CVwM_9XJ.mjs +0 -1
- package/website/dist/_worker.js/chunks/docker_DPzgJf6Z.mjs +0 -1
- package/website/dist/_worker.js/chunks/dotenv_D_vgANvA.mjs +0 -1
- package/website/dist/_worker.js/chunks/dracula-soft_CLnUBwFm.mjs +0 -1
- package/website/dist/_worker.js/chunks/dracula_lBVpb6Lb.mjs +0 -1
- package/website/dist/_worker.js/chunks/dream-maker_DTLbzd_J.mjs +0 -1
- package/website/dist/_worker.js/chunks/edge_i54JYm3_.mjs +0 -1
- package/website/dist/_worker.js/chunks/elixir_BJCIjTu4.mjs +0 -1
- package/website/dist/_worker.js/chunks/elm_BbXD39-_.mjs +0 -1
- package/website/dist/_worker.js/chunks/emacs-lisp_pxa5cXaN.mjs +0 -1
- package/website/dist/_worker.js/chunks/erb_Ccjijeee.mjs +0 -1
- package/website/dist/_worker.js/chunks/erlang_B2VM_hi7.mjs +0 -1
- package/website/dist/_worker.js/chunks/everforest-dark_BxvIPBim.mjs +0 -1
- package/website/dist/_worker.js/chunks/everforest-light_B7VoyaJM.mjs +0 -1
- package/website/dist/_worker.js/chunks/fennel_D-uo7X6c.mjs +0 -1
- package/website/dist/_worker.js/chunks/fish_BjePoK3m.mjs +0 -1
- package/website/dist/_worker.js/chunks/fluent_C8fgkzLX.mjs +0 -1
- package/website/dist/_worker.js/chunks/fortran-fixed-form_D1pu5zrc.mjs +0 -1
- package/website/dist/_worker.js/chunks/fortran-free-form_CSGOhJD6.mjs +0 -1
- package/website/dist/_worker.js/chunks/fsharp_B0xy-A4Y.mjs +0 -1
- package/website/dist/_worker.js/chunks/gdresource_CWppjlHq.mjs +0 -1
- package/website/dist/_worker.js/chunks/gdscript_eQCHchcS.mjs +0 -1
- package/website/dist/_worker.js/chunks/gdshader_C4kxepX7.mjs +0 -1
- package/website/dist/_worker.js/chunks/genie_ACtQLcDW.mjs +0 -1
- package/website/dist/_worker.js/chunks/gherkin_BFp2uKUd.mjs +0 -1
- package/website/dist/_worker.js/chunks/git-commit_CLg9ZwMV.mjs +0 -1
- package/website/dist/_worker.js/chunks/git-rebase_DG8A80Nt.mjs +0 -1
- package/website/dist/_worker.js/chunks/github-dark-default_BI0EP2Kv.mjs +0 -1
- package/website/dist/_worker.js/chunks/github-dark-dimmed_a_NIC0Xb.mjs +0 -1
- package/website/dist/_worker.js/chunks/github-dark-high-contrast_jZGqT7hk.mjs +0 -1
- package/website/dist/_worker.js/chunks/github-dark_CHCDNd2O.mjs +0 -1
- package/website/dist/_worker.js/chunks/github-light-default_DRbOW5RG.mjs +0 -1
- package/website/dist/_worker.js/chunks/github-light-high-contrast_tn_kWutM.mjs +0 -1
- package/website/dist/_worker.js/chunks/github-light_D9brYzot.mjs +0 -1
- package/website/dist/_worker.js/chunks/gleam_Dmhu1oxW.mjs +0 -1
- package/website/dist/_worker.js/chunks/glimmer-js_BfZbXy8A.mjs +0 -1
- package/website/dist/_worker.js/chunks/glimmer-ts_B9QVICrD.mjs +0 -1
- package/website/dist/_worker.js/chunks/glsl_DD2PPwOs.mjs +0 -1
- package/website/dist/_worker.js/chunks/gnuplot_D2OYChUX.mjs +0 -1
- package/website/dist/_worker.js/chunks/go_DYGFTe3h.mjs +0 -1
- package/website/dist/_worker.js/chunks/graphql_B7XsT3nH.mjs +0 -1
- package/website/dist/_worker.js/chunks/groovy_BO12Uwkl.mjs +0 -1
- package/website/dist/_worker.js/chunks/hack_CB2_ztCP.mjs +0 -1
- package/website/dist/_worker.js/chunks/haml_CyfDcDD3.mjs +0 -1
- package/website/dist/_worker.js/chunks/handlebars_CfpxpWm2.mjs +0 -1
- package/website/dist/_worker.js/chunks/haskell_jUeC5uN5.mjs +0 -1
- package/website/dist/_worker.js/chunks/haxe_B6GxP1WB.mjs +0 -1
- package/website/dist/_worker.js/chunks/hcl_DwoHV2oh.mjs +0 -1
- package/website/dist/_worker.js/chunks/hjson_DV7cJRk4.mjs +0 -1
- package/website/dist/_worker.js/chunks/hlsl_BlFCscPI.mjs +0 -1
- package/website/dist/_worker.js/chunks/houston_COBFG1Mx.mjs +0 -1
- package/website/dist/_worker.js/chunks/html-derivative_C9pJ337h.mjs +0 -1
- package/website/dist/_worker.js/chunks/html_D1OkrZS5.mjs +0 -1
- package/website/dist/_worker.js/chunks/http_DIGXRqvJ.mjs +0 -1
- package/website/dist/_worker.js/chunks/hxml_DEwh9i-c.mjs +0 -1
- package/website/dist/_worker.js/chunks/hy_DDoIgW1K.mjs +0 -1
- package/website/dist/_worker.js/chunks/imba_B00zbHo4.mjs +0 -1
- package/website/dist/_worker.js/chunks/index_BDWR1Q-q.mjs +0 -1861
- package/website/dist/_worker.js/chunks/ini_D7XQA_p8.mjs +0 -1
- package/website/dist/_worker.js/chunks/java_B9wdFd8K.mjs +0 -1
- package/website/dist/_worker.js/chunks/javascript_CLsPGOON.mjs +0 -1
- package/website/dist/_worker.js/chunks/jinja_jarBCAN1.mjs +0 -1
- package/website/dist/_worker.js/chunks/jison_oGg3J708.mjs +0 -1
- package/website/dist/_worker.js/chunks/json5_DlZ1Kyaa.mjs +0 -1
- package/website/dist/_worker.js/chunks/json_DaYk_FMp.mjs +0 -1
- package/website/dist/_worker.js/chunks/jsonc_DlwgfSDs.mjs +0 -1
- package/website/dist/_worker.js/chunks/jsonl_BbCCVaZF.mjs +0 -1
- package/website/dist/_worker.js/chunks/jsonnet_Dt-G75xe.mjs +0 -1
- package/website/dist/_worker.js/chunks/jssm_BtKFTj2A.mjs +0 -1
- package/website/dist/_worker.js/chunks/jsx_DDx_xAZ8.mjs +0 -1
- package/website/dist/_worker.js/chunks/julia_CK0lv68l.mjs +0 -1
- package/website/dist/_worker.js/chunks/kanagawa-dragon_BldAK3Oo.mjs +0 -1
- package/website/dist/_worker.js/chunks/kanagawa-lotus_DVM8FX9_.mjs +0 -1
- package/website/dist/_worker.js/chunks/kanagawa-wave_Dpih0AKP.mjs +0 -1
- package/website/dist/_worker.js/chunks/kotlin_kWneB9V_.mjs +0 -1
- package/website/dist/_worker.js/chunks/kusto_BKVATd95.mjs +0 -1
- package/website/dist/_worker.js/chunks/laserwave_BqatxsVl.mjs +0 -1
- package/website/dist/_worker.js/chunks/latex_LVDcGBbc.mjs +0 -1
- package/website/dist/_worker.js/chunks/lean_W7qo-5M2.mjs +0 -1
- package/website/dist/_worker.js/chunks/less_DFNwJnBH.mjs +0 -1
- package/website/dist/_worker.js/chunks/light-plus_Dp0AoWsO.mjs +0 -1
- package/website/dist/_worker.js/chunks/liquid_D24qs0pc.mjs +0 -1
- package/website/dist/_worker.js/chunks/log_IPWMXriF.mjs +0 -1
- package/website/dist/_worker.js/chunks/logo_C6KaatrQ.mjs +0 -1
- package/website/dist/_worker.js/chunks/lua_CwnEf-T7.mjs +0 -1
- package/website/dist/_worker.js/chunks/luau_Br3-CXjS.mjs +0 -1
- package/website/dist/_worker.js/chunks/make_UBNG-kOo.mjs +0 -1
- package/website/dist/_worker.js/chunks/markdown_C7mhJFCm.mjs +0 -1
- package/website/dist/_worker.js/chunks/marko_4tchUvI7.mjs +0 -1
- package/website/dist/_worker.js/chunks/material-theme-darker_SKtaNEPn.mjs +0 -1
- package/website/dist/_worker.js/chunks/material-theme-lighter_zOX_DZCH.mjs +0 -1
- package/website/dist/_worker.js/chunks/material-theme-ocean_BN9WbhdC.mjs +0 -1
- package/website/dist/_worker.js/chunks/material-theme-palenight_DT_covjH.mjs +0 -1
- package/website/dist/_worker.js/chunks/material-theme_6RpeM3kc.mjs +0 -1
- package/website/dist/_worker.js/chunks/matlab_DCOXsPKR.mjs +0 -1
- package/website/dist/_worker.js/chunks/mdc_B9gb2UFP.mjs +0 -1
- package/website/dist/_worker.js/chunks/mdx_DGU7Nu9u.mjs +0 -1
- package/website/dist/_worker.js/chunks/mermaid_B69URzsZ.mjs +0 -1
- package/website/dist/_worker.js/chunks/min-dark_BgxifOMI.mjs +0 -1
- package/website/dist/_worker.js/chunks/min-light_BrPjXxUp.mjs +0 -1
- package/website/dist/_worker.js/chunks/mipsasm_9U-4_t7k.mjs +0 -1
- package/website/dist/_worker.js/chunks/mojo_B0wt7ug3.mjs +0 -1
- package/website/dist/_worker.js/chunks/monokai_B6Pxpoyi.mjs +0 -1
- package/website/dist/_worker.js/chunks/move_1eid4CyR.mjs +0 -1
- package/website/dist/_worker.js/chunks/narrat_Ds6-p5JZ.mjs +0 -1
- package/website/dist/_worker.js/chunks/nextflow_v2N1Qlqa.mjs +0 -1
- package/website/dist/_worker.js/chunks/nginx_Bp9Ab2NH.mjs +0 -1
- package/website/dist/_worker.js/chunks/night-owl_CdwOw_sc.mjs +0 -1
- package/website/dist/_worker.js/chunks/nim_BXGDUe53.mjs +0 -1
- package/website/dist/_worker.js/chunks/nix_CUig1nJH.mjs +0 -1
- package/website/dist/_worker.js/chunks/noop-middleware_B8fH5jha.mjs +0 -10
- package/website/dist/_worker.js/chunks/nord_SPoG1iae.mjs +0 -1
- package/website/dist/_worker.js/chunks/nushell_DJw1Lca8.mjs +0 -1
- package/website/dist/_worker.js/chunks/objective-c_Bktzl_CO.mjs +0 -1
- package/website/dist/_worker.js/chunks/objective-cpp_CP4DWdDp.mjs +0 -1
- package/website/dist/_worker.js/chunks/ocaml_CeEAs7bZ.mjs +0 -1
- package/website/dist/_worker.js/chunks/one-dark-pro_-hIwCNMi.mjs +0 -1
- package/website/dist/_worker.js/chunks/one-light_DSmYvJ05.mjs +0 -1
- package/website/dist/_worker.js/chunks/pascal_C-S_Ms_o.mjs +0 -1
- package/website/dist/_worker.js/chunks/perl_CKamvo15.mjs +0 -1
- package/website/dist/_worker.js/chunks/php_BlmcX_F3.mjs +0 -1
- package/website/dist/_worker.js/chunks/plastic_Ryt8tVoA.mjs +0 -1
- package/website/dist/_worker.js/chunks/plsql_Cb3v7cBj.mjs +0 -1
- package/website/dist/_worker.js/chunks/po_DZbdNRlo.mjs +0 -1
- package/website/dist/_worker.js/chunks/poimandres_bYmE3_5d.mjs +0 -1
- package/website/dist/_worker.js/chunks/polar_pJkMGwoW.mjs +0 -1
- package/website/dist/_worker.js/chunks/postcss_BAXSOKgk.mjs +0 -1
- package/website/dist/_worker.js/chunks/powerquery_oITMGN4x.mjs +0 -1
- package/website/dist/_worker.js/chunks/powershell_6306-xIF.mjs +0 -1
- package/website/dist/_worker.js/chunks/prisma_DSDxnZGz.mjs +0 -1
- package/website/dist/_worker.js/chunks/prolog_CxG7tjZR.mjs +0 -1
- package/website/dist/_worker.js/chunks/proto_CS9ByXm1.mjs +0 -1
- package/website/dist/_worker.js/chunks/pug_BMtLJo6U.mjs +0 -1
- package/website/dist/_worker.js/chunks/puppet_BfeeSzee.mjs +0 -1
- package/website/dist/_worker.js/chunks/purescript_BFfueNaH.mjs +0 -1
- package/website/dist/_worker.js/chunks/python_Cc4Faapv.mjs +0 -1
- package/website/dist/_worker.js/chunks/qml_C1CTJTK8.mjs +0 -1
- package/website/dist/_worker.js/chunks/qmldir_nG1KaqKR.mjs +0 -1
- package/website/dist/_worker.js/chunks/qss_Cncxk263.mjs +0 -1
- package/website/dist/_worker.js/chunks/r_ChR54Ihi.mjs +0 -1
- package/website/dist/_worker.js/chunks/racket_BDrhptDs.mjs +0 -1
- package/website/dist/_worker.js/chunks/raku_07OUHa0P.mjs +0 -1
- package/website/dist/_worker.js/chunks/razor_DIP3INLa.mjs +0 -1
- package/website/dist/_worker.js/chunks/red_DOPXfj-6.mjs +0 -1
- package/website/dist/_worker.js/chunks/reg_B64SwEDj.mjs +0 -1
- package/website/dist/_worker.js/chunks/regexp_ButFGoB5.mjs +0 -1
- package/website/dist/_worker.js/chunks/rel_BWJAWqZD.mjs +0 -1
- package/website/dist/_worker.js/chunks/riscv_79gXlbsF.mjs +0 -1
- package/website/dist/_worker.js/chunks/rose-pine-dawn_DHIjVGd3.mjs +0 -1
- package/website/dist/_worker.js/chunks/rose-pine-moon_t86aEbs0.mjs +0 -1
- package/website/dist/_worker.js/chunks/rose-pine_BHgrcDCs.mjs +0 -1
- package/website/dist/_worker.js/chunks/rst_D3F4Fcpj.mjs +0 -1
- package/website/dist/_worker.js/chunks/ruby_Cs7vM9iv.mjs +0 -1
- package/website/dist/_worker.js/chunks/rust_DpyRVatH.mjs +0 -1
- package/website/dist/_worker.js/chunks/sas_DW45xZXN.mjs +0 -1
- package/website/dist/_worker.js/chunks/sass_C6SiMwN_.mjs +0 -1
- package/website/dist/_worker.js/chunks/scala_DlZOjNZk.mjs +0 -1
- package/website/dist/_worker.js/chunks/scheme_D2ezSJXu.mjs +0 -1
- package/website/dist/_worker.js/chunks/scss_DG5Spjqu.mjs +0 -1
- package/website/dist/_worker.js/chunks/sdbl_ZCYaj4VN.mjs +0 -1
- package/website/dist/_worker.js/chunks/shaderlab_CAcRkg1_.mjs +0 -1
- package/website/dist/_worker.js/chunks/shellscript_BWwhkDVh.mjs +0 -1
- package/website/dist/_worker.js/chunks/shellsession_BfEA3juK.mjs +0 -1
- package/website/dist/_worker.js/chunks/slack-dark_CL3lSpCc.mjs +0 -1
- package/website/dist/_worker.js/chunks/slack-ochin_DdZKOQVh.mjs +0 -1
- package/website/dist/_worker.js/chunks/smalltalk_DgilzSui.mjs +0 -1
- package/website/dist/_worker.js/chunks/snazzy-light_eJU08Pz_.mjs +0 -1
- package/website/dist/_worker.js/chunks/solarized-dark_Dg_YQywx.mjs +0 -1
- package/website/dist/_worker.js/chunks/solarized-light_BnIsrA6p.mjs +0 -1
- package/website/dist/_worker.js/chunks/solidity_DkseH8pQ.mjs +0 -1
- package/website/dist/_worker.js/chunks/soy_DU7bOYoG.mjs +0 -1
- package/website/dist/_worker.js/chunks/sparql_BuI1DBDH.mjs +0 -1
- package/website/dist/_worker.js/chunks/splunk_B8Ha9Pkg.mjs +0 -1
- package/website/dist/_worker.js/chunks/sql_BniHwea5.mjs +0 -1
- package/website/dist/_worker.js/chunks/ssh-config_CkE1GuVe.mjs +0 -1
- package/website/dist/_worker.js/chunks/stata_Dtqpbd_l.mjs +0 -1
- package/website/dist/_worker.js/chunks/stylus_CXTtglzO.mjs +0 -1
- package/website/dist/_worker.js/chunks/svelte_BjWYcUCN.mjs +0 -1
- package/website/dist/_worker.js/chunks/swift_BzHql_rM.mjs +0 -1
- package/website/dist/_worker.js/chunks/synthwave-84_DLRNhxNA.mjs +0 -1
- package/website/dist/_worker.js/chunks/system-verilog_ChyInPph.mjs +0 -1
- package/website/dist/_worker.js/chunks/systemd_Bi9Qa2qD.mjs +0 -1
- package/website/dist/_worker.js/chunks/talonscript_B3sH_Y-V.mjs +0 -1
- package/website/dist/_worker.js/chunks/tasl_BJ5yipRs.mjs +0 -1
- package/website/dist/_worker.js/chunks/tcl_CoJQjNoP.mjs +0 -1
- package/website/dist/_worker.js/chunks/templ_CrU7Ffil.mjs +0 -1
- package/website/dist/_worker.js/chunks/terraform_DT9JSFpC.mjs +0 -1
- package/website/dist/_worker.js/chunks/tex_5PKu2yA0.mjs +0 -1
- package/website/dist/_worker.js/chunks/tokyo-night_Buo8OK7-.mjs +0 -1
- package/website/dist/_worker.js/chunks/toml_CPuXX3oc.mjs +0 -1
- package/website/dist/_worker.js/chunks/ts-tags_D0M_1VSH.mjs +0 -1
- package/website/dist/_worker.js/chunks/tsv_CuivVNot.mjs +0 -1
- package/website/dist/_worker.js/chunks/tsx_MkuGr8MY.mjs +0 -1
- package/website/dist/_worker.js/chunks/turtle_BqgEPK7f.mjs +0 -1
- package/website/dist/_worker.js/chunks/twig_r1G9rpYJ.mjs +0 -1
- package/website/dist/_worker.js/chunks/typescript_Au5buqzM.mjs +0 -1
- package/website/dist/_worker.js/chunks/typespec_47rhBK_z.mjs +0 -1
- package/website/dist/_worker.js/chunks/typst_BAtuQLh-.mjs +0 -1
- package/website/dist/_worker.js/chunks/v_BIvWImHg.mjs +0 -1
- package/website/dist/_worker.js/chunks/vala_DYEacj30.mjs +0 -1
- package/website/dist/_worker.js/chunks/vb_CikQuqGJ.mjs +0 -1
- package/website/dist/_worker.js/chunks/verilog_BQRENwI-.mjs +0 -1
- package/website/dist/_worker.js/chunks/vesper_DA0kvTmj.mjs +0 -1
- package/website/dist/_worker.js/chunks/vhdl_DHscJIyg.mjs +0 -1
- package/website/dist/_worker.js/chunks/viml_F2pvMwvG.mjs +0 -1
- package/website/dist/_worker.js/chunks/vitesse-black_D9tjNzd0.mjs +0 -1
- package/website/dist/_worker.js/chunks/vitesse-dark_Bnm5d0hd.mjs +0 -1
- package/website/dist/_worker.js/chunks/vitesse-light_CHwbyjNR.mjs +0 -1
- package/website/dist/_worker.js/chunks/vue-html_DyYtbbMK.mjs +0 -1
- package/website/dist/_worker.js/chunks/vue_DofN6juy.mjs +0 -1
- package/website/dist/_worker.js/chunks/vyper_CiR0m-OV.mjs +0 -1
- package/website/dist/_worker.js/chunks/wasm_CwIGgRGf.mjs +0 -1
- package/website/dist/_worker.js/chunks/wasm_jKWhg0J0.mjs +0 -1
- package/website/dist/_worker.js/chunks/wenyan_DKvVZKXW.mjs +0 -1
- package/website/dist/_worker.js/chunks/wgsl_BOWZY7yw.mjs +0 -1
- package/website/dist/_worker.js/chunks/wikitext_CXDhhHPy.mjs +0 -1
- package/website/dist/_worker.js/chunks/wolfram_ChkmGnW0.mjs +0 -1
- package/website/dist/_worker.js/chunks/xml_DXH3hHIu.mjs +0 -1
- package/website/dist/_worker.js/chunks/xsl_DuP2mFjg.mjs +0 -1
- package/website/dist/_worker.js/chunks/yaml_IGiEkTge.mjs +0 -1
- package/website/dist/_worker.js/chunks/zenscript_59iXGyNw.mjs +0 -1
- package/website/dist/_worker.js/chunks/zig_DKzb0zdT.mjs +0 -1
- package/website/dist/_worker.js/index.js +0 -61
- package/website/dist/_worker.js/manifest_Bk6136-u.mjs +0 -98
- package/website/dist/_worker.js/pages/_image.astro.mjs +0 -24
- package/website/dist/_worker.js/pages/agents.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/animation.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/api/playground/render.astro.mjs +0 -25562
- package/website/dist/_worker.js/pages/api/playground/templates.astro.mjs +0 -92
- package/website/dist/_worker.js/pages/api/raw-markdown/_---path_.astro.mjs +0 -44
- package/website/dist/_worker.js/pages/config.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/fonts.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/getting-started.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/helpers.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/images.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/index.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/llm.txt.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/playground/_example_.astro.mjs +0 -95
- package/website/dist/_worker.js/pages/playground.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/preview.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/sdk.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/sitemap.xml.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/styling.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/templates.astro.mjs +0 -1
- package/website/dist/_worker.js/pages/video.astro.mjs +0 -1
- package/website/dist/_worker.js/renderers.mjs +0 -2
- package/website/dist/agents/index.html +0 -54
- package/website/dist/animation/index.html +0 -1505
- package/website/dist/config/index.html +0 -186
- package/website/dist/fonts/index.html +0 -200
- package/website/dist/getting-started/index.html +0 -109
- package/website/dist/helpers/index.html +0 -350
- package/website/dist/images/index.html +0 -337
- package/website/dist/index.html +0 -141
- package/website/dist/llm.txt +0 -3626
- package/website/dist/playground/index.html +0 -6
- package/website/dist/preview/index.html +0 -113
- package/website/dist/robots.txt +0 -40
- package/website/dist/sdk/index.html +0 -1588
- package/website/dist/sitemap.xml +0 -76
- package/website/dist/styling/index.html +0 -368
- package/website/dist/templates/index.html +0 -76
- package/website/dist/video/index.html +0 -354
- package/website/package-lock.json +0 -8099
- package/website/package.json +0 -43
- package/website/public/.gitkeep +0 -5
- package/website/public/robots.txt +0 -40
- package/website/templates/og-image.tsx +0 -60
- package/website/wrangler.toml +0 -9
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tailwind config utilities for Cloudflare Workers
|
|
3
|
-
* Pure JavaScript - no Node.js dependencies
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Tailwind config interface (simplified)
|
|
7
|
-
*/
|
|
8
|
-
export interface TailwindConfig {
|
|
9
|
-
theme?: {
|
|
10
|
-
extend?: {
|
|
11
|
-
colors?: Record<string, any>;
|
|
12
|
-
spacing?: Record<string, string>;
|
|
13
|
-
fontSize?: Record<string, any>;
|
|
14
|
-
fontFamily?: Record<string, string[]>;
|
|
15
|
-
borderRadius?: Record<string, string>;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
colors?: Record<string, any>;
|
|
19
|
-
spacing?: Record<string, string>;
|
|
20
|
-
fontSize?: Record<string, any>;
|
|
21
|
-
fontFamily?: Record<string, string[]>;
|
|
22
|
-
borderRadius?: Record<string, string>;
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
27
|
-
export declare const DEFAULT_COLORS: Record<string, any>;
|
|
28
|
-
/**
|
|
29
|
-
* Resolve a color from Tailwind config
|
|
30
|
-
* Supports: primary, blue-500, slate-200, etc.
|
|
31
|
-
*/
|
|
32
|
-
export declare function resolveColor(colorName: string, tailwindConfig: TailwindConfig | null): string | null;
|
|
33
|
-
/**
|
|
34
|
-
* Resolve spacing value from Tailwind config
|
|
35
|
-
*/
|
|
36
|
-
export declare function resolveSpacing(value: string, tailwindConfig: TailwindConfig | null): string | null;
|
|
37
|
-
/**
|
|
38
|
-
* Resolve font size from Tailwind config
|
|
39
|
-
*/
|
|
40
|
-
export declare function resolveFontSize(size: string, tailwindConfig: TailwindConfig | null): {
|
|
41
|
-
fontSize: string;
|
|
42
|
-
lineHeight?: string;
|
|
43
|
-
} | null;
|
|
44
|
-
/**
|
|
45
|
-
* Resolve border radius from Tailwind config
|
|
46
|
-
*/
|
|
47
|
-
export declare function resolveBorderRadius(value: string, tailwindConfig: TailwindConfig | null): string | null;
|
|
48
|
-
//# sourceMappingURL=tailwind-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-config.d.ts","sourceRoot":"","sources":["../../../src/sdk/workers/tailwind-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE;YACP,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YACtC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACtC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;SACpB,CAAC;QACF,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACtC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CA8F9C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,MAAM,GAAG,IAAI,CA+Bf;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,MAAM,GAAG,IAAI,CAWf;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA6BlD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,MAAM,GAAG,IAAI,CAWf"}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tailwind config utilities for Cloudflare Workers
|
|
3
|
-
* Pure JavaScript - no Node.js dependencies
|
|
4
|
-
*/
|
|
5
|
-
// Tailwind's default color palette (v3)
|
|
6
|
-
export const DEFAULT_COLORS = {
|
|
7
|
-
inherit: 'inherit',
|
|
8
|
-
current: 'currentColor',
|
|
9
|
-
transparent: 'transparent',
|
|
10
|
-
black: '#000000',
|
|
11
|
-
white: '#ffffff',
|
|
12
|
-
slate: {
|
|
13
|
-
50: '#f8fafc', 100: '#f1f5f9', 200: '#e2e8f0', 300: '#cbd5e1', 400: '#94a3b8',
|
|
14
|
-
500: '#64748b', 600: '#475569', 700: '#334155', 800: '#1e293b', 900: '#0f172a', 950: '#020617',
|
|
15
|
-
},
|
|
16
|
-
gray: {
|
|
17
|
-
50: '#f9fafb', 100: '#f3f4f6', 200: '#e5e7eb', 300: '#d1d5db', 400: '#9ca3af',
|
|
18
|
-
500: '#6b7280', 600: '#4b5563', 700: '#374151', 800: '#1f2937', 900: '#111827', 950: '#030712',
|
|
19
|
-
},
|
|
20
|
-
zinc: {
|
|
21
|
-
50: '#fafafa', 100: '#f4f4f5', 200: '#e4e4e7', 300: '#d4d4d8', 400: '#a1a1aa',
|
|
22
|
-
500: '#71717a', 600: '#52525b', 700: '#3f3f46', 800: '#27272a', 900: '#18181b', 950: '#09090b',
|
|
23
|
-
},
|
|
24
|
-
neutral: {
|
|
25
|
-
50: '#fafafa', 100: '#f5f5f5', 200: '#e5e5e5', 300: '#d4d4d4', 400: '#a3a3a3',
|
|
26
|
-
500: '#737373', 600: '#525252', 700: '#404040', 800: '#262626', 900: '#171717', 950: '#0a0a0a',
|
|
27
|
-
},
|
|
28
|
-
stone: {
|
|
29
|
-
50: '#fafaf9', 100: '#f5f5f4', 200: '#e7e5e4', 300: '#d6d3d1', 400: '#a8a29e',
|
|
30
|
-
500: '#78716c', 600: '#57534e', 700: '#44403c', 800: '#292524', 900: '#1c1917', 950: '#0c0a09',
|
|
31
|
-
},
|
|
32
|
-
red: {
|
|
33
|
-
50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5', 400: '#f87171',
|
|
34
|
-
500: '#ef4444', 600: '#dc2626', 700: '#b91c1c', 800: '#991b1b', 900: '#7f1d1d', 950: '#450a0a',
|
|
35
|
-
},
|
|
36
|
-
orange: {
|
|
37
|
-
50: '#fff7ed', 100: '#ffedd5', 200: '#fed7aa', 300: '#fdba74', 400: '#fb923c',
|
|
38
|
-
500: '#f97316', 600: '#ea580c', 700: '#c2410c', 800: '#9a3412', 900: '#7c2d12', 950: '#431407',
|
|
39
|
-
},
|
|
40
|
-
amber: {
|
|
41
|
-
50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d', 400: '#fbbf24',
|
|
42
|
-
500: '#f59e0b', 600: '#d97706', 700: '#b45309', 800: '#92400e', 900: '#78350f', 950: '#451a03',
|
|
43
|
-
},
|
|
44
|
-
yellow: {
|
|
45
|
-
50: '#fefce8', 100: '#fef9c3', 200: '#fef08a', 300: '#fde047', 400: '#facc15',
|
|
46
|
-
500: '#eab308', 600: '#ca8a04', 700: '#a16207', 800: '#854d0e', 900: '#713f12', 950: '#422006',
|
|
47
|
-
},
|
|
48
|
-
lime: {
|
|
49
|
-
50: '#f7fee7', 100: '#ecfccb', 200: '#d9f99d', 300: '#bef264', 400: '#a3e635',
|
|
50
|
-
500: '#84cc16', 600: '#65a30d', 700: '#4d7c0f', 800: '#3f6212', 900: '#365314', 950: '#1a2e05',
|
|
51
|
-
},
|
|
52
|
-
green: {
|
|
53
|
-
50: '#f0fdf4', 100: '#dcfce7', 200: '#bbf7d0', 300: '#86efac', 400: '#4ade80',
|
|
54
|
-
500: '#22c55e', 600: '#16a34a', 700: '#15803d', 800: '#166534', 900: '#14532d', 950: '#052e16',
|
|
55
|
-
},
|
|
56
|
-
emerald: {
|
|
57
|
-
50: '#ecfdf5', 100: '#d1fae5', 200: '#a7f3d0', 300: '#6ee7b7', 400: '#34d399',
|
|
58
|
-
500: '#10b981', 600: '#059669', 700: '#047857', 800: '#065f46', 900: '#064e3b', 950: '#022c22',
|
|
59
|
-
},
|
|
60
|
-
teal: {
|
|
61
|
-
50: '#f0fdfa', 100: '#ccfbf1', 200: '#99f6e4', 300: '#5eead4', 400: '#2dd4bf',
|
|
62
|
-
500: '#14b8a6', 600: '#0d9488', 700: '#0f766e', 800: '#115e59', 900: '#134e4a', 950: '#042f2e',
|
|
63
|
-
},
|
|
64
|
-
cyan: {
|
|
65
|
-
50: '#ecfeff', 100: '#cffafe', 200: '#a5f3fc', 300: '#67e8f9', 400: '#22d3ee',
|
|
66
|
-
500: '#06b6d4', 600: '#0891b2', 700: '#0e7490', 800: '#155e75', 900: '#164e63', 950: '#083344',
|
|
67
|
-
},
|
|
68
|
-
sky: {
|
|
69
|
-
50: '#f0f9ff', 100: '#e0f2fe', 200: '#bae6fd', 300: '#7dd3fc', 400: '#38bdf8',
|
|
70
|
-
500: '#0ea5e9', 600: '#0284c7', 700: '#0369a1', 800: '#075985', 900: '#0c4a6e', 950: '#082f49',
|
|
71
|
-
},
|
|
72
|
-
blue: {
|
|
73
|
-
50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd', 400: '#60a5fa',
|
|
74
|
-
500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', 900: '#1e3a8a', 950: '#172554',
|
|
75
|
-
},
|
|
76
|
-
indigo: {
|
|
77
|
-
50: '#eef2ff', 100: '#e0e7ff', 200: '#c7d2fe', 300: '#a5b4fc', 400: '#818cf8',
|
|
78
|
-
500: '#6366f1', 600: '#4f46e5', 700: '#4338ca', 800: '#3730a3', 900: '#312e81', 950: '#1e1b4b',
|
|
79
|
-
},
|
|
80
|
-
violet: {
|
|
81
|
-
50: '#f5f3ff', 100: '#ede9fe', 200: '#ddd6fe', 300: '#c4b5fd', 400: '#a78bfa',
|
|
82
|
-
500: '#8b5cf6', 600: '#7c3aed', 700: '#6d28d9', 800: '#5b21b6', 900: '#4c1d95', 950: '#2e1065',
|
|
83
|
-
},
|
|
84
|
-
purple: {
|
|
85
|
-
50: '#faf5ff', 100: '#f3e8ff', 200: '#e9d5ff', 300: '#d8b4fe', 400: '#c084fc',
|
|
86
|
-
500: '#a855f7', 600: '#9333ea', 700: '#7e22ce', 800: '#6b21a8', 900: '#581c87', 950: '#3b0764',
|
|
87
|
-
},
|
|
88
|
-
fuchsia: {
|
|
89
|
-
50: '#fdf4ff', 100: '#fae8ff', 200: '#f5d0fe', 300: '#f0abfc', 400: '#e879f9',
|
|
90
|
-
500: '#d946ef', 600: '#c026d3', 700: '#a21caf', 800: '#86198f', 900: '#701a75', 950: '#4a044e',
|
|
91
|
-
},
|
|
92
|
-
pink: {
|
|
93
|
-
50: '#fdf2f8', 100: '#fce7f3', 200: '#fbcfe8', 300: '#f9a8d4', 400: '#f472b6',
|
|
94
|
-
500: '#ec4899', 600: '#db2777', 700: '#be185d', 800: '#9d174d', 900: '#831843', 950: '#500724',
|
|
95
|
-
},
|
|
96
|
-
rose: {
|
|
97
|
-
50: '#fff1f2', 100: '#ffe4e6', 200: '#fecdd3', 300: '#fda4af', 400: '#fb7185',
|
|
98
|
-
500: '#f43f5e', 600: '#e11d48', 700: '#be123c', 800: '#9f1239', 900: '#881337', 950: '#4c0519',
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* Resolve a color from Tailwind config
|
|
103
|
-
* Supports: primary, blue-500, slate-200, etc.
|
|
104
|
-
*/
|
|
105
|
-
export function resolveColor(colorName, tailwindConfig) {
|
|
106
|
-
// Merge Tailwind config colors with defaults
|
|
107
|
-
const colors = {
|
|
108
|
-
...DEFAULT_COLORS,
|
|
109
|
-
...tailwindConfig?.theme?.colors,
|
|
110
|
-
...tailwindConfig?.theme?.extend?.colors,
|
|
111
|
-
};
|
|
112
|
-
// Try direct match first (e.g., "primary")
|
|
113
|
-
if (colors[colorName]) {
|
|
114
|
-
const color = colors[colorName];
|
|
115
|
-
// If it's a string, return it
|
|
116
|
-
if (typeof color === 'string') {
|
|
117
|
-
return color;
|
|
118
|
-
}
|
|
119
|
-
// If it's an object with DEFAULT, use that
|
|
120
|
-
if (typeof color === 'object' && color.DEFAULT) {
|
|
121
|
-
return color.DEFAULT;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
// Try shade match (e.g., "blue-500")
|
|
125
|
-
const shadeMatch = colorName.match(/^(\w+)-(\d+)$/);
|
|
126
|
-
if (shadeMatch) {
|
|
127
|
-
const [, colorKey, shade] = shadeMatch;
|
|
128
|
-
if (colors[colorKey] && typeof colors[colorKey] === 'object') {
|
|
129
|
-
return colors[colorKey][shade] || null;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Resolve spacing value from Tailwind config
|
|
136
|
-
*/
|
|
137
|
-
export function resolveSpacing(value, tailwindConfig) {
|
|
138
|
-
if (!tailwindConfig?.theme) {
|
|
139
|
-
return null;
|
|
140
|
-
}
|
|
141
|
-
const spacing = {
|
|
142
|
-
...tailwindConfig.theme.spacing,
|
|
143
|
-
...tailwindConfig.theme.extend?.spacing,
|
|
144
|
-
};
|
|
145
|
-
return spacing[value] || null;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Resolve font size from Tailwind config
|
|
149
|
-
*/
|
|
150
|
-
export function resolveFontSize(size, tailwindConfig) {
|
|
151
|
-
if (!tailwindConfig?.theme) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
const fontSize = {
|
|
155
|
-
...tailwindConfig.theme.fontSize,
|
|
156
|
-
...tailwindConfig.theme.extend?.fontSize,
|
|
157
|
-
};
|
|
158
|
-
const value = fontSize[size];
|
|
159
|
-
if (!value) {
|
|
160
|
-
return null;
|
|
161
|
-
}
|
|
162
|
-
// Font size can be a string or [size, lineHeight]
|
|
163
|
-
if (typeof value === 'string') {
|
|
164
|
-
return { fontSize: value };
|
|
165
|
-
}
|
|
166
|
-
if (Array.isArray(value)) {
|
|
167
|
-
return {
|
|
168
|
-
fontSize: value[0],
|
|
169
|
-
lineHeight: value[1]?.lineHeight || value[1],
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Resolve border radius from Tailwind config
|
|
176
|
-
*/
|
|
177
|
-
export function resolveBorderRadius(value, tailwindConfig) {
|
|
178
|
-
if (!tailwindConfig?.theme) {
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
|
-
const borderRadius = {
|
|
182
|
-
...tailwindConfig.theme.borderRadius,
|
|
183
|
-
...tailwindConfig.theme.extend?.borderRadius,
|
|
184
|
-
};
|
|
185
|
-
return borderRadius[value] || null;
|
|
186
|
-
}
|
|
187
|
-
//# sourceMappingURL=tailwind-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-config.js","sourceRoot":"","sources":["../../../src/sdk/workers/tailwind-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,wCAAwC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE;QACL,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS;QAC7E,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS;KAC/F;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS;QAC7E,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS;KAC/F;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE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IAE7B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kDAAkD;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO;YACL,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;YAClB,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC;SAC7C,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAa,EACb,cAAqC;IAErC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,YAAY,GAAG;QACnB,GAAG,cAAc,CAAC,KAAK,CAAC,YAAY;QACpC,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY;KAC7C,CAAC;IAEF,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;AACrC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tailwind class-to-style converter for Cloudflare Workers
|
|
3
|
-
*
|
|
4
|
-
* Re-exports from the shared library.
|
|
5
|
-
* Pure JavaScript - no Node.js dependencies.
|
|
6
|
-
*/
|
|
7
|
-
export { tw } from '../../lib/tailwind.js';
|
|
8
|
-
export type { TailwindConfig } from '../../lib/tailwind/types.js';
|
|
9
|
-
//# sourceMappingURL=tailwind.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../../src/sdk/workers/tailwind.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.js","sourceRoot":"","sources":["../../../src/sdk/workers/tailwind.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Example: Code Editor - User-created templates from source strings
|
|
3
|
-
*
|
|
4
|
-
* Use case: Building a code editor where users write template code
|
|
5
|
-
* directly as strings (e.g., Monaco Editor, CodeMirror).
|
|
6
|
-
*
|
|
7
|
-
* ⚠️ SECURITY WARNING:
|
|
8
|
-
* Only use defineTemplateFromSource() with TRUSTED sources!
|
|
9
|
-
* It evaluates code using new Function() which can execute arbitrary code.
|
|
10
|
-
* Never pass untrusted user input directly.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { defineTemplateFromSource, renderImage, renderVideo } from 'loopwind/sdk';
|
|
14
|
-
import fs from 'fs/promises';
|
|
15
|
-
|
|
16
|
-
// Example 1: Simple image template from string
|
|
17
|
-
const imageTemplateSource = `
|
|
18
|
-
export const meta = {
|
|
19
|
-
name: 'user-card',
|
|
20
|
-
type: 'image',
|
|
21
|
-
size: { width: 1200, height: 630 }
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default ({ tw, title, description }) => {
|
|
25
|
-
const h = React.createElement;
|
|
26
|
-
return h('div', {
|
|
27
|
-
style: tw('flex flex-col w-full h-full bg-gradient-to-br from-blue-600 to-purple-700 p-12 justify-between')
|
|
28
|
-
},
|
|
29
|
-
h('div', { style: tw('flex items-center gap-4') },
|
|
30
|
-
h('div', { style: tw('w-16 h-16 rounded-full bg-white/20') })
|
|
31
|
-
),
|
|
32
|
-
h('div', null,
|
|
33
|
-
h('h1', { style: tw('text-6xl font-bold text-white mb-4') }, title),
|
|
34
|
-
h('p', { style: tw('text-2xl text-white/80') }, description)
|
|
35
|
-
)
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
async function renderUserTemplate() {
|
|
41
|
-
// Create template from source string
|
|
42
|
-
const template = defineTemplateFromSource(imageTemplateSource, {
|
|
43
|
-
config: {
|
|
44
|
-
colors: {
|
|
45
|
-
primary: '#3b82f6',
|
|
46
|
-
background: '#ffffff',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
// Render with user props
|
|
52
|
-
const png = await renderImage(template, {
|
|
53
|
-
title: 'User Created Template',
|
|
54
|
-
description: 'Built with code editor',
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
await fs.writeFile('user-card.png', png);
|
|
58
|
-
console.log('✓ Rendered user-card.png');
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Example 2: Video template from string
|
|
62
|
-
const videoTemplateSource = `
|
|
63
|
-
export const meta = {
|
|
64
|
-
name: 'intro-animation',
|
|
65
|
-
type: 'video',
|
|
66
|
-
size: { width: 1920, height: 1080 },
|
|
67
|
-
video: { fps: 30, duration: 3 }
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export default ({ tw, progress, title }) => {
|
|
71
|
-
const h = React.createElement;
|
|
72
|
-
|
|
73
|
-
// Fade in animation
|
|
74
|
-
const opacity = progress < 0.5 ? progress / 0.5 : 1;
|
|
75
|
-
const scale = 0.8 + (opacity * 0.2);
|
|
76
|
-
|
|
77
|
-
return h('div', {
|
|
78
|
-
style: tw('flex items-center justify-center w-full h-full bg-black')
|
|
79
|
-
},
|
|
80
|
-
h('h1', {
|
|
81
|
-
style: {
|
|
82
|
-
...tw('text-8xl font-bold text-white'),
|
|
83
|
-
opacity,
|
|
84
|
-
transform: \`scale(\${scale})\`
|
|
85
|
-
}
|
|
86
|
-
}, title)
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
`;
|
|
90
|
-
|
|
91
|
-
async function renderVideoTemplate() {
|
|
92
|
-
const template = defineTemplateFromSource(videoTemplateSource);
|
|
93
|
-
|
|
94
|
-
const mp4 = await renderVideo(template, {
|
|
95
|
-
title: 'Hello World',
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
await fs.writeFile('intro-animation.mp4', mp4);
|
|
99
|
-
console.log('✓ Rendered intro-animation.mp4');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Example 3: Database-stored template
|
|
103
|
-
// This simulates loading templates from a database
|
|
104
|
-
interface StoredTemplate {
|
|
105
|
-
id: string;
|
|
106
|
-
name: string;
|
|
107
|
-
source: string;
|
|
108
|
-
config?: any;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const templatesDB: StoredTemplate[] = [
|
|
112
|
-
{
|
|
113
|
-
id: 'og-1',
|
|
114
|
-
name: 'Blog OG Image',
|
|
115
|
-
source: `
|
|
116
|
-
export const meta = {
|
|
117
|
-
name: 'blog-og',
|
|
118
|
-
type: 'image',
|
|
119
|
-
size: { width: 1200, height: 630 }
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export default ({ tw, title, author }) => {
|
|
123
|
-
const h = React.createElement;
|
|
124
|
-
return h('div', {
|
|
125
|
-
style: tw('flex flex-col w-full h-full bg-white p-12 justify-center')
|
|
126
|
-
},
|
|
127
|
-
h('h1', { style: tw('text-6xl font-bold text-gray-900 mb-4') }, title),
|
|
128
|
-
h('p', { style: tw('text-2xl text-gray-600') }, 'By ' + author)
|
|
129
|
-
);
|
|
130
|
-
};
|
|
131
|
-
`,
|
|
132
|
-
config: {
|
|
133
|
-
colors: {
|
|
134
|
-
primary: '#1f2937',
|
|
135
|
-
background: '#ffffff',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
];
|
|
140
|
-
|
|
141
|
-
async function renderFromDatabase(templateId: string, props: any) {
|
|
142
|
-
// Fetch template from "database"
|
|
143
|
-
const stored = templatesDB.find((t) => t.id === templateId);
|
|
144
|
-
if (!stored) {
|
|
145
|
-
throw new Error('Template not found');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Create template from stored source
|
|
149
|
-
const template = defineTemplateFromSource(stored.source, {
|
|
150
|
-
config: stored.config,
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// Render
|
|
154
|
-
const png = await renderImage(template, props);
|
|
155
|
-
await fs.writeFile(`${stored.id}.png`, png);
|
|
156
|
-
console.log(`✓ Rendered ${stored.id}.png`);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Run examples
|
|
160
|
-
async function main() {
|
|
161
|
-
console.log('Code Editor Examples\n');
|
|
162
|
-
|
|
163
|
-
await renderUserTemplate();
|
|
164
|
-
await renderVideoTemplate();
|
|
165
|
-
await renderFromDatabase('og-1', {
|
|
166
|
-
title: 'Building a Template Editor',
|
|
167
|
-
author: 'John Doe',
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
console.log('\n✅ All code editor examples completed!');
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
main().catch(console.error);
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
# loopwind Next.js API Example
|
|
2
|
-
|
|
3
|
-
This example demonstrates how to use the **loopwind SDK** in Next.js API routes to generate images and videos programmatically.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- ✅ Serverless image generation (OG images, social cards)
|
|
8
|
-
- ✅ Serverless video generation (intro videos, animations)
|
|
9
|
-
- ✅ No file system dependencies - templates defined in code
|
|
10
|
-
- ✅ Works on Vercel, Netlify, and other serverless platforms
|
|
11
|
-
- ✅ Edge Runtime compatible
|
|
12
|
-
|
|
13
|
-
## Setup
|
|
14
|
-
|
|
15
|
-
1. Install dependencies:
|
|
16
|
-
```bash
|
|
17
|
-
npm install
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. Run the development server:
|
|
21
|
-
```bash
|
|
22
|
-
npm run dev
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
3. Test the API routes:
|
|
26
|
-
- Image: `http://localhost:3000/api/og-image?title=Hello&description=World`
|
|
27
|
-
- Video: `http://localhost:3000/api/intro-video?title=Welcome`
|
|
28
|
-
|
|
29
|
-
## API Routes
|
|
30
|
-
|
|
31
|
-
### `/api/og-image` - Generate OG Images
|
|
32
|
-
|
|
33
|
-
Generate Open Graph images dynamically:
|
|
34
|
-
|
|
35
|
-
```typescript
|
|
36
|
-
import { defineTemplate, renderImage } from 'loopwind/sdk';
|
|
37
|
-
|
|
38
|
-
const ogTemplate = defineTemplate({
|
|
39
|
-
name: 'og-image',
|
|
40
|
-
size: { width: 1200, height: 630 },
|
|
41
|
-
render: ({ tw, title, description }) => (
|
|
42
|
-
<div style={tw('flex flex-col w-full h-full bg-gradient-to-br from-blue-600 to-purple-700 p-12')}>
|
|
43
|
-
<h1 style={tw('text-6xl font-bold text-white')}>{title}</h1>
|
|
44
|
-
<p style={tw('text-2xl text-white/80')}>{description}</p>
|
|
45
|
-
</div>
|
|
46
|
-
),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export default async function handler(req, res) {
|
|
50
|
-
const png = await renderImage(ogTemplate, {
|
|
51
|
-
title: req.query.title,
|
|
52
|
-
description: req.query.description,
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
res.setHeader('Content-Type', 'image/png');
|
|
56
|
-
res.send(png);
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
**Usage:**
|
|
61
|
-
```bash
|
|
62
|
-
curl http://localhost:3000/api/og-image?title=Hello&description=World > image.png
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### `/api/intro-video` - Generate Videos
|
|
66
|
-
|
|
67
|
-
Generate MP4 videos dynamically:
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
import { defineTemplate, renderVideo } from 'loopwind/sdk';
|
|
71
|
-
|
|
72
|
-
const introTemplate = defineTemplate({
|
|
73
|
-
name: 'intro-video',
|
|
74
|
-
type: 'video',
|
|
75
|
-
size: { width: 1920, height: 1080 },
|
|
76
|
-
video: { fps: 30, duration: 3 },
|
|
77
|
-
render: ({ tw, progress, title }) => (
|
|
78
|
-
<div style={tw('flex items-center justify-center w-full h-full bg-black')}>
|
|
79
|
-
<h1 style={{ ...tw('text-8xl font-bold text-white'), opacity: progress }}>
|
|
80
|
-
{title}
|
|
81
|
-
</h1>
|
|
82
|
-
</div>
|
|
83
|
-
),
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
export default async function handler(req, res) {
|
|
87
|
-
const mp4 = await renderVideo(introTemplate, {
|
|
88
|
-
title: req.query.title,
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
res.setHeader('Content-Type', 'video/mp4');
|
|
92
|
-
res.send(mp4);
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Usage:**
|
|
97
|
-
```bash
|
|
98
|
-
curl http://localhost:3000/api/intro-video?title=Welcome > video.mp4
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Deploy to Vercel
|
|
102
|
-
|
|
103
|
-
[](https://vercel.com/new/clone?repository-url=https://github.com/tomtev/loopwind/tree/main/examples/nextjs-api)
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
npm install -g vercel
|
|
107
|
-
vercel
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Key Concepts
|
|
111
|
-
|
|
112
|
-
### 1. **Define Templates Programmatically**
|
|
113
|
-
|
|
114
|
-
No file system needed - define templates directly in code:
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
const template = defineTemplate({
|
|
118
|
-
name: 'my-template',
|
|
119
|
-
size: { width: 1200, height: 630 },
|
|
120
|
-
render: ({ tw, title }) => (
|
|
121
|
-
<div style={tw('flex items-center justify-center w-full h-full bg-white')}>
|
|
122
|
-
<h1 style={tw('text-4xl font-bold')}>{title}</h1>
|
|
123
|
-
</div>
|
|
124
|
-
),
|
|
125
|
-
});
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### 2. **Render to Buffer**
|
|
129
|
-
|
|
130
|
-
Get image/video as Buffer for maximum flexibility:
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
const png = await renderImage(template, { title: 'Hello' });
|
|
134
|
-
const mp4 = await renderVideo(videoTemplate, { title: 'Intro' });
|
|
135
|
-
|
|
136
|
-
// Can save to file, return in API, upload to S3, etc.
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### 3. **Tailwind Styling**
|
|
140
|
-
|
|
141
|
-
Use Tailwind utility classes with the `tw` helper:
|
|
142
|
-
|
|
143
|
-
```typescript
|
|
144
|
-
render: ({ tw, title }) => (
|
|
145
|
-
<div style={tw('flex flex-col gap-4 p-8 bg-gradient-to-br from-blue-600 to-purple-700')}>
|
|
146
|
-
<h1 style={tw('text-6xl font-bold text-white')}>{title}</h1>
|
|
147
|
-
</div>
|
|
148
|
-
)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### 4. **Video Animations**
|
|
152
|
-
|
|
153
|
-
Use `progress` and `frame` props for animations:
|
|
154
|
-
|
|
155
|
-
```typescript
|
|
156
|
-
render: ({ tw, progress, title }) => {
|
|
157
|
-
const opacity = progress; // 0 to 1
|
|
158
|
-
const scale = 0.5 + progress * 0.5; // 0.5 to 1
|
|
159
|
-
|
|
160
|
-
return (
|
|
161
|
-
<div style={tw('flex items-center justify-center w-full h-full')}>
|
|
162
|
-
<h1 style={{ ...tw('text-8xl font-bold'), opacity, transform: `scale(${scale})` }}>
|
|
163
|
-
{title}
|
|
164
|
-
</h1>
|
|
165
|
-
</div>
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Performance
|
|
171
|
-
|
|
172
|
-
- **Images**: ~50-100ms per image (PNG/JPEG/WebP)
|
|
173
|
-
- **Videos**: ~7s for 3-second Full HD video (1920×1080 @ 30fps)
|
|
174
|
-
- **Edge Runtime**: Compatible with Vercel Edge Functions for global distribution
|
|
175
|
-
|
|
176
|
-
## Learn More
|
|
177
|
-
|
|
178
|
-
- [loopwind Documentation](https://loopwind.dev)
|
|
179
|
-
- [Next.js API Routes](https://nextjs.org/docs/api-routes/introduction)
|
|
180
|
-
- [Vercel Deployment](https://vercel.com/docs)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "loopwind-nextjs-example",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "next dev",
|
|
7
|
-
"build": "next build",
|
|
8
|
-
"start": "next start"
|
|
9
|
-
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"loopwind": "latest",
|
|
12
|
-
"next": "^14.0.0",
|
|
13
|
-
"react": "^18.2.0",
|
|
14
|
-
"react-dom": "^18.2.0"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@types/node": "^20.0.0",
|
|
18
|
-
"@types/react": "^18.2.0",
|
|
19
|
-
"typescript": "^5.0.0"
|
|
20
|
-
}
|
|
21
|
-
}
|